lkml.org 
[lkml]   [2020]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 12/27] powerpc/powernv/pmem: Add register addresses & status values to the header
From
Date
On 21/2/20 2:27 pm, Alastair D'Silva wrote:
> From: Alastair D'Silva <alastair@d-silva.org>
>
> These values have been taken from the device specifications.
>
> Signed-off-by: Alastair D'Silva <alastair@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@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?

> +
> +#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.

> +#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.


--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited

\
 
 \ /
  Last update: 2020-02-27 06:10    [W:0.390 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site