blob: ab36551fc969616fdb7dd7773dd4c9b14f2ffe58 [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>
Greg Ungerer1ea9acc2007-03-07 11:28:13 +100022#include <linux/interrupt.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24#include <asm/setup.h>
25#include <asm/system.h>
26#include <asm/pgtable.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#include <asm/machdep.h>
28#include <asm/MC68EZ328.h>
29#ifdef CONFIG_UCSIMM
30#include <asm/bootstd.h>
31#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
Greg Ungerer03981f22005-09-09 09:32:14 +100033/***************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
Greg Ungerer1ea9acc2007-03-07 11:28:13 +100035void m68328_timer_init(irq_handler_t timer_routine);
Greg Ungerer03981f22005-09-09 09:32:14 +100036void 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);
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
Greg Ungerer03981f22005-09-09 09:32:14 +100040/***************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
Greg Ungerer03981f22005-09-09 09:32:14 +100042void m68ez328_reset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070043{
44 local_irq_disable();
Greg Ungerer3448ff82006-06-28 16:23:14 +100045 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 );
Linus Torvalds1da177e2005-04-16 15:20:36 -070052}
53
Greg Ungerer03981f22005-09-09 09:32:14 +100054/***************************************************************************/
55
Linus Torvalds1da177e2005-04-16 15:20:36 -070056unsigned 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
Greg Ungerer03981f22005-09-09 09:32:14 +100082 mach_sched_init = m68328_timer_init;
83 mach_tick = m68328_timer_tick;
84 mach_gettimeoffset = m68328_timer_gettimeoffset;
85 mach_gettod = m68328_timer_gettod;
Linus Torvalds1da177e2005-04-16 15:20:36 -070086 mach_hwclk = NULL;
87 mach_set_clock_mmss = NULL;
Greg Ungerer03981f22005-09-09 09:32:14 +100088 mach_reset = m68ez328_reset;
Linus Torvalds1da177e2005-04-16 15:20:36 -070089}
Greg Ungerer03981f22005-09-09 09:32:14 +100090
91/***************************************************************************/