[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>
This commit is contained in:
committed by
Linus Torvalds
parent
94b9f46d61
commit
252fcaed48
@@ -232,7 +232,8 @@ skpinv: addi r6,r6,1 /* Increment */
|
|||||||
tlbwe
|
tlbwe
|
||||||
|
|
||||||
/* 7. Jump to KERNELBASE mapping */
|
/* 7. Jump to KERNELBASE mapping */
|
||||||
li r7,0
|
lis r7,MSR_KERNEL@h
|
||||||
|
ori r7,r7,MSR_KERNEL@l
|
||||||
bl 1f /* Find our address */
|
bl 1f /* Find our address */
|
||||||
1: mflr r9
|
1: mflr r9
|
||||||
rlwimi r6,r9,0,20,31
|
rlwimi r6,r9,0,20,31
|
||||||
@@ -293,6 +294,18 @@ skpinv: addi r6,r6,1 /* Increment */
|
|||||||
mtspr SPRN_HID0, r2
|
mtspr SPRN_HID0, r2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CONFIG_BDI_SWITCH)
|
||||||
|
/*
|
||||||
|
* The Abatron BDI JTAG debugger does not tolerate others
|
||||||
|
* mucking with the debug registers.
|
||||||
|
*/
|
||||||
|
lis r2,DBCR0_IDM@h
|
||||||
|
mtspr SPRN_DBCR0,r2
|
||||||
|
/* clear any residual debug events */
|
||||||
|
li r2,-1
|
||||||
|
mtspr SPRN_DBSR,r2
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is where the main kernel code starts.
|
* This is where the main kernel code starts.
|
||||||
*/
|
*/
|
||||||
|
@@ -210,6 +210,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
|||||||
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
|
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
|
||||||
ppc_md.progress = gen550_progress;
|
ppc_md.progress = gen550_progress;
|
||||||
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
|
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
|
||||||
|
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
|
||||||
|
ppc_md.early_serial_map = mpc85xx_early_serial_map;
|
||||||
|
#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
|
||||||
|
|
||||||
if (ppc_md.progress)
|
if (ppc_md.progress)
|
||||||
ppc_md.progress("mpc8540ads_init(): exit", 0);
|
ppc_md.progress("mpc8540ads_init(): exit", 0);
|
||||||
|
@@ -459,6 +459,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
|||||||
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
|
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
|
||||||
ppc_md.progress = gen550_progress;
|
ppc_md.progress = gen550_progress;
|
||||||
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
|
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
|
||||||
|
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
|
||||||
|
ppc_md.early_serial_map = mpc85xx_early_serial_map;
|
||||||
|
#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
|
||||||
|
|
||||||
if (ppc_md.progress)
|
if (ppc_md.progress)
|
||||||
ppc_md.progress("mpc85xx_cds_init(): exit", 0);
|
ppc_md.progress("mpc85xx_cds_init(): exit", 0);
|
||||||
|
@@ -221,6 +221,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
|||||||
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
|
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
|
||||||
ppc_md.progress = gen550_progress;
|
ppc_md.progress = gen550_progress;
|
||||||
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
|
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
|
||||||
|
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
|
||||||
|
ppc_md.early_serial_map = sbc8560_early_serial_map;
|
||||||
|
#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
|
||||||
|
|
||||||
if (ppc_md.progress)
|
if (ppc_md.progress)
|
||||||
ppc_md.progress("sbc8560_init(): exit", 0);
|
ppc_md.progress("sbc8560_init(): exit", 0);
|
||||||
|
Reference in New Issue
Block a user