diff options
author | Joseph Chen <chenjh@rock-chips.com> | 2021-09-08 09:48:53 +0800 |
---|---|---|
committer | Dongjin Kim <tobetter@gmail.com> | 2021-12-30 18:51:22 +0900 |
commit | f9ec44d2b89a6124bb1af1ab40092a911415f98a (patch) | |
tree | 47016dc1ca1dbaf73810311acf1eed9e32cf80c9 | |
parent | 518bbfe5457d501061f872757ad6eac02842f241 (diff) | |
download | u-boot-odroid-c1-f9ec44d2b89a6124bb1af1ab40092a911415f98a.tar.gz |
ODROID-COMMON: Revert "rockchip: board: implement board_fdt_chosen_bootargs()"
This reverts commit d87d52756a1f979d3d3d5ddeba9e873f2889dd6b.
This patch is to use the unchanged 'bootargs' from U-Boot environment to
the device tree, since Rockchip's patch replaces or merges with
something else with given sources.
Change-Id: I70187f1112c87867d0eb306920346f35d6e966f4
-rw-r--r-- | arch/arm/mach-rockchip/board.c | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index aafaa23b40..d6e5cee3de 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -1036,95 +1036,6 @@ void board_quiesce_devices(void *images) #endif } -char *board_fdt_chosen_bootargs(void *fdt) -{ - /* bootargs_ext is used when dtbo is applied. */ - const char *arr_bootargs[] = { "bootargs", "bootargs_ext" }; - const char *bootargs; - int nodeoffset; - int i, dump; - - /* debug */ - hotkey_run(HK_INITCALL); - dump = is_hotkey(HK_CMDLINE); - if (dump) - printf("## bootargs(u-boot): %s\n\n", env_get("bootargs")); - - /* find or create "/chosen" node. */ - nodeoffset = fdt_find_or_add_subnode(fdt, 0, "chosen"); - if (nodeoffset < 0) - return NULL; - - for (i = 0; i < ARRAY_SIZE(arr_bootargs); i++) { - bootargs = fdt_getprop(fdt, nodeoffset, arr_bootargs[i], NULL); - if (!bootargs) - continue; - if (dump) - printf("## bootargs(kernel-%s): %s\n\n", - arr_bootargs[i], bootargs); - /* - * Append kernel bootargs - * If use AB system, delete default "root=" which route - * to rootfs. Then the ab bootctl will choose the - * high priority system to boot and add its UUID - * to cmdline. The format is "roo=PARTUUID=xxxx...". - */ -#ifdef CONFIG_ANDROID_AB - env_update_filter("bootargs", bootargs, "root="); -#else - env_update("bootargs", bootargs); -#endif - } - -#ifdef CONFIG_MTD_BLK - char *mtd_par_info = mtd_part_parse(NULL); - - if (mtd_par_info) { - if (memcmp(env_get("devtype"), "mtd", 3) == 0) - env_update("bootargs", mtd_par_info); - } -#endif - /* - * Initrd fixup: remove unused "initrd=0x...,0x...", - * this for compatible with legacy parameter.txt - */ - env_delete("bootargs", "initrd=", 0); - - /* - * If uart is required to be disabled during - * power on, it would be not initialized by - * any pre-loader and U-Boot. - * - * If we don't remove earlycon from commandline, - * kernel hangs while using earlycon to putc/getc - * which may dead loop for waiting uart status. - * (It seems the root cause is baundrate is not - * initilalized) - * - * So let's remove earlycon from commandline. - */ - if (gd->flags & GD_FLG_DISABLE_CONSOLE) - env_delete("bootargs", "earlycon=", 0); - - /* Android header v4+ need this handle */ -#ifdef CONFIG_ANDROID_BOOT_IMAGE - struct andr_img_hdr *hdr; - - hdr = (void *)env_get_ulong("android_addr_r", 16, 0); - if (hdr && !android_image_check_header(hdr) && hdr->header_version >= 4) { - if (env_update_extract_subset("bootargs", "andr_bootargs", "androidboot.")) - printf("extract androidboot.xxx error\n"); - if (dump) - printf("## bootargs(android): %s\n\n", env_get("andr_bootargs")); - } -#endif - bootargs = env_get("bootargs"); - if (dump) - printf("## bootargs(merged): %s\n\n", bootargs); - - return (char *)bootargs; -} - int ft_verify_fdt(void *fdt) { /* for android header v4+, we load bootparams and fixup initrd */ |