aboutsummaryrefslogtreecommitdiff
path: root/hw/ast-bmc
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2015-12-07 10:54:23 +0100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-12-14 18:19:42 +1100
commit6677d2cefb60103156db713e2cdffb02b4a2d270 (patch)
tree0b841ef17184c3dcbac6b3d6bf57d1ca0cf6e699 /hw/ast-bmc
parentda524cb4dbd3e1897de317bd1c4255f90fd8d1a2 (diff)
downloadskiboot-6677d2cefb60103156db713e2cdffb02b4a2d270.zip
skiboot-6677d2cefb60103156db713e2cdffb02b4a2d270.tar.gz
skiboot-6677d2cefb60103156db713e2cdffb02b4a2d270.tar.bz2
libflash: fix 4bytes address enablement on BMC SPI flash
commit e25f3f3559d9 ("libflash: enable 4b mode on BMC SPI flash") added a setting for 4byte addresses on the BMC SPI flash when needed. This setting should be only done for the BMC flash, which is not the case in the current code. This patch fixes it. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ast-bmc')
-rw-r--r--hw/ast-bmc/ast-sf-ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ast-bmc/ast-sf-ctrl.c b/hw/ast-bmc/ast-sf-ctrl.c
index d18031a..bf42d32 100644
--- a/hw/ast-bmc/ast-sf-ctrl.c
+++ b/hw/ast-bmc/ast-sf-ctrl.c
@@ -178,7 +178,7 @@ static int ast_sf_set_4b(struct spi_flash_ctrl *ctrl, bool enable)
/* Update read mode */
ast_ahb_writel(ct->ctl_read_val, ct->ctl_reg);
- if (ce_ctrl)
+ if (ce_ctrl && ct->type == AST_SF_TYPE_BMC)
ast_ahb_writel(ce_ctrl, BMC_SPI_FCTL_CE_CTRL);
return 0;