diff options
Diffstat (limited to 'roms/u-boot/board/google/gru')
-rw-r--r-- | roms/u-boot/board/google/gru/Kconfig | 15 | ||||
-rw-r--r-- | roms/u-boot/board/google/gru/MAINTAINERS | 6 | ||||
-rw-r--r-- | roms/u-boot/board/google/gru/Makefile | 5 | ||||
-rw-r--r-- | roms/u-boot/board/google/gru/gru.c | 56 |
4 files changed, 82 insertions, 0 deletions
diff --git a/roms/u-boot/board/google/gru/Kconfig b/roms/u-boot/board/google/gru/Kconfig new file mode 100644 index 000000000..61f7bbca9 --- /dev/null +++ b/roms/u-boot/board/google/gru/Kconfig @@ -0,0 +1,15 @@ +if TARGET_CHROMEBOOK_BOB + +config SYS_BOARD + default "gru" + +config SYS_VENDOR + default "google" + +config SYS_CONFIG_NAME + default "gru" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/google/gru/MAINTAINERS b/roms/u-boot/board/google/gru/MAINTAINERS new file mode 100644 index 000000000..e1cda756b --- /dev/null +++ b/roms/u-boot/board/google/gru/MAINTAINERS @@ -0,0 +1,6 @@ +CHROMEBOOK BOB BOARD +M: Simon Glass <sjg@chromium.org> +S: Maintained +F: board/google/gru/ +F: include/configs/gru.h +F: configs/chromebook_bob_defconfig diff --git a/roms/u-boot/board/google/gru/Makefile b/roms/u-boot/board/google/gru/Makefile new file mode 100644 index 000000000..9117534a4 --- /dev/null +++ b/roms/u-boot/board/google/gru/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright 2019 Google LLC + +obj-y += gru.o diff --git a/roms/u-boot/board/google/gru/gru.c b/roms/u-boot/board/google/gru/gru.c new file mode 100644 index 000000000..23080c179 --- /dev/null +++ b/roms/u-boot/board/google/gru/gru.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 Google + */ + +#include <common.h> +#include <dm.h> +#include <init.h> + +#ifdef CONFIG_SPL_BUILD +/* provided to defeat compiler optimisation in board_init_f() */ +void gru_dummy_function(int i) +{ +} + +int board_early_init_f(void) +{ +# ifdef CONFIG_TARGET_CHROMEBOOK_BOB + int sum, i; + + /* + * Add a delay and ensure that the compiler does not optimise this out. + * This is needed since the power rails tail a while to turn on, and + * we get garbage serial output otherwise. + */ + sum = 0; + for (i = 0; i < 150000; i++) + sum += i; + gru_dummy_function(sum); +#endif /* CONFIG_TARGET_CHROMEBOOK_BOB */ + + return 0; +} +#endif + +#ifndef CONFIG_SPL_BUILD +int board_early_init_r(void) +{ + struct udevice *clk; + int ret; + + /* + * This init is done in SPL, but when chain-loading U-Boot SPL will + * have been skipped. Allow the clock driver to check if it needs + * setting up. + */ + ret = uclass_get_device_by_driver(UCLASS_CLK, + DM_DRIVER_GET(clk_rk3399), &clk); + if (ret) { + debug("%s: CLK init failed: %d\n", __func__, ret); + return ret; + } + + return 0; +} +#endif |