1/* 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 4 * for more details. 5 * 6 * Copyright (C) 2007-2011 MIPS Technologies, Inc. 7 * written by Ralf Baechle (ralf@linux-mips.org) 8 * 9 * Probe driver for the SEAD3 network device 10 * 11 */ 12#include <linux/module.h> 13#include <linux/init.h> 14#include <linux/platform_device.h> 15#include <linux/smsc911x.h> 16#include <irq.h> 17 18static struct smsc911x_platform_config net_data = { 19 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 20 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 21 .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, 22 .phy_interface = PHY_INTERFACE_MODE_MII, 23}; 24 25struct resource net_resources[] = { 26 { 27 .start = 0x1f010000, 28 .end = 0x1f01ffff, 29 .flags = IORESOURCE_MEM 30 }, 31 { 32 .start = MIPS_CPU_IRQ_BASE + 6, 33 .flags = IORESOURCE_IRQ 34 } 35}; 36 37static struct platform_device net_device = { 38 .name = "smsc911x", 39 .id = 0, 40 .dev = { 41 .platform_data = &net_data, 42 }, 43 .num_resources = ARRAY_SIZE(net_resources), 44 .resource = net_resources 45}; 46 47static int __init net_init(void) 48{ 49 return platform_device_register(&net_device); 50} 51 52module_init(net_init); 53 54MODULE_AUTHOR("Chris Dearman <chris@mips.com>"); 55MODULE_LICENSE("GPL"); 56MODULE_DESCRIPTION("Network probe driver for SEAD3"); 57