[01/11] ARM: OMAP2+: gpmc-onenand: of_node is always set
diff mbox

Message ID 20171015231735.zg4zqbhckdslvdul@lenoch
State New
Headers show

Commit Message

Ladislav Michl Oct. 15, 2017, 11:17 p.m. UTC
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 arch/arm/mach-omap2/gpmc-onenand.c | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

Patch
diff mbox

diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 2944af820558..6847a07aacf9 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -275,17 +275,13 @@  static int omap2_onenand_setup_async(void __iomem *onenand_base)
 	 * omap2_onenand_set_async_mode() to work to detect the onenand
 	 * supported clock rate for the sync timings.
 	 */
-	if (gpmc_onenand_data->of_node) {
-		gpmc_read_settings_dt(gpmc_onenand_data->of_node,
-				      &onenand_async);
-		if (onenand_async.sync_read || onenand_async.sync_write) {
-			if (onenand_async.sync_write)
-				gpmc_onenand_data->flags |=
-					ONENAND_SYNC_READWRITE;
-			else
-				gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
-			onenand_async.sync_read = false;
-		}
+	gpmc_read_settings_dt(gpmc_onenand_data->of_node, &onenand_async);
+	if (onenand_async.sync_read || onenand_async.sync_write) {
+		if (onenand_async.sync_write)
+			gpmc_onenand_data->flags |= ONENAND_SYNC_READWRITE;
+		else
+			gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
+		onenand_async.sync_read = false;
 	}
 
 	onenand_async.sync_write = true;
@@ -317,17 +313,7 @@  static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)
 		set_onenand_cfg(onenand_base);
 	}
 
-	if (gpmc_onenand_data->of_node) {
-		gpmc_read_settings_dt(gpmc_onenand_data->of_node,
-				      &onenand_sync);
-	} else {
-		/*
-		 * FIXME: Appears to be legacy code from initial ONENAND commit.
-		 * Unclear what boards this is for and if this can be removed.
-		 */
-		if (!cpu_is_omap34xx())
-			onenand_sync.wait_on_read = true;
-	}
+	gpmc_read_settings_dt(gpmc_onenand_data->of_node, &onenand_sync);
 
 	omap2_onenand_calc_sync_timings(&t, gpmc_onenand_data->flags, freq);