summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/am65x_evm.h2
-rw-r--r--include/configs/axs10x.h5
-rw-r--r--include/configs/broadcom_bcm963158.h37
-rw-r--r--include/configs/hsdk.h5
-rw-r--r--include/configs/odroid.h1
-rw-r--r--include/configs/odroid_xu3.h1
-rw-r--r--include/configs/omap3_cairo.h10
-rw-r--r--include/dt-bindings/clock/stm32mp1-clks.h3
-rw-r--r--include/fdtdec.h7
-rw-r--r--include/i2s.h11
-rw-r--r--include/initcall.h35
-rw-r--r--include/power/regulator.h11
-rw-r--r--include/samsung/misc.h2
-rw-r--r--include/test/lib.h14
-rw-r--r--include/test/suites.h1
15 files changed, 100 insertions, 45 deletions
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 31749c6d06..9ce5b6e824 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -37,6 +37,8 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \
CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE - 4)
+#define CONFIG_SYS_BOOTM_LEN SZ_64M
+
/* U-Boot general configuration */
#define EXTRA_ENV_AM65X_BOARD_SETTINGS \
"findfdt=" \
diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h
index e128d1c08b..0f4d78a594 100644
--- a/include/configs/axs10x.h
+++ b/include/configs/axs10x.h
@@ -32,11 +32,6 @@
#define CONFIG_SYS_LOAD_ADDR 0x82000000
/*
- * This board might be of different versions so handle it
- */
-#define CONFIG_BOARD_TYPES
-
-/*
* NAND Flash configuration
*/
#define CONFIG_SYS_NAND_BASE (ARC_FPGA_PERIPHERAL_BASE + 0x16000)
diff --git a/include/configs/broadcom_bcm963158.h b/include/configs/broadcom_bcm963158.h
new file mode 100644
index 0000000000..5834e1e2a2
--- /dev/null
+++ b/include/configs/broadcom_bcm963158.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2019 Philippe Reynes <philippe.reynes@softathome.com>
+ */
+
+#include <linux/sizes.h>
+
+/*
+ * common
+ */
+
+/* UART */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
+ 230400, 500000, 1500000 }
+/* Memory usage */
+#define CONFIG_SYS_MAXARGS 24
+#define CONFIG_SYS_MALLOC_LEN (1024 * 1024)
+#define CONFIG_SYS_BOOTM_LEN (16 * 1024 * 1024)
+
+/*
+ * 63158
+ */
+
+/* RAM */
+#define CONFIG_SYS_SDRAM_BASE 0x00000000
+
+/* U-Boot */
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + SZ_16M)
+#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+/*
+ * bcm963158
+ */
+
+#define CONFIG_ENV_SIZE (8 * 1024)
diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h
index 9af1d12701..7735cc1720 100644
--- a/include/configs/hsdk.h
+++ b/include/configs/hsdk.h
@@ -33,11 +33,6 @@
#define CONFIG_SYS_LOAD_ADDR 0x82000000
/*
- * This board might be of different versions so handle it
- */
-#define CONFIG_BOARD_TYPES
-
-/*
* UART configuration
*/
#define CONFIG_SYS_NS16550_SERIAL
diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index c3520bb15f..b8809c8dcc 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -186,7 +186,6 @@
* TODO: Add Odroid X support
*/
#define CONFIG_MISC_COMMON
-#define CONFIG_BOARD_TYPES
#undef CONFIG_REVISION_TAG
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index 0337c26475..f178549a72 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -87,7 +87,6 @@
/* Set soc_rev, soc_id, board_rev, boardname, fdtfile */
#define CONFIG_ODROID_REV_AIN 9
#define CONFIG_REVISION_TAG
-#define CONFIG_BOARD_TYPES
#undef CONFIG_SYS_BOARD
#define CONFIG_SYS_BOARD "odroid"
diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h
index 04bce2f8b4..ef69b24dd0 100644
--- a/include/configs/omap3_cairo.h
+++ b/include/configs/omap3_cairo.h
@@ -190,16 +190,6 @@
/* env defaults */
#define CONFIG_BOOTFILE "uImage"
-/* Override OMAP3 common serial console configuration from UART3
- * to UART2.
- *
- * Attention: for UART2, special MUX settings (MUX_DEFAULT(), MCBSP3)
- * are needed and peripheral clocks for UART2 must be enabled in
- * function per_clocks_enable().
- */
-#ifdef CONFIG_SPL_BUILD
-#endif
-
/* Provide the MACH_TYPE value the vendor kernel requires */
#define CONFIG_MACH_TYPE 3063
diff --git a/include/dt-bindings/clock/stm32mp1-clks.h b/include/dt-bindings/clock/stm32mp1-clks.h
index 90ec780bfc..4cdaf13582 100644
--- a/include/dt-bindings/clock/stm32mp1-clks.h
+++ b/include/dt-bindings/clock/stm32mp1-clks.h
@@ -248,7 +248,4 @@
#define STM32MP1_LAST_CLK 232
-#define LTDC_K LTDC_PX
-#define ETHMAC_K ETHCK_K
-
#endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */
diff --git a/include/fdtdec.h b/include/fdtdec.h
index c2dd87ede2..b7e35cd87c 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -133,21 +133,14 @@ enum fdt_compat_id {
/* Tegra210 XUSB pad controller */
COMPAT_SMSC_LAN9215, /* SMSC 10/100 Ethernet LAN9215 */
COMPAT_SAMSUNG_EXYNOS5_SROMC, /* Exynos5 SROMC */
- COMPAT_SAMSUNG_S3C2440_I2C, /* Exynos I2C Controller */
- COMPAT_SAMSUNG_EXYNOS5_SOUND, /* Exynos Sound */
- COMPAT_WOLFSON_WM8994_CODEC, /* Wolfson WM8994 Sound Codec */
COMPAT_SAMSUNG_EXYNOS_USB_PHY, /* Exynos phy controller for usb2.0 */
COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller for usb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
COMPAT_SAMSUNG_EXYNOS_DWMMC, /* Exynos DWMMC controller */
- COMPAT_SAMSUNG_EXYNOS_MMC, /* Exynos MMC controller */
COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
- COMPAT_MAXIM_98095_CODEC, /* MAX98095 Codec */
- COMPAT_SAMSUNG_EXYNOS5_I2C, /* Exynos5 High Speed I2C Controller */
COMPAT_SAMSUNG_EXYNOS_SYSMMU, /* Exynos sysmmu */
COMPAT_INTEL_MICROCODE, /* Intel microcode update */
- COMPAT_AMS_AS3722, /* AMS AS3722 PMIC */
COMPAT_INTEL_QRK_MRC, /* Intel Quark MRC */
COMPAT_ALTERA_SOCFPGA_DWMAC, /* SoCFPGA Ethernet controller */
COMPAT_ALTERA_SOCFPGA_DWMMC, /* SoCFPGA DWMMC controller */
diff --git a/include/i2s.h b/include/i2s.h
index 28f6184811..7760aab7c4 100644
--- a/include/i2s.h
+++ b/include/i2s.h
@@ -78,7 +78,7 @@ struct i2s_reg {
/* This structure stores the i2s related information */
struct i2s_uc_priv {
unsigned int rfs; /* LR clock frame size */
- unsigned int bfs; /* Bit slock frame size */
+ unsigned int bfs; /* Bit clock frame size */
unsigned int audio_pll_clk; /* Audio pll frequency in Hz */
unsigned int samplingrate; /* sampling rate */
unsigned int bitspersample; /* bits per sample */
@@ -123,13 +123,4 @@ int i2s_tx_data(struct udevice *dev, void *data, uint data_size);
int i2s_transfer_tx_data(struct i2s_uc_priv *pi2s_tx, void *data,
uint data_size);
-/*
- * Initialise i2s transmiter
- *
- * @param pi2s_tx pointer of i2s transmitter parameter structure.
- *
- * @return int value 0 for success, -1 in case of error
- */
-int i2s_tx_init(struct i2s_uc_priv *pi2s_tx);
-
#endif /* __I2S_H__ */
diff --git a/include/initcall.h b/include/initcall.h
index 01f3f2833f..3ac01aa2cd 100644
--- a/include/initcall.h
+++ b/include/initcall.h
@@ -8,6 +8,39 @@
typedef int (*init_fnc_t)(void);
-int initcall_run_list(const init_fnc_t init_sequence[]);
+#include <common.h>
+#include <initcall.h>
+#include <efi.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static inline int initcall_run_list(const init_fnc_t init_sequence[])
+{
+ const init_fnc_t *init_fnc_ptr;
+
+ for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
+ unsigned long reloc_ofs = 0;
+ int ret;
+
+ if (gd->flags & GD_FLG_RELOC)
+ reloc_ofs = gd->reloc_off;
+#ifdef CONFIG_EFI_APP
+ reloc_ofs = (unsigned long)image_base;
+#endif
+ debug("initcall: %p", (char *)*init_fnc_ptr - reloc_ofs);
+ if (gd->flags & GD_FLG_RELOC)
+ debug(" (relocated to %p)\n", (char *)*init_fnc_ptr);
+ else
+ debug("\n");
+ ret = (*init_fnc_ptr)();
+ if (ret) {
+ printf("initcall sequence %p failed at call %p (err=%d)\n",
+ init_sequence,
+ (char *)*init_fnc_ptr - reloc_ofs, ret);
+ return -1;
+ }
+ }
+ return 0;
+}
#endif
diff --git a/include/power/regulator.h b/include/power/regulator.h
index 5318ab3ace..314160a894 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -304,6 +304,17 @@ int regulator_get_enable(struct udevice *dev);
int regulator_set_enable(struct udevice *dev, bool enable);
/**
+ * regulator_set_enable_if_allowed: set regulator enable state if allowed by
+ * regulator
+ *
+ * @dev - pointer to the regulator device
+ * @enable - set true or false
+ * @return - 0 on success or if enabling is not supported
+ * -errno val if fails.
+ */
+int regulator_set_enable_if_allowed(struct udevice *dev, bool enable);
+
+/**
* regulator_get_mode: get active operation mode id of a given regulator
*
* @dev - pointer to the regulator device
diff --git a/include/samsung/misc.h b/include/samsung/misc.h
index 0f957dc367..017560c256 100644
--- a/include/samsung/misc.h
+++ b/include/samsung/misc.h
@@ -32,9 +32,7 @@ void draw_logo(void);
char *get_dfu_alt_system(char *interface, char *devstr);
char *get_dfu_alt_boot(char *interface, char *devstr);
#endif
-#ifdef CONFIG_BOARD_TYPES
void set_board_type(void);
const char *get_board_type(void);
-#endif
#endif /* __SAMSUNG_MISC_COMMON_H__ */
diff --git a/include/test/lib.h b/include/test/lib.h
new file mode 100644
index 0000000000..04b6241e54
--- /dev/null
+++ b/include/test/lib.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2019 Heinrich Schuchardt <xypron.glpk@gmx.de>
+ */
+
+#ifndef __TEST_LIB_H__
+#define __TEST_LIB_H__
+
+#include <test/test.h>
+
+/* Declare a new library function test */
+#define LIB_TEST(_name, _flags) UNIT_TEST(_name, _flags, lib_test)
+
+#endif /* __TEST_LIB_H__ */
diff --git a/include/test/suites.h b/include/test/suites.h
index 77d863b4a6..01bee09346 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -27,6 +27,7 @@ int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);