aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/db1x00/board_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/alchemy/devboards/db1x00/board_setup.c')
-rw-r--r--arch/mips/alchemy/devboards/db1x00/board_setup.c105
1 files changed, 1 insertions, 104 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c
index 7cd36e631f6c..8a222b3eba32 100644
--- a/arch/mips/alchemy/devboards/db1x00/board_setup.c
+++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c
@@ -40,64 +40,10 @@
40 40
41#include <prom.h> 41#include <prom.h>
42 42
43#ifdef CONFIG_MIPS_BOSPORUS
44char irq_tab_alchemy[][5] __initdata = {
45 [11] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, 0xff, 0xff }, /* IDSEL 11 - miniPCI */
46 [12] = { -1, AU1500_PCI_INTA, 0xff, 0xff, 0xff }, /* IDSEL 12 - SN1741 */
47 [13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, AU1500_PCI_INTC, AU1500_PCI_INTD }, /* IDSEL 13 - PCI slot */
48};
49
50/*
51 * Micrel/Kendin 5 port switch attached to MAC0,
52 * MAC0 is associated with PHY address 5 (== WAN port)
53 * MAC1 is not associated with any PHY, since it's connected directly
54 * to the switch.
55 * no interrupts are used
56 */
57static struct au1000_eth_platform_data eth0_pdata = {
58 .phy_static_config = 1,
59 .phy_addr = 5,
60};
61
62static void bosporus_power_off(void)
63{
64 while (1)
65 asm volatile (".set mips3 ; wait ; .set mips0");
66}
67
68const char *get_system_type(void)
69{
70 return "Alchemy Bosporus Gateway Reference";
71}
72#endif
73
74
75#ifdef CONFIG_MIPS_MIRAGE
76static void mirage_power_off(void)
77{
78 alchemy_gpio_direction_output(210, 1);
79}
80
81const char *get_system_type(void)
82{
83 return "Alchemy Mirage";
84}
85#endif
86
87
88#if defined(CONFIG_MIPS_BOSPORUS) || defined(CONFIG_MIPS_MIRAGE)
89static void mips_softreset(void)
90{
91 asm volatile ("jr\t%0" : : "r"(0xbfc00000));
92}
93
94#else
95
96const char *get_system_type(void) 43const char *get_system_type(void)
97{ 44{
98 return "Alchemy Db1x00"; 45 return "Alchemy Db1x00";
99} 46}
100#endif
101 47
102 48
103void __init board_setup(void) 49void __init board_setup(void)
@@ -116,14 +62,6 @@ void __init board_setup(void)
116#ifdef CONFIG_MIPS_DB1100 62#ifdef CONFIG_MIPS_DB1100
117 printk(KERN_INFO "AMD Alchemy Au1100/Db1100 Board\n"); 63 printk(KERN_INFO "AMD Alchemy Au1100/Db1100 Board\n");
118#endif 64#endif
119#ifdef CONFIG_MIPS_BOSPORUS
120 au1xxx_override_eth_cfg(0, &eth0_pdata);
121
122 printk(KERN_INFO "AMD Alchemy Bosporus Board\n");
123#endif
124#ifdef CONFIG_MIPS_MIRAGE
125 printk(KERN_INFO "AMD Alchemy Mirage Board\n");
126#endif
127#ifdef CONFIG_MIPS_DB1550 65#ifdef CONFIG_MIPS_DB1550
128 printk(KERN_INFO "AMD Alchemy Au1550/Db1550 Board\n"); 66 printk(KERN_INFO "AMD Alchemy Au1550/Db1550 Board\n");
129 67
@@ -150,52 +88,11 @@ void __init board_setup(void)
150 88
151 /* Enable GPIO[31:0] inputs */ 89 /* Enable GPIO[31:0] inputs */
152 alchemy_gpio1_input_enable(); 90 alchemy_gpio1_input_enable();
153
154#ifdef CONFIG_MIPS_MIRAGE
155 {
156 u32 pin_func;
157
158 /* GPIO[20] is output */
159 alchemy_gpio_direction_output(20, 0);
160
161 /* Set GPIO[210:208] instead of SSI_0 */
162 pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0;
163
164 /* Set GPIO[215:211] for LEDs */
165 pin_func |= 5 << 2;
166
167 /* Set GPIO[214:213] for more LEDs */
168 pin_func |= 5 << 12;
169
170 /* Set GPIO[207:200] instead of PCMCIA/LCD */
171 pin_func |= SYS_PF_LCD | SYS_PF_PC;
172 au_writel(pin_func, SYS_PINFUNC);
173
174 /*
175 * Enable speaker amplifier. This should
176 * be part of the audio driver.
177 */
178 alchemy_gpio_direction_output(209, 1);
179
180 pm_power_off = mirage_power_off;
181 _machine_halt = mirage_power_off;
182 _machine_restart = (void(*)(char *))mips_softreset;
183 }
184#endif
185
186#ifdef CONFIG_MIPS_BOSPORUS
187 pm_power_off = bosporus_power_off;
188 _machine_halt = bosporus_power_off;
189 _machine_restart = (void(*)(char *))mips_softreset;
190#endif
191 au_sync();
192} 91}
193 92
194static int __init db1x00_init_irq(void) 93static int __init db1x00_init_irq(void)
195{ 94{
196#if defined(CONFIG_MIPS_MIRAGE) 95#if defined(CONFIG_MIPS_DB1550)
197 irq_set_irq_type(AU1500_GPIO7_INT, IRQF_TRIGGER_RISING); /* TS pendown */
198#elif defined(CONFIG_MIPS_DB1550)
199 irq_set_irq_type(AU1550_GPIO0_INT, IRQF_TRIGGER_LOW); /* CD0# */ 96 irq_set_irq_type(AU1550_GPIO0_INT, IRQF_TRIGGER_LOW); /* CD0# */
200 irq_set_irq_type(AU1550_GPIO1_INT, IRQF_TRIGGER_LOW); /* CD1# */ 97 irq_set_irq_type(AU1550_GPIO1_INT, IRQF_TRIGGER_LOW); /* CD1# */
201 irq_set_irq_type(AU1550_GPIO3_INT, IRQF_TRIGGER_LOW); /* CARD0# */ 98 irq_set_irq_type(AU1550_GPIO3_INT, IRQF_TRIGGER_LOW); /* CARD0# */