-
-/**
- * pdc_pat_io_pci_cfg_read - Read PCI configuration space.
- * @pci_addr: PCI configuration space address for which the read request is being made.
- * @pci_size: Size of read in bytes. Valid values are 1, 2, and 4.
- * @mem_addr: Pointer to return memory buffer.
- *
- */
-int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr)
-{
- int retval;
- spin_lock_irq(&pdc_lock);
- retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_READ,
- __pa(pdc_result), pci_addr, pci_size);
- switch(pci_size) {
- case 1: *(u8 *) mem_addr = (u8) pdc_result[0];
- case 2: *(u16 *)mem_addr = (u16) pdc_result[0];
- case 4: *(u32 *)mem_addr = (u32) pdc_result[0];
- }
- spin_unlock_irq(&pdc_lock);
-
- return retval;
-}
-
-/**
- * pdc_pat_io_pci_cfg_write - Retrieve information about memory address ranges.
- * @pci_addr: PCI configuration space address for which the write request is being made.
- * @pci_size: Size of write in bytes. Valid values are 1, 2, and 4.
- * @value: Pointer to 1, 2, or 4 byte value in low order end of argument to be
- * written to PCI Config space.
- *
- */
-int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val)
-{
- int retval;
-
- spin_lock_irq(&pdc_lock);
- retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_WRITE,
- pci_addr, pci_size, val);
- spin_unlock_irq(&pdc_lock);
-
- return retval;
-}