Message ID | 20231206140029.492906-1-gabriel.fernandez@foss.st.com (mailing list archive) |
---|---|
Headers | show |
Series | Introduce STM32MP257 clock driver | expand |
Hi Gabriel, On Mi, 2023-12-06 at 15:00 +0100, gabriel.fernandez@foss.st.com wrote: > From: Gabriel Fernandez <gabriel.fernandez@foss.st.com> > > This driver is intended for the STM32MP25 clock family and utilizes > the stm32-core API, similar to the stm32mp13 clock driver. > > Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> > --- [...] > diff --git a/drivers/clk/stm32/stm32mp25_rcc.h b/drivers/clk/stm32/stm32mp25_rcc.h > new file mode 100644 > index 000000000000..b1aca78a0b22 > --- /dev/null > +++ b/drivers/clk/stm32/stm32mp25_rcc.h > @@ -0,0 +1,4977 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Copyright (C) STMicroelectronics 2023 - All Rights Reserved > + * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics. > + */ > + > +#ifndef STM32MP25_RCC_H > +#define STM32MP25_RCC_H > + > +#define RCC_SECCFGR0 0x0 [...] What is the purpose of all the unused #defines? I initially wanted to point out that the _SHIFT #defines are redundant because the same information is already contained in the corresponding _MASK #defines, but it seems like neither of the register field definitions are used anywhere. It appears only some of the *CFGR register offset #defines are actually used. regards Philipp
Hi Philipp, thank's for reviewing. On 12/6/23 15:20, Philipp Zabel wrote: > Hi Gabriel, > > On Mi, 2023-12-06 at 15:00 +0100, gabriel.fernandez@foss.st.com wrote: >> From: Gabriel Fernandez <gabriel.fernandez@foss.st.com> >> >> This driver is intended for the STM32MP25 clock family and utilizes >> the stm32-core API, similar to the stm32mp13 clock driver. >> >> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> >> --- > [...] >> diff --git a/drivers/clk/stm32/stm32mp25_rcc.h b/drivers/clk/stm32/stm32mp25_rcc.h >> new file mode 100644 >> index 000000000000..b1aca78a0b22 >> --- /dev/null >> +++ b/drivers/clk/stm32/stm32mp25_rcc.h >> @@ -0,0 +1,4977 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +/* >> + * Copyright (C) STMicroelectronics 2023 - All Rights Reserved >> + * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics. >> + */ >> + >> +#ifndef STM32MP25_RCC_H >> +#define STM32MP25_RCC_H >> + >> +#define RCC_SECCFGR0 0x0 > [...] > > What is the purpose of all the unused #defines? > > I initially wanted to point out that the _SHIFT #defines are redundant > because the same information is already contained in the corresponding > _MASK #defines, but it seems like neither of the register field > definitions are used anywhere. It appears only some of the *CFGR > register offset #defines are actually used. It's a generated file that is also used for other components, but it's not a big deal to remove the unused defines in the Kernel. I'm waiting for other remarks before sending a V6 Best regards Gabriel > regards > Philipp
From: Gabriel Fernandez <gabriel.fernandez@foss.st.com> This patch-set introduces clock driver for STM32MP257 based on Arm Cortex-35. It creates also a menuconfig for all STM32MP clock drivers. The STM32MP1 and STM32MP13 are now in same stm32 directory v5: - Fix sparse warnings: was not declared. Should it be static? drivers/clk/stm32/clk-stm32mp13.c:1516:29: symbol 'stm32mp13_reset_data' drivers/clk/stm32/clk-stm32mp1.c:2148:29: symbol 'stm32mp1_reset_data' drivers/clk/stm32/clk-stm32mp25.c:1003:5: symbol 'stm32mp25_cpt_gate' drivers/clk/stm32/clk-stm32mp25.c:1005:29: symbol 'stm32mp25_clock_data' drivers/clk/stm32/clk-stm32mp25.c:1011:29: symbol 'stm32mp25_reset_data' v4: - use GPL-2.0-only OR BSD-2-Clause for clock and reset binding files - use quotes ' for #clock-cells and #reset-cells in YAML documentation - reset binding start now to 0 instead 1 - improve management of reset lines that are not managed v3: - from Rob Herring change clock item description in YAML documentation v2: - rework reset binding (use ID witch start from 0) - rework reset driver to manage STM32MP13 / STM32MP15 / STM32MP25 - rework YAML documentation Gabriel Fernandez (5): clk: stm32mp1: move stm32mp1 clock driver into stm32 directory clk: stm32mp1: use stm32mp13 reset driver dt-bindings: stm32: add clocks and reset binding for stm32mp25 platform clk: stm32: introduce clocks for STM32MP257 platform arm64: dts: st: add rcc support in stm32mp251 .../bindings/clock/st,stm32mp25-rcc.yaml | 76 + arch/arm64/boot/dts/st/stm32mp251.dtsi | 59 +- drivers/clk/Kconfig | 11 +- drivers/clk/Makefile | 1 - drivers/clk/stm32/Kconfig | 36 + drivers/clk/stm32/Makefile | 2 + drivers/clk/stm32/clk-stm32-core.c | 5 +- drivers/clk/stm32/clk-stm32-core.h | 5 +- drivers/clk/{ => stm32}/clk-stm32mp1.c | 127 +- drivers/clk/stm32/clk-stm32mp13.c | 9 +- drivers/clk/stm32/clk-stm32mp25.c | 1125 ++++ drivers/clk/stm32/reset-stm32.c | 73 +- drivers/clk/stm32/reset-stm32.h | 15 +- drivers/clk/stm32/stm32mp25_rcc.h | 4977 +++++++++++++++++ include/dt-bindings/clock/st,stm32mp25-rcc.h | 492 ++ include/dt-bindings/reset/st,stm32mp25-rcc.h | 167 + 16 files changed, 6999 insertions(+), 181 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml create mode 100644 drivers/clk/stm32/Kconfig rename drivers/clk/{ => stm32}/clk-stm32mp1.c (95%) create mode 100644 drivers/clk/stm32/clk-stm32mp25.c create mode 100644 drivers/clk/stm32/stm32mp25_rcc.h create mode 100644 include/dt-bindings/clock/st,stm32mp25-rcc.h create mode 100644 include/dt-bindings/reset/st,stm32mp25-rcc.h