4 * LinkStation HW Control Driver
6 * Copyright (C) 2001-2004 BUFFALO INC.
8 * This software may be used and distributed according to the terms of
9 * the GNU General Public License (GPL), incorporated herein by reference.
10 * Drivers based on or derived from this code fall under the GPL and must
11 * retain the authorship, copyright and license notice. This file is not
12 * a complete program and may only be used when the entire operating
13 * system is licensed under the GPL.
22 #define mdelay(n) udelay((n)*1000)
24 #define AVR_PORT CONFIG_SYS_NS16550_COM2
26 /* 2005.5.10 BUFFALO add */
27 /*--------------------------------------------------------------*/
28 static inline void miconCntl_SendUart(unsigned char dat)
30 out_8((unsigned char *)AVR_PORT, dat);
34 /*--------------------------------------------------------------*/
35 void miconCntl_SendCmd(unsigned char dat)
40 miconCntl_SendUart(dat);
44 /*--------------------------------------------------------------*/
45 void miconCntl_FanLow(void)
48 miconCntl_SendCmd(0x5C);
52 /*--------------------------------------------------------------*/
53 void miconCntl_FanHigh(void)
56 miconCntl_SendCmd(0x5D);
60 /*--------------------------------------------------------------*/
62 void miconCntl_Eth1000M(int up)
66 miconCntl_SendCmd(0x93);
68 miconCntl_SendCmd(0x92);
71 miconCntl_SendCmd(0x5D);
73 miconCntl_SendCmd(0x5C);
77 /*--------------------------------------------------------------*/
79 void miconCntl_Eth100M(int up)
83 miconCntl_SendCmd(0x91);
85 miconCntl_SendCmd(0x90);
88 miconCntl_SendCmd(0x5C);
92 /*--------------------------------------------------------------*/
94 void miconCntl_Eth10M(int up)
98 miconCntl_SendCmd(0x8F);
100 miconCntl_SendCmd(0x8E);
103 miconCntl_SendCmd(0x5C);
107 /*--------------------------------------------------------------*/
109 void miconCntl_5f(void)
111 miconCntl_SendCmd(0x5F);
115 /*--------------------------------------------------------------*/
116 /* "reboot start" signal */
117 void miconCntl_Reboot(void)
119 miconCntl_SendCmd(0x43);
122 /*--------------------------------------------------------------*/
123 /* Disable watchdog timer */
124 void miconCntl_DisWDT(void)
126 miconCntl_SendCmd(0x41); /* A */
127 miconCntl_SendCmd(0x46); /* F */
128 miconCntl_SendCmd(0x4A); /* J */
129 miconCntl_SendCmd(0x3E); /* > */
130 miconCntl_SendCmd(0x56); /* V */
131 miconCntl_SendCmd(0x3E); /* > */
132 miconCntl_SendCmd(0x5A); /* Z */
133 miconCntl_SendCmd(0x56); /* V */
134 miconCntl_SendCmd(0x4B); /* K */