All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
To: Patrice Chotard <patrice.chotard@foss.st.com>, <u-boot@lists.denx.de>
Cc: U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>,
	Gatien Chevallier <gatien.chevallier@foss.st.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 13/13] ARM: stm32mp: add RIFSC system bus driver for STM32MP25
Date: Tue, 22 Apr 2025 10:44:05 +0200	[thread overview]
Message-ID: <d762c10f-e977-4972-88cd-a244502190bd@foss.st.com> (raw)
In-Reply-To: <20250401131413.387139-14-patrice.chotard@foss.st.com>

Hi,

On 4/1/25 15:14, Patrice Chotard wrote:
> From: Patrick Delaunay <patrick.delaunay@foss.st.com>
>
> This driver is checking the access rights of the different
> peripherals connected to the RIFSC bus. If access is denied,
> the associated device is not binded.
>
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>
> ---
>
>   arch/arm/mach-stm32mp/include/mach/rif.h |  26 ++
>   arch/arm/mach-stm32mp/stm32mp2/Makefile  |   1 +
>   arch/arm/mach-stm32mp/stm32mp2/rifsc.c   | 364 +++++++++++++++++++++++
>   3 files changed, 391 insertions(+)
>   create mode 100644 arch/arm/mach-stm32mp/include/mach/rif.h
>   create mode 100644 arch/arm/mach-stm32mp/stm32mp2/rifsc.c
>
> diff --git a/arch/arm/mach-stm32mp/include/mach/rif.h b/arch/arm/mach-stm32mp/include/mach/rif.h
> new file mode 100644
> index 00000000000..10b22108120
> --- /dev/null
> +++ b/arch/arm/mach-stm32mp/include/mach/rif.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */
> +/*
> + * Copyright (C) 2023, STMicroelectronics - All Rights Reserved
> + */
> +
> +#ifndef MACH_RIF_H
> +#define MACH_RIF_H
> +
> +#include <linux/types.h>
> +
> +/**
> + * stm32_rifsc_check_access - Check RIF accesses for given device node
> + *
> + * @device_node		Node of the device for which the accesses are checked
> + */
> +int stm32_rifsc_check_access(ofnode device_node);
> +
> +/**
> + * stm32_rifsc_check_access - Check RIF accesses for given id
> + *
> + * @device_node		Node of the device to get a reference on RIFSC
> + * @id			ID of the resource to check
> + */
> +int stm32_rifsc_check_access_by_id(ofnode device_node, u32 id);
> +
> +#endif /* MACH_RIF_H*/
> diff --git a/arch/arm/mach-stm32mp/stm32mp2/Makefile b/arch/arm/mach-stm32mp/stm32mp2/Makefile
> index b579ce5a800..5dbf75daa76 100644
> --- a/arch/arm/mach-stm32mp/stm32mp2/Makefile
> +++ b/arch/arm/mach-stm32mp/stm32mp2/Makefile
> @@ -5,5 +5,6 @@
>   
>   obj-y += cpu.o
>   obj-y += arm64-mmu.o
> +obj-y += rifsc.o
>   obj-$(CONFIG_OF_SYSTEM_SETUP) += fdt.o
>   obj-$(CONFIG_STM32MP25X) += stm32mp25x.o
> diff --git a/arch/arm/mach-stm32mp/stm32mp2/rifsc.c b/arch/arm/mach-stm32mp/stm32mp2/rifsc.c
> new file mode 100644
> index 00000000000..48f65365376
> --- /dev/null
> +++ b/arch/arm/mach-stm32mp/stm32mp2/rifsc.c
> @@ -0,0 +1,364 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
> +/*
> + * Copyright (C) 2023, STMicroelectronics - All Rights Reserved
> + */
> +
> +#define LOG_CATEGORY UCLASS_SIMPLE_BUS
> +


minor:

#define LOG_CATEGORY UCLASS_NOP


to be coherent with driver

....

> +
> +U_BOOT_DRIVER(stm32_rifsc) = {
> +	.name = "stm32_rifsc",
> +	.id = UCLASS_NOP,
> +	.of_match = stm32_rifsc_ids,
> +	.bind = stm32_rifsc_bind,
> +	.remove = stm32_rifsc_remove,
> +	.child_post_bind = stm32_rifsc_child_post_bind,
> +	.child_pre_probe = stm32_rifsc_child_pre_probe,
> +	.child_post_remove = stm32_rifsc_child_post_remove,
> +	.plat_auto = sizeof(struct stm32_rifsc_plat),
> +	.per_child_plat_auto = sizeof(struct stm32_rifsc_child_plat),
> +	.flags = DM_FLAG_OS_PREPARE,
> +};


Anyway


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick



  reply	other threads:[~2025-04-22  8:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 13:14 [PATCH 00/13] Enable OF_UPSTREAM for STM32 and STi platforms Patrice Chotard
2025-04-01 13:14 ` [PATCH 01/13] ARM: dts: sti: convert stih410-b2260 board to OF_UPSTREAM Patrice Chotard
2025-04-22  7:59   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 02/13] ARM: dts: stm32: convert stm23h7 boards " Patrice Chotard
2025-04-22  8:00   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 03/13] ARM: dts: stm32: convert stm23f7 " Patrice Chotard
2025-04-22  8:06   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 04/13] ARM: dts: stm32: convert stm23f4 " Patrice Chotard
2025-04-22  8:07   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 05/13] ARM: dts: stm32: convert stm32mp13 board " Patrice Chotard
2025-04-22  8:08   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 06/13] ARM: dts: stm32: convert stm32mp15 " Patrice Chotard
2025-04-22  8:10   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 07/13] configs: stm32: introduce stm32mp15-odyssey_defconfig Patrice Chotard
2025-04-22  8:16   ` Patrick DELAUNAY
2025-04-22  9:06     ` Patrice CHOTARD
2025-04-01 13:14 ` [PATCH 08/13] stm32mp1: clk: Update index for DSI gate Patrice Chotard
2025-04-22  8:24   ` Patrick DELAUNAY
2025-04-22  9:42     ` Patrice CHOTARD
2025-04-01 13:14 ` [PATCH 09/13] ARM: stm32mp: add ETZPC system bus driver for STM32MP1 Patrice Chotard
2025-04-22  8:31   ` Patrick DELAUNAY
2025-04-22  9:33     ` Patrice CHOTARD
2025-04-01 13:14 ` [PATCH 10/13] ARM: dts: stm32: add ETZPC as a system bus for STM32MP1x boards Patrice Chotard
2025-04-22  8:32   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 11/13] stm32mp: fdt: remove ETZPC peripheral cleanup Patrice Chotard
2025-04-22  8:37   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 12/13] ARM: dts: stm32: convert stm32mp2 board to OF_UPSTREAM Patrice Chotard
2025-04-22  8:40   ` Patrick DELAUNAY
2025-04-01 13:14 ` [PATCH 13/13] ARM: stm32mp: add RIFSC system bus driver for STM32MP25 Patrice Chotard
2025-04-22  8:44   ` Patrick DELAUNAY [this message]
2025-04-22  8:51     ` Patrice CHOTARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d762c10f-e977-4972-88cd-a244502190bd@foss.st.com \
    --to=patrick.delaunay@foss.st.com \
    --cc=gatien.chevallier@foss.st.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.