From 7f753cbea4c7cb56f278982c987570e6575d3dd7 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 10 Sep 2016 04:20:48 +0200 Subject: colibri_t30: fix usb ethernet functionality Since commit aa7a648747d8c704a9a81c9e493d386930724e9d ("net: Stop including NFS overhead in defragment max") the following has been reproducibly observed while trying to transfer data over TFTP: Load address: 0x80408000 Loading: EHCI timed out on TD - token=0x8008d80 T EHCI timed out on TD - token=0x88008d80 Rx: failed to receive: -5 This patch fixes this by upping our maximal de-fragmentation aka IP packet size again. Signed-off-by: Marcel Ziswiler --- include/configs/colibri_t30.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index fbb235d82c..3431cde62f 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -48,6 +48,7 @@ /* General networking support */ #define CONFIG_IP_DEFRAG +#define CONFIG_NET_MAXDEFRAG (16384 + 4096 + 24) #define CONFIG_TFTP_BLOCKSIZE 16384 #define CONFIG_TFTP_TSIZE -- cgit From e915716a5cdb40939204b3503f9356085e39fbd2 Mon Sep 17 00:00:00 2001 From: Sriram Dash Date: Mon, 22 Aug 2016 17:55:15 +0530 Subject: drivers: usb: xhci-fsl: Change burst beat and outstanding pipelined transfers requests This is required for better performance, and performs below tuning: 1. Enable burst length set, and define it as 4/8/16. 2. Set burst request limit to 16 requests. Signed-off-by: Rajesh Bhagat Signed-off-by: Sriram Dash --- include/linux/usb/xhci-fsl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/usb/xhci-fsl.h b/include/linux/usb/xhci-fsl.h index d04e3cc95a..15cac40e9d 100644 --- a/include/linux/usb/xhci-fsl.h +++ b/include/linux/usb/xhci-fsl.h @@ -20,6 +20,9 @@ #define USB3_PHY_TX_RX_POWERON (USB3_PHY_RX_POWERON | USB3_PHY_TX_POWERON) #define USB3_PWRCTL_CLK_CMD_SHIFT 14 #define USB3_PWRCTL_CLK_FREQ_SHIFT 22 +#define USB3_ENABLE_BEAT_BURST 0xF +#define USB3_ENABLE_BEAT_BURST_MASK 0xFF +#define USB3_SET_BEAT_BURST_LIMIT 0xF00 /* USBOTGSS_WRAPPER definitions */ #define USBOTGSS_WRAPRESET BIT(17) -- cgit From 05341a87646aceac90a63624fbd5fa620f8dc263 Mon Sep 17 00:00:00 2001 From: "B, Ravi" Date: Thu, 28 Jul 2016 17:39:15 +0530 Subject: common: dfu: saperate the dfu common functionality The cmd_dfu functionality is been used by both SPL and u-boot, saperating the core dfu functionality moving it to common/dfu.c. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- include/g_dnl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/g_dnl.h b/include/g_dnl.h index ba49f1f5cb..bd29a9f83a 100644 --- a/include/g_dnl.h +++ b/include/g_dnl.h @@ -43,5 +43,6 @@ void g_dnl_set_serialnumber(char *); bool g_dnl_detach(void); void g_dnl_trigger_detach(void); void g_dnl_clear_detach(void); +int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget); #endif /* __G_DOWNLOAD_H_ */ -- cgit From 52f2acc5e065b52499ee4a8e6baf886b8f5fa6da Mon Sep 17 00:00:00 2001 From: "B, Ravi" Date: Thu, 28 Jul 2016 17:39:16 +0530 Subject: spl: dfu: adding dfu support functions for SPL-DFU Adding support functions to run dfu spl commands. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- include/spl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/spl.h b/include/spl.h index 8afa0856c5..30eda36fef 100644 --- a/include/spl.h +++ b/include/spl.h @@ -144,4 +144,12 @@ void spl_board_init(void); */ bool spl_was_boot_source(void); +/** + * spl_dfu_cmd- run dfu command with chosen mmc device interface + * @param usb_index - usb controller number + * @param mmc_dev - mmc device nubmer + * + * @return 0 on success, otherwise error code + */ +int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr); #endif -- cgit From cdb1808aefbc7173d687cb03de15b8ee3a671743 Mon Sep 17 00:00:00 2001 From: "B, Ravi" Date: Thu, 28 Jul 2016 17:39:18 +0530 Subject: dra7x: configs: enable SPL-DFU support This patch enables the SPL-DFU support for dra7x platform. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- include/configs/dra7xx_evm.h | 20 +++++++++++++++++++- include/configs/ti_omap5_common.h | 2 -- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 194804c293..0726875569 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -132,6 +132,23 @@ #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 #endif +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_CMD_BOOTD +#ifdef CONFIG_SPL_DFU_SUPPORT +#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000 +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_HASH_SUPPORT +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "kernel ram 0x80200000 0x4000000;" \ + "fdt ram 0x80f80000 0x80000;" \ + "ramdisk ram 0x81000000 0x4000000\0" +#define DFUARGS \ + "dfu_bufsiz=0x10000\0" \ + DFU_ALT_INFO_RAM +#endif +#endif + #include /* Enhance our eMMC support / experience. */ @@ -209,9 +226,10 @@ #define CONFIG_USB_FUNCTION_DFU #define CONFIG_DFU_RAM +#ifndef CONFIG_SPL_BUILD #define CONFIG_DFU_MMC -#define CONFIG_DFU_RAM #define CONFIG_DFU_SF +#endif /* SATA */ #define CONFIG_BOARD_LATE_INIT diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index cbdf0bc0db..ea11226620 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -64,7 +64,6 @@ #define DFUARGS #endif -#ifndef CONFIG_SPL_BUILD #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ @@ -128,7 +127,6 @@ "setenv mmcroot /dev/mmcblk0p2 rw; " \ "run mmcboot;" \ "" -#endif /* * SPL related defines. The Public RAM memory map the ROM defines the -- cgit From f7c81e287954fd9048d4419006e8314b7b7c46d0 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 15 Sep 2016 00:54:00 +0200 Subject: apalis_t30: colibri_imx7: colibri_t30: fix ethernet functionality Since commit aa7a648747d8c704a9a81c9e493d386930724e9d ("net: Stop including NFS overhead in defragment max") the following has been reproducibly observed while trying to transfer data over TFTP: Load address: 0x80408000 Loading: EHCI timed out on TD - token=0x8008d80 T EHCI timed out on TD - token=0x88008d80 Rx: failed to receive: -5 This patch fixes this by lowering our TFTP block size to be within the standard maximal de-fragmentation aka IP packet size again. Signed-off-by: Marcel Ziswiler --- include/configs/apalis_t30.h | 2 +- include/configs/colibri_imx7.h | 4 ++-- include/configs/colibri_t30.h | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 8c76605f8b..3fc177906b 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -52,7 +52,7 @@ /* General networking support */ #define CONFIG_IP_DEFRAG -#define CONFIG_TFTP_BLOCKSIZE 16384 +#define CONFIG_TFTP_BLOCKSIZE 16352 #define CONFIG_TFTP_TSIZE /* Miscellaneous commands */ diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index ba1adea364..b628d11fe9 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -44,9 +44,9 @@ #define CONFIG_PHYLIB #define CONFIG_PHY_MICREL -#define CONFIG_TFTP_TSIZE #define CONFIG_IP_DEFRAG -#define CONFIG_TFTP_BLOCKSIZE 16384 +#define CONFIG_TFTP_BLOCKSIZE 16352 +#define CONFIG_TFTP_TSIZE /* ENET1 */ #define IMX_FEC_BASE ENET_IPS_BASE_ADDR diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 3431cde62f..e2a2549fb6 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -48,8 +48,7 @@ /* General networking support */ #define CONFIG_IP_DEFRAG -#define CONFIG_NET_MAXDEFRAG (16384 + 4096 + 24) -#define CONFIG_TFTP_BLOCKSIZE 16384 +#define CONFIG_TFTP_BLOCKSIZE 16352 #define CONFIG_TFTP_TSIZE /* Miscellaneous commands */ -- cgit From a5c289b9bca3805fa35e42f389dc8225c6b916be Mon Sep 17 00:00:00 2001 From: Sriram Dash Date: Fri, 16 Sep 2016 17:12:15 +0530 Subject: usb: fsl: Rename fdt_fixup_dr_usb The function fdt_fixup_dr_usb is specific to fsl/nxp. So, make the function name explicit and rename fdt_fixup_dr_usb into fsl_fdt_fixup_dr_usb. Signed-off-by: Sriram Dash --- include/fdt_support.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/fdt_support.h b/include/fdt_support.h index e9f3497ab6..8f402310f6 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -114,9 +114,9 @@ void fdt_fixup_qe_firmware(void *fdt); int fdt_fixup_display(void *blob, const char *path, const char *display); #if defined(CONFIG_USB_EHCI_FSL) || defined(CONFIG_USB_XHCI_FSL) -void fdt_fixup_dr_usb(void *blob, bd_t *bd); +void fsl_fdt_fixup_dr_usb(void *blob, bd_t *bd); #else -static inline void fdt_fixup_dr_usb(void *blob, bd_t *bd) {} +static inline void fsl_fdt_fixup_dr_usb(void *blob, bd_t *bd) {} #endif /* defined(CONFIG_USB_EHCI_FSL) || defined(CONFIG_USB_XHCI_FSL) */ #if defined(CONFIG_SYS_FSL_SEC_COMPAT) -- cgit From 4c043712e9910ef1d612aedbd8304a1f7348ef5f Mon Sep 17 00:00:00 2001 From: Sriram Dash Date: Fri, 23 Sep 2016 12:57:52 +0530 Subject: drivers: usb: xhci-fsl: Implement Erratum A-010151 for FSL USB3 controller Currently the controller by default enables the Receive Detect feature in P3 mode in USB 3.0 PHY. However, USB 3.0 PHY does not reliably support receive detection in P3 mode. Enabling the USB3 controller to configure USB in P2 mode whenever the Receive Detect feature is required. Signed-off-by: Sriram Dash Signed-off-by: Rajesh Bhagat --- include/fsl_usb.h | 1 + include/linux/usb/dwc3.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/fsl_usb.h b/include/fsl_usb.h index fc72fb9384..73235b8c73 100644 --- a/include/fsl_usb.h +++ b/include/fsl_usb.h @@ -95,5 +95,6 @@ bool has_erratum_a007792(void); bool has_erratum_a005697(void); bool has_erratum_a004477(void); bool has_erratum_a008751(void); +bool has_erratum_a010151(void); #endif #endif /*_ASM_FSL_USB_H_ */ diff --git a/include/linux/usb/dwc3.h b/include/linux/usb/dwc3.h index a0274461cc..c1b23b2f1b 100644 --- a/include/linux/usb/dwc3.h +++ b/include/linux/usb/dwc3.h @@ -198,6 +198,7 @@ struct dwc3 { /* offset: 0xC100 */ /* Global USB3 PIPE Control Register */ #define DWC3_GUSB3PIPECTL_PHYSOFTRST (1 << 31) +#define DWC3_GUSB3PIPECTL_DISRXDETP3 (1 << 28) #define DWC3_GUSB3PIPECTL_SUSPHY (1 << 17) /* Global TX Fifo Size Register */ -- cgit