aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/philips/pnx8550/common/int.c2
-rw-r--r--arch/mips/philips/pnx8550/common/platform.c16
-rw-r--r--arch/mips/philips/pnx8550/common/prom.c4
-rw-r--r--arch/mips/philips/pnx8550/common/setup.c6
-rw-r--r--include/asm-mips/mach-pnx8550/uart.h14
6 files changed, 26 insertions, 18 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index bfab055ad7cc..8a49884bd5ec 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -440,13 +440,11 @@ config MIPS_XXS1500
440 440
441config PNX8550_V2PCI 441config PNX8550_V2PCI
442 bool "Philips PNX8550 based Viper2-PCI board" 442 bool "Philips PNX8550 based Viper2-PCI board"
443 depends on BROKEN
444 select PNX8550 443 select PNX8550
445 select SYS_SUPPORTS_LITTLE_ENDIAN 444 select SYS_SUPPORTS_LITTLE_ENDIAN
446 445
447config PNX8550_JBS 446config PNX8550_JBS
448 bool "Philips PNX8550 based JBS board" 447 bool "Philips PNX8550 based JBS board"
449 depends on BROKEN
450 select PNX8550 448 select PNX8550
451 select SYS_SUPPORTS_LITTLE_ENDIAN 449 select SYS_SUPPORTS_LITTLE_ENDIAN
452 450
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c
index 099679a9dfb9..3c93512be1ec 100644
--- a/arch/mips/philips/pnx8550/common/int.c
+++ b/arch/mips/philips/pnx8550/common/int.c
@@ -90,7 +90,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
90 unsigned int pending = read_c0_status() & read_c0_cause(); 90 unsigned int pending = read_c0_status() & read_c0_cause();
91 91
92 if (pending & STATUSF_IP2) 92 if (pending & STATUSF_IP2)
93 do_IRQ(2, regs); 93 hw0_irqdispatch(2, regs);
94 else if (pending & STATUSF_IP7) { 94 else if (pending & STATUSF_IP7) {
95 if (read_c0_config7() & 0x01c0) 95 if (read_c0_config7() & 0x01c0)
96 timer_irqdispatch(7, regs); 96 timer_irqdispatch(7, regs);
diff --git a/arch/mips/philips/pnx8550/common/platform.c b/arch/mips/philips/pnx8550/common/platform.c
index 5436b4b97455..d43f56e2cd78 100644
--- a/arch/mips/philips/pnx8550/common/platform.c
+++ b/arch/mips/philips/pnx8550/common/platform.c
@@ -17,15 +17,13 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/resource.h> 18#include <linux/resource.h>
19#include <linux/serial.h> 19#include <linux/serial.h>
20#include <linux/serial_ip3106.h> 20#include <linux/serial_pnx8xxx.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22 22
23#include <int.h> 23#include <int.h>
24#include <usb.h> 24#include <usb.h>
25#include <uart.h> 25#include <uart.h>
26 26
27extern struct uart_ops ip3106_pops;
28
29static struct resource pnx8550_usb_ohci_resources[] = { 27static struct resource pnx8550_usb_ohci_resources[] = {
30 [0] = { 28 [0] = {
31 .start = PNX8550_USB_OHCI_OP_BASE, 29 .start = PNX8550_USB_OHCI_OP_BASE,
@@ -63,31 +61,29 @@ static struct resource pnx8550_uart_resources[] = {
63 }, 61 },
64}; 62};
65 63
66struct ip3106_port ip3106_ports[] = { 64struct pnx8xxx_port pnx8xxx_ports[] = {
67 [0] = { 65 [0] = {
68 .port = { 66 .port = {
69 .type = PORT_IP3106, 67 .type = PORT_PNX8XXX,
70 .iotype = UPIO_MEM, 68 .iotype = UPIO_MEM,
71 .membase = (void __iomem *)PNX8550_UART_PORT0, 69 .membase = (void __iomem *)PNX8550_UART_PORT0,
72 .mapbase = PNX8550_UART_PORT0, 70 .mapbase = PNX8550_UART_PORT0,
73 .irq = PNX8550_UART_INT(0), 71 .irq = PNX8550_UART_INT(0),
74 .uartclk = 3692300, 72 .uartclk = 3692300,
75 .fifosize = 16, 73 .fifosize = 16,
76 .ops = &ip3106_pops,
77 .flags = UPF_BOOT_AUTOCONF, 74 .flags = UPF_BOOT_AUTOCONF,
78 .line = 0, 75 .line = 0,
79 }, 76 },
80 }, 77 },
81 [1] = { 78 [1] = {
82 .port = { 79 .port = {
83 .type = PORT_IP3106, 80 .type = PORT_PNX8XXX,
84 .iotype = UPIO_MEM, 81 .iotype = UPIO_MEM,
85 .membase = (void __iomem *)PNX8550_UART_PORT1, 82 .membase = (void __iomem *)PNX8550_UART_PORT1,
86 .mapbase = PNX8550_UART_PORT1, 83 .mapbase = PNX8550_UART_PORT1,
87 .irq = PNX8550_UART_INT(1), 84 .irq = PNX8550_UART_INT(1),
88 .uartclk = 3692300, 85 .uartclk = 3692300,
89 .fifosize = 16, 86 .fifosize = 16,
90 .ops = &ip3106_pops,
91 .flags = UPF_BOOT_AUTOCONF, 87 .flags = UPF_BOOT_AUTOCONF,
92 .line = 1, 88 .line = 1,
93 }, 89 },
@@ -111,12 +107,12 @@ static struct platform_device pnx8550_usb_ohci_device = {
111}; 107};
112 108
113static struct platform_device pnx8550_uart_device = { 109static struct platform_device pnx8550_uart_device = {
114 .name = "ip3106-uart", 110 .name = "pnx8xxx-uart",
115 .id = -1, 111 .id = -1,
116 .dev = { 112 .dev = {
117 .dma_mask = &uart_dmamask, 113 .dma_mask = &uart_dmamask,
118 .coherent_dma_mask = 0xffffffff, 114 .coherent_dma_mask = 0xffffffff,
119 .platform_data = ip3106_ports, 115 .platform_data = pnx8xxx_ports,
120 }, 116 },
121 .num_resources = ARRAY_SIZE(pnx8550_uart_resources), 117 .num_resources = ARRAY_SIZE(pnx8550_uart_resources),
122 .resource = pnx8550_uart_resources, 118 .resource = pnx8550_uart_resources,
diff --git a/arch/mips/philips/pnx8550/common/prom.c b/arch/mips/philips/pnx8550/common/prom.c
index 70aac9759412..f8952c1359cd 100644
--- a/arch/mips/philips/pnx8550/common/prom.c
+++ b/arch/mips/philips/pnx8550/common/prom.c
@@ -13,7 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/serial_ip3106.h> 16#include <linux/serial_pnx8xxx.h>
17 17
18#include <asm/bootinfo.h> 18#include <asm/bootinfo.h>
19#include <uart.h> 19#include <uart.h>
@@ -126,7 +126,7 @@ void prom_putchar(char c)
126{ 126{
127 if (pnx8550_console_port != -1) { 127 if (pnx8550_console_port != -1) {
128 /* Wait until FIFO not full */ 128 /* Wait until FIFO not full */
129 while( ((ip3106_fifo(UART_BASE, pnx8550_console_port) & IP3106_UART_FIFO_TXFIFO) >> 16) >= 16) 129 while( ((ip3106_fifo(UART_BASE, pnx8550_console_port) & PNX8XXX_UART_FIFO_TXFIFO) >> 16) >= 16)
130 ; 130 ;
131 /* Send one char */ 131 /* Send one char */
132 ip3106_fifo(UART_BASE, pnx8550_console_port) = c; 132 ip3106_fifo(UART_BASE, pnx8550_console_port) = c;
diff --git a/arch/mips/philips/pnx8550/common/setup.c b/arch/mips/philips/pnx8550/common/setup.c
index 36b0c8bc6c06..e62123ca9b64 100644
--- a/arch/mips/philips/pnx8550/common/setup.c
+++ b/arch/mips/philips/pnx8550/common/setup.c
@@ -24,7 +24,7 @@
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/serial_ip3106.h> 27#include <linux/serial_pnx8xxx.h>
28#include <linux/pm.h> 28#include <linux/pm.h>
29 29
30#include <asm/cpu.h> 30#include <asm/cpu.h>
@@ -56,7 +56,7 @@ extern char *prom_getcmdline(void);
56 56
57struct resource standard_io_resources[] = { 57struct resource standard_io_resources[] = {
58 { 58 {
59 .start = .0x00, 59 .start = 0x00,
60 .end = 0x1f, 60 .end = 0x1f,
61 .name = "dma1", 61 .name = "dma1",
62 .flags = IORESOURCE_BUSY 62 .flags = IORESOURCE_BUSY
@@ -144,7 +144,7 @@ void __init plat_mem_setup(void)
144 /* We must initialize the UART (console) before prom_printf */ 144 /* We must initialize the UART (console) before prom_printf */
145 /* Set LCR to 8-bit and BAUD to 38400 (no 5) */ 145 /* Set LCR to 8-bit and BAUD to 38400 (no 5) */
146 ip3106_lcr(UART_BASE, pnx8550_console_port) = 146 ip3106_lcr(UART_BASE, pnx8550_console_port) =
147 IP3106_UART_LCR_8BIT; 147 PNX8XXX_UART_LCR_8BIT;
148 ip3106_baud(UART_BASE, pnx8550_console_port) = 5; 148 ip3106_baud(UART_BASE, pnx8550_console_port) = 5;
149 } 149 }
150 150
diff --git a/include/asm-mips/mach-pnx8550/uart.h b/include/asm-mips/mach-pnx8550/uart.h
index e32b9a23d70e..814a7a15ab49 100644
--- a/include/asm-mips/mach-pnx8550/uart.h
+++ b/include/asm-mips/mach-pnx8550/uart.h
@@ -13,4 +13,18 @@
13#define PNX8550_UART_INT(x) (PNX8550_INT_GIC_MIN+19+x) 13#define PNX8550_UART_INT(x) (PNX8550_INT_GIC_MIN+19+x)
14#define IRQ_TO_UART(x) (x-PNX8550_INT_GIC_MIN-19) 14#define IRQ_TO_UART(x) (x-PNX8550_INT_GIC_MIN-19)
15 15
16/* early macros needed for prom/kgdb */
17
18#define ip3106_lcr(base,port) *(volatile u32 *)(base+(port*0x1000) + 0x000)
19#define ip3106_mcr(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x004)
20#define ip3106_baud(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x008)
21#define ip3106_cfg(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x00C)
22#define ip3106_fifo(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x028)
23#define ip3106_istat(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE0)
24#define ip3106_ien(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE4)
25#define ip3106_iclr(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE8)
26#define ip3106_iset(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFEC)
27#define ip3106_pd(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFF4)
28#define ip3106_mid(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFFC)
29
16#endif 30#endif