diff options
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/Kconfig | 6 | ||||
-rw-r--r-- | arch/ppc/kernel/setup.c | 17 | ||||
-rw-r--r-- | arch/ppc/xmon/start.c | 28 | ||||
-rw-r--r-- | arch/ppc/xmon/xmon.c | 26 |
4 files changed, 53 insertions, 24 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index a04cdf01596b..8fa10cf661a8 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -1204,7 +1204,7 @@ config PCI_DOMAINS | |||
1204 | default PCI | 1204 | default PCI |
1205 | 1205 | ||
1206 | config MPC83xx_PCI2 | 1206 | config MPC83xx_PCI2 |
1207 | bool " Supprt for 2nd PCI host controller" | 1207 | bool "Support for 2nd PCI host controller" |
1208 | depends on PCI && MPC834x | 1208 | depends on PCI && MPC834x |
1209 | default y if MPC834x_SYS | 1209 | default y if MPC834x_SYS |
1210 | 1210 | ||
@@ -1223,12 +1223,12 @@ config PCI_8260 | |||
1223 | default y | 1223 | default y |
1224 | 1224 | ||
1225 | config 8260_PCI9 | 1225 | config 8260_PCI9 |
1226 | bool " Enable workaround for MPC826x erratum PCI 9" | 1226 | bool "Enable workaround for MPC826x erratum PCI 9" |
1227 | depends on PCI_8260 && !ADS8272 | 1227 | depends on PCI_8260 && !ADS8272 |
1228 | default y | 1228 | default y |
1229 | 1229 | ||
1230 | choice | 1230 | choice |
1231 | prompt " IDMA channel for PCI 9 workaround" | 1231 | prompt "IDMA channel for PCI 9 workaround" |
1232 | depends on 8260_PCI9 | 1232 | depends on 8260_PCI9 |
1233 | 1233 | ||
1234 | config 8260_PCI9_IDMA1 | 1234 | config 8260_PCI9_IDMA1 |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index a74f46d9826f..5458ac5da7c3 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -127,11 +127,8 @@ void machine_restart(char *cmd) | |||
127 | ppc_md.restart(cmd); | 127 | ppc_md.restart(cmd); |
128 | } | 128 | } |
129 | 129 | ||
130 | void machine_power_off(void) | 130 | static void ppc_generic_power_off(void) |
131 | { | 131 | { |
132 | #ifdef CONFIG_NVRAM | ||
133 | nvram_sync(); | ||
134 | #endif | ||
135 | ppc_md.power_off(); | 132 | ppc_md.power_off(); |
136 | } | 133 | } |
137 | 134 | ||
@@ -143,7 +140,17 @@ void machine_halt(void) | |||
143 | ppc_md.halt(); | 140 | ppc_md.halt(); |
144 | } | 141 | } |
145 | 142 | ||
146 | void (*pm_power_off)(void) = machine_power_off; | 143 | void (*pm_power_off)(void) = ppc_generic_power_off; |
144 | |||
145 | void machine_power_off(void) | ||
146 | { | ||
147 | #ifdef CONFIG_NVRAM | ||
148 | nvram_sync(); | ||
149 | #endif | ||
150 | if (pm_power_off) | ||
151 | pm_power_off(); | ||
152 | ppc_generic_power_off(); | ||
153 | } | ||
147 | 154 | ||
148 | #ifdef CONFIG_TAU | 155 | #ifdef CONFIG_TAU |
149 | extern u32 cpu_temp(unsigned long cpu); | 156 | extern u32 cpu_temp(unsigned long cpu); |
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c index f7e92986952a..d74a883e5bde 100644 --- a/arch/ppc/xmon/start.c +++ b/arch/ppc/xmon/start.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
16 | #include <asm/delay.h> | 16 | #include <asm/delay.h> |
17 | #include <asm/btext.h> | 17 | #include <asm/btext.h> |
18 | #include <asm/ibm4xx.h> | ||
18 | 19 | ||
19 | static volatile unsigned char *sccc, *sccd; | 20 | static volatile unsigned char *sccc, *sccd; |
20 | unsigned int TXRDY, RXRDY, DLAB; | 21 | unsigned int TXRDY, RXRDY, DLAB; |
@@ -57,23 +58,30 @@ static struct sysrq_key_op sysrq_xmon_op = | |||
57 | void | 58 | void |
58 | xmon_map_scc(void) | 59 | xmon_map_scc(void) |
59 | { | 60 | { |
60 | #ifdef CONFIG_PPC_PREP | 61 | #if defined(CONFIG_GEMINI) |
61 | volatile unsigned char *base; | ||
62 | |||
63 | #elif defined(CONFIG_GEMINI) | ||
64 | /* should already be mapped by the kernel boot */ | 62 | /* should already be mapped by the kernel boot */ |
65 | sccc = (volatile unsigned char *) 0xffeffb0d; | ||
66 | sccd = (volatile unsigned char *) 0xffeffb08; | 63 | sccd = (volatile unsigned char *) 0xffeffb08; |
67 | TXRDY = 0x20; | ||
68 | RXRDY = 1; | ||
69 | DLAB = 0x80; | ||
70 | #elif defined(CONFIG_405GP) | 64 | #elif defined(CONFIG_405GP) |
71 | sccc = (volatile unsigned char *)0xef600305; | ||
72 | sccd = (volatile unsigned char *)0xef600300; | 65 | sccd = (volatile unsigned char *)0xef600300; |
66 | #elif defined(CONFIG_440EP) | ||
67 | sccd = (volatile unsigned char *) ioremap(PPC440EP_UART0_ADDR, 8); | ||
68 | #elif defined(CONFIG_440SP) | ||
69 | sccd = (volatile unsigned char *) ioremap64(PPC440SP_UART0_ADDR, 8); | ||
70 | #elif defined(CONFIG_440SPE) | ||
71 | sccd = (volatile unsigned char *) ioremap64(PPC440SPE_UART0_ADDR, 8); | ||
72 | #elif defined(CONFIG_44x) | ||
73 | /* This is the default for 44x platforms. Any boards that have a | ||
74 | different UART address need to be put in cases before this or the | ||
75 | port will be mapped incorrectly */ | ||
76 | sccd = (volatile unsigned char *) ioremap64(PPC440GP_UART0_ADDR, 8); | ||
77 | #endif /* platform */ | ||
78 | |||
79 | #ifndef CONFIG_PPC_PREP | ||
80 | sccc = sccd + 5; | ||
73 | TXRDY = 0x20; | 81 | TXRDY = 0x20; |
74 | RXRDY = 1; | 82 | RXRDY = 1; |
75 | DLAB = 0x80; | 83 | DLAB = 0x80; |
76 | #endif /* platform */ | 84 | #endif |
77 | 85 | ||
78 | register_sysrq_key('x', &sysrq_xmon_op); | 86 | register_sysrq_key('x', &sysrq_xmon_op); |
79 | } | 87 | } |
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c index 37d234f93394..25d032b2aec7 100644 --- a/arch/ppc/xmon/xmon.c +++ b/arch/ppc/xmon/xmon.c | |||
@@ -153,6 +153,12 @@ static int xmon_trace[NR_CPUS]; | |||
153 | #define SSTEP 1 /* stepping because of 's' command */ | 153 | #define SSTEP 1 /* stepping because of 's' command */ |
154 | #define BRSTEP 2 /* stepping over breakpoint */ | 154 | #define BRSTEP 2 /* stepping over breakpoint */ |
155 | 155 | ||
156 | #ifdef CONFIG_4xx | ||
157 | #define MSR_SSTEP_ENABLE 0x200 | ||
158 | #else | ||
159 | #define MSR_SSTEP_ENABLE 0x400 | ||
160 | #endif | ||
161 | |||
156 | static struct pt_regs *xmon_regs[NR_CPUS]; | 162 | static struct pt_regs *xmon_regs[NR_CPUS]; |
157 | 163 | ||
158 | extern inline void sync(void) | 164 | extern inline void sync(void) |
@@ -211,6 +217,14 @@ static void get_tb(unsigned *p) | |||
211 | p[1] = lo; | 217 | p[1] = lo; |
212 | } | 218 | } |
213 | 219 | ||
220 | static inline void xmon_enable_sstep(struct pt_regs *regs) | ||
221 | { | ||
222 | regs->msr |= MSR_SSTEP_ENABLE; | ||
223 | #ifdef CONFIG_4xx | ||
224 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); | ||
225 | #endif | ||
226 | } | ||
227 | |||
214 | int xmon(struct pt_regs *excp) | 228 | int xmon(struct pt_regs *excp) |
215 | { | 229 | { |
216 | struct pt_regs regs; | 230 | struct pt_regs regs; |
@@ -254,10 +268,10 @@ int xmon(struct pt_regs *excp) | |||
254 | cmd = cmds(excp); | 268 | cmd = cmds(excp); |
255 | if (cmd == 's') { | 269 | if (cmd == 's') { |
256 | xmon_trace[smp_processor_id()] = SSTEP; | 270 | xmon_trace[smp_processor_id()] = SSTEP; |
257 | excp->msr |= 0x400; | 271 | xmon_enable_sstep(excp); |
258 | } else if (at_breakpoint(excp->nip)) { | 272 | } else if (at_breakpoint(excp->nip)) { |
259 | xmon_trace[smp_processor_id()] = BRSTEP; | 273 | xmon_trace[smp_processor_id()] = BRSTEP; |
260 | excp->msr |= 0x400; | 274 | xmon_enable_sstep(excp); |
261 | } else { | 275 | } else { |
262 | xmon_trace[smp_processor_id()] = 0; | 276 | xmon_trace[smp_processor_id()] = 0; |
263 | insert_bpts(); | 277 | insert_bpts(); |
@@ -298,7 +312,7 @@ xmon_bpt(struct pt_regs *regs) | |||
298 | remove_bpts(); | 312 | remove_bpts(); |
299 | excprint(regs); | 313 | excprint(regs); |
300 | xmon_trace[smp_processor_id()] = BRSTEP; | 314 | xmon_trace[smp_processor_id()] = BRSTEP; |
301 | regs->msr |= 0x400; | 315 | xmon_enable_sstep(regs); |
302 | } else { | 316 | } else { |
303 | xmon(regs); | 317 | xmon(regs); |
304 | } | 318 | } |
@@ -385,7 +399,7 @@ insert_bpts(void) | |||
385 | } | 399 | } |
386 | store_inst((void *) bp->address); | 400 | store_inst((void *) bp->address); |
387 | } | 401 | } |
388 | #if !defined(CONFIG_8xx) | 402 | #if ! (defined(CONFIG_8xx) || defined(CONFIG_4xx)) |
389 | if (dabr.enabled) | 403 | if (dabr.enabled) |
390 | set_dabr(dabr.address); | 404 | set_dabr(dabr.address); |
391 | if (iabr.enabled) | 405 | if (iabr.enabled) |
@@ -400,7 +414,7 @@ remove_bpts(void) | |||
400 | struct bpt *bp; | 414 | struct bpt *bp; |
401 | unsigned instr; | 415 | unsigned instr; |
402 | 416 | ||
403 | #if !defined(CONFIG_8xx) | 417 | #if ! (defined(CONFIG_8xx) || defined(CONFIG_4xx)) |
404 | set_dabr(0); | 418 | set_dabr(0); |
405 | set_iabr(0); | 419 | set_iabr(0); |
406 | #endif | 420 | #endif |
@@ -677,7 +691,7 @@ bpt_cmds(void) | |||
677 | 691 | ||
678 | cmd = inchar(); | 692 | cmd = inchar(); |
679 | switch (cmd) { | 693 | switch (cmd) { |
680 | #if !defined(CONFIG_8xx) | 694 | #if ! (defined(CONFIG_8xx) || defined(CONFIG_4xx)) |
681 | case 'd': | 695 | case 'd': |
682 | mode = 7; | 696 | mode = 7; |
683 | cmd = inchar(); | 697 | cmd = inchar(); |