#include <linux/device.h>
#include <linux/fsi-occ.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#define to_p9_sbe_occ(x) container_of((x), struct p9_sbe_occ, occ)
static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd)
struct occ_response *resp = &occ->resp;
struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ);
size_t resp_len = sizeof(*resp);
rc = fsi_occ_submit(ctx->sbe, cmd, 8, resp, &resp_len);
switch (resp->return_status) {
case OCC_RESP_CMD_IN_PRG:
case OCC_RESP_CMD_LEN_INVAL:
case OCC_RESP_DATA_INVAL:
case OCC_RESP_CHKSUM_ERR:
case OCC_RESP_CRIT_EXCEPT:
case OCC_RESP_CRIT_WATCHDOG:
static int p9_sbe_occ_probe(struct platform_device *pdev)
struct p9_sbe_occ *ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx),