[U-Boot] [PATCH] fastboot: Fix OUT transaction length alignment

2016-04-13 Thread Semen Protsenko
From: Sam Protsenko 

Some UDC controllers may require buffer size to be aligned to
wMaxPacketSize. It's indicated by gadget->quirk_ep_out_aligned_size
field being set to "true" (in UDC driver code). In that case
rx_bytes_expected must be aligned to wMaxPacket size, otherwise stuck on
transaction will happen. For example, it's required by DWC3 controller
data manual:

section 8.2.3.3 Buffer Size Rules and Zero-Length Packets:

For OUT endpoints, the following rules apply:
- The BUFSIZ field must be ≥ 1 byte.
- The total size of a Buffer Descriptor must be a multiple of
  MaxPacketSize
- A received zero-length packet still requires a MaxPacketSize buffer.
  Therefore, if the expected amount of data to be received is a multiple
  of MaxPacketSize, software should add MaxPacketSize bytes to the buffer
  to sink a possible zero-length packet at the end of the transfer.

But other UDC controllers don't need such alignment, so mentioned field
is set to "false". If buffer size is aligned to wMaxPacketSize, those
controllers may stuck on transaction. The example is DWC2.

This patch checks gadget->quirk_ep_out_aligned_size field and aligns
rx_bytes_expected to wMaxPacketSize only when it's needed.

Signed-off-by: Sam Protsenko 
---
 drivers/usb/gadget/f_fastboot.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 2e87fee..54dcce0 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -58,6 +58,7 @@ static unsigned int fastboot_flash_session_id;
 static unsigned int download_size;
 static unsigned int download_bytes;
 static bool is_high_speed;
+static bool quirk_ep_out_aligned_size;
 
 static struct usb_endpoint_descriptor fs_ep_in = {
.bLength= USB_DT_ENDPOINT_SIZE,
@@ -240,6 +241,8 @@ static int fastboot_set_alt(struct usb_function *f,
debug("%s: func: %s intf: %d alt: %d\n",
  __func__, f->name, interface, alt);
 
+   quirk_ep_out_aligned_size = gadget->quirk_ep_out_aligned_size;
+
/* make sure we don't enable the ep twice */
if (gadget->speed == USB_SPEED_HIGH) {
ret = usb_ep_enable(f_fb->out_ep, &hs_ep_out);
@@ -435,12 +438,18 @@ static unsigned int rx_bytes_expected(unsigned int 
maxpacket)
return 0;
if (rx_remain > EP_BUFFER_SIZE)
return EP_BUFFER_SIZE;
+
+   if (!quirk_ep_out_aligned_size)
+   goto out;
+
if (rx_remain < maxpacket) {
rx_remain = maxpacket;
} else if (rx_remain % maxpacket != 0) {
rem = rx_remain % maxpacket;
rx_remain = rx_remain + (maxpacket - rem);
}
+
+out:
return rx_remain;
 }
 
-- 
2.8.0.rc3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 7/7 v3] usb: gadget Move: CONFIG_G_DNL_* to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

And also reformat defconfigs using "make savedefconfig" rule.

Signed-off-by: Sam Protsenko 
---
 configs/A13-OLinuXino_defconfig   |  3 +++
 configs/CHIP_defconfig|  3 +++
 configs/Cubietruck_defconfig  |  3 +++
 configs/am335x_baltos_defconfig   |  3 +++
 configs/am335x_boneblack_defconfig|  3 +++
 configs/am335x_boneblack_vboot_defconfig  |  3 +++
 configs/am335x_evm_defconfig  |  3 +++
 configs/am335x_evm_nor_defconfig  |  3 +++
 configs/am335x_evm_norboot_defconfig  |  3 +++
 configs/am335x_evm_spiboot_defconfig  |  3 +++
 configs/am335x_evm_usbspl_defconfig   |  3 +++
 configs/am335x_gp_evm_defconfig   |  3 +++
 configs/am437x_gp_evm_defconfig   |  3 +++
 configs/am437x_sk_evm_defconfig   |  3 +++
 configs/am43xx_evm_defconfig  |  3 +++
 configs/am43xx_evm_ethboot_defconfig  |  3 +++
 configs/am43xx_evm_qspiboot_defconfig |  3 +++
 configs/am43xx_evm_usbhost_boot_defconfig |  3 +++
 configs/apalis_t30_defconfig  |  3 +++
 configs/bcm11130_defconfig|  3 +++
 configs/bcm11130_nand_defconfig   |  3 +++
 configs/bcm28155_ap_defconfig |  3 +++
 configs/bcm28155_w1d_defconfig|  3 +++
 configs/beaver_defconfig  |  3 +++
 configs/birdland_bav335a_defconfig|  3 +++
 configs/birdland_bav335b_defconfig|  3 +++
 configs/cgtqmx6eval_defconfig |  3 +++
 configs/colibri_t20_defconfig |  3 +++
 configs/colibri_t30_defconfig |  3 +++
 configs/colibri_vf_defconfig  |  3 +++
 configs/corvus_defconfig  |  3 +++
 configs/dalmore_defconfig |  3 +++
 configs/dra72_evm_defconfig   |  3 +++
 configs/dra74_evm_defconfig   |  3 +++
 configs/dra7xx_evm_defconfig  |  3 +++
 configs/dra7xx_evm_qspiboot_defconfig |  3 +++
 configs/dra7xx_evm_uart3_defconfig|  3 +++
 configs/draco_defconfig   |  3 +++
 configs/e2220-1170_defconfig  |  3 +++
 configs/gwventana_defconfig   |  3 +++
 configs/jetson-tk1_defconfig  |  3 +++
 configs/kc1_defconfig |  3 +++
 configs/mx6dlsabreauto_defconfig  |  3 +++
 configs/mx6dlsabresd_defconfig|  3 +++
 configs/mx6qpsabreauto_defconfig  |  3 +++
 configs/mx6qsabreauto_defconfig   |  3 +++
 configs/mx6qsabrelite_defconfig   |  3 +++
 configs/mx6qsabresd_defconfig |  3 +++
 configs/mx6sabresd_spl_defconfig  |  3 +++
 configs/mx7dsabresd_defconfig |  3 +++
 configs/nitrogen6dl2g_defconfig   |  3 +++
 configs/nitrogen6dl_defconfig |  3 +++
 configs/nitrogen6q2g_defconfig|  3 +++
 configs/nitrogen6q_defconfig  |  3 +++
 configs/nitrogen6s1g_defconfig|  3 +++
 configs/nitrogen6s_defconfig  |  3 +++
 configs/nyan-big_defconfig|  3 +++
 configs/odroid-xu3_defconfig  |  3 +++
 configs/odroid_defconfig  |  3 +++
 configs/omap3_beagle_defconfig|  3 +++
 configs/omap3_logic_defconfig |  3 +++
 configs/omap5_uevm_defconfig  |  3 +++
 configs/origen_defconfig  |  3 +++
 configs/p2371-_defconfig  |  3 +++
 configs/p2371-2180_defconfig  |  3 +++
 configs/p2571_defconfig   |  3 +++
 configs/pxm2_defconfig|  3 +++
 configs/rastaban_defconfig|  3 +++
 configs/rut_defconfig |  3 +++
 configs/s5p_goni_defconfig|  3 +++
 configs/s5pc210_universal_defconfig   |  3 +++
 configs/smartweb_defconfig|  3 +++
 configs/sniper_defconfig  |  3 +++
 configs/socfpga_arria5_defconfig  |  3 +++
 configs/socfpga_cyclone5_defconfig|  3 +++
 configs/socfpga_de0_nano_soc_defconfig|  3 +++
 configs/socfpga_mcvevk_defconfig  |  3 +++
 configs/socfpga_sockit_defconfig  |  3 +++
 configs/socfpga_socrates_defconfig|  3 +++
 configs/taurus_defconfig  |  3 +++
 configs/tbs2910_defconfig |  3 +++
 configs/thuban_defconfig  |  3 +++
 configs/trats2_defconfig  |  3 +++
 configs/trats_defconfig   |  3 +++
 configs/venice2_defconfig |  3 +++
 configs/warp_defconfig|  3 +++
 configs/xilinx_zynqmp_ep_defconfig|  3 +++
 configs/zynq_picozed_defconfig|  3 +++
 configs/zynq_zc702_defconfig  |  3 +++
 configs/zynq_zc706_defconfig  |  3 +++
 configs/zynq_zed_defconfig|  3 +++
 configs/zynq_zybo_defconfig   |  3 +++
 drivers/usb/gadget/Kconfig| 13 +
 drivers/usb/gadget/g_dnl.c   

[U-Boot] [PATCH 6/7 v3] usb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/odroid-xu3_defconfig  |  1 +
 configs/omap5_uevm_defconfig  |  1 +
 drivers/usb/dwc3/Kconfig  | 17 +
 include/configs/am43xx_evm.h  |  3 +--
 include/configs/dra7xx_evm.h  |  2 --
 include/configs/odroid_xu3.h  |  3 ---
 include/configs/omap5_uevm.h  |  2 --
 18 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index ce16f93..c1b26e0 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -24,5 +24,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index ee956a0..80ff4da 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -28,5 +28,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 0940351..97ea209 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -15,6 +15,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index dc25719..5963437 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -14,6 +14,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 4cd48c3..02ce1ef 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -13,6 +13,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index 6371d54..9ac5c99 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -14,6 +14,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index 040412d..1b8d2b9 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -27,5 +27,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 28646b0..2abf81e 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index a460897..4dc339c 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -17,6 +17,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index 56a5965..828a862 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -17,6 +17,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index 1121289..c5ff5a9 100644
--- a/configs/dra7xx_evm_uart3_defco

[U-Boot] [PATCH 5/7 v3] usb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/omap5_uevm_defconfig  |  1 +
 drivers/usb/dwc3/Kconfig  | 10 ++
 include/configs/am43xx_evm.h  |  2 +-
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/omap5_uevm.h  |  1 -
 16 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 8dc905e..ce16f93 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -23,5 +23,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 33cc903..ee956a0 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -27,5 +27,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 5406beb..0940351 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -14,6 +14,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index fa01c75..dc25719 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -13,6 +13,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 76d2e72..4cd48c3 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -12,6 +12,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index c437b3a..6371d54 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -13,6 +13,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index 9fdd842..040412d 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 810db5b..28646b0 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -25,5 +25,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 88bf379..a460897 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -16,6 +16,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index 80961f7..56a5965 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -16,6 +16,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index f187083..1121289 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -17,6 +17,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GAD

[U-Boot] [PATCH 3/7 v3] usb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

While at it, remove obsolete CONFIG_USBDOWNLOAD_GADGET option from some
config headers. This is also probably fixes am335x_baltos board.

Signed-off-by: Sam Protsenko 
---
 configs/A13-OLinuXino_defconfig   |  1 +
 configs/CHIP_defconfig|  1 +
 configs/Cubietruck_defconfig  |  1 +
 configs/am335x_baltos_defconfig   |  1 +
 configs/am335x_boneblack_defconfig|  1 +
 configs/am335x_boneblack_vboot_defconfig  |  1 +
 configs/am335x_evm_defconfig  |  1 +
 configs/am335x_evm_nor_defconfig  |  1 +
 configs/am335x_evm_norboot_defconfig  |  1 +
 configs/am335x_evm_spiboot_defconfig  |  1 +
 configs/am335x_evm_usbspl_defconfig   |  1 +
 configs/am335x_gp_evm_defconfig   |  1 +
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/apalis_t30_defconfig  |  1 +
 configs/bcm11130_defconfig|  1 +
 configs/bcm11130_nand_defconfig   |  1 +
 configs/bcm28155_ap_defconfig |  1 +
 configs/bcm28155_w1d_defconfig|  1 +
 configs/beaver_defconfig  |  1 +
 configs/birdland_bav335a_defconfig|  1 +
 configs/birdland_bav335b_defconfig|  1 +
 configs/cgtqmx6eval_defconfig |  1 +
 configs/colibri_t20_defconfig |  1 +
 configs/colibri_t30_defconfig |  1 +
 configs/colibri_vf_defconfig  |  1 +
 configs/corvus_defconfig  |  1 +
 configs/dalmore_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/draco_defconfig   |  1 +
 configs/e2220-1170_defconfig  |  1 +
 configs/gwventana_defconfig   |  1 +
 configs/jetson-tk1_defconfig  |  1 +
 configs/kc1_defconfig |  1 +
 configs/mx6dlsabreauto_defconfig  |  1 +
 configs/mx6dlsabresd_defconfig|  1 +
 configs/mx6qpsabreauto_defconfig  |  1 +
 configs/mx6qsabreauto_defconfig   |  1 +
 configs/mx6qsabrelite_defconfig   |  1 +
 configs/mx6qsabresd_defconfig |  1 +
 configs/mx6sabresd_spl_defconfig  |  1 +
 configs/mx7dsabresd_defconfig |  1 +
 configs/nitrogen6dl2g_defconfig   |  1 +
 configs/nitrogen6dl_defconfig |  1 +
 configs/nitrogen6q2g_defconfig|  1 +
 configs/nitrogen6q_defconfig  |  1 +
 configs/nitrogen6s1g_defconfig|  1 +
 configs/nitrogen6s_defconfig  |  1 +
 configs/nyan-big_defconfig|  1 +
 configs/odroid-xu3_defconfig  |  1 +
 configs/odroid_defconfig  |  1 +
 configs/omap3_beagle_defconfig|  1 +
 configs/omap3_logic_defconfig |  1 +
 configs/omap5_uevm_defconfig  |  1 +
 configs/origen_defconfig  |  1 +
 configs/p2371-_defconfig  |  1 +
 configs/p2371-2180_defconfig  |  1 +
 configs/p2571_defconfig   |  1 +
 configs/pxm2_defconfig|  1 +
 configs/rastaban_defconfig|  1 +
 configs/rut_defconfig |  1 +
 configs/s5p_goni_defconfig|  1 +
 configs/s5pc210_universal_defconfig   |  1 +
 configs/smartweb_defconfig|  1 +
 configs/sniper_defconfig  |  1 +
 configs/socfpga_arria5_defconfig  |  1 +
 configs/socfpga_cyclone5_defconfig|  1 +
 configs/socfpga_de0_nano_soc_defconfig|  1 +
 configs/socfpga_mcvevk_defconfig  |  1 +
 configs/socfpga_sockit_defconfig  |  1 +
 configs/socfpga_socrates_defconfig|  1 +
 configs/taurus_defconfig  |  1 +
 configs/tbs2910_defconfig |  1 +
 configs/thuban_defconfig  |  1 +
 configs/trats2_defconfig  |  1 +
 configs/trats_defconfig   |  1 +
 configs/venice2_defconfig |  1 +
 configs/warp_defconfig|  1 +
 configs/xilinx_zynqmp_ep_defconfig|  1 +
 configs/zynq_picozed_defconfig|  1 +
 configs/zynq_zc702_defconfig  |  1 +
 configs/zynq_zc706_defconfig  |  1 +
 configs/zynq_zed_defconfig|  1 +
 configs/zynq_zybo_defconfig   |  1 +
 drivers/usb/gadget/Kconfig|  6 ++
 include/configs/am335x_evm.h  |  1 -
 include/configs/am43xx_evm.h  |  2 +-
 include/configs/baltos.h  |  1 -

[U-Boot] [PATCH 1/7 v3] usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

The description was borrowed from kernel. Definitions were added to
defconfig files in a way that "make savedefconfig" generates exactly
the same file as used defconfig.

Boards using 0 mA as CONFIG_USB_GADGET_VBUS_DRAW value were moved to use
2 mA (as minimal allowed by Kconfig).

Signed-off-by: Sam Protsenko 
---
Changes for v2:
  - set minimal required value of VBUS_DRAW as 2 mA
(as it's done in kernel)

 drivers/usb/gadget/Kconfig| 21 +
 include/configs/am335x_evm.h  |  1 -
 include/configs/am43xx_evm.h  |  5 -
 include/configs/baltos.h  |  1 -
 include/configs/bav335x.h |  1 -
 include/configs/bcm28155_ap.h |  1 -
 include/configs/cgtqmx6eval.h |  1 -
 include/configs/colibri_vf.h  |  1 -
 include/configs/corvus.h  |  1 -
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/exynos4-common.h  |  1 -
 include/configs/gw_ventana.h  |  1 -
 include/configs/kc1.h |  1 -
 include/configs/mx6sabre_common.h |  1 -
 include/configs/mx7dsabresd.h |  1 -
 include/configs/nitrogen6x.h  |  1 -
 include/configs/odroid_xu3.h  |  1 -
 include/configs/omap3_beagle.h|  1 -
 include/configs/omap3_logic.h |  1 -
 include/configs/omap5_uevm.h  |  1 -
 include/configs/pengwyn.h |  1 -
 include/configs/s5p_goni.h|  1 -
 include/configs/siemens-am33x-common.h|  1 -
 include/configs/smartweb.h|  1 -
 include/configs/sniper.h  |  1 -
 include/configs/socfpga_common.h  |  1 -
 include/configs/sunxi-common.h|  1 -
 include/configs/taurus.h  |  1 -
 include/configs/tbs2910.h |  1 -
 include/configs/tegra-common-usb-gadget.h |  1 -
 include/configs/warp.h|  1 -
 include/configs/xilinx_zynqmp.h   |  1 -
 include/configs/zynq-common.h |  1 -
 33 files changed, 25 insertions(+), 32 deletions(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index f4698f4..cfd8ce8 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -33,3 +33,24 @@ menuconfig USB_GADGET
   a USB peripheral device.  Configure one hardware driver for your
   peripheral/device side bus controller, and a "gadget driver" for
   your peripheral protocol.
+
+if USB_GADGET
+
+config USB_GADGET_VBUS_DRAW
+   int "Maximum VBUS Power usage (2-500 mA)"
+   range 2 500
+   default 2
+   help
+  Some devices need to draw power from USB when they are
+  configured, perhaps to operate circuitry or to recharge
+  batteries.  This is in addition to any local power supply,
+  such as an AC adapter or batteries.
+
+  Enter the maximum power your device draws through USB, in
+  milliAmperes.  The permitted range of values is 2 - 500 mA;
+  0 mA would be legal, but can make some hosts misbehave.
+
+  This value will be used except for system-specific gadget
+  drivers that have more specific information.
+
+endif # USB_GADGET
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 29b693a..8d68d60 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -290,7 +290,6 @@
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW2
 #define CONFIG_USB_MUSB_HOST
 #define CONFIG_AM335X_USB0
 #define CONFIG_AM335X_USB0_MODEMUSB_PERIPHERAL
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index fd3f6a7..0dd9c7a7 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -122,6 +122,10 @@
 #endif
 
 /* USB GADGET */
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT)
+#undef CONFIG_USB_GADGET_VBUS_DRAW
+#endif
+
 #if !defined(CONFIG_SPL_BUILD) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT))
 #define CONFIG_USB_DWC3_PHY_OMAP
@@ -130,7 +134,6 @@
 #define CONFIG_USB_DWC3_GADGET
 
 #define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
 #define CONFIG_G_DNL_VENDOR_NUM 0x0403
 #define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index bfe3fa3..529cf1c 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -276,7 +276,6 @@
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
 #define CONFIG_USBDOWNLOAD_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW2
 #define CONFIG_USB_MUSB_HOST
 #define CONFIG_AM335X_USB0
 #define CONFIG_AM335X_USB0_MODEMUSB_HOST
diff --g

[U-Boot] [PATCH 4/7 v3] usb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

Description was borrowed from kernel dwc3 Kconfig.

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/odroid-xu3_defconfig  |  1 +
 configs/omap5_uevm_defconfig  |  1 +
 configs/xilinx_zynqmp_ep_defconfig|  1 +
 drivers/usb/dwc3/Kconfig  | 23 +++
 include/configs/am43xx_evm.h  |  2 +-
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/odroid_xu3.h  |  1 -
 include/configs/omap5_uevm.h  |  1 -
 include/configs/xilinx_zynqmp.h   |  2 --
 20 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index b02f8ad..8dc905e 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -22,5 +22,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 1960429..33cc903 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 942a6a0..5406beb 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index 114d10f..fa01c75 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 52265c3..76d2e72 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -11,6 +11,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index 9166848..c437b3a 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index b2276a9..9fdd842 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -25,5 +25,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 7aa8233..810db5b 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -24,5 +24,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 160ce93..88bf379 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index 4b4fd27..80961f7 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index c86cedc..f187083 100644
--- a/configs/

[U-Boot] [PATCH 0/8 v3] usb: Move DWC3 and some gadget options to Kconfig

2016-04-11 Thread Semen Protsenko

Hi All,

This patch series move next options to Kconfigs/defconfigs:
 - CONFIG_USB_DWC3*
 - CONFIG_USB_GADGET_VBUS_DRAW
 - CONFIG_USB_GADGET_DUALSPEED
 - CONFIG_USB_GADGET_DOWNLOAD
 - CONFIG_G_DNL_*

All defconfig files were post-processed via "make savedefconfig" rule to keep
correct order of options in defconfigs.

The whole series was tested using buildman tool (for all arm boards).
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/7 v3] usb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig

2016-04-11 Thread Semen Protsenko
From: Sam Protsenko 

Move CONFIG_USB_GADGET_DUALSPEED option to Kconfig and
make all UDC controllers select USB_GADGET_DUALSPEED:
  - add next options to Kconfig selecting USB_GADGET_DUALSPEED:
- USB_GADGET_ATMEL_USBA
- USB_GADGET_DWC2_OTG
- USB_DWC3
- CI_UDC
  - make USB_MUSB_GADGET select USB_GADGET_DUALSPEED

While at it, make some related fixes:
  - remove DUALSPEED from configs that don't enable gadget support:
- kwb.h
- tseries.h
  - add missing USB_GADGET option to next configs:
- novena_defconfig
- pcm051_rev*_defconfig
- xfi3_defconfig

Signed-off-by: Sam Protsenko 
---
Changes for v3:
  - add all UDC controllers that can select DUALSPEED option
(to prevent some platforms of being broken due to moving
DUALSPEED option to Kconfig)

 configs/am335x_baltos_defconfig  |  1 +
 configs/am335x_boneblack_defconfig   |  1 +
 configs/am335x_boneblack_vboot_defconfig |  1 +
 configs/am335x_evm_defconfig |  1 +
 configs/am335x_evm_nor_defconfig |  1 +
 configs/am335x_evm_norboot_defconfig |  1 +
 configs/am335x_evm_spiboot_defconfig |  1 +
 configs/am335x_evm_usbspl_defconfig  |  1 +
 configs/am335x_gp_evm_defconfig  |  1 +
 configs/am437x_gp_evm_defconfig  |  1 +
 configs/am437x_sk_evm_defconfig  |  1 +
 configs/am43xx_evm_defconfig |  1 +
 configs/am43xx_evm_ethboot_defconfig |  1 +
 configs/am43xx_evm_qspiboot_defconfig|  1 +
 configs/am43xx_evm_usbhost_boot_defconfig|  1 +
 configs/apalis_t30_defconfig |  1 +
 configs/bcm11130_defconfig   |  1 +
 configs/bcm11130_nand_defconfig  |  1 +
 configs/bcm28155_ap_defconfig|  1 +
 configs/bcm28155_w1d_defconfig   |  1 +
 configs/beaver_defconfig |  1 +
 configs/birdland_bav335a_defconfig   |  1 +
 configs/birdland_bav335b_defconfig   |  1 +
 configs/cgtqmx6eval_defconfig|  1 +
 configs/colibri_t20_defconfig|  5 +++--
 configs/colibri_t30_defconfig|  1 +
 configs/colibri_vf_defconfig |  1 +
 configs/corvus_defconfig |  1 +
 configs/dalmore_defconfig|  1 +
 configs/dra72_evm_defconfig  |  1 +
 configs/dra74_evm_defconfig  |  1 +
 configs/dra7xx_evm_defconfig |  1 +
 configs/dra7xx_evm_qspiboot_defconfig|  1 +
 configs/dra7xx_evm_uart3_defconfig   |  1 +
 configs/draco_defconfig  |  1 +
 configs/e2220-1170_defconfig |  1 +
 configs/gwventana_defconfig  |  1 +
 configs/jetson-tk1_defconfig |  1 +
 configs/ma5d4evk_defconfig   |  1 +
 configs/mx6dlsabreauto_defconfig |  1 +
 configs/mx6dlsabresd_defconfig   |  1 +
 configs/mx6qpsabreauto_defconfig |  1 +
 configs/mx6qsabreauto_defconfig  |  1 +
 configs/mx6qsabrelite_defconfig  |  1 +
 configs/mx6qsabresd_defconfig|  1 +
 configs/mx6sabresd_spl_defconfig |  1 +
 configs/mx7dsabresd_defconfig|  1 +
 configs/nitrogen6dl2g_defconfig  |  1 +
 configs/nitrogen6dl_defconfig|  1 +
 configs/nitrogen6q2g_defconfig   |  1 +
 configs/nitrogen6q_defconfig |  1 +
 configs/nitrogen6s1g_defconfig   |  1 +
 configs/nitrogen6s_defconfig |  1 +
 configs/novena_defconfig |  3 +++
 configs/nyan-big_defconfig   |  1 +
 configs/odroid-xu3_defconfig |  1 +
 configs/odroid_defconfig |  1 +
 configs/omap3_beagle_defconfig   |  1 +
 configs/omap3_logic_defconfig|  1 +
 configs/omap5_uevm_defconfig |  1 +
 configs/origen_defconfig |  1 +
 configs/p2371-_defconfig |  1 +
 configs/p2371-2180_defconfig |  1 +
 configs/p2571_defconfig  |  1 +
 configs/pcm051_rev1_defconfig|  3 +++
 configs/pcm051_rev3_defconfig|  3 +++
 configs/pengwyn_defconfig|  1 +
 configs/pxm2_defconfig   |  1 +
 configs/rastaban_defconfig   |  1 +
 configs/rut_defconfig|  1 +
 configs/s5p_goni_defconfig   |  1 +
 configs/s5pc210_universal_defconfig  |  1 +
 configs/sama5d2_xplained_mmc_defconfig   |  1 +
 configs/sama5d2_xplained_spiflash_defconfig  |  1 +
 configs/sama5d3xek_mmc_defconfig |  1 +
 configs/sama5d3xek_nandflash_defconfig   |  1 +
 configs/sama5d3xek_spiflash_defconfig|  1 +
 configs/sama5d4_xplained_mmc_defconfig   |  1 +
 configs/sama5d4_xplained_nandflash_defconfig |  1 +
 config

[U-Boot] [PATCH 1/8 v2] usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig

2016-04-07 Thread Semen Protsenko
From: Sam Protsenko 

The description was borrowed from kernel. Definitions were added to
defconfig files in a way that "make savedefconfig" generates exactly
the same file as used defconfig.

Boards using 0 mA as CONFIG_USB_GADGET_VBUS_DRAW value were moved to use
2 mA (as minimal allowed by Kconfig).

Signed-off-by: Sam Protsenko 
---
Changes for v2:
  - set minimal VBUS_DRAW value to 2 mA in range in Kconfig
  - set minimal VBUS_DRAW values to 2 mA for all boards (even for ones that
are using 0 mA)

 drivers/usb/gadget/Kconfig| 21 +
 include/configs/am335x_evm.h  |  1 -
 include/configs/am43xx_evm.h  |  5 -
 include/configs/baltos.h  |  1 -
 include/configs/bav335x.h |  1 -
 include/configs/bcm28155_ap.h |  1 -
 include/configs/cgtqmx6eval.h |  1 -
 include/configs/colibri_vf.h  |  1 -
 include/configs/corvus.h  |  1 -
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/exynos4-common.h  |  1 -
 include/configs/gw_ventana.h  |  1 -
 include/configs/kc1.h |  1 -
 include/configs/mx6sabre_common.h |  1 -
 include/configs/mx7dsabresd.h |  1 -
 include/configs/nitrogen6x.h  |  1 -
 include/configs/odroid_xu3.h  |  1 -
 include/configs/omap3_beagle.h|  1 -
 include/configs/omap3_logic.h |  1 -
 include/configs/omap5_uevm.h  |  1 -
 include/configs/pengwyn.h |  1 -
 include/configs/s5p_goni.h|  1 -
 include/configs/siemens-am33x-common.h|  1 -
 include/configs/smartweb.h|  1 -
 include/configs/sniper.h  |  1 -
 include/configs/socfpga_common.h  |  1 -
 include/configs/sunxi-common.h|  1 -
 include/configs/taurus.h  |  1 -
 include/configs/tbs2910.h |  1 -
 include/configs/tegra-common-usb-gadget.h |  1 -
 include/configs/warp.h|  1 -
 include/configs/xilinx_zynqmp.h   |  1 -
 include/configs/zynq-common.h |  1 -
 33 files changed, 25 insertions(+), 32 deletions(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index f4698f4..cfd8ce8 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -33,3 +33,24 @@ menuconfig USB_GADGET
   a USB peripheral device.  Configure one hardware driver for your
   peripheral/device side bus controller, and a "gadget driver" for
   your peripheral protocol.
+
+if USB_GADGET
+
+config USB_GADGET_VBUS_DRAW
+   int "Maximum VBUS Power usage (2-500 mA)"
+   range 2 500
+   default 2
+   help
+  Some devices need to draw power from USB when they are
+  configured, perhaps to operate circuitry or to recharge
+  batteries.  This is in addition to any local power supply,
+  such as an AC adapter or batteries.
+
+  Enter the maximum power your device draws through USB, in
+  milliAmperes.  The permitted range of values is 2 - 500 mA;
+  0 mA would be legal, but can make some hosts misbehave.
+
+  This value will be used except for system-specific gadget
+  drivers that have more specific information.
+
+endif # USB_GADGET
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 29b693a..8d68d60 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -290,7 +290,6 @@
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW2
 #define CONFIG_USB_MUSB_HOST
 #define CONFIG_AM335X_USB0
 #define CONFIG_AM335X_USB0_MODEMUSB_PERIPHERAL
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index fd3f6a7..0dd9c7a7 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -122,6 +122,10 @@
 #endif
 
 /* USB GADGET */
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT)
+#undef CONFIG_USB_GADGET_VBUS_DRAW
+#endif
+
 #if !defined(CONFIG_SPL_BUILD) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT))
 #define CONFIG_USB_DWC3_PHY_OMAP
@@ -130,7 +134,6 @@
 #define CONFIG_USB_DWC3_GADGET
 
 #define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
 #define CONFIG_G_DNL_VENDOR_NUM 0x0403
 #define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index bfe3fa3..529cf1c 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -276,7 +276,6 @@
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
 #define CONFIG_USBDOWNLOAD_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW2
 #define CONFIG_USB_MUSB_HOST
 #define CO

[U-Boot] [PATCH 4/8] usb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

While at it, remove obsolete CONFIG_USBDOWNLOAD_GADGET option from some
config headers. This is also probably fixes am335x_baltos board.

Signed-off-by: Sam Protsenko 
---
 configs/A13-OLinuXino_defconfig   |  1 +
 configs/CHIP_defconfig|  1 +
 configs/Cubietruck_defconfig  |  1 +
 configs/am335x_baltos_defconfig   |  1 +
 configs/am335x_boneblack_defconfig|  1 +
 configs/am335x_boneblack_vboot_defconfig  |  1 +
 configs/am335x_evm_defconfig  |  1 +
 configs/am335x_evm_nor_defconfig  |  1 +
 configs/am335x_evm_norboot_defconfig  |  1 +
 configs/am335x_evm_spiboot_defconfig  |  1 +
 configs/am335x_evm_usbspl_defconfig   |  1 +
 configs/am335x_gp_evm_defconfig   |  1 +
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/apalis_t30_defconfig  |  1 +
 configs/bcm11130_defconfig|  1 +
 configs/bcm11130_nand_defconfig   |  1 +
 configs/bcm28155_ap_defconfig |  1 +
 configs/bcm28155_w1d_defconfig|  1 +
 configs/beaver_defconfig  |  1 +
 configs/birdland_bav335a_defconfig|  1 +
 configs/birdland_bav335b_defconfig|  1 +
 configs/cgtqmx6eval_defconfig |  1 +
 configs/colibri_t20_defconfig |  1 +
 configs/colibri_t30_defconfig |  1 +
 configs/colibri_vf_defconfig  |  1 +
 configs/corvus_defconfig  |  1 +
 configs/dalmore_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/draco_defconfig   |  1 +
 configs/e2220-1170_defconfig  |  1 +
 configs/gwventana_defconfig   |  1 +
 configs/jetson-tk1_defconfig  |  1 +
 configs/kc1_defconfig |  1 +
 configs/mx6dlsabreauto_defconfig  |  1 +
 configs/mx6dlsabresd_defconfig|  1 +
 configs/mx6qpsabreauto_defconfig  |  1 +
 configs/mx6qsabreauto_defconfig   |  1 +
 configs/mx6qsabrelite_defconfig   |  1 +
 configs/mx6qsabresd_defconfig |  1 +
 configs/mx6sabresd_spl_defconfig  |  1 +
 configs/mx7dsabresd_defconfig |  1 +
 configs/nitrogen6dl2g_defconfig   |  1 +
 configs/nitrogen6dl_defconfig |  1 +
 configs/nitrogen6q2g_defconfig|  1 +
 configs/nitrogen6q_defconfig  |  1 +
 configs/nitrogen6s1g_defconfig|  1 +
 configs/nitrogen6s_defconfig  |  1 +
 configs/nyan-big_defconfig|  1 +
 configs/odroid-xu3_defconfig  |  1 +
 configs/odroid_defconfig  |  1 +
 configs/omap3_beagle_defconfig|  1 +
 configs/omap3_logic_defconfig |  1 +
 configs/omap5_uevm_defconfig  |  1 +
 configs/origen_defconfig  |  1 +
 configs/p2371-_defconfig  |  1 +
 configs/p2371-2180_defconfig  |  1 +
 configs/p2571_defconfig   |  1 +
 configs/pxm2_defconfig|  1 +
 configs/rastaban_defconfig|  1 +
 configs/rut_defconfig |  1 +
 configs/s5p_goni_defconfig|  1 +
 configs/s5pc210_universal_defconfig   |  1 +
 configs/smartweb_defconfig|  1 +
 configs/sniper_defconfig  |  1 +
 configs/socfpga_arria5_defconfig  |  1 +
 configs/socfpga_cyclone5_defconfig|  1 +
 configs/socfpga_de0_nano_soc_defconfig|  1 +
 configs/socfpga_mcvevk_defconfig  |  1 +
 configs/socfpga_sockit_defconfig  |  1 +
 configs/socfpga_socrates_defconfig|  1 +
 configs/taurus_defconfig  |  1 +
 configs/tbs2910_defconfig |  1 +
 configs/thuban_defconfig  |  1 +
 configs/trats2_defconfig  |  1 +
 configs/trats_defconfig   |  1 +
 configs/venice2_defconfig |  1 +
 configs/warp_defconfig|  1 +
 configs/xilinx_zynqmp_ep_defconfig|  1 +
 configs/zynq_picozed_defconfig|  1 +
 configs/zynq_zc702_defconfig  |  1 +
 configs/zynq_zc706_defconfig  |  1 +
 configs/zynq_zed_defconfig|  1 +
 configs/zynq_zybo_defconfig   |  1 +
 drivers/usb/gadget/Kconfig|  6 ++
 include/configs/am335x_evm.h  |  1 -
 include/configs/am43xx_evm.h  |  2 +-
 include/configs/baltos.h  |  1 -

[U-Boot] [PATCH 7/8] usb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/odroid-xu3_defconfig  |  1 +
 configs/omap5_uevm_defconfig  |  1 +
 drivers/usb/dwc3/Kconfig  | 17 +
 include/configs/am43xx_evm.h  |  3 +--
 include/configs/dra7xx_evm.h  |  2 --
 include/configs/odroid_xu3.h  |  3 ---
 include/configs/omap5_uevm.h  |  2 --
 18 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index ce16f93..c1b26e0 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -24,5 +24,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index ee956a0..80ff4da 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -28,5 +28,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 0940351..97ea209 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -15,6 +15,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index dc25719..5963437 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -14,6 +14,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 4cd48c3..02ce1ef 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -13,6 +13,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index 6371d54..9ac5c99 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -14,6 +14,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index 040412d..1b8d2b9 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -27,5 +27,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 28646b0..2abf81e 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index a460897..4dc339c 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -17,6 +17,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index 56a5965..828a862 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -17,6 +17,7 @@ CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_DWC3_PHY_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index 1121289..c5ff5a9 100644
--- a/configs/dra7xx_evm_uart3_defco

[U-Boot] [PATCH 0/8] usb: Move DWC3 and some gadget options to Kconfig

2016-04-05 Thread Semen Protsenko

Hi All,

This patch series move next options to Kconfigs/defconfigs:
 - CONFIG_USB_DWC3*
 - CONFIG_USB_GADGET_VBUS_DRAW
 - CONFIG_USB_GADGET_DUALSPEED (partially, only for DWC3 platforms for now)
 - CONFIG_USB_GADGET_DOWNLOAD
 - CONFIG_G_DNL_*

All defconfig files were post-processed via "make savedefconfig" rule to keep
correct order of options in defconfigs.

The whole series was tested using buildman tool for all arm boards.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/8] usb: gadget: Add CONFIG_USB_GADGET_DUALSPEED to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

It's hard to migrate all configs to this option in one patch, as this
option should be selected by UDC controller options, and some of them
are not added to Kconfig yet. So let's first add this option to Kconfig
and then select it for all controllers one by one.

Signed-off-by: Sam Protsenko 
---
 drivers/usb/gadget/Kconfig | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 17ca316..fd7ec22 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -53,4 +53,8 @@ config USB_GADGET_VBUS_DRAW
   This value will be used except for system-specific gadget
   drivers that have more specific information.
 
+# Selected by UDC drivers that support high-speed operation.
+config USB_GADGET_DUALSPEED
+   bool
+
 endif # USB_GADGET
-- 
2.8.0.rc3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/8] usb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/omap5_uevm_defconfig  |  1 +
 drivers/usb/dwc3/Kconfig  | 10 ++
 include/configs/am43xx_evm.h  |  2 +-
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/omap5_uevm.h  |  1 -
 16 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 8dc905e..ce16f93 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -23,5 +23,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 33cc903..ee956a0 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -27,5 +27,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 5406beb..0940351 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -14,6 +14,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index fa01c75..dc25719 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -13,6 +13,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 76d2e72..4cd48c3 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -12,6 +12,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index c437b3a..6371d54 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -13,6 +13,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index 9fdd842..040412d 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 810db5b..28646b0 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -25,5 +25,6 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 88bf379..a460897 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -16,6 +16,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index 80961f7..56a5965 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -16,6 +16,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index f187083..1121289 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -17,6 +17,7 @@ CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_OMAP=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GAD

[U-Boot] [PATCH 8/8] usb: gadget Move: CONFIG_G_DNL_* to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

And also reformat defconfigs using "make savedefconfig" rule.

Signed-off-by: Sam Protsenko 
---
 configs/A13-OLinuXino_defconfig   |  3 +++
 configs/CHIP_defconfig|  3 +++
 configs/Cubietruck_defconfig  |  3 +++
 configs/am335x_baltos_defconfig   |  3 +++
 configs/am335x_boneblack_defconfig|  3 +++
 configs/am335x_boneblack_vboot_defconfig  |  3 +++
 configs/am335x_evm_defconfig  |  3 +++
 configs/am335x_evm_nor_defconfig  |  3 +++
 configs/am335x_evm_norboot_defconfig  |  3 +++
 configs/am335x_evm_spiboot_defconfig  |  3 +++
 configs/am335x_evm_usbspl_defconfig   |  3 +++
 configs/am335x_gp_evm_defconfig   |  3 +++
 configs/am437x_gp_evm_defconfig   |  3 +++
 configs/am437x_sk_evm_defconfig   |  3 +++
 configs/am43xx_evm_defconfig  |  3 +++
 configs/am43xx_evm_ethboot_defconfig  |  3 +++
 configs/am43xx_evm_qspiboot_defconfig |  3 +++
 configs/am43xx_evm_usbhost_boot_defconfig |  3 +++
 configs/apalis_t30_defconfig  |  3 +++
 configs/bcm11130_defconfig|  3 +++
 configs/bcm11130_nand_defconfig   |  3 +++
 configs/bcm28155_ap_defconfig |  3 +++
 configs/bcm28155_w1d_defconfig|  3 +++
 configs/beaver_defconfig  |  3 +++
 configs/birdland_bav335a_defconfig|  3 +++
 configs/birdland_bav335b_defconfig|  3 +++
 configs/cgtqmx6eval_defconfig |  3 +++
 configs/colibri_t20_defconfig |  7 +--
 configs/colibri_t30_defconfig |  3 +++
 configs/colibri_vf_defconfig  |  3 +++
 configs/corvus_defconfig  |  3 +++
 configs/dalmore_defconfig |  3 +++
 configs/dra72_evm_defconfig   |  3 +++
 configs/dra74_evm_defconfig   |  3 +++
 configs/dra7xx_evm_defconfig  |  3 +++
 configs/dra7xx_evm_qspiboot_defconfig |  3 +++
 configs/dra7xx_evm_uart3_defconfig|  3 +++
 configs/draco_defconfig   |  3 +++
 configs/e2220-1170_defconfig  |  3 +++
 configs/gwventana_defconfig   |  3 +++
 configs/jetson-tk1_defconfig  |  3 +++
 configs/kc1_defconfig |  3 +++
 configs/mx6dlsabreauto_defconfig  |  3 +++
 configs/mx6dlsabresd_defconfig|  3 +++
 configs/mx6qpsabreauto_defconfig  |  3 +++
 configs/mx6qsabreauto_defconfig   |  3 +++
 configs/mx6qsabrelite_defconfig   |  3 +++
 configs/mx6qsabresd_defconfig |  3 +++
 configs/mx6sabresd_spl_defconfig  |  3 +++
 configs/mx7dsabresd_defconfig |  3 +++
 configs/nitrogen6dl2g_defconfig   |  3 +++
 configs/nitrogen6dl_defconfig |  3 +++
 configs/nitrogen6q2g_defconfig|  3 +++
 configs/nitrogen6q_defconfig  |  3 +++
 configs/nitrogen6s1g_defconfig|  3 +++
 configs/nitrogen6s_defconfig  |  3 +++
 configs/nyan-big_defconfig|  3 +++
 configs/odroid-xu3_defconfig  |  3 +++
 configs/odroid_defconfig  |  3 +++
 configs/omap3_beagle_defconfig|  3 +++
 configs/omap3_logic_defconfig |  3 +++
 configs/omap5_uevm_defconfig  |  3 +++
 configs/origen_defconfig  |  3 +++
 configs/p2371-_defconfig  |  3 +++
 configs/p2371-2180_defconfig  |  3 +++
 configs/p2571_defconfig   |  3 +++
 configs/pxm2_defconfig|  3 +++
 configs/rastaban_defconfig|  3 +++
 configs/rut_defconfig |  3 +++
 configs/s5p_goni_defconfig|  3 +++
 configs/s5pc210_universal_defconfig   |  3 +++
 configs/smartweb_defconfig|  3 +++
 configs/sniper_defconfig  |  3 +++
 configs/socfpga_arria5_defconfig  |  3 +++
 configs/socfpga_cyclone5_defconfig|  3 +++
 configs/socfpga_de0_nano_soc_defconfig|  3 +++
 configs/socfpga_mcvevk_defconfig  |  3 +++
 configs/socfpga_sockit_defconfig  |  3 +++
 configs/socfpga_socrates_defconfig|  3 +++
 configs/taurus_defconfig  |  3 +++
 configs/tbs2910_defconfig |  3 +++
 configs/thuban_defconfig  |  3 +++
 configs/trats2_defconfig  |  3 +++
 configs/trats_defconfig   |  3 +++
 configs/venice2_defconfig |  3 +++
 configs/warp_defconfig|  3 +++
 configs/xilinx_zynqmp_ep_defconfig|  3 +++
 configs/zynq_picozed_defconfig|  7 +--
 configs/zynq_zc702_defconfig  |  7 +--
 configs/zynq_zc706_defconfig  |  7 +--
 configs/zynq_zed_defconfig|  7 +--
 configs/zynq_zybo_defconfig   |  7 +--
 drivers/usb/gadget/Kconfig| 13 +
 drivers/u

[U-Boot] [PATCH 5/8] usb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

Description was borrowed from kernel dwc3 Kconfig.

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   |  1 +
 configs/am437x_sk_evm_defconfig   |  1 +
 configs/am43xx_evm_defconfig  |  1 +
 configs/am43xx_evm_ethboot_defconfig  |  1 +
 configs/am43xx_evm_qspiboot_defconfig |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/dra72_evm_defconfig   |  1 +
 configs/dra74_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig  |  1 +
 configs/dra7xx_evm_qspiboot_defconfig |  1 +
 configs/dra7xx_evm_uart3_defconfig|  1 +
 configs/odroid-xu3_defconfig  |  1 +
 configs/omap5_uevm_defconfig  |  1 +
 configs/xilinx_zynqmp_ep_defconfig|  1 +
 drivers/usb/dwc3/Kconfig  | 23 +++
 include/configs/am43xx_evm.h  |  2 +-
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/odroid_xu3.h  |  1 -
 include/configs/omap5_uevm.h  |  1 -
 include/configs/xilinx_zynqmp.h   |  2 --
 20 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index b02f8ad..8dc905e 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -22,5 +22,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 1960429..33cc903 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 942a6a0..5406beb 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index 114d10f..fa01c75 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 52265c3..76d2e72 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -11,6 +11,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index 9166848..c437b3a 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index b2276a9..9fdd842 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -25,5 +25,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 7aa8233..810db5b 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -24,5 +24,6 @@ CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 160ce93..88bf379 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index 4b4fd27..80961f7 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index c86cedc..f187083 100644
--- a/configs/

[U-Boot] [PATCH 1/8] usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

The description was borrowed from kernel, but allowed range was changed
from 2..500 to 0..500, because some boards require this option to be 0.

Definitions were added to defconfig files in a way that
"make savedefconfig" generates exactly the same file as used defconfig.

Signed-off-by: Sam Protsenko 
---
 configs/A13-OLinuXino_defconfig   |  1 +
 configs/CHIP_defconfig|  1 +
 configs/Cubietruck_defconfig  |  1 +
 configs/bcm11130_defconfig|  1 +
 configs/bcm11130_nand_defconfig   |  1 +
 configs/bcm28155_ap_defconfig |  1 +
 configs/bcm28155_w1d_defconfig|  1 +
 configs/kc1_defconfig |  1 +
 configs/omap3_beagle_defconfig|  1 +
 configs/omap3_logic_defconfig |  1 +
 configs/sniper_defconfig  |  1 +
 configs/tbs2910_defconfig |  1 +
 drivers/usb/gadget/Kconfig| 21 +
 include/configs/am335x_evm.h  |  1 -
 include/configs/am43xx_evm.h  |  5 -
 include/configs/baltos.h  |  1 -
 include/configs/bav335x.h |  1 -
 include/configs/bcm28155_ap.h |  1 -
 include/configs/cgtqmx6eval.h |  1 -
 include/configs/colibri_vf.h  |  1 -
 include/configs/corvus.h  |  1 -
 include/configs/dra7xx_evm.h  |  1 -
 include/configs/exynos4-common.h  |  1 -
 include/configs/gw_ventana.h  |  1 -
 include/configs/kc1.h |  1 -
 include/configs/mx6sabre_common.h |  1 -
 include/configs/mx7dsabresd.h |  1 -
 include/configs/nitrogen6x.h  |  1 -
 include/configs/odroid_xu3.h  |  1 -
 include/configs/omap3_beagle.h|  1 -
 include/configs/omap3_logic.h |  1 -
 include/configs/omap5_uevm.h  |  1 -
 include/configs/pengwyn.h |  1 -
 include/configs/s5p_goni.h|  1 -
 include/configs/siemens-am33x-common.h|  1 -
 include/configs/smartweb.h|  1 -
 include/configs/sniper.h  |  1 -
 include/configs/socfpga_common.h  |  1 -
 include/configs/sunxi-common.h|  1 -
 include/configs/taurus.h  |  1 -
 include/configs/tbs2910.h |  1 -
 include/configs/tegra-common-usb-gadget.h |  1 -
 include/configs/warp.h|  1 -
 include/configs/xilinx_zynqmp.h   |  1 -
 include/configs/zynq-common.h |  1 -
 45 files changed, 37 insertions(+), 32 deletions(-)

diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 45ec575..f022ba3 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -23,3 +23,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index f6346de..6c9a25f 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -14,3 +14,4 @@ CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 0599472..7400d8d 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -20,3 +20,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/bcm11130_defconfig b/configs/bcm11130_defconfig
index 222c319..d6e13c0 100644
--- a/configs/bcm11130_defconfig
+++ b/configs/bcm11130_defconfig
@@ -10,3 +10,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/bcm11130_nand_defconfig b/configs/bcm11130_nand_defconfig
index 7e1e682..8cb654b 100644
--- a/configs/bcm11130_nand_defconfig
+++ b/configs/bcm11130_nand_defconfig
@@ -10,3 +10,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/bcm28155_ap_defconfig b/configs/bcm28155_ap_defconfig
index ba57944..eb6a609 100644
--- a/configs/bcm28155_ap_defconfig
+++ b/configs/bcm28155_ap_defconfig
@@ -9,3 +9,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/bcm28155_w1d_defconfig b/configs/bcm28155_w1d_defconfig
index 36849d5..21d83d4 100644
--- a/configs/bcm28155_w1d_defconfig
+++ b/configs/bcm28155_w1d_defconfig
@@ -10,3 +10,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
diff --git a/configs/kc1_defconfig b/configs/kc1_defconfig
index 06698b8..73c89b5 100644
--- a/configs/kc1_defconfig
+++ b/configs/kc1_defconfig
@@ -13,4 +13,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CO

[U-Boot] [PATCH 3/8] usb: dwc3: Move CONFIG_USB_DWC3 to Kconfig

2016-04-05 Thread Semen Protsenko
From: Sam Protsenko 

Also remove CONFIG_USB_GADGET_DUALSPEED from headers that use DWC3
controller, as this option is selected by CONFIG_USB_DWC3.

Signed-off-by: Sam Protsenko 
---
 configs/am437x_gp_evm_defconfig   | 1 +
 configs/am437x_sk_evm_defconfig   | 1 +
 configs/am43xx_evm_defconfig  | 1 +
 configs/am43xx_evm_ethboot_defconfig  | 1 +
 configs/am43xx_evm_qspiboot_defconfig | 1 +
 configs/am43xx_evm_usbhost_boot_defconfig | 1 +
 configs/dra72_evm_defconfig   | 1 +
 configs/dra74_evm_defconfig   | 1 +
 configs/dra7xx_evm_defconfig  | 1 +
 configs/dra7xx_evm_qspiboot_defconfig | 1 +
 configs/dra7xx_evm_uart3_defconfig| 1 +
 configs/odroid-xu3_defconfig  | 1 +
 configs/omap5_uevm_defconfig  | 1 +
 configs/xilinx_zynqmp_ep_defconfig| 1 +
 drivers/usb/Kconfig   | 2 ++
 drivers/usb/dwc3/Kconfig  | 7 +++
 include/configs/am43xx_evm.h  | 5 +++--
 include/configs/dra7xx_evm.h  | 2 --
 include/configs/odroid_xu3.h  | 4 
 include/configs/omap5_uevm.h  | 2 --
 include/configs/xilinx_zynqmp.h   | 2 --
 21 files changed, 26 insertions(+), 12 deletions(-)
 create mode 100644 drivers/usb/dwc3/Kconfig

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 356f6fd..e628bd4 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -21,4 +21,5 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 2e2827f..d556a7f 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -25,4 +25,5 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index cc83006..9b746bf 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -12,5 +12,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig 
b/configs/am43xx_evm_ethboot_defconfig
index a720c14..30a344c 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -11,5 +11,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig 
b/configs/am43xx_evm_qspiboot_defconfig
index 6db389b..75c75dc 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -10,5 +10,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig 
b/configs/am43xx_evm_usbhost_boot_defconfig
index cbaf5a5..9c2234f 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -11,5 +11,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index da24992..47fb0d7 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -24,4 +24,5 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 9039b15..a15b65b 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -23,4 +23,5 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 9be4c2d..2d504a5 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -14,5 +14,6 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig 
b/configs/dra7xx_evm_qspiboot_defconfig
index b77c7c3..6af9619 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -14,5 +14,6 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig 
b/configs/dra7xx_evm_uart3_defconfig
index 1a1fb6d..80ae9dd 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -15,5 +15,6 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_USB=y
+CO

[U-Boot] [PATCH] arm: socfpga: sr1500: Remove USB_GADGET

2016-04-01 Thread Semen Protsenko
From: Sam Protsenko 

"buildman" tool revealed that USB_GADGET was enabled by mistake for this
board in process of moving that option to Kconfig. Remove it to bring
things back to correct state.

Signed-off-by: Sam Protsenko 
---
 configs/socfpga_sr1500_defconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index 2842fba..d499a14 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -21,5 +21,3 @@ CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
-CONFIG_USB=y
-CONFIG_USB_GADGET=y
-- 
2.8.0.rc3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] usb: gadget: Move CONFIG_USB_GADGET to Kconfig

2016-03-25 Thread Semen Protsenko
From: Sam Protsenko 

The description was borrowed from kernel. "tristate" type was changed
to "bool" (I believe we don't support modules for u-boot yet, right?).
CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along
as well.

Definitions were added to defconfig files in a way that
"make savedefconfig" generates exactly the same file as used defconfig.

Signed-off-by: Sam Protsenko 
---
 configs/A13-OLinuXino_defconfig  |  1 +
 configs/CHIP_defconfig   |  1 +
 configs/Cubietruck_defconfig |  1 +
 configs/am335x_baltos_defconfig  |  2 ++
 configs/am335x_boneblack_defconfig   |  2 ++
 configs/am335x_boneblack_vboot_defconfig |  2 ++
 configs/am335x_evm_defconfig |  2 ++
 configs/am335x_evm_nor_defconfig |  2 ++
 configs/am335x_evm_norboot_defconfig |  2 ++
 configs/am335x_evm_spiboot_defconfig |  2 ++
 configs/am335x_evm_usbspl_defconfig  |  2 ++
 configs/am335x_gp_evm_defconfig  |  2 ++
 configs/am437x_gp_evm_defconfig  |  2 ++
 configs/am437x_sk_evm_defconfig  |  2 ++
 configs/am43xx_evm_defconfig |  2 ++
 configs/am43xx_evm_ethboot_defconfig |  2 ++
 configs/am43xx_evm_qspiboot_defconfig|  2 ++
 configs/am43xx_evm_usbhost_boot_defconfig|  2 ++
 configs/apalis_t30_defconfig |  1 +
 configs/bcm11130_defconfig   |  2 ++
 configs/bcm11130_nand_defconfig  |  2 ++
 configs/bcm28155_ap_defconfig|  2 ++
 configs/bcm28155_w1d_defconfig   |  2 ++
 configs/beaver_defconfig |  1 +
 configs/birdland_bav335a_defconfig   |  2 ++
 configs/birdland_bav335b_defconfig   |  2 ++
 configs/cgtqmx6eval_defconfig|  2 ++
 configs/colibri_t20_defconfig|  1 +
 configs/colibri_t30_defconfig|  1 +
 configs/colibri_vf_defconfig |  2 ++
 configs/corvus_defconfig |  2 ++
 configs/dalmore_defconfig|  1 +
 configs/dra72_evm_defconfig  |  2 ++
 configs/dra74_evm_defconfig  |  2 ++
 configs/dra7xx_evm_defconfig |  2 ++
 configs/dra7xx_evm_qspiboot_defconfig|  2 ++
 configs/dra7xx_evm_uart3_defconfig   |  2 ++
 configs/draco_defconfig  |  2 ++
 configs/e2220-1170_defconfig |  1 +
 configs/gwventana_defconfig  |  2 ++
 configs/jetson-tk1_defconfig |  1 +
 configs/kc1_defconfig|  1 +
 configs/ma5d4evk_defconfig   |  2 ++
 configs/mx6dlsabreauto_defconfig |  2 ++
 configs/mx6dlsabresd_defconfig   |  2 ++
 configs/mx6qpsabreauto_defconfig |  2 ++
 configs/mx6qsabreauto_defconfig  |  2 ++
 configs/mx6qsabrelite_defconfig  |  2 ++
 configs/mx6qsabresd_defconfig|  2 ++
 configs/mx6sabresd_spl_defconfig |  2 ++
 configs/mx7dsabresd_defconfig|  2 ++
 configs/nitrogen6dl2g_defconfig  |  2 ++
 configs/nitrogen6dl_defconfig|  2 ++
 configs/nitrogen6q2g_defconfig   |  2 ++
 configs/nitrogen6q_defconfig |  2 ++
 configs/nitrogen6s1g_defconfig   |  2 ++
 configs/nitrogen6s_defconfig |  2 ++
 configs/nyan-big_defconfig   |  1 +
 configs/odroid-xu3_defconfig |  1 +
 configs/odroid_defconfig |  1 +
 configs/omap3_beagle_defconfig   |  2 ++
 configs/omap3_logic_defconfig|  2 ++
 configs/omap5_uevm_defconfig |  2 ++
 configs/origen_defconfig |  1 +
 configs/p2371-_defconfig |  1 +
 configs/p2371-2180_defconfig |  1 +
 configs/p2571_defconfig  |  1 +
 configs/pengwyn_defconfig|  2 ++
 configs/pxm2_defconfig   |  2 ++
 configs/rastaban_defconfig   |  2 ++
 configs/rut_defconfig|  2 ++
 configs/s5p_goni_defconfig   |  2 ++
 configs/s5pc210_universal_defconfig  |  1 +
 configs/sama5d2_xplained_mmc_defconfig   |  2 ++
 configs/sama5d2_xplained_spiflash_defconfig  |  2 ++
 configs/sama5d3xek_mmc_defconfig |  2 ++
 configs/sama5d3xek_nandflash_defconfig   |  2 ++
 configs/sama5d3xek_spiflash_defconfig|  2 ++
 configs/sama5d4_xplained_mmc_defconfig   |  2 ++
 configs/sama5d4_xplained_nandflash_defconfig |  2 ++
 configs/sama5d4_xplained_spiflash_defconfig  |  2 ++
 configs/sama5d4ek_mmc_defconfig  |  2 ++
 configs/sama5d4ek_nandflash_defconfig|  2 ++
 configs/sama5d4ek_spiflash_defconfig |  2 ++
 configs/smartweb_defconfig   |  2 ++
 configs/sniper_def

[U-Boot] [PATCH 2/3] Revert "ARM: DRA7: EMIF: Add 4GB DDR settings"

2016-03-23 Thread Semen Protsenko
From: Sam Protsenko 

This reverts commit c4a2736ca165167aa38228a60354c6a8950d42f8.
---
 board/ti/dra7xx/evm.c | 83 ++-
 1 file changed, 3 insertions(+), 80 deletions(-)

diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 4e45abf..eb19a6d 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -34,8 +34,6 @@
 #define board_is_dra74x_evm()  board_ti_is("5777xCPU")
 #define board_is_dra74x_revh_or_later() board_is_dra74x_evm() &&   \
(strncmp("H", board_ti_get_rev(), 1) <= 0)
-#define board_ti_get_emif_size()   board_ti_get_emif1_size() + \
-   board_ti_get_emif2_size()
 
 #ifdef CONFIG_DRIVER_TI_CPSW
 #include 
@@ -127,78 +125,18 @@ static const struct emif_regs 
emif_1_regs_ddr3_666_mhz_1cs_dra_es1 = {
.emif_rd_wr_exec_thresh = 0x0305
 };
 
-const struct emif_regs emif1_ddr3_532_mhz_1cs_2G = {
-   .sdram_config_init  = 0x61851ab2,
-   .sdram_config   = 0x61851ab2,
-   .sdram_config2  = 0x0800,
-   .ref_ctrl   = 0x40F1,
-   .ref_ctrl_final = 0x1035,
-   .sdram_tim1 = 0xCCCF36B3,
-   .sdram_tim2 = 0x30BF7FDA,
-   .sdram_tim3 = 0x427F8BA8,
-   .read_idle_ctrl = 0x0005,
-   .zq_config  = 0x0007190B,
-   .temp_alert_config  = 0x,
-   .emif_ddr_phy_ctlr_1_init   = 0x0024400B,
-   .emif_ddr_phy_ctlr_1= 0x0E24400B,
-   .emif_ddr_ext_phy_ctrl_1= 0x10040100,
-   .emif_ddr_ext_phy_ctrl_2= 0x00910091,
-   .emif_ddr_ext_phy_ctrl_3= 0x00950095,
-   .emif_ddr_ext_phy_ctrl_4= 0x009B009B,
-   .emif_ddr_ext_phy_ctrl_5= 0x009E009E,
-   .emif_rd_wr_lvl_rmp_win = 0x,
-   .emif_rd_wr_lvl_rmp_ctl = 0x8000,
-   .emif_rd_wr_lvl_ctl = 0x,
-   .emif_rd_wr_exec_thresh = 0x0305
-};
-
-const struct emif_regs emif2_ddr3_532_mhz_1cs_2G = {
-   .sdram_config_init  = 0x61851B32,
-   .sdram_config   = 0x61851B32,
-   .sdram_config2  = 0x0800,
-   .ref_ctrl   = 0x40F1,
-   .ref_ctrl_final = 0x1035,
-   .sdram_tim1 = 0xCCCF36B3,
-   .sdram_tim2 = 0x308F7FDA,
-   .sdram_tim3 = 0x427F88A8,
-   .read_idle_ctrl = 0x0005,
-   .zq_config  = 0x0007190B,
-   .temp_alert_config  = 0x,
-   .emif_ddr_phy_ctlr_1_init   = 0x0024400B,
-   .emif_ddr_phy_ctlr_1= 0x0E24400B,
-   .emif_ddr_ext_phy_ctrl_1= 0x10040100,
-   .emif_ddr_ext_phy_ctrl_2= 0x00910091,
-   .emif_ddr_ext_phy_ctrl_3= 0x00950095,
-   .emif_ddr_ext_phy_ctrl_4= 0x009B009B,
-   .emif_ddr_ext_phy_ctrl_5= 0x009E009E,
-   .emif_rd_wr_lvl_rmp_win = 0x,
-   .emif_rd_wr_lvl_rmp_ctl = 0x8000,
-   .emif_rd_wr_lvl_ctl = 0x,
-   .emif_rd_wr_exec_thresh = 0x0305
-};
-
 void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
 {
-   u64 ram_size;
-
-   ram_size = board_ti_get_emif_size();
-
switch (omap_revision()) {
case DRA752_ES1_0:
case DRA752_ES1_1:
case DRA752_ES2_0:
switch (emif_nr) {
case 1:
-   if (ram_size > CONFIG_MAX_MEM_MAPPED)
-   *regs = &emif1_ddr3_532_mhz_1cs_2G;
-   else
-   *regs = &emif1_ddr3_532_mhz_1cs;
+   *regs = &emif1_ddr3_532_mhz_1cs;
break;
case 2:
-   if (ram_size > CONFIG_MAX_MEM_MAPPED)
-   *regs = &emif2_ddr3_532_mhz_1cs_2G;
-   else
-   *regs = &emif2_ddr3_532_mhz_1cs;
+   *regs = &emif2_ddr3_532_mhz_1cs;
break;
}
break;
@@ -226,28 +164,13 @@ static const struct dmm_lisa_map_regs lisa_map_2G_x_2 = {
.is_ma_present  = 0x1
 };
 
-const struct dmm_lisa_map_regs lisa_map_dra7_2GB = {
-   .dmm_lisa_map_0 = 0x0,
-   .dmm_lisa_map_1 = 0x0,
-   .dmm_lisa_map_2 = 0x80740300,
-   .dmm_lisa_map_3 = 0xFF020100,
-   .is_ma_present  = 0x1
-};
-
 void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
 {
-   u64 ram_size;
-
-   ram_size = board_ti_get_emif_size();
-
switch (omap_revision()) {
case DRA752_ES1_0:
case DRA

[U-Boot] [PATCH 3/3] Revert "ARM: DRA7-evm: Update memory info in banks"

2016-03-23 Thread Semen Protsenko
From: Sam Protsenko 

This reverts commit d468b1781abe3975fdbc1695ef1fcfb48b01732b.
---
 board/ti/dra7xx/evm.c | 14 --
 1 file changed, 14 deletions(-)

diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index eb19a6d..4f60837 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -191,20 +191,6 @@ int board_init(void)
return 0;
 }
 
-void dram_init_banksize(void)
-{
-   u64 ram_size;
-
-   ram_size = board_ti_get_emif_size();
-
-   gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
-   gd->bd->bi_dram[0].size = get_effective_memsize();
-   if (ram_size > CONFIG_MAX_MEM_MAPPED) {
-   gd->bd->bi_dram[1].start = 0x2;
-   gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;
-   }
-}
-
 int board_late_init(void)
 {
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] Revert "ARM: DRA7: configs: Prepare for detecting memory > 2GB"

2016-03-23 Thread Semen Protsenko
From: Sam Protsenko 

This reverts commit 212425b2721bb67273963b7fc517455425948d90.
---
 include/configs/dra7xx_evm.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index c0795ab..6e3a482 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -19,11 +19,6 @@
 #define CONFIG_IODELAY_RECALIBRATION
 #endif
 
-#define CONFIG_VERY_BIG_RAM
-#define CONFIG_PHYS_64BIT
-#define CONFIG_NR_DRAM_BANKS   2
-#define CONFIG_MAX_MEM_MAPPED  0x8000
-
 #ifndef CONFIG_QSPI_BOOT
 /* MMC ENV related defines */
 #define CONFIG_ENV_IS_IN_MMC
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/3] ARM: DRA7: Fix fastboot command

2016-03-23 Thread Semen Protsenko

Hi All,

This series reverts recently added patches that break fastboot command.
I propose to keep it this way until issue is found and fixed.

When I'm trying to run fastboot command, next error occurs:

=> fas 0
data abort
pc : []  lr : [<0020>]
reloc pc : [<8081f25e>]lr : []
...
Resetting CPU ...

My board information:

CPU  : DRA752 ES1.0
Board: DRA74x EVM REV E.0
I2C:   ready
DRAM:  1.5 GiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
SCSI:  SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] usb: gadget: Move CONFIG_USB_GADGET to Kconfig

2016-03-22 Thread Semen Protsenko
From: Sam Protsenko 

The description was borrowed from kernel. "tristate" type was changed
to "bool" (I believe we don't support modules for u-boot yet, right?).
CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along
as well.

Some platforms weren't ported though:

include/configs/e2220-1170.h
include/configs/sunxi-common.h
include/configs/xilinx_zynqmp.h

CONFIG_USB_GADGET remains in those files as there is no corresponding
defconfig files for those and I don't want to break anything.

Signed-off-by: Sam Protsenko 
---
 configs/am335x_baltos_defconfig  |  2 ++
 configs/am335x_boneblack_defconfig   |  2 ++
 configs/am335x_boneblack_vboot_defconfig |  2 ++
 configs/am335x_evm_defconfig |  2 ++
 configs/am335x_evm_nor_defconfig |  2 ++
 configs/am335x_evm_norboot_defconfig |  2 ++
 configs/am335x_evm_spiboot_defconfig |  2 ++
 configs/am335x_evm_usbspl_defconfig  |  2 ++
 configs/am335x_gp_evm_defconfig  |  2 ++
 configs/am437x_gp_evm_defconfig  |  2 ++
 configs/am437x_sk_evm_defconfig  |  2 ++
 configs/am43xx_evm_defconfig |  2 ++
 configs/am43xx_evm_ethboot_defconfig |  2 ++
 configs/am43xx_evm_qspiboot_defconfig|  2 ++
 configs/am43xx_evm_usbhost_boot_defconfig|  2 ++
 configs/apalis_t30_defconfig |  1 +
 configs/bcm11130_defconfig   |  2 ++
 configs/bcm11130_nand_defconfig  |  2 ++
 configs/bcm28155_ap_defconfig|  2 ++
 configs/bcm28155_w1d_defconfig   |  2 ++
 configs/beaver_defconfig |  1 +
 configs/birdland_bav335a_defconfig   |  2 ++
 configs/birdland_bav335b_defconfig   |  2 ++
 configs/cgtqmx6eval_defconfig|  2 ++
 configs/colibri_t20_defconfig|  1 +
 configs/colibri_t30_defconfig|  1 +
 configs/colibri_vf_defconfig |  2 ++
 configs/corvus_defconfig |  2 ++
 configs/dalmore_defconfig|  1 +
 configs/dra72_evm_defconfig  |  2 ++
 configs/dra74_evm_defconfig  |  2 ++
 configs/dra7xx_evm_defconfig |  2 ++
 configs/dra7xx_evm_qspiboot_defconfig|  2 ++
 configs/dra7xx_evm_uart3_defconfig   |  2 ++
 configs/draco_defconfig  |  2 ++
 configs/gwventana_defconfig  |  2 ++
 configs/jetson-tk1_defconfig |  1 +
 configs/kc1_defconfig|  1 +
 configs/ma5d4evk_defconfig   |  2 ++
 configs/mx6dlsabreauto_defconfig |  2 ++
 configs/mx6dlsabresd_defconfig   |  2 ++
 configs/mx6qpsabreauto_defconfig |  2 ++
 configs/mx6qsabreauto_defconfig  |  2 ++
 configs/mx6qsabrelite_defconfig  |  2 ++
 configs/mx6qsabresd_defconfig|  2 ++
 configs/mx6sabresd_spl_defconfig |  2 ++
 configs/mx7dsabresd_defconfig|  2 ++
 configs/nitrogen6dl2g_defconfig  |  2 ++
 configs/nitrogen6dl_defconfig|  2 ++
 configs/nitrogen6q2g_defconfig   |  2 ++
 configs/nitrogen6q_defconfig |  2 ++
 configs/nitrogen6s1g_defconfig   |  2 ++
 configs/nitrogen6s_defconfig |  2 ++
 configs/nyan-big_defconfig   |  1 +
 configs/odroid-xu3_defconfig |  1 +
 configs/odroid_defconfig |  1 +
 configs/omap3_beagle_defconfig   |  2 ++
 configs/omap3_logic_defconfig|  2 ++
 configs/omap5_uevm_defconfig |  2 ++
 configs/origen_defconfig |  1 +
 configs/p2371-_defconfig |  1 +
 configs/p2371-2180_defconfig |  1 +
 configs/p2571_defconfig  |  1 +
 configs/pengwyn_defconfig|  2 ++
 configs/pxm2_defconfig   |  2 ++
 configs/rastaban_defconfig   |  2 ++
 configs/rut_defconfig|  2 ++
 configs/s5p_goni_defconfig   |  2 ++
 configs/s5pc210_universal_defconfig  |  1 +
 configs/sama5d2_xplained_mmc_defconfig   |  2 ++
 configs/sama5d2_xplained_spiflash_defconfig  |  2 ++
 configs/sama5d3xek_mmc_defconfig |  2 ++
 configs/sama5d3xek_nandflash_defconfig   |  2 ++
 configs/sama5d3xek_spiflash_defconfig|  2 ++
 configs/sama5d4_xplained_mmc_defconfig   |  2 ++
 configs/sama5d4_xplained_nandflash_defconfig |  2 ++
 configs/sama5d4_xplained_spiflash_defconfig  |  2 ++
 configs/sama5d4ek_mmc_defconfig  |  2 ++
 configs/sama5d4ek_nandflash_defconfig|  2 ++
 configs/sama5d4ek_spiflash_defconfig |  2 ++
 configs/smartweb_defconfig   |  2 ++
 configs/sniper_defconfig |  1 +
 configs/socfpga_arria5_defcon

[U-Boot] [PATCH 5/6] arm: am57xx: Enable 8-bit eMMC access on AM57XX EVM

2016-03-08 Thread Semen Protsenko
From: Sam Protsenko 

Use 8-bit access instead of 4-bit to speed up eMMC flashing speed.

Signed-off-by: Sam Protsenko 
---
 include/configs/am57xx_evm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index d075d61..1ab9498 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -75,6 +75,7 @@
 #define CONFIG_CMD_GPT
 #define CONFIG_EFI_PARTITION
 #define CONFIG_RANDOM_UUID
+#define CONFIG_HSMMC2_8BIT
 
 /* CPSW Ethernet */
 #define CONFIG_CMD_DHCP
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/6] arm: am57xx: Keep environment in eMMC

2016-03-08 Thread Semen Protsenko
From: Sam Protsenko 

Use eMMC (instead of SD card) to store U-Boot environment.

Signed-off-by: Sam Protsenko 
---
 include/configs/am57xx_evm.h | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 1ab9498..f467f46 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -22,11 +22,13 @@
 
 #define CONFIG_NR_DRAM_BANKS   2
 
-#define CONFIG_ENV_SIZE(64 << 10)
-#define CONFIG_ENV_IS_IN_FAT
-#define FAT_ENV_INTERFACE  "mmc"
-#define FAT_ENV_DEVICE_AND_PART"0:1"
-#define FAT_ENV_FILE   "uboot.env"
+/* MMC ENV related defines */
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV 1   /* SLOT2: eMMC(1) */
+#define CONFIG_ENV_SIZE(128 << 10)
+#define CONFIG_ENV_OFFSET  0xE
+#define CONFIG_ENV_OFFSET_REDUND   (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 #define CONSOLEDEV "ttyO2"
 #define CONFIG_SYS_NS16550_COM1UART1_BASE  /* Base EVM has 
UART0 */
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/6] arm: am57xx: Set serial# variable

2016-03-08 Thread Semen Protsenko
From: Sam Protsenko 

serial# variable is used to correctly display device ID in
"fastboot devices".

Signed-off-by: Sam Protsenko 
---
 board/ti/am57xx/board.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 042f9ab..751de39 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -270,6 +270,7 @@ int board_late_init(void)
 * This is the POWERHOLD-in-Low behavior.
 */
palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
+   omap_die_id_serial();
return 0;
 }
 
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/6] arm: am57xx: Add Fastboot support to AM57XX EVM

2016-03-08 Thread Semen Protsenko

Hi All,

This patch series add Fastboot support to TexasInstruments AM57XX EVM board and
improves eMMC support. The most of code was borrowed from DRA7 EVM (since
this board is very similar to DRA7 EVM).

Next commands were tested:
  - fastboot devices
  - fastboot getvar
  - fastboot oem format
  - fastboot flash

Sam Protsenko (6):
  arm: am57xx: Enable USB gadget in AM57XX
  arm: am57xx: Enable Fastboot
  arm: am57xx: Define Android partition table
  arm: am57xx: Set serial# variable
  arm: am57xx: Enable 8-bit eMMC access on AM57XX EVM
  arm: am57xx: Keep environment in eMMC

 board/ti/am57xx/board.c  |  1 +
 include/configs/am57xx_evm.h | 58 
+++-
 2 files changed, 53 insertions(+), 6 deletions(-)


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/6] arm: am57xx: Define Android partition table

2016-03-08 Thread Semen Protsenko
From: Sam Protsenko 

"fastboot oem format" command reuses "gpt write" command, which in turn
requires correct partitions defined in $partitions variable. This patch
adds such definition of Android partitions for AM57XX EVM board.

By default $partitions variable contains Linux partition table. In order
to prepare Android environment one can run next commands from U-Boot
shell:

=> env set partitions $partitions_android
=> env save

After those operations one can go to fastboot mode and perform
"fastboot oem format" to create Android partition table.

While at it, enable CONFIG_RANDOM_UUID to spare user from providing
UUIDs for each partition manually.

Signed-off-by: Sam Protsenko 
---
 include/configs/am57xx_evm.h | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 9a740d4..d075d61 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -39,8 +39,25 @@
 #ifndef CONFIG_SPL_BUILD
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
+   /* Linux partitions */ \
"uuid_disk=${uuid_gpt_disk};" \
-   "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
+   "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
+   /* Android partitions */ \
+   "partitions_android=" \
+   "uuid_disk=${uuid_gpt_disk};" \
+   "name=xloader,start=128K,size=128K,uuid=${uuid_gpt_xloader};" \
+   "name=bootloader,size=384K,uuid=${uuid_gpt_bootloader};" \
+   "name=environment,size=128K,uuid=${uuid_gpt_environment};" \
+   "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
+   "name=efs,start=1280K,size=16M,uuid=${uuid_gpt_efs};" \
+   "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
+   "name=recovery,size=10M,uuid=${uuid_gpt_recovery};" \
+   "name=boot,size=10M,uuid=${uuid_gpt_boot};" \
+   "name=system,size=768M,uuid=${uuid_gpt_system};" \
+   "name=cache,size=256M,uuid=${uuid_gpt_cache};" \
+   "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
+   "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
+   "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
 
 /* Fastboot */
 #define CONFIG_USB_FUNCTION_FASTBOOT
@@ -57,6 +74,7 @@
 /* Enhance our eMMC support / experience. */
 #define CONFIG_CMD_GPT
 #define CONFIG_EFI_PARTITION
+#define CONFIG_RANDOM_UUID
 
 /* CPSW Ethernet */
 #define CONFIG_CMD_DHCP
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/6] arm: am57xx: Enable Fastboot

2016-03-08 Thread Semen Protsenko
From: Sam Protsenko 

Enable fastboot by default for AM57XX EVM.

This is based on following patch modified accordingly:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b

Signed-off-by: Sam Protsenko 
---
 include/configs/am57xx_evm.h | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 9191d61..9a740d4 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -36,11 +36,22 @@
 
 #define CONFIG_SYS_OMAP_ABE_SYSCK
 
+#ifndef CONFIG_SPL_BUILD
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
"uuid_disk=${uuid_gpt_disk};" \
"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+/* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_CMD_FASTBOOT
+#define CONFIG_ANDROID_BOOT_IMAGE
+#define CONFIG_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
+#define CONFIG_FASTBOOT_BUF_SIZE   0x2F00
+#define CONFIG_FASTBOOT_FLASH
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV  1
+#endif
+
 #include 
 
 /* Enhance our eMMC support / experience. */
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/6] arm: am57xx: Enable USB gadget in AM57XX

2016-03-08 Thread Semen Protsenko
From: Sam Protsenko 

Enable dwc3, dwc3-omap and PHY for dwc3.
Also enable USB gadget.

Signed-off-by: Sam Protsenko 
---
 include/configs/am57xx_evm.h | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 6308cab..9191d61 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -77,6 +77,20 @@
 #define CONFIG_OMAP_USB_PHY
 #define CONFIG_OMAP_USB3PHY1_HOST
 
+/* USB GADGET */
+#define CONFIG_USB_DWC3_PHY_OMAP
+#define CONFIG_USB_DWC3_OMAP
+#define CONFIG_USB_DWC3
+#define CONFIG_USB_DWC3_GADGET
+
+#define CONFIG_USB_GADGET
+#define CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_USB_GADGET_VBUS_DRAW2
+#define CONFIG_G_DNL_MANUFACTURER  "Texas Instruments"
+#define CONFIG_G_DNL_VENDOR_NUM0x0451
+#define CONFIG_G_DNL_PRODUCT_NUM   0xd022
+#define CONFIG_USB_GADGET_DUALSPEED
+
 /* SATA */
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_CMD_SCSI
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] arm: dra7xx: Define Android partition table

2016-02-26 Thread Semen Protsenko
From: Sam Protsenko 

"fastboot oem format" command reuses "gpt write" command, which in turn
requires correct partitions defined in $partitions variable. This patch
adds such definition of Android partitions for DRA7XX EVM board.

By default $partitions variable contains Linux partition table. In order
to prepare Android environment one can run next commands from U-Boot
shell:

=> env set partitions $partitions_android
=> env save

After those operations one can go to fastboot mode and perform
"fastboot oem format" to create Android partition table.

While at it, enable CONFIG_RANDOM_UUID to spare user from providing
UUIDs for each partition manually.

Signed-off-by: Sam Protsenko 
---
 include/configs/dra7xx_evm.h | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 4658283..0196280 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -44,8 +44,25 @@
 #ifndef CONFIG_SPL_BUILD
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
+   /* Linux partitions */ \
"uuid_disk=${uuid_gpt_disk};" \
-   "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
+   "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
+   /* Android partitions */ \
+   "partitions_android=" \
+   "uuid_disk=${uuid_gpt_disk};" \
+   "name=xloader,start=128K,size=128K,uuid=${uuid_gpt_xloader};" \
+   "name=bootloader,size=384K,uuid=${uuid_gpt_bootloader};" \
+   "name=environment,size=128K,uuid=${uuid_gpt_environment};" \
+   "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
+   "name=efs,start=1280K,size=16M,uuid=${uuid_gpt_efs};" \
+   "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
+   "name=recovery,size=10M,uuid=${uuid_gpt_recovery};" \
+   "name=boot,size=10M,uuid=${uuid_gpt_boot};" \
+   "name=system,size=768M,uuid=${uuid_gpt_system};" \
+   "name=cache,size=256M,uuid=${uuid_gpt_cache};" \
+   "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
+   "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
+   "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
 
 #define DFU_ALT_INFO_MMC \
"dfu_alt_info_mmc=" \
@@ -116,6 +133,7 @@
 /* Enhance our eMMC support / experience. */
 #define CONFIG_CMD_GPT
 #define CONFIG_EFI_PARTITION
+#define CONFIG_RANDOM_UUID
 #define CONFIG_HSMMC2_8BIT
 
 /* CPSW Ethernet */
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] arm: dra7xx: Define Android partition table

2016-02-19 Thread Semen Protsenko
From: Sam Protsenko 

"fastboot oem format" command reuses "gpt write" command, which in turn
requires correct partitions defined in $partitions variable. This patch
adds such definition of Android partitions for DRA7XX EVM board.

While at it, enable CONFIG_RANDOM_UUID to spare user from providing
UUIDs for each partition manually.

Signed-off-by: Sam Protsenko 
---
 include/configs/dra7xx_evm.h | 20 
 1 file changed, 20 insertions(+)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 4658283..e7e074d 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -42,10 +42,29 @@
 #define CONFIG_SYS_OMAP_ABE_SYSCK
 
 #ifndef CONFIG_SPL_BUILD
+
 /* Define the default GPT table for eMMC */
+#ifndef CONFIG_ANDROID_BOOT
 #define PARTS_DEFAULT \
"uuid_disk=${uuid_gpt_disk};" \
"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
+#else
+#define PARTS_DEFAULT \
+   "uuid_disk=${uuid_gpt_disk};" \
+   "name=xloader,start=128K,size=128K,uuid=${uuid_gpt_xloader};" \
+   "name=bootloader,size=384K,uuid=${uuid_gpt_bootloader};" \
+   "name=environment,size=128K,uuid=${uuid_gpt_environment};" \
+   "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
+   "name=efs,start=1280K,size=16M,uuid=${uuid_gpt_efs};" \
+   "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
+   "name=recovery,size=10M,uuid=${uuid_gpt_recovery};" \
+   "name=boot,size=10M,uuid=${uuid_gpt_boot};" \
+   "name=system,size=768M,uuid=${uuid_gpt_system};" \
+   "name=cache,size=256M,uuid=${uuid_gpt_cache};" \
+   "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
+   "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
+   "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
+#endif
 
 #define DFU_ALT_INFO_MMC \
"dfu_alt_info_mmc=" \
@@ -116,6 +135,7 @@
 /* Enhance our eMMC support / experience. */
 #define CONFIG_CMD_GPT
 #define CONFIG_EFI_PARTITION
+#define CONFIG_RANDOM_UUID
 #define CONFIG_HSMMC2_8BIT
 
 /* CPSW Ethernet */
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] defconfig: Add dra7xx_evm_android_defconfig

2016-02-19 Thread Semen Protsenko
From: Sam Protsenko 

Add defconfig for DRA7XX EVM board intended for Android build.
This defconfig was derived from configs/dra7xx_evm_defconfig. The only
difference for now is that this new config exports Android partition
table via $partitions variable.

Signed-off-by: Sam Protsenko 
---
 configs/dra7xx_evm_android_defconfig | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 configs/dra7xx_evm_android_defconfig

diff --git a/configs/dra7xx_evm_android_defconfig 
b/configs/dra7xx_evm_android_defconfig
new file mode 100644
index 000..1e5960b
--- /dev/null
+++ b/configs/dra7xx_evm_android_defconfig
@@ -0,0 +1,17 @@
+CONFIG_ARM=y
+CONFIG_OMAP54XX=y
+CONFIG_TARGET_DRA7XX_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x8200
+CONFIG_SPL=y
+CONFIG_SPL_STACK_R=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_NFS is not set
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SYS_NS16550=y
+CONFIG_TI_QSPI=y
+CONFIG_ANDROID_BOOT=y
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] omap5: Kconfig: Add option to select Android boot

2016-02-19 Thread Semen Protsenko
From: Sam Protsenko 

We need to differentiate somehow if u-boot build is intended for Android
or regular Linux boot. Android requires some specific details from
bootloader, such as enabled fastboot and specific partition table.
Using this option we can check if user chose Android boot and configure
those details properly.

Signed-off-by: Sam Protsenko 
---
 arch/arm/cpu/armv7/omap5/Kconfig | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index bfa264e..e03daff 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -21,6 +21,14 @@ endchoice
 config SYS_SOC
default "omap5"
 
+config ANDROID_BOOT
+   bool "Android boot"
+   default n
+   help
+ This option enables Android build. Different boards can rely on this
+ option to provide Android partition list, enable fastboot capability
+ and so on.
+
 source "board/compulab/cm_t54/Kconfig"
 source "board/ti/omap5_uevm/Kconfig"
 source "board/ti/dra7xx/Kconfig"
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] usb: gadget: composite: Correct recovery path for register

2016-02-16 Thread Semen Protsenko
From: Sam Protsenko 

In case when usb_composite_register() failed once (for whatever reason),
it will fail further even if all conditions are correct. Example:

=> fastboot 2
Invalid Controller Index
couldn't find an available UDC
g_dnl_register: failed!, error: -19
exit not allowed from main input shell.

=> fastboot 0
g_dnl_register: failed!, error: -22
exit not allowed from main input shell.

Despite that 0 is correct index for USB controller, "fastboot 0" command
will fail, because "composite" structure wasn't cleared properly on
previous fail (on "fastboot 2" command).

This patch fixes that erroneous behavior, allowing us to use composite
even after previous failure.

Signed-off-by: Sam Protsenko 
---
 drivers/usb/gadget/composite.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 60f9272..d0ee784 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1077,6 +1077,8 @@ static struct usb_gadget_driver composite_driver = {
  */
 int usb_composite_register(struct usb_composite_driver *driver)
 {
+   int res;
+
if (!driver || !driver->dev || !driver->bind || composite)
return -EINVAL;
 
@@ -1084,7 +1086,11 @@ int usb_composite_register(struct usb_composite_driver 
*driver)
driver->name = "composite";
composite = driver;
 
-   return usb_gadget_register_driver(&composite_driver);
+   res = usb_gadget_register_driver(&composite_driver);
+   if (res != 0)
+   composite = NULL;
+
+   return res;
 }
 
 /**
-- 
2.7.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot