diff options
Diffstat (limited to 'arch/mips/txx9/generic/setup_tx4927.c')
-rw-r--r-- | arch/mips/txx9/generic/setup_tx4927.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4927.c b/arch/mips/txx9/generic/setup_tx4927.c index c4248cbbd84a..914e93c62639 100644 --- a/arch/mips/txx9/generic/setup_tx4927.c +++ b/arch/mips/txx9/generic/setup_tx4927.c | |||
@@ -252,3 +252,34 @@ void __init tx4927_mtd_init(int ch) | |||
252 | return; /* disabled */ | 252 | return; /* disabled */ |
253 | txx9_physmap_flash_init(ch, start, size, &pdata); | 253 | txx9_physmap_flash_init(ch, start, size, &pdata); |
254 | } | 254 | } |
255 | |||
256 | static void __init tx4927_stop_unused_modules(void) | ||
257 | { | ||
258 | __u64 pcfg, rst = 0, ckd = 0; | ||
259 | char buf[128]; | ||
260 | |||
261 | buf[0] = '\0'; | ||
262 | local_irq_disable(); | ||
263 | pcfg = ____raw_readq(&tx4927_ccfgptr->pcfg); | ||
264 | if (!(pcfg & TX4927_PCFG_SEL2)) { | ||
265 | rst |= TX4927_CLKCTR_ACLRST; | ||
266 | ckd |= TX4927_CLKCTR_ACLCKD; | ||
267 | strcat(buf, " ACLC"); | ||
268 | } | ||
269 | if (rst | ckd) { | ||
270 | txx9_set64(&tx4927_ccfgptr->clkctr, rst); | ||
271 | txx9_set64(&tx4927_ccfgptr->clkctr, ckd); | ||
272 | } | ||
273 | local_irq_enable(); | ||
274 | if (buf[0]) | ||
275 | pr_info("%s: stop%s\n", txx9_pcode_str, buf); | ||
276 | } | ||
277 | |||
278 | static int __init tx4927_late_init(void) | ||
279 | { | ||
280 | if (txx9_pcode != 0x4927) | ||
281 | return -ENODEV; | ||
282 | tx4927_stop_unused_modules(); | ||
283 | return 0; | ||
284 | } | ||
285 | late_initcall(tx4927_late_init); | ||