| 117 | } |
| 118 | |
| 119 | static void |
| 120 | cs5536_led_func(void *ptr, int onoff) |
| 121 | { |
| 122 | int bit; |
| 123 | uint16_t a; |
| 124 | |
| 125 | bit = *(int *)ptr; |
| 126 | if (bit < 0) { |
| 127 | bit = -bit; |
| 128 | onoff = !onoff; |
| 129 | } |
| 130 | |
| 131 | a = rdmsr(0x5140000c); |
| 132 | if (bit >= 16) { |
| 133 | a += 0x80; |
| 134 | bit -= 16; |
| 135 | } |
| 136 | |
| 137 | if (onoff) |
| 138 | outl(a, 1 << bit); |
| 139 | else |
| 140 | outl(a, 1 << (bit + 16)); |
| 141 | } |
| 142 | |
| 143 | static unsigned |
| 144 | geode_get_timecount(struct timecounter *tc) |
no test coverage detected