config.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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/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 void sun3_get_model(char *model);
  23. void sun3_leds(unsigned int i)
  24. {
  25. }
  26. static void sun3x_get_hardware_list(struct seq_file *m)
  27. {
  28. seq_printf(m, "PROM Revision:\t%s\n", romvec->pv_monid);
  29. }
  30. /*
  31. * Setup the sun3x configuration info
  32. */
  33. void __init config_sun3x(void)
  34. {
  35. sun3x_prom_init();
  36. mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */
  37. mach_sched_init = sun3x_sched_init;
  38. mach_init_IRQ = sun3_init_IRQ;
  39. mach_gettimeoffset = sun3x_gettimeoffset;
  40. mach_reset = sun3x_reboot;
  41. mach_hwclk = sun3x_hwclk;
  42. mach_get_model = sun3_get_model;
  43. mach_get_hardware_list = sun3x_get_hardware_list;
  44. sun3_intreg = (unsigned char *)SUN3X_INTREG;
  45. /* only the serial console is known to work anyway... */
  46. #if 0
  47. switch (*(unsigned char *)SUN3X_EEPROM_CONS) {
  48. case 0x10:
  49. serial_console = 1;
  50. conswitchp = NULL;
  51. break;
  52. case 0x11:
  53. serial_console = 2;
  54. conswitchp = NULL;
  55. break;
  56. default:
  57. serial_console = 0;
  58. conswitchp = &dummy_con;
  59. break;
  60. }
  61. #endif
  62. }