config.c 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /***************************************************************************/
  2. /*
  3. * linux/arch/m68knommu/platform/68EZ328/config.c
  4. *
  5. * Copyright (C) 1993 Hamish Macdonald
  6. * Copyright (C) 1999 D. Jeff Dionne
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file COPYING in the main directory of this archive
  10. * for more details.
  11. */
  12. /***************************************************************************/
  13. #include <stdarg.h>
  14. #include <linux/config.h>
  15. #include <linux/types.h>
  16. #include <linux/kernel.h>
  17. #include <linux/mm.h>
  18. #include <linux/tty.h>
  19. #include <linux/console.h>
  20. #include <asm/setup.h>
  21. #include <asm/system.h>
  22. #include <asm/pgtable.h>
  23. #include <asm/machdep.h>
  24. #include <asm/MC68EZ328.h>
  25. #ifdef CONFIG_UCSIMM
  26. #include <asm/bootstd.h>
  27. #endif
  28. /***************************************************************************/
  29. void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct pt_regs *));
  30. void m68328_timer_tick(void);
  31. unsigned long m68328_timer_gettimeoffset(void);
  32. void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec);
  33. /***************************************************************************/
  34. void m68ez328_reset(void)
  35. {
  36. local_irq_disable();
  37. asm volatile ("
  38. moveal #0x10c00000, %a0;
  39. moveb #0, 0xFFFFF300;
  40. moveal 0(%a0), %sp;
  41. moveal 4(%a0), %a0;
  42. jmp (%a0);
  43. ");
  44. }
  45. /***************************************************************************/
  46. unsigned char *cs8900a_hwaddr;
  47. static int errno;
  48. #ifdef CONFIG_UCSIMM
  49. _bsc0(char *, getserialnum)
  50. _bsc1(unsigned char *, gethwaddr, int, a)
  51. _bsc1(char *, getbenv, char *, a)
  52. #endif
  53. void config_BSP(char *command, int len)
  54. {
  55. unsigned char *p;
  56. printk(KERN_INFO "\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
  57. #ifdef CONFIG_UCSIMM
  58. printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
  59. p = cs8900a_hwaddr = gethwaddr(0);
  60. printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
  61. p[0], p[1], p[2], p[3], p[4], p[5]);
  62. p = getbenv("APPEND");
  63. if (p) strcpy(p,command);
  64. else command[0] = 0;
  65. #endif
  66. mach_sched_init = m68328_timer_init;
  67. mach_tick = m68328_timer_tick;
  68. mach_gettimeoffset = m68328_timer_gettimeoffset;
  69. mach_gettod = m68328_timer_gettod;
  70. mach_hwclk = NULL;
  71. mach_set_clock_mmss = NULL;
  72. mach_reset = m68ez328_reset;
  73. }
  74. /***************************************************************************/