2 * arch/ppc/platforms/chrp_pegasos_eth.c
4 * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
6 * Dale Farnsworth <dale@farnsworth.org>
7 * Mark A. Greer <mgreer@mvista.com>
8 * Nicolas DET <nd@bplan-gmbh.de>
9 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 * And anyone else who helped me on this.
13 #include <linux/types.h>
14 #include <linux/init.h>
15 #include <linux/ioport.h>
16 #include <linux/device.h>
17 #include <linux/mv643xx.h>
18 #include <linux/pci.h>
20 /* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */
21 static struct resource mv643xx_eth_shared_resources[] = {
23 .name = "ethernet shared base",
24 .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
25 .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
26 MV643XX_ETH_SHARED_REGS_SIZE - 1,
27 .flags = IORESOURCE_MEM,
31 static struct platform_device mv643xx_eth_shared_device = {
32 .name = MV643XX_ETH_SHARED_NAME,
34 .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources),
35 .resource = mv643xx_eth_shared_resources,
38 static struct resource mv643xx_eth0_resources[] = {
43 .flags = IORESOURCE_IRQ,
47 static struct mv643xx_eth_platform_data eth0_pd;
49 static struct platform_device eth0_device = {
50 .name = MV643XX_ETH_NAME,
52 .num_resources = ARRAY_SIZE(mv643xx_eth0_resources),
53 .resource = mv643xx_eth0_resources,
55 .platform_data = ð0_pd,
59 static struct resource mv643xx_eth1_resources[] = {
64 .flags = IORESOURCE_IRQ,
68 static struct mv643xx_eth_platform_data eth1_pd;
70 static struct platform_device eth1_device = {
71 .name = MV643XX_ETH_NAME,
73 .num_resources = ARRAY_SIZE(mv643xx_eth1_resources),
74 .resource = mv643xx_eth1_resources,
76 .platform_data = ð1_pd,
80 static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
81 &mv643xx_eth_shared_device,
88 mv643xx_eth_add_pds(void)
91 static struct pci_device_id pci_marvell_mv64360[] = {
92 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) },
96 if (pci_dev_present(pci_marvell_mv64360)) {
97 ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs));
101 device_initcall(mv643xx_eth_add_pds);