* [PATCH] sh: Add support sh_eth to sh7763rdp board
@ 2008-08-08 5:29 Nobuhiro Iwamatsu
2008-08-11 15:17 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-08-08 5:29 UTC (permalink / raw)
To: linux-sh
SH7763 has sh_eth device. This patch add sh_eth platform device
to this board.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
---
arch/sh/boards/mach-sh7763rdp/setup.c | 34 +++++++++++++++++++++++++++++++-
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 925f16a..49940d1 100644
--- a/arch/sh/boards/mach-sh7763rdp/setup.c
+++ b/arch/sh/boards/mach-sh7763rdp/setup.c
@@ -15,8 +15,9 @@
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/mtd/physmap.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include <asm/sh7763rdp.h>
+#include <asm/sh_eth.h>
/* NOR Flash */
static struct mtd_partition sh7763rdp_nor_flash_partitions[] = {
@@ -60,8 +61,36 @@ static struct platform_device sh7763rdp_nor_flash_device = {
},
};
+/* SH-Ether */
+static struct resource sh_eth_resources[] = {
+ {
+ .start = 0xFEE00800, /* use eth1 */
+ .end = 0xFEE00F7C - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = 58, /* irq number */
+ .end = 58,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct sh_eth_plat_data sh7763_eth_pdata = {
+ .phy = 1,
+ .edmac_endian = EDMAC_LITTLE_ENDIAN,
+};
+
+static struct platform_device sh7763rdp_eth_device = {
+ .name = "sh-eth",
+ .resource = sh_eth_resources,
+ .num_resources = ARRAY_SIZE(sh_eth_resources),
+ .dev = {
+ .platform_data = &sh7763_eth_pdata,
+ },
+};
+
static struct platform_device *sh7763rdp_devices[] __initdata = {
&sh7763rdp_nor_flash_device,
+ &sh7763rdp_eth_device,
};
static int __init sh7763rdp_devices_setup(void)
@@ -69,7 +98,8 @@ static int __init sh7763rdp_devices_setup(void)
return platform_add_devices(sh7763rdp_devices,
ARRAY_SIZE(sh7763rdp_devices));
}
-__initcall(sh7763rdp_devices_setup);
+
+device_initcall(sh7763rdp_devices_setup);
static void __init sh7763rdp_setup(char **cmdline_p)
{
--
1.5.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: Add support sh_eth to sh7763rdp board
2008-08-08 5:29 [PATCH] sh: Add support sh_eth to sh7763rdp board Nobuhiro Iwamatsu
@ 2008-08-11 15:17 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-08-11 15:17 UTC (permalink / raw)
To: linux-sh
On Fri, Aug 08, 2008 at 02:29:58PM +0900, Nobuhiro Iwamatsu wrote:
> SH7763 has sh_eth device. This patch add sh_eth platform device
> to this board.
>
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
On Fri, Aug 08, 2008 at 02:30:06PM +0900, Nobuhiro Iwamatsu wrote:
> Add sh7760fb platform device to sh7763rdp's setup.
On Fri, Aug 08, 2008 at 02:30:13PM +0900, Nobuhiro Iwamatsu wrote:
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> ---
> arch/sh/configs/sh7763rdp_defconfig | 113 ++++++++++++++++++++++++++++++-----
> 1 files changed, 97 insertions(+), 16 deletions(-)
>
These are now applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-11 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 5:29 [PATCH] sh: Add support sh_eth to sh7763rdp board Nobuhiro Iwamatsu
2008-08-11 15:17 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox