diff options
author | Keith Hui <buurin@gmail.com> | 2023-07-22 12:49:05 -0400 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-11-13 20:31:23 +0000 |
commit | 45e4ab4a660cb7ce312f2d11a153f2d9ef4158da (patch) | |
tree | 8b0fb3b07ecb3cfa84aa77b51c0e1053a1415c73 /src/mainboard/hp | |
parent | 940fe080bf1ed2dac827b569c70fb0ea11496041 (diff) |
mb/*: Update SPD mapping for sandybridge boards
Boards without HAVE_SPD_IN_CBFS: Move SPD mapping into devicetree.
Boards with HAVE_SPD_IN_CBFS: Convert to Haswell-style SPD mapping.
Change-Id: Id6ac0a36b2fc0b9686f6e875dd020ae8dba72a72
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76967
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'src/mainboard/hp')
18 files changed, 13 insertions, 108 deletions
diff --git a/src/mainboard/hp/compaq_8200_elite_sff/devicetree.cb b/src/mainboard/hp/compaq_8200_elite_sff/devicetree.cb index a18ec3c779..993721b473 100644 --- a/src/mainboard/hp/compaq_8200_elite_sff/devicetree.cb +++ b/src/mainboard/hp/compaq_8200_elite_sff/devicetree.cb @@ -5,6 +5,8 @@ chip northbridge/intel/sandybridge register "gpu_dp_b_hotplug" = "0" register "gpu_dp_c_hotplug" = "0" register "gpu_dp_d_hotplug" = "0" + # BTX mainboard: Reversed mapping + register "spd_addresses" = "{0x53, 0x52, 0x51, 0x50}" device domain 0 on subsystemid 0x103c 0x1495 inherit diff --git a/src/mainboard/hp/compaq_8200_elite_sff/early_init.c b/src/mainboard/hp/compaq_8200_elite_sff/early_init.c index ffff01af3e..31fa913a21 100644 --- a/src/mainboard/hp/compaq_8200_elite_sff/early_init.c +++ b/src/mainboard/hp/compaq_8200_elite_sff/early_init.c @@ -3,7 +3,6 @@ #include <bootblock_common.h> #include <superio/nuvoton/npcd378/npcd378.h> #include <superio/nuvoton/common/nuvoton.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #define SERIAL_DEV PNP_DEV(0x2e, NPCD378_SP2) @@ -30,12 +29,3 @@ void bootblock_mainboard_early_init(void) if (CONFIG(CONSOLE_SERIAL)) nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - /* BTX mainboard: Reversed mapping */ - read_spd(&spd[3], 0x50, id_only); - read_spd(&spd[2], 0x51, id_only); - read_spd(&spd[1], 0x52, id_only); - read_spd(&spd[0], 0x53, id_only); -} diff --git a/src/mainboard/hp/compaq_elite_8300_usdt/devicetree.cb b/src/mainboard/hp/compaq_elite_8300_usdt/devicetree.cb index f7f321fc83..7a62df1001 100644 --- a/src/mainboard/hp/compaq_elite_8300_usdt/devicetree.cb +++ b/src/mainboard/hp/compaq_elite_8300_usdt/devicetree.cb @@ -1,6 +1,8 @@ chip northbridge/intel/sandybridge register "gpu_dp_b_hotplug" = "4" register "gpu_dp_c_hotplug" = "4" + # BTX mainboard: Reversed mapping + register "spd_addresses" = "{0, 0x52, 0, 0x50}" device domain 0x0 on chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH register "docking_supported" = "0" diff --git a/src/mainboard/hp/compaq_elite_8300_usdt/early_init.c b/src/mainboard/hp/compaq_elite_8300_usdt/early_init.c index 857c25dd19..ae75d7c32a 100644 --- a/src/mainboard/hp/compaq_elite_8300_usdt/early_init.c +++ b/src/mainboard/hp/compaq_elite_8300_usdt/early_init.c @@ -1,14 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */ - #include <bootblock_common.h> #include <superio/nuvoton/npcd378/npcd378.h> #include <superio/nuvoton/common/nuvoton.h> #include <device/pci_ops.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> - const struct southbridge_usb_port mainboard_usb_ports[] = { { 1, 0, 0 }, { 1, 0, 0 }, @@ -31,9 +28,3 @@ void bootblock_mainboard_early_init(void) pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x1408); pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0010); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[3], 0x50, id_only); - read_spd(&spd[1], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/devicetree.cb b/src/mainboard/hp/snb_ivb_laptops/devicetree.cb index 54d522c93d..42dc4bd2c9 100644 --- a/src/mainboard/hp/snb_ivb_laptops/devicetree.cb +++ b/src/mainboard/hp/snb_ivb_laptops/devicetree.cb @@ -15,6 +15,7 @@ chip northbridge/intel/sandybridge register "gpu_panel_power_down_delay" = "230" register "gpu_panel_power_up_delay" = "300" register "gpu_pch_backlight" = "0x02880288" + register "spd_addresses" = "{0x50, 0, 0x52, 0}" device domain 0 on diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/2170p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/2170p/early_init.c index f17680a389..e5a9da72ca 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/2170p/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/2170p/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <superio/smsc/lpc47n217/lpc47n217.h> #include <ec/hp/kbc1126/ec.h> @@ -35,9 +34,3 @@ void bootblock_mainboard_early_init(void) kbc1126_pm1_init(); kbc1126_exit_conf(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/2560p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/2560p/early_init.c index 29e9e0f827..9be20365fe 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/2560p/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/2560p/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <ec/hp/kbc1126/ec.h> @@ -32,9 +31,3 @@ void bootblock_mainboard_early_init(void) kbc1126_exit_conf(); kbc1126_disable4e(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c index 686601e874..aa4e9da2ff 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <ec/hp/kbc1126/ec.h> @@ -32,9 +31,3 @@ void bootblock_mainboard_early_init(void) kbc1126_exit_conf(); kbc1126_disable4e(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/2760p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/2760p/early_init.c index 563371d7ae..ed40b31862 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/2760p/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/2760p/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <ec/hp/kbc1126/ec.h> @@ -33,9 +32,3 @@ void bootblock_mainboard_early_init(void) kbc1126_exit_conf(); kbc1126_disable4e(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/8460p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/8460p/early_init.c index b31f515a11..e930e6bf17 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/8460p/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/8460p/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <superio/smsc/lpc47n217/lpc47n217.h> #include <ec/hp/kbc1126/ec.h> @@ -35,9 +34,3 @@ void bootblock_mainboard_early_init(void) kbc1126_pm1_init(); kbc1126_exit_conf(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/8470p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/8470p/early_init.c index df3b9e1686..87e46ff612 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/8470p/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/8470p/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <superio/smsc/lpc47n217/lpc47n217.h> #include <ec/hp/kbc1126/ec.h> @@ -35,9 +34,3 @@ void bootblock_mainboard_early_init(void) kbc1126_pm1_init(); kbc1126_exit_conf(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/8770w/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/8770w/early_init.c index 3f813403cc..32b03da185 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/8770w/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/8770w/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <superio/smsc/lpc47n217/lpc47n217.h> #include <ec/hp/kbc1126/ec.h> @@ -35,11 +34,3 @@ void bootblock_mainboard_early_init(void) kbc1126_pm1_init(); kbc1126_exit_conf(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[1], 0x51, id_only); - read_spd(&spd[2], 0x52, id_only); - read_spd(&spd[3], 0x53, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/8770w/overridetree.cb b/src/mainboard/hp/snb_ivb_laptops/variants/8770w/overridetree.cb index 7244acd731..02ee795054 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/8770w/overridetree.cb +++ b/src/mainboard/hp/snb_ivb_laptops/variants/8770w/overridetree.cb @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later chip northbridge/intel/sandybridge + register "spd_addresses" = "{0x50, 0x51, 0x52, 0x53}" device domain 0 on subsystemid 0x103c 0x176c inherit diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/folio_9470m/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/folio_9470m/early_init.c index bf59f264ed..24100be19e 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/folio_9470m/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/folio_9470m/early_init.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <ec/hp/kbc1126/ec.h> @@ -31,9 +30,3 @@ void bootblock_mainboard_early_init(void) kbc1126_pm1_init(); kbc1126_exit_conf(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/probook_6360b/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/probook_6360b/early_init.c index 95243016e6..623aaf1842 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/probook_6360b/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/probook_6360b/early_init.c @@ -1,8 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include <bootblock_common.h> -#include <northbridge/intel/sandybridge/sandybridge.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #include <superio/smsc/lpc47n217/lpc47n217.h> #include <ec/hp/kbc1126/ec.h> @@ -36,9 +34,3 @@ void bootblock_mainboard_early_init(void) kbc1126_pm1_init(); kbc1126_exit_conf(); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - read_spd(&spd[0], 0x50, id_only); - read_spd(&spd[2], 0x52, id_only); -} diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c index 65a18199e7..2799a8538b 100644 --- a/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c +++ b/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c @@ -1,10 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> -#include <string.h> -#include <cbfs.h> -#include <console/console.h> -#include <northbridge/intel/sandybridge/raminit_native.h> +#include <northbridge/intel/sandybridge/raminit.h> #include <southbridge/intel/bd82x6x/pch.h> #include <ec/hp/kbc1126/ec.h> @@ -35,15 +32,10 @@ void bootblock_mainboard_early_init(void) kbc1126_exit_conf(); } -void mainboard_get_spd(spd_raw_data *spd, bool id_only) +void mb_get_spd_map(struct spd_info *spdi) { + spdi->addresses[0] = 0x50; /* C1S0 is a soldered RAM with no real SPD. Use stored SPD. */ - size_t spd_file_len = 0; - void *spd_file = cbfs_map("spd.bin", &spd_file_len); - - if (!spd_file || spd_file_len < sizeof(spd_raw_data)) - die("SPD data for C1S0 not found."); - - read_spd(&spd[0], 0x50, id_only); - memcpy(&spd[2], spd_file, spd_file_len); + spdi->addresses[2] = SPD_MEMORY_DOWN; + spdi->spd_index = 0; } diff --git a/src/mainboard/hp/z220_series/devicetree.cb b/src/mainboard/hp/z220_series/devicetree.cb index 71b1865254..f02ff76123 100644 --- a/src/mainboard/hp/z220_series/devicetree.cb +++ b/src/mainboard/hp/z220_series/devicetree.cb @@ -5,6 +5,8 @@ chip northbridge/intel/sandybridge register "gpu_dp_b_hotplug" = "0" register "gpu_dp_c_hotplug" = "0" register "gpu_dp_d_hotplug" = "0" + # BTX mainboard: Reversed mapping + register "spd_addresses" = "{0x53, 0x52, 0x51, 0x50}" device domain 0 on subsystemid 0x103c 0x1791 inherit diff --git a/src/mainboard/hp/z220_series/early_init.c b/src/mainboard/hp/z220_series/early_init.c index c0d84f5127..74a646238c 100644 --- a/src/mainboard/hp/z220_series/early_init.c +++ b/src/mainboard/hp/z220_series/early_init.c @@ -3,7 +3,6 @@ #include <bootblock_common.h> #include <superio/nuvoton/npcd378/npcd378.h> #include <superio/nuvoton/common/nuvoton.h> -#include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> #define SERIAL_DEV PNP_DEV(0x2e, NPCD378_SP2) @@ -30,12 +29,3 @@ void bootblock_mainboard_early_init(void) if (CONFIG(CONSOLE_SERIAL)) nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); } - -void mainboard_get_spd(spd_raw_data *spd, bool id_only) -{ - /* BTX mainboard: Reversed mapping */ - read_spd(&spd[3], 0x50, id_only); - read_spd(&spd[2], 0x51, id_only); - read_spd(&spd[1], 0x52, id_only); - read_spd(&spd[0], 0x53, id_only); -} |