WIP FPC-III support
[linux/fpc-iii.git] / arch / sh / boards / mach-rsk / devices-rsk7264.c
blobeaf700a20b833e33166c3e0e4c424bfbc2563271
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * RSK+SH7264 Support.
5 * Copyright (C) 2012 Renesas Electronics Europe
6 */
7 #include <linux/init.h>
8 #include <linux/types.h>
9 #include <linux/platform_device.h>
10 #include <linux/interrupt.h>
11 #include <linux/input.h>
12 #include <linux/smsc911x.h>
13 #include <asm/machvec.h>
14 #include <asm/io.h>
16 static struct smsc911x_platform_config smsc911x_config = {
17 .phy_interface = PHY_INTERFACE_MODE_MII,
18 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
19 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
20 .flags = SMSC911X_USE_16BIT | SMSC911X_SWAP_FIFO,
23 static struct resource smsc911x_resources[] = {
24 [0] = {
25 .start = 0x28000000,
26 .end = 0x280000ff,
27 .flags = IORESOURCE_MEM,
29 [1] = {
30 .start = 65,
31 .end = 65,
32 .flags = IORESOURCE_IRQ,
36 static struct platform_device smsc911x_device = {
37 .name = "smsc911x",
38 .id = -1,
39 .num_resources = ARRAY_SIZE(smsc911x_resources),
40 .resource = smsc911x_resources,
41 .dev = {
42 .platform_data = &smsc911x_config,
46 static struct platform_device *rsk7264_devices[] __initdata = {
47 &smsc911x_device,
50 static int __init rsk7264_devices_setup(void)
52 return platform_add_devices(rsk7264_devices,
53 ARRAY_SIZE(rsk7264_devices));
55 device_initcall(rsk7264_devices_setup);