diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-07-07 17:51:41 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-07-07 17:51:41 +0000 |
commit | 42da0e6da6edd2dfe7fd752719ec5d2c94d5e055 (patch) | |
tree | 8c9cdb9f74a41441317b7f65f5e13d02cf38f9f9 /src/northbridge/via | |
parent | e32d3991d04e896bcb9fd8315bab68d54146e017 (diff) |
fix some warnings.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5657 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/via')
-rw-r--r-- | src/northbridge/via/vx800/pci_rawops.h | 24 | ||||
-rw-r--r-- | src/northbridge/via/vx800/vx800.h | 11 | ||||
-rw-r--r-- | src/northbridge/via/vx800/vx800_early_serial.c | 8 | ||||
-rw-r--r-- | src/northbridge/via/vx800/vx800_early_smbus.c | 10 |
4 files changed, 16 insertions, 37 deletions
diff --git a/src/northbridge/via/vx800/pci_rawops.h b/src/northbridge/via/vx800/pci_rawops.h index 4894f22b2b..89d7eb2bdd 100644 --- a/src/northbridge/via/vx800/pci_rawops.h +++ b/src/northbridge/via/vx800/pci_rawops.h @@ -43,30 +43,6 @@ static void pci_modify_config8(device_t dev, unsigned where, u8 orval, u8 mask) pci_write_config8(dev, where, data); } -static void pci_modify_config16(device_t dev, unsigned where, u16 orval, u16 mask) -{ - u16 data = pci_read_config16(dev, where); - data &= (~mask); - data |= orval; - pci_write_config16(dev, where, data); -} - -static void pci_modify_config32(device_t dev, unsigned where, u32 orval, u32 mask) -{ - u32 data = pci_read_config32(dev, where); - data &= (~mask); - data |= orval; - pci_write_config32(dev, where, data); -} - -static void io_modify_config8(u16 where, u8 orval, u8 mask) -{ - u8 data = inb(where); - data &= (~mask); - data |= orval; - outb(data, where); -} - static void via_pci_inittable(u8 chipversion, const struct VIA_PCI_REG_INIT_TABLE *initdata) { diff --git a/src/northbridge/via/vx800/vx800.h b/src/northbridge/via/vx800/vx800.h index 1640de48fc..5606d236da 100644 --- a/src/northbridge/via/vx800/vx800.h +++ b/src/northbridge/via/vx800/vx800.h @@ -26,6 +26,17 @@ static inline void vx800_noop(device_t dev) { } #endif + +#ifdef __PRE_RAM__ +/* vx800_early_smbus.c */ +struct mem_controller; +void enable_smbus(void); +void smbus_fixup(const struct mem_controller *mem_ctrl); + +/* vx800_early_serial.c */ +void enable_vx800_serial(void); +#endif + //#define REV_B0 0x10 #define REV_B1 0x11 //#define REV_B2 0x12 diff --git a/src/northbridge/via/vx800/vx800_early_serial.c b/src/northbridge/via/vx800/vx800_early_serial.c index 8bac43ff12..f46341ff15 100644 --- a/src/northbridge/via/vx800/vx800_early_serial.c +++ b/src/northbridge/via/vx800/vx800_early_serial.c @@ -27,12 +27,6 @@ #define SIO_BASE 0x3f0 #define SIO_DATA SIO_BASE+1 -static void vx800_writesuper(uint8_t reg, uint8_t val) -{ - outb(reg, SIO_BASE); - outb(val, SIO_DATA); -} - static void vx800_writepnpaddr(uint8_t val) { outb(val, 0x2e); @@ -59,7 +53,7 @@ static void vx800_writesioword(uint16_t reg, uint16_t val) mainboard */ -static void enable_vx800_serial(void) +void enable_vx800_serial(void) { outb(6, 0x80); outb(0x03, 0x22); diff --git a/src/northbridge/via/vx800/vx800_early_smbus.c b/src/northbridge/via/vx800/vx800_early_smbus.c index e40d54d721..b8a3ef772e 100644 --- a/src/northbridge/via/vx800/vx800_early_smbus.c +++ b/src/northbridge/via/vx800/vx800_early_smbus.c @@ -19,6 +19,7 @@ #include <device/pci_ids.h> #include "vx800.h" + #define SMBUS_IO_BASE 0x0500 //from award bios #define PMIO_BASE VX800_ACPI_IO_BASE //might as well set this while we're here @@ -137,14 +138,11 @@ static unsigned int get_spd_data(unsigned int dimm, unsigned int offset) return val; } -static void enable_smbus(void) +void enable_smbus(void) { device_t dev; - dev = - pci_locate_device(PCI_ID - (PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VX855_LPC), - 0); + dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VX855_LPC), 0); if (dev == PCI_DEV_INVALID) { /* This won't display text if enable_smbus() is before serial init */ @@ -183,7 +181,7 @@ static void enable_smbus(void) * * @param mem_ctrl The memory controller and SMBus addresses. */ -static void smbus_fixup(const struct mem_controller *mem_ctrl) +void smbus_fixup(const struct mem_controller *mem_ctrl) { int i, ram_slots, current_slot = 0; u8 result = 0; |