Go to the documentation of this file.
6 #include <linux/string.h>
7 #include <linux/kernel.h>
8 #include <linux/sched.h>
12 #include <asm/oplib.h>
15 #define MACIO_SCSI_CSR_ADDR 0x78400000
16 #define MACIO_EN_DMA 0x00000200
17 #define CLOCK_INIT_DONE 1
20 static volatile unsigned char *clk_ctrl;
23 static inline unsigned int ldphys(
unsigned int addr)
27 __asm__ __volatile__(
"\n\tlda [%1] %2, %0\n\t" :
35 __asm__ __volatile__(
"mov 0x6c, %%g1\n\t"
38 "stb %%g1, [%0+3]\n\t"
39 "stb %%g2, [%0+3]\n\t"
40 "stb %%g3, [%0+3]\n\t" : :
45 static void clk_slow(
void)
47 __asm__ __volatile__(
"mov 0xcc, %%g2\n\t"
51 "stb %%g2, [%0+3]\n\t"
52 "stb %%g3, [%0+3]\n\t"
53 "stb %%g4, [%0+3]\n\t"
54 "stb %%g5, [%0+3]\n\t" : :
56 "g2",
"g3",
"g4",
"g5");
62 static void tsu_clockstop(
void)
76 if (!(clk_ctrl[2] & 1))
94 static void swift_clockstop(
void)
107 if (
strncmp(name,
"Tadpole", 7))
115 printk(
"Clock Stopping h/w detected... ");
116 clk_ctrl = (
char *)
prom_getint(clk_nd,
"address");
118 if (name[10] ==
'\0') {
121 }
else if ((name[10] ==
'X') || (name[10] ==
'G')) {
123 printk(
"enabled (%s)\n",name+7);
125 printk(
"disabled %s\n",name+7);