blob: 659b80aca118c2734664b0972f5d9016aefc4ef7 [file] [log] [blame]
Greg Ungerer03981f22005-09-09 09:32:14 +10001/***************************************************************************/
2
Linus Torvalds1da177e2005-04-16 15:20:36 -07003/*
Greg Ungerer03981f22005-09-09 09:32:14 +10004 * linux/arch/m68knommu/platform/68EZ328/config.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
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
Greg Ungerer03981f22005-09-09 09:32:14 +100014/***************************************************************************/
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#include <stdarg.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#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
23#include <asm/setup.h>
24#include <asm/system.h>
25#include <asm/pgtable.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#include <asm/machdep.h>
27#include <asm/MC68EZ328.h>
28#ifdef CONFIG_UCSIMM
29#include <asm/bootstd.h>
30#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Greg Ungerer03981f22005-09-09 09:32:14 +100032/***************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
Greg Ungerer03981f22005-09-09 09:32:14 +100034void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct pt_regs *));
35void m68328_timer_tick(void);
36unsigned long m68328_timer_gettimeoffset(void);
37void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Greg Ungerer03981f22005-09-09 09:32:14 +100039/***************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -070040
Greg Ungerer03981f22005-09-09 09:32:14 +100041void m68ez328_reset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070042{
43 local_irq_disable();
Greg Ungerer3448ff82006-06-28 16:23:14 +100044 asm volatile (
45 "moveal #0x10c00000, %a0;\n"
46 "moveb #0, 0xFFFFF300;\n"
47 "moveal 0(%a0), %sp;\n"
48 "moveal 4(%a0), %a0;\n"
49 "jmp (%a0);\n"
50 );
Linus Torvalds1da177e2005-04-16 15:20:36 -070051}
52
Greg Ungerer03981f22005-09-09 09:32:14 +100053/***************************************************************************/
54
Linus Torvalds1da177e2005-04-16 15:20:36 -070055unsigned char *cs8900a_hwaddr;
56static int errno;
57
58#ifdef CONFIG_UCSIMM
59_bsc0(char *, getserialnum)
60_bsc1(unsigned char *, gethwaddr, int, a)
61_bsc1(char *, getbenv, char *, a)
62#endif
63
64void config_BSP(char *command, int len)
65{
66 unsigned char *p;
67
68 printk(KERN_INFO "\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
69
70#ifdef CONFIG_UCSIMM
71 printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
72 p = cs8900a_hwaddr = gethwaddr(0);
73 printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
74 p[0], p[1], p[2], p[3], p[4], p[5]);
75
76 p = getbenv("APPEND");
77 if (p) strcpy(p,command);
78 else command[0] = 0;
79#endif
80
Greg Ungerer03981f22005-09-09 09:32:14 +100081 mach_sched_init = m68328_timer_init;
82 mach_tick = m68328_timer_tick;
83 mach_gettimeoffset = m68328_timer_gettimeoffset;
84 mach_gettod = m68328_timer_gettod;
Linus Torvalds1da177e2005-04-16 15:20:36 -070085 mach_hwclk = NULL;
86 mach_set_clock_mmss = NULL;
Greg Ungerer03981f22005-09-09 09:32:14 +100087 mach_reset = m68ez328_reset;
Linus Torvalds1da177e2005-04-16 15:20:36 -070088}
Greg Ungerer03981f22005-09-09 09:32:14 +100089
90/***************************************************************************/