Lines 128-133
Link Here
|
128 |
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
128 |
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
129 |
* |
129 |
* |
130 |
* END_NSC_LIC_GPL */ |
130 |
* END_NSC_LIC_GPL */ |
|
|
131 |
#include <sys/io.h> |
131 |
|
132 |
|
132 |
unsigned char gfx_gxm_config_read(unsigned char index); |
133 |
unsigned char gfx_gxm_config_read(unsigned char index); |
133 |
unsigned long gu1_get_core_freq(void); |
134 |
unsigned long gu1_get_core_freq(void); |
Lines 149-166
Link Here
|
149 |
unsigned char |
150 |
unsigned char |
150 |
gfx_gxm_config_read(unsigned char index) |
151 |
gfx_gxm_config_read(unsigned char index) |
151 |
{ |
152 |
{ |
152 |
unsigned char value = 0xFF; |
153 |
unsigned char value = 0xFF; |
153 |
unsigned char lock; |
154 |
unsigned char lock; |
154 |
|
155 |
|
155 |
OUTB(0x22, GXM_CONFIG_CCR3); |
156 |
/* OUTB(0x22, GXM_CONFIG_CCR3); |
156 |
lock = INB(0x23); |
157 |
lock = INB(0x23); |
157 |
OUTB(0x22, GXM_CONFIG_CCR3); |
158 |
OUTB(0x22, GXM_CONFIG_CCR3); |
158 |
OUTB(0x23, (unsigned char)(lock | 0x10)); |
159 |
OUTB(0x23, (unsigned char)(lock | 0x10)); |
159 |
OUTB(0x22, index); |
160 |
OUTB(0x22, index); |
160 |
value = INB(0x23); |
161 |
value = INB(0x23); |
161 |
OUTB(0x22, GXM_CONFIG_CCR3); |
162 |
OUTB(0x22, GXM_CONFIG_CCR3); |
162 |
OUTB(0x23, lock); |
163 |
OUTB(0x23, lock); */ |
163 |
return (value); |
164 |
|
|
|
165 |
outb(GXM_CONFIG_CCR3,0x22); |
166 |
lock = inb(0x23); |
167 |
outb(GXM_CONFIG_CCR3,0x22); |
168 |
outb( (unsigned char)(lock | 0x10),0x23); |
169 |
outb( index,0x22); |
170 |
value = inb(0x23); |
171 |
outb(GXM_CONFIG_CCR3,0x22); |
172 |
outb( lock,0x23); |
173 |
return (value); |
164 |
} |
174 |
} |
165 |
|
175 |
|
166 |
/*----------------------------------------------------------------------------- |
176 |
/*----------------------------------------------------------------------------- |