4 * ADM5120 specific setup
6 * Copyright (C) ADMtek Incorporated.
7 * Copyright (C) 2005 Jeroen Vreeken (pe1rxq@amsat.org)
8 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
9 * Copyright (C) 2007 OpenWrt.org
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the
23 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
28 #include <linux/init.h>
29 #include <linux/kernel.h>
31 #include <asm/reboot.h>
35 #include <asm/mach-adm5120/adm5120_info.h>
36 #include <asm/mach-adm5120/adm5120_defs.h>
37 #include <asm/mach-adm5120/adm5120_switch.h>
38 #include <asm/mach-adm5120/adm5120_board.h>
40 static char *prom_names[ADM5120_PROM_LAST+1] __initdata = {
41 [ADM5120_PROM_GENERIC] = "Generic",
42 [ADM5120_PROM_CFE] = "CFE",
43 [ADM5120_PROM_UBOOT] = "U-Boot",
44 [ADM5120_PROM_MYLOADER] = "MyLoader",
45 [ADM5120_PROM_ROUTERBOOT] = "RouterBOOT",
46 [ADM5120_PROM_BOOTBASE] = "Bootbase"
49 static void __init adm5120_report(void)
51 printk(KERN_INFO "SoC : ADM%04X%s revision %d, running at %ldMHz\n",
53 (adm5120_package == ADM5120_PACKAGE_BGA) ? "" : "P",
54 adm5120_revision, (adm5120_speed / 1000000)
56 printk(KERN_INFO "Bootdev : %s flash\n", adm5120_nand_boot ? "NAND":"NOR");
57 printk(KERN_INFO "Prom : %s\n", prom_names[adm5120_prom_type]);
60 void __init plat_mem_setup(void)
66 board_time_init = adm5120_time_init;
68 _machine_restart = adm5120_restart;
69 _machine_halt = adm5120_halt;
70 pm_power_off = adm5120_power_off;
72 set_io_port_base(KSEG1);