All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] fastboot: implement Kconfig
@ 2016-08-16  0:26 Steve Rae
  2016-08-16  0:26 ` [U-Boot] [PATCH 2/2] fastboot: move to Kconfig Steve Rae
  2016-08-21 15:08 ` [U-Boot] [U-Boot,1/2] fastboot: implement Kconfig Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Rae @ 2016-08-16  0:26 UTC (permalink / raw)
  To: u-boot

implement Kconfig for the 'fastboot' feature set

Signed-off-by: Steve Rae <steve.rae@raedomain.com>
---
It did not seem feasible to use the "moveconfig.py" tool -- mostly because
some of these configurations use defines rather than actual values...
In addition, implemented "config FASTBOOT" enable/disable for this entire
Kconfig capability, so that the existing "include/configs/*.h" capability
would not conflict....

 cmd/Kconfig                |  2 ++
 cmd/fastboot/Kconfig       | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/Kconfig |  5 ++++
 3 files changed, 67 insertions(+)
 create mode 100644 cmd/fastboot/Kconfig

diff --git a/cmd/Kconfig b/cmd/Kconfig
index d69b817..308a0c8 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -114,6 +114,8 @@ config AUTOBOOT_STOP_STR_SHA256
 
 endmenu
 
+source "cmd/fastboot/Kconfig"
+
 comment "Commands"
 
 menu "Info commands"
diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig
new file mode 100644
index 0000000..a93d1c0
--- /dev/null
+++ b/cmd/fastboot/Kconfig
@@ -0,0 +1,60 @@
+comment "FASTBOOT"
+
+config FASTBOOT
+	bool ""
+
+menu "Fastboot support"
+	depends on FASTBOOT
+
+config USB_FUNCTION_FASTBOOT
+	bool "Enable USB fastboot gadget"
+	help
+	  This enables the USB part of the fastboot gadget.
+
+config CMD_FASTBOOT
+	bool "Enable FASTBOOT command"
+	help
+	  This enables the command "fastboot" which enables the Android
+	  fastboot mode for the platform's USB device. Fastboot is a USB
+	  protocol for downloading images, flashing and device control
+	  used on Android devices.
+
+config ANDROID_BOOT_IMAGE
+	bool "Enable support for Android Boot Images"
+	help
+	  This enables support for booting images which use the Android
+	  image format header.
+
+if USB_FUNCTION_FASTBOOT
+
+config FASTBOOT_BUF_ADDR
+	hex "Define FASTBOOT buffer address"
+	help
+	  The fastboot protocol requires a large memory buffer for
+	  downloads. Define this to the starting RAM address to use for
+	  downloaded images.
+
+config FASTBOOT_BUF_SIZE
+	hex "Define FASTBOOT buffer size"
+	help
+	  The fastboot protocol requires a large memory buffer for
+	  downloads. This buffer should be as large as possible for a
+	  platform. Define this to the size available RAM for fastboot.
+
+config FASTBOOT_FLASH
+	bool "Enable FASTBOOT FLASH command"
+	help
+	  The fastboot protocol includes a "flash" command for writing
+	  the downloaded image to a non-volatile storage device. Define
+	  this to enable the "fastboot flash" command.
+
+config FASTBOOT_FLASH_MMC_DEV
+	int "Define FASTBOOT MMC FLASH default device"
+	help
+	  The fastboot "flash" command requires additional information
+	  regarding the non-volatile storage device. Define this to
+	  the eMMC device that fastboot should use to store the image.
+
+endif # USB_FUNCTION_FASTBOOT
+
+endmenu
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index ae62476..40839d8 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -43,6 +43,11 @@ config USB_GADGET_ATMEL_USBA
 	  USBA is the integrated high-speed USB Device controller on
 	  the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
 
+config USB_GADGET_BCM_UDC_OTG_PHY
+	bool "Broadcom UDC OTG PHY"
+	help
+	  Enable the Broadcom UDC OTG physical device interface.
+
 config USB_GADGET_DWC2_OTG
 	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
 	select USB_GADGET_DUALSPEED
-- 
1.8.5

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

* [U-Boot] [PATCH 2/2] fastboot: move to Kconfig
  2016-08-16  0:26 [U-Boot] [PATCH 1/2] fastboot: implement Kconfig Steve Rae
@ 2016-08-16  0:26 ` Steve Rae
  2016-08-21 15:08   ` [U-Boot] [U-Boot,2/2] " Tom Rini
  2016-08-21 15:08 ` [U-Boot] [U-Boot,1/2] fastboot: implement Kconfig Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Steve Rae @ 2016-08-16  0:26 UTC (permalink / raw)
  To: u-boot

- move bcm23550_w1d to Kconfig
- move bcm28155_ap to Kconfig

Signed-off-by: Steve Rae <steve.rae@raedomain.com>
---

 configs/bcm23550_w1d_defconfig | 8 ++++++++
 configs/bcm28155_ap_defconfig  | 8 ++++++++
 include/configs/bcm23550_w1d.h | 8 --------
 include/configs/bcm28155_ap.h  | 8 --------
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/configs/bcm23550_w1d_defconfig b/configs/bcm23550_w1d_defconfig
index 0ef4a37..ca4feaf 100644
--- a/configs/bcm23550_w1d_defconfig
+++ b/configs/bcm23550_w1d_defconfig
@@ -2,6 +2,13 @@ CONFIG_ARM=y
 CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM23550_W1D=y
 CONFIG_HUSH_PARSER=y
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x80000000
+CONFIG_FASTBOOT_BUF_SIZE=0x1d000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
@@ -17,6 +24,7 @@ CONFIG_CMD_FAT=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_BCM_UDC_OTG_PHY=y
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/bcm28155_ap_defconfig b/configs/bcm28155_ap_defconfig
index 70eb44a..eb8aa35 100644
--- a/configs/bcm28155_ap_defconfig
+++ b/configs/bcm28155_ap_defconfig
@@ -3,6 +3,13 @@ CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM28155_AP=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTOBOOT is not set
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x80000000
+CONFIG_FASTBOOT_BUF_SIZE=0x7ff00000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
@@ -18,6 +25,7 @@ CONFIG_CMD_FAT=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_BCM_UDC_OTG_PHY=y
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/include/configs/bcm23550_w1d.h b/include/configs/bcm23550_w1d.h
index 8d041ed..770dd87 100644
--- a/include/configs/bcm23550_w1d.h
+++ b/include/configs/bcm23550_w1d.h
@@ -127,17 +127,9 @@
 /* Commands */
 #define CONFIG_FAT_WRITE
 
-/* Fastboot and USB OTG */
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_CMD_FASTBOOT
-#define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0
 #define CONFIG_SYS_CACHELINE_SIZE	64
-#define CONFIG_FASTBOOT_BUF_SIZE	0x1d000000
-#define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_SDRAM_BASE
 #undef CONFIG_USB_GADGET_VBUS_DRAW
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
-#define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
 #define CONFIG_USBID_ADDR		0x34052c46
 
 #define CONFIG_SYS_ICACHE_OFF
diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
index 889e5db..df0b2ba 100644
--- a/include/configs/bcm28155_ap.h
+++ b/include/configs/bcm28155_ap.h
@@ -126,15 +126,7 @@
 /* Commands */
 #define CONFIG_FAT_WRITE
 
-/* Fastboot and USB OTG */
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_CMD_FASTBOOT
-#define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0
 #define CONFIG_SYS_CACHELINE_SIZE	64
-#define CONFIG_FASTBOOT_BUF_SIZE	(CONFIG_SYS_SDRAM_SIZE - SZ_1M)
-#define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_SDRAM_BASE
-#define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
 #define CONFIG_USBID_ADDR		0x34052c46
 
 #endif /* __BCM28155_AP_H */
-- 
1.8.5

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

* [U-Boot] [U-Boot,1/2] fastboot: implement Kconfig
  2016-08-16  0:26 [U-Boot] [PATCH 1/2] fastboot: implement Kconfig Steve Rae
  2016-08-16  0:26 ` [U-Boot] [PATCH 2/2] fastboot: move to Kconfig Steve Rae
@ 2016-08-21 15:08 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-08-21 15:08 UTC (permalink / raw)
  To: u-boot

On Mon, Aug 15, 2016 at 05:26:26PM -0700, Steve Rae wrote:

> implement Kconfig for the 'fastboot' feature set
> 
> Signed-off-by: Steve Rae <steve.rae@raedomain.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160821/69845a5d/attachment.sig>

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

* [U-Boot] [U-Boot,2/2] fastboot: move to Kconfig
  2016-08-16  0:26 ` [U-Boot] [PATCH 2/2] fastboot: move to Kconfig Steve Rae
@ 2016-08-21 15:08   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-08-21 15:08 UTC (permalink / raw)
  To: u-boot

On Mon, Aug 15, 2016 at 05:26:27PM -0700, Steve Rae wrote:

> - move bcm23550_w1d to Kconfig
> - move bcm28155_ap to Kconfig
> 
> Signed-off-by: Steve Rae <steve.rae@raedomain.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160821/103e2b3d/attachment.sig>

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

end of thread, other threads:[~2016-08-21 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16  0:26 [U-Boot] [PATCH 1/2] fastboot: implement Kconfig Steve Rae
2016-08-16  0:26 ` [U-Boot] [PATCH 2/2] fastboot: move to Kconfig Steve Rae
2016-08-21 15:08   ` [U-Boot] [U-Boot,2/2] " Tom Rini
2016-08-21 15:08 ` [U-Boot] [U-Boot,1/2] fastboot: implement Kconfig Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.