2 * linux/arch/$(ARCH)/platform/$(PLATFORM)/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/MC68EZ328.h>
27 #include <asm/bootstd.h>
30 #include "PalmV/romfs.h"
33 void BSP_sched_init(void (*timer_routine
)(int, void *, struct pt_regs
*))
35 /* Restart mode, Enable int, 32KHz, Enable timer */
36 TCTL
= TCTL_OM
| TCTL_IRQEN
| TCTL_CLKSOURCE_32KHZ
| TCTL_TEN
;
37 /* Set prescaler (Divide 32KHz by 32)*/
39 /* Set compare register 32Khz / 32 / 10 = 100 */
42 request_irq(TMR_IRQ_NUM
, timer_routine
, IRQ_FLG_LOCK
, "timer", NULL
);
51 unsigned long BSP_gettimeoffset (void)
56 void BSP_gettod (int *yearp
, int *monp
, int *dayp
,
57 int *hourp
, int *minp
, int *secp
)
61 int BSP_hwclk(int op
, struct hwclk_time
*t
)
71 int BSP_set_clock_mmss (unsigned long nowtime
)
74 short real_seconds
= nowtime
% 60, real_minutes
= (nowtime
/ 60) % 60;
76 tod
->second1
= real_seconds
/ 10;
77 tod
->second2
= real_seconds
% 10;
78 tod
->minute1
= real_minutes
/ 10;
79 tod
->minute2
= real_minutes
% 10;
88 moveal #0x10c00000, %a0;
96 unsigned char *cs8900a_hwaddr
;
100 _bsc0(char *, getserialnum
)
101 _bsc1(unsigned char *, gethwaddr
, int, a
)
102 _bsc1(char *, getbenv
, char *, a
)
105 void config_BSP(char *command
, int len
)
109 printk(KERN_INFO
"\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
112 printk(KERN_INFO
"uCsimm serial string [%s]\n",getserialnum());
113 p
= cs8900a_hwaddr
= gethwaddr(0);
114 printk(KERN_INFO
"uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
115 p
[0], p
[1], p
[2], p
[3], p
[4], p
[5]);
117 p
= getbenv("APPEND");
118 if (p
) strcpy(p
,command
);
122 mach_sched_init
= BSP_sched_init
;
123 mach_tick
= BSP_tick
;
124 mach_gettimeoffset
= BSP_gettimeoffset
;
125 mach_gettod
= BSP_gettod
;
127 mach_set_clock_mmss
= NULL
;
128 mach_reset
= BSP_reset
;