setup_sh2000.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * linux/arch/sh/kernel/setup_sh2000.c
  3.  *
  4.  * Copyright (C) 2001  SUGIOKA Tochinobu
  5.  *
  6.  * SH-2000 Support.
  7.  *
  8.  */
  9. #include <linux/config.h>
  10. #include <linux/init.h>
  11. #include <linux/irq.h>
  12. #include <asm/io.h>
  13. #include <asm/io_generic.h>
  14. #include <asm/machvec.h>
  15. #include <asm/machvec_init.h>
  16. #include <asm/rtc.h>
  17. #define CF_CIS_BASE 0xb4200000
  18. #define PORT_PECR 0xa4000108
  19. #define PORT_PHCR 0xa400010E
  20. #define PORT_ICR1 0xa4000010
  21. #define PORT_IRR0 0xa4000004
  22. /*
  23.  * Initialize the board
  24.  */
  25. int __init setup_sh2000(void)
  26. {
  27. /* XXX: RTC setting comes here */
  28. /* These should be done by BIOS/IPL ... */
  29. /* Enable nCE2A, nCE2B output */
  30. ctrl_outw(ctrl_inw(PORT_PECR) & ~0xf00, PORT_PECR);
  31. /* Enable the Compact Flash card, and set the level interrupt */
  32. ctrl_outw(0x0042, CF_CIS_BASE+0x0200);
  33. /* Enable interrupt */
  34. ctrl_outw(ctrl_inw(PORT_PHCR) & ~0x03f3, PORT_PHCR);
  35. ctrl_outw(1, PORT_ICR1);
  36. ctrl_outw(ctrl_inw(PORT_IRR0) & ~0xff3f, PORT_IRR0);
  37. printk(KERN_INFO "SH-2000 Setup...donen");
  38. return 0;
  39. }
  40. /*
  41.  * The Machine Vector
  42.  */
  43. struct sh_machine_vector mv_sh2000 __initmv = {
  44. mv_name: "sh2000",
  45. mv_nr_irqs: 80,
  46. mv_inb: generic_inb,
  47. mv_inw: generic_inw,
  48. mv_inl: generic_inl,
  49. mv_outb: generic_outb,
  50. mv_outw: generic_outw,
  51. mv_outl: generic_outl,
  52. mv_inb_p: generic_inb_p,
  53. mv_inw_p: generic_inw_p,
  54. mv_inl_p: generic_inl_p,
  55. mv_outb_p: generic_outb_p,
  56. mv_outw_p: generic_outw_p,
  57. mv_outl_p: generic_outl_p,
  58. mv_insb: generic_insb,
  59. mv_insw: generic_insw,
  60. mv_insl: generic_insl,
  61. mv_outsb: generic_outsb,
  62. mv_outsw: generic_outsw,
  63. mv_outsl: generic_outsl,
  64. mv_readb: generic_readb,
  65. mv_readw: generic_readw,
  66. mv_readl: generic_readl,
  67. mv_writeb: generic_writeb,
  68. mv_writew: generic_writew,
  69. mv_writel: generic_writel,
  70. mv_init_arch: setup_sh2000,
  71. mv_isa_port2addr: sh2000_isa_port2addr,
  72. mv_ioremap: generic_ioremap,
  73. mv_iounmap: generic_iounmap,
  74. mv_rtc_gettimeofday: sh_rtc_gettimeofday,
  75. mv_rtc_settimeofday: sh_rtc_settimeofday,
  76. mv_hw_sh2000: 1,
  77. };
  78. ALIAS_MV(sh2000)