Author: stepan Date: Fri Jul 2 16:42:04 2010 New Revision: 100 URL: http://www.serialice.com/trac/serialice/changeset/100
Log: Add pci_read functions, since Tyan s2895 serial init code uses them. Signed-off-by: Myles Watson mylesgw@gmail.com Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/SerialICE/chipset.c
Modified: trunk/SerialICE/chipset.c ============================================================================== --- trunk/SerialICE/chipset.c Fri Jul 2 16:39:51 2010 (r99) +++ trunk/SerialICE/chipset.c Fri Jul 2 16:42:04 2010 (r100) @@ -40,6 +40,24 @@ outl(value, 0xcfc); }
+static u8 pci_read_config8(u32 addr) +{ + outl(addr & ~3, 0xcf8); + inb(0xcfc + (addr & 3)); +} + +static u16 pci_read_config16(u32 addr) +{ + outl(addr & ~3, 0xcf8); + inw(0xcfc + (addr & 2)); +} + +static u32 pci_read_config32(u32 addr) +{ + outl(addr & ~3, 0xcf8); + inl(0xcfc); +} + /* PnP / SuperIO access functions */
static inline void pnp_write_register(u16 port, u8 reg, u8 value)