aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/jmr3927/rbhma3100/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:48:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:48:03 -0500
commit21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch)
tree5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /arch/mips/jmr3927/rbhma3100/setup.c
parent5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff)
parenta9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits) [MIPS] remove Documentation/mips/GT64120.README [MIPS] Malta: remaining bits of the board support code cleanup [MIPS] Malta: make the helper function static [MIPS] Malta: fix braces at single statement blocks [MIPS] Malta, Atlas: move an extern function declaration to the header file [MIPS] Malta: Use C89 style for comments [MIPS] Malta: else should follow close brace in malta_int.c [MIPS] Malta: remove a superfluous comment [MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h> [MIPS] Malta, Atlas, Sead: remove an extern from .c files [MIPS] Malta: fix oversized lines in malta_int.c [MIPS] Malta: remove a dead function declaration [MIPS] Malta: use tabs not spaces [MIPS] Malta: set up the screen info in a separate function [MIPS] Malta: check the PCI clock frequency in a separate function [MIPS] Malta: use the KERN_ facility level in printk() [MIPS] Malta: use Linux kernel style for structure initialization [MIPS]: constify function pointer tables [MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64 [MIPS] Cobalt 64-bits kernels can be safely unmarked experimental ...
Diffstat (limited to 'arch/mips/jmr3927/rbhma3100/setup.c')
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c60
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}
390device_initcall(jmr3927_rtc_init); 388device_initcall(jmr3927_rtc_init);
389
390/* Watchdog support */
391
392static 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
404static int __init jmr3927_wdt_init(void)
405{
406 return txx9_wdt_init(TX3927_TMR_REG(2));
407}
408device_initcall(jmr3927_wdt_init);
409
410/* Minimum CLK support */
411
412struct 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}
418EXPORT_SYMBOL(clk_get);
419
420int clk_enable(struct clk *clk)
421{
422 return 0;
423}
424EXPORT_SYMBOL(clk_enable);
425
426void clk_disable(struct clk *clk)
427{
428}
429EXPORT_SYMBOL(clk_disable);
430
431unsigned long clk_get_rate(struct clk *clk)
432{
433 return (unsigned long)clk;
434}
435EXPORT_SYMBOL(clk_get_rate);
436
437void clk_put(struct clk *clk)
438{
439}
440EXPORT_SYMBOL(clk_put);