10 #include <linux/module.h>
12 #include <linux/string.h>
13 #include <linux/kernel.h>
16 #include <asm/bootinfo.h>
17 #include <asm/machdep.h>
63 static char hp300_model_name[13] =
"HP9000/";
66 #ifdef CONFIG_SERIAL_8250_CONSOLE
67 extern int hp300_setup_serial_console(
void)
__init;
73 const unsigned long *
data = record->
data;
75 switch (record->
tag) {
95 #ifdef CONFIG_HEARTBEAT
96 static void hp300_pulse(
int x)
99 blinken_leds(0x10, 0);
101 blinken_leds(0, 0x10);
105 static void hp300_get_model(
char *model)
107 strcpy(model, hp300_model_name);
110 #define RTCBASE 0xf0420000
114 #define RTC_BUSY 0x02
115 #define RTC_DATA_RDY 0x01
117 #define rtc_busy() (in_8(RTCBASE + RTC_CMD) & RTC_BUSY)
118 #define rtc_data_available() (in_8(RTCBASE + RTC_CMD) & RTC_DATA_RDY)
119 #define rtc_status() (in_8(RTCBASE + RTC_CMD))
120 #define rtc_command(x) out_8(RTCBASE + RTC_CMD, (x))
121 #define rtc_read_data() (in_8(RTCBASE + RTC_DATA))
122 #define rtc_write_data(x) out_8(RTCBASE + RTC_DATA, (x))
124 #define RTC_SETREG 0xe0
125 #define RTC_WRITEREG 0xc2
126 #define RTC_READREG 0xc3
128 #define RTC_REG_SEC2 0
129 #define RTC_REG_SEC1 1
130 #define RTC_REG_MIN2 2
131 #define RTC_REG_MIN1 3
132 #define RTC_REG_HOUR2 4
133 #define RTC_REG_HOUR1 5
134 #define RTC_REG_WDAY 6
135 #define RTC_REG_DAY2 7
136 #define RTC_REG_DAY1 8
137 #define RTC_REG_MON2 9
138 #define RTC_REG_MON1 10
139 #define RTC_REG_YEAR2 11
140 #define RTC_REG_YEAR1 12
142 #define RTC_HOUR1_24HMODE 0x8
144 #define RTC_STAT_MASK 0xf0
145 #define RTC_STAT_RDY 0x40
147 static inline unsigned char hp300_rtc_read(
unsigned char reg)
149 unsigned char s,
ret;
172 static inline unsigned char hp300_rtc_write(
unsigned char reg,
175 unsigned char s,
ret;
239 static unsigned int hp300_get_ss(
void)
245 static void __init hp300_init_IRQ(
void)
258 #ifdef CONFIG_HEARTBEAT
268 panic(
"Unknown HP9000 Model");
270 #ifdef CONFIG_SERIAL_8250_CONSOLE
271 hp300_setup_serial_console();