From ce49da9947f6ee6801aaa37ea2539c05f7e821c4 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Sun, 27 Nov 2016 21:21:45 -0800 Subject: [PATCH] Don't write SCKDIV when flashing The target may have already configured its clock to run at a higher frequency and would have set SCKDIV and other dividers at that time. Don't restore the SCKDIV to its default or the flash interface may run too fast and programming will fail. Otherwise, the default value is fine and there is no need to write SCKDIV. --- src/flash/nor/fespi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c index f8436b1f4..6badc818b 100644 --- a/src/flash/nor/fespi.c +++ b/src/flash/nor/fespi.c @@ -1032,10 +1032,6 @@ static int fespi_probe(struct flash_bank *bank) target_device->name, bank->base); /* read and decode flash ID; returns in SW mode */ - // TODO!!! Pass these arguments in to the driver - // Elsewhere this driver assumes these are set this way, - // but should really save and restore at the entry points. - FESPI_WRITE_REG(FESPI_REG_SCKDIV, 3); FESPI_WRITE_REG(FESPI_REG_TXCTRL, FESPI_TXWM(1)); fespi_set_dir(bank, FESPI_DIR_TX);