From 6c70049bd14e8e81764570732be7f34a89831f09 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 12 Nov 2009 17:19:37 +0100 Subject: ppc4xx: Consolidate pci_master_init() function This patch removes the duplicted implementations of the pci_master_init() function by introducing a weak default function for it. It can be overridden by a board specific version. Signed-off-by: Stefan Roese --- board/netstal/hcu5/hcu5.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'board/netstal/hcu5') diff --git a/board/netstal/hcu5/hcu5.c b/board/netstal/hcu5/hcu5.c index 144fdd9..8615645 100644 --- a/board/netstal/hcu5/hcu5.c +++ b/board/netstal/hcu5/hcu5.c @@ -22,6 +22,8 @@ #include #include #include +#include + #include "../common/nm.h" DECLARE_GLOBAL_DATA_PTR; @@ -377,23 +379,14 @@ int pci_pre_init(struct pci_controller *hose) } /* - * pci_master_init - * + * Override weak default pci_master_init() */ void pci_master_init(struct pci_controller *hose) { - unsigned short temp_short; - if (!board_with_pci()) { return; } - - /*--------------------------------------------------------------- - * Write the PowerPC440 EP PCI Configuration regs. - * Enable PowerPC440 EP to be a master on the PCI bus (PMM). - * Enable PowerPC440 EP to act as a PCI memory target (PTM). - *--------------------------------------------------------------*/ - pci_read_config_word(0, PCI_COMMAND, &temp_short); - pci_write_config_word(0, PCI_COMMAND, - temp_short | PCI_COMMAND_MASTER | - PCI_COMMAND_MEMORY); + if (!board_with_pci()) + return; + + __pci_master_init(hose); } #endif /* defined(CONFIG_PCI) */ -- cgit v1.1