From 2c400e94925014774c51e7dcfe7f730bab366d6c Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 14 Jul 2019 12:09:56 +0200 Subject: [PATCH] rcar_gen3: drivers: ddr-a: Pass ddrBackup around Pass the ddrBackup variable around instead of making it a global variable. Signed-off-by: Marek Vasut Change-Id: Ib796181247712e464b77f5f8be5f851745727d74 --- NOTE: The camelcase is fixed in later patch. --- drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c b/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c index 71bd696c..df3bd74f 100644 --- a/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c +++ b/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c @@ -26,11 +26,6 @@ #endif #endif -/******************************************************************************* - * variables - ******************************************************************************/ -uint32_t ddrBackup; - /******************************************************************************* * Initialize ddr ******************************************************************************/ @@ -820,7 +815,7 @@ if (pdqsr_ctl == 1) { } /* init_ddr */ /* rev.0.04 add function */ -uint32_t recovery_from_backup_mode(void) +static uint32_t recovery_from_backup_mode(uint32_t ddrBackup) { /**************************************************************************** * recovery_Step0(DBSC Setting 1) / same "init_ddr" @@ -1648,6 +1643,7 @@ int32_t rcar_dram_init(void) uint32_t failcount; uint32_t md = 0; uint32_t ddr = 0; + uint32_t ddrBackup; md = *((volatile uint32_t*)RST_MODEMR); ddr = (md & 0x00080000) >> 19; @@ -1660,7 +1656,7 @@ int32_t rcar_dram_init(void) rcar_dram_get_boot_status(&ddrBackup); if (ddrBackup == DRAM_BOOT_STATUS_WARM) { - dataL = recovery_from_backup_mode(); /* WARM boot */ + dataL = recovery_from_backup_mode(ddrBackup); /* WARM boot */ } else { dataL = init_ddr(); /* COLD boot */ } /* ddrBackup */ -- 2.30.2