diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-10-13 15:55:04 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-10-13 17:27:19 +0200 |
commit | a5257e9cdebff526b0eb6e133106e7fcfd01f485 (patch) | |
tree | 6c96fea6d7ed27b2975ed4b4c18935c3f07c5021 /arch/arm/mach-imx/include/mach/devices-imx53.h | |
parent | c3a1bd4fe1862c56a134cbb7910d430b5c4cdac1 (diff) | |
download | barebox-a5257e9cdebff526b0eb6e133106e7fcfd01f485.tar.gz barebox-a5257e9cdebff526b0eb6e133106e7fcfd01f485.tar.xz |
ARM i.MX53: Fix nand registration helper
We switched to resources recently and the nand controller
of the i.MX53 needs two of them, so fix the helper in the
same way as the i.MX51
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.h | 25 |
1 files changed, 23 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 41572a73dd..70e7671620 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx53.h +++ b/arch/arm/mach-imx/include/mach/devices-imx53.h @@ -53,6 +53,27 @@ static inline struct device_d *imx53_add_mmc2(void *pdata) static inline struct device_d *imx53_add_nand(struct imx_nand_platform_data *pdata) { - return imx_add_nand((void *)MX53_NFC_AXI_BASE_ADDR, pdata); -} + struct resource res[] = { + { + .start = MX53_NFC_BASE_ADDR, + .size = SZ_4K, + .flags = IORESOURCE_MEM, + }, { + .start = MX53_NFC_AXI_BASE_ADDR, + .size = SZ_4K, + .flags = IORESOURCE_MEM, + }, + }; + struct device_d *dev = xzalloc(sizeof(*dev)); + + dev->resource = xzalloc(sizeof(struct resource) * ARRAY_SIZE(res)); + memcpy(dev->resource, res, sizeof(struct resource) * ARRAY_SIZE(res)); + dev->num_resources = ARRAY_SIZE(res); + strcpy(dev->name, "imx_nand"); + dev->id = -1; + dev->platform_data = pdata; + register_device(dev); + + return dev; +} |