Skip to content

Commit a969e76

Browse files
mwelchukkumargala
authored andcommitted
powerpc: Correct USB support for GE Fanuc SBC610
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> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
1 parent 0161dca commit a969e76

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

arch/powerpc/platforms/86xx/gef_sbc610.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
*
1313
* Based on: mpc86xx_hpcn.c (MPC86xx HPCN board specific routines)
1414
* Copyright 2006 Freescale Semiconductor Inc.
15+
*
16+
* NEC fixup adapted from arch/mips/pci/fixup-lm2e.c
1517
*/
1618

1719
#include <linux/stddef.h>
@@ -75,6 +77,21 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
7577
seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
7678
}
7779

80+
static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev)
81+
{
82+
unsigned int val;
83+
84+
printk(KERN_INFO "Running NEC uPD720101 Fixup\n");
85+
86+
/* Ensure ports 1, 2, 3, 4 & 5 are enabled */
87+
pci_read_config_dword(pdev, 0xe0, &val);
88+
pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x5);
89+
90+
/* System clock is 48-MHz Oscillator and EHCI Enabled. */
91+
pci_write_config_dword(pdev, 0xe4, 1 << 5);
92+
}
93+
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
94+
gef_sbc610_nec_fixup);
7895

7996
/*
8097
* Called very early, device-tree isn't unflattened

0 commit comments

Comments
 (0)