[PATCH v7 03/11] clk: imx: scu: add two cells binding support

Nathan Chancellor natechancellor at gmail.com
Thu Oct 29 21:06:00 EDT 2020


On Wed, Jul 29, 2020 at 04:00:10PM +0800, Dong Aisheng wrote:
> This patch implements the new two cells binding for SCU clocks.
> The usage is as follows:
> clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>
> 
> Due to each SCU clock is associated with a power domain, without power
> on the domain, the SCU clock can't work. So we create platform devices
> for each domain clock respectively and manually attach the required domain
> before register the clock devices, then we can register clocks in the
> clock platform driver accordingly.
> 
> Note because we do not have power domain info in device tree and the SCU
> resource ID is the same for power domain and clock, so we use resource ID
> to find power domains.
> 
> Later, we will also use this clock platform driver to support suspend/resume
> and runtime pm.
> 
> Cc: Stephen Boyd <sboyd at kernel.org>
> Cc: Shawn Guo <shawnguo at kernel.org>
> Cc: Sascha Hauer <kernel at pengutronix.de>
> Cc: Michael Turquette <mturquette at baylibre.com>
> Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>

This patch breaks allmodconfig.

$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- distclean allmodconfig drivers/clk/imx/
In file included from ./include/linux/device.h:32,
                 from ./include/linux/of_platform.h:9,
                 from drivers/clk/imx/clk-scu.c:11:
./include/linux/device/driver.h:290:1: warning: data definition has no type or storage class
  290 | device_initcall(__driver##_init);
      | ^~~~~~~~~~~~~~~
./include/linux/platform_device.h:258:2: note: in expansion of macro 'builtin_driver'
  258 |  builtin_driver(__platform_driver, platform_driver_register)
      |  ^~~~~~~~~~~~~~
drivers/clk/imx/clk-scu.c:545:1: note: in expansion of macro 'builtin_platform_driver'
  545 | builtin_platform_driver(imx_clk_scu_driver);
      | ^~~~~~~~~~~~~~~~~~~~~~~
./include/linux/device/driver.h:290:1: error: type defaults to 'int' in declaration of 'device_initcall' [-Werror=implicit-int]
  290 | device_initcall(__driver##_init);
      | ^~~~~~~~~~~~~~~
./include/linux/platform_device.h:258:2: note: in expansion of macro 'builtin_driver'
  258 |  builtin_driver(__platform_driver, platform_driver_register)
      |  ^~~~~~~~~~~~~~
drivers/clk/imx/clk-scu.c:545:1: note: in expansion of macro 'builtin_platform_driver'
  545 | builtin_platform_driver(imx_clk_scu_driver);
      | ^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/imx/clk-scu.c:545:1: warning: parameter names (without types) in function declaration
In file included from ./include/linux/device.h:32,
                 from ./include/linux/of_platform.h:9,
                 from drivers/clk/imx/clk-scu.c:11:
drivers/clk/imx/clk-scu.c:545:25: warning: 'imx_clk_scu_driver_init' defined but not used [-Wunused-function]
  545 | builtin_platform_driver(imx_clk_scu_driver);
      |                         ^~~~~~~~~~~~~~~~~~
./include/linux/device/driver.h:286:19: note: in definition of macro 'builtin_driver'
  286 | static int __init __driver##_init(void) \
      |                   ^~~~~~~~
drivers/clk/imx/clk-scu.c:545:1: note: in expansion of macro 'builtin_platform_driver'
  545 | builtin_platform_driver(imx_clk_scu_driver);
      | ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:283: drivers/clk/imx/clk-scu.o] Error 1
make[4]: Target '__build' not remade because of errors.
make[3]: *** [scripts/Makefile.build:500: drivers/clk/imx] Error 2
make[3]: Target '__build' not remade because of errors.
make[2]: *** [scripts/Makefile.build:500: drivers/clk] Error 2
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1799: drivers] Error 2
make[1]: Target 'drivers/clk/imx/' not remade because of errors.
make: *** [Makefile:335: __build_one_by_one] Error 2
make: Target 'distclean' not remade because of errors.
make: Target 'allmodconfig' not remade because of errors.
make: Target 'drivers/clk/imx/' not remade because of errors.

Cheers,
Nathan



More information about the linux-arm-kernel mailing list