diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2007-07-24 23:19:14 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-07-24 23:19:14 -0400 |
commit | 1aafd9091226a02b481298315f959f777294684e (patch) | |
tree | b09e0aaabb6aacd882499a69b28638cbd669dbba /arch/blackfin/kernel/setup.c | |
parent | 287050fe13bf34824f03b4351002b0e2db4ee5cb (diff) |
Blackfin arch: revise anomaly handling by basing things on the compiler not the kconfig defines
revise anomaly handling by basing things on the compiler not the kconfig defines,
so the header is stable and usable outside of the kernel. This also allows us to
move some code from preprocessing to compiling (gcc culls dead code)
which should help with code quality (readability, catch minor bugs, etc...).
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 88f221b89b33..02c15272f8ef 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -179,14 +179,16 @@ void __init setup_arch(char **cmdline_p) | |||
179 | cclk = get_cclk(); | 179 | cclk = get_cclk(); |
180 | sclk = get_sclk(); | 180 | sclk = get_sclk(); |
181 | 181 | ||
182 | #if !defined(CONFIG_BFIN_KERNEL_CLOCK) && defined(ANOMALY_05000273) | 182 | #if !defined(CONFIG_BFIN_KERNEL_CLOCK) |
183 | if (cclk == sclk) | 183 | if (ANOMALY_05000273 && cclk == sclk) |
184 | panic("ANOMALY 05000273, SCLK can not be same as CCLK"); | 184 | panic("ANOMALY 05000273, SCLK can not be same as CCLK"); |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | #if defined(ANOMALY_05000266) | 187 | #ifdef BF561_FAMILY |
188 | bfin_read_IMDMA_D0_IRQ_STATUS(); | 188 | if (ANOMALY_05000266) { |
189 | bfin_read_IMDMA_D1_IRQ_STATUS(); | 189 | bfin_read_IMDMA_D0_IRQ_STATUS(); |
190 | bfin_read_IMDMA_D1_IRQ_STATUS(); | ||
191 | } | ||
190 | #endif | 192 | #endif |
191 | 193 | ||
192 | #ifdef DEBUG_SERIAL_EARLY_INIT | 194 | #ifdef DEBUG_SERIAL_EARLY_INIT |
@@ -260,7 +262,7 @@ void __init setup_arch(char **cmdline_p) | |||
260 | && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) | 262 | && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) |
261 | mtd_size = | 263 | mtd_size = |
262 | PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2])); | 264 | PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2])); |
263 | # if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263)) | 265 | # if (defined(CONFIG_BLKFIN_CACHE) && ANOMALY_05000263) |
264 | /* Due to a Hardware Anomaly we need to limit the size of usable | 266 | /* Due to a Hardware Anomaly we need to limit the size of usable |
265 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on | 267 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on |
266 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception | 268 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception |
@@ -289,7 +291,7 @@ void __init setup_arch(char **cmdline_p) | |||
289 | _ebss = memory_mtd_start; /* define _ebss for compatible */ | 291 | _ebss = memory_mtd_start; /* define _ebss for compatible */ |
290 | #endif /* CONFIG_MTD_UCLINUX */ | 292 | #endif /* CONFIG_MTD_UCLINUX */ |
291 | 293 | ||
292 | #if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263)) | 294 | #if (defined(CONFIG_BLKFIN_CACHE) && ANOMALY_05000263) |
293 | /* Due to a Hardware Anomaly we need to limit the size of usable | 295 | /* Due to a Hardware Anomaly we need to limit the size of usable |
294 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on | 296 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on |
295 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception | 297 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception |
@@ -337,10 +339,8 @@ void __init setup_arch(char **cmdline_p) | |||
337 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu Mhz System Clock\n", | 339 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu Mhz System Clock\n", |
338 | cclk / 1000000, sclk / 1000000); | 340 | cclk / 1000000, sclk / 1000000); |
339 | 341 | ||
340 | #if defined(ANOMALY_05000273) | 342 | if (ANOMALY_05000273 && (cclk >> 1) <= sclk) |
341 | if ((cclk >> 1) <= sclk) | ||
342 | printk("\n\n\nANOMALY_05000273: CCLK must be >= 2*SCLK !!!\n\n\n"); | 343 | printk("\n\n\nANOMALY_05000273: CCLK must be >= 2*SCLK !!!\n\n\n"); |
343 | #endif | ||
344 | 344 | ||
345 | printk(KERN_INFO "Board Memory: %ldMB\n", physical_mem_end >> 20); | 345 | printk(KERN_INFO "Board Memory: %ldMB\n", physical_mem_end >> 20); |
346 | printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20); | 346 | printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20); |