aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-kzm9g.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-10 23:57:58 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:34:15 -0400
commitc15c4257a7858c6670f54c667f804df86a9fff1c (patch)
treeba0c740cef4a45f3011ef87bb699dd1983fe003f /arch/arm/mach-shmobile/board-kzm9g.c
parent6d3c9135cc4da91ea6cebcc1aefc33d13a50957e (diff)
ARM: mach-shmobile: kzm9g: add SMSC 9221 support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile/board-kzm9g.c')
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 55dad87926d5..a46aec1ddb44 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -20,6 +20,8 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/smsc911x.h>
24#include <mach/irqs.h>
23#include <mach/sh73a0.h> 25#include <mach/sh73a0.h>
24#include <mach/common.h> 26#include <mach/common.h>
25#include <asm/hardware/cache-l2x0.h> 27#include <asm/hardware/cache-l2x0.h>
@@ -27,7 +29,37 @@
27#include <asm/mach-types.h> 29#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
29 31
32/* SMSC 9221 */
33static struct resource smsc9221_resources[] = {
34 [0] = {
35 .start = 0x10000000, /* CS4 */
36 .end = 0x100000ff,
37 .flags = IORESOURCE_MEM,
38 },
39 [1] = {
40 .start = intcs_evt2irq(0x260), /* IRQ3 */
41 .flags = IORESOURCE_IRQ,
42 },
43};
44
45static struct smsc911x_platform_config smsc9221_platdata = {
46 .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
47 .phy_interface = PHY_INTERFACE_MODE_MII,
48 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
49 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
50};
51
52static struct platform_device smsc_device = {
53 .name = "smsc911x",
54 .dev = {
55 .platform_data = &smsc9221_platdata,
56 },
57 .resource = smsc9221_resources,
58 .num_resources = ARRAY_SIZE(smsc9221_resources),
59};
60
30static struct platform_device *kzm_devices[] __initdata = { 61static struct platform_device *kzm_devices[] __initdata = {
62 &smsc_device,
31}; 63};
32 64
33static void __init kzm_init(void) 65static void __init kzm_init(void)
@@ -40,6 +72,13 @@ static void __init kzm_init(void)
40 gpio_request(GPIO_FN_SCIFA4_RTS_, NULL); 72 gpio_request(GPIO_FN_SCIFA4_RTS_, NULL);
41 gpio_request(GPIO_FN_SCIFA4_CTS_, NULL); 73 gpio_request(GPIO_FN_SCIFA4_CTS_, NULL);
42 74
75 /* CS4 for SMSC/USB */
76 gpio_request(GPIO_FN_CS4_, NULL); /* CS4 */
77
78 /* SMSC */
79 gpio_request(GPIO_PORT224, NULL); /* IRQ3 */
80 gpio_direction_input(GPIO_PORT224);
81
43#ifdef CONFIG_CACHE_L2X0 82#ifdef CONFIG_CACHE_L2X0
44 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 83 /* Early BRESP enable, Shared attribute override enable, 64K*8way */
45 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); 84 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);