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