diff options
Diffstat (limited to 'arch/mips/alchemy/devboards/pb1550')
-rw-r--r-- | arch/mips/alchemy/devboards/pb1550/Makefile | 8 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1550/board_setup.c | 80 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1550/platform.c | 140 |
3 files changed, 0 insertions, 228 deletions
diff --git a/arch/mips/alchemy/devboards/pb1550/Makefile b/arch/mips/alchemy/devboards/pb1550/Makefile deleted file mode 100644 index 9661b6ec5dd..00000000000 --- a/arch/mips/alchemy/devboards/pb1550/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # | ||
2 | # Copyright 2000, 2008 MontaVista Software Inc. | ||
3 | # Author: MontaVista Software, Inc. <source@mvista.com> | ||
4 | # | ||
5 | # Makefile for the Alchemy Semiconductor Pb1550 board. | ||
6 | # | ||
7 | |||
8 | obj-y := board_setup.o platform.o | ||
diff --git a/arch/mips/alchemy/devboards/pb1550/board_setup.c b/arch/mips/alchemy/devboards/pb1550/board_setup.c deleted file mode 100644 index 0f62d1e3df2..00000000000 --- a/arch/mips/alchemy/devboards/pb1550/board_setup.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * BRIEF MODULE DESCRIPTION | ||
4 | * Alchemy Pb1550 board setup. | ||
5 | * | ||
6 | * Copyright 2000, 2008 MontaVista Software Inc. | ||
7 | * Author: MontaVista Software, Inc. <source@mvista.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
15 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
16 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
17 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
20 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
21 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License along | ||
26 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
28 | */ | ||
29 | |||
30 | #include <linux/init.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | |||
33 | #include <asm/mach-au1x00/au1000.h> | ||
34 | #include <asm/mach-pb1x00/pb1550.h> | ||
35 | #include <asm/mach-db1x00/bcsr.h> | ||
36 | #include <asm/mach-au1x00/gpio.h> | ||
37 | |||
38 | #include <prom.h> | ||
39 | |||
40 | const char *get_system_type(void) | ||
41 | { | ||
42 | return "Alchemy Pb1550"; | ||
43 | } | ||
44 | |||
45 | void __init board_setup(void) | ||
46 | { | ||
47 | u32 pin_func; | ||
48 | |||
49 | bcsr_init(PB1550_BCSR_PHYS_ADDR, | ||
50 | PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS); | ||
51 | |||
52 | alchemy_gpio2_enable(); | ||
53 | |||
54 | /* | ||
55 | * Enable PSC1 SYNC for AC'97. Normaly done in audio driver, | ||
56 | * but it is board specific code, so put it here. | ||
57 | */ | ||
58 | pin_func = au_readl(SYS_PINFUNC); | ||
59 | au_sync(); | ||
60 | pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1; | ||
61 | au_writel(pin_func, SYS_PINFUNC); | ||
62 | |||
63 | bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */ | ||
64 | |||
65 | printk(KERN_INFO "AMD Alchemy Pb1550 Board\n"); | ||
66 | } | ||
67 | |||
68 | static int __init pb1550_init_irq(void) | ||
69 | { | ||
70 | irq_set_irq_type(AU1550_GPIO0_INT, IRQF_TRIGGER_LOW); | ||
71 | irq_set_irq_type(AU1550_GPIO1_INT, IRQF_TRIGGER_LOW); | ||
72 | irq_set_irq_type(AU1550_GPIO201_205_INT, IRQF_TRIGGER_HIGH); | ||
73 | |||
74 | /* enable both PCMCIA card irqs in the shared line */ | ||
75 | alchemy_gpio2_enable_int(201); | ||
76 | alchemy_gpio2_enable_int(202); | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | arch_initcall(pb1550_init_irq); | ||
diff --git a/arch/mips/alchemy/devboards/pb1550/platform.c b/arch/mips/alchemy/devboards/pb1550/platform.c deleted file mode 100644 index a4604b8a349..00000000000 --- a/arch/mips/alchemy/devboards/pb1550/platform.c +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* | ||
2 | * Pb1550 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-au1x00/au1xxx_dbdma.h> | ||
26 | #include <asm/mach-pb1x00/pb1550.h> | ||
27 | #include <asm/mach-db1x00/bcsr.h> | ||
28 | |||
29 | #include "../platform.h" | ||
30 | |||
31 | static int pb1550_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin) | ||
32 | { | ||
33 | if ((slot < 12) || (slot > 13) || pin == 0) | ||
34 | return -1; | ||
35 | if (slot == 12) { | ||
36 | switch (pin) { | ||
37 | case 1: return AU1500_PCI_INTB; | ||
38 | case 2: return AU1500_PCI_INTC; | ||
39 | case 3: return AU1500_PCI_INTD; | ||
40 | case 4: return AU1500_PCI_INTA; | ||
41 | } | ||
42 | } | ||
43 | if (slot == 13) { | ||
44 | switch (pin) { | ||
45 | case 1: return AU1500_PCI_INTA; | ||
46 | case 2: return AU1500_PCI_INTB; | ||
47 | case 3: return AU1500_PCI_INTC; | ||
48 | case 4: return AU1500_PCI_INTD; | ||
49 | } | ||
50 | } | ||
51 | return -1; | ||
52 | } | ||
53 | |||
54 | static struct resource alchemy_pci_host_res[] = { | ||
55 | [0] = { | ||
56 | .start = AU1500_PCI_PHYS_ADDR, | ||
57 | .end = AU1500_PCI_PHYS_ADDR + 0xfff, | ||
58 | .flags = IORESOURCE_MEM, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static struct alchemy_pci_platdata pb1550_pci_pd = { | ||
63 | .board_map_irq = pb1550_map_pci_irq, | ||
64 | }; | ||
65 | |||
66 | static struct platform_device pb1550_pci_host = { | ||
67 | .dev.platform_data = &pb1550_pci_pd, | ||
68 | .name = "alchemy-pci", | ||
69 | .id = 0, | ||
70 | .num_resources = ARRAY_SIZE(alchemy_pci_host_res), | ||
71 | .resource = alchemy_pci_host_res, | ||
72 | }; | ||
73 | |||
74 | static struct resource au1550_psc2_res[] = { | ||
75 | [0] = { | ||
76 | .start = AU1550_PSC2_PHYS_ADDR, | ||
77 | .end = AU1550_PSC2_PHYS_ADDR + 0xfff, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, | ||
80 | [1] = { | ||
81 | .start = AU1550_PSC2_INT, | ||
82 | .end = AU1550_PSC2_INT, | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | [2] = { | ||
86 | .start = AU1550_DSCR_CMD0_PSC2_TX, | ||
87 | .end = AU1550_DSCR_CMD0_PSC2_TX, | ||
88 | .flags = IORESOURCE_DMA, | ||
89 | }, | ||
90 | [3] = { | ||
91 | .start = AU1550_DSCR_CMD0_PSC2_RX, | ||
92 | .end = AU1550_DSCR_CMD0_PSC2_RX, | ||
93 | .flags = IORESOURCE_DMA, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct platform_device pb1550_i2c_dev = { | ||
98 | .name = "au1xpsc_smbus", | ||
99 | .id = 0, /* bus number */ | ||
100 | .num_resources = ARRAY_SIZE(au1550_psc2_res), | ||
101 | .resource = au1550_psc2_res, | ||
102 | }; | ||
103 | |||
104 | static int __init pb1550_dev_init(void) | ||
105 | { | ||
106 | int swapped; | ||
107 | |||
108 | /* Pb1550, like all others, also has statuschange irqs; however they're | ||
109 | * wired up on one of the Au1550's shared GPIO201_205 line, which also | ||
110 | * services the PCMCIA card interrupts. So we ignore statuschange and | ||
111 | * use the GPIO201_205 exclusively for card interrupts, since a) pcmcia | ||
112 | * drivers are used to shared irqs and b) statuschange isn't really use- | ||
113 | * ful anyway. | ||
114 | */ | ||
115 | db1x_register_pcmcia_socket( | ||
116 | AU1000_PCMCIA_ATTR_PHYS_ADDR, | ||
117 | AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, | ||
118 | AU1000_PCMCIA_MEM_PHYS_ADDR, | ||
119 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, | ||
120 | AU1000_PCMCIA_IO_PHYS_ADDR, | ||
121 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, | ||
122 | AU1550_GPIO201_205_INT, AU1550_GPIO0_INT, 0, 0, 0); | ||
123 | |||
124 | db1x_register_pcmcia_socket( | ||
125 | AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x008000000, | ||
126 | AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1, | ||
127 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x008000000, | ||
128 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1, | ||
129 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x008000000, | ||
130 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1, | ||
131 | AU1550_GPIO201_205_INT, AU1550_GPIO1_INT, 0, 0, 1); | ||
132 | |||
133 | swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_PB1550_SWAPBOOT; | ||
134 | db1x_register_norflash(128 * 1024 * 1024, 4, swapped); | ||
135 | platform_device_register(&pb1550_pci_host); | ||
136 | platform_device_register(&pb1550_i2c_dev); | ||
137 | |||
138 | return 0; | ||
139 | } | ||
140 | arch_initcall(pb1550_dev_init); | ||