USB_DR host support for FSL MPC831x
Subsystems (4)
PATCH 1/1 USB_DR host support for FSL MPC831x
Modifies fsl_ehci code so that to get USB host working on mpc831x platform. Verified with MPC8313RDB reference board.
---
arch/powerpc/boot/dts/mpc8313erdb.dts | 1 + drivers/usb/host/ehci-fsl.c | 4 +++- drivers/usb/host/ehci-hcd.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-)
arch/powerpc/boot/dts/mpc8313erdb.dts +1 -0
@@ -90,6 +90,7 @@ interrupt-parent = < &ipic >; interrupts = <26 8>; phy_type = "utmi_wide"; + control_init = <00000280>; // UTMI ext 48 MHz clk }; mdio@24520 {
drivers/usb/host/ehci-fsl.c +3 -1
@@ -185,12 +185,14 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd)struct ehci_hcd *ehci =hcd_to_ehci (hcd);struct fsl_usb2_platform_data *pdata;void __iomem *non_ehci = hcd->regs; +u32 temp; pdata = (struct fsl_usb2_platform_data *)hcd->self.controller-> platform_data;/* Enable PHY interface in the control reg. */ -out_be32 (non_ehci +FSL_SOC_USB_CTRL ,0x00000004 ); + temp =in_be32 (non_ehci +FSL_SOC_USB_CTRL ); +out_be32 (non_ehci +FSL_SOC_USB_CTRL , temp |0x00000004 );out_be32 (non_ehci +FSL_SOC_USB_SNOOP1 ,0x0000001b );#if defined(CONFIG_PPC32 ) && !defined(CONFIG_NOT_COHERENT_CACHE )
drivers/usb/host/ehci-hcd.c +1 -1
@@ -925,7 +925,7 @@ MODULE_LICENSE ("GPL");#define PCI_DRIVER ehci_pci_driver#endif -#ifdef CONFIG_MPC834x +#if defined(CONFIG_MPC834x) || defined(CONFIG_PPC_MPC831x)#include "ehci-fsl.c" #define PLATFORM_DRIVER ehci_fsl_driver#endif
Hi Vitaly,
I believe that your patch is addresses by my patch in 2.6.23 queue:
http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.6/2.6.22/usb-
ehci_fsl-update-for-mpc831x-support.patch
- Leo
Quoted 76 lines
-----Original Message-----
From: [email protected]=20 [mailto:[email protected]]=20 On Behalf Of Vitaly Bordug
Sent: Tuesday, July 17, 2007 8:59 AM
To: Greg KH
Cc: [email protected]
Subject: [PATCH]USB_DRhost support for FSL MPC831x =20
=20
Modifiesfsl_ehcicode so that to get USB host working on=20 mpc831x platform. Verified with MPC8313RDB reference board. =20Signed-off-by Vitaly Bordug <[email protected]>=20
---
=20arch/powerpc/boot/dts/mpc8313erdb.dts | 1 + drivers/usb/host/ehci-fsl.c | 4 +++- drivers/usb/host/ehci-hcd.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-)=20
arch/powerpc/boot/dts/mpc8313erdb.dts +1
-0@@ -90,6 +90,7 @@ interrupt-parent =3D < &ipic >; interrupts =3D <26 8>; phy_type =3D "utmi_wide"; + control_init =3D <00000280>; // UTMI ext=2048 MHz clk
};
=20arch/powerpc/boot/dts/mpc8313erdb.dts +0
-0mdio@24520 {(quoted diff) +0
-0
b/drivers/usb/host/ehci-fsl.cindex c7a7c59..3e3187b 100644drivers/usb/host/ehci-fsl.c +1
-0@@ -185,12 +185,14 @@ static void mpc83xx_usb_setup(struct=20 usb_hcd *hcd) struct ehci_hcd *ehci =3D hcd_to_ehci(hcd);struct fsl_usb2_platform_data *pdata; void __iomem *non_ehci =3D hcd->regs; +u32 temp;=20
drivers/usb/host/ehci-fsl.c +2
-1pdata =3D (struct fsl_usb2_platform_data *)hcd->self.controller-> platform_data;/* Enable PHY interface in the control reg. */ -out_be32 (non_ehci +FSL_SOC_USB_CTRL ,0x00000004 ); + temp =3D in_be32(non_ehci + FSL_SOC_USB_CTRL); +out_be32 (non_ehci +FSL_SOC_USB_CTRL , temp |0x00000004 );out_be32 (non_ehci +FSL_SOC_USB_SNOOP1 ,0x0000001b );=20
#ifdefined(CONFIG_PPC32)&& !defined(CONFIG_NOT_COHERENT_CACHE)(quoted diff) +0
-0
b/drivers/usb/host/ehci-hcd.cindex 099aff6..994a127 100644drivers/usb/host/ehci-hcd.c +0
-0@@ -925,7 +925,7 @@ MODULE_LICENSE ("GPL");#define PCI_DRIVER ehci_pci_driver#endif =20
drivers/usb/host/ehci-hcd.c +1
-1-#ifdef CONFIG_MPC834x +#if defined(CONFIG_MPC834x) || defined(CONFIG_PPC_MPC831x)#include "ehci-fsl.c" #define PLATFORM_DRIVER ehci_fsl_driver#endif =20
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
=20
Quoted 6 lines · On Tue, 17 Jul 2007 20:18:35 +0800 "Li Yang-r58472" <[email protected]> wrote:
Hi Vitaly,
I believe that your patch is addresses by my patch in 2.6.23 queue:
http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.6/2.6.22/usb-
ehci_fsl-update-for-mpc831x-support.patch
okay, nm then. I'll revalidate with these 2 patches and come up with something ontop if it won't work.
Quoted 78 lines
- Leo
Quoted 76 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Vitaly Bordug
Sent: Tuesday, July 17, 2007 8:59 AM
To: Greg KH
Cc: [email protected]
Subject: [PATCH]USB_DRhost support for FSL MPC831xModifies
fsl_ehcicode so that to get USB host working on mpc831x platform. Verified with MPC8313RDB reference board.Signed-off-by Vitaly Bordug <[email protected]>---
arch/powerpc/boot/dts/mpc8313erdb.dts | 1 + drivers/usb/host/ehci-fsl.c | 4 +++- drivers/usb/host/ehci-hcd.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-)arch/powerpc/boot/dts/mpc8313erdb.dts +1
-0@@ -90,6 +90,7 @@ interrupt-parent = < &ipic >; interrupts = <26 8>; phy_type = "utmi_wide"; + control_init = <00000280>; // UTMI ext48 MHz clk
arch/powerpc/boot/dts/mpc8313erdb.dts +0
-0}; mdio@24520 {(quoted diff) +0
-0
b/drivers/usb/host/ehci-fsl.cindex c7a7c59..3e3187b 100644drivers/usb/host/ehci-fsl.c +3
-1@@ -185,12 +185,14 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd)struct ehci_hcd *ehci =hcd_to_ehci (hcd);struct fsl_usb2_platform_data *pdata;void __iomem *non_ehci = hcd->regs; +u32 temp; pdata = (struct fsl_usb2_platform_data *)hcd->self.controller-> platform_data;/* Enable PHY interface in the control reg. */ -out_be32 (non_ehci +FSL_SOC_USB_CTRL ,0x00000004 ); + temp =in_be32 (non_ehci +FSL_SOC_USB_CTRL ); +out_be32 (non_ehci +FSL_SOC_USB_CTRL , temp |0x00000004 );out_be32 (non_ehci +FSL_SOC_USB_SNOOP1 ,0x0000001b );#if
defined(CONFIG_PPC32)&& !defined(CONFIG_NOT_COHERENT_CACHE)(quoted diff) +0
-0
b/drivers/usb/host/ehci-hcd.cindex 099aff6..994a127 100644drivers/usb/host/ehci-hcd.c +1
-1@@ -925,7 +925,7 @@ MODULE_LICENSE ("GPL");#define PCI_DRIVER ehci_pci_driver#endif -#ifdef CONFIG_MPC834x +#if defined(CONFIG_MPC834x) || defined(CONFIG_PPC_MPC831x)#include "ehci-fsl.c" #define PLATFORM_DRIVER ehci_fsl_driver#endif _______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Signature · 2 lines
Sincerely, Vitaly
Quoted 12 lines · Vitaly Bordug
Quoted 6 lines · On Tue, 17 Jul 2007 20:18:35 +0800 "Li Yang-r58472" <[email protected]> wrote:
Hi Vitaly,
I believe that your patch is addresses by my patch in 2.6.23 queue:
http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.6/2.6.22/usb-
ehci_fsl-update-for-mpc831x-support.patchokay, nm then. I'll revalidate with these 2 patches and come up with something ontop if it won't work.
FYI, Leo's patches are now in Linus's tree.
- k
arch/powerpc/boot/dts/mpc8313erdb.dts line 93
Quoted 9 lines · Vitaly Bordug
arch/powerpc/boot/dts/mpc8313erdb.dts +1
-0@@ -90,6 +90,7 @@ interrupt-parent = < &ipic >; interrupts = <26 8>; phy_type = "utmi_wide"; + control_init = <00000280>; // UTMI ext 48 MHz clk
fsl,usb-control-init, please.
drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 931
Quoted 13 lines
drivers/usb/host/ehci-hcd.c +1
-1@@ -925,7 +925,7 @@ MODULE_LICENSE ("GPL");#define PCI_DRIVER ehci_pci_driver#endif -#ifdef CONFIG_MPC834x +#if defined(CONFIG_MPC834x) || defined(CONFIG_PPC_MPC831x)#include "ehci-fsl.c" #define PLATFORM_DRIVER ehci_fsl_driver#endif
It'd be better to define a CONFIG_FSL_EHCI and have the 834x and 831x configs enable it.
-Scott