blob: 21952906e9e218b1be13abec33429e0f2d4c8752 [file] [log] [blame]
Greg Ungerer03981f22005-09-09 09:32:14 +10001/***************************************************************************/
2
Linus Torvalds1da177e2005-04-16 15:20:36 -07003/*
Luis Alves99e08372012-12-04 23:04:49 +00004 * m68EZ328.c - 68EZ328 specific config
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
Geert Uytterhoevendf592eb2013-06-30 11:58:40 +020016#include <linux/init.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <linux/types.h>
18#include <linux/kernel.h>
Greg Ungerer95177462012-01-23 13:25:56 +100019#include <linux/rtc.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/pgtable.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <asm/machdep.h>
22#include <asm/MC68EZ328.h>
23#ifdef CONFIG_UCSIMM
24#include <asm/bootstd.h>
25#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Greg Ungerer03981f22005-09-09 09:32:14 +100027/***************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Greg Ungerer95177462012-01-23 13:25:56 +100029int m68328_hwclk(int set, struct rtc_time *t);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Greg Ungerer03981f22005-09-09 09:32:14 +100031/***************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
Greg Ungerer03981f22005-09-09 09:32:14 +100033void m68ez328_reset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070034{
35 local_irq_disable();
Greg Ungerer3448ff82006-06-28 16:23:14 +100036 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 );
Linus Torvalds1da177e2005-04-16 15:20:36 -070043}
44
Greg Ungerer03981f22005-09-09 09:32:14 +100045/***************************************************************************/
46
Linus Torvalds1da177e2005-04-16 15:20:36 -070047unsigned char *cs8900a_hwaddr;
48static int errno;
49
50#ifdef CONFIG_UCSIMM
51_bsc0(char *, getserialnum)
52_bsc1(unsigned char *, gethwaddr, int, a)
53_bsc1(char *, getbenv, char *, a)
54#endif
55
Geert Uytterhoevendf592eb2013-06-30 11:58:40 +020056void __init config_BSP(char *command, int len)
Linus Torvalds1da177e2005-04-16 15:20:36 -070057{
58 unsigned char *p;
59
60 printk(KERN_INFO "\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
61
62#ifdef CONFIG_UCSIMM
63 printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
64 p = cs8900a_hwaddr = gethwaddr(0);
65 printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
66 p[0], p[1], p[2], p[3], p[4], p[5]);
67
68 p = getbenv("APPEND");
69 if (p) strcpy(p,command);
70 else command[0] = 0;
71#endif
Daniel Palmer0b175512014-04-02 23:43:12 +090072
73 mach_sched_init = hw_timer_init;
Greg Ungerer95177462012-01-23 13:25:56 +100074 mach_hwclk = m68328_hwclk;
Greg Ungererf1353702007-10-24 12:03:28 +100075 mach_reset = m68ez328_reset;
Linus Torvalds1da177e2005-04-16 15:20:36 -070076}
Greg Ungerer03981f22005-09-09 09:32:14 +100077
78/***************************************************************************/