3 * BRIEF MODULE DESCRIPTION
4 * Alchemy Db1x00 board setup.
6 * Copyright 2000, 2008 MontaVista Software Inc.
7 * Author: MontaVista Software, Inc. <source@mvista.com>
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.
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.
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.
30 #include <linux/init.h>
32 #include <asm/mach-au1x00/au1000.h>
33 #include <asm/mach-db1x00/db1x00.h>
35 static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
37 void board_reset(void)
39 /* Hit BCSR.SW_RESET[RESET] */
40 bcsr->swreset = 0x0000;
43 void __init board_setup(void)
47 /* Not valid for Au1550 */
48 #if defined(CONFIG_IRDA) && \
49 (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100))
50 /* Set IRFIRSEL instead of GPIO15 */
51 pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF;
52 au_writel(pin_func, SYS_PINFUNC);
53 /* Power off until the driver is in use */
54 bcsr->resets &= ~BCSR_RESETS_IRDA_MODE_MASK;
55 bcsr->resets |= BCSR_RESETS_IRDA_MODE_OFF;
58 bcsr->pcmcia = 0x0000; /* turn off PCMCIA power */
60 #ifdef CONFIG_MIPS_MIRAGE
61 /* Enable GPIO[31:0] inputs */
62 au_writel(0, SYS_PININPUTEN);
64 /* GPIO[20] is output, tristate the other input primary GPIOs */
65 au_writel(~(1 << 20), SYS_TRIOUTCLR);
67 /* Set GPIO[210:208] instead of SSI_0 */
68 pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0;
70 /* Set GPIO[215:211] for LEDs */
73 /* Set GPIO[214:213] for more LEDs */
76 /* Set GPIO[207:200] instead of PCMCIA/LCD */
77 pin_func |= SYS_PF_LCD | SYS_PF_PC;
78 au_writel(pin_func, SYS_PINFUNC);
81 * Enable speaker amplifier. This should
82 * be part of the audio driver.
84 au_writel(au_readl(GPIO2_DIR) | 0x200, GPIO2_DIR);
85 au_writel(0x02000200, GPIO2_OUTPUT);
90 #ifdef CONFIG_MIPS_DB1000
91 printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n");
93 #ifdef CONFIG_MIPS_DB1500
94 printk(KERN_INFO "AMD Alchemy Au1500/Db1500 Board\n");
96 #ifdef CONFIG_MIPS_DB1100
97 printk(KERN_INFO "AMD Alchemy Au1100/Db1100 Board\n");
99 #ifdef CONFIG_MIPS_BOSPORUS
100 printk(KERN_INFO "AMD Alchemy Bosporus Board\n");
102 #ifdef CONFIG_MIPS_MIRAGE
103 printk(KERN_INFO "AMD Alchemy Mirage Board\n");
105 #ifdef CONFIG_MIPS_DB1550
106 printk(KERN_INFO "AMD Alchemy Au1550/Db1550 Board\n");