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

嵌入式Linux

开发平台:

Unix_Linux

  1. /* sun4setup.c: Setup the hardware address of various items in the sun4
  2.  *  architecture. Called from idprom_init
  3.  *
  4.  * Copyright (C) 1998 Chris G. Davis (cdavis@cois.on.ca)
  5.  */
  6. #include <asm/page.h>
  7. #include <asm/oplib.h>
  8. #include <asm/idprom.h>
  9. #include <asm/sun4paddr.h>
  10. #include <asm/machines.h>
  11. int sun4_memreg_physaddr;
  12. int sun4_ie_physaddr;
  13. int sun4_clock_physaddr;
  14. int sun4_timer_physaddr;
  15. int sun4_eth_physaddr;
  16. int sun4_si_physaddr;
  17. int sun4_bwtwo_physaddr;
  18. int sun4_zs0_physaddr;
  19. int sun4_zs1_physaddr;
  20. int sun4_dma_physaddr;
  21. int sun4_esp_physaddr;
  22. int sun4_ie_physaddr; 
  23. void __init sun4setup(void)
  24. {
  25. printk("Sun4 Hardware Setup v1.0 18/May/98 Chris Davis (cdavis@cois.on.ca). ");
  26. /*
  27.   setup standard sun4 info
  28.   */
  29. sun4_ie_physaddr=SUN4_IE_PHYSADDR;
  30. /*
  31.   setup model specific info
  32.   */
  33. switch(idprom->id_machtype) {
  34. case (SM_SUN4 | SM_4_260 ):
  35. printk("Setup for a SUN4/260n");
  36. sun4_memreg_physaddr=SUN4_200_MEMREG_PHYSADDR;
  37. sun4_clock_physaddr=SUN4_200_CLOCK_PHYSADDR;
  38. sun4_timer_physaddr=SUN4_UNUSED_PHYSADDR;
  39. sun4_eth_physaddr=SUN4_200_ETH_PHYSADDR;
  40. sun4_si_physaddr=SUN4_200_SI_PHYSADDR;
  41. sun4_bwtwo_physaddr=SUN4_200_BWTWO_PHYSADDR;
  42. sun4_dma_physaddr=SUN4_UNUSED_PHYSADDR;
  43. sun4_esp_physaddr=SUN4_UNUSED_PHYSADDR;
  44. break;
  45. case (SM_SUN4 | SM_4_330 ):
  46. printk("Setup for a SUN4/330n");
  47. sun4_memreg_physaddr=SUN4_300_MEMREG_PHYSADDR;
  48. sun4_clock_physaddr=SUN4_300_CLOCK_PHYSADDR;
  49. sun4_timer_physaddr=SUN4_300_TIMER_PHYSADDR;
  50. sun4_eth_physaddr=SUN4_300_ETH_PHYSADDR;
  51. sun4_si_physaddr=SUN4_UNUSED_PHYSADDR;
  52. sun4_bwtwo_physaddr=SUN4_300_BWTWO_PHYSADDR;
  53. sun4_dma_physaddr=SUN4_300_DMA_PHYSADDR;
  54. sun4_esp_physaddr=SUN4_300_ESP_PHYSADDR;
  55. break;
  56. case (SM_SUN4 | SM_4_470 ):
  57. printk("Setup for a SUN4/470n");
  58. sun4_memreg_physaddr=SUN4_400_MEMREG_PHYSADDR;
  59. sun4_clock_physaddr=SUN4_400_CLOCK_PHYSADDR;
  60. sun4_timer_physaddr=SUN4_400_TIMER_PHYSADDR;
  61. sun4_eth_physaddr=SUN4_400_ETH_PHYSADDR;
  62. sun4_si_physaddr=SUN4_UNUSED_PHYSADDR;
  63. sun4_bwtwo_physaddr=SUN4_400_BWTWO_PHYSADDR;
  64. sun4_dma_physaddr=SUN4_400_DMA_PHYSADDR;
  65. sun4_esp_physaddr=SUN4_400_ESP_PHYSADDR;
  66. break;
  67. default:
  68. }
  69. }