From: Sylvain Munaut <tnt@246tNt•com>
To: Andrew Morton <akpm@osdl•org>
Cc: Tom Rini <trini@kernel•crashing.org>,
Sylvain Munaut <tnt@246tNt•com>,
Linux PPC Embedded <linuxppc-embedded@ozlabs•org>
Subject: [PATCH 8/9] ppc32: Fix MPC52xx PCI init in cas the bootloader didn't do it
Date: Tue, 20 Dec 2005 21:44:04 +0100 (CET) [thread overview]
Message-ID: <8.20051220_213752_1ebc_tnt@patchsend.246tNt.com> (raw)
In-Reply-To: <0.20051220_213752_1ebc_tnt@patchsend.246tNt.com>
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>
---
commit ebf0598ce7564d4c1db16d995e609923bbb2eba8
tree 3ba738b8bf64ebe609c5f8301f87b55d25c2d9fd
parent 20734ce8dc6fafd40c421bd275712d7bb6124d20
author Sylvain Munaut <tnt@246tNt•com> Sun, 18 Dec 2005 20:09:13 +0100
committer Sylvain Munaut <tnt@246tNt•com> Sun, 18 Dec 2005 20:09:13 +0100
arch/ppc/syslib/mpc52xx_pci.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index 2c5e6dd..313c96e 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 =
static void __init
mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs)
{
+ u32 tmp;
/* Setup control regs */
- /* Nothing to do afaik */
+ tmp = in_be32(&pci_regs->scr);
+ tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+ out_be32(&pci_regs->scr, tmp);
/* Setup windows */
out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION(
@@ -197,13 +200,12 @@ mpc52xx_pci_setup(struct mpc52xx_pci __i
/* Not necessary and can be a bad thing if for example the bootloader
is displaying a splash screen or ... Just left here for
documentation purpose if anyone need it */
-#if 0
- u32 tmp;
tmp = in_be32(&pci_regs->gscr);
+#if 0
out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR);
udelay(50);
- out_be32(&pci_regs->gscr, tmp);
#endif
+ out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
}
static void
next prev parent reply other threads:[~2005-12-20 20:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-20 20:40 [PATCH 0/9] Some Freescale MPC52xx related updates Sylvain Munaut
2005-12-20 20:40 ` [PATCH 1/9] ppc32: Remove useless file arch/ppc/platforms/mpc5200.c Sylvain Munaut
2005-12-20 20:41 ` [PATCH 2/9] ppc32/serial: Fix compiler errors with GCC 4.x in mpc52xx_uart.c Sylvain Munaut
2005-12-20 20:41 ` [PATCH 3/9] ppc32/serial: Change mpc52xx_uart.c to use the Low Density Serial port major Sylvain Munaut
2005-12-20 20:42 ` [PATCH 4/9] ppc32: Fix static IO mapping for Freescale MPC52xx Sylvain Munaut
2005-12-20 20:42 ` [PATCH 5/9] ppc32: Modify Freescale MPC52xx IRQ mapping to _not_ use irq 0 Sylvain Munaut
2005-12-20 20:43 ` [PATCH 6/9] ppc32: Remove __init qualifier from mpc52xx pci resources fixups Sylvain Munaut
2005-12-20 20:43 ` [PATCH 7/9] ppc32: Fix MPC52xx configuration space access Sylvain Munaut
2005-12-20 20:44 ` Sylvain Munaut [this message]
2005-12-20 20:44 ` [PATCH 9/9] ppc32: Allows compilation of a MPC52xx kernel without PCI Sylvain Munaut
2005-12-20 20:54 ` [PATCH 0/9] Some Freescale MPC52xx related updates Kumar Gala
2005-12-20 21:36 ` Sylvain Munaut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8.20051220_213752_1ebc_tnt@patchsend.246tNt.com \
--to=tnt@246tnt$(echo .)com \
--cc=akpm@osdl$(echo .)org \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
--cc=trini@kernel$(echo .)crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox