UPSTREAM: soc/intel/quark: make use of common cbmem_top_chipset

This replaces quark's own implementation of cbmem_top_chipset and
selects the common code one.

BUG=none
BRANCH=none
TEST=none

Change-Id: I24e6c3abeaf8c5350a95f4d0b533e08e76d0e106
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 6754dcda744c7ff7850024b4da1990475b0dfa7f
Original-Change-Id: I445c471b654abfa922b20215e52a2794529be120
Original-Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/36621
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/1910031
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
diff --git a/src/soc/intel/quark/Kconfig b/src/soc/intel/quark/Kconfig
index 461d230..6938431 100644
--- a/src/soc/intel/quark/Kconfig
+++ b/src/soc/intel/quark/Kconfig
@@ -32,6 +32,8 @@
 	select PLATFORM_USES_FSP2_0
 	select SOC_INTEL_COMMON
 	select SOC_INTEL_COMMON_RESET
+	select SOC_INTEL_COMMON_BLOCK
+	select SOC_INTEL_COMMON_BLOCK_SA_FSP_TOLUM
 	select SOC_SETS_MSRS
 	select SPI_FLASH
 	select UART_OVERRIDE_REFCLK
diff --git a/src/soc/intel/quark/memmap.c b/src/soc/intel/quark/memmap.c
index 9ccaf55..6cd2c9a 100644
--- a/src/soc/intel/quark/memmap.c
+++ b/src/soc/intel/quark/memmap.c
@@ -18,23 +18,6 @@
 #include <cbmem.h>
 #include <soc/reg_access.h>
 
-void *cbmem_top_chipset(void)
-{
-	uint32_t top_of_memory;
-
-	/* Determine the TSEG base */
-	top_of_memory = reg_host_bridge_unit_read(QNC_MSG_FSBIC_REG_HSMMC);
-	top_of_memory &= SMM_START_MASK;
-	top_of_memory <<= 16;
-
-	/* Reserve 64 KiB for RMU firmware */
-	if (top_of_memory)
-		top_of_memory -= 0x10000;
-
-	/* Return the top of memory */
-	return (void *)top_of_memory;
-}
-
 void fill_postcar_frame(struct postcar_frame *pcf)
 {
 	uintptr_t top_of_ram;