Skip to contentSkip to conversation

sunxi: VBUS detection function fixup in g_dnl_board_usb_cable_connected

PATCH New Paul Kocialkowski 2 participants 3 messages May 16, 2015 – May 19, 2015 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sunxi: VBUS detection function fixup in g_dnl_board_usb_cable_connected

sunxi_usbc_vbus_detect was renamed to sunxi_usb_phy_vbus_detect but g_dnl_board_usb_cable_connected was still using the old name, breaking the build when USB gadget is enabled.

---
 board/sunxi/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/sunxi/board.c +1 -1
index 4c51468..5f79cc1 100644
@@ -476,7 +476,7 @@ static struct musb_hdrc_platform_data musb_plat = {
 #ifdef CONFIG_USB_GADGET
 int g_dnl_board_usb_cable_connected(void)
 {
-	return sunxi_usbc_vbus_detect(0);
+	return sunxi_usb_phy_vbus_detect(0);
 }
 #endif
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 sunxi: Cache line size definition

Sunxi platforms use ARM Cortex A8, A7 and A15 (unsupported yet) CPU cores, which all have 64 bytes cache line size.

This is required to e.g. enable USB gadget.

---
 include/configs/sunxi-common.h | 3 +++
 1 file changed, 3 insertions(+)
include/configs/sunxi-common.h +3 -0
index 723067e..3e4e26b 100644
@@ -66,6 +66,9 @@
 # define CONFIG_SYS_NS16550_COM5		SUNXI_R_UART_BASE
 #endif
 
+/* CPU */
+#define CONFIG_SYS_CACHELINE_SIZE	64
+
 /* DRAM Base */
 #define CONFIG_SYS_SDRAM_BASE		0x40000000
 #define CONFIG_SYS_INIT_RAM_ADDR	0x0
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/2 sunxi: VBUS detection function fixup in g_dnl_board_usb_cable_connected

In reply to Paul Kocialkowski

Hi,

Thanks for these 2 fixes, I've added both to my personal tree. I'll send a pull-req to get these into u-boot/master soon.

Regards,

Hans

Quoted 23 lines · Paul Kocialkowski

sunxi_usbc_vbus_detect was renamed to sunxi_usb_phy_vbus_detect but g_dnl_board_usb_cable_connected was still using the old name, breaking the build when USB gadget is enabled.

---
  board/sunxi/board.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
board/sunxi/board.c +1 -1
index 4c51468..5f79cc1 100644
@@ -476,7 +476,7 @@ static struct musb_hdrc_platform_data musb_plat = {
  #ifdef CONFIG_USB_GADGET
  int g_dnl_board_usb_cable_connected(void)
  {
-	return sunxi_usbc_vbus_detect(0);
+	return sunxi_usb_phy_vbus_detect(0);
  }
  #endif