Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d52c7b0 authored by Kumar Gala's avatar Kumar Gala
Browse files

[POWERPC] Pass the pci_controller into pci_exclude_device



There are times that we need to know which controller we are on to decide
how to exclude devices properly.  We now pass the pci_controller that we
are going to use down to the pci_exclude_device function. This will
greatly simplify being able to exclude the PHBs in multiple controller
setups.

Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 0e302a70
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
	u32 value;

	if (ppc_md.pci_exclude_device)
		if (ppc_md.pci_exclude_device(bus->number, devfn))
		if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
			return PCIBIOS_DEVICE_NOT_FOUND;

	out_be32(hose->cfg_addr,
@@ -169,7 +169,7 @@ mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
	u32 value, mask;

	if (ppc_md.pci_exclude_device)
		if (ppc_md.pci_exclude_device(bus->number, devfn))
		if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
			return PCIBIOS_DEVICE_NOT_FOUND;

	out_be32(hose->cfg_addr,
+2 −1
Original line number Diff line number Diff line
@@ -507,7 +507,8 @@ void m82xx_pci_init_irq(void)
	return;
}

static int m82xx_pci_exclude_device(u_char bus, u_char devfn)
static int m82xx_pci_exclude_device(struct pci_controller *hose,
				    u_char bus, u_char devfn)
{
	if (bus == 0 && PCI_SLOT(devfn) == 0)
		return PCIBIOS_DEVICE_NOT_FOUND;
+3 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@

#include <linux/init.h>
#include <linux/device.h>
#include <asm/pci-bridge.h>

/* System Clock Control Register */
#define MPC83XX_SCCR_OFFS          0xA08
@@ -28,7 +29,8 @@
 */

extern int mpc83xx_add_bridge(struct device_node *dev);
extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
extern int mpc83xx_exclude_device(struct pci_controller *hose,
				  u_char bus, u_char devfn);
extern void mpc83xx_restart(char *cmd);
extern long mpc83xx_time_init(void);

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@

int mpc83xx_pci2_busno;

int mpc83xx_exclude_device(u_char bus, u_char devfn)
int mpc83xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
{
	if (bus == 0 && PCI_SLOT(devfn) == 0)
		return PCIBIOS_DEVICE_NOT_FOUND;
+2 −1
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@
#endif

#ifdef CONFIG_PCI
static int mpc85xx_exclude_device(u_char bus, u_char devfn)
static int mpc85xx_exclude_device(struct pci_controller *hose,
				   u_char bus, u_char devfn)
{
	if (bus == 0 && PCI_SLOT(devfn) == 0)
		return PCIBIOS_DEVICE_NOT_FOUND;
Loading