]> git.karo-electronics.de Git - linux-beck.git/commitdiff
CS89x0 : add CS89x0 platform device to the iMX21ADS board
authorJaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
Thu, 26 Jan 2012 20:46:57 +0000 (21:46 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Wed, 1 Feb 2012 15:49:50 +0000 (16:49 +0100)
Add CS89x0 networking support to the iMX21ADS board by using the
platform driver support in the CS89x0 driver.

Signed-off-by: Jaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/configs/imx_v4_v5_defconfig
arch/arm/mach-imx/mach-mx21ads.c

index a22e93079063855cc5bf8047864bda8284a5ec01..b5f08e9813b3ce3346a6a15d0ac3f56cb61ee786 100644 (file)
@@ -78,6 +78,8 @@ CONFIG_MISC_DEVICES=y
 CONFIG_EEPROM_AT24=y
 CONFIG_EEPROM_AT25=y
 CONFIG_NETDEVICES=y
+CONFIG_CS89x0=y
+CONFIG_CS89x0_PLATFORM=y
 CONFIG_DM9000=y
 CONFIG_SMC91X=y
 CONFIG_SMC911X=y
index 8d9f95514b1f1410997b7ecadfcc3918b9b5f613..e432d4acee1fb72711485002f3108c5b33575d99 100644 (file)
@@ -37,8 +37,8 @@
 #define MX21ADS_REG_ADDR(offset)    (void __force __iomem *) \
                (MX21ADS_MMIO_BASE_ADDR + (offset))
 
+#define MX21ADS_CS8900A_MMIO_SIZE   0x200000
 #define MX21ADS_CS8900A_IRQ         IRQ_GPIOE(11)
-#define MX21ADS_CS8900A_IOBASE_REG  MX21ADS_REG_ADDR(0x000000)
 #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000)
 #define MX21ADS_VERSION_REG         MX21ADS_REG_ADDR(0x400000)
 #define MX21ADS_IO_REG              MX21ADS_REG_ADDR(0x800000)
@@ -159,6 +159,18 @@ static struct platform_device mx21ads_nor_mtd_device = {
        .resource = &mx21ads_flash_resource,
 };
 
+static const struct resource mx21ads_cs8900_resources[] __initconst = {
+       DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE),
+       DEFINE_RES_IRQ(MX21ADS_CS8900A_IRQ),
+};
+
+static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = {
+       .name = "cs89x0",
+       .id = 0,
+       .res = mx21ads_cs8900_resources,
+       .num_res = ARRAY_SIZE(mx21ads_cs8900_resources),
+};
+
 static const struct imxuart_platform_data uart_pdata_rts __initconst = {
        .flags = IMXUART_HAVE_RTSCTS,
 };
@@ -292,6 +304,8 @@ static void __init mx21ads_board_init(void)
        imx21_add_mxc_nand(&mx21ads_nand_board_info);
 
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+       platform_device_register_full(
+                       (struct platform_device_info *)&mx21ads_cs8900_devinfo);
 }
 
 static void __init mx21ads_timer_init(void)