diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2010-11-29 02:21:37 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-11-29 13:05:16 +0900 |
commit | 2264c151efa632fa8aab7377d13d9aa1476547bf (patch) | |
tree | a76fb810c8cb3d71e432b801dbcf9ebd59df4fa0 /arch/arm/mach-shmobile/board-mackerel.c | |
parent | 920adc75d51d23fe3e8a7ce2c946b2b24e6f7742 (diff) | |
download | blackbird-op-linux-2264c151efa632fa8aab7377d13d9aa1476547bf.tar.gz blackbird-op-linux-2264c151efa632fa8aab7377d13d9aa1476547bf.zip |
ARM: mach-shmobile: mackerel: Add SMSC support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index b8df70928891..e2def7e27711 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -32,6 +32,7 @@ #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/mtd/physmap.h> +#include <linux/smsc911x.h> #include <mach/common.h> #include <mach/sh7372.h> @@ -109,8 +110,37 @@ static struct platform_device nor_flash_device = { .resource = nor_flash_resources, }; +/* SMSC */ +static struct resource smc911x_resources[] = { + { + .start = 0x14000000, + .end = 0x16000000 - 1, + .flags = IORESOURCE_MEM, + }, { + .start = evt2irq(0x02c0) /* IRQ6A */, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, + }, +}; + +static struct smsc911x_platform_config smsc911x_info = { + .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS, + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, + .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, +}; + +static struct platform_device smc911x_device = { + .name = "smsc911x", + .id = -1, + .num_resources = ARRAY_SIZE(smc911x_resources), + .resource = smc911x_resources, + .dev = { + .platform_data = &smsc911x_info, + }, +}; + static struct platform_device *mackerel_devices[] __initdata = { &nor_flash_device, + &smc911x_device, }; static struct map_desc mackerel_io_desc[] __initdata = { @@ -142,6 +172,10 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_SCIFA0_TXD, NULL); gpio_request(GPIO_FN_SCIFA0_RXD, NULL); + /* enable SMSC911X */ + gpio_request(GPIO_FN_CS5A, NULL); + gpio_request(GPIO_FN_IRQ6_39, NULL); + sh7372_add_standard_devices(); platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); |