mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-12 07:57:21 +00:00
e2f82f93f8
The U-Boot "stemmy" board is mainly intended to simplify booting mainline Linux on various smartphones from Samsung based on ST-Ericsson Ux500. While the mainline kernel is working great, there are still some features missing there. In particular, it is currently not possible to charge the battery when using the mainline kernel. This means that it is still necessary to boot the downstream/vendor kernel from Samsung sometimes to charge the device. That kernel is ancient, still uses board files + ATAGS instead of device trees and relies on a strange very long kernel command line hardcoded in the Samsung bootloader. Actually, since mainline is booted with device trees there is a very simple way to make the old downstream kernel work as well: We can simply take most of the ATAGS passed to U-Boot from the Samsung bootloader and copy them as-is when booting a kernel without device tree. That way the long command line and other needed ATAGS are copied as-is without having to bother with them. The only exception is the ATAG_INITRD - since the initrd is loaded by U-Boot, the atag for that should be generated in U-Boot so it points to the correct address. All other ATAGS are copied as-is and not generated in U-Boot. Also use the chance and provide a serial# for U-Boot by parsing the ATAG_SERIAL that is also passed by the Samsung bootloader. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
29 lines
926 B
C
29 lines
926 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2019 Stephan Gerhold <stephan@gerhold.net>
|
|
*/
|
|
#ifndef __CONFIGS_STEMMY_H
|
|
#define __CONFIGS_STEMMY_H
|
|
|
|
#include <linux/sizes.h>
|
|
|
|
/*
|
|
* The "stemmy" U-Boot port is designed to be chainloaded by the Samsung
|
|
* bootloader on devices based on ST-Ericsson Ux500. Therefore, we skip most
|
|
* low-level initialization and rely on configuration provided by the Samsung
|
|
* bootloader. New images are loaded at the same address for compatibility.
|
|
*/
|
|
#define CONFIG_SKIP_LOWLEVEL_INIT
|
|
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE
|
|
#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE
|
|
|
|
#define CONFIG_SYS_MALLOC_LEN SZ_2M
|
|
|
|
/* FIXME: This should be loaded from device tree... */
|
|
#define CONFIG_SYS_L2_PL310
|
|
#define CONFIG_SYS_PL310_BASE 0xa0412000
|
|
|
|
/* Generate initrd atag for downstream kernel (others are copied in stemmy.c) */
|
|
#define CONFIG_INITRD_TAG
|
|
|
|
#endif
|