* [PATCH 0/2] add ehci-s5p AHB burst function @ 2012-02-29 12:41 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 12:41 UTC (permalink / raw) To: linux-samsung-soc, linux-usb, linux-arm-kernel Cc: ben-linux, gregkh, kgene.kim, stern, jg1.han, jy0922.shim, patches, linaro-dev, linux, Sangwook Lee Enable burst transfer from AHB for EHCI. This fixes data transfer issue of USB Ethernet with EHCI. Without this patch, ping works and network utilities such as scp hardly works. It was tested on Origen board with the following configs. root@linaro-alip:~# lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M |__ Port 1: Dev 2, If 0, Class=vend., Driver=MOSCHIP usb-ethernet driver, 480M Sangwook Lee (2): ARM: EXYNOS: Add EHCI AHB burst function USB: ehci-s5p: add function for burst arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ arch/arm/plat-samsung/devs.c | 2 ++ arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ drivers/usb/host/ehci-s5p.c | 3 +++ 4 files changed, 30 insertions(+), 0 deletions(-) -- 1.7.4.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/2] add ehci-s5p AHB burst function @ 2012-02-29 12:41 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 12:41 UTC (permalink / raw) To: linux-arm-kernel Enable burst transfer from AHB for EHCI. This fixes data transfer issue of USB Ethernet with EHCI. Without this patch, ping works and network utilities such as scp hardly works. It was tested on Origen board with the following configs. root at linaro-alip:~# lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M |__ Port 1: Dev 2, If 0, Class=vend., Driver=MOSCHIP usb-ethernet driver, 480M Sangwook Lee (2): ARM: EXYNOS: Add EHCI AHB burst function USB: ehci-s5p: add function for burst arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ arch/arm/plat-samsung/devs.c | 2 ++ arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ drivers/usb/host/ehci-s5p.c | 3 +++ 4 files changed, 30 insertions(+), 0 deletions(-) -- 1.7.4.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <1330519283-4722-1-git-send-email-sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 12:41 ` Sangwook Lee @ 2012-02-29 12:41 ` Sangwook Lee -1 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 12:41 UTC (permalink / raw) To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg, gregkh-l3A5Bk7waGM, kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, jg1.han-Sze3O3UU22JBDgjK7y7TUQ, jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A, linaro-dev-cunTk1MwBs8s++Sfvej+rw, linux-lFZ/pmaqli7XmaaqVzeoHQ, Sangwook Lee Enable burst transfer from AHB for EHCI. This fixes data transfer of USB Ethernet with EHCI. Without this patch, scp hardly works. Signed-off-by: Sangwook Lee <sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ arch/arm/plat-samsung/devs.c | 2 ++ arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c index 41743d2..5a20460 100644 --- a/arch/arm/mach-exynos/setup-usb-phy.c +++ b/arch/arm/mach-exynos/setup-usb-phy.c @@ -18,6 +18,7 @@ #include <mach/regs-usb-phy.h> #include <plat/cpu.h> #include <plat/usb-phy.h> +#include <plat/ehci.h> static atomic_t host_usage; @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) return -EINVAL; } + +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) +{ + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); +} diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index f10768e..8fd1bd3 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -1402,6 +1402,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) npd->phy_init = s5p_usb_phy_init; if (!npd->phy_exit) npd->phy_exit = s5p_usb_phy_exit; + if (!npd->burst_enable) + npd->burst_enable = s5p_ehci_burst_enable; } #endif /* CONFIG_S5P_DEV_USB_EHCI */ diff --git a/arch/arm/plat-samsung/include/plat/ehci.h b/arch/arm/plat-samsung/include/plat/ehci.h index 5f28cae..9c866b7 100644 --- a/arch/arm/plat-samsung/include/plat/ehci.h +++ b/arch/arm/plat-samsung/include/plat/ehci.h @@ -14,8 +14,27 @@ struct s5p_ehci_platdata { int (*phy_init)(struct platform_device *pdev, int type); int (*phy_exit)(struct platform_device *pdev, int type); + void (*burst_enable)(struct platform_device *pdev, void __iomem *base); }; extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); +extern void s5p_ehci_burst_enable(struct platform_device *pdev, + void __iomem *base); + +/* EHCI EXYNOS specific register */ +#define EHCI_INSNREG00 0x90 + +/* + * EHCI INSNREG00 Specific fields + * Enable AHB master to use burst transfer from 4 to 16 + */ +#define EHCI_INSNREG00_ENABLE_INCR16 (1 << 25) +#define EHCI_INSNREG00_ENABLE_INCR8 (1 << 24) +#define EHCI_INSNREG00_ENABLE_INCR4 (1 << 23) +/* Force AHB master to start burst transfer only for 4,8,16 alignment */ +#define EHCI_INSNREG00_ENABLE_INCRX_ALIGN (1 << 22) +#define EHCI_INSNREG00_ENABLE_BURST \ + (EHCI_INSNREG00_ENABLE_INCR16 | EHCI_INSNREG00_ENABLE_INCR8 | \ + EHCI_INSNREG00_ENABLE_INCR4 | EHCI_INSNREG00_ENABLE_INCRX_ALIGN) #endif /* __PLAT_SAMSUNG_EHCI_H */ -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-02-29 12:41 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 12:41 UTC (permalink / raw) To: linux-arm-kernel Enable burst transfer from AHB for EHCI. This fixes data transfer of USB Ethernet with EHCI. Without this patch, scp hardly works. Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> --- arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ arch/arm/plat-samsung/devs.c | 2 ++ arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c index 41743d2..5a20460 100644 --- a/arch/arm/mach-exynos/setup-usb-phy.c +++ b/arch/arm/mach-exynos/setup-usb-phy.c @@ -18,6 +18,7 @@ #include <mach/regs-usb-phy.h> #include <plat/cpu.h> #include <plat/usb-phy.h> +#include <plat/ehci.h> static atomic_t host_usage; @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) return -EINVAL; } + +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) +{ + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); +} diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index f10768e..8fd1bd3 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -1402,6 +1402,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) npd->phy_init = s5p_usb_phy_init; if (!npd->phy_exit) npd->phy_exit = s5p_usb_phy_exit; + if (!npd->burst_enable) + npd->burst_enable = s5p_ehci_burst_enable; } #endif /* CONFIG_S5P_DEV_USB_EHCI */ diff --git a/arch/arm/plat-samsung/include/plat/ehci.h b/arch/arm/plat-samsung/include/plat/ehci.h index 5f28cae..9c866b7 100644 --- a/arch/arm/plat-samsung/include/plat/ehci.h +++ b/arch/arm/plat-samsung/include/plat/ehci.h @@ -14,8 +14,27 @@ struct s5p_ehci_platdata { int (*phy_init)(struct platform_device *pdev, int type); int (*phy_exit)(struct platform_device *pdev, int type); + void (*burst_enable)(struct platform_device *pdev, void __iomem *base); }; extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); +extern void s5p_ehci_burst_enable(struct platform_device *pdev, + void __iomem *base); + +/* EHCI EXYNOS specific register */ +#define EHCI_INSNREG00 0x90 + +/* + * EHCI INSNREG00 Specific fields + * Enable AHB master to use burst transfer from 4 to 16 + */ +#define EHCI_INSNREG00_ENABLE_INCR16 (1 << 25) +#define EHCI_INSNREG00_ENABLE_INCR8 (1 << 24) +#define EHCI_INSNREG00_ENABLE_INCR4 (1 << 23) +/* Force AHB master to start burst transfer only for 4,8,16 alignment */ +#define EHCI_INSNREG00_ENABLE_INCRX_ALIGN (1 << 22) +#define EHCI_INSNREG00_ENABLE_BURST \ + (EHCI_INSNREG00_ENABLE_INCR16 | EHCI_INSNREG00_ENABLE_INCR8 | \ + EHCI_INSNREG00_ENABLE_INCR4 | EHCI_INSNREG00_ENABLE_INCRX_ALIGN) #endif /* __PLAT_SAMSUNG_EHCI_H */ -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 12:41 ` Sangwook Lee @ 2012-02-29 13:01 ` Thomas Abraham -1 siblings, 0 replies; 19+ messages in thread From: Thomas Abraham @ 2012-02-29 13:01 UTC (permalink / raw) To: Sangwook Lee Cc: linux-samsung-soc, linux-usb, linux-arm-kernel, ben-linux, gregkh, kgene.kim, stern, jg1.han, jy0922.shim, patches, linaro-dev, linux Hi Sangwook, On 29 February 2012 18:11, Sangwook Lee <sangwook.lee@linaro.org> wrote: > Enable burst transfer from AHB for EHCI. > This fixes data transfer of USB Ethernet with EHCI. > Without this patch, scp hardly works. > > Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> > --- > arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ > arch/arm/plat-samsung/devs.c | 2 ++ > arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ > 3 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c > index 41743d2..5a20460 100644 > --- a/arch/arm/mach-exynos/setup-usb-phy.c > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > @@ -18,6 +18,7 @@ > #include <mach/regs-usb-phy.h> > #include <plat/cpu.h> > #include <plat/usb-phy.h> > +#include <plat/ehci.h> > > static atomic_t host_usage; > > @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) > > return -EINVAL; > } > + > +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) > +{ > + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > +} This functionality can be added in ehci-s5p itself and avoid adding a new platform callback in platform data. If this is specific to exynos, driver data could be added in ehci-s5p to indicate platforms that need this to be enabled. Thanks, Thomas. [...] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-02-29 13:01 ` Thomas Abraham 0 siblings, 0 replies; 19+ messages in thread From: Thomas Abraham @ 2012-02-29 13:01 UTC (permalink / raw) To: linux-arm-kernel Hi Sangwook, On 29 February 2012 18:11, Sangwook Lee <sangwook.lee@linaro.org> wrote: > Enable burst transfer from AHB for EHCI. > This fixes data transfer of USB Ethernet with EHCI. > Without this patch, scp hardly works. > > Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> > --- > ?arch/arm/mach-exynos/setup-usb-phy.c ? ? ?| ? ?6 ++++++ > ?arch/arm/plat-samsung/devs.c ? ? ? ? ? ? ?| ? ?2 ++ > ?arch/arm/plat-samsung/include/plat/ehci.h | ? 19 +++++++++++++++++++ > ?3 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c > index 41743d2..5a20460 100644 > --- a/arch/arm/mach-exynos/setup-usb-phy.c > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > @@ -18,6 +18,7 @@ > ?#include <mach/regs-usb-phy.h> > ?#include <plat/cpu.h> > ?#include <plat/usb-phy.h> > +#include <plat/ehci.h> > > ?static atomic_t host_usage; > > @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) > > ? ? ? ?return -EINVAL; > ?} > + > +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) > +{ > + ? ? ? writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > +} This functionality can be added in ehci-s5p itself and avoid adding a new platform callback in platform data. If this is specific to exynos, driver data could be added in ehci-s5p to indicate platforms that need this to be enabled. Thanks, Thomas. [...] ^ permalink raw reply [flat|nested] 19+ messages in thread
* RE: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 13:01 ` Thomas Abraham @ 2012-02-29 13:13 ` Jingoo Han -1 siblings, 0 replies; 19+ messages in thread From: Jingoo Han @ 2012-02-29 13:13 UTC (permalink / raw) To: 'Thomas Abraham', 'Sangwook Lee' Cc: linux-samsung-soc, linux-usb, linux-arm-kernel, ben-linux, gregkh, kgene.kim, stern, jy0922.shim, patches, linaro-dev, linux Hi, > -----Original Message----- > From: Thomas Abraham [mailto:thomas.abraham@linaro.org] > Sent: Wednesday, February 29, 2012 10:02 PM > To: Sangwook Lee > Cc: linux-samsung-soc@vger.kernel.org; linux-usb@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > ben-linux@fluff.org; gregkh@suse.de; kgene.kim@samsung.com; stern@rowland.harvard.edu; > jg1.han@samsung.com; jy0922.shim@samsung.com; patches@linaro.org; linaro-dev@lists.linaro.org; > linux@arm.linux.org.uk > Subject: Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function > > Hi Sangwook, > > On 29 February 2012 18:11, Sangwook Lee <sangwook.lee@linaro.org> wrote: > > Enable burst transfer from AHB for EHCI. > > This fixes data transfer of USB Ethernet with EHCI. > > Without this patch, scp hardly works. > > > > Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> > > --- > > arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ > > arch/arm/plat-samsung/devs.c | 2 ++ > > arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ > > 3 files changed, 27 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c > > index 41743d2..5a20460 100644 > > --- a/arch/arm/mach-exynos/setup-usb-phy.c > > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > > @@ -18,6 +18,7 @@ > > #include <mach/regs-usb-phy.h> > > #include <plat/cpu.h> > > #include <plat/usb-phy.h> > > +#include <plat/ehci.h> > > > > static atomic_t host_usage; > > > > @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) > > > > return -EINVAL; > > } > > + > > +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) > > +{ > > + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > > +} > > This functionality can be added in ehci-s5p itself and avoid adding a > new platform callback in platform data. If this is specific to exynos, > driver data could be added in ehci-s5p to indicate platforms that need > this to be enabled. I agree with Thomas's opinion. Sangwook, please don't call s5p_ehci_burst_enable using platform callback. It can be added to ehci-s5p itself. > > Thanks, > Thomas. > > [...] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-02-29 13:13 ` Jingoo Han 0 siblings, 0 replies; 19+ messages in thread From: Jingoo Han @ 2012-02-29 13:13 UTC (permalink / raw) To: linux-arm-kernel Hi, > -----Original Message----- > From: Thomas Abraham [mailto:thomas.abraham at linaro.org] > Sent: Wednesday, February 29, 2012 10:02 PM > To: Sangwook Lee > Cc: linux-samsung-soc at vger.kernel.org; linux-usb at vger.kernel.org; linux-arm-kernel at lists.infradead.org; > ben-linux at fluff.org; gregkh at suse.de; kgene.kim at samsung.com; stern at rowland.harvard.edu; > jg1.han at samsung.com; jy0922.shim at samsung.com; patches at linaro.org; linaro-dev at lists.linaro.org; > linux at arm.linux.org.uk > Subject: Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function > > Hi Sangwook, > > On 29 February 2012 18:11, Sangwook Lee <sangwook.lee@linaro.org> wrote: > > Enable burst transfer from AHB for EHCI. > > This fixes data transfer of USB Ethernet with EHCI. > > Without this patch, scp hardly works. > > > > Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> > > --- > > ?arch/arm/mach-exynos/setup-usb-phy.c ? ? ?| ? ?6 ++++++ > > ?arch/arm/plat-samsung/devs.c ? ? ? ? ? ? ?| ? ?2 ++ > > ?arch/arm/plat-samsung/include/plat/ehci.h | ? 19 +++++++++++++++++++ > > ?3 files changed, 27 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c > > index 41743d2..5a20460 100644 > > --- a/arch/arm/mach-exynos/setup-usb-phy.c > > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > > @@ -18,6 +18,7 @@ > > ?#include <mach/regs-usb-phy.h> > > ?#include <plat/cpu.h> > > ?#include <plat/usb-phy.h> > > +#include <plat/ehci.h> > > > > ?static atomic_t host_usage; > > > > @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) > > > > ? ? ? ?return -EINVAL; > > ?} > > + > > +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) > > +{ > > + ? ? ? writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > > +} > > This functionality can be added in ehci-s5p itself and avoid adding a > new platform callback in platform data. If this is specific to exynos, > driver data could be added in ehci-s5p to indicate platforms that need > this to be enabled. I agree with Thomas's opinion. Sangwook, please don't call s5p_ehci_burst_enable using platform callback. It can be added to ehci-s5p itself. > > Thanks, > Thomas. > > [...] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 13:01 ` Thomas Abraham @ 2012-02-29 14:27 ` Sangwook Lee -1 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 14:27 UTC (permalink / raw) To: Thomas Abraham Cc: linux-samsung-soc, linux-usb, linux-arm-kernel, ben-linux, gregkh, kgene.kim, stern, jg1.han, jy0922.shim, patches, linaro-dev, linux On 29/02/12 13:01, Thomas Abraham wrote: > Hi Sangwook, > > On 29 February 2012 18:11, Sangwook Lee<sangwook.lee@linaro.org> wrote: >> Enable burst transfer from AHB for EHCI. >> This fixes data transfer of USB Ethernet with EHCI. >> Without this patch, scp hardly works. >> >> Signed-off-by: Sangwook Lee<sangwook.lee@linaro.org> >> --- >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ >> arch/arm/plat-samsung/devs.c | 2 ++ >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ >> 3 files changed, 27 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c >> index 41743d2..5a20460 100644 >> --- a/arch/arm/mach-exynos/setup-usb-phy.c >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c >> @@ -18,6 +18,7 @@ >> #include<mach/regs-usb-phy.h> >> #include<plat/cpu.h> >> #include<plat/usb-phy.h> >> +#include<plat/ehci.h> >> >> static atomic_t host_usage; >> >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) >> >> return -EINVAL; >> } >> + >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) >> +{ >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); >> +} > > This functionality can be added in ehci-s5p itself and avoid adding a > new platform callback in platform data. If this is specific to exynos, > driver data could be added in ehci-s5p to indicate platforms that need > this to be enabled. it makes sense. > > Thanks, > Thomas. > > [...] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-02-29 14:27 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 14:27 UTC (permalink / raw) To: linux-arm-kernel On 29/02/12 13:01, Thomas Abraham wrote: > Hi Sangwook, > > On 29 February 2012 18:11, Sangwook Lee<sangwook.lee@linaro.org> wrote: >> Enable burst transfer from AHB for EHCI. >> This fixes data transfer of USB Ethernet with EHCI. >> Without this patch, scp hardly works. >> >> Signed-off-by: Sangwook Lee<sangwook.lee@linaro.org> >> --- >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ >> arch/arm/plat-samsung/devs.c | 2 ++ >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ >> 3 files changed, 27 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c >> index 41743d2..5a20460 100644 >> --- a/arch/arm/mach-exynos/setup-usb-phy.c >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c >> @@ -18,6 +18,7 @@ >> #include<mach/regs-usb-phy.h> >> #include<plat/cpu.h> >> #include<plat/usb-phy.h> >> +#include<plat/ehci.h> >> >> static atomic_t host_usage; >> >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) >> >> return -EINVAL; >> } >> + >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) >> +{ >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); >> +} > > This functionality can be added in ehci-s5p itself and avoid adding a > new platform callback in platform data. If this is specific to exynos, > driver data could be added in ehci-s5p to indicate platforms that need > this to be enabled. it makes sense. > > Thanks, > Thomas. > > [...] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 13:01 ` Thomas Abraham @ 2012-03-01 3:24 ` Tushar Behera -1 siblings, 0 replies; 19+ messages in thread From: Tushar Behera @ 2012-03-01 3:24 UTC (permalink / raw) To: Thomas Abraham Cc: Sangwook Lee, linux-samsung-soc, linux-usb, linux-arm-kernel, ben-linux, gregkh, kgene.kim, stern, jg1.han, jy0922.shim, patches, linaro-dev, linux On 02/29/2012 06:31 PM, Thomas Abraham wrote: > Hi Sangwook, > > On 29 February 2012 18:11, Sangwook Lee <sangwook.lee@linaro.org> wrote: >> Enable burst transfer from AHB for EHCI. >> This fixes data transfer of USB Ethernet with EHCI. >> Without this patch, scp hardly works. >> >> Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> >> --- >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ >> arch/arm/plat-samsung/devs.c | 2 ++ >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ >> 3 files changed, 27 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c >> index 41743d2..5a20460 100644 >> --- a/arch/arm/mach-exynos/setup-usb-phy.c >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c >> @@ -18,6 +18,7 @@ >> #include <mach/regs-usb-phy.h> >> #include <plat/cpu.h> >> #include <plat/usb-phy.h> >> +#include <plat/ehci.h> >> >> static atomic_t host_usage; >> >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) >> >> return -EINVAL; >> } >> + >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) >> +{ >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); >> +} > > This functionality can be added in ehci-s5p itself and avoid adding a > new platform callback in platform data. If this is specific to exynos, > driver data could be added in ehci-s5p to indicate platforms that need > this to be enabled. > Am I right in assuming that ehci-s5p driver can also be used for mach-s5pv210? The related bit-fields are reserved in S5PV210. So, won't it cause any side-effects? > Thanks, > Thomas. > > [...] > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Tushar Behera ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-03-01 3:24 ` Tushar Behera 0 siblings, 0 replies; 19+ messages in thread From: Tushar Behera @ 2012-03-01 3:24 UTC (permalink / raw) To: linux-arm-kernel On 02/29/2012 06:31 PM, Thomas Abraham wrote: > Hi Sangwook, > > On 29 February 2012 18:11, Sangwook Lee <sangwook.lee@linaro.org> wrote: >> Enable burst transfer from AHB for EHCI. >> This fixes data transfer of USB Ethernet with EHCI. >> Without this patch, scp hardly works. >> >> Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> >> --- >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ >> arch/arm/plat-samsung/devs.c | 2 ++ >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ >> 3 files changed, 27 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c >> index 41743d2..5a20460 100644 >> --- a/arch/arm/mach-exynos/setup-usb-phy.c >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c >> @@ -18,6 +18,7 @@ >> #include <mach/regs-usb-phy.h> >> #include <plat/cpu.h> >> #include <plat/usb-phy.h> >> +#include <plat/ehci.h> >> >> static atomic_t host_usage; >> >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) >> >> return -EINVAL; >> } >> + >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) >> +{ >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); >> +} > > This functionality can be added in ehci-s5p itself and avoid adding a > new platform callback in platform data. If this is specific to exynos, > driver data could be added in ehci-s5p to indicate platforms that need > this to be enabled. > Am I right in assuming that ehci-s5p driver can also be used for mach-s5pv210? The related bit-fields are reserved in S5PV210. So, won't it cause any side-effects? > Thanks, > Thomas. > > [...] > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Tushar Behera ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <4F4EEC06.8010400-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function [not found] ` <4F4EEC06.8010400-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2012-03-01 9:18 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-03-01 9:18 UTC (permalink / raw) To: Tushar Behera Cc: jg1.han-Sze3O3UU22JBDgjK7y7TUQ, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linaro-dev-cunTk1MwBs8s++Sfvej+rw, jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-lFZ/pmaqli7XmaaqVzeoHQ, kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, gregkh-l3A5Bk7waGM, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r [-- Attachment #1.1: Type: text/plain, Size: 2297 bytes --] On 1 March 2012 03:24, Tushar Behera <tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > On 02/29/2012 06:31 PM, Thomas Abraham wrote: > > Hi Sangwook, > > > > On 29 February 2012 18:11, Sangwook Lee <sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > >> Enable burst transfer from AHB for EHCI. > >> This fixes data transfer of USB Ethernet with EHCI. > >> Without this patch, scp hardly works. > >> > >> Signed-off-by: Sangwook Lee <sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > >> --- > >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ > >> arch/arm/plat-samsung/devs.c | 2 ++ > >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ > >> 3 files changed, 27 insertions(+), 0 deletions(-) > >> > >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c > b/arch/arm/mach-exynos/setup-usb-phy.c > >> index 41743d2..5a20460 100644 > >> --- a/arch/arm/mach-exynos/setup-usb-phy.c > >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c > >> @@ -18,6 +18,7 @@ > >> #include <mach/regs-usb-phy.h> > >> #include <plat/cpu.h> > >> #include <plat/usb-phy.h> > >> +#include <plat/ehci.h> > >> > >> static atomic_t host_usage; > >> > >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, > int type) > >> > >> return -EINVAL; > >> } > >> + > >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem > *base) > >> +{ > >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > >> +} > > > > This functionality can be added in ehci-s5p itself and avoid adding a > > new platform callback in platform data. If this is specific to exynos, > > driver data could be added in ehci-s5p to indicate platforms that need > > this to be enabled. > > > Am I right in assuming that ehci-s5p driver can also be used for > mach-s5pv210? > > The related bit-fields are reserved in S5PV210. So, won't it cause any > side-effects? > > do we use ehci-s5p.c in CPU 64xx series ? > > > Thanks, > > Thomas. > > > > [...] > > -- > > To unsubscribe from this list: send the line "unsubscribe > linux-samsung-soc" in > > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- > Tushar Behera > [-- Attachment #1.2: Type: text/html, Size: 3526 bytes --] [-- Attachment #2: Type: text/plain, Size: 175 bytes --] _______________________________________________ linaro-dev mailing list linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org http://lists.linaro.org/mailman/listinfo/linaro-dev ^ permalink raw reply [flat|nested] 19+ messages in thread
* RE: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 12:41 ` Sangwook Lee @ 2012-02-29 13:23 ` Jingoo Han -1 siblings, 0 replies; 19+ messages in thread From: Jingoo Han @ 2012-02-29 13:23 UTC (permalink / raw) To: 'Sangwook Lee', linux-samsung-soc, linux-usb, linux-arm-kernel Cc: ben-linux, gregkh, kgene.kim, stern, jy0922.shim, patches, linaro-dev, linux, 'Jingoo Han' Hi, Sangwook. I know what you want to add. I'll send new patch which can enable EHCI burst mode. This new patch will not use platform data callback and different machine directory file to include EHCI INSNREG00 definitions. Also, comment will be modified properly. Thank you. Best regards, Jingoo Han. > -----Original Message----- > From: Sangwook Lee [mailto:sangwook.lee@linaro.org] > Sent: Wednesday, February 29, 2012 9:41 PM > To: linux-samsung-soc@vger.kernel.org; linux-usb@vger.kernel.org; linux-arm-kernel@lists.infradead.org > Cc: ben-linux@fluff.org; gregkh@suse.de; kgene.kim@samsung.com; stern@rowland.harvard.edu; > jg1.han@samsung.com; jy0922.shim@samsung.com; patches@linaro.org; linaro-dev@lists.linaro.org; > linux@arm.linux.org.uk; Sangwook Lee > Subject: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function > > Enable burst transfer from AHB for EHCI. > This fixes data transfer of USB Ethernet with EHCI. > Without this patch, scp hardly works. > > Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> > --- > arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ > arch/arm/plat-samsung/devs.c | 2 ++ > arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ > 3 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c > index 41743d2..5a20460 100644 > --- a/arch/arm/mach-exynos/setup-usb-phy.c > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > @@ -18,6 +18,7 @@ > #include <mach/regs-usb-phy.h> > #include <plat/cpu.h> > #include <plat/usb-phy.h> > +#include <plat/ehci.h> > > static atomic_t host_usage; > > @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) > > return -EINVAL; > } > + > +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) > +{ > + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > +} > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c > index f10768e..8fd1bd3 100644 > --- a/arch/arm/plat-samsung/devs.c > +++ b/arch/arm/plat-samsung/devs.c > @@ -1402,6 +1402,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) > npd->phy_init = s5p_usb_phy_init; > if (!npd->phy_exit) > npd->phy_exit = s5p_usb_phy_exit; > + if (!npd->burst_enable) > + npd->burst_enable = s5p_ehci_burst_enable; > } > #endif /* CONFIG_S5P_DEV_USB_EHCI */ > > diff --git a/arch/arm/plat-samsung/include/plat/ehci.h b/arch/arm/plat-samsung/include/plat/ehci.h > index 5f28cae..9c866b7 100644 > --- a/arch/arm/plat-samsung/include/plat/ehci.h > +++ b/arch/arm/plat-samsung/include/plat/ehci.h > @@ -14,8 +14,27 @@ > struct s5p_ehci_platdata { > int (*phy_init)(struct platform_device *pdev, int type); > int (*phy_exit)(struct platform_device *pdev, int type); > + void (*burst_enable)(struct platform_device *pdev, void __iomem *base); > }; > > extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); > +extern void s5p_ehci_burst_enable(struct platform_device *pdev, > + void __iomem *base); > + > +/* EHCI EXYNOS specific register */ > +#define EHCI_INSNREG00 0x90 > + > +/* > + * EHCI INSNREG00 Specific fields > + * Enable AHB master to use burst transfer from 4 to 16 > + */ > +#define EHCI_INSNREG00_ENABLE_INCR16 (1 << 25) > +#define EHCI_INSNREG00_ENABLE_INCR8 (1 << 24) > +#define EHCI_INSNREG00_ENABLE_INCR4 (1 << 23) > +/* Force AHB master to start burst transfer only for 4,8,16 alignment */ > +#define EHCI_INSNREG00_ENABLE_INCRX_ALIGN (1 << 22) > +#define EHCI_INSNREG00_ENABLE_BURST \ > + (EHCI_INSNREG00_ENABLE_INCR16 | EHCI_INSNREG00_ENABLE_INCR8 | \ > + EHCI_INSNREG00_ENABLE_INCR4 | EHCI_INSNREG00_ENABLE_INCRX_ALIGN) > > #endif /* __PLAT_SAMSUNG_EHCI_H */ > -- > 1.7.4.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-02-29 13:23 ` Jingoo Han 0 siblings, 0 replies; 19+ messages in thread From: Jingoo Han @ 2012-02-29 13:23 UTC (permalink / raw) To: linux-arm-kernel Hi, Sangwook. I know what you want to add. I'll send new patch which can enable EHCI burst mode. This new patch will not use platform data callback and different machine directory file to include EHCI INSNREG00 definitions. Also, comment will be modified properly. Thank you. Best regards, Jingoo Han. > -----Original Message----- > From: Sangwook Lee [mailto:sangwook.lee at linaro.org] > Sent: Wednesday, February 29, 2012 9:41 PM > To: linux-samsung-soc at vger.kernel.org; linux-usb at vger.kernel.org; linux-arm-kernel at lists.infradead.org > Cc: ben-linux at fluff.org; gregkh at suse.de; kgene.kim at samsung.com; stern at rowland.harvard.edu; > jg1.han at samsung.com; jy0922.shim at samsung.com; patches at linaro.org; linaro-dev at lists.linaro.org; > linux at arm.linux.org.uk; Sangwook Lee > Subject: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function > > Enable burst transfer from AHB for EHCI. > This fixes data transfer of USB Ethernet with EHCI. > Without this patch, scp hardly works. > > Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> > --- > arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ > arch/arm/plat-samsung/devs.c | 2 ++ > arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ > 3 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c > index 41743d2..5a20460 100644 > --- a/arch/arm/mach-exynos/setup-usb-phy.c > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > @@ -18,6 +18,7 @@ > #include <mach/regs-usb-phy.h> > #include <plat/cpu.h> > #include <plat/usb-phy.h> > +#include <plat/ehci.h> > > static atomic_t host_usage; > > @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) > > return -EINVAL; > } > + > +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) > +{ > + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); > +} > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c > index f10768e..8fd1bd3 100644 > --- a/arch/arm/plat-samsung/devs.c > +++ b/arch/arm/plat-samsung/devs.c > @@ -1402,6 +1402,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) > npd->phy_init = s5p_usb_phy_init; > if (!npd->phy_exit) > npd->phy_exit = s5p_usb_phy_exit; > + if (!npd->burst_enable) > + npd->burst_enable = s5p_ehci_burst_enable; > } > #endif /* CONFIG_S5P_DEV_USB_EHCI */ > > diff --git a/arch/arm/plat-samsung/include/plat/ehci.h b/arch/arm/plat-samsung/include/plat/ehci.h > index 5f28cae..9c866b7 100644 > --- a/arch/arm/plat-samsung/include/plat/ehci.h > +++ b/arch/arm/plat-samsung/include/plat/ehci.h > @@ -14,8 +14,27 @@ > struct s5p_ehci_platdata { > int (*phy_init)(struct platform_device *pdev, int type); > int (*phy_exit)(struct platform_device *pdev, int type); > + void (*burst_enable)(struct platform_device *pdev, void __iomem *base); > }; > > extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); > +extern void s5p_ehci_burst_enable(struct platform_device *pdev, > + void __iomem *base); > + > +/* EHCI EXYNOS specific register */ > +#define EHCI_INSNREG00 0x90 > + > +/* > + * EHCI INSNREG00 Specific fields > + * Enable AHB master to use burst transfer from 4 to 16 > + */ > +#define EHCI_INSNREG00_ENABLE_INCR16 (1 << 25) > +#define EHCI_INSNREG00_ENABLE_INCR8 (1 << 24) > +#define EHCI_INSNREG00_ENABLE_INCR4 (1 << 23) > +/* Force AHB master to start burst transfer only for 4,8,16 alignment */ > +#define EHCI_INSNREG00_ENABLE_INCRX_ALIGN (1 << 22) > +#define EHCI_INSNREG00_ENABLE_BURST \ > + (EHCI_INSNREG00_ENABLE_INCR16 | EHCI_INSNREG00_ENABLE_INCR8 | \ > + EHCI_INSNREG00_ENABLE_INCR4 | EHCI_INSNREG00_ENABLE_INCRX_ALIGN) > > #endif /* __PLAT_SAMSUNG_EHCI_H */ > -- > 1.7.4.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <000701ccf6e5$63bb6170$2b322450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>]
* Re: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function 2012-02-29 13:23 ` Jingoo Han @ 2012-02-29 14:21 ` Sangwook Lee -1 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 14:21 UTC (permalink / raw) To: Jingoo Han Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, ben-linux-elnMNo+KYs3YtjvyW6yDsg, gregkh-l3A5Bk7waGM, kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A, linaro-dev-cunTk1MwBs8s++Sfvej+rw, linux-lFZ/pmaqli7XmaaqVzeoHQ Hi Jingoo On 29/02/12 13:23, Jingoo Han wrote: > Hi, Sangwook. > > I know what you want to add. > I'll send new patch which can enable EHCI burst mode. Great ! Thanks Sangwook > This new patch will not use platform data callback and different machine directory > file to include EHCI INSNREG00 definitions. > Also, comment will be modified properly. > > > Thank you. > > Best regards, > Jingoo Han. > >> -----Original Message----- >> From: Sangwook Lee [mailto:sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org] >> Sent: Wednesday, February 29, 2012 9:41 PM >> To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org >> Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org; gregkh-l3A5Bk7waGM@public.gmane.org; kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org; stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org; >> jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org; jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org; patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org; linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org; >> linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org; Sangwook Lee >> Subject: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function >> >> Enable burst transfer from AHB for EHCI. >> This fixes data transfer of USB Ethernet with EHCI. >> Without this patch, scp hardly works. >> >> Signed-off-by: Sangwook Lee<sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> >> --- >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ >> arch/arm/plat-samsung/devs.c | 2 ++ >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ >> 3 files changed, 27 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c >> index 41743d2..5a20460 100644 >> --- a/arch/arm/mach-exynos/setup-usb-phy.c >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c >> @@ -18,6 +18,7 @@ >> #include<mach/regs-usb-phy.h> >> #include<plat/cpu.h> >> #include<plat/usb-phy.h> >> +#include<plat/ehci.h> >> >> static atomic_t host_usage; >> >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) >> >> return -EINVAL; >> } >> + >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) >> +{ >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); >> +} >> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c >> index f10768e..8fd1bd3 100644 >> --- a/arch/arm/plat-samsung/devs.c >> +++ b/arch/arm/plat-samsung/devs.c >> @@ -1402,6 +1402,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) >> npd->phy_init = s5p_usb_phy_init; >> if (!npd->phy_exit) >> npd->phy_exit = s5p_usb_phy_exit; >> + if (!npd->burst_enable) >> + npd->burst_enable = s5p_ehci_burst_enable; >> } >> #endif /* CONFIG_S5P_DEV_USB_EHCI */ >> >> diff --git a/arch/arm/plat-samsung/include/plat/ehci.h b/arch/arm/plat-samsung/include/plat/ehci.h >> index 5f28cae..9c866b7 100644 >> --- a/arch/arm/plat-samsung/include/plat/ehci.h >> +++ b/arch/arm/plat-samsung/include/plat/ehci.h >> @@ -14,8 +14,27 @@ >> struct s5p_ehci_platdata { >> int (*phy_init)(struct platform_device *pdev, int type); >> int (*phy_exit)(struct platform_device *pdev, int type); >> + void (*burst_enable)(struct platform_device *pdev, void __iomem *base); >> }; >> >> extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); >> +extern void s5p_ehci_burst_enable(struct platform_device *pdev, >> + void __iomem *base); >> + >> +/* EHCI EXYNOS specific register */ >> +#define EHCI_INSNREG00 0x90 >> + >> +/* >> + * EHCI INSNREG00 Specific fields >> + * Enable AHB master to use burst transfer from 4 to 16 >> + */ >> +#define EHCI_INSNREG00_ENABLE_INCR16 (1<< 25) >> +#define EHCI_INSNREG00_ENABLE_INCR8 (1<< 24) >> +#define EHCI_INSNREG00_ENABLE_INCR4 (1<< 23) >> +/* Force AHB master to start burst transfer only for 4,8,16 alignment */ >> +#define EHCI_INSNREG00_ENABLE_INCRX_ALIGN (1<< 22) >> +#define EHCI_INSNREG00_ENABLE_BURST \ >> + (EHCI_INSNREG00_ENABLE_INCR16 | EHCI_INSNREG00_ENABLE_INCR8 | \ >> + EHCI_INSNREG00_ENABLE_INCR4 | EHCI_INSNREG00_ENABLE_INCRX_ALIGN) >> >> #endif /* __PLAT_SAMSUNG_EHCI_H */ >> -- >> 1.7.4.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function @ 2012-02-29 14:21 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 14:21 UTC (permalink / raw) To: linux-arm-kernel Hi Jingoo On 29/02/12 13:23, Jingoo Han wrote: > Hi, Sangwook. > > I know what you want to add. > I'll send new patch which can enable EHCI burst mode. Great ! Thanks Sangwook > This new patch will not use platform data callback and different machine directory > file to include EHCI INSNREG00 definitions. > Also, comment will be modified properly. > > > Thank you. > > Best regards, > Jingoo Han. > >> -----Original Message----- >> From: Sangwook Lee [mailto:sangwook.lee at linaro.org] >> Sent: Wednesday, February 29, 2012 9:41 PM >> To: linux-samsung-soc at vger.kernel.org; linux-usb at vger.kernel.org; linux-arm-kernel at lists.infradead.org >> Cc: ben-linux at fluff.org; gregkh at suse.de; kgene.kim at samsung.com; stern at rowland.harvard.edu; >> jg1.han at samsung.com; jy0922.shim at samsung.com; patches at linaro.org; linaro-dev at lists.linaro.org; >> linux at arm.linux.org.uk; Sangwook Lee >> Subject: [PATCH 1/2] ARM: EXYNOS: Add EHCI AHB burst function >> >> Enable burst transfer from AHB for EHCI. >> This fixes data transfer of USB Ethernet with EHCI. >> Without this patch, scp hardly works. >> >> Signed-off-by: Sangwook Lee<sangwook.lee@linaro.org> >> --- >> arch/arm/mach-exynos/setup-usb-phy.c | 6 ++++++ >> arch/arm/plat-samsung/devs.c | 2 ++ >> arch/arm/plat-samsung/include/plat/ehci.h | 19 +++++++++++++++++++ >> 3 files changed, 27 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c >> index 41743d2..5a20460 100644 >> --- a/arch/arm/mach-exynos/setup-usb-phy.c >> +++ b/arch/arm/mach-exynos/setup-usb-phy.c >> @@ -18,6 +18,7 @@ >> #include<mach/regs-usb-phy.h> >> #include<plat/cpu.h> >> #include<plat/usb-phy.h> >> +#include<plat/ehci.h> >> >> static atomic_t host_usage; >> >> @@ -149,3 +150,8 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) >> >> return -EINVAL; >> } >> + >> +void s5p_ehci_burst_enable(struct platform_device *pdev, void __iomem *base) >> +{ >> + writel(EHCI_INSNREG00_ENABLE_BURST, base + EHCI_INSNREG00); >> +} >> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c >> index f10768e..8fd1bd3 100644 >> --- a/arch/arm/plat-samsung/devs.c >> +++ b/arch/arm/plat-samsung/devs.c >> @@ -1402,6 +1402,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) >> npd->phy_init = s5p_usb_phy_init; >> if (!npd->phy_exit) >> npd->phy_exit = s5p_usb_phy_exit; >> + if (!npd->burst_enable) >> + npd->burst_enable = s5p_ehci_burst_enable; >> } >> #endif /* CONFIG_S5P_DEV_USB_EHCI */ >> >> diff --git a/arch/arm/plat-samsung/include/plat/ehci.h b/arch/arm/plat-samsung/include/plat/ehci.h >> index 5f28cae..9c866b7 100644 >> --- a/arch/arm/plat-samsung/include/plat/ehci.h >> +++ b/arch/arm/plat-samsung/include/plat/ehci.h >> @@ -14,8 +14,27 @@ >> struct s5p_ehci_platdata { >> int (*phy_init)(struct platform_device *pdev, int type); >> int (*phy_exit)(struct platform_device *pdev, int type); >> + void (*burst_enable)(struct platform_device *pdev, void __iomem *base); >> }; >> >> extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); >> +extern void s5p_ehci_burst_enable(struct platform_device *pdev, >> + void __iomem *base); >> + >> +/* EHCI EXYNOS specific register */ >> +#define EHCI_INSNREG00 0x90 >> + >> +/* >> + * EHCI INSNREG00 Specific fields >> + * Enable AHB master to use burst transfer from 4 to 16 >> + */ >> +#define EHCI_INSNREG00_ENABLE_INCR16 (1<< 25) >> +#define EHCI_INSNREG00_ENABLE_INCR8 (1<< 24) >> +#define EHCI_INSNREG00_ENABLE_INCR4 (1<< 23) >> +/* Force AHB master to start burst transfer only for 4,8,16 alignment */ >> +#define EHCI_INSNREG00_ENABLE_INCRX_ALIGN (1<< 22) >> +#define EHCI_INSNREG00_ENABLE_BURST \ >> + (EHCI_INSNREG00_ENABLE_INCR16 | EHCI_INSNREG00_ENABLE_INCR8 | \ >> + EHCI_INSNREG00_ENABLE_INCR4 | EHCI_INSNREG00_ENABLE_INCRX_ALIGN) >> >> #endif /* __PLAT_SAMSUNG_EHCI_H */ >> -- >> 1.7.4.1 > ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/2] USB: ehci-s5p: add function for burst 2012-02-29 12:41 ` Sangwook Lee @ 2012-02-29 12:41 ` Sangwook Lee -1 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 12:41 UTC (permalink / raw) To: linux-samsung-soc, linux-usb, linux-arm-kernel Cc: ben-linux, gregkh, kgene.kim, stern, jg1.han, jy0922.shim, patches, linaro-dev, linux, Sangwook Lee Add platform specific function for EHCI burst function Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> --- drivers/usb/host/ehci-s5p.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 293f741..c5eb0ce 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c @@ -134,6 +134,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev) /* cache this readonly data; minimize chip reads */ ehci->hcs_params = readl(&ehci->caps->hcs_params); + if (pdata->burst_enable) + pdata->burst_enable(pdev, hcd->regs); + ehci_reset(ehci); err = usb_add_hcd(hcd, irq, IRQF_SHARED); -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/2] USB: ehci-s5p: add function for burst @ 2012-02-29 12:41 ` Sangwook Lee 0 siblings, 0 replies; 19+ messages in thread From: Sangwook Lee @ 2012-02-29 12:41 UTC (permalink / raw) To: linux-arm-kernel Add platform specific function for EHCI burst function Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> --- drivers/usb/host/ehci-s5p.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 293f741..c5eb0ce 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c @@ -134,6 +134,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev) /* cache this readonly data; minimize chip reads */ ehci->hcs_params = readl(&ehci->caps->hcs_params); + if (pdata->burst_enable) + pdata->burst_enable(pdev, hcd->regs); + ehci_reset(ehci); err = usb_add_hcd(hcd, irq, IRQF_SHARED); -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
end of thread, other threads:[~2012-03-01 9:18 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 12:41 [PATCH 0/2] add ehci-s5p AHB burst function Sangwook Lee
2012-02-29 12:41 ` Sangwook Lee
[not found] ` <1330519283-4722-1-git-send-email-sangwook.lee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-02-29 12:41 ` [PATCH 1/2] ARM: EXYNOS: Add EHCI " Sangwook Lee
2012-02-29 12:41 ` Sangwook Lee
2012-02-29 13:01 ` Thomas Abraham
2012-02-29 13:01 ` Thomas Abraham
2012-02-29 13:13 ` Jingoo Han
2012-02-29 13:13 ` Jingoo Han
2012-02-29 14:27 ` Sangwook Lee
2012-02-29 14:27 ` Sangwook Lee
2012-03-01 3:24 ` Tushar Behera
2012-03-01 3:24 ` Tushar Behera
[not found] ` <4F4EEC06.8010400-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-03-01 9:18 ` Sangwook Lee
2012-02-29 13:23 ` Jingoo Han
2012-02-29 13:23 ` Jingoo Han
[not found] ` <000701ccf6e5$63bb6170$2b322450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-02-29 14:21 ` Sangwook Lee
2012-02-29 14:21 ` Sangwook Lee
2012-02-29 12:41 ` [PATCH 2/2] USB: ehci-s5p: add function for burst Sangwook Lee
2012-02-29 12:41 ` Sangwook Lee
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.