diff options
| author | Kumar Gala <galak@freescale.com> | 2005-05-28 18:52:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-28 19:46:15 -0400 |
| commit | 252fcaed48fc5473b3fc3cafbf977244b0cbf670 (patch) | |
| tree | 96b8ceffe0e227343eb40aa594695aeb2ce3abf4 | |
| parent | 94b9f46d61904422c498bf4cf9a90cc14398d311 (diff) | |
[PATCH] ppc32: Fix some minor issues related to FSL Book-E KGDB support
Some debug registers needed to be initialized early on to allow proper
support for KGDB. Additionally, we need to setup the
ppc.md_early_serial_map function pointer on boards that have serial support
for KGDB.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/ppc/kernel/head_fsl_booke.S | 15 | ||||
| -rw-r--r-- | arch/ppc/platforms/85xx/mpc8540_ads.c | 3 | ||||
| -rw-r--r-- | arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 3 | ||||
| -rw-r--r-- | arch/ppc/platforms/85xx/sbc8560.c | 3 |
4 files changed, 23 insertions, 1 deletions
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index f22ddce36135..ce36e88ba627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
| @@ -232,7 +232,8 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
| 232 | tlbwe | 232 | tlbwe |
| 233 | 233 | ||
| 234 | /* 7. Jump to KERNELBASE mapping */ | 234 | /* 7. Jump to KERNELBASE mapping */ |
| 235 | li r7,0 | 235 | lis r7,MSR_KERNEL@h |
| 236 | ori r7,r7,MSR_KERNEL@l | ||
| 236 | bl 1f /* Find our address */ | 237 | bl 1f /* Find our address */ |
| 237 | 1: mflr r9 | 238 | 1: mflr r9 |
| 238 | rlwimi r6,r9,0,20,31 | 239 | rlwimi r6,r9,0,20,31 |
| @@ -293,6 +294,18 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
| 293 | mtspr SPRN_HID0, r2 | 294 | mtspr SPRN_HID0, r2 |
| 294 | #endif | 295 | #endif |
| 295 | 296 | ||
| 297 | #if !defined(CONFIG_BDI_SWITCH) | ||
| 298 | /* | ||
| 299 | * The Abatron BDI JTAG debugger does not tolerate others | ||
| 300 | * mucking with the debug registers. | ||
| 301 | */ | ||
| 302 | lis r2,DBCR0_IDM@h | ||
| 303 | mtspr SPRN_DBCR0,r2 | ||
| 304 | /* clear any residual debug events */ | ||
| 305 | li r2,-1 | ||
| 306 | mtspr SPRN_DBSR,r2 | ||
| 307 | #endif | ||
| 308 | |||
| 296 | /* | 309 | /* |
| 297 | * This is where the main kernel code starts. | 310 | * This is where the main kernel code starts. |
| 298 | */ | 311 | */ |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 4d857d6d633d..583838ab02d8 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
| @@ -210,6 +210,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
| 210 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 210 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
| 211 | ppc_md.progress = gen550_progress; | 211 | ppc_md.progress = gen550_progress; |
| 212 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 212 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
| 213 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
| 214 | ppc_md.early_serial_map = mpc85xx_early_serial_map; | ||
| 215 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
| 213 | 216 | ||
| 214 | if (ppc_md.progress) | 217 | if (ppc_md.progress) |
| 215 | ppc_md.progress("mpc8540ads_init(): exit", 0); | 218 | ppc_md.progress("mpc8540ads_init(): exit", 0); |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 6c020d67ad70..11fb758d269f 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
| @@ -459,6 +459,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
| 459 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 459 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
| 460 | ppc_md.progress = gen550_progress; | 460 | ppc_md.progress = gen550_progress; |
| 461 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 461 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
| 462 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
| 463 | ppc_md.early_serial_map = mpc85xx_early_serial_map; | ||
| 464 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
| 462 | 465 | ||
| 463 | if (ppc_md.progress) | 466 | if (ppc_md.progress) |
| 464 | ppc_md.progress("mpc85xx_cds_init(): exit", 0); | 467 | ppc_md.progress("mpc85xx_cds_init(): exit", 0); |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 9ab05e590c3e..7b9e1543e175 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
| @@ -221,6 +221,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
| 221 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 221 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
| 222 | ppc_md.progress = gen550_progress; | 222 | ppc_md.progress = gen550_progress; |
| 223 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 223 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
| 224 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
| 225 | ppc_md.early_serial_map = sbc8560_early_serial_map; | ||
| 226 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
| 224 | 227 | ||
| 225 | if (ppc_md.progress) | 228 | if (ppc_md.progress) |
| 226 | ppc_md.progress("sbc8560_init(): exit", 0); | 229 | ppc_md.progress("sbc8560_init(): exit", 0); |
