config.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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/types.h>
  9. #include <linux/mm.h>
  10. #include <linux/seq_file.h>
  11. #include <linux/console.h>
  12. #include <linux/init.h>
  13. #include <asm/machdep.h>
  14. #include <asm/irq.h>
  15. #include <asm/sun3xprom.h>
  16. #include <asm/sun3ints.h>
  17. #include <asm/setup.h>
  18. #include <asm/oplib.h>
  19. #include "time.h"
  20. volatile char *clock_va;
  21. extern void sun3_get_model(char *model);
  22. void sun3_leds(unsigned int i)
  23. {
  24. }
  25. static void sun3x_get_hardware_list(struct seq_file *m)
  26. {
  27. seq_printf(m, "PROM Revision:\t%s\n", romvec->pv_monid);
  28. }
  29. /*
  30. * Setup the sun3x configuration info
  31. */
  32. void __init config_sun3x(void)
  33. {
  34. sun3x_prom_init();
  35. mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */
  36. mach_sched_init = sun3x_sched_init;
  37. mach_init_IRQ = sun3_init_IRQ;
  38. arch_gettimeoffset = sun3x_gettimeoffset;
  39. mach_reset = sun3x_reboot;
  40. mach_hwclk = sun3x_hwclk;
  41. mach_get_model = sun3_get_model;
  42. mach_get_hardware_list = sun3x_get_hardware_list;
  43. sun3_intreg = (unsigned char *)SUN3X_INTREG;
  44. /* only the serial console is known to work anyway... */
  45. #if 0
  46. switch (*(unsigned char *)SUN3X_EEPROM_CONS) {
  47. case 0x10:
  48. serial_console = 1;
  49. conswitchp = NULL;
  50. break;
  51. case 0x11:
  52. serial_console = 2;
  53. conswitchp = NULL;
  54. break;
  55. default:
  56. serial_console = 0;
  57. conswitchp = &dummy_con;
  58. break;
  59. }
  60. #endif
  61. }