config.c 1.6 KB

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