aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/jmr3927/setup.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-08-19 09:55:09 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 11:18:42 -0400
commitd10e025f0e4ba4b96d7b5786d232ac5b0b232b11 (patch)
treea417a55071b4b7edc22b7c5bb1a2352e7b5986d9 /arch/mips/txx9/jmr3927/setup.c
parent860e546c19d88c21819c7f0861c505debd2d6eed (diff)
MIPS: TXx9: Cache fixup
TX39/TX49 can enable/disable I/D cache at runtime. Add kernel options to control them. This is useful to debug some cache-related issues, such as aliasing or I/D coherency. Also enable CWF bit for TX49 SoCs. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/jmr3927/setup.c')
-rw-r--r--arch/mips/txx9/jmr3927/setup.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/mips/txx9/jmr3927/setup.c b/arch/mips/txx9/jmr3927/setup.c
index 87db41be8a56..2e40a9268254 100644
--- a/arch/mips/txx9/jmr3927/setup.c
+++ b/arch/mips/txx9/jmr3927/setup.c
@@ -62,7 +62,6 @@ static void __init jmr3927_time_init(void)
62} 62}
63 63
64#define DO_WRITE_THROUGH 64#define DO_WRITE_THROUGH
65#define DO_ENABLE_CACHE
66 65
67static void jmr3927_board_init(void); 66static void jmr3927_board_init(void);
68 67
@@ -77,11 +76,6 @@ static void __init jmr3927_mem_setup(void)
77 /* cache setup */ 76 /* cache setup */
78 { 77 {
79 unsigned int conf; 78 unsigned int conf;
80#ifdef DO_ENABLE_CACHE
81 int mips_ic_disable = 0, mips_dc_disable = 0;
82#else
83 int mips_ic_disable = 1, mips_dc_disable = 1;
84#endif
85#ifdef DO_WRITE_THROUGH 79#ifdef DO_WRITE_THROUGH
86 int mips_config_cwfon = 0; 80 int mips_config_cwfon = 0;
87 int mips_config_wbon = 0; 81 int mips_config_wbon = 0;
@@ -91,10 +85,7 @@ static void __init jmr3927_mem_setup(void)
91#endif 85#endif
92 86
93 conf = read_c0_conf(); 87 conf = read_c0_conf();
94 conf &= ~(TX39_CONF_ICE | TX39_CONF_DCE | 88 conf &= ~(TX39_CONF_WBON | TX39_CONF_CWFON);
95 TX39_CONF_WBON | TX39_CONF_CWFON);
96 conf |= mips_ic_disable ? 0 : TX39_CONF_ICE;
97 conf |= mips_dc_disable ? 0 : TX39_CONF_DCE;
98 conf |= mips_config_wbon ? TX39_CONF_WBON : 0; 89 conf |= mips_config_wbon ? TX39_CONF_WBON : 0;
99 conf |= mips_config_cwfon ? TX39_CONF_CWFON : 0; 90 conf |= mips_config_cwfon ? TX39_CONF_CWFON : 0;
100 91