Skip to content

Commit

Permalink
sh: fix build regression with CONFIG_OF && !CONFIG_OF_FLATTREE
Browse files Browse the repository at this point in the history
Such a configuration could only be selected by manually selecting
CONFIG_OF; SH_DEVICE_TREE selects both. The affected code is using the
flat DTB at boot time and thus rightfully should depend on
OF_FLATTREE, not just OF.

Signed-off-by: Rich Felker <dalias@libc.org>
  • Loading branch information
Rich Felker committed Jul 31, 2016
1 parent b46ed37 commit 03767da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions arch/sh/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ENTRY(_stext)
ldc r0, r6_bank
#endif

#ifdef CONFIG_OF
#ifdef CONFIG_OF_FLATTREE
mov r4, r12 ! Store device tree blob pointer in r12
#endif

Expand Down Expand Up @@ -318,7 +318,7 @@ ENTRY(_stext)
10:
#endif

#ifdef CONFIG_OF
#ifdef CONFIG_OF_FLATTREE
mov.l 8f, r0 ! Make flat device tree available early.
jsr @r0
mov r12, r4
Expand Down Expand Up @@ -349,7 +349,7 @@ ENTRY(stack_start)
5: .long start_kernel
6: .long cpu_init
7: .long init_thread_union
#if defined(CONFIG_OF)
#if defined(CONFIG_OF_FLATTREE)
8: .long sh_fdt_init
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void __init __weak plat_early_device_setup(void)
{
}

#ifdef CONFIG_OF
#ifdef CONFIG_OF_FLATTREE
void __ref sh_fdt_init(phys_addr_t dt_phys)
{
static int done = 0;
Expand Down

0 comments on commit 03767da

Please sign in to comment.