config.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Setup kernel for a Sun3x machine
  4. *
  5. * (C) 1999 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
  6. *
  7. * based on code from Oliver Jowett <oliver@jowett.manawatu.gen.nz>
  8. */
  9. #include <linux/types.h>
  10. #include <linux/mm.h>
  11. #include <linux/seq_file.h>
  12. #include <linux/console.h>
  13. #include <linux/init.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_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. break;
  58. }
  59. #endif
  60. }