All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v18 0/1] Introduce Nuvoton Arbel NPCM8XX BMC SoC
@ 2023-07-27  7:43 ` Tomer Maimon
  0 siblings, 0 replies; 5+ messages in thread
From: Tomer Maimon @ 2023-07-27  7:43 UTC (permalink / raw)
  To: mturquette, sboyd, avifishman70, tali.perry1, joel, venture,
	yuenn, benjaminfair
  Cc: openbmc, linux-clk, linux-kernel, Tomer Maimon

This patchset adds clock support for the Nuvoton 
Arbel NPCM8XX Board Management controller (BMC) SoC family.

This patchset cover letter is based from the initial support for NPCM8xx BMC to
keep tracking the version history.

all the other initial support patches had been applied to Linux kernel 6.0.

This patchset was tested on the Arbel NPCM8XX evaluation board.

Changes since version 17:
 - NPCM8XX clock driver did not changed from version 17 only build and tested under kernel 6.5-rc3.

Changes since version 16:
 - NPCM8XX clock driver
	- Using devm_kzalloc instead kzalloc.
	- Remove unnecessary parenthesis.
	- Modify incorrect spelling.

Changes since version 15:
 - NPCM8XX clock driver
	- Remove unused regs parameter from npcm8xx_pll_data structure.
	- Using index and clk_hw parameters to set the clock parent in the clock structures.

Changes since version 14:
 - NPCM8XX clock driver
	- Remove unnecessary register definitions.
	- Remove the internal reference clock, instead use the external DT reference clock.
	- rearrange the driver.
	- using .names parameter in DT to define clock (refclk).

Changes since version 13:
 - NPCM8XX clock driver
	- Remove unnecessary definitions and add module.h define
	- Use in clk_parent_data struct.fw_name and .name.
	- Add module_exit function.
	- Add const to divider clock names.
	- Add MODULE_DESCRIPTION and MODULE_LICENSE

Changes since version 12:
 - NPCM8XX clock driver
	- Use clk_parent_data in mux and div clock structure.
	- Add const to mux tables.
	- Using devm_clk_hw_register_fixed_rate function.
	- use only .name clk_parent_data instead .name and .fw_name.
	- Modify mask values in mux clocks. 

Changes since version 11:
 - NPCM8XX clock driver
	- Modify Kconfig help.
	- Modify loop variable to unsigned int.

Changes since version 11:
 - NPCM8XX clock driver
	- Modify Kconfig help.
	- Modify loop variable to unsigned int.

Changes since version 10:
 - NPCM8XX clock driver
	- Fix const warning.

Changes since version 9:
 - NPCM8XX clock driver
	- Move configuration place.
	- Using clk_parent_data instead of parent_name
	- using devm_ioremap instead of ioremap. deeply sorry, I know we had
	 a long discussion on what should the driver use, from other examples 
	 (also in other clock drivers) I see the combination of 
	 platform_get_resource and devm_ioremap are commonly used and it answer
	 the reset and clock needs.

Changes since version 8:
 - NPCM8XX clock driver
	- Move configuration place.
	- Add space before and aftre '{' '}'.
	- Handle devm_of_clk_add_hw_provider function error.

Changes since version 7:
 - NPCM8XX clock driver
	- The clock and reset registers using the same memory region, 
	  due to it the clock driver should claim the ioremap directly 
	  without checking the memory region.

Changes since version 6:
 - NPCM reset driver
	- Modify warning message.
 - dt-bindings: serial: 8250: Add npcm845 compatible string patch accepted, due
   to it the patch removed from the patchset.

Changes since version 5:
 - NPCM8XX clock driver
	- Remove refclk if devm_of_clk_add_hw_provider function failed.
 - NPCM8XX clock source driver
	- Remove NPCM8XX TIMER_OF_DECLARE support, using the same as NPCM7XX.

Changes since version 4:
 - NPCM8XX clock driver
	- Use the same quote in the dt-binding file.

Changes since version 3:
 - NPCM8XX clock driver
	- Rename NPCM8xx clock dt-binding header file.
	- Remove unused structures.
	- Improve Handling the clocks registration.
 - NPCM reset driver
	- Add ref phandle to dt-binding.

Changes since version 2:
 - Remove NPCM8xx WDT compatible patch.
 - Remove NPCM8xx UART compatible patch.
 - NPCM8XX clock driver
	- Add debug new line.
	- Add 25M fixed rate clock.
	- Remove unused clocks and clock name from dt-binding.
 - NPCM reset driver
	- Revert to npcm7xx dt-binding.
	- Skip dt binding quotes.
	- Adding DTS backward compatibility.
	- Remove NPCM8xx binding include file.
	- Warp commit message.
- NPCM8XX device tree:
	- Remove unused clock nodes (used in the clock driver)
	- Modify gcr and rst node names.

Changes since version 1:
 - NPCM8XX clock driver
	- Modify dt-binding.
	- Remove unsed definition and include.
	- Include alphabetically.
	- Use clock devm.
 - NPCM reset driver
	- Modify dt-binding.
	- Modify syscon name.
	- Add syscon support to NPCM7XX dts reset node.
	- use data structure.
 - NPCM8XX device tree:
	- Modify evb compatible name.
	- Add NPCM7xx compatible.
	- Remove disable nodes from the EVB DTS.

Tomer Maimon (1):
  clk: npcm8xx: add clock controller

 drivers/clk/Kconfig       |   8 +
 drivers/clk/Makefile      |   1 +
 drivers/clk/clk-npcm8xx.c | 565 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 574 insertions(+)
 create mode 100644 drivers/clk/clk-npcm8xx.c

-- 
2.33.0


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH v18 1/1] clk: npcm8xx: add clock controller
@ 2023-08-12  5:02 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-08-12  5:02 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230727074328.34144-2-tmaimon77@gmail.com>
References: <20230727074328.34144-2-tmaimon77@gmail.com>
TO: Tomer Maimon <tmaimon77@gmail.com>

Hi Tomer,

kernel test robot noticed the following build warnings:

[auto build test WARNING on v6.5-rc3]
[also build test WARNING on linus/master next-20230809]
[cannot apply to clk/clk-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tomer-Maimon/clk-npcm8xx-add-clock-controller/20230727-161149
base:   v6.5-rc3
patch link:    https://lore.kernel.org/r/20230727074328.34144-2-tmaimon77%40gmail.com
patch subject: [PATCH v18 1/1] clk: npcm8xx: add clock controller
:::::: branch date: 2 weeks ago
:::::: commit date: 2 weeks ago
config: nios2-randconfig-m031-20230812 (https://download.01.org/0day-ci/archive/20230812/202308121204.0vblViWk-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230812/202308121204.0vblViWk-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202308121204.0vblViWk-lkp@intel.com/

smatch warnings:
drivers/clk/clk-npcm8xx.c:375 npcm8xx_clk_register_pll() warn: passing devm_ allocated variable to kfree. 'pll'

vim +/pll +375 drivers/clk/clk-npcm8xx.c

43dcec6ce04c61 Tomer Maimon 2023-07-27  350  
43dcec6ce04c61 Tomer Maimon 2023-07-27  351  static struct clk_hw *
43dcec6ce04c61 Tomer Maimon 2023-07-27  352  npcm8xx_clk_register_pll(struct device *dev, void __iomem *pllcon,
43dcec6ce04c61 Tomer Maimon 2023-07-27  353  			 const char *name, const struct clk_parent_data *parent,
43dcec6ce04c61 Tomer Maimon 2023-07-27  354  			 unsigned long flags)
43dcec6ce04c61 Tomer Maimon 2023-07-27  355  {
43dcec6ce04c61 Tomer Maimon 2023-07-27  356  	struct npcm8xx_clk_pll *pll;
43dcec6ce04c61 Tomer Maimon 2023-07-27  357  	struct clk_init_data init = {};
43dcec6ce04c61 Tomer Maimon 2023-07-27  358  	int ret;
43dcec6ce04c61 Tomer Maimon 2023-07-27  359  
43dcec6ce04c61 Tomer Maimon 2023-07-27  360  	pll = devm_kzalloc(dev, sizeof(*pll), GFP_KERNEL);
43dcec6ce04c61 Tomer Maimon 2023-07-27  361  	if (!pll)
43dcec6ce04c61 Tomer Maimon 2023-07-27  362  		return ERR_PTR(-ENOMEM);
43dcec6ce04c61 Tomer Maimon 2023-07-27  363  
43dcec6ce04c61 Tomer Maimon 2023-07-27  364  	init.name = name;
43dcec6ce04c61 Tomer Maimon 2023-07-27  365  	init.ops = &npcm8xx_clk_pll_ops;
43dcec6ce04c61 Tomer Maimon 2023-07-27  366  	init.parent_data = parent;
43dcec6ce04c61 Tomer Maimon 2023-07-27  367  	init.num_parents = 1;
43dcec6ce04c61 Tomer Maimon 2023-07-27  368  	init.flags = flags;
43dcec6ce04c61 Tomer Maimon 2023-07-27  369  
43dcec6ce04c61 Tomer Maimon 2023-07-27  370  	pll->pllcon = pllcon;
43dcec6ce04c61 Tomer Maimon 2023-07-27  371  	pll->hw.init = &init;
43dcec6ce04c61 Tomer Maimon 2023-07-27  372  
43dcec6ce04c61 Tomer Maimon 2023-07-27  373  	ret = devm_clk_hw_register(dev, &pll->hw);
43dcec6ce04c61 Tomer Maimon 2023-07-27  374  	if (ret) {
43dcec6ce04c61 Tomer Maimon 2023-07-27 @375  		kfree(pll);
43dcec6ce04c61 Tomer Maimon 2023-07-27  376  		return ERR_PTR(ret);
43dcec6ce04c61 Tomer Maimon 2023-07-27  377  	}
43dcec6ce04c61 Tomer Maimon 2023-07-27  378  
43dcec6ce04c61 Tomer Maimon 2023-07-27  379  	return &pll->hw;
43dcec6ce04c61 Tomer Maimon 2023-07-27  380  }
43dcec6ce04c61 Tomer Maimon 2023-07-27  381  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-12  5:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27  7:43 [PATCH v18 0/1] Introduce Nuvoton Arbel NPCM8XX BMC SoC Tomer Maimon
2023-07-27  7:43 ` Tomer Maimon
2023-07-27  7:43 ` [PATCH v18 1/1] clk: npcm8xx: add clock controller Tomer Maimon
2023-07-27  7:43   ` Tomer Maimon
  -- strict thread matches above, loose matches on Subject: below --
2023-08-12  5:02 kernel test robot

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.