Commit fc9e8b4e275b6882cb537154c8fc7cde3692eea0
Committed by
Paul Mackerras
1 parent
0613ffbf53
Exists in
master
and in
7 other branches
[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>
Showing 2 changed files with 2 additions and 18 deletions Side-by-side Diff
arch/powerpc/sysdev/qe_lib/qe.c
include/asm-powerpc/immap_qe.h
... | ... | @@ -136,22 +136,7 @@ |
136 | 136 | |
137 | 137 | /* BRG */ |
138 | 138 | struct qe_brg { |
139 | - __be32 brgc1; /* BRG1 configuration register */ | |
140 | - __be32 brgc2; /* BRG2 configuration register */ | |
141 | - __be32 brgc3; /* BRG3 configuration register */ | |
142 | - __be32 brgc4; /* BRG4 configuration register */ | |
143 | - __be32 brgc5; /* BRG5 configuration register */ | |
144 | - __be32 brgc6; /* BRG6 configuration register */ | |
145 | - __be32 brgc7; /* BRG7 configuration register */ | |
146 | - __be32 brgc8; /* BRG8 configuration register */ | |
147 | - __be32 brgc9; /* BRG9 configuration register */ | |
148 | - __be32 brgc10; /* BRG10 configuration register */ | |
149 | - __be32 brgc11; /* BRG11 configuration register */ | |
150 | - __be32 brgc12; /* BRG12 configuration register */ | |
151 | - __be32 brgc13; /* BRG13 configuration register */ | |
152 | - __be32 brgc14; /* BRG14 configuration register */ | |
153 | - __be32 brgc15; /* BRG15 configuration register */ | |
154 | - __be32 brgc16; /* BRG16 configuration register */ | |
139 | + __be32 brgc[16]; /* BRG configuration registers */ | |
155 | 140 | u8 res0[0x40]; |
156 | 141 | } __attribute__ ((packed)); |
157 | 142 |