Skip to contentSkip to conversation

ARM: socfpga: Reduce the DFU buffer size

PATCH New Marek Vasut 1 participant 4 messages Apr 5, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ARM: socfpga: Reduce the DFU buffer size

There is no point in having such gargantuan buffer, it only requires huge malloc area. Reduce the DFU buffer size.

---
 include/configs/socfpga_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/socfpga_common.h +1 -1
index 8472b52..8057b88 100644
@@ -230,7 +230,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 
-#define CONFIG_SYS_DFU_DATA_BUF_SIZE	(32 * 1024 * 1024)
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE	(16 * 1024 * 1024)
 #define DFU_DEFAULT_POLL_TIMEOUT	300
 
 /* USB IDs */
Signature · 1 line
2.10.2
#2 lore raw

PATCH 2/3 ARM: socfpga: mcvevk: Add default dfu_alt_info

Add default DFU altinfo for eMMC.

---
 include/configs/socfpga_mcvevk.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/socfpga_mcvevk.h +1 -0
index 604ea20..2d36702 100644
@@ -37,6 +37,7 @@
 	"netdev=eth0\0"							\
 	"hostname=mcvevk\0"						\
 	"kernel_addr_r=0x10000000\0"					\
+	"dfu_alt_info=mmc raw 0 3867148288\0"				\
 	"update_filename=u-boot-with-spl.sfp\0"				\
 	"update_sd_offset=0x800\0"					\
 	"update_sd="		/* Update the SD firmware partition */	\
Signature · 1 line
2.10.2
#3 lore raw

PATCH 3/3 ARM: socfpga: Disable OC on MCVEVK

In reply to Marek Vasut

Disable the OC test on MCVEVK as the old PHY version does not provide this information. This fixes the USB OTG operation.

---
 arch/arm/dts/socfpga_cyclone5_mcvevk.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/socfpga_cyclone5_mcvevk.dts +1 -0
index 1462f08..833a87d 100644
@@ -54,5 +54,6 @@
 };
 
 &usb1 {
+	disable-over-current;
 	status = "okay";
 };
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/3 ARM: socfpga: Reduce the DFU buffer size

In reply to Marek Vasut
Quoted 4 lines · Marek Vasut

There is no point in having such gargantuan buffer, it only requires huge malloc area. Reduce the DFU buffer size.

Applied all three.

Quoted 18 lines
---
 include/configs/socfpga_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/socfpga_common.h +1 -1
index 8472b52..8057b88 100644
@@ -230,7 +230,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 
-#define CONFIG_SYS_DFU_DATA_BUF_SIZE	(32 * 1024 * 1024)
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE	(16 * 1024 * 1024)
 #define DFU_DEFAULT_POLL_TIMEOUT	300
 
 /* USB IDs */
Signature · 2 lines
Best regards,
Marek Vasut