From 69d99e6c0d621febb2b6a22e27c4035da970e589 Mon Sep 17 00:00:00 2001 From: Kefeng Wang Date: Wed, 1 Jun 2016 14:53:04 +0800 Subject: xtensa: Remove unnecessary of_platform_populate with default match table After patch "of/platform: Add common method to populate default bus", it is possible for arch code to remove unnecessary callers of of_platform_populate with default match table. Move of_clk_init() into time_init(), then drop xtensa_device_probe() fully. Cc: Chris Zankel Cc: Max Filippov Signed-off-by: Kefeng Wang Signed-off-by: Rob Herring --- arch/xtensa/kernel/setup.c | 11 ----------- arch/xtensa/kernel/time.c | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'arch/xtensa') diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 9735691f37f1..18af563110a1 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -22,10 +22,8 @@ #include #include #include -#include #include #include -#include #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) # include @@ -252,15 +250,6 @@ void __init early_init_devtree(void *params) strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); } -static int __init xtensa_device_probe(void) -{ - of_clk_init(NULL); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - return 0; -} - -device_initcall(xtensa_device_probe); - #endif /* CONFIG_OF */ /* diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index b9ad9feadc2d..6ec73c9f415d 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -148,6 +149,7 @@ void __init time_init(void) local_timer_setup(0); setup_irq(this_cpu_ptr(&ccount_timer)->evt.irq, &timer_irqaction); sched_clock_register(ccount_sched_clock_read, 32, ccount_freq); + of_clk_init(NULL); clocksource_probe(); } -- cgit v1.2.3 From d02014b2b764f058366b2f9dd425915fb900687c Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 23 Jul 2016 17:24:55 -0700 Subject: xtensa: Fix build error due to missing include file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 69d99e6c0d621f ("xtensa: Remove unnecessary of_platform_populate with default match table") dropped various include files from arch/xtensa/kernel/setup.c. This results in the following build error. arch/xtensa/kernel/setup.c: In function ‘xtensa_dt_io_area’: arch/xtensa/kernel/setup.c:213:2: error: implicit declaration of function ‘of_read_ulong’ Fixes: 69d99e6c0d621f ("xtensa: Remove unnecessary of_platform_populate with default match table") Cc: Kefeng Wang Cc: Rob Herring Signed-off-by: Guenter Roeck Acked-by: Max Filippov Signed-off-by: Rob Herring --- arch/xtensa/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/xtensa') diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 18af563110a1..6f68c6045a70 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) -- cgit v1.2.3 From e973f4ec130ac0eefb9e69b5139ed8a2768250aa Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 26 Jul 2016 11:46:30 -0500 Subject: xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table" This partially reverts commit 69d99e6c0d62 keeping only the main purpose of the original commit which is the removal of of_platform_populate() call. The moving of of_clk_init() caused changes in the initialization order breaking booting. Fixes: 69d99e6c0d621f ("xtensa: Remove unnecessary of_platform_populate with default match table") Cc: Kefeng Wang Cc: Guenter Roeck Tested-by: Max Filippov Signed-off-by: Rob Herring --- arch/xtensa/kernel/setup.c | 9 +++++++++ arch/xtensa/kernel/time.c | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'arch/xtensa') diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 6f68c6045a70..143251ede897 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -251,6 +252,14 @@ void __init early_init_devtree(void *params) strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); } +static int __init xtensa_device_probe(void) +{ + of_clk_init(NULL); + return 0; +} + +device_initcall(xtensa_device_probe); + #endif /* CONFIG_OF */ /* diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 6ec73c9f415d..b9ad9feadc2d 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -149,7 +148,6 @@ void __init time_init(void) local_timer_setup(0); setup_irq(this_cpu_ptr(&ccount_timer)->evt.irq, &timer_irqaction); sched_clock_register(ccount_sched_clock_read, 32, ccount_freq); - of_clk_init(NULL); clocksource_probe(); } -- cgit v1.2.3