diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/cavium-octeon/serial.c | 30 | ||||
-rw-r--r-- | arch/mips/sni/a20r.c | 32 |
2 files changed, 47 insertions, 15 deletions
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c index 138b2216b4f..569f41bdcc4 100644 --- a/arch/mips/cavium-octeon/serial.c +++ b/arch/mips/cavium-octeon/serial.c | |||
@@ -47,40 +47,40 @@ static int __devinit octeon_serial_probe(struct platform_device *pdev) | |||
47 | { | 47 | { |
48 | int irq, res; | 48 | int irq, res; |
49 | struct resource *res_mem; | 49 | struct resource *res_mem; |
50 | struct uart_port port; | 50 | struct uart_8250_port up; |
51 | 51 | ||
52 | /* All adaptors have an irq. */ | 52 | /* All adaptors have an irq. */ |
53 | irq = platform_get_irq(pdev, 0); | 53 | irq = platform_get_irq(pdev, 0); |
54 | if (irq < 0) | 54 | if (irq < 0) |
55 | return irq; | 55 | return irq; |
56 | 56 | ||
57 | memset(&port, 0, sizeof(port)); | 57 | memset(&up, 0, sizeof(up)); |
58 | 58 | ||
59 | port.flags = ASYNC_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE; | 59 | up.port.flags = ASYNC_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE; |
60 | port.type = PORT_OCTEON; | 60 | up.port.type = PORT_OCTEON; |
61 | port.iotype = UPIO_MEM; | 61 | up.port.iotype = UPIO_MEM; |
62 | port.regshift = 3; | 62 | up.port.regshift = 3; |
63 | port.dev = &pdev->dev; | 63 | up.port.dev = &pdev->dev; |
64 | 64 | ||
65 | if (octeon_is_simulation()) | 65 | if (octeon_is_simulation()) |
66 | /* Make simulator output fast*/ | 66 | /* Make simulator output fast*/ |
67 | port.uartclk = 115200 * 16; | 67 | up.port.uartclk = 115200 * 16; |
68 | else | 68 | else |
69 | port.uartclk = octeon_get_io_clock_rate(); | 69 | up.port.uartclk = octeon_get_io_clock_rate(); |
70 | 70 | ||
71 | port.serial_in = octeon_serial_in; | 71 | up.port.serial_in = octeon_serial_in; |
72 | port.serial_out = octeon_serial_out; | 72 | up.port.serial_out = octeon_serial_out; |
73 | port.irq = irq; | 73 | up.port.irq = irq; |
74 | 74 | ||
75 | res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 75 | res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
76 | if (res_mem == NULL) { | 76 | if (res_mem == NULL) { |
77 | dev_err(&pdev->dev, "found no memory resource\n"); | 77 | dev_err(&pdev->dev, "found no memory resource\n"); |
78 | return -ENXIO; | 78 | return -ENXIO; |
79 | } | 79 | } |
80 | port.mapbase = res_mem->start; | 80 | up.port.mapbase = res_mem->start; |
81 | port.membase = ioremap(res_mem->start, resource_size(res_mem)); | 81 | up.port.membase = ioremap(res_mem->start, resource_size(res_mem)); |
82 | 82 | ||
83 | res = serial8250_register_port(&port); | 83 | res = serial8250_register_8250_port(&up); |
84 | 84 | ||
85 | return res >= 0 ? 0 : res; | 85 | return res >= 0 ? 0 : res; |
86 | } | 86 | } |
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c index c48194c3073..b2d4f492d78 100644 --- a/arch/mips/sni/a20r.c +++ b/arch/mips/sni/a20r.c | |||
@@ -133,6 +133,38 @@ static struct platform_device sc26xx_pdev = { | |||
133 | } | 133 | } |
134 | }; | 134 | }; |
135 | 135 | ||
136 | #warning "Please try migrate to use new driver SCCNXP and report the status" \ | ||
137 | "in the linux-serial mailing list." | ||
138 | |||
139 | /* The code bellow is a replacement of SC26XX to SCCNXP */ | ||
140 | #if 0 | ||
141 | #include <linux/platform_data/sccnxp.h> | ||
142 | |||
143 | static struct sccnxp_pdata sccnxp_data = { | ||
144 | .reg_shift = 2, | ||
145 | .frequency = 3686400, | ||
146 | .mctrl_cfg[0] = MCTRL_SIG(DTR_OP, LINE_OP7) | | ||
147 | MCTRL_SIG(RTS_OP, LINE_OP3) | | ||
148 | MCTRL_SIG(DSR_IP, LINE_IP5) | | ||
149 | MCTRL_SIG(DCD_IP, LINE_IP6), | ||
150 | .mctrl_cfg[1] = MCTRL_SIG(DTR_OP, LINE_OP2) | | ||
151 | MCTRL_SIG(RTS_OP, LINE_OP1) | | ||
152 | MCTRL_SIG(DSR_IP, LINE_IP0) | | ||
153 | MCTRL_SIG(CTS_IP, LINE_IP1) | | ||
154 | MCTRL_SIG(DCD_IP, LINE_IP2) | | ||
155 | MCTRL_SIG(RNG_IP, LINE_IP3), | ||
156 | }; | ||
157 | |||
158 | static struct platform_device sc2681_pdev = { | ||
159 | .name = "sc2681", | ||
160 | .resource = sc2xxx_rsrc, | ||
161 | .num_resources = ARRAY_SIZE(sc2xxx_rsrc), | ||
162 | .dev = { | ||
163 | .platform_data = &sccnxp_data, | ||
164 | }, | ||
165 | }; | ||
166 | #endif | ||
167 | |||
136 | static u32 a20r_ack_hwint(void) | 168 | static u32 a20r_ack_hwint(void) |
137 | { | 169 | { |
138 | u32 status = read_c0_status(); | 170 | u32 status = read_c0_status(); |