aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/c-r4k.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/c-r4k.c')
-rw-r--r--arch/mips/mm/c-r4k.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 4c32ede464b..0f7d788e881 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -632,9 +632,6 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
632 if (size >= scache_size) 632 if (size >= scache_size)
633 r4k_blast_scache(); 633 r4k_blast_scache();
634 else { 634 else {
635 unsigned long lsize = cpu_scache_line_size();
636 unsigned long almask = ~(lsize - 1);
637
638 /* 635 /*
639 * There is no clearly documented alignment requirement 636 * There is no clearly documented alignment requirement
640 * for the cache instruction on MIPS processors and 637 * for the cache instruction on MIPS processors and
@@ -643,9 +640,6 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
643 * hit ops with insufficient alignment. Solved by 640 * hit ops with insufficient alignment. Solved by
644 * aligning the address to cache line size. 641 * aligning the address to cache line size.
645 */ 642 */
646 cache_op(Hit_Writeback_Inv_SD, addr & almask);
647 cache_op(Hit_Writeback_Inv_SD,
648 (addr + size - 1) & almask);
649 blast_inv_scache_range(addr, addr + size); 643 blast_inv_scache_range(addr, addr + size);
650 } 644 }
651 __sync(); 645 __sync();
@@ -655,12 +649,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
655 if (cpu_has_safe_index_cacheops && size >= dcache_size) { 649 if (cpu_has_safe_index_cacheops && size >= dcache_size) {
656 r4k_blast_dcache(); 650 r4k_blast_dcache();
657 } else { 651 } else {
658 unsigned long lsize = cpu_dcache_line_size();
659 unsigned long almask = ~(lsize - 1);
660
661 R4600_HIT_CACHEOP_WAR_IMPL; 652 R4600_HIT_CACHEOP_WAR_IMPL;
662 cache_op(Hit_Writeback_Inv_D, addr & almask);
663 cache_op(Hit_Writeback_Inv_D, (addr + size - 1) & almask);
664 blast_inv_dcache_range(addr, addr + size); 653 blast_inv_dcache_range(addr, addr + size);
665 } 654 }
666 655
@@ -947,7 +936,6 @@ static void __cpuinit probe_pcache(void)
947 case CPU_RM7000: 936 case CPU_RM7000:
948 rm7k_erratum31(); 937 rm7k_erratum31();
949 938
950 case CPU_RM9000:
951 icache_size = 1 << (12 + ((config & CONF_IC) >> 9)); 939 icache_size = 1 << (12 + ((config & CONF_IC) >> 9));
952 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); 940 c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
953 c->icache.ways = 4; 941 c->icache.ways = 4;
@@ -958,9 +946,7 @@ static void __cpuinit probe_pcache(void)
958 c->dcache.ways = 4; 946 c->dcache.ways = 4;
959 c->dcache.waybit = __ffs(dcache_size / c->dcache.ways); 947 c->dcache.waybit = __ffs(dcache_size / c->dcache.ways);
960 948
961#if !defined(CONFIG_SMP) || !defined(RM9000_CDEX_SMP_WAR)
962 c->options |= MIPS_CPU_CACHE_CDEX_P; 949 c->options |= MIPS_CPU_CACHE_CDEX_P;
963#endif
964 c->options |= MIPS_CPU_PREFETCH; 950 c->options |= MIPS_CPU_PREFETCH;
965 break; 951 break;
966 952
@@ -1245,7 +1231,6 @@ static void __cpuinit setup_scache(void)
1245 return; 1231 return;
1246 1232
1247 case CPU_RM7000: 1233 case CPU_RM7000:
1248 case CPU_RM9000:
1249#ifdef CONFIG_RM7000_CPU_SCACHE 1234#ifdef CONFIG_RM7000_CPU_SCACHE
1250 rm7k_sc_init(); 1235 rm7k_sc_init();
1251#endif 1236#endif
@@ -1348,10 +1333,10 @@ static int __init cca_setup(char *str)
1348{ 1333{
1349 get_option(&str, &cca); 1334 get_option(&str, &cca);
1350 1335
1351 return 1; 1336 return 0;
1352} 1337}
1353 1338
1354__setup("cca=", cca_setup); 1339early_param("cca", cca_setup);
1355 1340
1356static void __cpuinit coherency_setup(void) 1341static void __cpuinit coherency_setup(void)
1357{ 1342{
@@ -1401,10 +1386,10 @@ static int __init setcoherentio(char *str)
1401{ 1386{
1402 coherentio = 1; 1387 coherentio = 1;
1403 1388
1404 return 1; 1389 return 0;
1405} 1390}
1406 1391
1407__setup("coherentio", setcoherentio); 1392early_param("coherentio", setcoherentio);
1408#endif 1393#endif
1409 1394
1410static void __cpuinit r4k_cache_error_setup(void) 1395static void __cpuinit r4k_cache_error_setup(void)