Commit 3ed01657 authored by Yann Gautier's avatar Yann Gautier
Browse files

nand: stm32_fmc_nand: remove dead code



The FMC driver in TF-A only supports NAND Mode 0 timings.
The timings are then hard-coded as macros, leading to some parts of code
unreachable.
This issue was found by Coverity scan: CID 366361.

Change-Id: I864c51ce11b9ef74ad82b3301f56f46a2e0f70ca
Signed-off-by: default avatarYann Gautier <yann.gautier@foss.st.com>
parent 94b0c334
/* /*
* Copyright (c) 2019-2020, STMicroelectronics - All Rights Reserved * Copyright (c) 2019-2021, STMicroelectronics - All Rights Reserved
* *
* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause * SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
*/ */
...@@ -200,9 +200,6 @@ static void stm32_fmc2_nand_setup_timing(void) ...@@ -200,9 +200,6 @@ static void stm32_fmc2_nand_setup_timing(void)
if ((twait < NAND_TCS_MIN) && (tset_mem < (NAND_TCS_MIN - twait))) { if ((twait < NAND_TCS_MIN) && (tset_mem < (NAND_TCS_MIN - twait))) {
tset_mem = NAND_TCS_MIN - twait; tset_mem = NAND_TCS_MIN - twait;
} }
if ((twait < NAND_TALS_MIN) && (tset_mem < (NAND_TALS_MIN - twait))) {
tset_mem = NAND_TALS_MIN - twait;
}
if ((twait > thiz) && ((twait - thiz) < NAND_TDS_MIN) && if ((twait > thiz) && ((twait - thiz) < NAND_TDS_MIN) &&
(tset_mem < (NAND_TDS_MIN - (twait - thiz)))) { (tset_mem < (NAND_TDS_MIN - (twait - thiz)))) {
tset_mem = NAND_TDS_MIN - (twait - thiz); tset_mem = NAND_TDS_MIN - (twait - thiz);
...@@ -244,12 +241,6 @@ static void stm32_fmc2_nand_setup_timing(void) ...@@ -244,12 +241,6 @@ static void stm32_fmc2_nand_setup_timing(void)
if ((twait < NAND_TCS_MIN) && (tset_att < (NAND_TCS_MIN - twait))) { if ((twait < NAND_TCS_MIN) && (tset_att < (NAND_TCS_MIN - twait))) {
tset_att = NAND_TCS_MIN - twait; tset_att = NAND_TCS_MIN - twait;
} }
if ((twait < NAND_TCLS_MIN) && (tset_att < (NAND_TCLS_MIN - twait))) {
tset_att = NAND_TCLS_MIN - twait;
}
if ((twait < NAND_TALS_MIN) && (tset_att < (NAND_TALS_MIN - twait))) {
tset_att = NAND_TALS_MIN - twait;
}
if ((thold_mem < NAND_TRHW_MIN) && if ((thold_mem < NAND_TRHW_MIN) &&
(tset_att < (NAND_TRHW_MIN - thold_mem))) { (tset_att < (NAND_TRHW_MIN - thold_mem))) {
tset_att = NAND_TRHW_MIN - thold_mem; tset_att = NAND_TRHW_MIN - thold_mem;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment