config.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  *  linux/arch/m68k/hp300/config.c
  3.  *
  4.  *  Copyright (C) 1998 Philip Blundell <philb@gnu.org>
  5.  *
  6.  *  This file contains the HP300-specific initialisation code.  It gets
  7.  *  called by setup.c.
  8.  */
  9. #include <linux/config.h>
  10. #include <linux/types.h>
  11. #include <linux/mm.h>
  12. #include <linux/kd.h>
  13. #include <linux/tty.h>
  14. #include <linux/console.h>
  15. #include <linux/interrupt.h>
  16. #include <linux/init.h>
  17. #include <asm/machdep.h>
  18. #include <asm/blinken.h>
  19. #include <asm/io.h>                               /* readb() and writeb() */
  20. #include <asm/hwtest.h>                           /* hwreg_present() */
  21. #include "ints.h"
  22. #include "time.h"
  23. extern void hp300_reset(void);
  24. extern void (*hp300_default_handler[])(int, void *, struct pt_regs *);
  25. extern int hp300_get_irq_list(char *buf);
  26. #ifdef CONFIG_VT
  27. extern int hp300_keyb_init(void);
  28. #else
  29. /* Dummy function for when there is no keyboard. */
  30. int __init hp300_keyb_init(void)
  31. {
  32. }
  33. #endif
  34. #ifdef CONFIG_HEARTBEAT
  35. static void hp300_pulse(int x)
  36. {
  37.    if (x)
  38.       blinken_leds(0xfe);
  39.    else
  40.       blinken_leds(0xff);
  41. }
  42. #endif
  43. static int hp300_kbdrate(struct kbd_repeat *k)
  44. {
  45.   return 0;
  46. }
  47. static void hp300_kbd_leds(unsigned int leds)
  48. {
  49. }
  50. static void hp300_get_model(char *model)
  51. {
  52.   strcpy(model, "HP9000/300");
  53. }
  54. void __init config_hp300(void)
  55. {
  56.   mach_sched_init      = hp300_sched_init;
  57.   mach_keyb_init       = hp300_keyb_init;
  58.   mach_kbdrate         = hp300_kbdrate;
  59.   mach_kbd_leds        = hp300_kbd_leds;
  60.   mach_init_IRQ        = hp300_init_IRQ;
  61.   mach_request_irq     = hp300_request_irq;
  62.   mach_free_irq        = hp300_free_irq;
  63.   mach_get_model       = hp300_get_model;
  64.   mach_get_irq_list    = hp300_get_irq_list;
  65.   mach_gettimeoffset   = hp300_gettimeoffset;
  66.   mach_default_handler = &hp300_default_handler;
  67. #if 0
  68.   mach_gettod          = hp300_gettod;
  69. #endif
  70.   mach_reset           = hp300_reset;
  71. #ifdef CONFIG_HEARTBEAT
  72.   mach_heartbeat       = hp300_pulse;
  73. #endif
  74. #ifdef CONFIG_DUMMY_CONSOLE
  75.   conswitchp        = &dummy_con;
  76. #endif
  77.   mach_max_dma_address = 0xffffffff;
  78. }