Skip to content

Commit

Permalink
ARM: imx: dynamically register spi_imx devices (imx21)
Browse files Browse the repository at this point in the history
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  • Loading branch information
Uwe Kleine-König committed Jun 30, 2010
1 parent 0287073 commit 642e466
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions arch/arm/mach-imx/devices-imx21.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@

#define imx21_add_mxc_nand(pdata) \
imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata)

#define imx21_add_spi_imx0(pdata) \
imx_add_spi_imx(0, MX21_CSPI1_BASE_ADDR, SZ_4K, MX21_INT_CSPI1, pdata)
#define imx21_add_spi_imx1(pdata) \
imx_add_spi_imx(1, MX21_CSPI2_BASE_ADDR, SZ_4K, MX21_INT_CSPI2, pdata)
3 changes: 1 addition & 2 deletions arch/arm/mach-imx/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ int __init imx1_register_gpios(void)
* - i.MX21: 2 channel
* - i.MX27: 3 channel
*/
#ifdef CONFIG_MACH_MX27
#define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \
static struct resource mxc_spi_resources ## n[] = { \
{ \
Expand All @@ -247,8 +248,6 @@ int __init imx1_register_gpios(void)

DEFINE_IMX_SPI_DEVICE(0, MX2x_CSPI1_BASE_ADDR, MX2x_INT_CSPI1);
DEFINE_IMX_SPI_DEVICE(1, MX2x_CSPI2_BASE_ADDR, MX2x_INT_CSPI2);

#ifdef CONFIG_MACH_MX27
DEFINE_IMX_SPI_DEVICE(2, MX27_CSPI3_BASE_ADDR, MX27_INT_CSPI3);
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ extern struct platform_device mxc_otg_udc_device;
extern struct platform_device mxc_otg_host;
extern struct platform_device mxc_usbh1;
extern struct platform_device mxc_usbh2;
#ifdef CONFIG_MACH_MX27
extern struct platform_device mxc_spi_device0;
extern struct platform_device mxc_spi_device1;
#ifdef CONFIG_MACH_MX27
extern struct platform_device mxc_spi_device2;
#endif
extern struct platform_device mx21_usbhc_device;
Expand Down

0 comments on commit 642e466

Please sign in to comment.