@@ -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);
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> --- arch/arm/mach-omap2/gpmc-onenand.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-)