sh: Add support sh_eth to sh7763rdp board

SH7763 has sh_eth device. This patch add sh_eth platform device
to this board.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by Nobuhiro Iwamatsu and committed by Paul Mundt 0a766a6b 68b7c24c

+32 -2
+32 -2
arch/sh/boards/mach-sh7763rdp/setup.c
··· 15 15 #include <linux/interrupt.h> 16 16 #include <linux/input.h> 17 17 #include <linux/mtd/physmap.h> 18 - #include <asm/io.h> 18 + #include <linux/io.h> 19 19 #include <asm/sh7763rdp.h> 20 + #include <asm/sh_eth.h> 20 21 21 22 /* NOR Flash */ 22 23 static struct mtd_partition sh7763rdp_nor_flash_partitions[] = { ··· 61 60 }, 62 61 }; 63 62 63 + /* SH-Ether */ 64 + static struct resource sh_eth_resources[] = { 65 + { 66 + .start = 0xFEE00800, /* use eth1 */ 67 + .end = 0xFEE00F7C - 1, 68 + .flags = IORESOURCE_MEM, 69 + }, { 70 + .start = 58, /* irq number */ 71 + .end = 58, 72 + .flags = IORESOURCE_IRQ, 73 + }, 74 + }; 75 + 76 + static struct sh_eth_plat_data sh7763_eth_pdata = { 77 + .phy = 1, 78 + .edmac_endian = EDMAC_LITTLE_ENDIAN, 79 + }; 80 + 81 + static struct platform_device sh7763rdp_eth_device = { 82 + .name = "sh-eth", 83 + .resource = sh_eth_resources, 84 + .num_resources = ARRAY_SIZE(sh_eth_resources), 85 + .dev = { 86 + .platform_data = &sh7763_eth_pdata, 87 + }, 88 + }; 89 + 64 90 static struct platform_device *sh7763rdp_devices[] __initdata = { 65 91 &sh7763rdp_nor_flash_device, 92 + &sh7763rdp_eth_device, 66 93 }; 67 94 68 95 static int __init sh7763rdp_devices_setup(void) ··· 98 69 return platform_add_devices(sh7763rdp_devices, 99 70 ARRAY_SIZE(sh7763rdp_devices)); 100 71 } 101 - __initcall(sh7763rdp_devices_setup); 72 + 73 + device_initcall(sh7763rdp_devices_setup); 102 74 103 75 static void __init sh7763rdp_setup(char **cmdline_p) 104 76 {