lkml.org 
[lkml]   [2021]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 01/10] coresight: syscfg: Initial coresight system configuration
From
Date
On 1/28/21 5:09 PM, Mike Leach wrote:
> Creates an system management API to allow complex configurations and
> features to be programmed into a CoreSight infrastructure.
>
> A feature is defined as a programming set for a device or class of
> devices.
>
> A configuration is a set of features across the system that are enabled
> for a trace session.
>
> The API will manage system wide configuration, and allow complex
> programmed features to be added to individual device instances, and
> provide for system wide configuration selection on trace capture
> operations.
>
> This patch creates the initial data object and the initial API for
> loading configurations and features.
>
> Signed-off-by: Mike Leach <mike.leach@linaro.org>


> +/**
> + * Representation of register value.
> + *
> + * Supports full 64 bit register value, or 32 bit value with optional mask
> + * value.
> + *
> + * @type: define register usage and interpretation.
> + * @offset: the address offset for register in the hardware device (per device specification).
> + * @hw_info: optional hardware device type specific information. (ETM / CTI specific etc)
> + * @val64: 64 bit value.
> + * @val32: 32 bit value.
> + * @mask32: 32 bit mask when using 32 bit value to access device register.
> + */
> +struct cscfg_regval_desc {
> + struct {
> + u32 type:8;
> + u32 offset:12;
> + u32 hw_info:12;
> + };
> + union {
> + u64 val64;
> + struct {
> + u32 val32;

Since this is also overloaded with param_idx for VAL_PARAM type, please
make this explicit by doing something like this, to avoid having
to explain things in the code, undocumented here.

union {
u32 val32;
u32 param_idx;
};


Cheers
Suzuki

\
 
 \ /
  Last update: 2021-03-04 11:53    [W:0.863 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site