summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/include/mach/devices-imx53.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-05-24 08:52:22 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-01 08:18:53 +0200
commit5f03074ea98b64b55c133b35ee144fdc909e6d69 (patch)
tree1a61fd84a5a44d98297014486eca663221ff4cbc /arch/arm/mach-imx/include/mach/devices-imx53.h
parent20addb80f65076b3a81c7d778f7b93d445a96841 (diff)
downloadbarebox-5f03074ea98b64b55c133b35ee144fdc909e6d69.tar.gz
barebox-5f03074ea98b64b55c133b35ee144fdc909e6d69.tar.xz
resource: store 'end' instead of 'size' in struct resource
Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/include/mach/devices-imx53.h')
-rw-r--r--arch/arm/mach-imx/include/mach/devices-imx53.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/include/mach/devices-imx53.h b/arch/arm/mach-imx/include/mach/devices-imx53.h
index a9fe454d39..0fc4b5cf02 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx53.h
+++ b/arch/arm/mach-imx/include/mach/devices-imx53.h
@@ -61,11 +61,11 @@ static inline struct device_d *imx53_add_nand(struct imx_nand_platform_data *pda
struct resource res[] = {
{
.start = MX53_NFC_BASE_ADDR,
- .size = SZ_4K,
+ .end = MX53_NFC_BASE_ADDR + SZ_4K - 1,
.flags = IORESOURCE_MEM,
}, {
.start = MX53_NFC_AXI_BASE_ADDR,
- .size = SZ_4K,
+ .end = MX53_NFC_AXI_BASE_ADDR + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
};