config.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/types.h>
  15. #include <linux/kernel.h>
  16. #include <linux/mm.h>
  17. #include <linux/tty.h>
  18. #include <linux/console.h>
  19. #include <asm/setup.h>
  20. #include <asm/system.h>
  21. #include <asm/pgtable.h>
  22. #include <asm/machdep.h>
  23. #include <asm/MC68EZ328.h>
  24. #ifdef CONFIG_UCSIMM
  25. #include <asm/bootstd.h>
  26. #endif
  27. /***************************************************************************/
  28. void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct pt_regs *));
  29. void m68328_timer_tick(void);
  30. unsigned long m68328_timer_gettimeoffset(void);
  31. void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec);
  32. /***************************************************************************/
  33. void m68ez328_reset(void)
  34. {
  35. local_irq_disable();
  36. asm volatile (
  37. "moveal #0x10c00000, %a0;\n"
  38. "moveb #0, 0xFFFFF300;\n"
  39. "moveal 0(%a0), %sp;\n"
  40. "moveal 4(%a0), %a0;\n"
  41. "jmp (%a0);\n"
  42. );
  43. }
  44. /***************************************************************************/
  45. unsigned char *cs8900a_hwaddr;
  46. static int errno;
  47. #ifdef CONFIG_UCSIMM
  48. _bsc0(char *, getserialnum)
  49. _bsc1(unsigned char *, gethwaddr, int, a)
  50. _bsc1(char *, getbenv, char *, a)
  51. #endif
  52. void config_BSP(char *command, int len)
  53. {
  54. unsigned char *p;
  55. printk(KERN_INFO "\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
  56. #ifdef CONFIG_UCSIMM
  57. printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
  58. p = cs8900a_hwaddr = gethwaddr(0);
  59. printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
  60. p[0], p[1], p[2], p[3], p[4], p[5]);
  61. p = getbenv("APPEND");
  62. if (p) strcpy(p,command);
  63. else command[0] = 0;
  64. #endif
  65. mach_sched_init = m68328_timer_init;
  66. mach_tick = m68328_timer_tick;
  67. mach_gettimeoffset = m68328_timer_gettimeoffset;
  68. mach_gettod = m68328_timer_gettod;
  69. mach_hwclk = NULL;
  70. mach_set_clock_mmss = NULL;
  71. mach_reset = m68ez328_reset;
  72. }
  73. /***************************************************************************/