aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/powerpc/booting-without-of.txt9
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts50
-rw-r--r--arch/powerpc/sysdev/qe_lib/Kconfig2
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_slow.c10
4 files changed, 68 insertions, 3 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index e8c67c9015b3..a13d4578319c 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1619,7 +1619,7 @@ platforms are moved over to use the flattened-device-tree model.
1619 1619
1620 Required properties: 1620 Required properties:
1621 - device_type : should be "network", "hldc", "uart", "transparent" 1621 - device_type : should be "network", "hldc", "uart", "transparent"
1622 "bisync" or "atm". 1622 "bisync", "atm", or "serial".
1623 - compatible : could be "ucc_geth" or "fsl_atm" and so on. 1623 - compatible : could be "ucc_geth" or "fsl_atm" and so on.
1624 - model : should be "UCC". 1624 - model : should be "UCC".
1625 - device-id : the ucc number(1-8), corresponding to UCCx in UM. 1625 - device-id : the ucc number(1-8), corresponding to UCCx in UM.
@@ -1632,6 +1632,13 @@ platforms are moved over to use the flattened-device-tree model.
1632 - interrupt-parent : the phandle for the interrupt controller that 1632 - interrupt-parent : the phandle for the interrupt controller that
1633 services interrupts for this device. 1633 services interrupts for this device.
1634 - pio-handle : The phandle for the Parallel I/O port configuration. 1634 - pio-handle : The phandle for the Parallel I/O port configuration.
1635 - port-number : for UART drivers, the port number to use, between 0 and 3.
1636 This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
1637 The port number is added to the minor number of the device. Unlike the
1638 CPM UART driver, the port-number is required for the QE UART driver.
1639 - soft-uart : for UART drivers, if specified this means the QE UART device
1640 driver should use "Soft-UART" mode, which is needed on some SOCs that have
1641 broken UART hardware. Soft-UART is provided via a microcode upload.
1635 - rx-clock-name: the UCC receive clock source 1642 - rx-clock-name: the UCC receive clock source
1636 "none": clock source is disabled 1643 "none": clock source is disabled
1637 "brg1" through "brg16": clock source is BRG1-BRG16, respectively 1644 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 5093ef304ff0..690252456d3d 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -7,6 +7,18 @@
7 * under the terms of the GNU General Public License as published by the 7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. 9 * option) any later version.
10
11 * To enable external serial I/O on a Freescale MPC 8323 SYS/MDS board, do
12 * this:
13 *
14 * 1) On chip U61, lift (disconnect) pins 21 (TXD) and 22 (RXD) from the board.
15 * 2) Solder a wire from U61-21 to P19A-23. P19 is a grid of pins on the board
16 * next to the serial ports.
17 * 3) Solder a wire from U61-22 to P19K-22.
18 *
19 * Note that there's a typo in the schematic. The board labels the last column
20 * of pins "P19K", but in the schematic, that column is called "P19J". So if
21 * you're going by the schematic, the pin is called "P19J-K22".
10 */ 22 */
11 23
12/ { 24/ {
@@ -169,6 +181,23 @@
169 1 1e 1 0 1 0 /* TX_EN */ 181 1 1e 1 0 1 0 /* TX_EN */
170 1 1f 2 0 1 0>;/* CRS */ 182 1 1f 2 0 1 0>;/* CRS */
171 }; 183 };
184 pio5: ucc_pin@05 {
185 pio-map = <
186 /*
187 * open has
188 * port pin dir drain sel irq
189 */
190 2 0 1 0 2 0 /* TxD5 */
191 2 8 2 0 2 0 /* RxD5 */
192
193 2 1d 2 0 0 0 /* CTS5 */
194 2 1f 1 0 2 0 /* RTS5 */
195
196 2 18 2 0 0 0 /* CD */
197
198 >;
199 };
200
172 }; 201 };
173 }; 202 };
174 203
@@ -176,6 +205,7 @@
176 #address-cells = <1>; 205 #address-cells = <1>;
177 #size-cells = <1>; 206 #size-cells = <1>;
178 device_type = "qe"; 207 device_type = "qe";
208 compatible = "fsl,qe";
179 model = "QE"; 209 model = "QE";
180 ranges = <0 e0100000 00100000>; 210 ranges = <0 e0100000 00100000>;
181 reg = <e0100000 480>; 211 reg = <e0100000 480>;
@@ -249,6 +279,26 @@
249 pio-handle = < &pio4 >; 279 pio-handle = < &pio4 >;
250 }; 280 };
251 281
282 ucc@2400 {
283 device_type = "serial";
284 compatible = "ucc_uart";
285 model = "UCC";
286 device-id = <5>; /* The UCC number, 1-7*/
287 port-number = <0>; /* Which ttyQEx device */
288 soft-uart; /* We need Soft-UART */
289 reg = <2400 200>;
290 interrupts = <28>; /* From Table 18-12 */
291 interrupt-parent = < &qeic >;
292 /*
293 * For Soft-UART, we need to set TX to 1X, which
294 * means specifying separate clock sources.
295 */
296 rx-clock-name = "brg5";
297 tx-clock-name = "brg6";
298 pio-handle = < &pio5 >;
299 };
300
301
252 mdio@2320 { 302 mdio@2320 {
253 #address-cells = <1>; 303 #address-cells = <1>;
254 #size-cells = <0>; 304 #size-cells = <0>;
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig
index f611d344a126..adc66212a419 100644
--- a/arch/powerpc/sysdev/qe_lib/Kconfig
+++ b/arch/powerpc/sysdev/qe_lib/Kconfig
@@ -4,7 +4,7 @@
4 4
5config UCC_SLOW 5config UCC_SLOW
6 bool 6 bool
7 default n 7 default y if SERIAL_QE
8 help 8 help
9 This option provides qe_lib support to UCC slow 9 This option provides qe_lib support to UCC slow
10 protocols: UART, BISYNC, QMC 10 protocols: UART, BISYNC, QMC
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index 0174b3aeef8f..b2870b208ddb 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -19,6 +19,7 @@
19#include <linux/stddef.h> 19#include <linux/stddef.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/module.h>
22 23
23#include <asm/io.h> 24#include <asm/io.h>
24#include <asm/immap_qe.h> 25#include <asm/immap_qe.h>
@@ -41,6 +42,7 @@ u32 ucc_slow_get_qe_cr_subblock(int uccs_num)
41 default: return QE_CR_SUBBLOCK_INVALID; 42 default: return QE_CR_SUBBLOCK_INVALID;
42 } 43 }
43} 44}
45EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
44 46
45void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs) 47void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
46{ 48{
@@ -56,6 +58,7 @@ void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)
56 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id, 58 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
57 QE_CR_PROTOCOL_UNSPECIFIED, 0); 59 QE_CR_PROTOCOL_UNSPECIFIED, 0);
58} 60}
61EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
59 62
60void ucc_slow_stop_tx(struct ucc_slow_private * uccs) 63void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
61{ 64{
@@ -65,6 +68,7 @@ void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
65 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); 68 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
66 qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0); 69 qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
67} 70}
71EXPORT_SYMBOL(ucc_slow_stop_tx);
68 72
69void ucc_slow_restart_tx(struct ucc_slow_private * uccs) 73void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
70{ 74{
@@ -74,6 +78,7 @@ void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
74 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); 78 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
75 qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0); 79 qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
76} 80}
81EXPORT_SYMBOL(ucc_slow_restart_tx);
77 82
78void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode) 83void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
79{ 84{
@@ -94,6 +99,7 @@ void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
94 } 99 }
95 out_be32(&us_regs->gumr_l, gumr_l); 100 out_be32(&us_regs->gumr_l, gumr_l);
96} 101}
102EXPORT_SYMBOL(ucc_slow_enable);
97 103
98void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode) 104void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
99{ 105{
@@ -114,6 +120,7 @@ void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
114 } 120 }
115 out_be32(&us_regs->gumr_l, gumr_l); 121 out_be32(&us_regs->gumr_l, gumr_l);
116} 122}
123EXPORT_SYMBOL(ucc_slow_disable);
117 124
118/* Initialize the UCC for Slow operations 125/* Initialize the UCC for Slow operations
119 * 126 *
@@ -347,6 +354,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
347 *uccs_ret = uccs; 354 *uccs_ret = uccs;
348 return 0; 355 return 0;
349} 356}
357EXPORT_SYMBOL(ucc_slow_init);
350 358
351void ucc_slow_free(struct ucc_slow_private * uccs) 359void ucc_slow_free(struct ucc_slow_private * uccs)
352{ 360{
@@ -366,5 +374,5 @@ void ucc_slow_free(struct ucc_slow_private * uccs)
366 374
367 kfree(uccs); 375 kfree(uccs);
368} 376}
369 377EXPORT_SYMBOL(ucc_slow_free);
370 378