On 2/24/07, Peter Stuge stuge-linuxbios@cdy.org wrote:
On Sat, Feb 10, 2007 at 01:39:37AM +0100, Uwe Hermann wrote:
Improve ITE IT8716F support.
@@ -35,55 +38,34 @@
#define IT8716F_CONFIGURATION_PORT 0x2e /* Write-only. */
-/* The content of IT8716F_CONFIG_REG_LDN (index 0x07) must be set to the
- LDN the register belongs to, before you can access the register. */
-static void it8716f_sio_write(uint8_t ldn, uint8_t index, uint8_t value) +/* Perform MB PnP setup to put the SIO chip at 0x2e. */ +/* Base address 0x2e: 0x87 0x01 0x55 0x55. */ +/* Base address 0x4e: 0x87 0x01 0x55 0xaa. */ +static inline void pnp_enter_ext_func_mode(device_t dev) {
outb(IT8716F_CONFIG_REG_LDN, SIO_BASE);
outb(ldn, SIO_DATA);
outb(index, SIO_BASE);
outb(value, SIO_DATA);
unsigned port = dev >> 8;
How does this work? device_t is a pointer to a struct elsewhere:
early stuff that is compiled with romcc has this device_t typedef'ed to a scalar.
gcc-compiled has it typedef'ed to a struct *.
This usage will not continue in V3, since all code will be gcc-compiled.
thanks
ron