Skip to content

Commit

Permalink
astbmc: Fail SFC init if SIO is unavailable
Browse files Browse the repository at this point in the history
[ Upstream commit a43e9a6 ]

If SuperIO is unavailable then the driver cannot perform accesses on
which it currently depends. Test for SuperIO availability during
initialsation and bail out immediately if it is absent.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
amboar authored and stewartsmith committed Oct 31, 2018
1 parent d264963 commit e4197f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hw/ast-bmc/ast-sf-ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,9 @@ int ast_sf_open(uint8_t type, struct spi_flash_ctrl **ctrl)
struct ast_sf_ctrl *ct;
#ifdef __SKIBOOT__
uint32_t hicr7;

if (!ast_sio_is_enabled())
return -ENODEV;
#endif /* __SKIBOOT__ */

if (type != AST_SF_TYPE_PNOR && type != AST_SF_TYPE_BMC
Expand Down

0 comments on commit e4197f8

Please sign in to comment.