Skip to content
Snippets Groups Projects
Commit 9964a4dd authored by Haiying Wang's avatar Haiying Wang Committed by Jon Loeliger
Browse files

Set Rev 2.x 86xx PIC in mixed mode.


Prevent false interrupt from hanging Linux as MSR[EE] is set
to enable interrupts by changing the PIC out of the default
pass through mode into mixed mode.

Signed-off-by: default avatarHaiying Wang <haiying.wang@freescale.com>
Signed-off-by: default avatarJon Loeliger <jdl@freescale.com>
parent 5a58a73c
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,26 @@ int interrupt_init(void) ...@@ -80,6 +80,26 @@ int interrupt_init(void)
{ {
int ret; int ret;
/*
* The IRQ0 on Rev 2 is pulled high (low in Rev 1.x) to
* implement PEX10 errata. As INT is active high, it
* will cause core to take 0x500 interrupt.
*
* Due to the PIC's default pass through mode, as soon
* as interrupts are enabled (MSR[EE] = 1), an interrupt
* will be taken and u-boot will hang. This is due to a
* hardware change (per an errata fix) on new revisions
* of the board with Rev 2.x parts.
*
* Setting the PIC to mixed mode prevents the hang.
*/
if ((get_svr() & 0xf0) == 0x20) {
volatile immap_t *immr = (immap_t *)CFG_IMMR;
immr->im_pic.gcr = MPC86xx_PICGCR_RST;
while (immr->im_pic.gcr & MPC86xx_PICGCR_RST);
immr->im_pic.gcr = MPC86xx_PICGCR_MODE;
}
/* call cpu specific function from $(CPU)/interrupts.c */ /* call cpu specific function from $(CPU)/interrupts.c */
ret = interrupt_init_cpu(&decrementer_count); ret = interrupt_init_cpu(&decrementer_count);
......
...@@ -721,6 +721,8 @@ typedef struct ccsr_pic { ...@@ -721,6 +721,8 @@ typedef struct ccsr_pic {
uint frr; /* 0x41000 - Feature Reporting Register */ uint frr; /* 0x41000 - Feature Reporting Register */
char res10[28]; char res10[28];
uint gcr; /* 0x41020 - Global Configuration Register */ uint gcr; /* 0x41020 - Global Configuration Register */
#define MPC86xx_PICGCR_RST 0x80000000
#define MPC86xx_PICGCR_MODE 0x20000000
char res11[92]; char res11[92];
uint vir; /* 0x41080 - Vendor Identification Register */ uint vir; /* 0x41080 - Vendor Identification Register */
char res12[12]; char res12[12];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment