All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB
@ 2018-02-21  9:48 Alexey Brodkin
  2018-02-21 10:01 ` Calvin Johnson
  2018-02-21 19:25 ` Marek Vasut
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Brodkin @ 2018-02-21  9:48 UTC (permalink / raw)
  To: u-boot

If we use hardware with very small RAM (let's consider just a couple
of hundreds of kB but not megabytes) it is not super convenient to lose
64kB for statically allocated bufer which most probably won't be used
as big as it is. Typically we'll have much shorter data packages to
excahnge and in the worst case longer packets will be split on separate
transactions.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Marek Vasut <marex@denx.de>
---
 drivers/usb/host/dwc2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 0efe645044c5..20cd4a6d3d55 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define DWC2_HC_CHANNEL			0
 
 #define DWC2_STATUS_BUF_SIZE		64
-#define DWC2_DATA_BUF_SIZE		(64 * 1024)
+#define DWC2_DATA_BUF_SIZE		(16 * 1024)
 
 #define MAX_DEVICE			16
 #define MAX_ENDPOINT			16
-- 
2.14.3

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

* [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB
  2018-02-21  9:48 [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB Alexey Brodkin
@ 2018-02-21 10:01 ` Calvin Johnson
  2018-02-21 19:25 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Calvin Johnson @ 2018-02-21 10:01 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Alexey
> Brodkin
> Sent: Wednesday, February 21, 2018 3:18 PM
> To: u-boot at lists.denx.de
> Cc: Marek Vasut <marex@denx.de>; Alexey Brodkin
> <Alexey.Brodkin@synopsys.com>
> Subject: [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB
> 
> If we use hardware with very small RAM (let's consider just a couple
> of hundreds of kB but not megabytes) it is not super convenient to lose
> 64kB for statically allocated bufer which most probably won't be used
> as big as it is. Typically we'll have much shorter data packages to
> excahnge and in the worst case longer packets will be split on separate

s/ excahnge /exchange

Regards
Calvin

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

* [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB
  2018-02-21  9:48 [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB Alexey Brodkin
  2018-02-21 10:01 ` Calvin Johnson
@ 2018-02-21 19:25 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2018-02-21 19:25 UTC (permalink / raw)
  To: u-boot

On 02/21/2018 10:48 AM, Alexey Brodkin wrote:
> If we use hardware with very small RAM (let's consider just a couple
> of hundreds of kB but not megabytes) it is not super convenient to lose
> 64kB for statically allocated bufer which most probably won't be used
> as big as it is. Typically we'll have much shorter data packages to
> excahnge and in the worst case longer packets will be split on separate
> transactions.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Marek Vasut <marex@denx.de>

I think it does make sense to make this configurable with 64 kiB as
default and tweak your platform to 16 kiB in it's defconfig.

> ---
>  drivers/usb/host/dwc2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
> index 0efe645044c5..20cd4a6d3d55 100644
> --- a/drivers/usb/host/dwc2.c
> +++ b/drivers/usb/host/dwc2.c
> @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define DWC2_HC_CHANNEL			0
>  
>  #define DWC2_STATUS_BUF_SIZE		64
> -#define DWC2_DATA_BUF_SIZE		(64 * 1024)
> +#define DWC2_DATA_BUF_SIZE		(16 * 1024)
>  
>  #define MAX_DEVICE			16
>  #define MAX_ENDPOINT			16
> 


-- 
Best regards,
Marek Vasut

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

end of thread, other threads:[~2018-02-21 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21  9:48 [U-Boot] [PATCH] usb: dwc2: Reduce data buffer size to 16kB Alexey Brodkin
2018-02-21 10:01 ` Calvin Johnson
2018-02-21 19:25 ` Marek Vasut

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.