提交 05f6f664 编写于 作者: T Timur Tabi 提交者: Kumar Gala

85xx: Improve MPIC initialization

The MPIC initialization code for Freescale e500 CPUs was not using I/O
accessors, and it was not issuing a read-back to the MPIC after setting
mixed mode.  This may be the cause of a spurious interrupt on some systems.
Signed-off-by: NTimur Tabi <timur@freescale.com>
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 c17b79fb
......@@ -31,15 +31,17 @@
#include <watchdog.h>
#include <command.h>
#include <asm/processor.h>
#include <asm/io.h>
int interrupt_init_cpu(unsigned long *decrementer_count)
int interrupt_init_cpu(unsigned int *decrementer_count)
{
volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC85xx_PIC_ADDR);
ccsr_pic_t __iomem *pic = (void *)CONFIG_SYS_MPC85xx_PIC_ADDR;
pic->gcr = MPC85xx_PICGCR_RST;
while (pic->gcr & MPC85xx_PICGCR_RST)
out_be32(&pic->gcr, MPC85xx_PICGCR_RST);
while (in_be32(&pic->gcr) & MPC85xx_PICGCR_RST)
;
pic->gcr = MPC85xx_PICGCR_M;
out_be32(&pic->gcr, MPC85xx_PICGCR_M);
in_be32(&pic->gcr);
*decrementer_count = get_tbclk() / CONFIG_SYS_HZ;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册