aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2006-01-06 03:11:37 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:31 -0500
commit041cb6241fa97c4881dd19d79f783b2e077acd28 (patch)
treea4574c4a059c05acc33db303dfb075a915abfb61
parentdb674ed450f113518285f410c93abecd93e71a2f (diff)
[PATCH] ppc32: Fix MPC52xx PCI init in cas the bootloader didn't do it
We were counting on the bootloader to init some stuff, like get the bus out of reset and enable accesses. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc/syslib/mpc52xx_pci.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index 2c5e6ddaf2c5..313c96ec7eb1 100644
--- a/arch/ppc/syslib/mpc52xx_pci.c
+++ b/arch/ppc/syslib/mpc52xx_pci.c
@@ -154,9 +154,12 @@ static struct pci_ops mpc52xx_pci_ops = {
154static void __init 154static void __init
155mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs) 155mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs)
156{ 156{
157 u32 tmp;
157 158
158 /* Setup control regs */ 159 /* Setup control regs */
159 /* Nothing to do afaik */ 160 tmp = in_be32(&pci_regs->scr);
161 tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
162 out_be32(&pci_regs->scr, tmp);
160 163
161 /* Setup windows */ 164 /* Setup windows */
162 out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION( 165 out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION(
@@ -197,13 +200,12 @@ mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs)
197 /* Not necessary and can be a bad thing if for example the bootloader 200 /* Not necessary and can be a bad thing if for example the bootloader
198 is displaying a splash screen or ... Just left here for 201 is displaying a splash screen or ... Just left here for
199 documentation purpose if anyone need it */ 202 documentation purpose if anyone need it */
200#if 0
201 u32 tmp;
202 tmp = in_be32(&pci_regs->gscr); 203 tmp = in_be32(&pci_regs->gscr);
204#if 0
203 out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR); 205 out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR);
204 udelay(50); 206 udelay(50);
205 out_be32(&pci_regs->gscr, tmp);
206#endif 207#endif
208 out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
207} 209}
208 210
209static void 211static void