]> xenbits.xensource.com Git - seabios.git/commitdiff
Remove pci_writel() and pci_readl() functions.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 31 Dec 2013 03:15:47 +0000 (22:15 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 29 Jan 2014 17:57:01 +0000 (12:57 -0500)
These functions are no longer used.  Going forward it's better to move
a driver to full 32bit mode then to use these functions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/pci.c
src/hw/pci.h

index 6c9aa81a7f7546fde3b5fb25226c1d078dd61bd4..caf9265fcdbe622debf39591249a3818302427b7 100644 (file)
@@ -234,49 +234,3 @@ pci_reboot(void)
     outb(v|6, PORT_PCI_REBOOT); /* Actually do the reset */
     udelay(50);
 }
-
-// helper functions to access pci mmio bars from real mode
-
-u32 VISIBLE32FLAT
-pci_readl_32(u32 addr)
-{
-    dprintf(9, "32: pci read : %x\n", addr);
-    return readl((void*)addr);
-}
-
-u32 pci_readl(u32 addr)
-{
-    if (MODESEGMENT) {
-        dprintf(9, "16: pci read : %x\n", addr);
-        extern void _cfunc32flat_pci_readl_32(u32 addr);
-        return call32(_cfunc32flat_pci_readl_32, addr, -1);
-    } else {
-        return pci_readl_32(addr);
-    }
-}
-
-struct reg32 {
-    u32 addr;
-    u32 data;
-};
-
-void VISIBLE32FLAT
-pci_writel_32(struct reg32 *reg32)
-{
-    dprintf(9, "32: pci write: %x, %x (%p)\n", reg32->addr, reg32->data, reg32);
-    writel((void*)(reg32->addr), reg32->data);
-}
-
-void pci_writel(u32 addr, u32 val)
-{
-    struct reg32 reg32 = { .addr = addr, .data = val };
-    if (MODESEGMENT) {
-        dprintf(9, "16: pci write: %x, %x (%x:%p)\n",
-                reg32.addr, reg32.data, GET_SEG(SS), &reg32);
-        void *flatptr = MAKE_FLATPTR(GET_SEG(SS), &reg32);
-        extern void _cfunc32flat_pci_writel_32(struct reg32 *reg32);
-        call32(_cfunc32flat_pci_writel_32, (u32)flatptr, -1);
-    } else {
-        pci_writel_32(&reg32);
-    }
-}
index 9c7351d47c07c38eb758ae89b29339106df8b0a9..167a027eae75bf265a88c44228ad162f76a716cb 100644 (file)
@@ -118,8 +118,4 @@ struct pci_device *pci_find_init_device(const struct pci_device_id *ids
                                         , void *arg);
 void pci_reboot(void);
 
-// helper functions to access pci mmio bars from real mode
-u32 pci_readl(u32 addr);
-void pci_writel(u32 addr, u32 val);
-
 #endif