Linux Audio

Check our new training course

Loading...
v3.15
 
 1/*
 2 * RSK+SH7269 Support
 3 *
 4 * Copyright (C) 2012  Renesas Electronics Europe Ltd
 5 * Copyright (C) 2012  Phil Edworthy
 6 *
 7 * This file is subject to the terms and conditions of the GNU General Public
 8 * License.  See the file "COPYING" in the main directory of this archive
 9 * for more details.
10 */
11#include <linux/init.h>
12#include <linux/types.h>
13#include <linux/platform_device.h>
14#include <linux/interrupt.h>
15#include <linux/input.h>
16#include <linux/smsc911x.h>
17#include <linux/gpio.h>
18#include <asm/machvec.h>
19#include <asm/io.h>
20
21static struct smsc911x_platform_config smsc911x_config = {
22	.phy_interface	= PHY_INTERFACE_MODE_MII,
23	.irq_polarity	= SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
24	.irq_type	= SMSC911X_IRQ_TYPE_PUSH_PULL,
25	.flags		= SMSC911X_USE_16BIT | SMSC911X_SWAP_FIFO,
26};
27
28static struct resource smsc911x_resources[] = {
29	[0] = {
30		.start		= 0x24000000,
31		.end		= 0x240000ff,
32		.flags		= IORESOURCE_MEM,
33	},
34	[1] = {
35		.start		= 85,
36		.end		= 85,
37		.flags		= IORESOURCE_IRQ,
38	},
39};
40
41static struct platform_device smsc911x_device = {
42	.name		= "smsc911x",
43	.id		= -1,
44	.num_resources	= ARRAY_SIZE(smsc911x_resources),
45	.resource	= smsc911x_resources,
46	.dev		= {
47		.platform_data = &smsc911x_config,
48	},
49};
50
51static struct platform_device *rsk7269_devices[] __initdata = {
52	&smsc911x_device,
53};
54
55static int __init rsk7269_devices_setup(void)
56{
57	return platform_add_devices(rsk7269_devices,
58				    ARRAY_SIZE(rsk7269_devices));
59}
60device_initcall(rsk7269_devices_setup);
v6.8
 1// SPDX-License-Identifier: GPL-2.0
 2/*
 3 * RSK+SH7269 Support
 4 *
 5 * Copyright (C) 2012  Renesas Electronics Europe Ltd
 6 * Copyright (C) 2012  Phil Edworthy
 
 
 
 
 7 */
 8#include <linux/init.h>
 9#include <linux/types.h>
10#include <linux/platform_device.h>
11#include <linux/interrupt.h>
12#include <linux/input.h>
13#include <linux/smsc911x.h>
14#include <linux/gpio.h>
15#include <asm/machvec.h>
16#include <asm/io.h>
17
18static struct smsc911x_platform_config smsc911x_config = {
19	.phy_interface	= PHY_INTERFACE_MODE_MII,
20	.irq_polarity	= SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
21	.irq_type	= SMSC911X_IRQ_TYPE_PUSH_PULL,
22	.flags		= SMSC911X_USE_16BIT | SMSC911X_SWAP_FIFO,
23};
24
25static struct resource smsc911x_resources[] = {
26	[0] = {
27		.start		= 0x24000000,
28		.end		= 0x240000ff,
29		.flags		= IORESOURCE_MEM,
30	},
31	[1] = {
32		.start		= 85,
33		.end		= 85,
34		.flags		= IORESOURCE_IRQ,
35	},
36};
37
38static struct platform_device smsc911x_device = {
39	.name		= "smsc911x",
40	.id		= -1,
41	.num_resources	= ARRAY_SIZE(smsc911x_resources),
42	.resource	= smsc911x_resources,
43	.dev		= {
44		.platform_data = &smsc911x_config,
45	},
46};
47
48static struct platform_device *rsk7269_devices[] __initdata = {
49	&smsc911x_device,
50};
51
52static int __init rsk7269_devices_setup(void)
53{
54	return platform_add_devices(rsk7269_devices,
55				    ARRAY_SIZE(rsk7269_devices));
56}
57device_initcall(rsk7269_devices_setup);