[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301060744.i4uoBc3I-lkp@intel.com>
Date: Fri, 6 Jan 2023 07:42:30 +0800
From: kernel test robot <lkp@...el.com>
To: Arnd Bergmann <arnd@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Tomasz Figa <tomasz.figa@...il.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Arnd Bergmann <arnd@...db.de>,
Alim Akhtar <alim.akhtar@...sung.com>,
Ajay Kumar <ajaykumar.rs@...sung.com>,
Pankaj Dubey <pankaj.dubey@...sung.com>,
linux-samsung-soc@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: samsung: remove s3c24xx specific pll bits
Hi Arnd,
I love your patch! Yet something to improve:
[auto build test ERROR on krzk/for-next]
[also build test ERROR on linus/master v6.2-rc2 next-20230105]
[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/Arnd-Bergmann/clk-samsung-remove-s3c24xx-specific-pll-bits/20230105-221537
base: https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git for-next
patch link: https://lore.kernel.org/r/20230105141231.2006353-1-arnd%40kernel.org
patch subject: [PATCH] clk: samsung: remove s3c24xx specific pll bits
config: arm-randconfig-r025-20230105
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel-lab-lkp/linux/commit/f3493e33c0b212b32ebc32a7e4fe6e7cf1c325d2
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Arnd-Bergmann/clk-samsung-remove-s3c24xx-specific-pll-bits/20230105-221537
git checkout f3493e33c0b212b32ebc32a7e4fe6e7cf1c325d2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/clk/samsung/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/clk/samsung/clk-s3c2412.c:101:6: error: use of undeclared identifier 'pll_s3c2440_mpll'
PLL(pll_s3c2440_mpll, MPLL, "mpll", "xti", LOCKTIME, MPLLCON, NULL),
^
>> drivers/clk/samsung/clk-s3c2412.c:102:6: error: use of undeclared identifier 'pll_s3c2410_upll'
PLL(pll_s3c2410_upll, UPLL, "upll", "urefclk", LOCKTIME, UPLLCON, NULL),
^
>> drivers/clk/samsung/clk-s3c2412.c:226:46: error: invalid application of 'sizeof' to an incomplete type 'struct samsung_pll_clock[]'
samsung_clk_register_pll(ctx, s3c2412_plls, ARRAY_SIZE(s3c2412_plls),
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:55:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
3 errors generated.
vim +/pll_s3c2440_mpll +101 drivers/clk/samsung/clk-s3c2412.c
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 99
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 100 static struct samsung_pll_clock s3c2412_plls[] __initdata = {
35615917ef0273 Chanwoo Choi 2017-11-27 @101 PLL(pll_s3c2440_mpll, MPLL, "mpll", "xti", LOCKTIME, MPLLCON, NULL),
35615917ef0273 Chanwoo Choi 2017-11-27 @102 PLL(pll_s3c2410_upll, UPLL, "upll", "urefclk", LOCKTIME, UPLLCON, NULL),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 103 };
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 104
1871f0fcba5deb Stephen Boyd 2018-03-16 105 static struct samsung_gate_clock s3c2412_gates[] __initdata = {
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 106 GATE(PCLK_WDT, "wdt", "pclk", CLKCON, 28, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 107 GATE(PCLK_SPI, "spi", "pclk", CLKCON, 27, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 108 GATE(PCLK_I2S, "i2s", "pclk", CLKCON, 26, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 109 GATE(PCLK_I2C, "i2c", "pclk", CLKCON, 25, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 110 GATE(PCLK_ADC, "adc", "pclk", CLKCON, 24, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 111 GATE(PCLK_RTC, "rtc", "pclk", CLKCON, 23, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 112 GATE(PCLK_GPIO, "gpio", "pclk", CLKCON, 22, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 113 GATE(PCLK_UART2, "uart2", "pclk", CLKCON, 21, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 114 GATE(PCLK_UART1, "uart1", "pclk", CLKCON, 20, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 115 GATE(PCLK_UART0, "uart0", "pclk", CLKCON, 19, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 116 GATE(PCLK_SDI, "sdi", "pclk", CLKCON, 18, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 117 GATE(PCLK_PWM, "pwm", "pclk", CLKCON, 17, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 118 GATE(PCLK_USBD, "usb-device", "pclk", CLKCON, 16, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 119 GATE(SCLK_CAM, "sclk_cam", "div_cam", CLKCON, 15, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 120 GATE(SCLK_UART, "sclk_uart", "div_uart", CLKCON, 14, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 121 GATE(SCLK_I2S, "sclk_i2s", "div_i2s", CLKCON, 13, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 122 GATE(SCLK_USBH, "sclk_usbh", "div_usb", CLKCON, 12, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 123 GATE(SCLK_USBD, "sclk_usbd", "div_usb", CLKCON, 11, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 124 GATE(HCLK_HALF, "hclk_half", "div_hclk_half", CLKCON, 10, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 125 GATE(HCLK_X2, "hclkx2", "ff_hclk", CLKCON, 9, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 126 GATE(HCLK_SDRAM, "sdram", "hclk", CLKCON, 8, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 127 GATE(HCLK_USBH, "usb-host", "hclk", CLKCON, 6, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 128 GATE(HCLK_LCD, "lcd", "hclk", CLKCON, 5, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 129 GATE(HCLK_NAND, "nand", "hclk", CLKCON, 4, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 130 GATE(HCLK_DMA3, "dma3", "hclk", CLKCON, 3, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 131 GATE(HCLK_DMA2, "dma2", "hclk", CLKCON, 2, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 132 GATE(HCLK_DMA1, "dma1", "hclk", CLKCON, 1, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 133 GATE(HCLK_DMA0, "dma0", "hclk", CLKCON, 0, CLK_IGNORE_UNUSED, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 134 };
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 135
1871f0fcba5deb Stephen Boyd 2018-03-16 136 static struct samsung_clock_alias s3c2412_aliases[] __initdata = {
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 137 ALIAS(PCLK_UART0, "s3c2412-uart.0", "uart"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 138 ALIAS(PCLK_UART1, "s3c2412-uart.1", "uart"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 139 ALIAS(PCLK_UART2, "s3c2412-uart.2", "uart"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 140 ALIAS(PCLK_UART0, "s3c2412-uart.0", "clk_uart_baud2"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 141 ALIAS(PCLK_UART1, "s3c2412-uart.1", "clk_uart_baud2"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 142 ALIAS(PCLK_UART2, "s3c2412-uart.2", "clk_uart_baud2"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 143 ALIAS(SCLK_UART, NULL, "clk_uart_baud3"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 144 ALIAS(PCLK_I2C, "s3c2410-i2c.0", "i2c"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 145 ALIAS(PCLK_ADC, NULL, "adc"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 146 ALIAS(PCLK_RTC, NULL, "rtc"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 147 ALIAS(PCLK_PWM, NULL, "timers"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 148 ALIAS(HCLK_LCD, NULL, "lcd"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 149 ALIAS(PCLK_USBD, NULL, "usb-device"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 150 ALIAS(SCLK_USBD, NULL, "usb-bus-gadget"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 151 ALIAS(HCLK_USBH, NULL, "usb-host"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 152 ALIAS(SCLK_USBH, NULL, "usb-bus-host"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 153 ALIAS(ARMCLK, NULL, "armclk"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 154 ALIAS(HCLK, NULL, "hclk"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 155 ALIAS(MPLL, NULL, "mpll"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 156 ALIAS(MSYSCLK, NULL, "fclk"),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 157 };
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 158
e317c19470f6d6 Heiko Stübner 2014-08-19 159 static int s3c2412_restart(struct notifier_block *this,
e317c19470f6d6 Heiko Stübner 2014-08-19 160 unsigned long mode, void *cmd)
e317c19470f6d6 Heiko Stübner 2014-08-19 161 {
e317c19470f6d6 Heiko Stübner 2014-08-19 162 /* errata "Watch-dog/Software Reset Problem" specifies that
e317c19470f6d6 Heiko Stübner 2014-08-19 163 * this reset must be done with the SYSCLK sourced from
e317c19470f6d6 Heiko Stübner 2014-08-19 164 * EXTCLK instead of FOUT to avoid a glitch in the reset
e317c19470f6d6 Heiko Stübner 2014-08-19 165 * mechanism.
e317c19470f6d6 Heiko Stübner 2014-08-19 166 *
e317c19470f6d6 Heiko Stübner 2014-08-19 167 * See the watchdog section of the S3C2412 manual for more
e317c19470f6d6 Heiko Stübner 2014-08-19 168 * information on this fix.
e317c19470f6d6 Heiko Stübner 2014-08-19 169 */
e317c19470f6d6 Heiko Stübner 2014-08-19 170
e317c19470f6d6 Heiko Stübner 2014-08-19 171 __raw_writel(0x00, reg_base + CLKSRC);
e317c19470f6d6 Heiko Stübner 2014-08-19 172 __raw_writel(0x533C2412, reg_base + SWRST);
e317c19470f6d6 Heiko Stübner 2014-08-19 173 return NOTIFY_DONE;
e317c19470f6d6 Heiko Stübner 2014-08-19 174 }
e317c19470f6d6 Heiko Stübner 2014-08-19 175
e317c19470f6d6 Heiko Stübner 2014-08-19 176 static struct notifier_block s3c2412_restart_handler = {
e317c19470f6d6 Heiko Stübner 2014-08-19 177 .notifier_call = s3c2412_restart,
e317c19470f6d6 Heiko Stübner 2014-08-19 178 .priority = 129,
e317c19470f6d6 Heiko Stübner 2014-08-19 179 };
e317c19470f6d6 Heiko Stübner 2014-08-19 180
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 181 /*
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 182 * fixed rate clocks generated outside the soc
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 183 * Only necessary until the devicetree-move is complete
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 184 */
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 185 #define XTI 1
1871f0fcba5deb Stephen Boyd 2018-03-16 186 static struct samsung_fixed_rate_clock s3c2412_common_frate_clks[] __initdata = {
728f288d2aed7d Stephen Boyd 2016-03-01 187 FRATE(XTI, "xti", NULL, 0, 0),
728f288d2aed7d Stephen Boyd 2016-03-01 188 FRATE(0, "ext", NULL, 0, 0),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 189 };
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 190
976face4b46ab3 Rahul Sharma 2014-03-12 191 static void __init s3c2412_common_clk_register_fixed_ext(
976face4b46ab3 Rahul Sharma 2014-03-12 192 struct samsung_clk_provider *ctx,
976face4b46ab3 Rahul Sharma 2014-03-12 193 unsigned long xti_f, unsigned long ext_f)
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 194 {
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 195 /* xtal alias is necessary for the current cpufreq driver */
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 196 struct samsung_clock_alias xti_alias = ALIAS(XTI, NULL, "xtal");
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 197
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 198 s3c2412_common_frate_clks[0].fixed_rate = xti_f;
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 199 s3c2412_common_frate_clks[1].fixed_rate = ext_f;
976face4b46ab3 Rahul Sharma 2014-03-12 200 samsung_clk_register_fixed_rate(ctx, s3c2412_common_frate_clks,
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 201 ARRAY_SIZE(s3c2412_common_frate_clks));
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 202
976face4b46ab3 Rahul Sharma 2014-03-12 203 samsung_clk_register_alias(ctx, &xti_alias, 1);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 204 }
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 205
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 206 void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 207 unsigned long ext_f, void __iomem *base)
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 208 {
976face4b46ab3 Rahul Sharma 2014-03-12 209 struct samsung_clk_provider *ctx;
e317c19470f6d6 Heiko Stübner 2014-08-19 210 int ret;
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 211 reg_base = base;
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 212
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 213 if (np) {
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 214 reg_base = of_iomap(np, 0);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 215 if (!reg_base)
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 216 panic("%s: failed to map registers\n", __func__);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 217 }
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 218
976face4b46ab3 Rahul Sharma 2014-03-12 219 ctx = samsung_clk_init(np, reg_base, NR_CLKS);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 220
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 221 /* Register external clocks only in non-dt cases */
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 222 if (!np)
976face4b46ab3 Rahul Sharma 2014-03-12 223 s3c2412_common_clk_register_fixed_ext(ctx, xti_f, ext_f);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 224
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 225 /* Register PLLs. */
976face4b46ab3 Rahul Sharma 2014-03-12 @226 samsung_clk_register_pll(ctx, s3c2412_plls, ARRAY_SIZE(s3c2412_plls),
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 227 reg_base);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 228
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 229 /* Register common internal clocks. */
976face4b46ab3 Rahul Sharma 2014-03-12 230 samsung_clk_register_mux(ctx, s3c2412_muxes, ARRAY_SIZE(s3c2412_muxes));
976face4b46ab3 Rahul Sharma 2014-03-12 231 samsung_clk_register_div(ctx, s3c2412_dividers,
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 232 ARRAY_SIZE(s3c2412_dividers));
976face4b46ab3 Rahul Sharma 2014-03-12 233 samsung_clk_register_gate(ctx, s3c2412_gates,
976face4b46ab3 Rahul Sharma 2014-03-12 234 ARRAY_SIZE(s3c2412_gates));
976face4b46ab3 Rahul Sharma 2014-03-12 235 samsung_clk_register_fixed_factor(ctx, s3c2412_ffactor,
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 236 ARRAY_SIZE(s3c2412_ffactor));
976face4b46ab3 Rahul Sharma 2014-03-12 237 samsung_clk_register_alias(ctx, s3c2412_aliases,
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 238 ARRAY_SIZE(s3c2412_aliases));
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 239
1b3493d755c85b Marek Szyprowski 2018-09-06 240 samsung_clk_sleep_init(reg_base, s3c2412_clk_regs,
1b3493d755c85b Marek Szyprowski 2018-09-06 241 ARRAY_SIZE(s3c2412_clk_regs));
d5e136a21b2028 Sylwester Nawrocki 2014-06-18 242
d5e136a21b2028 Sylwester Nawrocki 2014-06-18 243 samsung_clk_of_add_provider(np, ctx);
e317c19470f6d6 Heiko Stübner 2014-08-19 244
e317c19470f6d6 Heiko Stübner 2014-08-19 245 ret = register_restart_handler(&s3c2412_restart_handler);
e317c19470f6d6 Heiko Stübner 2014-08-19 246 if (ret)
e317c19470f6d6 Heiko Stübner 2014-08-19 247 pr_warn("cannot register restart handler, %d\n", ret);
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 248 }
ca2e90ac1809c4 Heiko Stuebner 2014-02-25 249
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (176596 bytes)
Powered by blists - more mailing lists