diff options
author | Timur Tabi <timur@freescale.com> | 2007-10-03 12:34:59 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-10-08 09:38:15 -0400 |
commit | 6b0b594bb81f86dbc7b0829ee5102abaab242913 (patch) | |
tree | 707463987ab05d04596763afa9db1c63cbde4c4a /include/asm-powerpc/ucc_slow.h | |
parent | 6039680705906f270411435c05c869ac4f59ef10 (diff) |
[POWERPC] qe: miscellaneous code improvements and fixes to the QE library
This patch makes numerous miscellaneous code improvements to the QE library.
1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type()
(every caller of ucc_init_guemr() also calls ucc_set_type()). Modify all
callers of ucc_set_type() accordingly.
2. Remove the unused enum ucc_pram_initial_offset.
3. Refactor qe_setbrg(), also implement work-around for errata QE_General4.
4. Several printk() calls were missing the terminating \n.
5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where
appropriate.
6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were programmed
with the wrong value.
7. Add the protocol type to struct us_info and updated ucc_slow_init() to
use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED.
8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx()
9. Add several macros in qe.h (mostly for slow UCC support, but also to
standardize some naming convention) and remove several unused macros.
10. Update ucc_geth.c to use the new macros.
11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol
to use when initializing the UCC in ucc_slow_init().
12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since
these are the real names of the registers.
13. Use the setbits, clrbits, and clrsetbits where appropriate.
14. Refactor ucc_set_qe_mux_rxtx().
15. Remove all instances of 'volatile'.
16. Simplify get_cmxucr_reg();
17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[].
18. Updated struct ucc_geth because struct ucc_fast is not padded any more.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/ucc_slow.h')
-rw-r--r-- | include/asm-powerpc/ucc_slow.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-powerpc/ucc_slow.h b/include/asm-powerpc/ucc_slow.h index fdaac9d762bb..0980e6ad335b 100644 --- a/include/asm-powerpc/ucc_slow.h +++ b/include/asm-powerpc/ucc_slow.h | |||
@@ -148,9 +148,10 @@ enum ucc_slow_diag_mode { | |||
148 | 148 | ||
149 | struct ucc_slow_info { | 149 | struct ucc_slow_info { |
150 | int ucc_num; | 150 | int ucc_num; |
151 | int protocol; /* QE_CR_PROTOCOL_xxx */ | ||
151 | enum qe_clock rx_clock; | 152 | enum qe_clock rx_clock; |
152 | enum qe_clock tx_clock; | 153 | enum qe_clock tx_clock; |
153 | u32 regs; | 154 | phys_addr_t regs; |
154 | int irq; | 155 | int irq; |
155 | u16 uccm_mask; | 156 | u16 uccm_mask; |
156 | int data_mem_part; | 157 | int data_mem_part; |
@@ -186,7 +187,7 @@ struct ucc_slow_info { | |||
186 | 187 | ||
187 | struct ucc_slow_private { | 188 | struct ucc_slow_private { |
188 | struct ucc_slow_info *us_info; | 189 | struct ucc_slow_info *us_info; |
189 | struct ucc_slow *us_regs; /* a pointer to memory map of UCC regs */ | 190 | struct ucc_slow __iomem *us_regs; /* Ptr to memory map of UCC regs */ |
190 | struct ucc_slow_pram *us_pram; /* a pointer to the parameter RAM */ | 191 | struct ucc_slow_pram *us_pram; /* a pointer to the parameter RAM */ |
191 | u32 us_pram_offset; | 192 | u32 us_pram_offset; |
192 | int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ | 193 | int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ |
@@ -277,12 +278,12 @@ void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs); | |||
277 | */ | 278 | */ |
278 | void ucc_slow_stop_tx(struct ucc_slow_private * uccs); | 279 | void ucc_slow_stop_tx(struct ucc_slow_private * uccs); |
279 | 280 | ||
280 | /* ucc_slow_restart_x | 281 | /* ucc_slow_restart_tx |
281 | * Restarts transmitting on a specified slow UCC. | 282 | * Restarts transmitting on a specified slow UCC. |
282 | * | 283 | * |
283 | * uccs - (In) pointer to the slow UCC structure. | 284 | * uccs - (In) pointer to the slow UCC structure. |
284 | */ | 285 | */ |
285 | void ucc_slow_restart_x(struct ucc_slow_private * uccs); | 286 | void ucc_slow_restart_tx(struct ucc_slow_private *uccs); |
286 | 287 | ||
287 | u32 ucc_slow_get_qe_cr_subblock(int uccs_num); | 288 | u32 ucc_slow_get_qe_cr_subblock(int uccs_num); |
288 | 289 | ||