[U-Boot] [PATCH v2 1/3] x86: Introduce INTEL_MID quirk option

Intel Mobile Internet Device (MID) platforms have special treatment in some cases, such as CPU enumeration or boot parameters configuration.
Besides that several drivers are specifically developed for the IP blocks found on Intel MID platforms. Those drivers will be dependent to this option.
Here we introduce specific quirk option for such cases.
It is supposed to be selected by Intel MID platform boards, for example, Intel Edison.
Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- arch/x86/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5f9597b230..7abbfd8223 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -80,6 +80,20 @@ config VENDOR_INTEL
endchoice
+# subarchitectures-specific options below +config INTEL_MID + bool "Intel MID platform support" + ---help--- + Select to build a kernel capable of supporting Intel MID + (Mobile Internet Device) platform systems which do not have + the PCI legacy interfaces. + + If you are building for a PC class system say N here. + + Intel MID platforms are based on an Intel processor and + chipset which consume less power than most of the x86 + derivatives. + # board-specific options below source "board/advantech/Kconfig" source "board/congatec/Kconfig"

From: Vincent Tinelli vincent.tinelli@intel.com
Intel MID platform boards have special treatment, such as boot parameter setting.
Assign hardware_subarch accordingly if CONFIG_INTEL_MID is set.
Reviewed-by: Bin Meng bmeng.cn@gmail.com Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Vincent Tinelli vincent.tinelli@intel.com Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- arch/x86/lib/zimage.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index b6b0f2beb3..aafbeb01f9 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -246,6 +246,10 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, hdr->setup_move_size = 0x9100; }
+#if defined(CONFIG_INTEL_MID) + hdr->hardware_subarch = X86_SUBARCH_INTEL_MID; +#endif + /* build command line at COMMAND_LINE_OFFSET */ build_command_line(cmd_line, auto_boot); }

On Fri, Feb 17, 2017 at 9:48 PM, Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
From: Vincent Tinelli vincent.tinelli@intel.com
Intel MID platform boards have special treatment, such as boot parameter setting.
Assign hardware_subarch accordingly if CONFIG_INTEL_MID is set.
Reviewed-by: Bin Meng bmeng.cn@gmail.com Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Vincent Tinelli vincent.tinelli@intel.com Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
arch/x86/lib/zimage.c | 4 ++++ 1 file changed, 4 insertions(+)
applied to u-boot-x86, thanks!

There is no microcode update available for SoCs used on Intel MID platforms.
Use conditional to bypass it.
Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- arch/x86/cpu/mp_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 988073cc79..4e2f000f75 100644 --- a/arch/x86/cpu/mp_init.c +++ b/arch/x86/cpu/mp_init.c @@ -248,7 +248,7 @@ static int load_sipi_vector(atomic_t **ap_countp, int num_cpus) if (!stack) return -ENOMEM; params->stack_top = (u32)(stack + size); -#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) +#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) && !defined(CONFIG_INTEL_MID) params->microcode_ptr = ucode_base; debug("Microcode at %x\n", params->microcode_ptr); #endif

On Fri, Feb 17, 2017 at 9:49 PM, Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
There is no microcode update available for SoCs used on Intel MID platforms.
Use conditional to bypass it.
Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
arch/x86/cpu/mp_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Bin Meng bmeng.cn@gmail.com

On Fri, Feb 17, 2017 at 9:49 PM, Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
There is no microcode update available for SoCs used on Intel MID platforms.
Use conditional to bypass it.
Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
arch/x86/cpu/mp_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 988073cc79..4e2f000f75 100644 --- a/arch/x86/cpu/mp_init.c +++ b/arch/x86/cpu/mp_init.c @@ -248,7 +248,7 @@ static int load_sipi_vector(atomic_t **ap_countp, int num_cpus) if (!stack) return -ENOMEM; params->stack_top = (u32)(stack + size); -#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) +#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) && !defined(CONFIG_INTEL_MID)
Fixed the "line over 80 characters" warning, and
params->microcode_ptr = ucode_base; debug("Microcode at %x\n", params->microcode_ptr);
#endif
applied to u-boot-x86, thanks!

Hi Andy,
On Fri, Feb 17, 2017 at 9:48 PM, Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
Intel Mobile Internet Device (MID) platforms have special treatment in some cases, such as CPU enumeration or boot parameters configuration.
Besides that several drivers are specifically developed for the IP blocks found on Intel MID platforms. Those drivers will be dependent to this option.
Here we introduce specific quirk option for such cases.
It is supposed to be selected by Intel MID platform boards, for example, Intel Edison.
Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
arch/x86/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5f9597b230..7abbfd8223 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -80,6 +80,20 @@ config VENDOR_INTEL
endchoice
+# subarchitectures-specific options below +config INTEL_MID
bool "Intel MID platform support"
---help---
nits: help to keep consistency in this file
Select to build a kernel capable of supporting Intel MID
kernel -> U-Boot
(Mobile Internet Device) platform systems which do not have
the PCI legacy interfaces.
If you are building for a PC class system say N here.
Intel MID platforms are based on an Intel processor and
chipset which consume less power than most of the x86
derivatives.
# board-specific options below source "board/advantech/Kconfig" source "board/congatec/Kconfig" --
Reviewed-by: Bin Meng bmeng.cn@gmail.com
I can fix these when applying.
Regards, Bin

On Sat, Feb 18, 2017 at 12:21 PM, Bin Meng bmeng.cn@gmail.com wrote:
Hi Andy,
On Fri, Feb 17, 2017 at 9:48 PM, Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
Intel Mobile Internet Device (MID) platforms have special treatment in some cases, such as CPU enumeration or boot parameters configuration.
Besides that several drivers are specifically developed for the IP blocks found on Intel MID platforms. Those drivers will be dependent to this option.
Here we introduce specific quirk option for such cases.
It is supposed to be selected by Intel MID platform boards, for example, Intel Edison.
Reviewed-by: Simon Glass sjg@chromium.org Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
arch/x86/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5f9597b230..7abbfd8223 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -80,6 +80,20 @@ config VENDOR_INTEL
endchoice
+# subarchitectures-specific options below +config INTEL_MID
bool "Intel MID platform support"
---help---
nits: help to keep consistency in this file
Select to build a kernel capable of supporting Intel MID
kernel -> U-Boot
(Mobile Internet Device) platform systems which do not have
the PCI legacy interfaces.
If you are building for a PC class system say N here.
Intel MID platforms are based on an Intel processor and
chipset which consume less power than most of the x86
derivatives.
# board-specific options below source "board/advantech/Kconfig" source "board/congatec/Kconfig" --
Reviewed-by: Bin Meng bmeng.cn@gmail.com
I can fix these when applying.
Fixed these, and
applied to u-boot-x86, thanks!
participants (2)
-
Andy Shevchenko
-
Bin Meng