configs: Migrate CONFIG_SPL_FRAMEWORK
[oweals/u-boot.git] / include / configs / sunxi-common.h
index 91751171ec2bb791256da43359953d719b2f115d..15cafcf0f4567b0b6ddfffeb243c92ddc991a85e 100644 (file)
@@ -34,6 +34,7 @@
 
 #ifdef CONFIG_ARM64
 #define CONFIG_BUILD_TARGET "u-boot.itb"
+#define CONFIG_SYS_BOOTM_LEN           (32 << 20)
 #endif
 
 /* Serial & console */
@@ -63,7 +64,6 @@
 #define SDRAM_OFFSET(x) 0x2##x
 #define CONFIG_SYS_SDRAM_BASE          0x20000000
 #define CONFIG_SYS_LOAD_ADDR           0x22000000 /* default load address */
-#define CONFIG_SYS_TEXT_BASE           0x2a000000
 /* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here 
  * since it needs to fit in with the other values. By also #defining it
  * we get warnings if the Kconfig value mismatches. */
 #define CONFIG_SYS_SDRAM_BASE          0x40000000
 #define CONFIG_SYS_LOAD_ADDR           0x42000000 /* default load address */
 /* V3s do not have enough memory to place code at 0x4a000000 */
-#ifndef CONFIG_MACH_SUN8I_V3S
-#define CONFIG_SYS_TEXT_BASE           0x4a000000
-#else
-#define CONFIG_SYS_TEXT_BASE           0x42e00000
-#endif
 /* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here 
  * since it needs to fit in with the other values. By also #defining it
  * we get warnings if the Kconfig value mismatches. */
 #define PHYS_SDRAM_0_SIZE              0x80000000 /* 2 GiB */
 
 #ifdef CONFIG_AHCI
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SUNXI_AHCI
 #define CONFIG_SYS_64BIT_LBA
 #endif
 
 #if defined(CONFIG_ENV_IS_IN_MMC)
+
+#ifdef CONFIG_ARM64
+/*
+ * This is actually (CONFIG_ENV_OFFSET -
+ * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used
+ * directly in a makefile, without the preprocessor expansion.
+ */
+#define CONFIG_BOARD_SIZE_LIMIT                0x7e000
+#endif
+
 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 /* If we have two devices (most likely eMMC + MMC), favour the eMMC */
 #define CONFIG_SYS_MMC_ENV_DEV         1
 
 #define CONFIG_SYS_MONITOR_LEN         (768 << 10)     /* 768 KiB */
 
-#define CONFIG_SPL_FRAMEWORK
-
 #ifndef CONFIG_ARM64           /* AArch64 FEL support is not ready yet */
 #define CONFIG_SPL_BOARD_LOAD_IMAGE
 #endif
@@ -268,18 +269,13 @@ extern int soft_i2c_gpio_scl;
 /* GPIO */
 #define CONFIG_SUNXI_GPIO
 
-#ifdef CONFIG_VIDEO
+#ifdef CONFIG_VIDEO_SUNXI
 /*
  * The amount of RAM to keep free at the top of RAM when relocating u-boot,
  * to use as framebuffer. This must be a multiple of 4096.
  */
 #define CONFIG_SUNXI_MAX_FB_SIZE (16 << 20)
 
-/* Do we want to initialize a simple FB? */
-#define CONFIG_VIDEO_DT_SIMPLEFB
-
-#define CONFIG_VIDEO_SUNXI
-
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_STD_TIMINGS
 #define CONFIG_I2C_EDID
@@ -288,10 +284,10 @@ extern int soft_i2c_gpio_scl;
 /* allow both serial and cfb console. */
 /* stop x86 thinking in cfbconsole from trying to init a pc keyboard */
 
-#endif /* CONFIG_VIDEO */
+#endif /* CONFIG_VIDEO_SUNXI */
 
 /* Ethernet support */
-#ifdef CONFIG_SUNXI_EMAC
+#ifdef CONFIG_SUN4I_EMAC
 #define CONFIG_PHY_ADDR                1
 #define CONFIG_MII                     /* MII PHY management           */
 #endif
@@ -308,14 +304,6 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
 #endif
 
-#ifdef CONFIG_USB_MUSB_SUNXI
-#define CONFIG_USB_MUSB_PIO_ONLY
-#endif
-
-#ifdef CONFIG_USB_MUSB_GADGET
-#define CONFIG_USB_FUNCTION_MASS_STORAGE
-#endif
-
 #ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
 #endif
 
@@ -498,6 +486,20 @@ extern int soft_i2c_gpio_scl;
 #define SUNXI_MTDPARTS_DEFAULT
 #endif
 
+#define PARTS_DEFAULT \
+       "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \
+       "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \
+       "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \
+       "name=system,size=-,uuid=${uuid_gpt_system};"
+
+#define UUID_GPT_ESP "c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
+
+#ifdef CONFIG_ARM64
+#define UUID_GPT_SYSTEM "b921b045-1df0-41c3-af44-4c6f280d3fae"
+#else
+#define UUID_GPT_SYSTEM "69dad710-2ce4-4e3c-b16c-21a1d49abed3"
+#endif
+
 #define CONSOLE_ENV_SETTINGS \
        CONSOLE_STDIN_SETTINGS \
        CONSOLE_STDOUT_SETTINGS
@@ -516,6 +518,9 @@ extern int soft_i2c_gpio_scl;
        "console=ttyS0,115200\0" \
        SUNXI_MTDIDS_DEFAULT \
        SUNXI_MTDPARTS_DEFAULT \
+       "uuid_gpt_esp=" UUID_GPT_ESP "\0" \
+       "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \
+       "partitions=" PARTS_DEFAULT "\0" \
        BOOTCMD_SUNXI_COMPAT \
        BOOTENV