summaryrefslogtreecommitdiffstats
path: root/target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-23 21:04:37 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-23 21:04:37 +0000
commit343c185b7d7383b1f5b5144e837045af28afc42b (patch)
tree6d3382662fa3ad4119d3a3cda223c53949ca4894 /target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch
parent145f9652a593d19b149d2f25febd4aa0c1ab57d1 (diff)
use broken-out patches for the coldfire to make it easier to follow differences against the bsp
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16547 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch')
-rw-r--r--target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch b/target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch
new file mode 100644
index 000000000..79a1e3930
--- /dev/null
+++ b/target/linux/coldfire/patches/089-m547x_8x_pci_reset_usb_fix.patch
@@ -0,0 +1,49 @@
+Bugzilla 1647. This patch resets PCI which fixes the USB problem on mcf5475.
+
+Set PCI registers MCF_PCIGSCR and MCF_PCITCR to their reset defaults.
+This fixes the USB problem and enables other PCI cards, such as PCI
+network to function properly.
+
+Original work of Matt Waddel
+Signed-off-by: Ross Wille
+
+--- a/arch/m68k/coldfire/mcf548x-pci.c
++++ b/arch/m68k/coldfire/mcf548x-pci.c
+@@ -1,5 +1,23 @@
+ /*
+ * ColdFire 547x/548x PCI Host Controller functions
++ *
++ * Copyright (c) 2005-2008 Freescale Semiconductor, Inc.
++ *
++ * This code is based on the 2.6.10 version of pci.c
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+ #include <linux/kernel.h>
+ #include <linux/types.h>
+@@ -815,6 +833,13 @@ struct pci_bus_info *__init init_coldfir
+ return NULL;
+ }
+
++ /* Must Reset!!! If bootloader has PCI enabled, it will cause
++ * problem in linux when it tries to configure/find resources
++ * for the pci devices. Both registers need to be reset.
++ */
++ MCF_PCIGSCR = 0x1;
++ MCF_PCITCR = 0x00000000;
++
+ /* Set up the arbiter */
+ MCF_PCIARB_PACR = 0 /*MCF_PCIARB_PACR_PKMD*/
+ | MCF_PCIARB_PACR_INTMPRI