Skip to content

Commit 6cc915b

Browse files
sjg20trini
authored andcommitted
arm: powerpc: Tidy up code style for cache functions
Remove the unwanted space before the bracket. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
1 parent 62270f4 commit 6cc915b

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

arch/arm/lib/cache-cp15.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -253,17 +253,17 @@ static void cache_disable(uint32_t cache_bit)
253253
#endif
254254

255255
#if CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
256-
void icache_enable (void)
256+
void icache_enable(void)
257257
{
258258
return;
259259
}
260260

261-
void icache_disable (void)
261+
void icache_disable(void)
262262
{
263263
return;
264264
}
265265

266-
int icache_status (void)
266+
int icache_status(void)
267267
{
268268
return 0; /* always off */
269269
}
@@ -285,17 +285,17 @@ int icache_status(void)
285285
#endif
286286

287287
#if CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
288-
void dcache_enable (void)
288+
void dcache_enable(void)
289289
{
290290
return;
291291
}
292292

293-
void dcache_disable (void)
293+
void dcache_disable(void)
294294
{
295295
return;
296296
}
297297

298-
int dcache_status (void)
298+
int dcache_status(void)
299299
{
300300
return 0; /* always off */
301301
}

arch/microblaze/cpu/cache.c

+11-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <common.h>
99
#include <asm/asm.h>
1010

11-
int dcache_status (void)
11+
int dcache_status(void)
1212
{
1313
int i = 0;
1414
int mask = 0x80;
@@ -18,7 +18,7 @@ int dcache_status (void)
1818
return i;
1919
}
2020

21-
int icache_status (void)
21+
int icache_status(void)
2222
{
2323
int i = 0;
2424
int mask = 0x20;
@@ -28,28 +28,32 @@ int icache_status (void)
2828
return i;
2929
}
3030

31-
void icache_enable (void) {
31+
void icache_enable(void)
32+
{
3233
MSRSET(0x20);
3334
}
3435

35-
void icache_disable(void) {
36+
void icache_disable(void)
37+
{
3638
/* we are not generate ICACHE size -> flush whole cache */
3739
flush_cache(0, 32768);
3840
MSRCLR(0x20);
3941
}
4042

41-
void dcache_enable (void) {
43+
void dcache_enable(void)
44+
{
4245
MSRSET(0x80);
4346
}
4447

45-
void dcache_disable(void) {
48+
void dcache_disable(void)
49+
{
4650
#ifdef XILINX_USE_DCACHE
4751
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
4852
#endif
4953
MSRCLR(0x80);
5054
}
5155

52-
void flush_cache (ulong addr, ulong size)
56+
void flush_cache(ulong addr, ulong size)
5357
{
5458
int i;
5559
for (i = 0; i < size; i += 4)

board/armltd/integrator/integrator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ extern void cm_remap(void);
109109
writel(SC_CTRL_FLASHVPP | SC_CTRL_FLASHWP, SC_CTRLS);
110110
#endif
111111

112-
icache_enable ();
112+
icache_enable();
113113

114114
return 0;
115115
}

board/cobra5272/flash.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
164164
* chip is in programming mode.
165165
*/
166166

167-
cflag = icache_status ();
168-
icache_disable ();
167+
cflag = icache_status();
168+
icache_disable();
169169
iflag = disable_interrupts ();
170170

171171
printf ("\n");
@@ -237,7 +237,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
237237
enable_interrupts ();
238238

239239
if (cflag)
240-
icache_enable ();
240+
icache_enable();
241241

242242
return rc;
243243
}
@@ -267,8 +267,8 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
267267
* chip is in programming mode.
268268
*/
269269

270-
cflag = icache_status ();
271-
icache_disable ();
270+
cflag = icache_status();
271+
icache_disable();
272272
iflag = disable_interrupts ();
273273

274274
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
@@ -303,7 +303,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
303303
enable_interrupts ();
304304

305305
if (cflag)
306-
icache_enable ();
306+
icache_enable();
307307

308308
return rc;
309309
}

include/common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int testdram(void);
189189
int icache_status (void);
190190
void icache_enable (void);
191191
void icache_disable(void);
192-
int dcache_status (void);
192+
int dcache_status(void);
193193
void dcache_enable (void);
194194
void dcache_disable(void);
195195
void mmu_disable(void);

post/lib_powerpc/cpu.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ ulong cpu_post_makecr (long v)
5757

5858
int cpu_post_test (int flags)
5959
{
60-
int ic = icache_status ();
60+
int ic = icache_status();
6161
int ret = 0;
6262

6363
WATCHDOG_RESET();
6464
if (ic)
65-
icache_disable ();
65+
icache_disable();
6666

6767
if (ret == 0)
6868
ret = cpu_post_test_cmp ();
@@ -110,7 +110,7 @@ int cpu_post_test (int flags)
110110
WATCHDOG_RESET();
111111

112112
if (ic)
113-
icache_enable ();
113+
icache_enable();
114114

115115
WATCHDOG_RESET();
116116

0 commit comments

Comments
 (0)