aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-sh7763rdp
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>2008-08-08 01:29:58 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-08-11 07:17:50 -0400
commit0a766a6b7dd9f3d15c32d724555d954dc6bb020d (patch)
tree146b005a0b5bbf7eddd7cfd08bdef5ab4371e3b8 /arch/sh/boards/mach-sh7763rdp
parent68b7c24cf9c699ed93c4a70f958b5bb3943723bc (diff)
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>
Diffstat (limited to 'arch/sh/boards/mach-sh7763rdp')
-rw-r--r--arch/sh/boards/mach-sh7763rdp/setup.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c
index 925f16af7121..49940d192d67 100644
--- a/arch/sh/boards/mach-sh7763rdp/setup.c
+++ b/arch/sh/boards/mach-sh7763rdp/setup.c
@@ -15,8 +15,9 @@
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/input.h> 16#include <linux/input.h>
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <asm/io.h> 18#include <linux/io.h>
19#include <asm/sh7763rdp.h> 19#include <asm/sh7763rdp.h>
20#include <asm/sh_eth.h>
20 21
21/* NOR Flash */ 22/* NOR Flash */
22static struct mtd_partition sh7763rdp_nor_flash_partitions[] = { 23static struct mtd_partition sh7763rdp_nor_flash_partitions[] = {
@@ -60,8 +61,36 @@ static struct platform_device sh7763rdp_nor_flash_device = {
60 }, 61 },
61}; 62};
62 63
64/* SH-Ether */
65static struct resource sh_eth_resources[] = {
66 {
67 .start = 0xFEE00800, /* use eth1 */
68 .end = 0xFEE00F7C - 1,
69 .flags = IORESOURCE_MEM,
70 }, {
71 .start = 58, /* irq number */
72 .end = 58,
73 .flags = IORESOURCE_IRQ,
74 },
75};
76
77static struct sh_eth_plat_data sh7763_eth_pdata = {
78 .phy = 1,
79 .edmac_endian = EDMAC_LITTLE_ENDIAN,
80};
81
82static struct platform_device sh7763rdp_eth_device = {
83 .name = "sh-eth",
84 .resource = sh_eth_resources,
85 .num_resources = ARRAY_SIZE(sh_eth_resources),
86 .dev = {
87 .platform_data = &sh7763_eth_pdata,
88 },
89};
90
63static struct platform_device *sh7763rdp_devices[] __initdata = { 91static struct platform_device *sh7763rdp_devices[] __initdata = {
64 &sh7763rdp_nor_flash_device, 92 &sh7763rdp_nor_flash_device,
93 &sh7763rdp_eth_device,
65}; 94};
66 95
67static int __init sh7763rdp_devices_setup(void) 96static int __init sh7763rdp_devices_setup(void)
@@ -69,7 +98,8 @@ static int __init sh7763rdp_devices_setup(void)
69 return platform_add_devices(sh7763rdp_devices, 98 return platform_add_devices(sh7763rdp_devices,
70 ARRAY_SIZE(sh7763rdp_devices)); 99 ARRAY_SIZE(sh7763rdp_devices));
71} 100}
72__initcall(sh7763rdp_devices_setup); 101
102device_initcall(sh7763rdp_devices_setup);
73 103
74static void __init sh7763rdp_setup(char **cmdline_p) 104static void __init sh7763rdp_setup(char **cmdline_p)
75{ 105{