diff options
Diffstat (limited to 'arch/mips/jmr3927/rbhma3100/setup.c')
-rw-r--r-- | arch/mips/jmr3927/rbhma3100/setup.c | 60 |
1 files changed, 55 insertions, 5 deletions
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 06e01c8f4e3a..c886d804d303 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c | |||
@@ -29,21 +29,17 @@ | |||
29 | 29 | ||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/kdev_t.h> | ||
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
35 | #include <linux/ide.h> | ||
36 | #include <linux/ioport.h> | 34 | #include <linux/ioport.h> |
37 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
38 | #include <linux/pm.h> | 36 | #include <linux/pm.h> |
39 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/clk.h> | ||
40 | #ifdef CONFIG_SERIAL_TXX9 | 39 | #ifdef CONFIG_SERIAL_TXX9 |
41 | #include <linux/tty.h> | ||
42 | #include <linux/serial.h> | ||
43 | #include <linux/serial_core.h> | 40 | #include <linux/serial_core.h> |
44 | #endif | 41 | #endif |
45 | 42 | ||
46 | #include <asm/addrspace.h> | ||
47 | #include <asm/txx9tmr.h> | 43 | #include <asm/txx9tmr.h> |
48 | #include <asm/reboot.h> | 44 | #include <asm/reboot.h> |
49 | #include <asm/jmr3927/jmr3927.h> | 45 | #include <asm/jmr3927/jmr3927.h> |
@@ -238,6 +234,8 @@ static void __init tx3927_setup(void) | |||
238 | tx3927_ccfgptr->ccfg &= ~TX3927_CCFG_BEOW; | 234 | tx3927_ccfgptr->ccfg &= ~TX3927_CCFG_BEOW; |
239 | /* Disable PCI snoop */ | 235 | /* Disable PCI snoop */ |
240 | tx3927_ccfgptr->ccfg &= ~TX3927_CCFG_PSNP; | 236 | tx3927_ccfgptr->ccfg &= ~TX3927_CCFG_PSNP; |
237 | /* do reset on watchdog */ | ||
238 | tx3927_ccfgptr->ccfg |= TX3927_CCFG_WR; | ||
241 | 239 | ||
242 | #ifdef DO_WRITE_THROUGH | 240 | #ifdef DO_WRITE_THROUGH |
243 | /* Enable PCI SNOOP - with write through only */ | 241 | /* Enable PCI SNOOP - with write through only */ |
@@ -388,3 +386,55 @@ static int __init jmr3927_rtc_init(void) | |||
388 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | 386 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; |
389 | } | 387 | } |
390 | device_initcall(jmr3927_rtc_init); | 388 | device_initcall(jmr3927_rtc_init); |
389 | |||
390 | /* Watchdog support */ | ||
391 | |||
392 | static int __init txx9_wdt_init(unsigned long base) | ||
393 | { | ||
394 | struct resource res = { | ||
395 | .start = base, | ||
396 | .end = base + 0x100 - 1, | ||
397 | .flags = IORESOURCE_MEM, | ||
398 | }; | ||
399 | struct platform_device *dev = | ||
400 | platform_device_register_simple("txx9wdt", -1, &res, 1); | ||
401 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | ||
402 | } | ||
403 | |||
404 | static int __init jmr3927_wdt_init(void) | ||
405 | { | ||
406 | return txx9_wdt_init(TX3927_TMR_REG(2)); | ||
407 | } | ||
408 | device_initcall(jmr3927_wdt_init); | ||
409 | |||
410 | /* Minimum CLK support */ | ||
411 | |||
412 | struct clk *clk_get(struct device *dev, const char *id) | ||
413 | { | ||
414 | if (!strcmp(id, "imbus_clk")) | ||
415 | return (struct clk *)JMR3927_IMCLK; | ||
416 | return ERR_PTR(-ENOENT); | ||
417 | } | ||
418 | EXPORT_SYMBOL(clk_get); | ||
419 | |||
420 | int clk_enable(struct clk *clk) | ||
421 | { | ||
422 | return 0; | ||
423 | } | ||
424 | EXPORT_SYMBOL(clk_enable); | ||
425 | |||
426 | void clk_disable(struct clk *clk) | ||
427 | { | ||
428 | } | ||
429 | EXPORT_SYMBOL(clk_disable); | ||
430 | |||
431 | unsigned long clk_get_rate(struct clk *clk) | ||
432 | { | ||
433 | return (unsigned long)clk; | ||
434 | } | ||
435 | EXPORT_SYMBOL(clk_get_rate); | ||
436 | |||
437 | void clk_put(struct clk *clk) | ||
438 | { | ||
439 | } | ||
440 | EXPORT_SYMBOL(clk_put); | ||