Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 1 | /***************************************************************************/ |
| 2 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | /* |
Luis Alves | 99e0837 | 2012-12-04 23:04:49 +0000 | [diff] [blame] | 4 | * m68EZ328.c - 68EZ328 specific config |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 14 | /***************************************************************************/ |
| 15 | |
Geert Uytterhoeven | df592eb | 2013-06-30 11:58:40 +0200 | [diff] [blame] | 16 | #include <linux/init.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #include <linux/types.h> |
| 18 | #include <linux/kernel.h> |
Greg Ungerer | 9517746 | 2012-01-23 13:25:56 +1000 | [diff] [blame] | 19 | #include <linux/rtc.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | #include <asm/pgtable.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include <asm/machdep.h> |
| 22 | #include <asm/MC68EZ328.h> |
| 23 | #ifdef CONFIG_UCSIMM |
| 24 | #include <asm/bootstd.h> |
| 25 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 27 | /***************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
Greg Ungerer | 9517746 | 2012-01-23 13:25:56 +1000 | [diff] [blame] | 29 | int m68328_hwclk(int set, struct rtc_time *t); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 31 | /***************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 33 | void m68ez328_reset(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | { |
| 35 | local_irq_disable(); |
Greg Ungerer | 3448ff8 | 2006-06-28 16:23:14 +1000 | [diff] [blame] | 36 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | } |
| 44 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 45 | /***************************************************************************/ |
| 46 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | unsigned char *cs8900a_hwaddr; |
| 48 | static 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 Uytterhoeven | df592eb | 2013-06-30 11:58:40 +0200 | [diff] [blame] | 56 | void __init config_BSP(char *command, int len) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | { |
| 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 Palmer | 0b17551 | 2014-04-02 23:43:12 +0900 | [diff] [blame] | 72 | |
| 73 | mach_sched_init = hw_timer_init; |
Greg Ungerer | 9517746 | 2012-01-23 13:25:56 +1000 | [diff] [blame] | 74 | mach_hwclk = m68328_hwclk; |
Greg Ungerer | f135370 | 2007-10-24 12:03:28 +1000 | [diff] [blame] | 75 | mach_reset = m68ez328_reset; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | } |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 77 | |
| 78 | /***************************************************************************/ |