linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Correct USB support for GE Fanuc SBC610
@ 2008-09-29 12:35 Martyn Welch
  2008-09-29 14:25 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Martyn Welch @ 2008-09-29 12:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus

Support for the SBC610 VPX Single Board Computer from GE Fanuc (PowerPC
MPC8641D).

Fixup to correctly reconfigure USB, provided by an NEC uPD720101, after
device is reset. This requires a set of chip specific registers in the
devices configuration space to be correctly written, enabling all ports
and switching the device to use an external 48-MHz Oscillator.

Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
---

 arch/powerpc/platforms/86xx/gef_sbc610.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index 3543a9e..605678c 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -12,6 +12,8 @@
  *
  * Based on: mpc86xx_hpcn.c (MPC86xx HPCN board specific routines)
  * Copyright 2006 Freescale Semiconductor Inc.
+ *
+ * NEC fixup adapted from arch/mips/pci/fixup-lm2e.c
  */
 
 #include <linux/stddef.h>
@@ -83,6 +85,21 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
 	seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
 }
 
+static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev)
+{
+	unsigned int val;
+
+	printk(KERN_INFO "Running NEC uPD720101 Fixup\n");
+
+	/* Ensure ports 1, 2, 3, 4 & 5 are enabled */
+	pci_read_config_dword(pdev, 0xe0, &val);
+	pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x5);
+
+	/* System clock is 48-MHz Oscillator and EHCI Enabled. */
+	pci_write_config_dword(pdev, 0xe4, 1 << 5);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
+	gef_sbc610_nec_fixup);
 
 /*
  * Called very early, device-tree isn't unflattened

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: Correct USB support for GE Fanuc SBC610
  2008-09-29 12:35 [PATCH] powerpc: Correct USB support for GE Fanuc SBC610 Martyn Welch
@ 2008-09-29 14:25 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2008-09-29 14:25 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev, paulus


On Sep 29, 2008, at 7:35 AM, Martyn Welch wrote:

> Support for the SBC610 VPX Single Board Computer from GE Fanuc  
> (PowerPC
> MPC8641D).
>
> Fixup to correctly reconfigure USB, provided by an NEC uPD720101,  
> after
> device is reset. This requires a set of chip specific registers in the
> devices configuration space to be correctly written, enabling all  
> ports
> and switching the device to use an external 48-MHz Oscillator.
>
> Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
> ---
>
> arch/powerpc/platforms/86xx/gef_sbc610.c |   17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)

applied

- k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-29 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 12:35 [PATCH] powerpc: Correct USB support for GE Fanuc SBC610 Martyn Welch
2008-09-29 14:25 ` Kumar Gala

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).