Thread View: linux.kernel.netdev
7 messages
7 total messages
Started by Kyle Hendry via B4 Relay
Thu, 19 Nov 2026 17:57
[PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: Kyle Hendry via B4 Relay
Date: Thu, 19 Nov 2026 17:57
Date: Thu, 19 Nov 2026 17:57
118 lines
14166 bytes
14166 bytes
From: Kyle Hendry <khendry@reliablecontrols.com>
The rzn1 system controller has two resets that need to be cleared for the
mii converter to work. They are not directly associated with any clocks
so they need a reset controller to set them.
They are documented in the PWRCTRL_SWITCHCTRL (0x4000C188) register as:
Bit 3: RSTN_CLK25 - Active low Reset for Timestamp signal selection logic
Bit 4: RSTN_ETH - Active low Reset for RGMII/RMII Converter (50 MHz).
Add a reset controller and add resets for those bits.
Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
---
drivers/clk/renesas/r9a06g032-clocks.c | 64 ++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
index 3df3f2b2c6de..547e8d82f1cf 100644
--- a/drivers/clk/renesas/r9a06g032-clocks.c
+++ b/drivers/clk/renesas/r9a06g032-clocks.c
@@ -21,6 +21,7 @@
#include <linux/pm_clock.h>
#include <linux/pm_domain.h>
#include <linux/reboot.h>
+#include <linux/reset-controller.h>
#include <linux/slab.h>
#include <linux/soc/renesas/r9a06g032-sysctrl.h>
#include <linux/spinlock.h>
@@ -675,6 +676,11 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
RB(0xec, 16), RB(0xec, 17), RB(0xec, 18), RB(0xec, 19)),
};
+static const struct regbit r9a06g032_resets[] = {
+ RB(0x188, 3),
+ RB(0x188, 4),
+};
+
struct r9a06g032_priv {
struct clk_onecell_data data;
spinlock_t lock; /* protects concurrent access to gates */
@@ -1307,6 +1313,56 @@ static void __init r9a06g032_init_h2mode(struct r9a06g032_priv *clocks)
writel(usb, clocks->reg + R9A06G032_SYSCTRL_USB);
}
+
+#define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
+
+static int r9a06g032_reset_set(struct reset_controller_dev *rcdev,
+ const char *func, bool set, unsigned long id)
+{
+ struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ clk_rdesc_set(priv, r9a06g032_resets[id], set);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+ return 0;
+}
+
+static int r9a06g032_reset(struct reset_controller_dev *rcdev,
+ unsigned long id)
+{
+ r9a06g032_reset_set(rcdev, "reset", true, id);
+ udelay(5);
+ return r9a06g032_reset_set(rcdev, NULL, false, id);
+}
+
+static int r9a06g032_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
+{
+ return r9a06g032_reset_set(rcdev, "assert", false, id);
+}
+
+static int r9a06g032_reset_deassert(struct reset_controller_dev *rcdev,
+ unsigned long id)
+{
+ return r9a06g032_reset_set(rcdev, "deassert", true, id);
+}
+
+static int r9a06g032_reset_status(struct reset_controller_dev *rcdev,
+ unsigned long id)
+{
+ struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
+
+ return clk_rdesc_get(priv, r9a06g032_resets[id]);
+}
+
+static const struct reset_control_ops r9a06g032_reset_ops = {
+ .reset = r9a06g032_reset,
+ .assert = r9a06g032_reset_assert,
+ .deassert = r9a06g032_reset_deassert,
+ .status = r9a06g032_reset_status,
+};
+
static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -1404,6 +1460,14 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
if (error)
dev_err(dev, "Failed to populate children (%d)\n", error);
+ clocks->rcdev.ops = &r9a06g032_reset_ops;
+ clocks->rcdev.of_node = np;
+ clocks->rcdev.of_reset_n_cells = 1;
+ clocks->rcdev.nr_resets = ARRAY_SIZE(r9a06g032_resets);
+ error = devm_reset_controller_register(dev, &clocks->rcdev);
+ if (error)
+ return error;
+
return 0;
}
--
2.53.0
Re: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: Wolfram Sang
Date: Fri, 20 Nov 2026 09:30
Date: Fri, 20 Nov 2026 09:30
84 lines
12273 bytes
12273 bytes
--wI2vg4tZYniA4rpi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Nov 19, 2026 at 09:57:44AM -0800, Kyle Hendry via B4 Relay wrote:
> From: Kyle Hendry <khendry@reliablecontrols.com>
>=20
> The rzn1 system controller has two resets that need to be cleared for the
> mii converter to work. They are not directly associated with any clocks
> so they need a reset controller to set them.
>=20
> They are documented in the PWRCTRL_SWITCHCTRL (0x4000C188) register as:
>=20
> Bit 3: RSTN_CLK25 - Active low Reset for Timestamp signal selection logic
> Bit 4: RSTN_ETH - Active low Reset for RGMII/RMII Converter (50 MHz).
>=20
> Add a reset controller and add resets for those bits.
>=20
> Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
General approach looks good to me, just some minor comments...
> +static const struct regbit r9a06g032_resets[] =3D {
> + RB(0x188, 3),
> + RB(0x188, 4),
> +};
Please add the DT name of the reset as a comment after each line.
+ RB(0x188, 3), /* RST_TS */
or similar.
> +static int r9a06g032_reset_set(struct reset_controller_dev *rcdev,
> + const char *func, bool set, unsigned long id)
> +{
*func was likely debug help and is unused now and can go.
> + struct r9a06g032_priv *priv =3D rcdev_to_priv(rcdev);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&priv->lock, flags);
> + clk_rdesc_set(priv, r9a06g032_resets[id], set);
> + spin_unlock_irqrestore(&priv->lock, flags);
> +
> + return 0;
> +}
> +
> +static int r9a06g032_reset(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + r9a06g032_reset_set(rcdev, "reset", true, id);
> + udelay(5);
For future reference, please add a comment pointing to chapter in the
docs where it is saying 5us is needed.
Rest looks good!
--wI2vg4tZYniA4rpi
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmsAE1MACgkQFA3kzBSg
KbY8qBAAqsju+kzP2C7aoqbzO/2VbVOoegIp6nxG4ePZzZi7fWZwQQ2my2PZX8sJ
Fv6oyXmr2Jh0iG+CBCfQTRRa34ya9bPAQv+wUspgT/B0TPGRxhuQ8jP1LUzfBidR
ypH4KLVRvDAJMsKK9rdD2i4yI/3xqNpI0km+15IkqriDMXxU3J3fyWGTxCETKB8v
KGT2dVv/GDC57K5DY5DCP8rczMcIBhFQgV07CJmrDo2w5Ze8dMABgqm3xe8SzDYU
yVRl0Ccv2fLJpPmccasQzgg1aJi8KIbDAIVSTvMRVoZhiLRSOzUYQfuYJRpkMM6n
OyYKl0mDwnJyeIJs8qGjEXl0w2osrHSKMdi7ItK/ndH3l/s2h3mK7KuTPWwg7aJW
GuFgkcF1sbAS5EZN+Bv1nKPXFEEpgSWz1Kvwb3Yshn0PaGWP59NNq68u1oPzYrXc
00HOP2cPycotBuSjW5YJm3F72vbRDV3uOX/+RcAyNj59elduY2oNFIYlYPDXDS+E
8Zkcn9m5vGhJXyy8Qg2ysoc287fsThgO4EVyB4lYn4JmRW/1X4L4b7Zx9Lz5rK7M
f2mrPxtHz1DpLc5bcIPfwlDr2zEgyeJKpNRmRwj4Q+DQRGFXL9pGSVCrvb9/e/9j
sB6P90kZ2406EN8+l5Tf6AKtRh3gynP4vZpZ3ilJUpNcdsUFevg=
=CdDX
-----END PGP SIGNATURE-----
--wI2vg4tZYniA4rpi--
Re: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: Philipp Zabel
Date: Fri, 20 Nov 2026 10:00
Date: Fri, 20 Nov 2026 10:00
157 lines
14988 bytes
14988 bytes
On Do, 2026-11-19 at 09:57 -0800, Kyle Hendry via B4 Relay wrote:
> From: Kyle Hendry <khendry@reliablecontrols.com>
>
> The rzn1 system controller has two resets that need to be cleared for the
> mii converter to work. They are not directly associated with any clocks
> so they need a reset controller to set them.
>
> They are documented in the PWRCTRL_SWITCHCTRL (0x4000C188) register as:
>
> Bit 3: RSTN_CLK25 - Active low Reset for Timestamp signal selection logic
> Bit 4: RSTN_ETH - Active low Reset for RGMII/RMII Converter (50 MHz).
>
> Add a reset controller and add resets for those bits.
>
> Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
> ---
> drivers/clk/renesas/r9a06g032-clocks.c | 64 ++++++++++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
> diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
> index 3df3f2b2c6de..547e8d82f1cf 100644
> --- a/drivers/clk/renesas/r9a06g032-clocks.c
> +++ b/drivers/clk/renesas/r9a06g032-clocks.c
> @@ -21,6 +21,7 @@
> #include <linux/pm_clock.h>
> #include <linux/pm_domain.h>
> #include <linux/reboot.h>
> +#include <linux/reset-controller.h>
> #include <linux/slab.h>
> #include <linux/soc/renesas/r9a06g032-sysctrl.h>
> #include <linux/spinlock.h>
> @@ -675,6 +676,11 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
> RB(0xec, 16), RB(0xec, 17), RB(0xec, 18), RB(0xec, 19)),
> };
>
> +static const struct regbit r9a06g032_resets[] = {
> + RB(0x188, 3),
> + RB(0x188, 4),
I suggest to use designated initializers:
[R9A06G032_RST_TS] = RB(0x188, 3),
[R9A06G032_RST_MIIC] = RB(0x188, 4),
to document the association and make sure there are no off-by-one
errors.
> +};
> +
> struct r9a06g032_priv {
> struct clk_onecell_data data;
> spinlock_t lock; /* protects concurrent access to gates */
> @@ -1307,6 +1313,56 @@ static void __init r9a06g032_init_h2mode(struct r9a06g032_priv *clocks)
> writel(usb, clocks->reg + R9A06G032_SYSCTRL_USB);
> }
>
> +
> +#define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
I'd use a static inline function for this.
> +
> +static int r9a06g032_reset_set(struct reset_controller_dev *rcdev,
> + const char *func, bool set, unsigned long id)
> +{
> + struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&priv->lock, flags);
> + clk_rdesc_set(priv, r9a06g032_resets[id], set);
> + spin_unlock_irqrestore(&priv->lock, flags);
> +
> + return 0;
> +}
> +
> +static int r9a06g032_reset(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + r9a06g032_reset_set(rcdev, "reset", true, id);
> + udelay(5);
> + return r9a06g032_reset_set(rcdev, NULL, false, id);
> +}
Please don't implement the reset op unless really needed for
compatibility with actual, self-clearing reset controllers.
If it is needed, please explain why. If so, is this delay enough for
both resets? Is it enough for any other resets this reset controller
driver may support in the future?
> +
> +static int r9a06g032_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
> +{
> + return r9a06g032_reset_set(rcdev, "assert", false, id);
> +}
> +
> +static int r9a06g032_reset_deassert(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + return r9a06g032_reset_set(rcdev, "deassert", true, id);
> +}
> +
> +static int r9a06g032_reset_status(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
> +
> + return clk_rdesc_get(priv, r9a06g032_resets[id]);
> +}
> +
> +static const struct reset_control_ops r9a06g032_reset_ops = {
> + .reset = r9a06g032_reset,
> + .assert = r9a06g032_reset_assert,
> + .deassert = r9a06g032_reset_deassert,
> + .status = r9a06g032_reset_status,
> +};
> +
> static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -1404,6 +1460,14 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
> if (error)
> dev_err(dev, "Failed to populate children (%d)\n", error);
>
> + clocks->rcdev.ops = &r9a06g032_reset_ops;
> + clocks->rcdev.of_node = np;
> + clocks->rcdev.of_reset_n_cells = 1;
Don't set of_reset_n_cells, as of_xlate isn't set either.
fwnode_reset_n_cells will be set to 1 by default in
reset_controller_register().
> + clocks->rcdev.nr_resets = ARRAY_SIZE(r9a06g032_resets);
> + error = devm_reset_controller_register(dev, &clocks->rcdev);
^
Superfluous whitespace.
> + if (error)
> + return error;
> +
> return 0;
Could be simplified to just:
return devm_reset_controller_register(dev, &clocks->rcdev);
regards
Philipp
Re: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: Wolfram Sang
Date: Fri, 20 Nov 2026 11:47
Date: Fri, 20 Nov 2026 11:47
7 lines
9348 bytes
9348 bytes
> struct r9a06g032_priv {
> struct clk_onecell_data data;
> spinlock_t lock; /* protects concurrent access to gates */
Build error :( No addition of 'rcdev' to priv data!
Re: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: kernel test robot
Date: Fri, 20 Nov 2026 23:25
Date: Fri, 20 Nov 2026 23:25
169 lines
20668 bytes
20668 bytes
Hi Kyle,
kernel test robot noticed the following build errors:
[auto build test ERROR on 662377fd1bb1d7cf4e97d312255fed868f56342d]
url: https://github.com/intel-lab-lkp/linux/commits/Kyle-Hendry-via-B4-Relay/dt-bindings-clock-r9a06g032-sysctrl-Document-reset-cells/20261119-095743
base: 662377fd1bb1d7cf4e97d312255fed868f56342d
patch link: https://lore.kernel.org/r/20261119-rzn1-miic-resets-v1-2-feee2bb28bb4%40reliablecontrols.com
patch subject: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
config: arm-shmobile_defconfig (https://download.01.org/0day-ci/archive/20261121/202611210721.sFAijXHV-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261121/202611210721.sFAijXHV-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611210721.sFAijXHV-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/container_of.h:5,
from include/linux/kernel.h:22,
from include/linux/clk.h:13,
from drivers/clk/renesas/r9a06g032-clocks.c:10:
drivers/clk/renesas/r9a06g032-clocks.c: In function 'r9a06g032_reset_set':
>> include/linux/container_of.h:8:47: error: 'struct r9a06g032_priv' has no member named 'rcdev'
8 | #define typeof_member(T, m) typeof(((T*)0)->m)
| ^~
include/linux/build_bug.h:80:56: note: in definition of macro '__static_assert'
80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~
include/linux/container_of.h:20:43: note: in expansion of macro 'typeof_member'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1317:33: note: in expansion of macro 'container_of'
1317 | #define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
| ^~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1322:39: note: in expansion of macro 'rcdev_to_priv'
1322 | struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
| ^~~~~~~~~~~~~
>> include/linux/compiler_types.h:610:27: error: expression in static assertion is not an integer
610 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:80:56: note: in definition of macro '__static_assert'
80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1317:33: note: in expansion of macro 'container_of'
1317 | #define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
| ^~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1322:39: note: in expansion of macro 'rcdev_to_priv'
1322 | struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
| ^~~~~~~~~~~~~
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:5,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:391,
from include/linux/err.h:5,
from include/linux/clk.h:12:
>> include/linux/stddef.h:16:33: error: 'struct r9a06g032_priv' has no member named 'rcdev'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/linux/container_of.h:23:34: note: in expansion of macro 'offsetof'
23 | (type *)((void *)(ptr) - offsetof(type, member)); })
| ^~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1317:33: note: in expansion of macro 'container_of'
1317 | #define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
| ^~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1322:39: note: in expansion of macro 'rcdev_to_priv'
1322 | struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
| ^~~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c: In function 'r9a06g032_reset_status':
>> include/linux/container_of.h:8:47: error: 'struct r9a06g032_priv' has no member named 'rcdev'
8 | #define typeof_member(T, m) typeof(((T*)0)->m)
| ^~
include/linux/build_bug.h:80:56: note: in definition of macro '__static_assert'
80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~
include/linux/container_of.h:20:43: note: in expansion of macro 'typeof_member'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1317:33: note: in expansion of macro 'container_of'
1317 | #define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
| ^~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1354:39: note: in expansion of macro 'rcdev_to_priv'
1354 | struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
| ^~~~~~~~~~~~~
>> include/linux/compiler_types.h:610:27: error: expression in static assertion is not an integer
610 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:80:56: note: in definition of macro '__static_assert'
80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
| ^~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1317:33: note: in expansion of macro 'container_of'
1317 | #define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
| ^~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1354:39: note: in expansion of macro 'rcdev_to_priv'
1354 | struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
| ^~~~~~~~~~~~~
>> include/linux/stddef.h:16:33: error: 'struct r9a06g032_priv' has no member named 'rcdev'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/linux/container_of.h:23:34: note: in expansion of macro 'offsetof'
23 | (type *)((void *)(ptr) - offsetof(type, member)); })
| ^~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1317:33: note: in expansion of macro 'container_of'
1317 | #define rcdev_to_priv(x) container_of(x, struct r9a06g032_priv, rcdev)
| ^~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c:1354:39: note: in expansion of macro 'rcdev_to_priv'
1354 | struct r9a06g032_priv *priv = rcdev_to_priv(rcdev);
| ^~~~~~~~~~~~~
drivers/clk/renesas/r9a06g032-clocks.c: In function 'r9a06g032_clocks_probe':
>> drivers/clk/renesas/r9a06g032-clocks.c:1463:15: error: 'struct r9a06g032_priv' has no member named 'rcdev'
1463 | clocks->rcdev.ops = &r9a06g032_reset_ops;
| ^~
drivers/clk/renesas/r9a06g032-clocks.c:1464:15: error: 'struct r9a06g032_priv' has no member named 'rcdev'
1464 | clocks->rcdev.of_node = np;
| ^~
drivers/clk/renesas/r9a06g032-clocks.c:1465:15: error: 'struct r9a06g032_priv' has no member named 'rcdev'
1465 | clocks->rcdev.of_reset_n_cells = 1;
| ^~
drivers/clk/renesas/r9a06g032-clocks.c:1466:15: error: 'struct r9a06g032_priv' has no member named 'rcdev'
1466 | clocks->rcdev.nr_resets = ARRAY_SIZE(r9a06g032_resets);
| ^~
drivers/clk/renesas/r9a06g032-clocks.c:1467:61: error: 'struct r9a06g032_priv' has no member named 'rcdev'
1467 | error = devm_reset_controller_register(dev, &clocks->rcdev);
| ^~
vim +8 include/linux/container_of.h
d2a8ebbf8192b84 Andy Shevchenko 2021-11-08 4
d2a8ebbf8192b84 Andy Shevchenko 2021-11-08 @5 #include <linux/build_bug.h>
2b8e35337605ca5 Andy Shevchenko 2023-01-30 6 #include <linux/stddef.h>
d2a8ebbf8192b84 Andy Shevchenko 2021-11-08 7
d2a8ebbf8192b84 Andy Shevchenko 2021-11-08 @8 #define typeof_member(T, m) typeof(((T*)0)->m)
d2a8ebbf8192b84 Andy Shevchenko 2021-11-08 9
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: Ralph Siemsen
Date: Sat, 21 Nov 2026 13:17
Date: Sat, 21 Nov 2026 13:17
15 lines
12289 bytes
12289 bytes
On Fri, Nov 20, 2026 at 10:30:59AM +0100, Wolfram Sang wrote:
>> +static int r9a06g032_reset(struct reset_controller_dev *rcdev,
>> + unsigned long id)
>> +{
>> + r9a06g032_reset_set(rcdev, "reset", true, id);
>> + udelay(5);
>
>For future reference, please add a comment pointing to chapter in the
>docs where it is saying 5us is needed.
The reset duration could vary for each reset ID, since they refer to
different hardware. There's probably no "optimum" value here.
Ralph
Re: [PATCH 2/6] clk: renesas: r9a06g032: Add reset controller
Author: Wolfram Sang
Date: Sat, 21 Nov 2026 21:34
Date: Sat, 21 Nov 2026 21:34
36 lines
10921 bytes
10921 bytes
--pTXDnQ8DG42W+K2e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > The reset duration could vary for each reset ID, since they refer to > different hardware. There's probably no "optimum" value here. Figures 7.3. and 7.4. say "5us delay is recommended" when changing XXX.RSTN bits, at least for the NoC parts. Yes, we can agree to trust the driver authors to get it right, but we could also decide to make it hard to get wrong. Bigger delays can still be open-coded if needed. --pTXDnQ8DG42W+K2e Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmsCDlwACgkQFA3kzBSg KbbM8hAArBvvQ3J6Gl2ZjLmVjeIL3UFqSTbiCDK7dNBn73kMdODTOv6XgDwwQCJ0 +RQVzZUoF483LdiGroT52MAKjlo1oWzk3gdMmtMt7FtGeZyFbC+E8jykCJNKM8tW TlPcVmrqpF94fiaGWpaa35ehTON2ezntNWShpvM/N5a467PfztHUKOEMyx7ERO/D q8Zn//i6qbQ/bci+hmagIMmDXFBiHV6akmDzttSbf4wZdH2u1yroItrahB3wTblE PL6B5BA4GjBL64FLKr8XW4NVDhxQmAVDoZdMlhUWjPS5vhqCPfS6NNuTLQUzUfWy E/BWwxn1CWMTxV+HhO4AXFVFrys9T42Z08ICAFOHjOleoLZplVkfMN+zIh3h7wBR o7iZb25vxWL2hu8UgGMc2sNo8OwT0PATXlCenrBuR/uqhSIsfhRCC/nF02/ZI47v ahSvFkWSufuVhwIhbUmk8U5Exgzj+Mg9c4TjhrRTK6MCDa4fpdCvNnpl1U72mJHR Xq3jgLhM+4bodCBDJQHXPVNZwkMbyKlTf+hPpav6okETuNgQ86XE+CNYNywhmnzJ Mlo12B/mYG5JwpKPGcR1smZkcwNsrp/A+I1asgC7fhSDs7eD5HXNlLBN92yrCTc4 3LnPqGr6KuIzZPaT+I3FXAJ7Zoy5D41UpNpmpYtcFmsR2WAy6ys= =XIqi -----END PGP SIGNATURE----- --pTXDnQ8DG42W+K2e--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads