aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2006-11-09 16:42:44 -0500
committerPaul Mackerras <paulus@samba.org>2006-11-12 22:49:01 -0500
commitfc9e8b4e275b6882cb537154c8fc7cde3692eea0 (patch)
tree6c33e974098943f805e153ed22548652f8c6c0b9 /arch/powerpc/sysdev
parent0613ffbf53625ccecb96500b1cc7b0ef70cc8f04 (diff)
[PATCH] Optimize qe_brg struct to use an array
The qe_brg structure manually defined each of the 16 BRG registers, which made any code that used them cumbersome. This patch replaces the fields with a single 16-element array. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 2bae632d3ad7..812c87c73bb6 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -175,8 +175,7 @@ void qe_setbrg(u32 brg, u32 rate)
175 u32 divisor, tempval; 175 u32 divisor, tempval;
176 int div16 = 0; 176 int div16 = 0;
177 177
178 bp = &qe_immr->brg.brgc1; 178 bp = &qe_immr->brg.brgc[brg];
179 bp += brg;
180 179
181 divisor = (get_brg_clk() / rate); 180 divisor = (get_brg_clk() / rate);
182 if (divisor > QE_BRGC_DIVISOR_MAX + 1) { 181 if (divisor > QE_BRGC_DIVISOR_MAX + 1) {