]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/configs/sunxi-common.h
LG Optimus Black (P970) codename sniper support
[karo-tx-uboot.git] / include / configs / sunxi-common.h
index 76f42f5f3dcee179342523523d11ced5ab93838a..a2cbcf5d9541d646ca8d6c764ccca6bb2f15d1e2 100644 (file)
 #define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SUNXI_AHCI
+#define CONFIG_SYS_64BIT_LBA
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
 #define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 #define CONFIG_CMD_SCSI
 #endif
 
-#define CONFIG_CMD_MEMORY
-#define CONFIG_CMD_SETEXPR
-
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_INITRD_TAG
 #define CONFIG_SERIAL_TAG
 
+#if defined(CONFIG_SPL_NAND_SUNXI)
+#define CONFIG_SPL_NAND_DRIVERS
+#define CONFIG_SPL_NAND_SUPPORT
+
+#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
+
+#endif
+
+
 /* mmc config */
 #if !defined(CONFIG_UART0_PORT_F)
 #define CONFIG_MMC
 /*
  * Miscellaneous configurable options
  */
-#define CONFIG_CMD_ECHO
 #define CONFIG_SYS_CBSIZE      1024    /* Console I/O Buffer Size */
 #define CONFIG_SYS_PBSIZE      1024    /* Print Buffer Size */
 #define CONFIG_SYS_MAXARGS     16      /* max number of command args */
 #define CONFIG_ENV_OFFSET              (544 << 10) /* (8 + 24 + 512) KiB */
 #define CONFIG_ENV_SIZE                        (128 << 10)     /* 128 KiB */
 
-#include <config_cmd_default.h>
-#undef CONFIG_CMD_FPGA
-
 #define CONFIG_FAT_WRITE       /* enable write access */
 
 #define CONFIG_SPL_FRAMEWORK
@@ -258,6 +262,7 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_CONS_INDEX              1       /* UART0 */
 #endif
 
+#ifdef CONFIG_REQUIRE_SERIAL_CONSOLE
 #if CONFIG_CONS_INDEX == 1
 #ifdef CONFIG_MACH_SUN9I
 #define OF_STDOUT_PATH         "/soc/serial@07000000:115200"
@@ -273,6 +278,7 @@ extern int soft_i2c_gpio_scl;
 #else
 #error Unsupported console port nr. Please fix stdout-path in sunxi-common.h.
 #endif
+#endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */
 
 /* GPIO */
 #define CONFIG_SUNXI_GPIO
@@ -324,7 +330,7 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_PHYLIB
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_USB_OHCI_SUNXI
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
@@ -332,13 +338,37 @@ extern int soft_i2c_gpio_scl;
 #endif
 
 #ifdef CONFIG_USB_MUSB_SUNXI
-#define CONFIG_MUSB_HOST
-#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_PIO_ONLY
+#endif
+
+#ifdef CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_GADGET
+#define CONFIG_USB_GADGET_DUALSPEED
+#define CONFIG_USB_GADGET_VBUS_DRAW    0
+
+#define CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_USB_FUNCTION_MASS_STORAGE
+#endif
+
+#ifdef CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_G_DNL_VENDOR_NUM                0x1f3a
+#define CONFIG_G_DNL_PRODUCT_NUM       0x1010
+#define CONFIG_G_DNL_MANUFACTURER      "Allwinner Technology"
+#endif
+
+#ifdef CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_CMD_FASTBOOT
+#define CONFIG_FASTBOOT_BUF_ADDR       CONFIG_SYS_LOAD_ADDR
+#define CONFIG_FASTBOOT_BUF_SIZE       0x2000000
+
+#define CONFIG_FASTBOOT_FLASH
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV  0
+#define CONFIG_EFI_PARTITION
 #endif
 
-#if defined CONFIG_USB_EHCI || defined CONFIG_USB_MUSB_SUNXI
-#define CONFIG_CMD_USB
-#define CONFIG_USB_STORAGE
+#ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
+#define CONFIG_CMD_USB_MASS_STORAGE
 #endif
 
 #ifdef CONFIG_USB_KEYBOARD
@@ -390,7 +420,7 @@ extern int soft_i2c_gpio_scl;
 #define BOOT_TARGET_DEVICES_SCSI(func)
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_STORAGE
 #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
 #else
 #define BOOT_TARGET_DEVICES_USB(func)