diff options
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 805c6132c779..536bd9d7e0cf 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/cpu.h> | 29 | #include <asm/cpu.h> |
30 | #include <asm/fixed_code.h> | 30 | #include <asm/fixed_code.h> |
31 | #include <asm/early_printk.h> | 31 | #include <asm/early_printk.h> |
32 | #include <asm/irq_handler.h> | ||
32 | 33 | ||
33 | u16 _bfin_swrst; | 34 | u16 _bfin_swrst; |
34 | EXPORT_SYMBOL(_bfin_swrst); | 35 | EXPORT_SYMBOL(_bfin_swrst); |
@@ -105,6 +106,8 @@ void __cpuinit bfin_setup_caches(unsigned int cpu) | |||
105 | bfin_dcache_init(dcplb_tbl[cpu]); | 106 | bfin_dcache_init(dcplb_tbl[cpu]); |
106 | #endif | 107 | #endif |
107 | 108 | ||
109 | bfin_setup_cpudata(cpu); | ||
110 | |||
108 | /* | 111 | /* |
109 | * In cache coherence emulation mode, we need to have the | 112 | * In cache coherence emulation mode, we need to have the |
110 | * D-cache enabled before running any atomic operation which | 113 | * D-cache enabled before running any atomic operation which |
@@ -163,7 +166,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu) | |||
163 | { | 166 | { |
164 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); | 167 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); |
165 | 168 | ||
166 | cpudata->idle = current; | ||
167 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); | 169 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); |
168 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); | 170 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); |
169 | } | 171 | } |
@@ -851,6 +853,7 @@ void __init native_machine_early_platform_add_devices(void) | |||
851 | 853 | ||
852 | void __init setup_arch(char **cmdline_p) | 854 | void __init setup_arch(char **cmdline_p) |
853 | { | 855 | { |
856 | u32 mmr; | ||
854 | unsigned long sclk, cclk; | 857 | unsigned long sclk, cclk; |
855 | 858 | ||
856 | native_machine_early_platform_add_devices(); | 859 | native_machine_early_platform_add_devices(); |
@@ -902,10 +905,10 @@ void __init setup_arch(char **cmdline_p) | |||
902 | bfin_write_EBIU_FCTL(CONFIG_EBIU_FCTLVAL); | 905 | bfin_write_EBIU_FCTL(CONFIG_EBIU_FCTLVAL); |
903 | #endif | 906 | #endif |
904 | #ifdef CONFIG_BFIN_HYSTERESIS_CONTROL | 907 | #ifdef CONFIG_BFIN_HYSTERESIS_CONTROL |
905 | bfin_write_PORTF_HYSTERISIS(HYST_PORTF_0_15); | 908 | bfin_write_PORTF_HYSTERESIS(HYST_PORTF_0_15); |
906 | bfin_write_PORTG_HYSTERISIS(HYST_PORTG_0_15); | 909 | bfin_write_PORTG_HYSTERESIS(HYST_PORTG_0_15); |
907 | bfin_write_PORTH_HYSTERISIS(HYST_PORTH_0_15); | 910 | bfin_write_PORTH_HYSTERESIS(HYST_PORTH_0_15); |
908 | bfin_write_MISCPORT_HYSTERISIS((bfin_read_MISCPORT_HYSTERISIS() & | 911 | bfin_write_MISCPORT_HYSTERESIS((bfin_read_MISCPORT_HYSTERESIS() & |
909 | ~HYST_NONEGPIO_MASK) | HYST_NONEGPIO); | 912 | ~HYST_NONEGPIO_MASK) | HYST_NONEGPIO); |
910 | #endif | 913 | #endif |
911 | 914 | ||
@@ -921,17 +924,14 @@ void __init setup_arch(char **cmdline_p) | |||
921 | bfin_read_IMDMA_D1_IRQ_STATUS(); | 924 | bfin_read_IMDMA_D1_IRQ_STATUS(); |
922 | } | 925 | } |
923 | #endif | 926 | #endif |
924 | printk(KERN_INFO "Hardware Trace "); | ||
925 | if (bfin_read_TBUFCTL() & 0x1) | ||
926 | printk(KERN_CONT "Active "); | ||
927 | else | ||
928 | printk(KERN_CONT "Off "); | ||
929 | if (bfin_read_TBUFCTL() & 0x2) | ||
930 | printk(KERN_CONT "and Enabled\n"); | ||
931 | else | ||
932 | printk(KERN_CONT "and Disabled\n"); | ||
933 | 927 | ||
934 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); | 928 | mmr = bfin_read_TBUFCTL(); |
929 | printk(KERN_INFO "Hardware Trace %s and %sabled\n", | ||
930 | (mmr & 0x1) ? "active" : "off", | ||
931 | (mmr & 0x2) ? "en" : "dis"); | ||
932 | |||
933 | mmr = bfin_read_SYSCR(); | ||
934 | printk(KERN_INFO "Boot Mode: %i\n", mmr & 0xF); | ||
935 | 935 | ||
936 | /* Newer parts mirror SWRST bits in SYSCR */ | 936 | /* Newer parts mirror SWRST bits in SYSCR */ |
937 | #if defined(CONFIG_BF53x) || defined(CONFIG_BF561) || \ | 937 | #if defined(CONFIG_BF53x) || defined(CONFIG_BF561) || \ |
@@ -939,7 +939,7 @@ void __init setup_arch(char **cmdline_p) | |||
939 | _bfin_swrst = bfin_read_SWRST(); | 939 | _bfin_swrst = bfin_read_SWRST(); |
940 | #else | 940 | #else |
941 | /* Clear boot mode field */ | 941 | /* Clear boot mode field */ |
942 | _bfin_swrst = bfin_read_SYSCR() & ~0xf; | 942 | _bfin_swrst = mmr & ~0xf; |
943 | #endif | 943 | #endif |
944 | 944 | ||
945 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT | 945 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT |
@@ -1036,8 +1036,6 @@ void __init setup_arch(char **cmdline_p) | |||
1036 | static int __init topology_init(void) | 1036 | static int __init topology_init(void) |
1037 | { | 1037 | { |
1038 | unsigned int cpu; | 1038 | unsigned int cpu; |
1039 | /* Record CPU-private information for the boot processor. */ | ||
1040 | bfin_setup_cpudata(0); | ||
1041 | 1039 | ||
1042 | for_each_possible_cpu(cpu) { | 1040 | for_each_possible_cpu(cpu) { |
1043 | register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu); | 1041 | register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu); |
@@ -1283,12 +1281,14 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1283 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, | 1281 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, |
1284 | BFIN_DLINES); | 1282 | BFIN_DLINES); |
1285 | #ifdef __ARCH_SYNC_CORE_DCACHE | 1283 | #ifdef __ARCH_SYNC_CORE_DCACHE |
1286 | seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", dcache_invld_count[cpu_num]); | 1284 | seq_printf(m, "dcache flushes\t: %lu\n", dcache_invld_count[cpu_num]); |
1287 | #endif | 1285 | #endif |
1288 | #ifdef __ARCH_SYNC_CORE_ICACHE | 1286 | #ifdef __ARCH_SYNC_CORE_ICACHE |
1289 | seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", icache_invld_count[cpu_num]); | 1287 | seq_printf(m, "icache flushes\t: %lu\n", icache_invld_count[cpu_num]); |
1290 | #endif | 1288 | #endif |
1291 | 1289 | ||
1290 | seq_printf(m, "\n"); | ||
1291 | |||
1292 | if (cpu_num != num_possible_cpus() - 1) | 1292 | if (cpu_num != num_possible_cpus() - 1) |
1293 | return 0; | 1293 | return 0; |
1294 | 1294 | ||
@@ -1312,13 +1312,11 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1312 | " in data cache\n"); | 1312 | " in data cache\n"); |
1313 | } | 1313 | } |
1314 | seq_printf(m, "board name\t: %s\n", bfin_board_name); | 1314 | seq_printf(m, "board name\t: %s\n", bfin_board_name); |
1315 | seq_printf(m, "board memory\t: %ld kB (0x%p -> 0x%p)\n", | 1315 | seq_printf(m, "board memory\t: %ld kB (0x%08lx -> 0x%08lx)\n", |
1316 | physical_mem_end >> 10, (void *)0, (void *)physical_mem_end); | 1316 | physical_mem_end >> 10, 0ul, physical_mem_end); |
1317 | seq_printf(m, "kernel memory\t: %d kB (0x%p -> 0x%p)\n", | 1317 | seq_printf(m, "kernel memory\t: %d kB (0x%08lx -> 0x%08lx)\n", |
1318 | ((int)memory_end - (int)_rambase) >> 10, | 1318 | ((int)memory_end - (int)_rambase) >> 10, |
1319 | (void *)_rambase, | 1319 | _rambase, memory_end); |
1320 | (void *)memory_end); | ||
1321 | seq_printf(m, "\n"); | ||
1322 | 1320 | ||
1323 | return 0; | 1321 | return 0; |
1324 | } | 1322 | } |
@@ -1326,7 +1324,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1326 | static void *c_start(struct seq_file *m, loff_t *pos) | 1324 | static void *c_start(struct seq_file *m, loff_t *pos) |
1327 | { | 1325 | { |
1328 | if (*pos == 0) | 1326 | if (*pos == 0) |
1329 | *pos = first_cpu(cpu_online_map); | 1327 | *pos = cpumask_first(cpu_online_mask); |
1330 | if (*pos >= num_online_cpus()) | 1328 | if (*pos >= num_online_cpus()) |
1331 | return NULL; | 1329 | return NULL; |
1332 | 1330 | ||
@@ -1335,7 +1333,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) | |||
1335 | 1333 | ||
1336 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 1334 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
1337 | { | 1335 | { |
1338 | *pos = next_cpu(*pos, cpu_online_map); | 1336 | *pos = cpumask_next(*pos, cpu_online_mask); |
1339 | 1337 | ||
1340 | return c_start(m, pos); | 1338 | return c_start(m, pos); |
1341 | } | 1339 | } |