From e50db35dc4a3416efff69e2969eb8447d3667135 Mon Sep 17 00:00:00 2001 From: Eero Nurkkala Date: Wed, 2 Nov 2022 09:44:01 +0200 Subject: [PATCH] Revert "mpfs/mpfs_ddr.c: Stop the DDR training once it is completed" This reverts commit ea9144bda8287e8819c08244ffbab1a45fb47204. The commit made Icicle MPFS DDR useless. Revert the change for now. Signed-off-by: Eero Nurkkala --- arch/risc-v/src/mpfs/mpfs_ddr.c | 44 --------------------------------- 1 file changed, 44 deletions(-) diff --git a/arch/risc-v/src/mpfs/mpfs_ddr.c b/arch/risc-v/src/mpfs/mpfs_ddr.c index 87b789110d5..df59ee4c3e5 100644 --- a/arch/risc-v/src/mpfs/mpfs_ddr.c +++ b/arch/risc-v/src/mpfs/mpfs_ddr.c @@ -45,11 +45,9 @@ #include "riscv_internal.h" #include "mpfs_dma.h" -#include "mpfs_plic.h" #include "hardware/mpfs_sysreg.h" #include "hardware/mpfs_ddr.h" #include "hardware/mpfs_sgmii.h" -#include "hardware/mpfs_plic.h" /**************************************************************************** * Pre-processor Definitions @@ -3861,44 +3859,6 @@ static int mpfs_ddr_test_32bit_nc(struct mpfs_ddr_priv_s *priv) return 0; } -/**************************************************************************** - * Name: mpfs_training_stop - * - * Description: - * This stops the DDR training process, resetting the training IP. - * - * Input Parameters: - * priv - Instance of the ddr private state structure - * - ****************************************************************************/ - -static void mpfs_training_stop(struct mpfs_ddr_priv_s *priv) -{ - uintptr_t claim_address; - uint32_t irq; - - /* Not needed for now */ - - UNUSED(priv); - - /* Stop training, i.e. reset the training block */ - - putreg32(0, MPFS_DDR_CSR_APB_PHY_DFI_INIT_START); - putreg32(0x02, MPFS_CFG_DDR_SGMII_PHY_TRAINING_RESET); - - /* Eat a way any lingering DDRC interrupt */ - - claim_address = mpfs_plic_get_claimbase(); - irq = MPFS_IRQ_EXT_START + getreg32(claim_address); - - if (irq == MPFS_IRQ_DDRC_TRAIN) - { - /* Claim this interrupt, clearing the source */ - - putreg32(irq - MPFS_IRQ_EXT_START, claim_address); - } -} - /**************************************************************************** * Name: mpfs_ddr_setup * @@ -4039,10 +3999,6 @@ static int mpfs_ddr_setup(struct mpfs_ddr_priv_s *priv) mpfs_setup_ddr_segments(LIBERO_SEG_SETUP); - /* Stop the training */ - - mpfs_training_stop(priv); - return 0; }