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 AVR_PORT CONFIG_SYS_NS16550_COM2
24 /* 2005.5.10 BUFFALO add */
25 /*--------------------------------------------------------------*/
26 static inline void miconCntl_SendUart(unsigned char dat)
28 out_8((unsigned char *)AVR_PORT, dat);
32 /*--------------------------------------------------------------*/
33 void miconCntl_SendCmd(unsigned char dat)
38 miconCntl_SendUart(dat);
42 /*--------------------------------------------------------------*/
43 void miconCntl_FanLow(void)
46 miconCntl_SendCmd(0x5C);
50 /*--------------------------------------------------------------*/
51 void miconCntl_FanHigh(void)
54 miconCntl_SendCmd(0x5D);
58 /*--------------------------------------------------------------*/
60 void miconCntl_Eth1000M(int up)
64 miconCntl_SendCmd(0x93);
66 miconCntl_SendCmd(0x92);
69 miconCntl_SendCmd(0x5D);
71 miconCntl_SendCmd(0x5C);
75 /*--------------------------------------------------------------*/
77 void miconCntl_Eth100M(int up)
81 miconCntl_SendCmd(0x91);
83 miconCntl_SendCmd(0x90);
86 miconCntl_SendCmd(0x5C);
90 /*--------------------------------------------------------------*/
92 void miconCntl_Eth10M(int up)
96 miconCntl_SendCmd(0x8F);
98 miconCntl_SendCmd(0x8E);
101 miconCntl_SendCmd(0x5C);
105 /*--------------------------------------------------------------*/
107 void miconCntl_5f(void)
109 miconCntl_SendCmd(0x5F);
113 /*--------------------------------------------------------------*/
114 /* "reboot start" signal */
115 void miconCntl_Reboot(void)
117 miconCntl_SendCmd(0x43);
120 /*--------------------------------------------------------------*/
121 /* Disable watchdog timer */
122 void miconCntl_DisWDT(void)
124 miconCntl_SendCmd(0x41); /* A */
125 miconCntl_SendCmd(0x46); /* F */
126 miconCntl_SendCmd(0x4A); /* J */
127 miconCntl_SendCmd(0x3E); /* > */
128 miconCntl_SendCmd(0x56); /* V */
129 miconCntl_SendCmd(0x3E); /* > */
130 miconCntl_SendCmd(0x5A); /* Z */
131 miconCntl_SendCmd(0x56); /* V */
132 miconCntl_SendCmd(0x4B); /* K */