diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-09-09 15:02:02 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-09-27 09:46:31 -0400 |
commit | 35bab0589b9a71533b37280eefa430c21dc102fe (patch) | |
tree | 891a4b6c506f46ed596272d34d65e6d4990e459a /arch/arm/mach-imx/devices-imx21.h | |
parent | a8a05b855291defb1d97a1c3681480e4ca330254 (diff) |
ARM: imx: change the way spi-imx devices are registered
Group soc specific data in a global struct instead of repeating it for
each call to imxXX_add_spi_imxX. The structs holding the actual data
are placed in .init.constdata and so don't do much harm. Compared to
the previous approach this reduces code size to call imx_add_spi_imx.
Acked-by: Jason Wang <jason77.wang@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/devices-imx21.h')
-rw-r--r-- | arch/arm/mach-imx/devices-imx21.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h index 42788e99d127..2b45d3316267 100644 --- a/arch/arm/mach-imx/devices-imx21.h +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -24,7 +24,8 @@ | |||
24 | #define imx21_add_mxc_nand(pdata) \ | 24 | #define imx21_add_mxc_nand(pdata) \ |
25 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) | 25 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) |
26 | 26 | ||
27 | #define imx21_add_spi_imx0(pdata) \ | 27 | extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; |
28 | imx_add_spi_imx(0, MX21_CSPI1_BASE_ADDR, SZ_4K, MX21_INT_CSPI1, pdata) | 28 | #define imx21_add_cspi(id, pdata) \ |
29 | #define imx21_add_spi_imx1(pdata) \ | 29 | imx_add_spi_imx(&imx21_cspi_data[id], pdata) |
30 | imx_add_spi_imx(1, MX21_CSPI2_BASE_ADDR, SZ_4K, MX21_INT_CSPI2, pdata) | 30 | #define imx21_add_spi_imx0(pdata) imx21_add_cspi(0, pdata) |
31 | #define imx21_add_spi_imx1(pdata) imx21_add_cspi(1, pdata) | ||