diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-10-12 00:17:11 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-10-17 12:48:12 +0200 |
commit | 06c788db1ac6fd1faa1de67d4c0ddd03f3dbdbbe (patch) | |
tree | cbfb2565c7312db7d0c3cfa35074931f7ad3d34c /src | |
parent | 1aff2e97ea242ce6c841d2dba945cfb2cec0ec80 (diff) |
bd82x6x: Consolidate common GNVS init
Change-Id: Iea035f80695623e4e8d53eea7e3ec294d868fb5b
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7053
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/butterfly/acpi_tables.c | 10 | ||||
-rw-r--r-- | src/mainboard/google/link/acpi_tables.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/parrot/acpi_tables.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/stout/acpi_tables.c | 8 | ||||
-rw-r--r-- | src/mainboard/intel/emeraldlake2/acpi_tables.c | 9 | ||||
-rw-r--r-- | src/mainboard/kontron/ktqm77/acpi_tables.c | 5 | ||||
-rw-r--r-- | src/mainboard/lenovo/t520/acpi_tables.c | 5 | ||||
-rw-r--r-- | src/mainboard/lenovo/t530/acpi_tables.c | 5 | ||||
-rw-r--r-- | src/mainboard/lenovo/x220/acpi_tables.c | 5 | ||||
-rw-r--r-- | src/mainboard/lenovo/x230/acpi_tables.c | 5 | ||||
-rw-r--r-- | src/mainboard/samsung/lumpy/acpi_tables.c | 8 | ||||
-rw-r--r-- | src/mainboard/samsung/stumpy/acpi_tables.c | 9 | ||||
-rw-r--r-- | src/southbridge/intel/bd82x6x/lpc.c | 9 |
13 files changed, 9 insertions, 85 deletions
diff --git a/src/mainboard/google/butterfly/acpi_tables.c b/src/mainboard/google/butterfly/acpi_tables.c index 21b1c95ec1..dcaf3845be 100644 --- a/src/mainboard/google/butterfly/acpi_tables.c +++ b/src/mainboard/google/butterfly/acpi_tables.c @@ -46,11 +46,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; @@ -76,11 +71,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) // the lid is open by default. gnvs->lids = 1; -#if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); -#endif - acpi_update_thermal_table(gnvs); } diff --git a/src/mainboard/google/link/acpi_tables.c b/src/mainboard/google/link/acpi_tables.c index 81d8697d39..14baad2d45 100644 --- a/src/mainboard/google/link/acpi_tables.c +++ b/src/mainboard/google/link/acpi_tables.c @@ -56,11 +56,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; @@ -78,9 +73,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[4] = 0x00000000; #if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); - gnvs->chromeos.vbt2 = google_ec_running_ro() ? ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif diff --git a/src/mainboard/google/parrot/acpi_tables.c b/src/mainboard/google/parrot/acpi_tables.c index ba77b90b62..e4e1797731 100644 --- a/src/mainboard/google/parrot/acpi_tables.c +++ b/src/mainboard/google/parrot/acpi_tables.c @@ -47,11 +47,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; @@ -69,9 +64,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[4] = 0x00000005; #if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); - gnvs->chromeos.vbt2 = parrot_ec_running_ro() ? ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif diff --git a/src/mainboard/google/stout/acpi_tables.c b/src/mainboard/google/stout/acpi_tables.c index c8740f963c..504ae64e3e 100644 --- a/src/mainboard/google/stout/acpi_tables.c +++ b/src/mainboard/google/stout/acpi_tables.c @@ -50,11 +50,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; @@ -72,9 +67,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[4] = 0x00000005; #if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); - gnvs->chromeos.vbt2 = get_recovery_mode_switch() ? ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif diff --git a/src/mainboard/intel/emeraldlake2/acpi_tables.c b/src/mainboard/intel/emeraldlake2/acpi_tables.c index 92897d372d..3d95586869 100644 --- a/src/mainboard/intel/emeraldlake2/acpi_tables.c +++ b/src/mainboard/intel/emeraldlake2/acpi_tables.c @@ -66,10 +66,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { gnvs_ = gnvs; - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); /* Enable USB ports in S3 */ gnvs->s3u0 = 1; @@ -90,11 +86,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[3] = 0x80000410; gnvs->did[4] = 0x00000005; -#if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); -#endif - acpi_update_thermal_table(gnvs); // Stumpy has no arms^H^H^H^HEC. diff --git a/src/mainboard/kontron/ktqm77/acpi_tables.c b/src/mainboard/kontron/ktqm77/acpi_tables.c index 693bd3384b..0d90403bf0 100644 --- a/src/mainboard/kontron/ktqm77/acpi_tables.c +++ b/src/mainboard/kontron/ktqm77/acpi_tables.c @@ -44,11 +44,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; diff --git a/src/mainboard/lenovo/t520/acpi_tables.c b/src/mainboard/lenovo/t520/acpi_tables.c index fd55bc361f..26a459dfaf 100644 --- a/src/mainboard/lenovo/t520/acpi_tables.c +++ b/src/mainboard/lenovo/t520/acpi_tables.c @@ -43,11 +43,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; diff --git a/src/mainboard/lenovo/t530/acpi_tables.c b/src/mainboard/lenovo/t530/acpi_tables.c index fd55bc361f..26a459dfaf 100644 --- a/src/mainboard/lenovo/t530/acpi_tables.c +++ b/src/mainboard/lenovo/t530/acpi_tables.c @@ -43,11 +43,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; diff --git a/src/mainboard/lenovo/x220/acpi_tables.c b/src/mainboard/lenovo/x220/acpi_tables.c index fd55bc361f..26a459dfaf 100644 --- a/src/mainboard/lenovo/x220/acpi_tables.c +++ b/src/mainboard/lenovo/x220/acpi_tables.c @@ -43,11 +43,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; diff --git a/src/mainboard/lenovo/x230/acpi_tables.c b/src/mainboard/lenovo/x230/acpi_tables.c index fd55bc361f..26a459dfaf 100644 --- a/src/mainboard/lenovo/x230/acpi_tables.c +++ b/src/mainboard/lenovo/x230/acpi_tables.c @@ -43,11 +43,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); - /* Disable USB ports in S3 by default */ gnvs->s3u0 = 0; gnvs->s3u1 = 0; diff --git a/src/mainboard/samsung/lumpy/acpi_tables.c b/src/mainboard/samsung/lumpy/acpi_tables.c index 3dc2b1270f..24a0efd960 100644 --- a/src/mainboard/samsung/lumpy/acpi_tables.c +++ b/src/mainboard/samsung/lumpy/acpi_tables.c @@ -65,10 +65,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { gnvs_ = gnvs; - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); /* * Disable 3G in suspend by default. @@ -92,10 +88,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[3] = 0x80000410; gnvs->did[4] = 0x00000005; -#if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); -#endif acpi_update_thermal_table(gnvs); gnvs->chromeos.vbt2 = ec_read(0xcb) ? ACTIVE_ECFW_RW : ACTIVE_ECFW_RO; diff --git a/src/mainboard/samsung/stumpy/acpi_tables.c b/src/mainboard/samsung/stumpy/acpi_tables.c index dab0b61919..2d24822f72 100644 --- a/src/mainboard/samsung/stumpy/acpi_tables.c +++ b/src/mainboard/samsung/stumpy/acpi_tables.c @@ -67,10 +67,6 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) void acpi_create_gnvs(global_nvs_t *gnvs) { gnvs_ = gnvs; - memset((void *)gnvs, 0, sizeof(*gnvs)); - gnvs->apic = 1; - gnvs->mpen = 1; /* Enable Multi Processing */ - gnvs->pcnt = dev_count_cpu(); /* Enable Front USB ports in S3 by default */ gnvs->s3u0 = 1; @@ -91,11 +87,6 @@ void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[3] = 0x80000410; gnvs->did[4] = 0x00000005; -#if CONFIG_CHROMEOS - // TODO(reinauer) this could move elsewhere? - chromeos_init_vboot(&(gnvs->chromeos)); -#endif - acpi_update_thermal_table(gnvs); // Stumpy has no arms^H^H^H^HEC. diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c index 62188749c0..75b8a6c91e 100644 --- a/src/southbridge/intel/bd82x6x/lpc.c +++ b/src/southbridge/intel/bd82x6x/lpc.c @@ -685,6 +685,15 @@ static void southbridge_inject_dsdt(void) memset(gnvs, 0, sizeof (*gnvs)); acpi_create_gnvs(gnvs); + + gnvs->apic = 1; + gnvs->mpen = 1; /* Enable Multi Processing */ + gnvs->pcnt = dev_count_cpu(); + +#if CONFIG_CHROMEOS + chromeos_init_vboot(&(gnvs->chromeos)); +#endif + /* IGD OpRegion Base Address */ gnvs->aslb = (u32)opregion; /* And tell SMI about it */ |