Skip to content
Snippets Groups Projects
Commit a0c75f90 authored by Simon Glass's avatar Simon Glass Committed by Bin Meng
Browse files

x86: Move turbo_state to global_data


To avoid using BSS in SPL before SDRAM is set up, move this field to
global_data.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 1bff8363
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/turbo.h> #include <asm/turbo.h>
DECLARE_GLOBAL_DATA_PTR;
#if CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED #if CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED
static inline int get_global_turbo_state(void) static inline int get_global_turbo_state(void)
{ {
...@@ -22,16 +24,14 @@ static inline void set_global_turbo_state(int state) ...@@ -22,16 +24,14 @@ static inline void set_global_turbo_state(int state)
{ {
} }
#else #else
static int g_turbo_state = TURBO_UNKNOWN;
static inline int get_global_turbo_state(void) static inline int get_global_turbo_state(void)
{ {
return g_turbo_state; return gd->arch.turbo_state;
} }
static inline void set_global_turbo_state(int state) static inline void set_global_turbo_state(int state)
{ {
g_turbo_state = state; gd->arch.turbo_state = state;
} }
#endif #endif
......
...@@ -93,6 +93,7 @@ struct arch_global_data { ...@@ -93,6 +93,7 @@ struct arch_global_data {
char *mrc_output; char *mrc_output;
unsigned int mrc_output_len; unsigned int mrc_output_len;
ulong table; /* Table pointer from previous loader */ ulong table; /* Table pointer from previous loader */
int turbo_state; /* Current turbo state */
struct irq_routing_table *pirq_routing_table; struct irq_routing_table *pirq_routing_table;
#ifdef CONFIG_SEABIOS #ifdef CONFIG_SEABIOS
u32 high_table_ptr; u32 high_table_ptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment