aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/scs/early_mmc.c
diff options
context:
space:
mode:
authorKane Chen <kane.chen@intel.com>2019-08-23 12:03:05 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-08-28 09:22:34 +0000
commit01ebc74d5620f7cdbf3e51fae8e720e027d55f39 (patch)
tree7c4b3715f0e59b35da41563e739ea1811ecececc /src/soc/intel/common/block/scs/early_mmc.c
parentfdd0e9b38f02f5903aee5adeff89c6d9a48c18d6 (diff)
soc/intel/common/block: Provide mmc.c for setting dll registers
Currently, we don't have UPDs to set emmc settings per mainboard on CML. This code change is to create mmc.c to provide interface to override dll settings per mainboard. Notice: set_mmc_dll function will override the dll values in FSP. BUG=b:131401116 BRANCH=none TEST=Boot to OS and confirm the dll values have been overridden. Change-Id: Ib3c72b9851f41585ec099d8ae83a721af87ed383 Signed-off-by: Kane Chen <kane.chen@intel.com> Signed-off-by: Jamie Chen <jamie.chen@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35040 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/common/block/scs/early_mmc.c')
-rw-r--r--src/soc/intel/common/block/scs/early_mmc.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/soc/intel/common/block/scs/early_mmc.c b/src/soc/intel/common/block/scs/early_mmc.c
index 8f47ec7d9e..80364500b9 100644
--- a/src/soc/intel/common/block/scs/early_mmc.c
+++ b/src/soc/intel/common/block/scs/early_mmc.c
@@ -21,18 +21,11 @@
#include <compiler.h>
#include <console/console.h>
#include <device/pci.h>
-#include <intelblocks/early_mmc.h>
+#include <intelblocks/mmc.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <string.h>
-#define EMMC_TX_CMD_CNTL_OFFSET 0x820
-#define EMMC_TX_DATA_CNTL1_OFFSET 0x824
-#define EMMC_TX_DATA_CNTL2_OFFSET 0x828
-#define EMMC_RX_CMD_DATA_CNTL1_OFFSET 0x82C
-#define EMMC_RX_STROBE_CNTL_OFFSET 0x830
-#define EMMC_RX_CMD_DATA_CNTL2_OFFSET 0x834
-
void soc_sd_mmc_controller_quirks(struct sd_mmc_ctrlr *ctrlr)
{
uint32_t f_min, f_max;
@@ -62,32 +55,6 @@ static void disable_mmc_controller_bar(void)
~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY));
}
-static int set_mmc_dll(void *ioaddr)
-{
- struct mmc_dll_params dll_params;
-
- if (soc_get_mmc_dll(&dll_params) < 0) {
- printk(BIOS_ERR,
- "MMC early init: failed to get mmc DLL parameters\n");
- return -1;
- }
-
- write32(ioaddr + EMMC_TX_DATA_CNTL1_OFFSET,
- dll_params.emmc_tx_data_cntl1);
- write32(ioaddr + EMMC_TX_DATA_CNTL2_OFFSET,
- dll_params.emmc_tx_data_cntl2);
- write32(ioaddr + EMMC_RX_CMD_DATA_CNTL1_OFFSET,
- dll_params.emmc_rx_cmd_data_cntl1);
- write32(ioaddr + EMMC_RX_CMD_DATA_CNTL2_OFFSET,
- dll_params.emmc_rx_cmd_data_cntl2);
- write32(ioaddr + EMMC_RX_STROBE_CNTL_OFFSET,
- dll_params.emmc_rx_strobe_cntl);
- write32(ioaddr + EMMC_TX_CMD_CNTL_OFFSET,
- dll_params.emmc_tx_cmd_cntl);
-
- return 0;
-}
-
static void set_early_mmc_wake_status(int32_t status)
{
int32_t *ms_cbmem;