MIPS: Netlogic: XLP9XX PIC updates

Functions for the XLP9XX interrupt table entry format and other PIC
register changes.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6279/
This commit is contained in:
Jayachandran C
2013-12-21 16:52:22 +05:30
committed by Ralf Baechle
parent 5513c760db
commit d150cef4e8
4 changed files with 65 additions and 26 deletions

View File

@@ -69,6 +69,17 @@ int nlm_irq_to_irt(int irq)
uint64_t pcibase;
int devoff, irt;
/* bypass for 9xx */
if (cpu_is_xlp9xx()) {
switch (irq) {
case PIC_UART_0_IRQ:
return 133;
case PIC_UART_1_IRQ:
return 134;
}
return -1;
}
devoff = 0;
switch (irq) {
case PIC_UART_0_IRQ:
@@ -277,6 +288,10 @@ static unsigned int nlm_2xx_get_pic_frequency(int node)
unsigned int nlm_get_pic_frequency(int node)
{
/* TODO Has to calculate freq as like 2xx */
if (cpu_is_xlp9xx())
return 250000000;
if (cpu_is_xlpii())
return nlm_2xx_get_pic_frequency(node);
else

View File

@@ -47,8 +47,8 @@
#include <asm/netlogic/mips-extns.h>
#include <asm/netlogic/xlp-hal/iomap.h>
#include <asm/netlogic/xlp-hal/pic.h>
#include <asm/netlogic/xlp-hal/xlp.h>
#include <asm/netlogic/xlp-hal/pic.h>
#include <asm/netlogic/xlp-hal/sys.h>
static int xlp_wakeup_core(uint64_t sysbase, int node, int core)