2 * Renesas Technology Europe RSK+ 7203 Support.
4 * Copyright (C) 2008 Paul Mundt
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
10 #include <linux/init.h>
11 #include <linux/types.h>
12 #include <linux/platform_device.h>
13 #include <linux/interrupt.h>
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/physmap.h>
17 #include <linux/mtd/map.h>
18 #include <linux/smsc911x.h>
19 #include <linux/gpio.h>
20 #include <linux/leds.h>
21 #include <asm/machvec.h>
23 #include <cpu/sh7203.h>
25 static struct smsc911x_platform_config smsc911x_config = {
26 .phy_interface = PHY_INTERFACE_MODE_MII,
27 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
28 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
29 .flags = SMSC911X_USE_16BIT,
32 static struct resource smsc911x_resources[] = {
35 .end = 0x24000000 + 0x100,
36 .flags = IORESOURCE_MEM,
41 .flags = IORESOURCE_IRQ,
45 static struct platform_device smsc911x_device = {
48 .num_resources = ARRAY_SIZE(smsc911x_resources),
49 .resource = smsc911x_resources,
51 .platform_data = &smsc911x_config,
55 static struct gpio_led rsk7203_gpio_leds[] = {
62 .default_trigger = "nand-disk",
67 .default_trigger = "timer",
71 .name = "red:heartbeat",
72 .default_trigger = "heartbeat",
78 static struct gpio_led_platform_data rsk7203_gpio_leds_info = {
79 .leds = rsk7203_gpio_leds,
80 .num_leds = ARRAY_SIZE(rsk7203_gpio_leds),
83 static struct platform_device led_device = {
87 .platform_data = &rsk7203_gpio_leds_info,
91 static struct platform_device *rsk7203_devices[] __initdata = {
96 static int __init rsk7203_devices_setup(void)
98 /* Select pins for SCIF0 */
99 gpio_request(GPIO_FN_TXD0, NULL);
100 gpio_request(GPIO_FN_RXD0, NULL);
102 return platform_add_devices(rsk7203_devices,
103 ARRAY_SIZE(rsk7203_devices));
105 device_initcall(rsk7203_devices_setup);