stable-rc: 5.15: arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared (first use in this function)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On stable-rc 5.15 arm builds failed due to following errors / warnings.

arch/arm/mach-at91/pm.c: In function 'at91_suspend_finish':
arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared
(first use in this function)
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                                                    ^~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:35:51: note: in
definition of macro '__le32_to_cpu'
   35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
      |                                                   ^
arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
  303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
__iormb(); __v; })
      |                                              ^~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                       ^~~~~
arch/arm/mach-at91/pm.c:370:52: note: each undeclared identifier is
reported only once for each function it appears in
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                                                    ^~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:35:51: note: in
definition of macro '__le32_to_cpu'
   35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
      |                                                   ^
arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
  303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
__iormb(); __v; })
      |                                              ^~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                       ^~~~~
arch/arm/mach-at91/pm.c:373:33: error: 'DDR3PHY_ZQ0SR0_PDO_OFF'
undeclared (first use in this function)
  373 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:377:33: error: 'DDR3PHY_ZQ0SR0_PUO_OFF'
undeclared (first use in this function)
  377 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:381:33: error: 'DDR3PHY_ZQ0SR0_PDODT_OFF'
undeclared (first use in this function)
  381 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:385:33: error: 'DDR3PHY_ZQ0SRO_PUODT_OFF'
undeclared (first use in this function)
  385 |                 index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:289: arch/arm/mach-at91/pm.o] Error 1

Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>

Build link:
 - https://builds.tuxbuild.com/2EfrKWiY7k1znh1Nt7nFQmRuyRc/

# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#

tuxmake --runtime podman --target-arch arm --toolchain gcc-11
--kconfig at91_dt_defconfig

Following patch seems to be causing these build failures on stable-rc 5.15.
---
ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh
[ Upstream commit 7a94b83a7dc551607b6c4400df29151e6a951f07 ]

On SAMA7G5, when resuming from backup and self-refresh, the bootloader
performs DDR PHY recalibration by restoring the value of ZQ0SR0 (stored
in RAM by Linux before going to backup and self-refresh). It has been
discovered that the current procedure doesn't work for all possible values
that might go to ZQ0SR0 due to hardware bug. The workaround to this is to
avoid storing some values in ZQ0SR0. Thus Linux will read the ZQ0SR0
register and cache its value in RAM after processing it (using
modified_gray_code array). The bootloader will restore the processed value.

Fixes: d2d4716d8384 ("ARM: at91: pm: save ddr phy calibration data to securam")
Suggested-by: Frederic Schumacher <frederic.schumacher@xxxxxxxxxxxxx>
Signed-off-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20220826083927.3107272-4-claudiu.beznea@xxxxxxxxxxxxx
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>



--
Linaro LKFT
https://lkft.linaro.org



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux