config.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. arch_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. }