diff mbox

[U-Boot,v2,05/22] x86: Split up arch_cpu_init()

Message ID 1425583534-2238-6-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass March 5, 2015, 7:25 p.m. UTC
At present we do more in this function than we should. Split out the
post-driver-model part into a separate function.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Use the new arch_cpu_init_dm() function instead of something x86-specific

 arch/x86/cpu/ivybridge/cpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Bin Meng March 9, 2015, 9:06 a.m. UTC | #1
On Fri, Mar 6, 2015 at 3:25 AM, Simon Glass <sjg@chromium.org> wrote:
> At present we do more in this function than we should. Split out the
> post-driver-model part into a separate function.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Use the new arch_cpu_init_dm() function instead of something x86-specific
>
>  arch/x86/cpu/ivybridge/cpu.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
> index 5fd3753..e6ef481 100644
> --- a/arch/x86/cpu/ivybridge/cpu.c
> +++ b/arch/x86/cpu/ivybridge/cpu.c
> @@ -116,6 +116,14 @@ static void set_spi_speed(void)
>
>  int arch_cpu_init(void)
>  {
> +       post_code(POST_CPU_INIT);
> +       timer_set_base(rdtsc());
> +
> +       return x86_cpu_init_f();
> +}
> +
> +int arch_cpu_init_dm(void)
> +{
>         const void *blob = gd->fdt_blob;
>         struct pci_controller *hose;
>         int node;
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass March 20, 2015, 11:14 p.m. UTC | #2
On 9 March 2015 at 03:06, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Fri, Mar 6, 2015 at 3:25 AM, Simon Glass <sjg@chromium.org> wrote:
>> At present we do more in this function than we should. Split out the
>> post-driver-model part into a separate function.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Use the new arch_cpu_init_dm() function instead of something x86-specific
>>
>>  arch/x86/cpu/ivybridge/cpu.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
>> index 5fd3753..e6ef481 100644
>> --- a/arch/x86/cpu/ivybridge/cpu.c
>> +++ b/arch/x86/cpu/ivybridge/cpu.c
>> @@ -116,6 +116,14 @@ static void set_spi_speed(void)
>>
>>  int arch_cpu_init(void)
>>  {
>> +       post_code(POST_CPU_INIT);
>> +       timer_set_base(rdtsc());
>> +
>> +       return x86_cpu_init_f();
>> +}
>> +
>> +int arch_cpu_init_dm(void)
>> +{
>>         const void *blob = gd->fdt_blob;
>>         struct pci_controller *hose;
>>         int node;
>> --
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-dm/next.
diff mbox

Patch

diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index 5fd3753..e6ef481 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -116,6 +116,14 @@  static void set_spi_speed(void)
 
 int arch_cpu_init(void)
 {
+	post_code(POST_CPU_INIT);
+	timer_set_base(rdtsc());
+
+	return x86_cpu_init_f();
+}
+
+int arch_cpu_init_dm(void)
+{
 	const void *blob = gd->fdt_blob;
 	struct pci_controller *hose;
 	int node;