diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2009-05-27 18:55:19 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-05-27 18:55:19 +0000 |
commit | 7365004424f58db813a092c24c404ec99507765f (patch) | |
tree | a295b73549800b36b6e53458b5c8ee7cf6ff2a97 /src/northbridge/via/vx800/dram_util.c | |
parent | 5c044c732fc28b09eb58956a85b141af194f2b94 (diff) |
First batch of indent-aided code cleanups, more will follow.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4318 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/via/vx800/dram_util.c')
-rw-r--r-- | src/northbridge/via/vx800/dram_util.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/northbridge/via/vx800/dram_util.c b/src/northbridge/via/vx800/dram_util.c index d09acdaf6f..35c471fc80 100644 --- a/src/northbridge/via/vx800/dram_util.c +++ b/src/northbridge/via/vx800/dram_util.c @@ -41,8 +41,8 @@ Reference : None void via_write_phys(volatile u32 addr, volatile u32 value) { volatile u32 *ptr; - ptr = (volatile u32 *) addr; - *ptr = (volatile u32) value; + ptr = (volatile u32 *)addr; + *ptr = (volatile u32)value; } /*=================================================================== @@ -59,12 +59,11 @@ u32 via_read_phys(volatile u32 addr) volatile u32 *ptr; volatile u32 y; // ptr = (volatile u32 *)addr; - y = *(volatile u32 *) addr; + y = *(volatile u32 *)addr; // return *ptr; return y; } - /*=================================================================== Function : DimmRead() Precondition : @@ -77,12 +76,11 @@ Reference : None u32 DimmRead(volatile u32 x) { // volatile u32 z; volatile u32 y; - y = *(volatile u32 *) x; + y = *(volatile u32 *)x; return y; } - /*=================================================================== Function : DramBaseTest() Precondition : this function used to verify memory @@ -116,8 +114,7 @@ BOOLEAN DramBaseTest(u32 BaseAdd, u32 Length, } //write each test unit the value with TEST_PATTERN - for (Address = BaseAdd; Address < BaseAdd + Length; - Address += TestSpan) { + for (Address = BaseAdd; Address < BaseAdd + Length; Address += TestSpan) { for (i = 0; i < TestCount; i++) via_write_phys(Address + i * 4, TEST_PATTERN); if (PrintFlag) { @@ -131,15 +128,12 @@ BOOLEAN DramBaseTest(u32 BaseAdd, u32 Length, //compare each test unit with the value of TEST_PATTERN //and write it with compliment of TEST_PATTERN - for (Address = BaseAdd; Address < BaseAdd + Length; - Address += TestSpan) { + for (Address = BaseAdd; Address < BaseAdd + Length; Address += TestSpan) { for (i = 0; i < TestCount; i++) { Data = via_read_phys(Address + i * 4); - via_write_phys(Address + i * 4, - (u32) (~TEST_PATTERN)); + via_write_phys(Address + i * 4, (u32) (~TEST_PATTERN)); if (Data != TEST_PATTERN) { - PRINT_DEBUG_MEM - ("TEST_PATTERN ERROR !!!!! "); + PRINT_DEBUG_MEM("TEST_PATTERN ERROR !!!!! "); Address2 = Address + i * 4; PRINT_DEBUG_MEM_HEX32(Address2); PRINT_DEBUG_MEM(" : "); @@ -157,16 +151,13 @@ BOOLEAN DramBaseTest(u32 BaseAdd, u32 Length, } } - //compare each test unit with the value of ~TEST_PATTERN - for (Address = BaseAdd; Address < BaseAdd + Length; - Address += TestSpan) { + for (Address = BaseAdd; Address < BaseAdd + Length; Address += TestSpan) { for (i = (u8) (TestCount); i > 0; i--) { Data = via_read_phys(Address + (i - 1) * 4); if (Data != ~TEST_PATTERN) { - PRINT_DEBUG_MEM - ("~TEST_PATTERN ERROR !!!!! "); + PRINT_DEBUG_MEM("~TEST_PATTERN ERROR !!!!! "); Address2 = Address + (i - 1) * 4; PRINT_DEBUG_MEM_HEX32(Address2); PRINT_DEBUG_MEM(" : "); @@ -219,7 +210,6 @@ void DumpRegisters(INTN DevNum, INTN FuncNum) return; } - /*=================================================================== Function : dumpnorth() Precondition : |