From: Kyle McMartin <kyle@infradead.org>
To: linuxppc-dev@ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ppc: detect sbc610 boards and only fixup nec usb on them
Date: Tue, 3 Mar 2009 20:22:29 -0500 [thread overview]
Message-ID: <20090304012229.GN28503@bombadil.infradead.org> (raw)
From: Kyle McMartin <kyle@redhat.com>
Bug #486511 in Fedora, this is getting applied to any machine with a NEC
USB pci device if this CONFIG_GEF_SBC610 is on (as it was in Fedora.)
Obviously this isn't appropriate to do in any more than the SBC610
case..., so flag that we're a sbc610 board, and skip the fixup if we're
not.
(Fedora: Should fix USB on Mac G4/G5...)
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index fb371f5..54afda2 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -51,6 +51,8 @@
void __iomem *sbc610_regs;
+static int is_sbc610;
+
static void __init gef_sbc610_init_irq(void)
{
struct device_node *cascade_node = NULL;
@@ -142,6 +144,9 @@ static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev)
{
unsigned int val;
+ if (!is_sbc610)
+ return;
+
printk(KERN_INFO "Running NEC uPD720101 Fixup\n");
/* Ensure ports 1, 2, 3, 4 & 5 are enabled */
@@ -166,8 +171,10 @@ static int __init gef_sbc610_probe(void)
{
unsigned long root = of_get_flat_dt_root();
- if (of_flat_dt_is_compatible(root, "gef,sbc610"))
+ if (of_flat_dt_is_compatible(root, "gef,sbc610")) {
+ is_sbc610 = 1;
return 1;
+ }
return 0;
}
next reply other threads:[~2009-03-04 1:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 1:22 Kyle McMartin [this message]
2009-03-04 3:59 ` [PATCH] ppc: detect sbc610 boards and only fixup nec usb on them Tony Breeds
2009-03-04 6:42 ` Benjamin Herrenschmidt
2009-03-04 14:30 ` Kyle McMartin
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=20090304012229.GN28503@bombadil.infradead.org \
--to=kyle@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).