[U-Boot] [PATCH 26/82] x86: ivybridge: Declare global data where it is used

Bin Meng bmeng.cn at gmail.com
Tue Oct 11 05:16:28 CEST 2016


On Mon, Sep 26, 2016 at 11:33 AM, Simon Glass <sjg at chromium.org> wrote:
> Some files are missing this declaration. Add it to avoid build errors when
> we actually need the declaration.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  arch/x86/cpu/ivybridge/bd82x6x.c     | 2 ++
>  arch/x86/cpu/ivybridge/gma.c         | 2 ++
>  arch/x86/cpu/ivybridge/lpc.c         | 2 ++
>  arch/x86/cpu/ivybridge/model_206ax.c | 2 ++
>  arch/x86/cpu/ivybridge/northbridge.c | 2 ++
>  5 files changed, 10 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

> diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
> index 5b58d6c..3c5e159 100644
> --- a/arch/x86/cpu/ivybridge/bd82x6x.c
> +++ b/arch/x86/cpu/ivybridge/bd82x6x.c
> @@ -21,6 +21,8 @@
>  #include <asm/arch/pch.h>
>  #include <asm/arch/sandybridge.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  #define GPIO_BASE      0x48
>  #define BIOS_CTRL      0xdc
>
> diff --git a/arch/x86/cpu/ivybridge/gma.c b/arch/x86/cpu/ivybridge/gma.c
> index 37e2e6e..59866bd 100644
> --- a/arch/x86/cpu/ivybridge/gma.c
> +++ b/arch/x86/cpu/ivybridge/gma.c
> @@ -19,6 +19,8 @@
>  #include <asm/arch/pch.h>
>  #include <asm/arch/sandybridge.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +

But I think this is not needed since gma.c has been dropped due to DM
video conversion.

>  struct gt_powermeter {
>         u16 reg;
>         u32 value;
> diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
> index 4e0be2a..0b4343a 100644
> --- a/arch/x86/cpu/ivybridge/lpc.c
> +++ b/arch/x86/cpu/ivybridge/lpc.c
> @@ -20,6 +20,8 @@
>  #include <asm/pci.h>
>  #include <asm/arch/pch.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  #define NMI_OFF                                0
>
>  #define ENABLE_ACPI_MODE_IN_COREBOOT   0
> diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
> index 38e244b..ae7c540 100644
> --- a/arch/x86/cpu/ivybridge/model_206ax.c
> +++ b/arch/x86/cpu/ivybridge/model_206ax.c
> @@ -23,6 +23,8 @@
>  #include <asm/arch/bd82x6x.h>
>  #include <asm/arch/model_206ax.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  static void enable_vmx(void)
>  {
>         struct cpuid_result regs;
> diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
> index 491f289..94f31c4 100644
> --- a/arch/x86/cpu/ivybridge/northbridge.c
> +++ b/arch/x86/cpu/ivybridge/northbridge.c
> @@ -19,6 +19,8 @@
>  #include <asm/arch/model_206ax.h>
>  #include <asm/arch/sandybridge.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  int bridge_silicon_revision(struct udevice *dev)
>  {
>         struct cpuid_result result;
> --

Regards,
Bin


More information about the U-Boot mailing list