patch-2.3.16 linux/arch/ppc/kernel/pci.c
Next file: linux/arch/ppc/kernel/pci.h
Previous file: linux/arch/ppc/kernel/openpic.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
Tue Aug 31 11:36:43 1999
- Orig file:
v2.3.15/linux/arch/ppc/kernel/pci.c
- Orig date:
Tue Jul 13 02:29:35 1999
diff -u --recursive --new-file v2.3.15/linux/arch/ppc/kernel/pci.c linux/arch/ppc/kernel/pci.c
@@ -1,5 +1,5 @@
/*
- * $Id: pci.c,v 1.54 1999/03/18 04:16:04 cort Exp $
+ * $Id: pci.c,v 1.56 1999/08/31 15:42:37 cort Exp $
* Common pmac/prep/chrp pci routines. -- Cort
*/
@@ -26,46 +26,51 @@
unsigned long isa_mem_base = 0;
unsigned long pci_dram_offset = 0;
-int pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned char *val)
+struct pci_fixup pcibios_fixups[] = {
+ { 0 }
+};
+
+int generic_pcibios_read_byte(struct pci_dev *dev, int where, u8 *val)
{
- return ppc_md.pcibios_read_config_byte(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_read_config_byte(dev->bus->number,dev->devfn,where,val);
}
-int pcibios_read_config_word(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned short *val)
+int generic_pcibios_read_word(struct pci_dev *dev, int where, u16 *val)
{
- return ppc_md.pcibios_read_config_word(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_read_config_word(dev->bus->number,dev->devfn,where,val);
}
-int pcibios_read_config_dword(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned int *val)
+int generic_pcibios_read_dword(struct pci_dev *dev, int where, u32 *val)
{
- return ppc_md.pcibios_read_config_dword(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_read_config_dword(dev->bus->number,dev->devfn,where,val);
}
-int pcibios_write_config_byte(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned char val)
+int generic_pcibios_write_byte(struct pci_dev *dev, int where, u8 val)
{
- return ppc_md.pcibios_write_config_byte(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_write_config_byte(dev->bus->number,dev->devfn,where,val);
}
-int pcibios_write_config_word(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned short val)
+int generic_pcibios_write_word(struct pci_dev *dev, int where, u16 val)
{
- return ppc_md.pcibios_write_config_word(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_write_config_word(dev->bus->number,dev->devfn,where,val);
}
-int pcibios_write_config_dword(unsigned char bus, unsigned char dev_fn,
- unsigned char offset, unsigned int val)
+int generic_pcibios_write_dword(struct pci_dev *dev, int where, u32 val)
{
- return ppc_md.pcibios_write_config_dword(bus,dev_fn,offset,val);
+ return ppc_md.pcibios_write_config_dword(dev->bus->number,dev->devfn,where,val);
}
-int pcibios_present(void)
+struct pci_ops generic_pci_ops =
{
- return 1;
-}
+ generic_pcibios_read_byte,
+ generic_pcibios_read_word,
+ generic_pcibios_read_dword,
+ generic_pcibios_write_byte,
+ generic_pcibios_write_word,
+ generic_pcibios_write_dword
+};
void __init pcibios_init(void)
{
+ printk("PCI: Probing PCI hardware\n");
+ pci_scan_bus(0, &generic_pci_ops, NULL);
+
}
-
void __init pcibios_fixup(void)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)