Add NPCM8XX clock driver
Subsystems (4)
Tomer Maimon
maintainerPATCH v3 2/3 reset: npcm: register npcm8xx clock auxiliary bus device
In reply to Tomer MaimonAdd NPCM8xx clock controller auxiliary bus device registration.
The NPCM8xx clock controller is registered as an aux device because the reset and the clock controller share the same register region.
--- drivers/reset/Kconfig | 1 + drivers/reset/reset-npcm.c | 74 ++++++++++++++++++++++++++++- include/soc/nuvoton/clock-npcm8xx.h | 16 +++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 include/soc/nuvoton/clock-npcm8xx.h
drivers/reset/Kconfig +1 -0
@@ -139,6 +139,7 @@ config RESET_MESON_AUDIO_ARB config RESET_NPCM bool "NPCM BMC Reset Driver" if COMPILE_TEST default ARCH_NPCM + select AUXILIARY_BUS help This enables the reset controller driver for Nuvoton NPCM BMC SoCs.
drivers/reset/reset-npcm.c +73 -1
115 lines not on this page · raw message
include/soc/nuvoton/clock-npcm8xx.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __SOC_NPCM8XX_CLOCK_H +#define __SOC_NPCM8XX_CLOCK_H + +#include <linux/auxiliary_bus.h> +#include <linux/container_of.h> + +struct npcm_clock_adev { +void __iomem *base; +struct auxiliary_device adev; +}; + +#define to_npcm_clock_adev (_adev) \ + container_of((_adev), struct npcm_clock_adev, adev) + +#endif
--
2.34.1
Tomer Maimon
maintainerv3 cover Add NPCM8XX clock driver
This patchset adds clock support for the Nuvoton Arbel NPCM8XX Board Management controller (BMC) SoC family.
The NPCM8xx clock controller is created using the auxiliary device framework and set up in the npcm reset driver since the NPCM8xx clock is using the same register region.
This patchset based on NPCM8xx clock controller V27
https://patchwork.kernel.org/project/linux-clk/cover/[email protected]/
This patchset was tested on the Arbel NPCM8XX evaluation board.
Changes since version 2:
- Remove trailing whitespaces
Changes since version 1:
- Align with NPCM8xx clock controller V27.
- Remove patches that are not in the clock patchset.
Tomer Maimon (3):
dt-bindings: reset: npcm: add clock properties
reset: npcm: register npcm8xx clock auxiliary bus device
clk: npcm8xx: add clock controller
.../bindings/reset/nuvoton,npcm750-reset.yaml | 18 + drivers/clk/Kconfig | 8 + drivers/clk/Makefile | 1 + drivers/clk/clk-npcm8xx.c | 429 ++++++++++++++++++ drivers/reset/Kconfig | 1 + drivers/reset/reset-npcm.c | 74 ++- include/soc/nuvoton/clock-npcm8xx.h | 16 + 7 files changed, 546 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/clk-npcm8xx.c create mode 100644 include/soc/nuvoton/clock-npcm8xx.h
--
2.34.1
Tomer Maimon
maintainerPATCH v3 1/3 dt-bindings: reset: npcm: add clock properties
This commit adds a 25MHz reference clock and clock-cell properties to the NPCM reset document. The addition is necessitated by the integration of the NPCM8xx clock auxiliary bus device into the NPCM reset driver.
The inclusion of the NPCM8xx clock properties in the reset document is crucial as the reset block also serves as a clock provider for the NPCM8xx clock. This enhancement is intended to facilitate the use of the NPCM8xx clock driver.
--- .../bindings/reset/nuvoton,npcm750-reset.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
Documentation/devicetree/bindings/reset/nuvoton,npcm750-reset.yaml +18 -0
@@ -21,6 +21,13 @@ properties: '#reset-cells': const: 2 + '#clock-cells': + const: 1 + + clocks: + items: + - description: specify external 25MHz reference clock. + nuvoton,sysgcr: $ref: /schemas/types.yaml#/definitions/phandle description: a phandle to access GCR registers.
@@ -39,6 +46,17 @@ required: - '#reset-cells' - nuvoton,sysgcr +if: + properties: + compatible: + contains: + enum: + - nuvoton,npcm845-reset +then: + required: + - '#clock-cells' + - clocks + additionalProperties: false examples:
--
2.34.1
Tomer Maimon
maintainerPATCH v3 3/3 clk: npcm8xx: add clock controller
In reply to Tomer MaimonAdd auxiliary driver to support Nuvoton Arbel BMC NPCM8XX contains an integrated clock controller which generates and supplies clocks to all modules within the BMC.
The NPCM8xx clock controller is created using the auxiliary device framework and set up in the npcm reset driver since the NPCM8xx clock is using the same register region.
--- drivers/clk/Kconfig | 8 + drivers/clk/Makefile | 1 + drivers/clk/clk-npcm8xx.c | 429 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 438 insertions(+) create mode 100644 drivers/clk/clk-npcm8xx.c
drivers/clk/Kconfig +8 -0
@@ -325,6 +325,14 @@ config COMMON_CLK_LOCHNAGAR This driver supports the clocking features of the Cirrus Logic Lochnagar audio development board. +config COMMON_CLK_NPCM8XX + tristate "Clock driver for the NPCM8XX SoC Family" + depends on ARCH_NPCM || COMPILE_TEST + help + This driver supports the clocks on the Nuvoton BMC NPCM8XX SoC Family, + all the clocks are initialized by the bootloader, so this driver + allows only reading of current settings directly from the hardware. + config COMMON_CLK_LOONGSON2 bool "Clock driver for Loongson-2 SoC" depends on LOONGARCH || COMPILE_TEST
drivers/clk/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_ARCH_MILBEAUT_M10V) += clk-milbeaut.o obj-$(CONFIG_ARCH_MOXART) += clk-moxart.o obj-$(CONFIG_ARCH_NOMADIK) += clk-nomadik.o obj-$(CONFIG_ARCH_NPCM7XX) += clk-npcm7xx.o +obj-$(CONFIG_COMMON_CLK_NPCM8XX) += clk-npcm8xx.o obj-$(CONFIG_ARCH_NSPIRE) += clk-nspire.o obj-$(CONFIG_COMMON_CLK_PALMAS) += clk-palmas.o obj-$(CONFIG_CLK_LS1028A_PLLDIG) += clk-plldig.o
drivers/clk/clk-npcm8xx.c new file +429 -0
429 lines not on this page · raw message
--
2.34.1
Andrew Jeffery
maintainerRe: [linux dev-6.6 v3 3/3] clk: npcm8xx: add clock controller
Quoted 10 lines · Tomer Maimon
Add auxiliary driver to support Nuvoton Arbel BMC NPCM8XX contains an integrated clock controller which generates and supplies clocks to all modules within the BMC.
The NPCM8xx clock controller is created using the auxiliary device framework and set up in the npcm reset driver since the NPCM8xx clock is using the same register region.
Signed-off-by Tomer Maimon <[email protected]>Tested-by Benjamin Fair <[email protected]>
So checkpatch still warns on this one, though I think whitespace is less of a problem.
For what it's worth, here's the output I get:
Executing: ./scripts/checkpatch.pl --strict -g HEAD
WARNING: please write a help paragraph that fully describes the config symbol #33: FILE: drivers/clk/Kconfig:328:
+config COMMON_CLK_NPCM8XX
+ tristate "Clock driver for the NPCM8XX SoC Family" + depends on ARCH_NPCM || COMPILE_TEST + help + This driver supports the clocks on the Nuvoton BMC NPCM8XX SoC Family, + all the clocks are initialized by the bootloader, so this driver + allows only reading of current settings directly from the hardware.
+
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #57:
new file mode 100644
WARNING: line length of 112 exceeds 100 columns #252: FILE: drivers/clk/clk-npcm8xx.c:191:
+ { NPCM8XX_CLKDIV1, 26, 2, "ahb", &hw_pre_clk, CLK_DIVIDER_READ_ONLY, CLK_IS_CRITICAL, NPCM8XX_CLK_AHB },
WARNING: line length of 137 exceeds 100 columns #257: FILE: drivers/clk/clk-npcm8xx.c:196:
+ { NPCM8XX_CLKDIV1, 28, 3, "adc", &npcm8xx_pre_divs[0].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_ADC },
WARNING: line length of 107 exceeds 100 columns #259: FILE: drivers/clk/clk-npcm8xx.c:198:
+ { NPCM8XX_CLKDIV1, 11, 5, "mmc", &npcm8xx_muxes[2].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_MMC },
WARNING: line length of 106 exceeds 100 columns #261: FILE: drivers/clk/clk-npcm8xx.c:200:
+ { NPCM8XX_CLKDIV1, 2, 4, "pci", &npcm8xx_muxes[7].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_PCI },
WARNING: line length of 139 exceeds 100 columns #263: FILE: drivers/clk/clk-npcm8xx.c:202:
+ { NPCM8XX_CLKDIV2, 30, 2, "apb4", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_APB4 },
WARNING: line length of 139 exceeds 100 columns #264: FILE: drivers/clk/clk-npcm8xx.c:203:
+ { NPCM8XX_CLKDIV2, 28, 2, "apb3", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_APB3 },
WARNING: line length of 139 exceeds 100 columns #265: FILE: drivers/clk/clk-npcm8xx.c:204:
+ { NPCM8XX_CLKDIV2, 26, 2, "apb2", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_APB2 },
WARNING: line length of 139 exceeds 100 columns #266: FILE: drivers/clk/clk-npcm8xx.c:205:
+ { NPCM8XX_CLKDIV2, 24, 2, "apb1", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_APB1 },
WARNING: line length of 139 exceeds 100 columns #267: FILE: drivers/clk/clk-npcm8xx.c:206:
+ { NPCM8XX_CLKDIV2, 22, 2, "apb5", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_APB5 },
WARNING: line length of 113 exceeds 100 columns #268: FILE: drivers/clk/clk-npcm8xx.c:207:
+ { NPCM8XX_CLKDIV2, 16, 5, "clkout", &npcm8xx_muxes[8].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_CLKOUT },
WARNING: line length of 107 exceeds 100 columns #269: FILE: drivers/clk/clk-npcm8xx.c:208:
+ { NPCM8XX_CLKDIV2, 13, 3, "gfx", &npcm8xx_muxes[7].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_GFX },
WARNING: line length of 112 exceeds 100 columns #270: FILE: drivers/clk/clk-npcm8xx.c:209:
+ { NPCM8XX_CLKDIV2, 8, 5, "usb_bridge", &npcm8xx_muxes[4].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_SU },
WARNING: line length of 112 exceeds 100 columns #271: FILE: drivers/clk/clk-npcm8xx.c:210:
+ { NPCM8XX_CLKDIV2, 4, 4, "usb_host", &npcm8xx_muxes[4].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_SU48 },
WARNING: line length of 108 exceeds 100 columns #272: FILE: drivers/clk/clk-npcm8xx.c:211:
+ { NPCM8XX_CLKDIV2, 0, 4, "sdhc", &npcm8xx_muxes[2].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_SDHC },
WARNING: line length of 112 exceeds 100 columns #274: FILE: drivers/clk/clk-npcm8xx.c:213:
+ { NPCM8XX_CLKDIV3, 16, 8, "spi1", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_SPI1 },
WARNING: line length of 111 exceeds 100 columns #275: FILE: drivers/clk/clk-npcm8xx.c:214:
+ { NPCM8XX_CLKDIV3, 11, 5, "uart2", &npcm8xx_muxes[3].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_UART2 },
WARNING: line length of 111 exceeds 100 columns #276: FILE: drivers/clk/clk-npcm8xx.c:215:
+ { NPCM8XX_CLKDIV3, 6, 5, "spi0", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_SPI0 },
WARNING: line length of 111 exceeds 100 columns #277: FILE: drivers/clk/clk-npcm8xx.c:216:
+ { NPCM8XX_CLKDIV3, 1, 5, "spix", &npcm8xx_pre_divs[1].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_SPIX },
WARNING: line length of 106 exceeds 100 columns #279: FILE: drivers/clk/clk-npcm8xx.c:218:
+ { NPCM8XX_CLKDIV4, 28, 4, "rg", &npcm8xx_muxes[11].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_RG },
WARNING: line length of 108 exceeds 100 columns #280: FILE: drivers/clk/clk-npcm8xx.c:219:
+ { NPCM8XX_CLKDIV4, 12, 4, "rcp", &npcm8xx_muxes[12].hw, CLK_DIVIDER_READ_ONLY, 0, NPCM8XX_CLK_RCP },
WARNING: line length of 133 exceeds 100 columns #282: FILE: drivers/clk/clk-npcm8xx.c:221:
+ { NPCM8XX_THRTL_CNT, 0, 2, "th", &npcm8xx_muxes[0].hw, CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_POWER_OF_TWO, 0, NPCM8XX_CLK_TH },
WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") #490: FILE: drivers/clk/clk-npcm8xx.c:429:
+MODULE_LICENSE("GPL v2");
total: 0 errors, 24 warnings, 0 checks, 450 lines checked
Andrew
Tomer Maimon
maintainerRe: [linux dev-6.6 v3 3/3] clk: npcm8xx: add clock controller
Hi Andrew,
Thanks for your comments,
Send V4 with fixed exceed line length.
Tomer
Quoted 125 lines · Andrew Jeffery
Quoted 10 lines · Tomer Maimon
Add auxiliary driver to support Nuvoton Arbel BMC NPCM8XX contains an integrated clock controller which generates and supplies clocks to all modules within the BMC.
The NPCM8xx clock controller is created using the auxiliary device framework and set up in the npcm reset driver since the NPCM8xx clock is using the same register region.
Signed-off-by Tomer Maimon <[email protected]>Tested-by Benjamin Fair <[email protected]>So checkpatch still warns on this one, though I think whitespace is less of a problem.
For what it's worth, here's the output I get:
Executing:
./scripts/checkpatch.pl--strict -g HEAD
WARNING: please write a help paragraph that fully describes the config symbol #33: FILE:drivers/clk/Kconfig:328:
+configCOMMON_CLK_NPCM8XX+ tristate "Clock driver for the NPCM8XX SoC Family" + depends on ARCH_NPCM || COMPILE_TEST + help + This driver supports the clocks on the Nuvoton BMC NPCM8XX SoC Family, + all the clocks are initialized by the bootloader, so this driver + allows only reading of current settings directly from the hardware.+
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating? #57:
new file mode 100644WARNING: line length of 112 exceeds 100 columns #252: FILE:
drivers/clk/clk-npcm8xx.c:191:
+ {NPCM8XX_CLKDIV1, 26, 2, "ahb",&hw_pre_clk,CLK_DIVIDER_READ_ONLY,CLK_IS_CRITICAL,NPCM8XX_CLK_AHB},WARNING: line length of 137 exceeds 100 columns #257: FILE:
drivers/clk/clk-npcm8xx.c:196:
+ {NPCM8XX_CLKDIV1, 28, 3, "adc", &npcm8xx_pre_divs[0].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_ADC},WARNING: line length of 107 exceeds 100 columns #259: FILE:
drivers/clk/clk-npcm8xx.c:198:
+ {NPCM8XX_CLKDIV1, 11, 5, "mmc", &npcm8xx_muxes[2].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_MMC},WARNING: line length of 106 exceeds 100 columns #261: FILE:
drivers/clk/clk-npcm8xx.c:200:
+ {NPCM8XX_CLKDIV1, 2, 4, "pci", &npcm8xx_muxes[7].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_PCI},WARNING: line length of 139 exceeds 100 columns #263: FILE:
drivers/clk/clk-npcm8xx.c:202:
+ {NPCM8XX_CLKDIV2, 30, 2, "apb4", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB4},WARNING: line length of 139 exceeds 100 columns #264: FILE:
drivers/clk/clk-npcm8xx.c:203:
+ {NPCM8XX_CLKDIV2, 28, 2, "apb3", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB3},WARNING: line length of 139 exceeds 100 columns #265: FILE:
drivers/clk/clk-npcm8xx.c:204:
+ {NPCM8XX_CLKDIV2, 26, 2, "apb2", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB2},WARNING: line length of 139 exceeds 100 columns #266: FILE:
drivers/clk/clk-npcm8xx.c:205:
+ {NPCM8XX_CLKDIV2, 24, 2, "apb1", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB1},WARNING: line length of 139 exceeds 100 columns #267: FILE:
drivers/clk/clk-npcm8xx.c:206:
+ {NPCM8XX_CLKDIV2, 22, 2, "apb5", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB5},WARNING: line length of 113 exceeds 100 columns #268: FILE:
drivers/clk/clk-npcm8xx.c:207:
+ {NPCM8XX_CLKDIV2, 16, 5, "clkout", &npcm8xx_muxes[8].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_CLKOUT},WARNING: line length of 107 exceeds 100 columns #269: FILE:
drivers/clk/clk-npcm8xx.c:208:
+ {NPCM8XX_CLKDIV2, 13, 3, "gfx", &npcm8xx_muxes[7].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_GFX},WARNING: line length of 112 exceeds 100 columns #270: FILE:
drivers/clk/clk-npcm8xx.c:209:
+ {NPCM8XX_CLKDIV2, 8, 5, "usb_bridge", &npcm8xx_muxes[4].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SU},WARNING: line length of 112 exceeds 100 columns #271: FILE:
drivers/clk/clk-npcm8xx.c:210:
+ {NPCM8XX_CLKDIV2, 4, 4, "usb_host", &npcm8xx_muxes[4].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SU48},WARNING: line length of 108 exceeds 100 columns #272: FILE:
drivers/clk/clk-npcm8xx.c:211:
+ {NPCM8XX_CLKDIV2, 0, 4, "sdhc", &npcm8xx_muxes[2].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SDHC},WARNING: line length of 112 exceeds 100 columns #274: FILE:
drivers/clk/clk-npcm8xx.c:213:
+ {NPCM8XX_CLKDIV3, 16, 8, "spi1", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SPI1},WARNING: line length of 111 exceeds 100 columns #275: FILE:
drivers/clk/clk-npcm8xx.c:214:
+ {NPCM8XX_CLKDIV3, 11, 5, "uart2", &npcm8xx_muxes[3].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_UART2},WARNING: line length of 111 exceeds 100 columns #276: FILE:
drivers/clk/clk-npcm8xx.c:215:
+ {NPCM8XX_CLKDIV3, 6, 5, "spi0", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SPI0},WARNING: line length of 111 exceeds 100 columns #277: FILE:
drivers/clk/clk-npcm8xx.c:216:
+ {NPCM8XX_CLKDIV3, 1, 5, "spix", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SPIX},WARNING: line length of 106 exceeds 100 columns #279: FILE:
drivers/clk/clk-npcm8xx.c:218:
+ {NPCM8XX_CLKDIV4, 28, 4, "rg", &npcm8xx_muxes[11].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_RG},WARNING: line length of 108 exceeds 100 columns #280: FILE:
drivers/clk/clk-npcm8xx.c:219:
+ {NPCM8XX_CLKDIV4, 12, 4, "rcp", &npcm8xx_muxes[12].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_RCP},WARNING: line length of 133 exceeds 100 columns #282: FILE:
drivers/clk/clk-npcm8xx.c:221:
+ {NPCM8XX_THRTL_CNT, 0, 2, "th", &npcm8xx_muxes[0].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_TH},WARNING: Prefer "GPL" over "GPL v2" - see commit
bf7fbeeae6db("module: Cure theMODULE_LICENSE"GPL" vs. "GPL v2" bogosity") #490: FILE:drivers/clk/clk-npcm8xx.c:429:
+MODULE_LICENSE("GPL v2");total: 0 errors, 24 warnings, 0 checks, 450 lines checked
Andrew
Tomer Maimon
maintainerRe: [linux dev-6.6 v3 3/3] clk: npcm8xx: add clock controller
Hi Andrew,
the clock maintainer has approved the driver in V3 :-)
So I think we are good to go.
Thanks,
Tomer
Quoted 137 lines · Tomer Maimon
Hi Andrew,
Thanks for your comments,
Send V4 with fixed exceed line length.
Tomer
Quoted 125 lines · Andrew Jeffery
Quoted 10 lines · Tomer Maimon
Add auxiliary driver to support Nuvoton Arbel BMC NPCM8XX contains an integrated clock controller which generates and supplies clocks to all modules within the BMC.
The NPCM8xx clock controller is created using the auxiliary device framework and set up in the npcm reset driver since the NPCM8xx clock is using the same register region.
Signed-off-by Tomer Maimon <[email protected]>Tested-by Benjamin Fair <[email protected]>So checkpatch still warns on this one, though I think whitespace is less of a problem.
For what it's worth, here's the output I get:
Executing:
./scripts/checkpatch.pl--strict -g HEAD
WARNING: please write a help paragraph that fully describes the config symbol #33: FILE:drivers/clk/Kconfig:328:
+configCOMMON_CLK_NPCM8XX+ tristate "Clock driver for the NPCM8XX SoC Family" + depends on ARCH_NPCM || COMPILE_TEST + help + This driver supports the clocks on the Nuvoton BMC NPCM8XX SoC Family, + all the clocks are initialized by the bootloader, so this driver + allows only reading of current settings directly from the hardware.+
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating? #57:
new file mode 100644WARNING: line length of 112 exceeds 100 columns #252: FILE:
drivers/clk/clk-npcm8xx.c:191:
+ {NPCM8XX_CLKDIV1, 26, 2, "ahb",&hw_pre_clk,CLK_DIVIDER_READ_ONLY,CLK_IS_CRITICAL,NPCM8XX_CLK_AHB},WARNING: line length of 137 exceeds 100 columns #257: FILE:
drivers/clk/clk-npcm8xx.c:196:
+ {NPCM8XX_CLKDIV1, 28, 3, "adc", &npcm8xx_pre_divs[0].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_ADC},WARNING: line length of 107 exceeds 100 columns #259: FILE:
drivers/clk/clk-npcm8xx.c:198:
+ {NPCM8XX_CLKDIV1, 11, 5, "mmc", &npcm8xx_muxes[2].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_MMC},WARNING: line length of 106 exceeds 100 columns #261: FILE:
drivers/clk/clk-npcm8xx.c:200:
+ {NPCM8XX_CLKDIV1, 2, 4, "pci", &npcm8xx_muxes[7].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_PCI},WARNING: line length of 139 exceeds 100 columns #263: FILE:
drivers/clk/clk-npcm8xx.c:202:
+ {NPCM8XX_CLKDIV2, 30, 2, "apb4", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB4},WARNING: line length of 139 exceeds 100 columns #264: FILE:
drivers/clk/clk-npcm8xx.c:203:
+ {NPCM8XX_CLKDIV2, 28, 2, "apb3", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB3},WARNING: line length of 139 exceeds 100 columns #265: FILE:
drivers/clk/clk-npcm8xx.c:204:
+ {NPCM8XX_CLKDIV2, 26, 2, "apb2", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB2},WARNING: line length of 139 exceeds 100 columns #266: FILE:
drivers/clk/clk-npcm8xx.c:205:
+ {NPCM8XX_CLKDIV2, 24, 2, "apb1", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB1},WARNING: line length of 139 exceeds 100 columns #267: FILE:
drivers/clk/clk-npcm8xx.c:206:
+ {NPCM8XX_CLKDIV2, 22, 2, "apb5", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_APB5},WARNING: line length of 113 exceeds 100 columns #268: FILE:
drivers/clk/clk-npcm8xx.c:207:
+ {NPCM8XX_CLKDIV2, 16, 5, "clkout", &npcm8xx_muxes[8].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_CLKOUT},WARNING: line length of 107 exceeds 100 columns #269: FILE:
drivers/clk/clk-npcm8xx.c:208:
+ {NPCM8XX_CLKDIV2, 13, 3, "gfx", &npcm8xx_muxes[7].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_GFX},WARNING: line length of 112 exceeds 100 columns #270: FILE:
drivers/clk/clk-npcm8xx.c:209:
+ {NPCM8XX_CLKDIV2, 8, 5, "usb_bridge", &npcm8xx_muxes[4].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SU},WARNING: line length of 112 exceeds 100 columns #271: FILE:
drivers/clk/clk-npcm8xx.c:210:
+ {NPCM8XX_CLKDIV2, 4, 4, "usb_host", &npcm8xx_muxes[4].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SU48},WARNING: line length of 108 exceeds 100 columns #272: FILE:
drivers/clk/clk-npcm8xx.c:211:
+ {NPCM8XX_CLKDIV2, 0, 4, "sdhc", &npcm8xx_muxes[2].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SDHC},WARNING: line length of 112 exceeds 100 columns #274: FILE:
drivers/clk/clk-npcm8xx.c:213:
+ {NPCM8XX_CLKDIV3, 16, 8, "spi1", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SPI1},WARNING: line length of 111 exceeds 100 columns #275: FILE:
drivers/clk/clk-npcm8xx.c:214:
+ {NPCM8XX_CLKDIV3, 11, 5, "uart2", &npcm8xx_muxes[3].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_UART2},WARNING: line length of 111 exceeds 100 columns #276: FILE:
drivers/clk/clk-npcm8xx.c:215:
+ {NPCM8XX_CLKDIV3, 6, 5, "spi0", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SPI0},WARNING: line length of 111 exceeds 100 columns #277: FILE:
drivers/clk/clk-npcm8xx.c:216:
+ {NPCM8XX_CLKDIV3, 1, 5, "spix", &npcm8xx_pre_divs[1].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_SPIX},WARNING: line length of 106 exceeds 100 columns #279: FILE:
drivers/clk/clk-npcm8xx.c:218:
+ {NPCM8XX_CLKDIV4, 28, 4, "rg", &npcm8xx_muxes[11].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_RG},WARNING: line length of 108 exceeds 100 columns #280: FILE:
drivers/clk/clk-npcm8xx.c:219:
+ {NPCM8XX_CLKDIV4, 12, 4, "rcp", &npcm8xx_muxes[12].hw,CLK_DIVIDER_READ_ONLY, 0,NPCM8XX_CLK_RCP},WARNING: line length of 133 exceeds 100 columns #282: FILE:
drivers/clk/clk-npcm8xx.c:221:
+ {NPCM8XX_THRTL_CNT, 0, 2, "th", &npcm8xx_muxes[0].hw,CLK_DIVIDER_READ_ONLY|CLK_DIVIDER_POWER_OF_TWO, 0,NPCM8XX_CLK_TH},WARNING: Prefer "GPL" over "GPL v2" - see commit
bf7fbeeae6db("module: Cure theMODULE_LICENSE"GPL" vs. "GPL v2" bogosity") #490: FILE:drivers/clk/clk-npcm8xx.c:429:
+MODULE_LICENSE("GPL v2");total: 0 errors, 24 warnings, 0 checks, 450 lines checked
Andrew
Andrew Jeffery
maintainerRe: [linux dev-6.6 v3 3/3] clk: npcm8xx: add clock controller
Quoted 5 lines · Tomer Maimon
Hi Andrew,
the clock maintainer has approved the driver in V3 :-)
So I think we are good to go.
Yep. I'll backport the changes straight from upstream, unless I discover any issues in the process.
Andrew