config.c 2.0 KB

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