aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/rb532/irq.c2
-rw-r--r--arch/mips/rb532/serial.c6
-rw-r--r--arch/mips/rb532/setup.c4
-rw-r--r--include/asm-mips/mach-rc32434/irq.h20
-rw-r--r--include/asm-mips/mach-rc32434/rb.h2
-rw-r--r--include/asm-mips/mach-rc32434/rc32434.h30
6 files changed, 28 insertions, 36 deletions
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c
index c0d0f950caf2..549b46d2fcee 100644
--- a/arch/mips/rb532/irq.c
+++ b/arch/mips/rb532/irq.c
@@ -45,7 +45,7 @@
45#include <asm/mipsregs.h> 45#include <asm/mipsregs.h>
46#include <asm/system.h> 46#include <asm/system.h>
47 47
48#include <asm/mach-rc32434/rc32434.h> 48#include <asm/mach-rc32434/irq.h>
49 49
50struct intr_group { 50struct intr_group {
51 u32 mask; /* mask of valid bits in pending/mask registers */ 51 u32 mask; /* mask of valid bits in pending/mask registers */
diff --git a/arch/mips/rb532/serial.c b/arch/mips/rb532/serial.c
index 1a05b5ddee09..3e0d7ec3a579 100644
--- a/arch/mips/rb532/serial.c
+++ b/arch/mips/rb532/serial.c
@@ -31,16 +31,16 @@
31#include <linux/serial_8250.h> 31#include <linux/serial_8250.h>
32 32
33#include <asm/serial.h> 33#include <asm/serial.h>
34#include <asm/mach-rc32434/rc32434.h> 34#include <asm/mach-rc32434/rb.h>
35 35
36extern unsigned int idt_cpu_freq; 36extern unsigned int idt_cpu_freq;
37 37
38static struct uart_port rb532_uart = { 38static struct uart_port rb532_uart = {
39 .type = PORT_16550A, 39 .type = PORT_16550A,
40 .line = 0, 40 .line = 0,
41 .irq = RC32434_UART0_IRQ, 41 .irq = UART0_IRQ,
42 .iotype = UPIO_MEM, 42 .iotype = UPIO_MEM,
43 .membase = (char *)KSEG1ADDR(RC32434_UART0_BASE), 43 .membase = (char *)KSEG1ADDR(REGBASE + UART0BASE),
44 .regshift = 2 44 .regshift = 2
45}; 45};
46 46
diff --git a/arch/mips/rb532/setup.c b/arch/mips/rb532/setup.c
index 7aafa95ac20b..50f530f5b602 100644
--- a/arch/mips/rb532/setup.c
+++ b/arch/mips/rb532/setup.c
@@ -9,7 +9,7 @@
9#include <asm/time.h> 9#include <asm/time.h>
10#include <linux/ioport.h> 10#include <linux/ioport.h>
11 11
12#include <asm/mach-rc32434/rc32434.h> 12#include <asm/mach-rc32434/rb.h>
13#include <asm/mach-rc32434/pci.h> 13#include <asm/mach-rc32434/pci.h>
14 14
15struct pci_reg __iomem *pci_reg; 15struct pci_reg __iomem *pci_reg;
@@ -27,7 +27,7 @@ static struct resource pci0_res[] = {
27static void rb_machine_restart(char *command) 27static void rb_machine_restart(char *command)
28{ 28{
29 /* just jump to the reset vector */ 29 /* just jump to the reset vector */
30 writel(0x80000001, (void *)KSEG1ADDR(RC32434_REG_BASE + RC32434_RST)); 30 writel(0x80000001, IDT434_REG_BASE + RST);
31 ((void (*)(void)) KSEG1ADDR(0x1FC00000u))(); 31 ((void (*)(void)) KSEG1ADDR(0x1FC00000u))();
32} 32}
33 33
diff --git a/include/asm-mips/mach-rc32434/irq.h b/include/asm-mips/mach-rc32434/irq.h
index d68318b6b76d..56738d8ec4e2 100644
--- a/include/asm-mips/mach-rc32434/irq.h
+++ b/include/asm-mips/mach-rc32434/irq.h
@@ -4,6 +4,26 @@
4#define NR_IRQS 256 4#define NR_IRQS 256
5 5
6#include <asm/mach-generic/irq.h> 6#include <asm/mach-generic/irq.h>
7#include <asm/mach-rc32434/rb.h>
8
9/* Interrupt Controller */
10#define IC_GROUP0_PEND (REGBASE + 0x38000)
11#define IC_GROUP0_MASK (REGBASE + 0x38008)
12#define IC_GROUP_OFFSET 0x0C
13
14#define NUM_INTR_GROUPS 5
15
16/* 16550 UARTs */
17#define GROUP0_IRQ_BASE 8 /* GRP2 IRQ numbers start here */
18 /* GRP3 IRQ numbers start here */
19#define GROUP1_IRQ_BASE (GROUP0_IRQ_BASE + 32)
20 /* GRP4 IRQ numbers start here */
21#define GROUP2_IRQ_BASE (GROUP1_IRQ_BASE + 32)
22 /* GRP5 IRQ numbers start here */
23#define GROUP3_IRQ_BASE (GROUP2_IRQ_BASE + 32)
24#define GROUP4_IRQ_BASE (GROUP3_IRQ_BASE + 32)
25
26#define UART0_IRQ (GROUP3_IRQ_BASE + 0)
7 27
8#define ETH0_DMA_RX_IRQ (GROUP1_IRQ_BASE + 0) 28#define ETH0_DMA_RX_IRQ (GROUP1_IRQ_BASE + 0)
9#define ETH0_DMA_TX_IRQ (GROUP1_IRQ_BASE + 1) 29#define ETH0_DMA_TX_IRQ (GROUP1_IRQ_BASE + 1)
diff --git a/include/asm-mips/mach-rc32434/rb.h b/include/asm-mips/mach-rc32434/rb.h
index 62ac73c999c4..79e8ef67d0d3 100644
--- a/include/asm-mips/mach-rc32434/rb.h
+++ b/include/asm-mips/mach-rc32434/rb.h
@@ -19,6 +19,8 @@
19 19
20#define REGBASE 0x18000000 20#define REGBASE 0x18000000
21#define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE)) 21#define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE))
22#define UART0BASE 0x58000
23#define RST (1 << 15)
22#define DEV0BASE 0x010000 24#define DEV0BASE 0x010000
23#define DEV0MASK 0x010004 25#define DEV0MASK 0x010004
24#define DEV0C 0x010008 26#define DEV0C 0x010008
diff --git a/include/asm-mips/mach-rc32434/rc32434.h b/include/asm-mips/mach-rc32434/rc32434.h
index c4a02145104e..9df04b72744a 100644
--- a/include/asm-mips/mach-rc32434/rc32434.h
+++ b/include/asm-mips/mach-rc32434/rc32434.h
@@ -8,37 +8,7 @@
8#include <linux/delay.h> 8#include <linux/delay.h>
9#include <linux/io.h> 9#include <linux/io.h>
10 10
11#define RC32434_REG_BASE 0x18000000
12#define RC32434_RST (1 << 15)
13
14#define IDT_CLOCK_MULT 2 11#define IDT_CLOCK_MULT 2
15#define MIPS_CPU_TIMER_IRQ 7
16
17/* Interrupt Controller */
18#define IC_GROUP0_PEND (RC32434_REG_BASE + 0x38000)
19#define IC_GROUP0_MASK (RC32434_REG_BASE + 0x38008)
20#define IC_GROUP_OFFSET 0x0C
21
22#define NUM_INTR_GROUPS 5
23
24/* 16550 UARTs */
25#define GROUP0_IRQ_BASE 8 /* GRP2 IRQ numbers start here */
26 /* GRP3 IRQ numbers start here */
27#define GROUP1_IRQ_BASE (GROUP0_IRQ_BASE + 32)
28 /* GRP4 IRQ numbers start here */
29#define GROUP2_IRQ_BASE (GROUP1_IRQ_BASE + 32)
30 /* GRP5 IRQ numbers start here */
31#define GROUP3_IRQ_BASE (GROUP2_IRQ_BASE + 32)
32#define GROUP4_IRQ_BASE (GROUP3_IRQ_BASE + 32)
33
34
35#ifdef __MIPSEB__
36#define RC32434_UART0_BASE (RC32434_REG_BASE + 0x58003)
37#else
38#define RC32434_UART0_BASE (RC32434_REG_BASE + 0x58000)
39#endif
40
41#define RC32434_UART0_IRQ (GROUP3_IRQ_BASE + 0)
42 12
43/* cpu pipeline flush */ 13/* cpu pipeline flush */
44static inline void rc32434_sync(void) 14static inline void rc32434_sync(void)