2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
8 #include <linux/module.h>
10 #include <linux/irqchip/mips-gic.h>
11 #include <linux/platform_device.h>
12 #include <linux/smsc911x.h>
14 #include <asm/mips-boards/sead3int.h>
16 static struct smsc911x_platform_config sead3_smsc911x_data = {
17 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
18 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
19 .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
20 .phy_interface = PHY_INTERFACE_MODE_MII,
23 struct resource sead3_net_resources[] = {
27 .flags = IORESOURCE_MEM
30 .flags = IORESOURCE_IRQ
34 static struct platform_device sead3_net_device = {
38 .platform_data = &sead3_smsc911x_data,
40 .num_resources = ARRAY_SIZE(sead3_net_resources),
41 .resource = sead3_net_resources
44 static int __init sead3_net_init(void)
47 sead3_net_resources[1].start = MIPS_GIC_IRQ_BASE + GIC_INT_NET;
49 sead3_net_resources[1].start = MIPS_CPU_IRQ_BASE + CPU_INT_NET;
50 return platform_device_register(&sead3_net_device);
53 module_init(sead3_net_init);
55 MODULE_AUTHOR("Chris Dearman <chris@mips.com>");
56 MODULE_LICENSE("GPL");
57 MODULE_DESCRIPTION("Network probe driver for SEAD-3");