1: /* 2: * Copyright (c) 1986 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)clock.c 1.1 (2.10BSD Berkeley) 12/1/86 7: */ 8: 9: #include "param.h" 10: #include "clock.h" 11: 12: clkstart() 13: { 14: register u_short *lks; 15: 16: lks = LKS; 17: if (fioword((caddr_t)lks) == -1) { 18: lks = KW11P_CCSR; 19: if (fioword((caddr_t)lks) == -1) { 20: printf("no clock!!"); 21: return; 22: } 23: *KW11P_CCNT = 0; 24: *KW11P_CCSB = 1; 25: *lks = K_IENB | K_LFRATE | K_MODE | K_RUN; 26: } 27: else 28: *lks = K_IENB; 29: } 30: 31: #if defined(PROFILE) && !defined(ENABLE34) 32: /* 33: * Profiling expects to have a KW11-P in addition to the 34: * line-frequency clock, and it should enter at BR7. 35: */ 36: isprof() 37: { 38: if (fioword((caddr_t)KW11P_CCSR) == -1) 39: panic("no profile clock"); 40: *KW11P_CCSB = 100; /* count set = 100 */ 41: *KW11P_CCSR = K_IENB | K_10KRATE | K_MODE | K_RUN; 42: } 43: #endif