2 * linux/arch/m68knommu/platform/68VZ328/ucdimm/config.c
4 * Copyright (C) 1993 Hamish Macdonald
5 * Copyright (C) 1999 D. Jeff Dionne
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
13 #include <linux/config.h>
14 #include <linux/types.h>
15 #include <linux/kernel.h>
17 #include <linux/tty.h>
18 #include <linux/console.h>
20 #include <asm/setup.h>
21 #include <asm/system.h>
22 #include <asm/pgtable.h>
24 #include <asm/machdep.h>
25 #include <asm/MC68VZ328.h>
26 #include <asm/bootstd.h>
28 void BSP_sched_init(void (*timer_routine)(int, void *, struct pt_regs *))
30 /* Restart mode, Enable int, 32KHz, Enable timer */
31 TCTL = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_32KHZ | TCTL_TEN;
32 /* Set prescaler (Divide 32KHz by 32)*/
34 /* Set compare register 32Khz / 32 / 10 = 100 */
37 request_irq(TMR_IRQ_NUM, timer_routine, IRQ_FLG_LOCK, "timer", NULL);
46 unsigned long BSP_gettimeoffset (void)
51 void BSP_gettod (int *yearp, int *monp, int *dayp,
52 int *hourp, int *minp, int *secp)
56 int BSP_hwclk(int op, struct hwclk_time *t)
66 int BSP_set_clock_mmss (unsigned long nowtime)
69 short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60;
71 tod->second1 = real_seconds / 10;
72 tod->second2 = real_seconds % 10;
73 tod->minute1 = real_minutes / 10;
74 tod->minute2 = real_minutes % 10;
83 moveal #0x10c00000, %a0;
91 unsigned char *cs8900a_hwaddr;
94 _bsc0(char *, getserialnum)
95 _bsc1(unsigned char *, gethwaddr, int, a)
96 _bsc1(char *, getbenv, char *, a)
98 void config_BSP(char *command, int len)
102 printk(KERN_INFO "\n68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
104 printk(KERN_INFO "uCdimm serial string [%s]\n",getserialnum());
105 p = cs8900a_hwaddr = gethwaddr(0);
106 printk(KERN_INFO "uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
107 p[0], p[1], p[2], p[3], p[4], p[5]);
108 p = getbenv("APPEND");
109 if (p) strcpy(p,command);
112 mach_sched_init = BSP_sched_init;
113 mach_tick = BSP_tick;
114 mach_gettimeoffset = BSP_gettimeoffset;
115 mach_gettod = BSP_gettod;
116 mach_reset = BSP_reset;