comparison vordog.c @ 13:e4e6727f530f tip

To work with bootstrap code's configuration on the timer
author Thinker K.F. Li <thinker@branda.to>
date Wed, 09 Jul 2008 13:05:43 +0800
parents 6bfd60bcd7b8
children
comparison
equal deleted inserted replaced
12:6bfd60bcd7b8 13:e4e6727f530f
260 } 260 }
261 261
262 static int vordog_probe(device_t dev) { 262 static int vordog_probe(device_t dev) {
263 int b; 263 int b;
264 264
265 disable_timer(); /* To work with bootstrap code
266 * that may configure the timer. */
267
268 outb(VD_INITVAL, 0xaa);
265 b = inb(VD_INITVAL); 269 b = inb(VD_INITVAL);
266 if(b != 0) 270 if(b != 0xaa)
267 return EINVAL; 271 return EINVAL;
268 b = inb(VD_CTR); 272 b = inb(VD_CTR);
269 if(b != 0) 273 if(b != 0)
270 return EINVAL; 274 return EINVAL;
271 b = inb(VD_STATUS); 275 b = inb(VD_STATUS);