diff options
| author | Timur Tabi <timur@freescale.com> | 2008-01-09 18:35:05 -0500 |
|---|---|---|
| committer | Kumar Gala <galak@kernel.crashing.org> | 2008-01-23 20:34:10 -0500 |
| commit | 845cf505cebd159b57b3ae3b25e9ad0eb036f9ab (patch) | |
| tree | aaeb813efa4299bff6b6ea80e302d50b8777febd /arch/powerpc/sysdev/qe_lib | |
| parent | bc556ba940085e46e0ab1b5ed7c31428dc86dd03 (diff) | |
[POWERPC] QE: Add support for Freescale QUICCEngine UART
Add support for UART serial ports using a Freescale QUICCEngine. Update
booting-without-of.txt to define new properties for a QE UART node. Update
the MPC8323E-MDS device tree to add UCC5 as a UART. Update the QE library
to support slow UCC devices and modules.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib')
| -rw-r--r-- | arch/powerpc/sysdev/qe_lib/Kconfig | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/qe_lib/ucc_slow.c | 10 |
2 files changed, 10 insertions, 2 deletions
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 | ||
| 5 | config UCC_SLOW | 5 | config 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 | } |
| 45 | EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock); | ||
| 44 | 46 | ||
| 45 | void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs) | 47 | void 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 | } |
| 61 | EXPORT_SYMBOL(ucc_slow_graceful_stop_tx); | ||
| 59 | 62 | ||
| 60 | void ucc_slow_stop_tx(struct ucc_slow_private * uccs) | 63 | void 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 | } |
| 71 | EXPORT_SYMBOL(ucc_slow_stop_tx); | ||
| 68 | 72 | ||
| 69 | void ucc_slow_restart_tx(struct ucc_slow_private * uccs) | 73 | void 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 | } |
| 81 | EXPORT_SYMBOL(ucc_slow_restart_tx); | ||
| 77 | 82 | ||
| 78 | void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode) | 83 | void 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 | } |
| 102 | EXPORT_SYMBOL(ucc_slow_enable); | ||
| 97 | 103 | ||
| 98 | void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode) | 104 | void 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 | } |
| 123 | EXPORT_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 | } |
| 357 | EXPORT_SYMBOL(ucc_slow_init); | ||
| 350 | 358 | ||
| 351 | void ucc_slow_free(struct ucc_slow_private * uccs) | 359 | void 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 | 377 | EXPORT_SYMBOL(ucc_slow_free); | |
| 370 | 378 | ||
