1*f86b9e03SGreg Ungerer /*
2*f86b9e03SGreg Ungerer * mcf8390.c -- platform support for 8390 ethernet on many boards
3*f86b9e03SGreg Ungerer *
4*f86b9e03SGreg Ungerer * (C) Copyright 2012, Greg Ungerer <gerg@uclinux.org>
5*f86b9e03SGreg Ungerer *
6*f86b9e03SGreg Ungerer * This file is subject to the terms and conditions of the GNU General Public
7*f86b9e03SGreg Ungerer * License. See the file COPYING in the main directory of this archive
8*f86b9e03SGreg Ungerer * for more details.
9*f86b9e03SGreg Ungerer */
10*f86b9e03SGreg Ungerer
11*f86b9e03SGreg Ungerer #include <linux/kernel.h>
12*f86b9e03SGreg Ungerer #include <linux/module.h>
13*f86b9e03SGreg Ungerer #include <linux/init.h>
14*f86b9e03SGreg Ungerer #include <linux/resource.h>
15*f86b9e03SGreg Ungerer #include <linux/platform_device.h>
16*f86b9e03SGreg Ungerer #include <asm/mcf8390.h>
17*f86b9e03SGreg Ungerer
18*f86b9e03SGreg Ungerer static struct resource mcf8390_resources[] = {
19*f86b9e03SGreg Ungerer {
20*f86b9e03SGreg Ungerer .start = NE2000_ADDR,
21*f86b9e03SGreg Ungerer .end = NE2000_ADDR + NE2000_ADDRSIZE - 1,
22*f86b9e03SGreg Ungerer .flags = IORESOURCE_MEM,
23*f86b9e03SGreg Ungerer },
24*f86b9e03SGreg Ungerer {
25*f86b9e03SGreg Ungerer .start = NE2000_IRQ_VECTOR,
26*f86b9e03SGreg Ungerer .end = NE2000_IRQ_VECTOR,
27*f86b9e03SGreg Ungerer .flags = IORESOURCE_IRQ,
28*f86b9e03SGreg Ungerer },
29*f86b9e03SGreg Ungerer };
30*f86b9e03SGreg Ungerer
mcf8390_platform_init(void)31*f86b9e03SGreg Ungerer static int __init mcf8390_platform_init(void)
32*f86b9e03SGreg Ungerer {
33*f86b9e03SGreg Ungerer platform_device_register_simple("mcf8390", -1, mcf8390_resources,
34*f86b9e03SGreg Ungerer ARRAY_SIZE(mcf8390_resources));
35*f86b9e03SGreg Ungerer return 0;
36*f86b9e03SGreg Ungerer }
37*f86b9e03SGreg Ungerer
38*f86b9e03SGreg Ungerer arch_initcall(mcf8390_platform_init);
39