config.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Setup kernel for a Sun3x machine
  3. *
  4. * (C) 1999 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
  5. *
  6. * based on code from Oliver Jowett <oliver@jowett.manawatu.gen.nz>
  7. */
  8. #include <linux/config.h>
  9. #include <linux/types.h>
  10. #include <linux/mm.h>
  11. #include <linux/console.h>
  12. #include <linux/init.h>
  13. #include <asm/system.h>
  14. #include <asm/machdep.h>
  15. #include <asm/irq.h>
  16. #include <asm/sun3xprom.h>
  17. #include <asm/sun3ints.h>
  18. #include <asm/setup.h>
  19. #include <asm/oplib.h>
  20. #include "time.h"
  21. volatile char *clock_va;
  22. extern volatile unsigned char *sun3_intreg;
  23. extern void sun3_get_model(char *model);
  24. void sun3_leds(unsigned int i)
  25. {
  26. }
  27. static int sun3x_get_hardware_list(char *buffer)
  28. {
  29. int len = 0;
  30. len += sprintf(buffer + len, "PROM Revision:\t%s\n",
  31. romvec->pv_monid);
  32. return len;
  33. }
  34. /*
  35. * Setup the sun3x configuration info
  36. */
  37. void __init config_sun3x(void)
  38. {
  39. sun3x_prom_init();
  40. mach_get_irq_list = show_sun3_interrupts;
  41. mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */
  42. mach_default_handler = &sun3_default_handler;
  43. mach_sched_init = sun3x_sched_init;
  44. mach_init_IRQ = sun3_init_IRQ;
  45. enable_irq = sun3_enable_irq;
  46. disable_irq = sun3_disable_irq;
  47. mach_request_irq = sun3_request_irq;
  48. mach_free_irq = sun3_free_irq;
  49. mach_process_int = sun3_process_int;
  50. mach_gettimeoffset = sun3x_gettimeoffset;
  51. mach_reset = sun3x_reboot;
  52. mach_hwclk = sun3x_hwclk;
  53. mach_get_model = sun3_get_model;
  54. mach_get_hardware_list = sun3x_get_hardware_list;
  55. sun3_intreg = (unsigned char *)SUN3X_INTREG;
  56. /* only the serial console is known to work anyway... */
  57. #if 0
  58. switch (*(unsigned char *)SUN3X_EEPROM_CONS) {
  59. case 0x10:
  60. serial_console = 1;
  61. conswitchp = NULL;
  62. break;
  63. case 0x11:
  64. serial_console = 2;
  65. conswitchp = NULL;
  66. break;
  67. default:
  68. serial_console = 0;
  69. conswitchp = &dummy_con;
  70. break;
  71. }
  72. #endif
  73. }