diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-09-25 15:42:38 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2020-08-06 03:30:28 +0300 |
commit | ac0a731a04e207faab7f6b8dfe9d943bf005e706 (patch) | |
tree | 4d87bafb505d3751d6989feb33c9f1d356b4baca /drivers | |
parent | d5d4d5b1b78730ba216ea4892171e8908be26091 (diff) | |
download | linux-ac0a731a04e207faab7f6b8dfe9d943bf005e706.tar.xz |
mtd: spi-nor: aspeed: check upper freq limit when doing training
OpenBMC-Staging-Count: 4
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/spi-nor/controllers/aspeed-smc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/controllers/aspeed-smc.c b/drivers/mtd/spi-nor/controllers/aspeed-smc.c index 29c882e3834a..efae1b8e37e8 100644 --- a/drivers/mtd/spi-nor/controllers/aspeed-smc.c +++ b/drivers/mtd/spi-nor/controllers/aspeed-smc.c @@ -1076,7 +1076,7 @@ static int aspeed_smc_optimize_read(struct aspeed_smc_chip *chip, /* Compare timing to max */ freq = ahb_freq / i; - if (freq >= max_freq) + if (freq > max_freq) continue; /* Set the timing */ |