#include <asm/mipsregs.h>
 #include <asm/system.h>
 
-#include <asm/mach-rc32434/rc32434.h>
+#include <asm/mach-rc32434/irq.h>
 
 struct intr_group {
        u32 mask;       /* mask of valid bits in pending/mask registers */
 
 #include <linux/serial_8250.h>
 
 #include <asm/serial.h>
-#include <asm/mach-rc32434/rc32434.h>
+#include <asm/mach-rc32434/rb.h>
 
 extern unsigned int idt_cpu_freq;
 
 static struct uart_port rb532_uart = {
        .type = PORT_16550A,
        .line = 0,
-       .irq = RC32434_UART0_IRQ,
+       .irq = UART0_IRQ,
        .iotype = UPIO_MEM,
-       .membase = (char *)KSEG1ADDR(RC32434_UART0_BASE),
+       .membase = (char *)KSEG1ADDR(REGBASE + UART0BASE),
        .regshift = 2
 };
 
 
 #include <asm/time.h>
 #include <linux/ioport.h>
 
-#include <asm/mach-rc32434/rc32434.h>
+#include <asm/mach-rc32434/rb.h>
 #include <asm/mach-rc32434/pci.h>
 
 struct pci_reg __iomem *pci_reg;
 static void rb_machine_restart(char *command)
 {
        /* just jump to the reset vector */
-       writel(0x80000001, (void *)KSEG1ADDR(RC32434_REG_BASE + RC32434_RST));
+       writel(0x80000001, IDT434_REG_BASE + RST);
        ((void (*)(void)) KSEG1ADDR(0x1FC00000u))();
 }
 
 
 #define NR_IRQS        256
 
 #include <asm/mach-generic/irq.h>
+#include <asm/mach-rc32434/rb.h>
+
+/* Interrupt Controller */
+#define IC_GROUP0_PEND         (REGBASE + 0x38000)
+#define IC_GROUP0_MASK         (REGBASE + 0x38008)
+#define IC_GROUP_OFFSET                0x0C
+
+#define NUM_INTR_GROUPS                5
+
+/* 16550 UARTs */
+#define GROUP0_IRQ_BASE                8       /* GRP2 IRQ numbers start here */
+                                       /* GRP3 IRQ numbers start here */
+#define GROUP1_IRQ_BASE                (GROUP0_IRQ_BASE + 32)
+                                       /* GRP4 IRQ numbers start here */
+#define GROUP2_IRQ_BASE                (GROUP1_IRQ_BASE + 32)
+                                       /* GRP5 IRQ numbers start here */
+#define GROUP3_IRQ_BASE                (GROUP2_IRQ_BASE + 32)
+#define GROUP4_IRQ_BASE                (GROUP3_IRQ_BASE + 32)
+
+#define UART0_IRQ              (GROUP3_IRQ_BASE + 0)
 
 #define ETH0_DMA_RX_IRQ        (GROUP1_IRQ_BASE + 0)
 #define ETH0_DMA_TX_IRQ        (GROUP1_IRQ_BASE + 1)
 
 
 #define REGBASE                0x18000000
 #define IDT434_REG_BASE        ((volatile void *) KSEG1ADDR(REGBASE))
+#define UART0BASE      0x58000
+#define RST            (1 << 15)
 #define DEV0BASE       0x010000
 #define DEV0MASK       0x010004
 #define DEV0C          0x010008
 
 #include <linux/delay.h>
 #include <linux/io.h>
 
-#define RC32434_REG_BASE       0x18000000
-#define RC32434_RST            (1 << 15)
-
 #define IDT_CLOCK_MULT         2
-#define MIPS_CPU_TIMER_IRQ     7
-
-/* Interrupt Controller */
-#define IC_GROUP0_PEND         (RC32434_REG_BASE + 0x38000)
-#define IC_GROUP0_MASK         (RC32434_REG_BASE + 0x38008)
-#define IC_GROUP_OFFSET                0x0C
-
-#define NUM_INTR_GROUPS                5
-
-/* 16550 UARTs */
-#define GROUP0_IRQ_BASE                8       /* GRP2 IRQ numbers start here */
-                                       /* GRP3 IRQ numbers start here */
-#define GROUP1_IRQ_BASE                (GROUP0_IRQ_BASE + 32)
-                                       /* GRP4 IRQ numbers start here */
-#define GROUP2_IRQ_BASE                (GROUP1_IRQ_BASE + 32)
-                                       /* GRP5 IRQ numbers start here */
-#define GROUP3_IRQ_BASE                (GROUP2_IRQ_BASE + 32)
-#define GROUP4_IRQ_BASE                (GROUP3_IRQ_BASE + 32)
-
-
-#ifdef __MIPSEB__
-#define RC32434_UART0_BASE     (RC32434_REG_BASE + 0x58003)
-#else
-#define RC32434_UART0_BASE     (RC32434_REG_BASE + 0x58000)
-#endif
-
-#define RC32434_UART0_IRQ      (GROUP3_IRQ_BASE + 0)
 
 /* cpu pipeline flush */
 static inline void rc32434_sync(void)