diff options
Diffstat (limited to 'arch/mips/alchemy/devboards/pb1500/platform.c')
-rw-r--r-- | arch/mips/alchemy/devboards/pb1500/platform.c | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/arch/mips/alchemy/devboards/pb1500/platform.c b/arch/mips/alchemy/devboards/pb1500/platform.c deleted file mode 100644 index 1e52a01bac00..000000000000 --- a/arch/mips/alchemy/devboards/pb1500/platform.c +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* | ||
2 | * Pb1500 board platform device registration | ||
3 | * | ||
4 | * Copyright (C) 2009 Manuel Lauss | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/dma-mapping.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <asm/mach-au1x00/au1000.h> | ||
25 | #include <asm/mach-db1x00/bcsr.h> | ||
26 | |||
27 | #include "../platform.h" | ||
28 | |||
29 | static int pb1500_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin) | ||
30 | { | ||
31 | if ((slot < 12) || (slot > 13) || pin == 0) | ||
32 | return -1; | ||
33 | if (slot == 12) | ||
34 | return (pin == 1) ? AU1500_PCI_INTA : 0xff; | ||
35 | if (slot == 13) { | ||
36 | switch (pin) { | ||
37 | case 1: return AU1500_PCI_INTA; | ||
38 | case 2: return AU1500_PCI_INTB; | ||
39 | case 3: return AU1500_PCI_INTC; | ||
40 | case 4: return AU1500_PCI_INTD; | ||
41 | } | ||
42 | } | ||
43 | return -1; | ||
44 | } | ||
45 | |||
46 | static struct resource alchemy_pci_host_res[] = { | ||
47 | [0] = { | ||
48 | .start = AU1500_PCI_PHYS_ADDR, | ||
49 | .end = AU1500_PCI_PHYS_ADDR + 0xfff, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static struct alchemy_pci_platdata pb1500_pci_pd = { | ||
55 | .board_map_irq = pb1500_map_pci_irq, | ||
56 | .pci_cfg_set = PCI_CONFIG_AEN | PCI_CONFIG_R2H | PCI_CONFIG_R1H | | ||
57 | PCI_CONFIG_CH | | ||
58 | #if defined(__MIPSEB__) | ||
59 | PCI_CONFIG_SIC_HWA_DAT | PCI_CONFIG_SM, | ||
60 | #else | ||
61 | 0, | ||
62 | #endif | ||
63 | }; | ||
64 | |||
65 | static struct platform_device pb1500_pci_host = { | ||
66 | .dev.platform_data = &pb1500_pci_pd, | ||
67 | .name = "alchemy-pci", | ||
68 | .id = 0, | ||
69 | .num_resources = ARRAY_SIZE(alchemy_pci_host_res), | ||
70 | .resource = alchemy_pci_host_res, | ||
71 | }; | ||
72 | |||
73 | static int __init pb1500_dev_init(void) | ||
74 | { | ||
75 | int swapped; | ||
76 | |||
77 | /* PCMCIA. single socket, identical to Pb1100 */ | ||
78 | db1x_register_pcmcia_socket( | ||
79 | AU1000_PCMCIA_ATTR_PHYS_ADDR, | ||
80 | AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, | ||
81 | AU1000_PCMCIA_MEM_PHYS_ADDR, | ||
82 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, | ||
83 | AU1000_PCMCIA_IO_PHYS_ADDR, | ||
84 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, | ||
85 | AU1500_GPIO11_INT, AU1500_GPIO9_INT, /* card / insert */ | ||
86 | /*AU1500_GPIO10_INT*/0, 0, 0); /* stschg / eject / id */ | ||
87 | |||
88 | swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT; | ||
89 | db1x_register_norflash(64 * 1024 * 1024, 4, swapped); | ||
90 | platform_device_register(&pb1500_pci_host); | ||
91 | |||
92 | return 0; | ||
93 | } | ||
94 | arch_initcall(pb1500_dev_init); | ||