From: Pekon Gupta Date: Wed, 23 Jul 2014 18:17:38 +0000 (+0530) Subject: ARM: OMAP2+: fix gpmc_cs_remap: re-allocating chip-select address space based on DT X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52406899f7b0f30f4d30a4b3a07ed1b9e9675177;p=pandora-kernel.git ARM: OMAP2+: fix gpmc_cs_remap: re-allocating chip-select address space based on DT Each GPMC chip-select needs to be configured for (base-address,CS-size) so that GPMC understands the address-space allocated to device connected externally. These chip-select configurations (base-address, CS-size) follow some basic mapping rules like: - The CS size is programmable from 256 MBytes to 16 MBytes (must be a power of 2) and is defined by the mask field. Attached memory smaller than the programmed CS region size is accessed through the entire CS region (aliasing). - The programmed 'base-address' must be aligned to the 'CS-size' boundary and be a power of 2. - Valid CS-size values are {256MB(max), 128MB, 64MB, 32MB and 16MB (min)} Any intermediate values creates holes in the chip-select memory-map. This patch adds above checks in gpmc_cs_remap() so that any invalid value passed by DT property can be filtered before actually allocating the address space. Signed-off-by: Pekon Gupta Signed-off-by: Tony Lindgren --- Reading git-diff-tree failed