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 | /* |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 4 | * linux/arch/m68knommu/platform/68EZ328/config.c |
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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <stdarg.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 23 | #include <asm/setup.h> |
| 24 | #include <asm/system.h> |
| 25 | #include <asm/pgtable.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | #include <asm/machdep.h> |
| 27 | #include <asm/MC68EZ328.h> |
| 28 | #ifdef CONFIG_UCSIMM |
| 29 | #include <asm/bootstd.h> |
| 30 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 32 | /***************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 34 | void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct pt_regs *)); |
| 35 | void m68328_timer_tick(void); |
| 36 | unsigned long m68328_timer_gettimeoffset(void); |
| 37 | void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 39 | /***************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 41 | void m68ez328_reset(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | { |
| 43 | local_irq_disable(); |
Greg Ungerer | 3448ff8 | 2006-06-28 16:23:14 +1000 | [diff] [blame] | 44 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | } |
| 52 | |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 53 | /***************************************************************************/ |
| 54 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | unsigned char *cs8900a_hwaddr; |
| 56 | static 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 | |
| 64 | void 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 Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 81 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | mach_hwclk = NULL; |
| 86 | mach_set_clock_mmss = NULL; |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 87 | mach_reset = m68ez328_reset; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | } |
Greg Ungerer | 03981f2 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 89 | |
| 90 | /***************************************************************************/ |