summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/khadas-vim.h21
-rw-r--r--include/configs/libretech-cc.h21
-rw-r--r--include/configs/meson-gxbb-common.h2
-rw-r--r--include/configs/omap3_evm.h94
-rw-r--r--include/configs/rpi.h2
-rw-r--r--include/test/compression.h17
-rw-r--r--include/test/suites.h17
7 files changed, 145 insertions, 29 deletions
diff --git a/include/configs/khadas-vim.h b/include/configs/khadas-vim.h
new file mode 100644
index 00000000000..9d99bc5dc7c
--- /dev/null
+++ b/include/configs/khadas-vim.h
@@ -0,0 +1,21 @@
+/*
+ * Configuration for Khadas VIM
+ *
+ * Copyright (C) 2017 Baylibre, SAS
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_PHY_ADDR 8
+
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxl-s905x-khadas-vim.dtb\0"
+
+#include <configs/meson-gxbb-common.h>
+
+#endif /* __CONFIG_H */
diff --git a/include/configs/libretech-cc.h b/include/configs/libretech-cc.h
new file mode 100644
index 00000000000..ffaca2648b8
--- /dev/null
+++ b/include/configs/libretech-cc.h
@@ -0,0 +1,21 @@
+/*
+ * Configuration for LibreTech CC
+ *
+ * Copyright (C) 2017 Baylibre, SAS
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_PHY_ADDR 8
+
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxl-s905x-libretech-cc.dtb\0"
+
+#include <configs/meson-gxbb-common.h>
+
+#endif /* __CONFIG_H */
diff --git a/include/configs/meson-gxbb-common.h b/include/configs/meson-gxbb-common.h
index d88d42de9ac..c2b306ad2e6 100644
--- a/include/configs/meson-gxbb-common.h
+++ b/include/configs/meson-gxbb-common.h
@@ -10,7 +10,7 @@
#define CONFIG_CPU_ARMV8
#define CONFIG_REMAKE_ELF
-#define CONFIG_NR_DRAM_BANKS 2
+#define CONFIG_NR_DRAM_BANKS 1
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_SYS_MAXARGS 32
#define CONFIG_SYS_MALLOC_LEN (32 << 20)
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index df50325ab66..42f21536379 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -86,8 +86,49 @@
/* Environment */
#define CONFIG_PREBOOT "usb start"
+#if !defined(CONFIG_SPL_BUILD)
+
+#include <config_distro_defaults.h>
+
+#define MEM_LAYOUT_ENV_SETTINGS \
+ DEFAULT_LINUX_BOOT_ENV
+
+#if defined(CONFIG_NAND)
+#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=" \
+ "run nandboot\0"
+
+#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
+ #devtypel #instance " "
+#endif /* CONFIG_NAND */
+
+#define BOOTENV_DEV_UIMAGE_MMC(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=" \
+ "setenv mmcdev " #instance"; " \
+ "run mmcboot\0"
+
+#define BOOTENV_DEV_NAME_UIMAGE_MMC(devtypeu, devtypel, instance) \
+ #devtypel #instance " "
+
+#define BOOTENV_DEV_ZIMAGE_MMC(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=" \
+ "setenv mmcdev " #instance"; " \
+ "run mmcbootz\0"
+
+#define BOOTENV_DEV_NAME_ZIMAGE_MMC(devtypeu, devtypel, instance) \
+ #devtypel #instance " "
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(ZIMAGE_MMC, zimage_mmc, 0) \
+ func(UIMAGE_MMC, uimage_mmc, 0) \
+ func(NAND, nand, 0)
+
+#include <config_distro_bootcmd.h>
+
#define CONFIG_EXTRA_ENV_SETTINGS \
- DEFAULT_LINUX_BOOT_ENV \
+ MEM_LAYOUT_ENV_SETTINGS \
+ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
"bootenv=uEnv.txt\0" \
@@ -107,40 +148,39 @@
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
"env import -t ${loadaddr} ${filesize}\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source ${loadaddr}\0" \
+ "mmcbootenv=" \
+ "mmc dev ${mmcdev}; " \
+ "if mmc rescan && run loadbootenv; then " \
+ "run importbootenv; " \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...; " \
+ "run uenvcmd; " \
+ "fi; " \
+ "fi\0" \
"loaduimage=setenv bootfile uImage; " \
"fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
"loadzimage=setenv bootfile zImage; " \
"fatload mmc ${mmcdev} ${loadaddr} zImage\0" \
- "loaddtb=fatload mmc ${mmcdev} ${fdtaddr} " CONFIG_DEFAULT_FDT_FILE "\0" \
- "mmcboot=echo Booting ${bootfile} from mmc ...; " \
- "run mmcargs; " \
- "bootm ${loadaddr} - ${fdtaddr}\0" \
- "mmcbootz=echo Booting ${bootfile} from mmc ...; " \
- "run mmcargs; " \
- "bootz ${loadaddr} - ${fdtaddr}\0" \
+ "loaddtb=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
+ "mmcboot=run mmcbootenv; " \
+ "if run loaduimage && run loaddtb; then " \
+ "echo Booting ${bootfile} from mmc ...; " \
+ "run mmcargs; " \
+ "bootm ${loadaddr} - ${fdtaddr}; " \
+ "fi\0" \
+ "mmcbootz=run mmcbootenv; " \
+ "if run loadzimage && run loaddtb; then " \
+ "echo Booting ${bootfile} from mmc ...; " \
+ "run mmcargs; " \
+ "bootz ${loadaddr} - ${fdtaddr};" \
+ "fi\0" \
"nandboot=echo Booting uImage from nand ...; " \
"run nandargs; " \
"nand read ${loadaddr} kernel; " \
"nand read ${fdtaddr} dtb; " \
- "bootm ${loadaddr} - ${fdtaddr}\0"
+ "bootm ${loadaddr} - ${fdtaddr}\0" \
+ BOOTENV
-#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootenv; then " \
- "run importbootenv; " \
- "if test -n $uenvcmd; then " \
- "echo Running uenvcmd ...; " \
- "run uenvcmd; " \
- "fi; " \
- "else " \
- "if run loadzimage && run loaddtb; then " \
- "run mmcbootz; fi; " \
- "if run loaduimage && run loaddtb; then " \
- "run mmcboot; fi; " \
- "run nandboot; " \
- "fi; " \
- "else run nandboot; fi"
+#endif /* !CONFIG_SPL_BUILD */
#endif /* __CONFIG_H */
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index c499b45b320..cab8661779e 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -76,7 +76,7 @@
#endif
/* Console UART */
-#ifdef CONFIG_BCM2837
+#if defined (CONFIG_BCM2837) || defined(CONFIG_TARGET_RPI_0_W)
#define CONFIG_BCM283X_MU_SERIAL
#else
#define CONFIG_PL01X_SERIAL
diff --git a/include/test/compression.h b/include/test/compression.h
new file mode 100644
index 00000000000..646f117ed81
--- /dev/null
+++ b/include/test/compression.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2017 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __TEST_COMPRESSION_H__
+#define __TEST_COMPRESSION_H__
+
+#include <test/test.h>
+
+/* Declare a new compression test */
+#define COMPRESSION_TEST(_name, _flags) \
+ UNIT_TEST(_name, _flags, compression_test)
+
+#endif /* __TEST_ENV_H__ */
diff --git a/include/test/suites.h b/include/test/suites.h
index 0e94feb07a7..5f2e519084f 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -8,9 +8,26 @@
#ifndef __TEST_SUITES_H__
#define __TEST_SUITES_H__
+struct unit_test;
+
+/**
+ * cmd_ut_category() - Run a category of unit tests
+ *
+ * @name: Category name
+ * @tests: List of tests to run
+ * @n_ents: Number of tests in @tests
+ * @argc: Argument count provided. Must be <= 1. If this is 1 then all
+ * tests are run, otherwise only the one named @argv[1] is run.
+ * @argv: Arguments: argv[1] is the test to run (if @argc >= 2)
+ * @return 0 if OK, CMD_RET_FAILURE on failure
+ */
+int cmd_ut_category(const char *name, struct unit_test *tests, int n_ents,
+ 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_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_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
#endif /* __TEST_SUITES_H__ */