[Skiboot] [PATCH v5 5/7] vas: Create device tree node

Stewart Smith stewart at linux.vnet.ibm.com
Mon Apr 3 11:44:07 AEST 2017


Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com> writes:
> Sukadev Bhattiprolu [sukadev at linux.vnet.ibm.com] wrote:
>> Create a device tree node for VAS and add properties that Linux
>> will need to configure/use VAS.
>
> Stewart, Balbir,
>
> When reviewing the kernel patches, Mikey pointed out[1] that rather
> than having 6 separate properties for the VAS window info, we could
> make them all "reg" properties.
>
> Here is the updated skiboot patch (other patches in this skiboot series
> are unaffected by this change). We will need this updated patch to go
> with [v4] of the kernel patch set[2].
>
> Thanks,
>
> Sukadev
>
> [1] Mikey's review comments:
>     https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-March/155834.html
>
> [2] v4 of kernel patch set
>     https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-March/156078.html
>
> ---
>
> From 8adbcd31f9dae84e9535709993b95ca9d8974576 Mon Sep 17 00:00:00 2001
> From: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
> Date: Wed, 25 Jan 2017 16:05:29 -0800
> Subject: [PATCH v5 5/7] vas: Create device tree node
>
> Create a device tree node for VAS and add properties that Linux
> will need to configure/use VAS.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
> ---
>
> Changelog[v5]:
> 	[Michael Neuling] Rather than having separate properties for
> 	HVWC, UWC and window address, make them all "reg" properties.
> ---
>  core/vas.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/core/vas.c b/core/vas.c
> index 6d475f9..32ff99e 100644
> --- a/core/vas.c
> +++ b/core/vas.c
> @@ -256,6 +256,24 @@ static inline uint64_t get_window_base_addr(struct proc_chip *chip)
>  	return val;
>  }
>
> +static void create_dt_node(struct proc_chip *chip)
> +{
> +	struct dt_node *dn;
> +	uint64_t hvwc_start, uwc_start, win_base;
> +
> +	win_base = get_window_base_addr(chip);
> +	hvwc_start = get_hvwc_mmio_bar(chip->id);
> +	uwc_start = get_uwc_mmio_bar(chip->id);
> +
> +	dn = dt_new_addr(chip->devnode, "vas", win_base);

Could we please have a compatible property here? The kernel code of
looking for XSCOM nodes isn't ideal and could break in the future, and
certainly isn't going to work for, say, PowerVM or KVM guests.

Also, please add documentation to doc/device-tree as to the device tree
bindings.

> +	dt_add_property_u64s(dn, "reg", hvwc_start, VAS_HVWC_MMIO_BAR_SIZE,
> +					uwc_start, VAS_UWC_MMIO_BAR_SIZE,
> +					win_base, RMA_LSMP_WINID_SHIFT);
> +
> +	dt_add_property(dn, "vas-id", &chip->vas_id, sizeof(chip->vas_id));
> +}
> +
>  /*
>   * Initialize VAS on one chip
>   */

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list