enable start-stop-daemon by default, i want to use this to clean up a few init script...
[openwrt/staging/wigyori.git] / target / linux / adm5120-2.6 / files / arch / mips / adm5120 / setup.c
1 /*
2 * $Id$
3 *
4 * ADM5120 specific setup
5 *
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
10 *
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.
15 *
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.
20 *
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.
25 *
26 */
27
28 #include <linux/init.h>
29 #include <linux/kernel.h>
30
31 #include <asm/reboot.h>
32 #include <asm/io.h>
33 #include <asm/time.h>
34
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>
39
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"
47 };
48
49 static void __init adm5120_report(void)
50 {
51 printk(KERN_INFO "SoC : ADM%04X%s revision %d, running at %ldMHz\n",
52 adm5120_product_code,
53 (adm5120_package == ADM5120_PACKAGE_BGA) ? "" : "P",
54 adm5120_revision, (adm5120_speed / 1000000)
55 );
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]);
58 }
59
60 void __init plat_mem_setup(void)
61 {
62 adm5120_soc_init();
63 adm5120_mem_init();
64 adm5120_report();
65
66 board_time_init = adm5120_time_init;
67
68 _machine_restart = adm5120_restart;
69 _machine_halt = adm5120_halt;
70 pm_power_off = adm5120_power_off;
71
72 set_io_port_base(KSEG1);
73 }