[U-Boot] [PATCH 1/4] rockchip: rk3229: move usb gadget into defconfig

Kever Yang kever.yang at rock-chips.com
Fri Aug 4 08:41:17 UTC 2017


Use the defconfig for all usb gadget and function related
option instead of define then in header file.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 configs/evb-rk3229_defconfig    | 20 ++++++++++++++++++--
 include/configs/evb_rk3229.h    |  1 -
 include/configs/rk322x_common.h | 20 --------------------
 3 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 0c3b6f7..b048597 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -8,13 +8,23 @@ CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y
 CONFIG_TARGET_EVB_RK3229=y
 CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="rk3229-evb"
+CONFIG_DEBUG_UART=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200
 CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FASTBOOT_BUF_ADDR=0x60800800
+CONFIG_FASTBOOT_BUF_SIZE=0x04000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
@@ -31,14 +41,20 @@ CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ROCKCHIP_RK322X=y
-# CONFIG_SPL_PINCTRL_FULL is not set
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
 CONFIG_BAUDRATE=1500000
-CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_BASE=0x11030000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
 CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
 CONFIG_ERRNO_STR=y
diff --git a/include/configs/evb_rk3229.h b/include/configs/evb_rk3229.h
index 8f8e50f..df441f6 100644
--- a/include/configs/evb_rk3229.h
+++ b/include/configs/evb_rk3229.h
@@ -41,7 +41,6 @@
 
 #define CONFIG_PREBOOT
 
-#define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 
 #undef CONFIG_BOOTCOMMAND
diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h
index 56565b6..d01dc80 100644
--- a/include/configs/rk322x_common.h
+++ b/include/configs/rk322x_common.h
@@ -40,28 +40,8 @@
 #define SDRAM_MAX_SIZE			0x80000000
 
 #ifndef CONFIG_SPL_BUILD
-/* usb otg */
-#define CONFIG_USB_GADGET
-#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_DWC2_OTG
-#define CONFIG_USB_GADGET_VBUS_DRAW	0
-
-/* fastboot  */
-#define CONFIG_CMD_FASTBOOT
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0
-#define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
-#define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
-
 /* usb mass storage */
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
-#define CONFIG_CMD_USB_MASS_STORAGE
-
-#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_G_DNL_MANUFACTURER	"Rockchip"
-#define CONFIG_G_DNL_VENDOR_NUM		0x2207
-#define CONFIG_G_DNL_PRODUCT_NUM	0x320a
 
 /* usb host */
 #ifdef CONFIG_CMD_USB
-- 
1.9.1



More information about the U-Boot mailing list