From: kernel test robot <lkp@intel.com>
To: Mason Zhang <Mason.Zhang@mediatek.com>,
Mark Brown <broonie@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: kbuild-all@lists.01.org, Laxman Dewangan <ldewangan@nvidia.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com,
Mason Zhang <Mason.Zhang@mediatek.com>
Subject: Re: [PATCH 1/1] spi: tegra114: Fix set_cs_timing param
Date: Tue, 3 Aug 2021 17:14:51 +0800 [thread overview]
Message-ID: <202108031744.g063aSQs-lkp@intel.com> (raw)
In-Reply-To: <20210803021328.28291-1-Mason.Zhang@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 4963 bytes --]
Hi Mason,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on spi/for-next]
[also build test ERROR on v5.14-rc4 next-20210802]
[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/Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
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/8920b64abf63231756f3910e4954bdda80d01257
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
git checkout 8920b64abf63231756f3910e4954bdda80d01257
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/ drivers/spi/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/spi/spi-tegra114.c: In function 'tegra_spi_set_hw_cs_timing':
>> drivers/spi/spi-tegra114.c:723:32: error: 'struct spi_device' has no member named 'cs_setup'
723 | struct spi_delay *setup = &spi->cs_setup;
| ^~
>> drivers/spi/spi-tegra114.c:724:31: error: 'struct spi_device' has no member named 'cs_hold'
724 | struct spi_delay *hold = &spi->cs_hold;
| ^~
>> drivers/spi/spi-tegra114.c:725:35: error: 'struct spi_device' has no member named 'cs_inactive'
725 | struct spi_delay *inactive = &spi->cs_inactive;
| ^~
drivers/spi/spi-tegra114.c: In function 'tegra_spi_probe':
>> drivers/spi/spi-tegra114.c:1328:24: error: assignment to 'int (*)(struct spi_device *, struct spi_delay *, struct spi_delay *, struct spi_delay *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
1328 | master->set_cs_timing = tegra_spi_set_hw_cs_timing;
| ^
cc1: some warnings being treated as errors
vim +723 drivers/spi/spi-tegra114.c
719
720 static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
721 {
722 struct tegra_spi_data *tspi = spi_master_get_devdata(spi->master);
> 723 struct spi_delay *setup = &spi->cs_setup;
> 724 struct spi_delay *hold = &spi->cs_hold;
> 725 struct spi_delay *inactive = &spi->cs_inactive;
726 u8 setup_dly, hold_dly, inactive_dly;
727 u32 setup_hold;
728 u32 spi_cs_timing;
729 u32 inactive_cycles;
730 u8 cs_state;
731
732 if ((setup && setup->unit != SPI_DELAY_UNIT_SCK) ||
733 (hold && hold->unit != SPI_DELAY_UNIT_SCK) ||
734 (inactive && inactive->unit != SPI_DELAY_UNIT_SCK)) {
735 dev_err(&spi->dev,
736 "Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
737 SPI_DELAY_UNIT_SCK);
738 return -EINVAL;
739 }
740
741 setup_dly = setup ? setup->value : 0;
742 hold_dly = hold ? hold->value : 0;
743 inactive_dly = inactive ? inactive->value : 0;
744
745 setup_dly = min_t(u8, setup_dly, MAX_SETUP_HOLD_CYCLES);
746 hold_dly = min_t(u8, hold_dly, MAX_SETUP_HOLD_CYCLES);
747 if (setup_dly && hold_dly) {
748 setup_hold = SPI_SETUP_HOLD(setup_dly - 1, hold_dly - 1);
749 spi_cs_timing = SPI_CS_SETUP_HOLD(tspi->spi_cs_timing1,
750 spi->chip_select,
751 setup_hold);
752 if (tspi->spi_cs_timing1 != spi_cs_timing) {
753 tspi->spi_cs_timing1 = spi_cs_timing;
754 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING1);
755 }
756 }
757
758 inactive_cycles = min_t(u8, inactive_dly, MAX_INACTIVE_CYCLES);
759 if (inactive_cycles)
760 inactive_cycles--;
761 cs_state = inactive_cycles ? 0 : 1;
762 spi_cs_timing = tspi->spi_cs_timing2;
763 SPI_SET_CS_ACTIVE_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
764 cs_state);
765 SPI_SET_CYCLES_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
766 inactive_cycles);
767 if (tspi->spi_cs_timing2 != spi_cs_timing) {
768 tspi->spi_cs_timing2 = spi_cs_timing;
769 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING2);
770 }
771
772 return 0;
773 }
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60677 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Mason Zhang <Mason.Zhang@mediatek.com>,
Mark Brown <broonie@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: kbuild-all@lists.01.org, Laxman Dewangan <ldewangan@nvidia.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com,
Mason Zhang <Mason.Zhang@mediatek.com>
Subject: Re: [PATCH 1/1] spi: tegra114: Fix set_cs_timing param
Date: Tue, 3 Aug 2021 17:14:51 +0800 [thread overview]
Message-ID: <202108031744.g063aSQs-lkp@intel.com> (raw)
In-Reply-To: <20210803021328.28291-1-Mason.Zhang@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 4963 bytes --]
Hi Mason,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on spi/for-next]
[also build test ERROR on v5.14-rc4 next-20210802]
[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/Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
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/8920b64abf63231756f3910e4954bdda80d01257
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
git checkout 8920b64abf63231756f3910e4954bdda80d01257
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/ drivers/spi/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/spi/spi-tegra114.c: In function 'tegra_spi_set_hw_cs_timing':
>> drivers/spi/spi-tegra114.c:723:32: error: 'struct spi_device' has no member named 'cs_setup'
723 | struct spi_delay *setup = &spi->cs_setup;
| ^~
>> drivers/spi/spi-tegra114.c:724:31: error: 'struct spi_device' has no member named 'cs_hold'
724 | struct spi_delay *hold = &spi->cs_hold;
| ^~
>> drivers/spi/spi-tegra114.c:725:35: error: 'struct spi_device' has no member named 'cs_inactive'
725 | struct spi_delay *inactive = &spi->cs_inactive;
| ^~
drivers/spi/spi-tegra114.c: In function 'tegra_spi_probe':
>> drivers/spi/spi-tegra114.c:1328:24: error: assignment to 'int (*)(struct spi_device *, struct spi_delay *, struct spi_delay *, struct spi_delay *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
1328 | master->set_cs_timing = tegra_spi_set_hw_cs_timing;
| ^
cc1: some warnings being treated as errors
vim +723 drivers/spi/spi-tegra114.c
719
720 static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
721 {
722 struct tegra_spi_data *tspi = spi_master_get_devdata(spi->master);
> 723 struct spi_delay *setup = &spi->cs_setup;
> 724 struct spi_delay *hold = &spi->cs_hold;
> 725 struct spi_delay *inactive = &spi->cs_inactive;
726 u8 setup_dly, hold_dly, inactive_dly;
727 u32 setup_hold;
728 u32 spi_cs_timing;
729 u32 inactive_cycles;
730 u8 cs_state;
731
732 if ((setup && setup->unit != SPI_DELAY_UNIT_SCK) ||
733 (hold && hold->unit != SPI_DELAY_UNIT_SCK) ||
734 (inactive && inactive->unit != SPI_DELAY_UNIT_SCK)) {
735 dev_err(&spi->dev,
736 "Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
737 SPI_DELAY_UNIT_SCK);
738 return -EINVAL;
739 }
740
741 setup_dly = setup ? setup->value : 0;
742 hold_dly = hold ? hold->value : 0;
743 inactive_dly = inactive ? inactive->value : 0;
744
745 setup_dly = min_t(u8, setup_dly, MAX_SETUP_HOLD_CYCLES);
746 hold_dly = min_t(u8, hold_dly, MAX_SETUP_HOLD_CYCLES);
747 if (setup_dly && hold_dly) {
748 setup_hold = SPI_SETUP_HOLD(setup_dly - 1, hold_dly - 1);
749 spi_cs_timing = SPI_CS_SETUP_HOLD(tspi->spi_cs_timing1,
750 spi->chip_select,
751 setup_hold);
752 if (tspi->spi_cs_timing1 != spi_cs_timing) {
753 tspi->spi_cs_timing1 = spi_cs_timing;
754 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING1);
755 }
756 }
757
758 inactive_cycles = min_t(u8, inactive_dly, MAX_INACTIVE_CYCLES);
759 if (inactive_cycles)
760 inactive_cycles--;
761 cs_state = inactive_cycles ? 0 : 1;
762 spi_cs_timing = tspi->spi_cs_timing2;
763 SPI_SET_CS_ACTIVE_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
764 cs_state);
765 SPI_SET_CYCLES_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
766 inactive_cycles);
767 if (tspi->spi_cs_timing2 != spi_cs_timing) {
768 tspi->spi_cs_timing2 = spi_cs_timing;
769 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING2);
770 }
771
772 return 0;
773 }
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60677 bytes --]
[-- Attachment #3: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Mason Zhang <Mason.Zhang@mediatek.com>,
Mark Brown <broonie@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: kbuild-all@lists.01.org, Laxman Dewangan <ldewangan@nvidia.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com,
Mason Zhang <Mason.Zhang@mediatek.com>
Subject: Re: [PATCH 1/1] spi: tegra114: Fix set_cs_timing param
Date: Tue, 3 Aug 2021 17:14:51 +0800 [thread overview]
Message-ID: <202108031744.g063aSQs-lkp@intel.com> (raw)
In-Reply-To: <20210803021328.28291-1-Mason.Zhang@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 4963 bytes --]
Hi Mason,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on spi/for-next]
[also build test ERROR on v5.14-rc4 next-20210802]
[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/Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
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/8920b64abf63231756f3910e4954bdda80d01257
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
git checkout 8920b64abf63231756f3910e4954bdda80d01257
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/ drivers/spi/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/spi/spi-tegra114.c: In function 'tegra_spi_set_hw_cs_timing':
>> drivers/spi/spi-tegra114.c:723:32: error: 'struct spi_device' has no member named 'cs_setup'
723 | struct spi_delay *setup = &spi->cs_setup;
| ^~
>> drivers/spi/spi-tegra114.c:724:31: error: 'struct spi_device' has no member named 'cs_hold'
724 | struct spi_delay *hold = &spi->cs_hold;
| ^~
>> drivers/spi/spi-tegra114.c:725:35: error: 'struct spi_device' has no member named 'cs_inactive'
725 | struct spi_delay *inactive = &spi->cs_inactive;
| ^~
drivers/spi/spi-tegra114.c: In function 'tegra_spi_probe':
>> drivers/spi/spi-tegra114.c:1328:24: error: assignment to 'int (*)(struct spi_device *, struct spi_delay *, struct spi_delay *, struct spi_delay *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
1328 | master->set_cs_timing = tegra_spi_set_hw_cs_timing;
| ^
cc1: some warnings being treated as errors
vim +723 drivers/spi/spi-tegra114.c
719
720 static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
721 {
722 struct tegra_spi_data *tspi = spi_master_get_devdata(spi->master);
> 723 struct spi_delay *setup = &spi->cs_setup;
> 724 struct spi_delay *hold = &spi->cs_hold;
> 725 struct spi_delay *inactive = &spi->cs_inactive;
726 u8 setup_dly, hold_dly, inactive_dly;
727 u32 setup_hold;
728 u32 spi_cs_timing;
729 u32 inactive_cycles;
730 u8 cs_state;
731
732 if ((setup && setup->unit != SPI_DELAY_UNIT_SCK) ||
733 (hold && hold->unit != SPI_DELAY_UNIT_SCK) ||
734 (inactive && inactive->unit != SPI_DELAY_UNIT_SCK)) {
735 dev_err(&spi->dev,
736 "Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
737 SPI_DELAY_UNIT_SCK);
738 return -EINVAL;
739 }
740
741 setup_dly = setup ? setup->value : 0;
742 hold_dly = hold ? hold->value : 0;
743 inactive_dly = inactive ? inactive->value : 0;
744
745 setup_dly = min_t(u8, setup_dly, MAX_SETUP_HOLD_CYCLES);
746 hold_dly = min_t(u8, hold_dly, MAX_SETUP_HOLD_CYCLES);
747 if (setup_dly && hold_dly) {
748 setup_hold = SPI_SETUP_HOLD(setup_dly - 1, hold_dly - 1);
749 spi_cs_timing = SPI_CS_SETUP_HOLD(tspi->spi_cs_timing1,
750 spi->chip_select,
751 setup_hold);
752 if (tspi->spi_cs_timing1 != spi_cs_timing) {
753 tspi->spi_cs_timing1 = spi_cs_timing;
754 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING1);
755 }
756 }
757
758 inactive_cycles = min_t(u8, inactive_dly, MAX_INACTIVE_CYCLES);
759 if (inactive_cycles)
760 inactive_cycles--;
761 cs_state = inactive_cycles ? 0 : 1;
762 spi_cs_timing = tspi->spi_cs_timing2;
763 SPI_SET_CS_ACTIVE_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
764 cs_state);
765 SPI_SET_CYCLES_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
766 inactive_cycles);
767 if (tspi->spi_cs_timing2 != spi_cs_timing) {
768 tspi->spi_cs_timing2 = spi_cs_timing;
769 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING2);
770 }
771
772 return 0;
773 }
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60677 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/1] spi: tegra114: Fix set_cs_timing param
Date: Tue, 03 Aug 2021 17:14:51 +0800 [thread overview]
Message-ID: <202108031744.g063aSQs-lkp@intel.com> (raw)
In-Reply-To: <20210803021328.28291-1-Mason.Zhang@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 5074 bytes --]
Hi Mason,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on spi/for-next]
[also build test ERROR on v5.14-rc4 next-20210802]
[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/Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
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/8920b64abf63231756f3910e4954bdda80d01257
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
git checkout 8920b64abf63231756f3910e4954bdda80d01257
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/ drivers/spi/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/spi/spi-tegra114.c: In function 'tegra_spi_set_hw_cs_timing':
>> drivers/spi/spi-tegra114.c:723:32: error: 'struct spi_device' has no member named 'cs_setup'
723 | struct spi_delay *setup = &spi->cs_setup;
| ^~
>> drivers/spi/spi-tegra114.c:724:31: error: 'struct spi_device' has no member named 'cs_hold'
724 | struct spi_delay *hold = &spi->cs_hold;
| ^~
>> drivers/spi/spi-tegra114.c:725:35: error: 'struct spi_device' has no member named 'cs_inactive'
725 | struct spi_delay *inactive = &spi->cs_inactive;
| ^~
drivers/spi/spi-tegra114.c: In function 'tegra_spi_probe':
>> drivers/spi/spi-tegra114.c:1328:24: error: assignment to 'int (*)(struct spi_device *, struct spi_delay *, struct spi_delay *, struct spi_delay *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
1328 | master->set_cs_timing = tegra_spi_set_hw_cs_timing;
| ^
cc1: some warnings being treated as errors
vim +723 drivers/spi/spi-tegra114.c
719
720 static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
721 {
722 struct tegra_spi_data *tspi = spi_master_get_devdata(spi->master);
> 723 struct spi_delay *setup = &spi->cs_setup;
> 724 struct spi_delay *hold = &spi->cs_hold;
> 725 struct spi_delay *inactive = &spi->cs_inactive;
726 u8 setup_dly, hold_dly, inactive_dly;
727 u32 setup_hold;
728 u32 spi_cs_timing;
729 u32 inactive_cycles;
730 u8 cs_state;
731
732 if ((setup && setup->unit != SPI_DELAY_UNIT_SCK) ||
733 (hold && hold->unit != SPI_DELAY_UNIT_SCK) ||
734 (inactive && inactive->unit != SPI_DELAY_UNIT_SCK)) {
735 dev_err(&spi->dev,
736 "Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
737 SPI_DELAY_UNIT_SCK);
738 return -EINVAL;
739 }
740
741 setup_dly = setup ? setup->value : 0;
742 hold_dly = hold ? hold->value : 0;
743 inactive_dly = inactive ? inactive->value : 0;
744
745 setup_dly = min_t(u8, setup_dly, MAX_SETUP_HOLD_CYCLES);
746 hold_dly = min_t(u8, hold_dly, MAX_SETUP_HOLD_CYCLES);
747 if (setup_dly && hold_dly) {
748 setup_hold = SPI_SETUP_HOLD(setup_dly - 1, hold_dly - 1);
749 spi_cs_timing = SPI_CS_SETUP_HOLD(tspi->spi_cs_timing1,
750 spi->chip_select,
751 setup_hold);
752 if (tspi->spi_cs_timing1 != spi_cs_timing) {
753 tspi->spi_cs_timing1 = spi_cs_timing;
754 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING1);
755 }
756 }
757
758 inactive_cycles = min_t(u8, inactive_dly, MAX_INACTIVE_CYCLES);
759 if (inactive_cycles)
760 inactive_cycles--;
761 cs_state = inactive_cycles ? 0 : 1;
762 spi_cs_timing = tspi->spi_cs_timing2;
763 SPI_SET_CS_ACTIVE_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
764 cs_state);
765 SPI_SET_CYCLES_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
766 inactive_cycles);
767 if (tspi->spi_cs_timing2 != spi_cs_timing) {
768 tspi->spi_cs_timing2 = spi_cs_timing;
769 tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING2);
770 }
771
772 return 0;
773 }
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60677 bytes --]
next prev parent reply other threads:[~2021-08-03 9:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 2:13 [PATCH 1/1] spi: tegra114: Fix set_cs_timing param Mason Zhang
2021-08-03 2:13 ` Mason Zhang
2021-08-03 2:13 ` Mason Zhang
2021-08-03 9:14 ` kernel test robot [this message]
2021-08-03 9:14 ` kernel test robot
2021-08-03 9:14 ` kernel test robot
2021-08-03 9:14 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108031744.g063aSQs-lkp@intel.com \
--to=lkp@intel.com \
--cc=Mason.Zhang@mediatek.com \
--cc=broonie@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.