[PATCH v3 12/27] powerpc/powernv/pmem: Add register addresses & status values to the header
Alastair D'Silva
alastair at au1.ibm.com
Thu Feb 27 16:16:14 AEDT 2020
On Thu, 2020-02-27 at 16:08 +1100, Andrew Donnellan wrote:
> On 21/2/20 2:27 pm, Alastair D'Silva wrote:
> > From: Alastair D'Silva <alastair at d-silva.org>
> >
> > These values have been taken from the device specifications.
> >
> > Signed-off-by: Alastair D'Silva <alastair at d-silva.org>
>
> I've compared these values against the internal version of the
> device
> specifications that I have access to, and they appear to match.
>
> A few minor comments below, otherwise:
>
> Reviewed-by: Andrew Donnellan <ajd at linux.ibm.com>
>
> > +#define GLOBAL_MMIO_HCI_ACRW BIT_ULL
> > (0)
> > +#define GLOBAL_MMIO_HCI_NSCRW BIT_ULL
> > (1)
> > +#define GLOBAL_MMIO_HCI_AFU_RESET BIT_ULL(2)
> > +#define GLOBAL_MMIO_HCI_FW_DEBUG BIT_ULL(3)
> > +#define GLOBAL_MMIO_HCI_CONTROLLER_DUMP BIT_ULL
> > (4)
> > +#define GLOBAL_MMIO_HCI_CONTROLLER_DUMP_COLLECTED BIT_ULL(5)
> > +#define GLOBAL_MMIO_HCI_REQ_HEALTH_PERF BIT_ULL
> > (6)
>
> The labelling of some of these bits deviates from the standard
> abbreviations in the spec, which is fine I guess as these names are
> more
> descriptive, but maybe add a brief comment with the original
> abbreviation?
>
Ok
> > +
> > +#define ADMIN_COMMAND_HEARTBEAT 0x00u
> > +#define ADMIN_COMMAND_SHUTDOWN 0x01u
> > +#define ADMIN_COMMAND_FW_UPDATE 0x02u
> > +#define ADMIN_COMMAND_FW_DEBUG 0x03u
> > +#define ADMIN_COMMAND_ERRLOG 0x04u
> > +#define ADMIN_COMMAND_SMART 0x05u
> > +#define ADMIN_COMMAND_CONTROLLER_STATS 0x06u
> > +#define ADMIN_COMMAND_CONTROLLER_DUMP 0x07u
> > +#define ADMIN_COMMAND_CMD_CAPS 0x08u
> > +#define ADMIN_COMMAND_MAX 0x08u
> > +
> > +#define STATUS_SUCCESS 0x00
> > +#define STATUS_MEM_UNAVAILABLE 0x20
>
> There's also a "blocked on account of background task" code, 0x21.
>
Ok
> > +#define STATUS_BAD_OPCODE 0x50
> > +#define STATUS_BAD_REQUEST_PARM 0x51
> > +#define STATUS_BAD_DATA_PARM 0x52
> > +#define STATUS_DEBUG_BLOCKED 0x70
> > +#define STATUS_FAIL 0xFF
> > +
> > +#define STATUS_FW_UPDATE_BLOCKED 0x21
> > +#define STATUS_FW_ARG_INVALID 0x51
> > +#define STATUS_FW_INVALID 0x52
>
> These status codes seem, from the specification, to correspond to
> the
> generic error codes above, so perhaps they're not needed.
>
These will be used in warn_status_fw_update() later, but I'll alias
them to make it clear that they are shadowing values
--
Alastair D'Silva
Open Source Developer
Linux Technology Centre, IBM Australia
mob: 0423 762 819
More information about the Linuxppc-dev
mailing list