diff options
Diffstat (limited to 'arch/mips/powertv')
-rw-r--r-- | arch/mips/powertv/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/powertv/cmdline.c | 52 | ||||
-rw-r--r-- | arch/mips/powertv/init.c | 15 | ||||
-rw-r--r-- | arch/mips/powertv/init.h | 2 | ||||
-rw-r--r-- | arch/mips/powertv/memory.c | 5 | ||||
-rw-r--r-- | arch/mips/powertv/powertv_setup.c | 21 | ||||
-rw-r--r-- | arch/mips/powertv/reset.c | 18 | ||||
-rw-r--r-- | arch/mips/powertv/time.c | 1 |
8 files changed, 9 insertions, 107 deletions
diff --git a/arch/mips/powertv/Makefile b/arch/mips/powertv/Makefile index 2c516718affe..0a0d73c0564f 100644 --- a/arch/mips/powertv/Makefile +++ b/arch/mips/powertv/Makefile | |||
@@ -23,6 +23,6 @@ | |||
23 | # under Linux. | 23 | # under Linux. |
24 | # | 24 | # |
25 | 25 | ||
26 | obj-y += cmdline.o init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ | 26 | obj-y += init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ |
27 | 27 | ||
28 | EXTRA_CFLAGS += -Wall -Werror | 28 | EXTRA_CFLAGS += -Wall -Werror |
diff --git a/arch/mips/powertv/cmdline.c b/arch/mips/powertv/cmdline.c deleted file mode 100644 index 98d73cb0d452..000000000000 --- a/arch/mips/powertv/cmdline.c +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * Carsten Langgaard, carstenl@mips.com | ||
3 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | ||
4 | * Portions copyright (C) 2009 Cisco Systems, Inc. | ||
5 | * | ||
6 | * This program is free software; you can distribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License (Version 2) as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | * for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
18 | * | ||
19 | * Kernel command line creation using the prom monitor (YAMON) argc/argv. | ||
20 | */ | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/string.h> | ||
23 | |||
24 | #include <asm/bootinfo.h> | ||
25 | |||
26 | #include "init.h" | ||
27 | |||
28 | /* | ||
29 | * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer. | ||
30 | * This macro take care of sign extension. | ||
31 | */ | ||
32 | #define prom_argv(index) ((char *)(long)_prom_argv[(index)]) | ||
33 | |||
34 | char * __init prom_getcmdline(void) | ||
35 | { | ||
36 | return &(arcs_cmdline[0]); | ||
37 | } | ||
38 | |||
39 | void __init prom_init_cmdline(void) | ||
40 | { | ||
41 | int len; | ||
42 | |||
43 | if (prom_argc != 1) | ||
44 | return; | ||
45 | |||
46 | len = strlen(arcs_cmdline); | ||
47 | |||
48 | arcs_cmdline[len] = ' '; | ||
49 | |||
50 | strlcpy(arcs_cmdline + len + 1, (char *)_prom_argv, | ||
51 | COMMAND_LINE_SIZE - len - 1); | ||
52 | } | ||
diff --git a/arch/mips/powertv/init.c b/arch/mips/powertv/init.c index 5f4e4c304e48..0afe227f1d0a 100644 --- a/arch/mips/powertv/init.c +++ b/arch/mips/powertv/init.c | |||
@@ -34,10 +34,7 @@ | |||
34 | #include <asm/mips-boards/generic.h> | 34 | #include <asm/mips-boards/generic.h> |
35 | #include <asm/mach-powertv/asic.h> | 35 | #include <asm/mach-powertv/asic.h> |
36 | 36 | ||
37 | #include "init.h" | 37 | static int *_prom_envp; |
38 | |||
39 | int prom_argc; | ||
40 | int *_prom_argv, *_prom_envp; | ||
41 | unsigned long _prom_memsize; | 38 | unsigned long _prom_memsize; |
42 | 39 | ||
43 | /* | 40 | /* |
@@ -109,16 +106,20 @@ static void __init mips_ejtag_setup(void) | |||
109 | 106 | ||
110 | void __init prom_init(void) | 107 | void __init prom_init(void) |
111 | { | 108 | { |
109 | int prom_argc; | ||
110 | char *prom_argv; | ||
111 | |||
112 | prom_argc = fw_arg0; | 112 | prom_argc = fw_arg0; |
113 | _prom_argv = (int *) fw_arg1; | 113 | prom_argv = (char *) fw_arg1; |
114 | _prom_envp = (int *) fw_arg2; | 114 | _prom_envp = (int *) fw_arg2; |
115 | _prom_memsize = (unsigned long) fw_arg3; | 115 | _prom_memsize = (unsigned long) fw_arg3; |
116 | 116 | ||
117 | board_nmi_handler_setup = mips_nmi_setup; | 117 | board_nmi_handler_setup = mips_nmi_setup; |
118 | board_ejtag_handler_setup = mips_ejtag_setup; | 118 | board_ejtag_handler_setup = mips_ejtag_setup; |
119 | 119 | ||
120 | pr_info("\nLINUX started...\n"); | 120 | if (prom_argc == 1) |
121 | prom_init_cmdline(); | 121 | strlcat(arcs_cmdline, prom_argv, COMMAND_LINE_SIZE); |
122 | |||
122 | configure_platform(); | 123 | configure_platform(); |
123 | prom_meminit(); | 124 | prom_meminit(); |
124 | 125 | ||
diff --git a/arch/mips/powertv/init.h b/arch/mips/powertv/init.h index 7af6bf25008c..b194c34ca966 100644 --- a/arch/mips/powertv/init.h +++ b/arch/mips/powertv/init.h | |||
@@ -22,7 +22,5 @@ | |||
22 | 22 | ||
23 | #ifndef _POWERTV_INIT_H | 23 | #ifndef _POWERTV_INIT_H |
24 | #define _POWERTV_INIT_H | 24 | #define _POWERTV_INIT_H |
25 | extern int prom_argc; | ||
26 | extern int *_prom_argv; | ||
27 | extern unsigned long _prom_memsize; | 25 | extern unsigned long _prom_memsize; |
28 | #endif | 26 | #endif |
diff --git a/arch/mips/powertv/memory.c b/arch/mips/powertv/memory.c index 28d06605fff6..f49eb3d0358b 100644 --- a/arch/mips/powertv/memory.c +++ b/arch/mips/powertv/memory.c | |||
@@ -42,8 +42,6 @@ | |||
42 | #define BOOT_MEM_SIZE KIBIBYTE(256) /* Memory reserved for bldr */ | 42 | #define BOOT_MEM_SIZE KIBIBYTE(256) /* Memory reserved for bldr */ |
43 | #define PHYS_MEM_START 0x10000000 /* Start of physical memory */ | 43 | #define PHYS_MEM_START 0x10000000 /* Start of physical memory */ |
44 | 44 | ||
45 | unsigned long ptv_memsize; | ||
46 | |||
47 | char __initdata cmdline[COMMAND_LINE_SIZE]; | 45 | char __initdata cmdline[COMMAND_LINE_SIZE]; |
48 | 46 | ||
49 | void __init prom_meminit(void) | 47 | void __init prom_meminit(void) |
@@ -87,9 +85,6 @@ void __init prom_meminit(void) | |||
87 | } | 85 | } |
88 | } | 86 | } |
89 | 87 | ||
90 | /* Store memsize for diagnostic purposes */ | ||
91 | ptv_memsize = memsize; | ||
92 | |||
93 | physend = PFN_ALIGN(&_end) - 0x80000000; | 88 | physend = PFN_ALIGN(&_end) - 0x80000000; |
94 | if (memsize > LOW_MEM_MAX) { | 89 | if (memsize > LOW_MEM_MAX) { |
95 | low_mem = LOW_MEM_MAX; | 90 | low_mem = LOW_MEM_MAX; |
diff --git a/arch/mips/powertv/powertv_setup.c b/arch/mips/powertv/powertv_setup.c index bd8ebf128f29..698b1eafbe98 100644 --- a/arch/mips/powertv/powertv_setup.c +++ b/arch/mips/powertv/powertv_setup.c | |||
@@ -64,9 +64,6 @@ | |||
64 | #define REG_SIZE "4" /* In bytes */ | 64 | #define REG_SIZE "4" /* In bytes */ |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | static struct pt_regs die_regs; | ||
68 | static bool have_die_regs; | ||
69 | |||
70 | static void register_panic_notifier(void); | 67 | static void register_panic_notifier(void); |
71 | static int panic_handler(struct notifier_block *notifier_block, | 68 | static int panic_handler(struct notifier_block *notifier_block, |
72 | unsigned long event, void *cause_string); | 69 | unsigned long event, void *cause_string); |
@@ -218,24 +215,6 @@ static int panic_handler(struct notifier_block *notifier_block, | |||
218 | return NOTIFY_DONE; | 215 | return NOTIFY_DONE; |
219 | } | 216 | } |
220 | 217 | ||
221 | /** | ||
222 | * Platform-specific handling of oops | ||
223 | * @str: Pointer to the oops string | ||
224 | * @regs: Pointer to the oops registers | ||
225 | * All we do here is to save the registers for subsequent printing through | ||
226 | * the panic notifier. | ||
227 | */ | ||
228 | void platform_die(const char *str, const struct pt_regs *regs) | ||
229 | { | ||
230 | /* If we already have saved registers, don't overwrite them as they | ||
231 | * they apply to the initial fault */ | ||
232 | |||
233 | if (!have_die_regs) { | ||
234 | have_die_regs = true; | ||
235 | die_regs = *regs; | ||
236 | } | ||
237 | } | ||
238 | |||
239 | /* Information about the RF MAC address, if one was supplied on the | 218 | /* Information about the RF MAC address, if one was supplied on the |
240 | * command line. */ | 219 | * command line. */ |
241 | static bool have_rfmac; | 220 | static bool have_rfmac; |
diff --git a/arch/mips/powertv/reset.c b/arch/mips/powertv/reset.c index 494c652c984b..0007652cb774 100644 --- a/arch/mips/powertv/reset.c +++ b/arch/mips/powertv/reset.c | |||
@@ -28,9 +28,6 @@ | |||
28 | #include <asm/mach-powertv/asic_regs.h> | 28 | #include <asm/mach-powertv/asic_regs.h> |
29 | #include "reset.h" | 29 | #include "reset.h" |
30 | 30 | ||
31 | static void mips_machine_restart(char *command); | ||
32 | static void mips_machine_halt(void); | ||
33 | |||
34 | static void mips_machine_restart(char *command) | 31 | static void mips_machine_restart(char *command) |
35 | { | 32 | { |
36 | #ifdef CONFIG_BOOTLOADER_DRIVER | 33 | #ifdef CONFIG_BOOTLOADER_DRIVER |
@@ -44,22 +41,7 @@ static void mips_machine_restart(char *command) | |||
44 | #endif | 41 | #endif |
45 | } | 42 | } |
46 | 43 | ||
47 | static void mips_machine_halt(void) | ||
48 | { | ||
49 | #ifdef CONFIG_BOOTLOADER_DRIVER | ||
50 | /* | ||
51 | * Call the bootloader's reset function to ensure | ||
52 | * that persistent data is flushed before hard reset | ||
53 | */ | ||
54 | kbldr_SetCauseAndReset(); | ||
55 | #else | ||
56 | writel(0x1, asic_reg_addr(watchdog)); | ||
57 | #endif | ||
58 | } | ||
59 | |||
60 | void mips_reboot_setup(void) | 44 | void mips_reboot_setup(void) |
61 | { | 45 | { |
62 | _machine_restart = mips_machine_restart; | 46 | _machine_restart = mips_machine_restart; |
63 | _machine_halt = mips_machine_halt; | ||
64 | pm_power_off = mips_machine_halt; | ||
65 | } | 47 | } |
diff --git a/arch/mips/powertv/time.c b/arch/mips/powertv/time.c index 1e0a5ef4c8c7..9fd7b67f2af7 100644 --- a/arch/mips/powertv/time.c +++ b/arch/mips/powertv/time.c | |||
@@ -33,5 +33,4 @@ unsigned int __cpuinit get_c0_compare_int(void) | |||
33 | void __init plat_time_init(void) | 33 | void __init plat_time_init(void) |
34 | { | 34 | { |
35 | powertv_clocksource_init(); | 35 | powertv_clocksource_init(); |
36 | r4k_clockevent_init(); | ||
37 | } | 36 | } |