aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/devices-imx31.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-09-09 15:02:02 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-09-27 09:46:31 -0400
commit35bab0589b9a71533b37280eefa430c21dc102fe (patch)
tree891a4b6c506f46ed596272d34d65e6d4990e459a /arch/arm/mach-mx3/devices-imx31.h
parenta8a05b855291defb1d97a1c3681480e4ca330254 (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-mx3/devices-imx31.h')
-rw-r--r--arch/arm/mach-mx3/devices-imx31.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h
index 3b1a44a20585..7b4d022a59fa 100644
--- a/arch/arm/mach-mx3/devices-imx31.h
+++ b/arch/arm/mach-mx3/devices-imx31.h
@@ -30,9 +30,9 @@
30#define imx31_add_mxc_nand(pdata) \ 30#define imx31_add_mxc_nand(pdata) \
31 imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) 31 imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata)
32 32
33#define imx31_add_spi_imx0(pdata) \ 33extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst;
34 imx_add_spi_imx(0, MX31_CSPI1_BASE_ADDR, SZ_4K, MX31_INT_CSPI1, pdata) 34#define imx31_add_cspi(id, pdata) \
35#define imx31_add_spi_imx1(pdata) \ 35 imx_add_spi_imx(&imx31_cspi_data[id], pdata)
36 imx_add_spi_imx(1, MX31_CSPI2_BASE_ADDR, SZ_4K, MX31_INT_CSPI2, pdata) 36#define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata)
37#define imx31_add_spi_imx2(pdata) \ 37#define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata)
38 imx_add_spi_imx(2, MX31_CSPI3_BASE_ADDR, SZ_4K, MX31_INT_CSPI3, pdata) 38#define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata)