patch-2.4.1 linux/include/asm-ppc/machdep.h

Next file: linux/include/asm-ppc/mman.h
Previous file: linux/include/asm-ppc/linux_logo.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/include/asm-ppc/machdep.h linux/include/asm-ppc/machdep.h
@@ -10,6 +10,7 @@
 
 struct pt_regs;
 struct pci_bus;	
+struct pci_dev;
 
 struct machdep_calls {
 	void		(*setup_arch)(void);
@@ -45,7 +46,7 @@
 	unsigned char 	(*nvram_read_val)(int addr);
 	void		(*nvram_write_val)(int addr, unsigned char val);
 
-/* Tons of keyboard stuff. */
+	/* Tons of keyboard stuff. */
 	int		(*kbd_setkeycode)(unsigned int scancode,
 				unsigned int keycode);
 	int		(*kbd_getkeycode)(unsigned int scancode);
@@ -59,25 +60,25 @@
 	unsigned char 	*ppc_kbd_sysrq_xlate;
 #endif
 
-	/* PCI interfaces */
-	int (*pcibios_read_config_byte)(unsigned char bus,
-		unsigned char dev_fn, unsigned char offset, unsigned char *val);
-	int (*pcibios_read_config_word)(unsigned char bus,
-		unsigned char dev_fn, unsigned char offset, unsigned short *val);
-	int (*pcibios_read_config_dword)(unsigned char bus,
-		unsigned char dev_fn, unsigned char offset, unsigned int *val);
-	int (*pcibios_write_config_byte)(unsigned char bus,
-		unsigned char dev_fn, unsigned char offset, unsigned char val);
-	int (*pcibios_write_config_word)(unsigned char bus, 
-		unsigned char dev_fn, unsigned char offset, unsigned short val);
-	int (*pcibios_write_config_dword)(unsigned char bus,
-		unsigned char dev_fn, unsigned char offset, unsigned int val);
+	/*
+	 * optional PCI "hooks"
+	 */
+
+	 	/* Called after scanning the bus, before allocating
+	 	 * resources
+	 	 */
 	void (*pcibios_fixup)(void);
-	void (*pcibios_fixup_bus)(struct pci_bus *);
 
-	void* (*pci_dev_io_base)(unsigned char bus, unsigned char devfn, int physical);
-	void* (*pci_dev_mem_base)(unsigned char bus, unsigned char devfn);
-	int (*pci_dev_root_bridge)(unsigned char bus, unsigned char devfn);
+		/* Called for each PCI bus in the system
+		 * when it's probed
+		 */
+	void (*pcibios_fixup_bus)(struct pci_bus *);
+	
+		/* Called when pci_enable_device() is called (initial=0) or
+		 * when a device with no assigned resource is found (initial=1).
+		 * Returns 0 to allow assignement/enabling of the device
+		 */
+	int  (*pcibios_enable_device_hook)(struct pci_dev *, int initial);
 
 	/* this is for modules, since _machine can be a define -- Cort */
 	int ppc_machine;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)