aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-11-10 21:47:36 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-11-11 02:56:35 -0500
commit8900df7add8a4c197f0f9d7e8dc0d41847ba5eeb (patch)
tree997c616bb979a2424a1dbb5dbdcc46ccde80cffa /arch/arm/mach-shmobile
parent6bf2805dac7cd6c70e678e0f4852c67000c7fc21 (diff)
ARM: mach-shmobile: bonito: add SMSC9221 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')
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index fe749e354626..4d2201622323 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -95,6 +95,7 @@
95#define FPGA_IRQ_BASE (512) 95#define FPGA_IRQ_BASE (512)
96#define FPGA_IRQ0 (FPGA_IRQ_BASE) 96#define FPGA_IRQ0 (FPGA_IRQ_BASE)
97#define FPGA_IRQ1 (FPGA_IRQ_BASE + 16) 97#define FPGA_IRQ1 (FPGA_IRQ_BASE + 16)
98#define FPGA_ETH_IRQ (FPGA_IRQ0 + 15)
98static u16 bonito_fpga_read(u32 offset) 99static u16 bonito_fpga_read(u32 offset)
99{ 100{
100 return __raw_readw(0xf0003000 + offset); 101 return __raw_readw(0xf0003000 + offset);
@@ -278,6 +279,37 @@ static struct platform_device lcdc0_device = {
278}; 279};
279 280
280/* 281/*
282 * SMSC 9221
283 */
284static struct resource smsc_resources[] = {
285 [0] = {
286 .start = 0x18010000,
287 .end = 0x18011000 - 1,
288 .flags = IORESOURCE_MEM,
289 },
290 [1] = {
291 .start = FPGA_ETH_IRQ,
292 .flags = IORESOURCE_IRQ,
293 },
294};
295
296static struct smsc911x_platform_config smsc_platdata = {
297 .flags = SMSC911X_USE_16BIT,
298 .phy_interface = PHY_INTERFACE_MODE_MII,
299 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
300 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
301};
302
303static struct platform_device smsc_device = {
304 .name = "smsc911x",
305 .dev = {
306 .platform_data = &smsc_platdata,
307 },
308 .resource = smsc_resources,
309 .num_resources = ARRAY_SIZE(smsc_resources),
310};
311
312/*
281 * core board devices 313 * core board devices
282 */ 314 */
283static struct platform_device *bonito_core_devices[] __initdata = { 315static struct platform_device *bonito_core_devices[] __initdata = {
@@ -288,6 +320,7 @@ static struct platform_device *bonito_core_devices[] __initdata = {
288 */ 320 */
289static struct platform_device *bonito_base_devices[] __initdata = { 321static struct platform_device *bonito_base_devices[] __initdata = {
290 &lcdc0_device, 322 &lcdc0_device,
323 &smsc_device,
291}; 324};
292 325
293/* 326/*