7e8413f637994205370c6307f75f0c17f4d0519d
1 /**************************************************************************
3 * BRIEF MODULE DESCRIPTION
4 * setup routines for IDT EB434 boards
6 * Copyright 2004 IDT Inc. (rischelp@idt.com)
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 **************************************************************************
36 **************************************************************************
39 #include <linux/init.h>
40 #include <linux/module.h>
42 #include <linux/sched.h>
43 #include <linux/irq.h>
44 #include <asm/bootinfo.h>
46 #include <linux/ioport.h>
47 #include <asm/mipsregs.h>
48 #include <asm/pgtable.h>
49 #include <asm/reboot.h>
50 #include <asm/addrspace.h> /* for KSEG1ADDR() */
51 #include <asm/idt-boards/rc32434/rc32434.h>
54 extern char *__init
prom_getcmdline(void);
56 extern void (*board_time_init
) (void);
57 extern void aruba_time_init(void);
58 extern void aruba_reset(void);
60 #define epldMask ((volatile unsigned char *)0xB900000d)
62 static void aruba_machine_restart(char *command
)
64 switch (mips_machtype
) {
66 *(volatile u32
*)KSEG1ADDR(0x18008000) = 0x80000001;
72 *((volatile u32
*)KSEG1ADDR(0x1c003020)) = 0x00080350; // reset everything in sight
74 *((volatile u32
*)KSEG1ADDR(0x1c003020)) = 0; // reset everything in sight
76 *((volatile u32
*)KSEG1ADDR(0x1c003020)) = 0x3; // cold reset the cpu & system
81 static void aruba_machine_halt(void)
86 extern char * getenv(char *e
);
87 extern void unlock_ap60_70_flash(void);
89 void __init
plat_mem_setup(void)
91 board_time_init
= aruba_time_init
;
93 _machine_restart
= aruba_machine_restart
;
94 _machine_halt
= aruba_machine_halt
;
95 pm_power_off
= aruba_machine_halt
;
97 set_io_port_base(KSEG1
);
99 /* Enable PCI interrupts in EPLD Mask register */
101 *(epldMask
+ 1) = 0x0;
104 unlock_ap60_70_flash();
106 printk("BOARD - %s\n",getenv("boardname"));
109 int page_is_ram(unsigned long pagenr
)
114 const char *get_system_type(void)
116 switch (mips_machtype
) {
117 case MACH_ARUBA_AP70
:
119 case MACH_ARUBA_AP65
:
121 case MACH_ARUBA_AP60
:
122 return "Aruba AP60/AP61";
124 return "Aruba UNKNOWN";
128 EXPORT_SYMBOL(get_system_type
);
This page took 0.045905 seconds and 3 git commands to generate.