Path: blob/master/arch/mn10300/unit-asb2364/smsc911x.c
10817 views
/* Specification for the SMSC911x NIC1*2* Copyright (C) 2006 Matsushita Electric Industrial Co., Ltd.3* All Rights Reserved.4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public License7* as published by the Free Software Foundation; either version8* 2 of the License, or (at your option) any later version.9*/1011#include <linux/kernel.h>12#include <linux/init.h>13#include <linux/platform_device.h>14#include <linux/io.h>15#include <linux/ioport.h>16#include <linux/smsc911x.h>17#include <unit/smsc911x.h>1819static struct smsc911x_platform_config smsc911x_config = {20.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,21.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,22.flags = SMSC911X_USE_32BIT,23};2425static struct resource smsc911x_resources[] = {26[0] = {27.start = SMSC911X_BASE,28.end = SMSC911X_BASE_END,29.flags = IORESOURCE_MEM,30},31[1] = {32.start = SMSC911X_IRQ,33.end = SMSC911X_IRQ,34.flags = IORESOURCE_IRQ,35},36};3738static struct platform_device smsc911x_device = {39.name = "smsc911x",40.id = 0,41.num_resources = ARRAY_SIZE(smsc911x_resources),42.resource = smsc911x_resources,43.dev = {44.platform_data = &smsc911x_config,45}46};4748/*49* add platform devices50*/51static int __init unit_device_init(void)52{53platform_device_register(&smsc911x_device);54return 0;55}5657device_initcall(unit_device_init);585960