summaryrefslogtreecommitdiff
path: root/board/mpc832xemds
diff options
context:
space:
mode:
Diffstat (limited to 'board/mpc832xemds')
-rw-r--r--board/mpc832xemds/Makefile2
-rw-r--r--board/mpc832xemds/mpc832xemds.c11
-rw-r--r--board/mpc832xemds/pci.c40
3 files changed, 12 insertions, 41 deletions
diff --git a/board/mpc832xemds/Makefile b/board/mpc832xemds/Makefile
index 5ec7a871d4d..4da74b8277e 100644
--- a/board/mpc832xemds/Makefile
+++ b/board/mpc832xemds/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
-COBJS := $(BOARD).o pci.o
+COBJS := $(BOARD).o pci.o ../freescale/common/pq-mds-pib.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/board/mpc832xemds/mpc832xemds.c b/board/mpc832xemds/mpc832xemds.c
index f70783e73ab..207fcdf8be3 100644
--- a/board/mpc832xemds/mpc832xemds.c
+++ b/board/mpc832xemds/mpc832xemds.c
@@ -32,6 +32,9 @@
#elif defined(CONFIG_OF_LIBFDT)
#include <libfdt.h>
#endif
+#if defined(CONFIG_PQ_MDS_PIB)
+#include "../freescale/common/pq-mds-pib.h"
+#endif
const qe_iop_conf_t qe_iop_conf_tab[] = {
/* ETH3 */
@@ -88,6 +91,14 @@ int board_early_init_f(void)
return 0;
}
+int board_early_init_r(void)
+{
+#ifdef CONFIG_PQ_MDS_PIB
+ pib_init();
+#endif
+ return 0;
+}
+
int fixed_sdram(void);
long int initdram(int board_type)
diff --git a/board/mpc832xemds/pci.c b/board/mpc832xemds/pci.c
index c2f61ea6ad7..6bc35c70f2d 100644
--- a/board/mpc832xemds/pci.c
+++ b/board/mpc832xemds/pci.c
@@ -131,7 +131,6 @@ void pci_init_board(void)
volatile pcictrl83xx_t *pci_ctrl;
volatile pciconf83xx_t *pci_conf;
- u8 val8, orig_i2c_bus;
u16 reg16;
u32 val32;
u32 dev;
@@ -200,43 +199,6 @@ void pci_init_board(void)
PIWAR_IWS_2G;
/*
- * Assign PIB PMC slot to desired PCI bus
- */
-
- /* Switch temporarily to I2C bus #2 */
- orig_i2c_bus = i2c_get_bus_num();
- i2c_set_bus_num(1);
-
- val8 = 0;
- i2c_write(0x23, 0x6, 1, &val8, 1);
- i2c_write(0x23, 0x7, 1, &val8, 1);
- val8 = 0xff;
- i2c_write(0x23, 0x2, 1, &val8, 1);
- i2c_write(0x23, 0x3, 1, &val8, 1);
-
- val8 = 0;
- i2c_write(0x26, 0x6, 1, &val8, 1);
- val8 = 0x34;
- i2c_write(0x26, 0x7, 1, &val8, 1);
-
- val8 = 0xf9; /* PMC2, PMC3 slot to PCI bus */
- i2c_write(0x26, 0x2, 1, &val8, 1);
- val8 = 0xff;
- i2c_write(0x26, 0x3, 1, &val8, 1);
-
- val8 = 0;
- i2c_write(0x27, 0x6, 1, &val8, 1);
- i2c_write(0x27, 0x7, 1, &val8, 1);
- val8 = 0xff;
- i2c_write(0x27, 0x2, 1, &val8, 1);
- val8 = 0xef;
- i2c_write(0x27, 0x3, 1, &val8, 1);
- asm("eieio");
-
- /* Reset to original I2C bus */
- i2c_set_bus_num(orig_i2c_bus);
-
- /*
* Release PCI RST Output signal
*/
udelay(2000);
@@ -292,8 +254,6 @@ void pci_init_board(void)
pci_hose_write_config_byte(&hose[0], dev, PCI_LATENCY_TIMER, 0x80);
pci_hose_write_config_byte(&hose[0], dev, PCI_CACHE_LINE_SIZE, 0x08);
- printf("PCI 32bit bus on PMC2 & PMC3\n");
-
/*
* Hose scan.
*/