aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-r8a7779.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2013-04-04 14:53:50 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-04-04 21:47:03 -0400
commitdace48d04dee46a3409d5e13cd98031522e46377 (patch)
treeff91a137d45287b08147c45c3d18f4ffcaa44a0c /arch/arm/mach-shmobile/setup-r8a7779.c
parentf0ff5a0a82b0c1be8e14584aa66a7890e08361d9 (diff)
ARM: shmobile: R8A7779: add Ether support
Add Ether clock and platform device for R8A7779 SoC; add a function to register this device with board-specific platform data. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7779.c')
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 042df35e71a0..689ce67920d8 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -1,8 +1,9 @@
1/* 1/*
2 * r8a7779 processor support 2 * r8a7779 processor support
3 * 3 *
4 * Copyright (C) 2011 Renesas Solutions Corp. 4 * Copyright (C) 2011, 2013 Renesas Solutions Corp.
5 * Copyright (C) 2011 Magnus Damm 5 * Copyright (C) 2011 Magnus Damm
6 * Copyright (C) 2013 Cogent Embedded, Inc.
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -347,6 +348,18 @@ static struct platform_device sata_device = {
347 }, 348 },
348}; 349};
349 350
351/* Ether */
352static struct resource ether_resources[] = {
353 {
354 .start = 0xfde00000,
355 .end = 0xfde003ff,
356 .flags = IORESOURCE_MEM,
357 }, {
358 .start = gic_iid(0xb4),
359 .flags = IORESOURCE_IRQ,
360 },
361};
362
350static struct platform_device *r8a7779_devices_dt[] __initdata = { 363static struct platform_device *r8a7779_devices_dt[] __initdata = {
351 &scif0_device, 364 &scif0_device,
352 &scif1_device, 365 &scif1_device,
@@ -382,6 +395,14 @@ void __init r8a7779_add_standard_devices(void)
382 ARRAY_SIZE(r8a7779_late_devices)); 395 ARRAY_SIZE(r8a7779_late_devices));
383} 396}
384 397
398void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata)
399{
400 platform_device_register_resndata(&platform_bus, "sh_eth", -1,
401 ether_resources,
402 ARRAY_SIZE(ether_resources),
403 pdata, sizeof(*pdata));
404}
405
385/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 406/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
386void __init __weak r8a7779_register_twd(void) { } 407void __init __weak r8a7779_register_twd(void) { }
387 408