diff options
Diffstat (limited to 'include')
92 files changed, 381 insertions, 246 deletions
diff --git a/include/common.h b/include/common.h index a8d833b989..695478c1ac 100644 --- a/include/common.h +++ b/include/common.h @@ -15,10 +15,15 @@ typedef volatile unsigned long vu_long; typedef volatile unsigned short vu_short; typedef volatile unsigned char vu_char; +/* Allow sharing constants with type modifiers between C and assembly. */ +#define _AC(X, Y) (X##Y) + #include <config.h> #include <errno.h> +#include <time.h> #include <asm-offsets.h> #include <linux/bitops.h> +#include <linux/delay.h> #include <linux/types.h> #include <linux/string.h> #include <linux/stringify.h> @@ -576,12 +581,6 @@ void ddr_enable_ecc(unsigned int dram_size); #endif #endif -/* - * Return the current value of a monotonically increasing microsecond timer. - * Granularity may be larger than 1us if hardware does not support this. - */ -ulong timer_get_us(void); - /* $(CPU)/cpu.c */ static inline int cpumask_next(int cpu, unsigned int mask) { @@ -720,7 +719,6 @@ void external_interrupt (struct pt_regs *); void irq_install_handler(int, interrupt_handler_t *, void *); void irq_free_handler (int); void reset_timer (void); -ulong get_timer (ulong base); /* Return value of monotonic microsecond timer */ unsigned long timer_get_us(void); @@ -776,7 +774,6 @@ uint64_t get_ticks(void); void wait_ticks (unsigned long); /* arch/$(ARCH)/lib/time.c */ -void __udelay (unsigned long); ulong usec2ticks (unsigned long usec); ulong ticks2usec (unsigned long ticks); int init_timebase (void); @@ -833,10 +830,6 @@ void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); int strcmp_compar(const void *, const void *); -/* lib/time.c */ -void udelay (unsigned long); -void mdelay(unsigned long); - /* lib/uuid.c */ #include <uuid.h> @@ -936,7 +929,12 @@ int cpu_disable(int nr); int cpu_release(int nr, int argc, char * const argv[]); #endif -#endif /* __ASSEMBLY__ */ +#else /* __ASSEMBLY__ */ + +/* Drop a C type modifier (like in 3UL) for constants used in assembly. */ +#define _AC(X, Y) X + +#endif /* __ASSEMBLY__ */ #ifdef CONFIG_PPC /* @@ -948,6 +946,9 @@ int cpu_release(int nr, int argc, char * const argv[]); /* Put only stuff here that the assembler can digest */ +/* Declare an unsigned long constant digestable both by C and an assembler. */ +#define UL(x) _AC(x, UL) + #ifdef CONFIG_POST #define CONFIG_HAS_POST #ifndef CONFIG_POST_ALT_LIST diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 49c14df8ad..0161dbee39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -281,12 +281,9 @@ #endif #ifdef CONFIG_USB_MUSB_GADGET -/* Removing USB gadget and can be enabled adter adding support usb DM */ -#ifndef CONFIG_DM_ETH #define CONFIG_USB_ETHER #define CONFIG_USB_ETH_RNDIS #define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00" -#endif /* CONFIG_DM_ETH */ #endif /* CONFIG_USB_MUSB_GADGET */ /* @@ -350,6 +347,7 @@ #define CONFIG_ENV_OFFSET 0x0 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#define CONFIG_SYS_MMC_MAX_DEVICE 2 #elif defined(CONFIG_NOR_BOOT) #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index ad0de2c817..31b3925b25 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h @@ -76,7 +76,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} #define CONFIG_GENERIC_MMC 1 -#define CONFIG_OMAP_HSMMC 1 #define CONFIG_DOS_PARTITION 1 /* diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 3247a4af9d..c0d3617aca 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -78,7 +78,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /* diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 12a287742c..1c76de06f9 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -29,7 +29,6 @@ /* SD/MMC support */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/apf27.h b/include/configs/apf27.h index e9d8232814..314ac898ea 100644 --- a/include/configs/apf27.h +++ b/include/configs/apf27.h @@ -309,7 +309,6 @@ */ #ifdef CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_MXC_MMC #define CONFIG_MXC_MCI_REGS_BASE 0x10014000 #endif diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h index 296fbd1264..2dd9d31295 100644 --- a/include/configs/axs10x.h +++ b/include/configs/axs10x.h @@ -86,7 +86,6 @@ * SD/MMC configuration */ #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC #define CONFIG_DOS_PARTITION /* diff --git a/include/configs/beaver.h b/include/configs/beaver.h index 2e43a097b5..528ed6f6bb 100644 --- a/include/configs/beaver.h +++ b/include/configs/beaver.h @@ -29,7 +29,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h index eb2419c315..13d5ca188f 100644 --- a/include/configs/brppt1.h +++ b/include/configs/brppt1.h @@ -49,7 +49,6 @@ /* MMC/SD IP block */ #if defined(CONFIG_EMMC_BOOT) #define CONFIG_GENERIC_MMC - #define CONFIG_OMAP_HSMMC #define CONFIG_SUPPORT_EMMC_BOOT #endif /* CONFIG_EMMC_BOOT */ diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h index ac338c465e..80564261d9 100644 --- a/include/configs/brxre1.h +++ b/include/configs/brxre1.h @@ -44,7 +44,6 @@ /* MMC/SD IP block */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_SUPPORT_EMMC_BOOT /* Always 64 KiB env size */ diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h index b7df2bce4c..96d3a0d5cc 100644 --- a/include/configs/cardhu.h +++ b/include/configs/cardhu.h @@ -25,14 +25,11 @@ #define CONFIG_TEGRA_ENABLE_UARTA #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE -#define CONFIG_MACH_TYPE MACH_TYPE_CARDHU - /* I2C */ #define CONFIG_SYS_I2C_TEGRA /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/cei-tk1-som.h b/include/configs/cei-tk1-som.h index 6eed4bc562..9439863bfe 100644 --- a/include/configs/cei-tk1-som.h +++ b/include/configs/cei-tk1-som.h @@ -31,7 +31,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index 1ce27e32ba..0c72443faf 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -81,7 +81,6 @@ 115200} #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /* USB */ diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h index bae9697ca7..874a88997d 100644 --- a/include/configs/cm_t3517.h +++ b/include/configs/cm_t3517.h @@ -88,7 +88,6 @@ #define CONFIG_OMAP_GPIO #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /* USB */ diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h index e9db97f1ad..e141dfb99d 100644 --- a/include/configs/colibri_t20.h +++ b/include/configs/colibri_t20.h @@ -21,14 +21,11 @@ #define CONFIG_TEGRA_UARTA_SDIO1 #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE -#define CONFIG_MACH_TYPE MACH_TYPE_COLIBRI_T20 - /* I2C */ #define CONFIG_SYS_I2C_TEGRA /* SD/MMC support */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* USB host support */ #define CONFIG_USB_EHCI diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 4d13856439..d78eb67d0f 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -29,7 +29,6 @@ /* SD/MMC support */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index ceb9ceab5a..0ad6e4c163 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -313,9 +313,7 @@ /* SD/MMC configuration */ #ifndef CONFIG_USE_NOR -#define CONFIG_DAVINCI_MMC_SD1 #define CONFIG_GENERIC_MMC -#define CONFIG_DAVINCI_MMC #endif /* diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h index 04ab48da68..a0f04f9ce3 100644 --- a/include/configs/dalmore.h +++ b/include/configs/dalmore.h @@ -25,7 +25,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/e2220-1170.h b/include/configs/e2220-1170.h index d4aca55b3c..064906d6d3 100644 --- a/include/configs/e2220-1170.h +++ b/include/configs/e2220-1170.h @@ -23,7 +23,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/edb93xx.h b/include/configs/edb93xx.h index a83c617d89..9080b9a473 100644 --- a/include/configs/edb93xx.h +++ b/include/configs/edb93xx.h @@ -229,16 +229,6 @@ #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE -/* Define to enable MMC on SPI support */ -/* #define CONFIG_EP93XX_SPI_MMC */ - -#ifdef CONFIG_EP93XX_SPI_MMC -#define CONFIG_EP93XX_SPI -#define CONFIG_GENERIC_MMC -#define CONFIG_MMC_SPI -#define CONFIG_MMC_SPI_NPOWER_EGPIO 9 -#endif - #define CONFIG_USB_OHCI_NEW #define CONFIG_USB_OHCI_EP93XX #define CONFIG_SYS_USB_OHCI_CPU_INIT diff --git a/include/configs/evb_rk3288.h b/include/configs/evb_rk3288.h index 77b647eccd..554ca0e636 100644 --- a/include/configs/evb_rk3288.h +++ b/include/configs/evb_rk3288.h @@ -12,11 +12,20 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1 + +#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM +/* SPL @ 32k for 34k + * u-boot directly after @ 68k for 400k or so + * ENV @ 992k + */ +#define CONFIG_ENV_OFFSET ((1024-32) * 1024) +#else /* SPL @ 32k for ~36k * ENV @ 96k * u-boot @ 128K */ #define CONFIG_ENV_OFFSET (96 * 1024) +#endif #define CONFIG_SYS_WHITE_ON_BLACK diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h index 9328a222fe..cdbe154839 100644 --- a/include/configs/exynos-common.h +++ b/include/configs/exynos-common.h @@ -39,8 +39,6 @@ /* SD/MMC configuration */ #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC -#define CONFIG_EXYNOS_DWMMC #define CONFIG_BOUNCE_BUFFER /* PWM */ diff --git a/include/configs/fennec_rk3288.h b/include/configs/fennec_rk3288.h index 77b647eccd..554ca0e636 100644 --- a/include/configs/fennec_rk3288.h +++ b/include/configs/fennec_rk3288.h @@ -12,11 +12,20 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1 + +#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM +/* SPL @ 32k for 34k + * u-boot directly after @ 68k for 400k or so + * ENV @ 992k + */ +#define CONFIG_ENV_OFFSET ((1024-32) * 1024) +#else /* SPL @ 32k for ~36k * ENV @ 96k * u-boot @ 128K */ #define CONFIG_ENV_OFFSET (96 * 1024) +#endif #define CONFIG_SYS_WHITE_ON_BLACK diff --git a/include/configs/harmony.h b/include/configs/harmony.h index cf3c4938d6..e9781ccf5f 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -28,7 +28,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND diff --git a/include/configs/hikey.h b/include/configs/hikey.h index c725833675..4048bce77c 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -72,8 +72,6 @@ /* SD/MMC configuration */ #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC -#define CONFIG_HIKEY_DWMMC #define CONFIG_BOUNCE_BUFFER #define CONFIG_FS_EXT4 diff --git a/include/configs/iconnect.h b/include/configs/iconnect.h index 633941b7dd..0ea6fcb82c 100644 --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h @@ -17,11 +17,6 @@ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ /* - * Machine type - */ -#define CONFIG_MACH_TYPE MACH_TYPE_ICONNECT - -/* * Compression configuration */ #define CONFIG_BZIP2 diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h index 30168bccfd..0936344c60 100644 --- a/include/configs/imx27lite-common.h +++ b/include/configs/imx27lite-common.h @@ -138,7 +138,6 @@ * SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_MXC_MMC #define CONFIG_DOS_PARTITION /* diff --git a/include/configs/jetson-tk1.h b/include/configs/jetson-tk1.h index c1fa2c6507..febedca5f2 100644 --- a/include/configs/jetson-tk1.h +++ b/include/configs/jetson-tk1.h @@ -27,7 +27,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index fb8fbe4be4..81da8ff9e6 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -62,7 +62,6 @@ /* MMC/SD */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #undef CONFIG_ENV_IS_IN_NAND #define CONFIG_ENV_IS_IN_FAT diff --git a/include/configs/kc1.h b/include/configs/kc1.h index 7a4ba09fc6..c0562fd480 100644 --- a/include/configs/kc1.h +++ b/include/configs/kc1.h @@ -89,7 +89,6 @@ */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC /* * Power diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h index 4f0bd84ad8..bc28525844 100644 --- a/include/configs/kylin_rk3036.h +++ b/include/configs/kylin_rk3036.h @@ -19,9 +19,20 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 /* emmc */ #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ -#define CONFIG_ENV_OFFSET (SZ_4M - SZ_64K) /* reserved area */ -#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) -#define CONFIG_SYS_REDUNDAND_ENVIRONMENT + +#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM +/* SPL @ 32k for 34k + * u-boot directly after @ 68k for 400k or so + * ENV @ 992k + */ +#define CONFIG_ENV_OFFSET ((1024-32) * 1024) +#else +/* SPL @ 32k for ~36k + * ENV @ 96k + * u-boot @ 128K + */ +#define CONFIG_ENV_OFFSET (96 * 1024) +#endif #endif diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h index 3b118bb723..402dab2915 100644 --- a/include/configs/legoev3.h +++ b/include/configs/legoev3.h @@ -215,9 +215,7 @@ #define CONFIG_ENV_SIZE (16 << 10) /* SD/MMC configuration */ -#define CONFIG_DAVINCI_MMC_SD1 #define CONFIG_GENERIC_MMC -#define CONFIG_DAVINCI_MMC /* * Enable MMC commands only when diff --git a/include/configs/mcx.h b/include/configs/mcx.h index f15abd3ac9..fd8cf1d506 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -81,7 +81,6 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} -#define CONFIG_OMAP_HSMMC #define CONFIG_GENERIC_MMC #define CONFIG_DOS_PARTITION diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h index d42976b709..1e94dac379 100644 --- a/include/configs/medcom-wide.h +++ b/include/configs/medcom-wide.h @@ -21,7 +21,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 7abffdb2ef..643413f823 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -235,15 +235,13 @@ #define CONFIG_BOOTARGS "root=romfs" #define CONFIG_HOSTNAME XILINX_BOARD_NAME #define CONFIG_BOOTCOMMAND "base 0;tftp 11000000 image.img;bootm" -#define CONFIG_IPADDR 192.168.0.3 -#define CONFIG_SERVERIP 192.168.0.5 -#define CONFIG_GATEWAYIP 192.168.0.1 /* architecture dependent code */ #define CONFIG_SYS_USR_EXCEP /* user exception */ #define CONFIG_PREBOOT "echo U-BOOT for ${hostname};setenv preboot;echo" +#ifndef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0" \ "nor0=flash-0\0"\ "mtdparts=mtdparts=flash-0:"\ @@ -253,6 +251,7 @@ "setenv stdin nc\0" \ "serial=setenv stdout serial;"\ "setenv stdin serial\0" +#endif #define CONFIG_CMDLINE_EDITING @@ -284,7 +283,6 @@ #define CONFIG_SPL_LDSCRIPT "arch/microblaze/cpu/u-boot-spl.lds" -#define CONFIG_SPL_RAM_DEVICE #ifdef CONFIG_SYS_FLASH_BASE # define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_FLASH_BASE #endif diff --git a/include/configs/miniarm_rk3288.h b/include/configs/miniarm_rk3288.h index 94513650e6..5a623ca6ea 100644 --- a/include/configs/miniarm_rk3288.h +++ b/include/configs/miniarm_rk3288.h @@ -17,11 +17,20 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 + +#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM +/* SPL @ 32k for 34k + * u-boot directly after @ 68k for 400k or so + * ENV @ 992k + */ +#define CONFIG_ENV_OFFSET ((1024-32) * 1024) +#else /* SPL @ 32k for ~36k * ENV @ 96k * u-boot @ 128K */ #define CONFIG_ENV_OFFSET (96 * 1024) +#endif #define CONFIG_SYS_WHITE_ON_BLACK diff --git a/include/configs/mxs.h b/include/configs/mxs.h index 04c3ce9d6e..b26bc01977 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -150,7 +150,6 @@ #ifdef CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC #define CONFIG_BOUNCE_BUFFER -#define CONFIG_MXS_MMC #endif /* NAND */ diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 99ce60f731..d2b8e39d55 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -94,7 +94,6 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, 115200 } #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /* USB */ diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h index ae49054389..be0889d443 100644 --- a/include/configs/nyan-big.h +++ b/include/configs/nyan-big.h @@ -26,7 +26,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 1a67584b9f..05594627ae 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -48,7 +48,6 @@ /* MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC /* SPL */ #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index 30d3aa897f..e6d7db0da6 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs/omap3_igep00x0.h @@ -28,7 +28,8 @@ #define CONFIG_REVISION_TAG 1 /* Status LED available for IGEP0020 and IGEP0030 but not IGEP0032 */ -#if (CONFIG_MACH_TYPE != MACH_TYPE_IGEP0032) +#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020) || \ + (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030) #define CONFIG_STATUS_LED #define CONFIG_BOARD_SPECIFIC_LED #define CONFIG_GPIO_LED @@ -36,8 +37,6 @@ #define RED_LED_GPIO 27 #elif (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030) #define RED_LED_GPIO 16 -#else -#error "status LED not defined for this machine." #endif #define RED_LED_DEV 0 #define STATUS_LED_BIT RED_LED_GPIO diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index b38811e98d..71ae2bee61 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -31,7 +31,6 @@ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG -#define CONFIG_CMDLINE_EDITING /* cmd line edit/history */ /* Hardware drivers */ @@ -124,9 +123,7 @@ "saveenv;" #define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x81000000\0" \ - "uimage=uImage\0" \ - "zimage=zImage\0" \ + DEFAULT_LINUX_BOOT_ENV \ "mtdids=" MTDIDS_DEFAULT "\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ "mmcdev=0\0" \ @@ -156,18 +153,17 @@ "${optargs};" \ "run addmtdparts; " \ "run vrfb_arg\0" \ - "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo 'Running bootscript from mmc ...'; " \ "source ${loadaddr}\0" \ "loaduimage=mmc rescan; " \ - "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \ + "load mmc ${mmcdev} ${loadaddr} uImage\0" \ "loadzimage=mmc rescan; " \ - "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \ + "load mmc ${mmcdev} ${loadaddr} zImage\0" \ "ramdisksize=64000\0" \ - "ramdiskaddr=0x82000000\0" \ "ramdiskimage=rootfs.ext2.gz.uboot\0" \ "loadramdisk=mmc rescan; " \ - "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \ + "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \ "ramargs=run setconsole; setenv bootargs console=${console} " \ "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ "mmcargs=run setconsole; setenv bootargs console=${console} " \ @@ -184,15 +180,14 @@ "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \ "nfsrootpath=/opt/nfs-exports/omap\0" \ "autoload=no\0" \ - "fdtaddr=0x86000000\0" \ - "loadfdtimage=mmc rescan; " \ - "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ + "loadfdt=mmc rescan; " \ + "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ "run mmcargs; " \ "run common_bootargs; " \ "run dump_bootargs; " \ "run loadzimage; " \ - "run loadfdtimage; " \ + "run loadfdt; " \ "bootz ${loadaddr} - ${fdtaddr}\0" \ "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \ "run ramargs; " \ @@ -200,22 +195,22 @@ "run dump_bootargs; " \ "run loaduimage; " \ "run loadramdisk; " \ - "bootm ${loadaddr} ${ramdiskaddr}\0" \ + "bootm ${loadaddr} ${rdaddr}\0" \ "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \ "run ramargs; " \ "run common_bootargs; " \ "run dump_bootargs; " \ "run loadzimage; " \ "run loadramdisk; " \ - "run loadfdtimage; " \ - "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr};\0" \ + "run loadfdt; " \ + "bootz ${loadaddr} ${rdaddr} ${fdtaddr};\0" \ "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ "run ramargs; " \ "run common_bootargs; " \ "run dump_bootargs; " \ "tftpboot ${loadaddr} ${zimage}; " \ - "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \ - "bootm ${loadaddr} ${ramdiskaddr}\0" \ + "tftpboot ${rdaddr} ${ramdiskimage}; " \ + "bootm ${loadaddr} ${rdaddr}\0" \ "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \ "dhcp;" \ "run nfsargs;" \ @@ -228,7 +223,6 @@ "run autoboot" /* Miscellaneous configurable options */ -#define CONFIG_AUTO_COMPLETE /* memtest works on */ #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index cdc93c38c8..43da339f39 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -315,9 +315,6 @@ #define CONFIG_CMD_UBIFS #endif -#ifdef CONFIG_USE_SPIFLASH -#endif - #if !defined(CONFIG_USE_NAND) && \ !defined(CONFIG_SYS_USE_NOR) && \ !defined(CONFIG_USE_SPIFLASH) @@ -329,7 +326,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_DAVINCI_MMC #ifdef CONFIG_MMC #define CONFIG_DOS_PARTITION diff --git a/include/configs/p2371-0000.h b/include/configs/p2371-0000.h index cd981b9926..a1a518e18c 100644 --- a/include/configs/p2371-0000.h +++ b/include/configs/p2371-0000.h @@ -23,7 +23,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/p2371-2180.h b/include/configs/p2371-2180.h index 7ff545c5a2..b80d8dbe0a 100644 --- a/include/configs/p2371-2180.h +++ b/include/configs/p2371-2180.h @@ -23,7 +23,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/p2571.h b/include/configs/p2571.h index 7daaf8e315..ef1ae3f806 100644 --- a/include/configs/p2571.h +++ b/include/configs/p2571.h @@ -24,7 +24,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/p2771-0000.h b/include/configs/p2771-0000.h index 0864e4dabc..e1e3d72da0 100644 --- a/include/configs/p2771-0000.h +++ b/include/configs/p2771-0000.h @@ -19,7 +19,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/paz00.h b/include/configs/paz00.h index 0cefee398e..13d5aa916f 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -24,7 +24,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 8ad5af1899..889ef40670 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -21,7 +21,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND diff --git a/include/configs/popmetal_rk3288.h b/include/configs/popmetal_rk3288.h index 77b647eccd..554ca0e636 100644 --- a/include/configs/popmetal_rk3288.h +++ b/include/configs/popmetal_rk3288.h @@ -12,11 +12,20 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1 + +#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM +/* SPL @ 32k for 34k + * u-boot directly after @ 68k for 400k or so + * ENV @ 992k + */ +#define CONFIG_ENV_OFFSET ((1024-32) * 1024) +#else /* SPL @ 32k for ~36k * ENV @ 96k * u-boot @ 128K */ #define CONFIG_ENV_OFFSET (96 * 1024) +#endif #define CONFIG_SYS_WHITE_ON_BLACK diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index 27dfbcef66..1fd33a067a 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -38,7 +38,6 @@ /* MMC/SD IP block */ #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC #define CONFIG_BOUNCE_BUFFER #define CONFIG_FAT_WRITE diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index 535797a72d..33b1f0e999 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -41,7 +41,6 @@ /* MMC/SD IP block */ #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC #define CONFIG_BOUNCE_BUFFER #define CONFIG_FAT_WRITE @@ -88,6 +87,13 @@ #define CONFIG_G_DNL_VENDOR_NUM 0x2207 #define CONFIG_G_DNL_PRODUCT_NUM 0x320a +/* usb host support */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_DWC2 +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_ASIX +#endif #define ENV_MEM_LAYOUT_SETTINGS \ "scriptaddr=0x00000000\0" \ "pxefile_addr_r=0x00100000\0" \ diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index eab3f045ac..db0657b19d 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -28,7 +28,6 @@ /* MMC/SD IP block */ #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC #define CONFIG_BOUNCE_BUFFER #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000 diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index 9ec71c4baa..be53e659ee 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -14,7 +14,9 @@ /* First try to boot from SD (index 0), then eMMC (index 1 */ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ - func(MMC, mmc, 1) + func(MMC, mmc, 1) \ + func(PXE, pxe, na) \ + func(DHCP, dchp, na) /* Enable gpt partition table */ #define CONFIG_CMD_GPT diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 45d88247af..ce539a008c 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -24,21 +24,6 @@ (&((struct bcm2835_timer_regs *)BCM2835_TIMER_PHYSADDR)->clo) #endif -/* - * 2835 is a SKU in a series for which the 2708 is the first or primary SoC, - * so 2708 has historically been used rather than a dedicated 2835 ID. - * - * We don't define a machine type for bcm2709/bcm2836 since the RPi Foundation - * chose to use someone else's previously registered machine ID (3139, MX51_GGC) - * rather than obtaining a valid ID:-/ - * - * For the bcm2837, hopefully a machine type is not needed, since everything - * is DT. - */ -#ifdef CONFIG_BCM2835 -#define CONFIG_MACH_TYPE MACH_TYPE_BCM2708 -#endif - /* Memory layout */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE 0x00000000 diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 3ee655562c..388010cb5c 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -33,7 +33,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index e4d0ad9309..e93ce93c59 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -78,7 +78,6 @@ #define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION #define CONFIG_SPI diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index df5fe2163f..fd35f71f91 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -52,7 +52,6 @@ #define CONFIG_SYS_MAXARGS 32 /* setting board specific options */ -#define CONFIG_MACH_TYPE MACH_TYPE_SMARTWEB #define CONFIG_AUTO_COMPLETE #define CONFIG_ENV_OVERWRITE 1 /* Overwrite ethaddr / serial# */ #define CONFIG_AUTO_COMPLETE diff --git a/include/configs/sniper.h b/include/configs/sniper.h index 0a3d24236f..4d05786169 100644 --- a/include/configs/sniper.h +++ b/include/configs/sniper.h @@ -96,7 +96,6 @@ */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC /* * Power diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 31f1338187..6285266a1b 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -144,9 +144,6 @@ #ifdef CONFIG_CMD_MMC #define CONFIG_BOUNCE_BUFFER #define CONFIG_GENERIC_MMC -#define CONFIG_DWMMC -#define CONFIG_SOCFPGA_DWMMC -#define CONFIG_SOCFPGA_DWMMC_FIFO_DEPTH 1024 /* FIXME */ /* using smaller max blk cnt to avoid flooding the limited stack we have */ #define CONFIG_SYS_MMC_MAX_BLK_COUNT 256 /* FIXME -- SPL only? */ @@ -309,7 +306,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void); * 0xFFFF_FF00 ...... End of SRAM */ #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_RAM_DEVICE #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR #define CONFIG_SPL_MAX_SIZE (64 * 1024) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b0bfc0dfd7..d58e5bacae 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -35,7 +35,7 @@ /* * High Level Configuration Options */ -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64) #define CONFIG_SYS_THUMB_BUILD /* Thumbs mode to save space in SPL */ #endif @@ -141,7 +141,6 @@ /* mmc config */ #ifdef CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_MMC_SUNXI #define CONFIG_MMC_SUNXI_SLOT 0 #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 /* first detected MMC controller */ @@ -183,7 +182,9 @@ #define CONFIG_SPL_FRAMEWORK +#ifndef CONFIG_ARM64 /* AArch64 FEL support is not ready yet */ #define CONFIG_SPL_BOARD_LOAD_IMAGE +#endif #if defined(CONFIG_MACH_SUN9I) #define CONFIG_SPL_TEXT_BASE 0x10040 /* sram start+header */ diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 44201a2546..5ddc848e49 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -73,7 +73,6 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} -#define CONFIG_OMAP_HSMMC #define CONFIG_GENERIC_MMC #define CONFIG_DOS_PARTITION diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h index 03fc42c877..42d3060ec3 100644 --- a/include/configs/tao3530.h +++ b/include/configs/tao3530.h @@ -71,7 +71,6 @@ #define CONFIG_ENV_OVERWRITE #define CONFIG_BAUDRATE 115200 #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /* GPIO banks */ diff --git a/include/configs/tec-ng.h b/include/configs/tec-ng.h index 067e1718db..dbc9fc023e 100644 --- a/include/configs/tec-ng.h +++ b/include/configs/tec-ng.h @@ -22,7 +22,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/tec.h b/include/configs/tec.h index c03dabf9db..278668c2c7 100644 --- a/include/configs/tec.h +++ b/include/configs/tec.h @@ -21,7 +21,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 5144d5aace..45600190a4 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -118,9 +118,6 @@ #ifdef CONFIG_GENERIC_MMC #undef CONFIG_GENERIC_MMC #endif -#ifdef CONFIG_TEGRA_MMC -#undef CONFIG_TEGRA_MMC -#endif #ifdef CONFIG_CMD_MMC #endif diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 23a0e782e0..f30fec84a2 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -98,7 +98,6 @@ /* Defines for SPL */ #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_RAM_DEVICE #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_TEXT_BASE - \ diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h index 86ab1e0f4a..a43b9776c4 100644 --- a/include/configs/ti814x_evm.h +++ b/include/configs/ti814x_evm.h @@ -114,7 +114,6 @@ #define CONFIG_OMAP_GPIO #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /** diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h index d909f25fa8..9c8eabff4d 100644 --- a/include/configs/ti816x_evm.h +++ b/include/configs/ti816x_evm.h @@ -53,7 +53,6 @@ #define CONFIG_CMD_ASKEN #define CONFIG_OMAP_GPIO #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION #define CONFIG_FS_FAT diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index dbe494a6e3..6a94cd7bb4 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -124,8 +124,7 @@ "fit_bootfile=fitImage.itb\0" \ "update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}\0" \ "args_fit=setenv bootargs console=${console} \0" \ - "loadfit=run args_fit; bootm ${loadaddr}:kernel@1 " \ - "${loadaddr}:ramdisk@1 ${loadaddr}:${fdtfile};\0" \ + "loadfit=run args_fit; bootm ${loadaddr}#${fdtfile};\0" \ /* * DDR information. If the CONFIG_NR_DRAM_BANKS is not defined, diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h index 6d9d4b2d97..de14b8575a 100644 --- a/include/configs/ti_armv7_omap.h +++ b/include/configs/ti_armv7_omap.h @@ -20,9 +20,6 @@ #define CONFIG_SYS_OMAP24_I2C_SLAVE 1 #define CONFIG_SYS_I2C_OMAP24XX -/* MMC/SD IP block */ -#define CONFIG_OMAP_HSMMC - /* SPI IP Block */ #define CONFIG_OMAP3_SPI diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 1c36d0751c..a300f38857 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -24,7 +24,6 @@ #define CONFIG_ARM_ERRATA_430973 #define CONFIG_ARM_ERRATA_621766 -#define CONFIG_MACH_TYPE MACH_TYPE_TRICORDER /* * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM * 64 bytes before this address should be set aside for u-boot.img's @@ -89,7 +88,6 @@ /* MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_OMAP_HSMMC #define CONFIG_DOS_PARTITION /* I2C */ diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h index ff006143d6..874351d9f9 100644 --- a/include/configs/trimslice.h +++ b/include/configs/trimslice.h @@ -29,7 +29,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in SPI */ #define CONFIG_ENV_IS_IN_SPI_FLASH diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h index a451acf1f4..261daef9aa 100644 --- a/include/configs/ts4800.h +++ b/include/configs/ts4800.h @@ -21,8 +21,6 @@ #define CONFIG_HW_WATCHDOG -#define CONFIG_MACH_TYPE MACH_TYPE_TS48XX - /* text base address used when linking */ #define CONFIG_SYS_TEXT_BASE 0x90008000 diff --git a/include/configs/venice2.h b/include/configs/venice2.h index 7c7b20031c..ec12133a30 100644 --- a/include/configs/venice2.h +++ b/include/configs/venice2.h @@ -24,7 +24,6 @@ /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/ventana.h b/include/configs/ventana.h index f5459a8949..615acfe7e3 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -18,11 +18,8 @@ #define CONFIG_TEGRA_ENABLE_UARTD #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE -#define CONFIG_MACH_TYPE MACH_TYPE_VENTANA - /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/whistler.h b/include/configs/whistler.h index ffd9a2c242..30a48e83ca 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -19,14 +19,11 @@ #define CONFIG_TEGRA_UARTA_UAA_UAB #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE -#define CONFIG_MACH_TYPE MACH_TYPE_WHISTLER - /* I2C */ #define CONFIG_SYS_I2C_TEGRA /* SD/MMC */ #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* * Environment in eMMC, at the end of 2nd "boot sector". Note: This assumes diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 74cbfcf8f3..bb749c5e8e 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -86,6 +86,10 @@ # ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ # define CONFIG_ZYNQ_SDHCI_MAX_FREQ 200000000 # endif +# define CONFIG_ENV_IS_IN_FAT +# define FAT_ENV_DEVICE_AND_PART "0:auto" +# define FAT_ENV_FILE "uboot.env" +# define FAT_ENV_INTERFACE "mmc" #endif #if defined(CONFIG_ZYNQ_SDHCI) || defined(CONFIG_ZYNQMP_USB) @@ -123,17 +127,43 @@ #define DFU_ALT_INFO \ DFU_ALT_INFO_RAM + +#ifndef CONFIG_SPL_BUILD +# define CONFIG_USB_FUNCTION_FASTBOOT +# define CONFIG_CMD_FASTBOOT +# define CONFIG_ANDROID_BOOT_IMAGE +# define CONFIG_FASTBOOT_BUF_ADDR 0x100000 +# define CONFIG_FASTBOOT_BUF_SIZE 0x6000000 +# define CONFIG_FASTBOOT_FLASH +# ifdef CONFIG_ZYNQ_SDHCI +# define CONFIG_FASTBOOT_FLASH_MMC_DEV 0 +# endif +# define CONFIG_PARTITION_UUIDS +# define CONFIG_CMD_GPT + +# define CONFIG_RANDOM_UUID +# define PARTS_DEFAULT \ + "partitions=uuid_disk=${uuid_gpt_disk};" \ + "name=""boot"",size=16M,uuid=${uuid_gpt_boot};" \ + "name=""Linux"",size=-M,uuid=${uuid_gpt_Linux}\0" +#endif #endif #if !defined(DFU_ALT_INFO) # define DFU_ALT_INFO #endif +#if !defined(PARTS_DEFAULT) +# define PARTS_DEFAULT +#endif + #define CONFIG_BOARD_LATE_INIT /* Do not preserve environment */ +#if !defined(CONFIG_ENV_IS_IN_FAT) #define CONFIG_ENV_IS_NOWHERE 1 -#define CONFIG_ENV_SIZE 0x1000 +#endif +#define CONFIG_ENV_SIZE 0x8000 /* Monitor Command Prompt */ /* Console I/O Buffer Size */ @@ -258,7 +288,6 @@ #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_BOARD_INIT -#define CONFIG_SPL_RAM_DEVICE /* u-boot is like dtb */ #define CONFIG_SPL_FS_LOAD_ARGS_NAME "u-boot.bin" diff --git a/include/configs/xilinx_zynqmp_zc1751_xm015_dc1.h b/include/configs/xilinx_zynqmp_zc1751_xm015_dc1.h index b19a55219a..e3797a8efd 100644 --- a/include/configs/xilinx_zynqmp_zc1751_xm015_dc1.h +++ b/include/configs/xilinx_zynqmp_zc1751_xm015_dc1.h @@ -12,7 +12,6 @@ #define CONFIG_ZYNQ_SDHCI0 #define CONFIG_ZYNQ_SDHCI1 -#define CONFIG_AHCI #define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR} #include <configs/xilinx_zynqmp.h> diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h index 7038e6b22c..e3e19dcbe1 100644 --- a/include/configs/zmx25.h +++ b/include/configs/zmx25.h @@ -19,7 +19,6 @@ #define CONFIG_SYS_TIMER_COUNTER \ (&((struct gpt_regs *)IMX_GPT1_BASE)->counter) -#define CONFIG_MACH_TYPE MACH_TYPE_ZMX25 /* * Environment settings */ diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 2fe6897e31..36dc140e00 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -43,7 +43,6 @@ # define CONFIG_PHY_MARVELL # define CONFIG_PHY_REALTEK # define CONFIG_PHY_XILINX -# define CONFIG_BOOTP_SERVERIP # define CONFIG_BOOTP_BOOTPATH # define CONFIG_BOOTP_GATEWAY # define CONFIG_BOOTP_HOSTNAME @@ -247,9 +246,6 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) -/* Physical Memory map */ -#define CONFIG_SYS_TEXT_BASE 0x4000000 - #ifndef CONFIG_NR_DRAM_BANKS # define CONFIG_NR_DRAM_BANKS 1 #endif @@ -294,7 +290,6 @@ #define CONFIG_CMD_SPL #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_BOARD_INIT -#define CONFIG_SPL_RAM_DEVICE #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-zynq/u-boot-spl.lds" diff --git a/include/image.h b/include/image.h index ad82fda69b..164b584533 100644 --- a/include/image.h +++ b/include/image.h @@ -969,6 +969,7 @@ int fit_set_timestamp(void *fit, int noffset, time_t timestamp); * @fit: Pointer to the FIT format image header * @comment: Comment to add to signature nodes * @require_keys: Mark all keys as 'required' + * @engine_id: Engine to use for signing * * Adds hash values for all component images in the FIT blob. * Hashes are calculated for all component images which have hash subnodes @@ -981,7 +982,8 @@ int fit_set_timestamp(void *fit, int noffset, time_t timestamp); * libfdt error code, on failure */ int fit_add_verification_data(const char *keydir, void *keydest, void *fit, - const char *comment, int require_keys); + const char *comment, int require_keys, + const char *engine_id); int fit_image_verify(const void *fit, int noffset); int fit_config_verify(const void *fit, int conf_noffset); @@ -1061,6 +1063,7 @@ struct image_sign_info { const void *fdt_blob; /* FDT containing public keys */ int required_keynode; /* Node offset of key to use: -1=any */ const char *require_keys; /* Value for 'required' property */ + const char *engine_id; /* Engine to use for signing */ }; #endif /* Allow struct image_region to always be defined for rsa.h */ diff --git a/include/linux/compat.h b/include/linux/compat.h index 533983faff..a43e4d6698 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -15,8 +15,6 @@ struct p_current{ extern struct p_current *current; -#define ndelay(x) udelay((x) < 1000 ? 1 : (x)/1000) - #define dev_dbg(dev, fmt, args...) \ debug(fmt, ##args) #define dev_vdbg(dev, fmt, args...) \ diff --git a/include/linux/delay.h b/include/linux/delay.h new file mode 100644 index 0000000000..3dcd435d0d --- /dev/null +++ b/include/linux/delay.h @@ -0,0 +1,24 @@ +/* + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _LINUX_DELAY_H +#define _LINUX_DELAY_H + +#include <linux/kernel.h> + +void __udelay(unsigned long usec); +void udelay(unsigned long usec); + +static inline void mdelay(unsigned long msec) +{ + while (msec--) + udelay(1000); +} + +static inline void ndelay(unsigned long nsec) +{ + udelay(DIV_ROUND_UP(nsec, 1000)); +} + +#endif /* defined(_LINUX_DELAY_H) */ diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h new file mode 100644 index 0000000000..31c55ae076 --- /dev/null +++ b/include/linux/iopoll.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef _LINUX_IOPOLL_H +#define _LINUX_IOPOLL_H + +#include <linux/errno.h> +#include <linux/io.h> +#include <time.h> + +/** + * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs + * @op: accessor function (takes @addr as its only argument) + * @addr: Address to poll + * @val: Variable to read the value into + * @cond: Break condition (usually involving @val) + * @timeout_us: Timeout in us, 0 means never timeout + * + * Returns 0 on success and -ETIMEDOUT upon a timeout. In either + * case, the last read value at @addr is stored in @val. + * + * When available, you'll probably want to use one of the specialized + * macros defined below rather than this macro directly. + */ +#define readx_poll_timeout(op, addr, val, cond, timeout_us) \ +({ \ + unsigned long timeout = timer_get_us() + timeout_us; \ + for (;;) { \ + (val) = op(addr); \ + if (cond) \ + break; \ + if (timeout_us && time_after(timer_get_us(), timeout)) { \ + (val) = op(addr); \ + break; \ + } \ + } \ + (cond) ? 0 : -ETIMEDOUT; \ +}) + + +#define readb_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readb, addr, val, cond, timeout_us) + +#define readw_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readw, addr, val, cond, timeout_us) + +#define readl_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readl, addr, val, cond, timeout_us) + +#define readq_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readq, addr, val, cond, timeout_us) + +#define readb_relaxed_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readb_relaxed, addr, val, cond, timeout_us) + +#define readw_relaxed_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readw_relaxed, addr, val, cond, timeout_us) + +#define readl_relaxed_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readl_relaxed, addr, val, cond, timeout_us) + +#define readq_relaxed_poll_timeout(addr, val, cond, timeout_us) \ + readx_poll_timeout(readq_relaxed, addr, val, cond, timeout_us) + +#endif /* _LINUX_IOPOLL_H */ diff --git a/include/linux/typecheck.h b/include/linux/typecheck.h new file mode 100644 index 0000000000..eb5b74a575 --- /dev/null +++ b/include/linux/typecheck.h @@ -0,0 +1,24 @@ +#ifndef TYPECHECK_H_INCLUDED +#define TYPECHECK_H_INCLUDED + +/* + * Check at compile time that something is of a particular type. + * Always evaluates to 1 so you may use it easily in comparisons. + */ +#define typecheck(type,x) \ +({ type __dummy; \ + typeof(x) __dummy2; \ + (void)(&__dummy == &__dummy2); \ + 1; \ +}) + +/* + * Check at compile time that 'function' is a certain type, or is a pointer + * to that type (needs to use typedef for the function type.) + */ +#define typecheck_fn(type,function) \ +({ typeof(type) __tmp = function; \ + (void)__tmp; \ +}) + +#endif /* TYPECHECK_H_INCLUDED */ diff --git a/include/mmc.h b/include/mmc.h index 1720955a4c..fad12d608c 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -376,7 +376,7 @@ int mmc_getwp(struct mmc *mmc); struct mmc_ops { int (*send_cmd)(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data); - void (*set_ios)(struct mmc *mmc); + int (*set_ios)(struct mmc *mmc); int (*init)(struct mmc *mmc); int (*getcd)(struct mmc *mmc); int (*getwp)(struct mmc *mmc); diff --git a/include/net.h b/include/net.h index 06320c6514..1f4d947350 100644 --- a/include/net.h +++ b/include/net.h @@ -255,6 +255,13 @@ int eth_setenv_enetaddr_by_index(const char *base_name, int index, /* + * Initialize USB ethernet device with CONFIG_DM_ETH + * Returns: + * 0 is success, non-zero is error status. + */ +int usb_ether_init(void); + +/* * Get the hardware address for an ethernet interface . * Args: * base_name - base name for device (normally "eth") diff --git a/include/sdhci.h b/include/sdhci.h index 144570f2be..7544b494b1 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -28,11 +28,11 @@ #define SDHCI_ARGUMENT 0x08 #define SDHCI_TRANSFER_MODE 0x0C -#define SDHCI_TRNS_DMA 0x01 -#define SDHCI_TRNS_BLK_CNT_EN 0x02 -#define SDHCI_TRNS_ACMD12 0x04 -#define SDHCI_TRNS_READ 0x10 -#define SDHCI_TRNS_MULTI 0x20 +#define SDHCI_TRNS_DMA BIT(0) +#define SDHCI_TRNS_BLK_CNT_EN BIT(1) +#define SDHCI_TRNS_ACMD12 BIT(2) +#define SDHCI_TRNS_READ BIT(4) +#define SDHCI_TRNS_MULTI BIT(5) #define SDHCI_COMMAND 0x0E #define SDHCI_CMD_RESP_MASK 0x03 @@ -54,29 +54,29 @@ #define SDHCI_BUFFER 0x20 #define SDHCI_PRESENT_STATE 0x24 -#define SDHCI_CMD_INHIBIT 0x00000001 -#define SDHCI_DATA_INHIBIT 0x00000002 -#define SDHCI_DOING_WRITE 0x00000100 -#define SDHCI_DOING_READ 0x00000200 -#define SDHCI_SPACE_AVAILABLE 0x00000400 -#define SDHCI_DATA_AVAILABLE 0x00000800 -#define SDHCI_CARD_PRESENT 0x00010000 -#define SDHCI_CARD_STATE_STABLE 0x00020000 -#define SDHCI_CARD_DETECT_PIN_LEVEL 0x00040000 -#define SDHCI_WRITE_PROTECT 0x00080000 +#define SDHCI_CMD_INHIBIT BIT(0) +#define SDHCI_DATA_INHIBIT BIT(1) +#define SDHCI_DOING_WRITE BIT(8) +#define SDHCI_DOING_READ BIT(9) +#define SDHCI_SPACE_AVAILABLE BIT(10) +#define SDHCI_DATA_AVAILABLE BIT(11) +#define SDHCI_CARD_PRESENT BIT(16) +#define SDHCI_CARD_STATE_STABLE BIT(17) +#define SDHCI_CARD_DETECT_PIN_LEVEL BIT(18) +#define SDHCI_WRITE_PROTECT BIT(19) #define SDHCI_HOST_CONTROL 0x28 -#define SDHCI_CTRL_LED 0x01 -#define SDHCI_CTRL_4BITBUS 0x02 -#define SDHCI_CTRL_HISPD 0x04 +#define SDHCI_CTRL_LED BIT(0) +#define SDHCI_CTRL_4BITBUS BIT(1) +#define SDHCI_CTRL_HISPD BIT(2) #define SDHCI_CTRL_DMA_MASK 0x18 #define SDHCI_CTRL_SDMA 0x00 #define SDHCI_CTRL_ADMA1 0x08 #define SDHCI_CTRL_ADMA32 0x10 #define SDHCI_CTRL_ADMA64 0x18 -#define SDHCI_CTRL_8BITBUS 0x20 -#define SDHCI_CTRL_CD_TEST_INS 0x40 -#define SDHCI_CTRL_CD_TEST 0x80 +#define SDHCI_CTRL_8BITBUS BIT(5) +#define SDHCI_CTRL_CD_TEST_INS BIT(6) +#define SDHCI_CTRL_CD_TEST BIT(7) #define SDHCI_POWER_CONTROL 0x29 #define SDHCI_POWER_ON 0x01 @@ -87,9 +87,9 @@ #define SDHCI_BLOCK_GAP_CONTROL 0x2A #define SDHCI_WAKE_UP_CONTROL 0x2B -#define SDHCI_WAKE_ON_INT 0x01 -#define SDHCI_WAKE_ON_INSERT 0x02 -#define SDHCI_WAKE_ON_REMOVE 0x04 +#define SDHCI_WAKE_ON_INT BIT(0) +#define SDHCI_WAKE_ON_INSERT BIT(1) +#define SDHCI_WAKE_ON_REMOVE BIT(2) #define SDHCI_CLOCK_CONTROL 0x2C #define SDHCI_DIVIDER_SHIFT 8 @@ -97,10 +97,10 @@ #define SDHCI_DIV_MASK 0xFF #define SDHCI_DIV_MASK_LEN 8 #define SDHCI_DIV_HI_MASK 0x300 -#define SDHCI_PROG_CLOCK_MODE 0x0020 -#define SDHCI_CLOCK_CARD_EN 0x0004 -#define SDHCI_CLOCK_INT_STABLE 0x0002 -#define SDHCI_CLOCK_INT_EN 0x0001 +#define SDHCI_PROG_CLOCK_MODE BIT(5) +#define SDHCI_CLOCK_CARD_EN BIT(2) +#define SDHCI_CLOCK_INT_STABLE BIT(1) +#define SDHCI_CLOCK_INT_EN BIT(0) #define SDHCI_TIMEOUT_CONTROL 0x2E @@ -112,25 +112,25 @@ #define SDHCI_INT_STATUS 0x30 #define SDHCI_INT_ENABLE 0x34 #define SDHCI_SIGNAL_ENABLE 0x38 -#define SDHCI_INT_RESPONSE 0x00000001 -#define SDHCI_INT_DATA_END 0x00000002 -#define SDHCI_INT_DMA_END 0x00000008 -#define SDHCI_INT_SPACE_AVAIL 0x00000010 -#define SDHCI_INT_DATA_AVAIL 0x00000020 -#define SDHCI_INT_CARD_INSERT 0x00000040 -#define SDHCI_INT_CARD_REMOVE 0x00000080 -#define SDHCI_INT_CARD_INT 0x00000100 -#define SDHCI_INT_ERROR 0x00008000 -#define SDHCI_INT_TIMEOUT 0x00010000 -#define SDHCI_INT_CRC 0x00020000 -#define SDHCI_INT_END_BIT 0x00040000 -#define SDHCI_INT_INDEX 0x00080000 -#define SDHCI_INT_DATA_TIMEOUT 0x00100000 -#define SDHCI_INT_DATA_CRC 0x00200000 -#define SDHCI_INT_DATA_END_BIT 0x00400000 -#define SDHCI_INT_BUS_POWER 0x00800000 -#define SDHCI_INT_ACMD12ERR 0x01000000 -#define SDHCI_INT_ADMA_ERROR 0x02000000 +#define SDHCI_INT_RESPONSE BIT(0) +#define SDHCI_INT_DATA_END BIT(1) +#define SDHCI_INT_DMA_END BIT(3) +#define SDHCI_INT_SPACE_AVAIL BIT(4) +#define SDHCI_INT_DATA_AVAIL BIT(5) +#define SDHCI_INT_CARD_INSERT BIT(6) +#define SDHCI_INT_CARD_REMOVE BIT(7) +#define SDHCI_INT_CARD_INT BIT(8) +#define SDHCI_INT_ERROR BIT(15) +#define SDHCI_INT_TIMEOUT BIT(16) +#define SDHCI_INT_CRC BIT(17) +#define SDHCI_INT_END_BIT BIT(18) +#define SDHCI_INT_INDEX BIT(19) +#define SDHCI_INT_DATA_TIMEOUT BIT(20) +#define SDHCI_INT_DATA_CRC BIT(21) +#define SDHCI_INT_DATA_END_BIT BIT(22) +#define SDHCI_INT_BUS_POWER BIT(23) +#define SDHCI_INT_ACMD12ERR BIT(24) +#define SDHCI_INT_ADMA_ERROR BIT(25) #define SDHCI_INT_NORMAL_MASK 0x00007FFF #define SDHCI_INT_ERROR_MASK 0xFFFF8000 @@ -156,15 +156,15 @@ #define SDHCI_CLOCK_BASE_SHIFT 8 #define SDHCI_MAX_BLOCK_MASK 0x00030000 #define SDHCI_MAX_BLOCK_SHIFT 16 -#define SDHCI_CAN_DO_8BIT 0x00040000 -#define SDHCI_CAN_DO_ADMA2 0x00080000 -#define SDHCI_CAN_DO_ADMA1 0x00100000 -#define SDHCI_CAN_DO_HISPD 0x00200000 -#define SDHCI_CAN_DO_SDMA 0x00400000 -#define SDHCI_CAN_VDD_330 0x01000000 -#define SDHCI_CAN_VDD_300 0x02000000 -#define SDHCI_CAN_VDD_180 0x04000000 -#define SDHCI_CAN_64BIT 0x10000000 +#define SDHCI_CAN_DO_8BIT BIT(18) +#define SDHCI_CAN_DO_ADMA2 BIT(19) +#define SDHCI_CAN_DO_ADMA1 BIT(20) +#define SDHCI_CAN_DO_HISPD BIT(21) +#define SDHCI_CAN_DO_SDMA BIT(22) +#define SDHCI_CAN_VDD_330 BIT(24) +#define SDHCI_CAN_VDD_300 BIT(25) +#define SDHCI_CAN_VDD_180 BIT(26) +#define SDHCI_CAN_64BIT BIT(28) #define SDHCI_CAPABILITIES_1 0x44 #define SDHCI_CLOCK_MUL_MASK 0x00FF0000 @@ -213,9 +213,7 @@ #define SDHCI_QUIRK_BROKEN_R1B (1 << 2) #define SDHCI_QUIRK_NO_HISPD_BIT (1 << 3) #define SDHCI_QUIRK_BROKEN_VOLTAGE (1 << 4) -#define SDHCI_QUIRK_NO_CD (1 << 5) #define SDHCI_QUIRK_WAIT_SEND_CMD (1 << 6) -#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1 << 7) #define SDHCI_QUIRK_USE_WIDE8 (1 << 8) /* to make gcc happy */ @@ -228,13 +226,16 @@ struct sdhci_host; #define SDHCI_DEFAULT_BOUNDARY_ARG (7) struct sdhci_ops { #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS - u32 (*read_l)(struct sdhci_host *host, int reg); - u16 (*read_w)(struct sdhci_host *host, int reg); - u8 (*read_b)(struct sdhci_host *host, int reg); - void (*write_l)(struct sdhci_host *host, u32 val, int reg); - void (*write_w)(struct sdhci_host *host, u16 val, int reg); - void (*write_b)(struct sdhci_host *host, u8 val, int reg); + u32 (*read_l)(struct sdhci_host *host, int reg); + u16 (*read_w)(struct sdhci_host *host, int reg); + u8 (*read_b)(struct sdhci_host *host, int reg); + void (*write_l)(struct sdhci_host *host, u32 val, int reg); + void (*write_w)(struct sdhci_host *host, u16 val, int reg); + void (*write_b)(struct sdhci_host *host, u8 val, int reg); #endif + int (*get_cd)(struct sdhci_host *host); + void (*set_control_reg)(struct sdhci_host *host); + void (*set_clock)(struct sdhci_host *host, u32 div); }; struct sdhci_host { @@ -253,8 +254,6 @@ struct sdhci_host { struct gpio_desc pwr_gpio; /* Power GPIO */ struct gpio_desc cd_gpio; /* Card Detect GPIO */ - void (*set_control_reg)(struct sdhci_host *host); - void (*set_clock)(int dev_index, unsigned int div); uint voltages; struct mmc_config cfg; diff --git a/include/spl.h b/include/spl.h index 6e746b2046..bde44374ea 100644 --- a/include/spl.h +++ b/include/spl.h @@ -23,8 +23,8 @@ struct spl_image_info { const char *name; u8 os; - u32 load_addr; - u32 entry_point; + ulong load_addr; + ulong entry_point; u32 size; u32 flags; }; diff --git a/include/time.h b/include/time.h new file mode 100644 index 0000000000..5746ad9d96 --- /dev/null +++ b/include/time.h @@ -0,0 +1,57 @@ +/* + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _TIME_H +#define _TIME_H + +#include <linux/typecheck.h> + +unsigned long get_timer(unsigned long base); + +/* + * Return the current value of a monotonically increasing microsecond timer. + * Granularity may be larger than 1us if hardware does not support this. + */ +unsigned long timer_get_us(void); + +/* + * These inlines deal with timer wrapping correctly. You are + * strongly encouraged to use them + * 1. Because people otherwise forget + * 2. Because if the timer wrap changes in future you won't have to + * alter your driver code. + * + * time_after(a,b) returns true if the time a is after time b. + * + * Do this with "<0" and ">=0" to only test the sign of the result. A + * good compiler would generate better code (and a really good compiler + * wouldn't care). Gcc is currently neither. + */ +#define time_after(a,b) \ + (typecheck(unsigned long, a) && \ + typecheck(unsigned long, b) && \ + ((long)((b) - (a)) < 0)) +#define time_before(a,b) time_after(b,a) + +#define time_after_eq(a,b) \ + (typecheck(unsigned long, a) && \ + typecheck(unsigned long, b) && \ + ((long)((a) - (b)) >= 0)) +#define time_before_eq(a,b) time_after_eq(b,a) + +/* + * Calculate whether a is in the range of [b, c]. + */ +#define time_in_range(a,b,c) \ + (time_after_eq(a,b) && \ + time_before_eq(a,c)) + +/* + * Calculate whether a is in the range of [b, c). + */ +#define time_in_range_open(a,b,c) \ + (time_after_eq(a,b) && \ + time_before(a,c)) + +#endif /* _TIME_H */ diff --git a/include/wait_bit.h b/include/wait_bit.h index 066e30c118..06ad43a122 100644 --- a/include/wait_bit.h +++ b/include/wait_bit.h @@ -11,6 +11,7 @@ #include <common.h> #include <console.h> +#include <watchdog.h> #include <linux/errno.h> #include <asm/io.h> @@ -59,6 +60,7 @@ static inline int wait_for_bit(const char *prefix, const u32 *reg, } udelay(1); + WATCHDOG_RESET(); } debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n", prefix, reg, mask, |