Re: [PATCH 4/4] drivers: bus: add driver for initializing the SSC bus on (some) qcom SoCs
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v5.17-rc1 next-20220121]
[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]
url: https://github.com/0day-ci/linux/commits/michael-srba-seznam-cz/dt-bindin...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-randconfig-a011-20220124 (https://download.01.org/0day-ci/archive/20220124/202201240259.yrjnY1AO-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7b3d30728816403d1fd73cc5082e9fb761262bce)
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
# https://github.com/0day-ci/linux/commit/2895c20e9788239e701eb0a1774049aae...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review michael-srba-seznam-cz/dt-bindings-clock-gcc-msm8998-Add-definitions-of-SSC-related-clocks/20220123-021013
git checkout 2895c20e9788239e701eb0a1774049aae7963864
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/bus/qcom-ssc-block-bus.c:217:17: error: assigning to 'const char **' from 'const char *const[2]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
data->pd_names = qcom_ssc_block_pd_names;
^ ~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
vim +217 drivers/bus/qcom-ssc-block-bus.c
199
200 static int qcom_ssc_block_bus_probe(struct platform_device *pdev)
201 {
202 struct qcom_ssc_block_bus_data *data;
203 struct device_node *np = pdev->dev.of_node;
204 struct of_phandle_args halt_args;
205 struct resource *res;
206 int ret;
207
208 if (np)
209 of_platform_populate(np, NULL, NULL, &pdev->dev);
210
211 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
212 if (!data)
213 return -ENOMEM;
214
215 platform_set_drvdata(pdev, data);
216
> 217 data->pd_names = qcom_ssc_block_pd_names;
218 data->num_pds = ARRAY_SIZE(qcom_ssc_block_pd_names);
219
220 ret = qcom_ssc_block_bus_pds_attach(&pdev->dev, data->pds, data->pd_names, data->num_pds);
221 if (ret < 0) {
222 dev_err(&pdev->dev, "error when attaching power domains: %d\n", ret);
223 return ret;
224 }
225
226 ret = qcom_ssc_block_bus_pds_enable(data->pds, data->num_pds);
227 if (ret < 0) {
228 dev_err(&pdev->dev, "error when enabling power domains: %d\n", ret);
229 return ret;
230 }
231
232 // the meaning of the bits in these two registers is sadly not documented,
233 // the set/clear operations are just copying what qcom does
234 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpm_sscaon_config0");
235 data->reg_mpm_sscaon_config0 = devm_ioremap_resource(&pdev->dev, res);
236 if (IS_ERR(data->reg_mpm_sscaon_config0)) {
237 ret = PTR_ERR(data->reg_mpm_sscaon_config0);
238 dev_err(&pdev->dev, "failed to ioremap mpm_sscaon_config0 (err: %d)\n", ret);
239 return ret;
240 }
241 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpm_sscaon_config0");
242 data->reg_mpm_sscaon_config1 = devm_ioremap_resource(&pdev->dev, res);
243 if (IS_ERR(data->reg_mpm_sscaon_config1)) {
244 ret = PTR_ERR(data->reg_mpm_sscaon_config1);
245 dev_err(&pdev->dev, "failed to ioremap mpm_sscaon_config1 (err: %d)\n", ret);
246 return ret;
247 }
248
249 data->ssc_bcr = devm_reset_control_get_exclusive(&pdev->dev, "ssc_bcr");
250 if (IS_ERR(data->ssc_bcr)) {
251 ret = PTR_ERR(data->ssc_bcr);
252 dev_err(&pdev->dev, "failed to acquire reset: scc_bcr (err: %d)\n", ret);
253 return ret;
254 }
255 data->ssc_reset = devm_reset_control_get_exclusive(&pdev->dev, "ssc_reset");
256 if (IS_ERR(data->ssc_reset)) {
257 ret = PTR_ERR(data->ssc_reset);
258 dev_err(&pdev->dev, "failed to acquire reset: ssc_reset: (err: %d)\n", ret);
259 return ret;
260 }
261
262 data->xo_clk = devm_clk_get(&pdev->dev, "xo");
263 if (IS_ERR(data->xo_clk)) {
264 ret = PTR_ERR(data->xo_clk);
265 if (ret != -EPROBE_DEFER)
266 dev_err(&pdev->dev, "Failed to get clock: xo (err: %d)\n", ret);
267 return ret;
268 }
269
270 data->aggre2_clk = devm_clk_get(&pdev->dev, "aggre2");
271 if (IS_ERR(data->aggre2_clk)) {
272 ret = PTR_ERR(data->aggre2_clk);
273 if (ret != -EPROBE_DEFER)
274 dev_err(&pdev->dev, "Failed to get clock: aggre2 (err: %d)\n", ret);
275 return ret;
276 }
277
278 data->gcc_im_sleep_clk = devm_clk_get(&pdev->dev, "gcc_im_sleep");
279 if (IS_ERR(data->gcc_im_sleep_clk)) {
280 ret = PTR_ERR(data->gcc_im_sleep_clk);
281 if (ret != -EPROBE_DEFER)
282 dev_err(&pdev->dev, "Failed to get clock: gcc_im_sleep (err: %d)\n", ret);
283 return ret;
284 }
285
286 data->aggre2_north_clk = devm_clk_get(&pdev->dev, "aggre2_north");
287 if (IS_ERR(data->aggre2_north_clk)) {
288 ret = PTR_ERR(data->aggre2_north_clk);
289 if (ret != -EPROBE_DEFER)
290 dev_err(&pdev->dev, "Failed to get clock: aggre2_north (err: %d)\n", ret);
291 return ret;
292 }
293
294 data->ssc_xo_clk = devm_clk_get(&pdev->dev, "ssc_xo");
295 if (IS_ERR(data->ssc_xo_clk)) {
296 ret = PTR_ERR(data->ssc_xo_clk);
297 if (ret != -EPROBE_DEFER)
298 dev_err(&pdev->dev, "Failed to get clock: ssc_xo (err: %d)\n", ret);
299 return ret;
300 }
301
302 data->ssc_ahbs_clk = devm_clk_get(&pdev->dev, "ssc_ahbs");
303 if (IS_ERR(data->ssc_ahbs_clk)) {
304 ret = PTR_ERR(data->ssc_ahbs_clk);
305 if (ret != -EPROBE_DEFER)
306 dev_err(&pdev->dev, "Failed to get clock: ssc_ahbs (err: %d)\n", ret);
307 return ret;
308 }
309
310 ret = of_parse_phandle_with_fixed_args(pdev->dev.of_node, "qcom,halt-regs", 1, 0,
311 &halt_args);
312 if (ret < 0) {
313 dev_err(&pdev->dev, "failed to parse qcom,halt-regs\n");
314 return -EINVAL;
315 }
316
317 data->halt_map = syscon_node_to_regmap(halt_args.np);
318 of_node_put(halt_args.np);
319 if (IS_ERR(data->halt_map))
320 return PTR_ERR(data->halt_map);
321
322 data->ssc_axi_halt = halt_args.args[0];
323
324 qcom_ssc_block_bus_init(&pdev->dev);
325
326 return 0;
327 }
328
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
ERROR: modpost: "bcsr_mod" [drivers/pcmcia/db1xxx_ss.ko] undefined!
by kernel test robot
Hi Arnd,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e783362eb54cd99b2cac8b3a9aeac942e6f6ac07
commit: 606b102876e3741851dfb09d53f3ee57f650a52c drm: fb_helper: fix CONFIG_FB dependency
date: 4 months ago
config: mips-randconfig-r002-20220120 (https://download.01.org/0day-ci/archive/20220123/202201231941.OMnmf2JQ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f7b7138a62648f4019c55e4671682af1f851f295)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 606b102876e3741851dfb09d53f3ee57f650a52c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "bcsr_mod" [drivers/pcmcia/db1xxx_ss.ko] undefined!
>> ERROR: modpost: "bcsr_read" [drivers/pcmcia/db1xxx_ss.ko] undefined!
--
arch/mips/boot/compressed/decompress.c:42:6: warning: no previous prototype for function 'error' [-Wmissing-prototypes]
void error(char *x)
^
arch/mips/boot/compressed/decompress.c:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void error(char *x)
^
static
In file included from arch/mips/boot/compressed/decompress.c:64:
In file included from arch/mips/boot/compressed/../../../../lib/decompress_unlz4.c:10:
>> arch/mips/boot/compressed/../../../../lib/lz4/lz4_decompress.c:506:5: warning: no previous prototype for function 'LZ4_decompress_safe_forceExtDict' [-Wmissing-prototypes]
int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
^
arch/mips/boot/compressed/../../../../lib/lz4/lz4_decompress.c:506:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
^
static
arch/mips/boot/compressed/decompress.c:85:6: warning: no previous prototype for function '__stack_chk_fail' [-Wmissing-prototypes]
void __stack_chk_fail(void)
^
arch/mips/boot/compressed/decompress.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __stack_chk_fail(void)
^
static
arch/mips/boot/compressed/decompress.c:90:6: warning: no previous prototype for function 'decompress_kernel' [-Wmissing-prototypes]
void decompress_kernel(unsigned long boot_heap_start)
^
arch/mips/boot/compressed/decompress.c:90:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void decompress_kernel(unsigned long boot_heap_start)
^
static
4 warnings generated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
[ammarfaizi2-block:google/android/kernel/common/android-4.19-stable 5722/9999] sound/soc/soc-core.c:761:27: warning: no previous prototype for 'soc_find_component_locked'
by kernel test robot
Hi Aditya,
FYI, the error/warning still remains.
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.19-stable
head: 90a691fca4c2525068d9908ac203e9f09e4e33c0
commit: 75fe91933be2dd4b884ca83bd72e1e0f0d05cfc6 [5722/9999] ANDROID: ASoC: core: add locked version of soc_find_component
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220123/202201231338.DICsQtPN-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/75fe91933be2dd4b884ca83...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.19-stable
git checkout 75fe91933be2dd4b884ca83bd72e1e0f0d05cfc6
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> sound/soc/soc-core.c:761:27: warning: no previous prototype for 'soc_find_component_locked' [-Wmissing-prototypes]
761 | struct snd_soc_component *soc_find_component_locked(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-core.c:2971: warning: Excess function parameter 'legacy_dai_naming' description in 'snd_soc_register_dais'
sound/soc/soc-core.c:3333: warning: Function parameter or member 'online' not described in 'snd_soc_card_change_online_state'
vim +/soc_find_component_locked +761 sound/soc/soc-core.c
750
751 /**
752 * soc_find_component_locked: soc_find_component with client lock acquired
753 *
754 * @of_node: of_node of the component to query.
755 * @name: name of the component to query.
756 *
757 * function to find out if a component is already registered with ASoC core.
758 *
759 * Returns component handle for success, else NULL error.
760 */
> 761 struct snd_soc_component *soc_find_component_locked(
762 const struct device_node *of_node, const char *name)
763 {
764 struct snd_soc_component *component = NULL;
765
766 mutex_lock(&client_mutex);
767 component = soc_find_component(of_node, name);
768 mutex_unlock(&client_mutex);
769 return component;
770 }
771 EXPORT_SYMBOL(soc_find_component_locked);
772
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
[ammarfaizi2-block:google/android/kernel/common/android-4.19-stable 527/9999] drivers/tty/serial/msm_geni_serial_console.c:479:6: warning: variable 'rx_stale' set but not used
by kernel test robot
Hi Mukesh,
FYI, the error/warning still remains.
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.19-stable
head: 90a691fca4c2525068d9908ac203e9f09e4e33c0
commit: 3b328707cf5e600683b13c9b19de3a3f22ea81e0 [527/9999] ANDROID: serial: msm_geni_serial_console : Add Earlycon support
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220123/202201230619.eSYoDVW1-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/3b328707cf5e600683b13c9...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.19-stable
git checkout 3b328707cf5e600683b13c9b19de3a3f22ea81e0
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/tty/serial/ mm/ sound/soc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/tty/serial/msm_geni_serial_console.c: In function 'msm_geni_serial_earlycon_setup':
>> drivers/tty/serial/msm_geni_serial_console.c:479:6: warning: variable 'rx_stale' set but not used [-Wunused-but-set-variable]
479 | u32 rx_stale = 0;
| ^~~~~~~~
>> drivers/tty/serial/msm_geni_serial_console.c:477:6: warning: variable 'rx_parity_cfg' set but not used [-Wunused-but-set-variable]
477 | u32 rx_parity_cfg = 0;
| ^~~~~~~~~~~~~
>> drivers/tty/serial/msm_geni_serial_console.c:476:6: warning: variable 'rx_trans_cfg' set but not used [-Wunused-but-set-variable]
476 | u32 rx_trans_cfg = 0;
| ^~~~~~~~~~~~
vim +/rx_stale +479 drivers/tty/serial/msm_geni_serial_console.c
467
468 static int __init
469 msm_geni_serial_earlycon_setup(struct earlycon_device *dev,
470 const char *opt)
471 {
472 struct uart_port *uport = &dev->port;
473 int ret = 0;
474 u32 tx_trans_cfg = 0;
475 u32 tx_parity_cfg = 0;
> 476 u32 rx_trans_cfg = 0;
> 477 u32 rx_parity_cfg = 0;
478 u32 stop_bit = 0;
> 479 u32 rx_stale = 0;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
[intel-lts:5.4/yocto 17077/20394] drivers/ptp/ptp-intel-pmc-tgpio.c:484:44: warning: missing braces around initializer
by kernel test robot
Hi Lakshmi,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 36f93ff941f127f4137ab369aecbdd995fb58c66
commit: 2948bbdc34f98909857c23acd79584143ea9e0b3 [17077/20394] ptp: S/W workaround for PMC TGPIO h/w bug
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220123/202201230247.DwSekzkf-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/2948bbdc34f98909857c23acd...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 2948bbdc34f98909857c23acd79584143ea9e0b3
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/ptp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/ptp/ptp-intel-pmc-tgpio.c: In function 'intel_pmc_tgpio_counttstamp':
>> drivers/ptp/ptp-intel-pmc-tgpio.c:484:44: warning: missing braces around initializer [-Wmissing-braces]
484 | static struct timespec64 dt_ts_prev[2] = {0, 0};
| ^
| { }
At top level:
drivers/ptp/ptp-intel-pmc-tgpio.c:754:36: warning: 'intel_pmc_acpi_match' defined but not used [-Wunused-const-variable=]
754 | static const struct acpi_device_id intel_pmc_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~
vim +484 drivers/ptp/ptp-intel-pmc-tgpio.c
473
474 static int intel_pmc_tgpio_counttstamp
475 (struct ptp_clock_info *info, struct ptp_event_count_tstamp *count)
476 {
477 struct intel_pmc_tgpio_t *tgpio = to_intel_pmc_tgpio(info);
478 u32 dt_hi_s;
479 u32 dt_hi_e;
480 u32 dt_lo;
481 struct timespec64 dt_ts;
482 struct timespec64 tsc_now;
483 static u32 dt_lo_prev[2] = {0, 0};
> 484 static struct timespec64 dt_ts_prev[2] = {0, 0};
485 static unsigned long long prev_count[2] = {0, 0};
486
487 mutex_lock(&intel_pmc_tgpio->lock);
488 while (intel_pmc_tgpio->pin[count->index].busy) {
489 mutex_unlock(&intel_pmc_tgpio->lock);
490 wait_for_completion
491 (&intel_pmc_tgpio->pin[count->index].transact_comp);
492 mutex_lock(&intel_pmc_tgpio->lock);
493 }
494 intel_pmc_tgpio->pin[count->index].busy = true;
495 mutex_unlock(&intel_pmc_tgpio->lock);
496
497 tsc_now = get_tsc_ns_now(NULL);
498 dt_hi_s = convert_tsc_ns_to_art(&tsc_now) >> 32;
499
500 /* Reading lower 32-bit word of Time Capture Value (TCV) loads */
501 /* the event time and event count capture */
502 dt_lo = INTEL_PMC_TGPIO_RD_REG(TGPIOTCV31_0, count->index);
503 count->event_count =
504 INTEL_PMC_TGPIO_RD_REG(TGPIOECCV63_32, count->index);
505 count->event_count <<= 32;
506 count->event_count |=
507 INTEL_PMC_TGPIO_RD_REG(TGPIOECCV31_0, count->index);
508 dt_hi_e = INTEL_PMC_TGPIO_RD_REG(TGPIOTCV63_32, count->index);
509
510 if (dt_hi_e != dt_hi_s && dt_lo >> 31)
511 dt_ts = convert_art_to_tsc_ns(((u64)dt_hi_s << 32) | dt_lo);
512 else
513 dt_ts = convert_art_to_tsc_ns(((u64)dt_hi_e << 32) | dt_lo);
514
515 /* Return previous device time if the event_count
516 * isn't incremented with TCV value
517 */
518 if (count->event_count == prev_count[count->index] ||
519 dt_lo_prev[count->index] == dt_lo) {
520 count->event_count = prev_count[count->index];
521 dt_lo = dt_lo_prev[count->index];
522 dt_ts = dt_ts_prev[count->index];
523 }
524
525 count->device_time = ts64_to_ptp_clock_time(dt_ts);
526 prev_count[count->index] = count->event_count;
527 dt_lo_prev[count->index] = dt_lo;
528 dt_ts_prev[count->index] = dt_ts;
529
530 mutex_lock(&intel_pmc_tgpio->lock);
531 intel_pmc_tgpio->pin[count->index].busy = false;
532 complete(&intel_pmc_tgpio->pin[count->index].transact_comp);
533 mutex_unlock(&intel_pmc_tgpio->lock);
534
535 return 0;
536 }
537
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months