Date   

Re: [isar-cip-core][PATCH v2 2/2] swupdate: Drop conditional includes for buster

Kanagarajan, Vijaikumar
 

-----Original Message-----
From: Jan Kiszka <jan.kiszka@...>
Sent: 16 December 2021 19:09
To: Kanagarajan, Vijaikumar <Vijaikumar_Kanagarajan@...>; cip-
dev@...
Subject: Re: [isar-cip-core][PATCH v2 2/2] swupdate: Drop conditional
includes for buster

On 16.12.21 14:36, Vijai Kumar K wrote:
Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..51aacfe 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -44,12 +44,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# modify for debian buster build
SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-
debian-buster.patch"

-# disable documentation due to missing packages in debian buster -#
disable create filesystem due to missing symbols in debian buster -#
disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages # disable create
+filesystem due to missing symbols # disable webserver due to missing
+symbols SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not
detect other # compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"
So these things were actually broken for bullseye so far?
Yes. Atleast, the nodoc is needed because of sphinx dependency issue in bullseye.

Thanks,
Vijai Kumar K


Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


Re: [isar-cip-core][PATCH v2 2/2] swupdate: Drop conditional includes for buster

Quirin Gylstorff
 

On 12/16/21 14:38, Jan Kiszka via lists.cip-project.org wrote:
On 16.12.21 14:36, Vijai Kumar K wrote:
Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..51aacfe 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -44,12 +44,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# modify for debian buster build
SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-debian-buster.patch"
-# disable documentation due to missing packages in debian buster
-# disable create filesystem due to missing symbols in debian buster
-# disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages
+# disable create filesystem due to missing symbols
+# disable webserver due to missing symbols
+SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not detect other
# compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"
So these things were actually broken for bullseye so far?
From my testing only the option nodoc is necessary for bullseye.


Quirin
Jan


Re: [isar-cip-core][PATCH v2 2/2] swupdate: Drop conditional includes for buster

Jan Kiszka
 

On 16.12.21 14:36, Vijai Kumar K wrote:
Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..51aacfe 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -44,12 +44,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# modify for debian buster build
SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-debian-buster.patch"

-# disable documentation due to missing packages in debian buster
-# disable create filesystem due to missing symbols in debian buster
-# disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages
+# disable create filesystem due to missing symbols
+# disable webserver due to missing symbols
+SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not detect other
# compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"
So these things were actually broken for bullseye so far?

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


[isar-cip-core][PATCH v2 2/2] swupdate: Drop conditional includes for buster

Kanagarajan, Vijaikumar
 

Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..51aacfe 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -44,12 +44,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# modify for debian buster build
SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-debian-buster.patch"

-# disable documentation due to missing packages in debian buster
-# disable create filesystem due to missing symbols in debian buster
-# disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages
+# disable create filesystem due to missing symbols
+# disable webserver due to missing symbols
+SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not detect other
# compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"
--
2.25.1


[isar-cip-core][PATCH v2 1/2] Drop stretch support

Kanagarajan, Vijaikumar
 

The generic profile of CIP Core started its work with buster,
stretch was only experimental for this layer.

Remove the support now.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
Kconfig | 4 ----
conf/distro/cip-core-stretch.conf | 16 ----------------
conf/machine/bbb.conf | 4 ----
kas/opt/stretch.yml | 15 ---------------
start-qemu.sh | 2 --
5 files changed, 41 deletions(-)
delete mode 100644 conf/distro/cip-core-stretch.conf
delete mode 100644 kas/opt/stretch.yml

diff --git a/Kconfig b/Kconfig
index e69293f..8032ede 100644
--- a/Kconfig
+++ b/Kconfig
@@ -82,9 +82,6 @@ choice
prompt "Debian Release"
default DEBIAN_BUSTER

-config DEBIAN_STRETCH
- bool "stretch (9)"
-
config DEBIAN_BUSTER
bool "buster (10)"

@@ -95,7 +92,6 @@ endchoice

config KAS_INCLUDE_DEBIAN
string
- default "kas/opt/stretch.yml" if DEBIAN_STRETCH
default "kas/opt/bullseye.yml" if DEBIAN_BULLSEYE

comment "Image features"
diff --git a/conf/distro/cip-core-stretch.conf b/conf/distro/cip-core-stretch.conf
deleted file mode 100644
index 31900fa..0000000
--- a/conf/distro/cip-core-stretch.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# CIP Core, generic profile
-#
-# Copyright (c) Siemens AG, 2019
-#
-# Authors:
-# Jan Kiszka <jan.kiszka@...>
-#
-# SPDX-License-Identifier: MIT
-#
-
-require conf/distro/debian-stretch.conf
-require cip-core-common.inc
-
-PREFERRED_VERSION_linux-cip ?= "4.19.%"
-PREFERRED_VERSION_linux-cip-rt ?= "4.19.%"
diff --git a/conf/machine/bbb.conf b/conf/machine/bbb.conf
index a9b460e..6d8facb 100644
--- a/conf/machine/bbb.conf
+++ b/conf/machine/bbb.conf
@@ -11,8 +11,4 @@ DISTRO_ARCH = "armhf"
IMAGE_TYPE ?= "wic-img"
IMAGER_INSTALL += "u-boot-omap"

-# On stretch, select U-Boot from buster which comes with distro-boot support
-DISTRO_APT_SOURCES_append_cip-core-stretch = " conf/distro/debian-buster.list"
-DISTRO_APT_PREFERENCES_cip-core-stretch += "conf/machine/preferences.bbb.conf"
-
IMAGE_INSTALL += "u-boot-script"
diff --git a/kas/opt/stretch.yml b/kas/opt/stretch.yml
deleted file mode 100644
index 8e854c2..0000000
--- a/kas/opt/stretch.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# CIP Core, generic profile
-#
-# Copyright (c) Siemens AG, 2019
-#
-# Authors:
-# Jan Kiszka <jan.kiszka@...>
-#
-# SPDX-License-Identifier: MIT
-#
-
-header:
- version: 10
-
-distro: cip-core-stretch
diff --git a/start-qemu.sh b/start-qemu.sh
index 4ab3861..489e0e0 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -33,8 +33,6 @@ fi
if [ -z "${DISTRO_RELEASE}" ]; then
if grep -s -q "DEBIAN_BULLSEYE: true" .config.yaml; then
DISTRO_RELEASE="bullseye"
- elif grep -s -q "DEBIAN_STRETCH: true" .config.yaml; then
- DISTRO_RELEASE="stretch"
else
DISTRO_RELEASE="buster"
fi
--
2.25.1


[isar-cip-core][PATCH v2 0/2] Drop Stretch support

Kanagarajan, Vijaikumar
 

Changes since v1:
- Change P1 commit message
- Bring back conditional include of buster patch for swupdate

This series has 2 patches

P1 drops stretch support
P2 cleans up overrides / conditional includes for buster/bullseye

CI Job is successful:
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/pipelines/430980698

Thanks,
Vijai Kumar K

Vijai Kumar K (2):
Drop stretch support
swupdate: Drop conditional includes for buster

Kconfig | 4 ----
conf/distro/cip-core-stretch.conf | 16 ----------------
conf/machine/bbb.conf | 4 ----
kas/opt/stretch.yml | 15 ---------------
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 12 ++++++------
start-qemu.sh | 2 --
6 files changed, 6 insertions(+), 47 deletions(-)
delete mode 100644 conf/distro/cip-core-stretch.conf
delete mode 100644 kas/opt/stretch.yml

--
2.25.1


Re: [isar-cip-core][PATCH 1/2] Drop stretch support

Kanagarajan, Vijaikumar
 

-----Original Message-----
From: Jan Kiszka <jan.kiszka@...>
Sent: 16 December 2021 18:54
To: Kanagarajan, Vijaikumar <Vijaikumar_Kanagarajan@...>; cip-
dev@...
Subject: Re: [isar-cip-core][PATCH 1/2] Drop stretch support

On 16.12.21 14:04, Vijai Kumar K wrote:
stretch is now old enough to be dropped. Support the current
stable(bullseye) and old-stable(buster).
The more accurate reasoning would be that the generic profile of CIP Core
does started its work with buster, stretch was only experimental for this
layer.
Will update the commit message.

Thanks,
Vijai Kumar K


Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


Re: [isar-cip-core][PATCH 1/2] Drop stretch support

Jan Kiszka
 

On 16.12.21 14:04, Vijai Kumar K wrote:
stretch is now old enough to be dropped. Support the current
stable(bullseye) and old-stable(buster).
The more accurate reasoning would be that the generic profile of CIP
Core does started its work with buster, stretch was only experimental
for this layer.

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


Re: [isar-cip-core][PATCH 2/2] swupdate: Drop conditional includes for buster

Kanagarajan, Vijaikumar
 

-----Original Message-----
From: cip-dev@... <cip-dev@...> On Behalf
Of Quirin Gylstorff
Sent: 16 December 2021 18:40
To: cip-dev@...; jan.kiszka@...
Cc: Kanagarajan, Vijaikumar <Vijaikumar_Kanagarajan@...>
Subject: Re: [cip-dev] [isar-cip-core][PATCH 2/2] swupdate: Drop conditional
includes for buster

Hi,

On 12/16/21 14:04, Kanagarajan, Vijaikumar via lists.cip-project.org wrote:
Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..826982a 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -23,7 +23,8 @@ SRC_URI += "file://0001-debian-Add-option-to-build-
with-efibootguard.patch \
file://0005-debian-rules-Add-option-to-disable-fs-creation.patch \
file://0006-debian-rules-Add-option-to-disable-webserver.patch \
file://0007-debian-Make-CONFIG_HW_COMPATIBILTY-
optional.patch \
- file://0008-debian-rules-Add-Embedded-Lua-handler-option.patch"
+ file://0008-debian-rules-Add-Embedded-Lua-handler-option.patch
\
+ file://0009-debian-prepare-build-for-isar-debian-buster.patch"
The patch 0009-debian-prepare-build-for-isar-debian-buster.patch should
not be applied to bullseye as it can have an impact on the functionality of
SWUpdate.
Ok. I was under the impression that it should not matter. Will send a v2.

Thanks,
Vijai Kumar K


Quirin

# Patch for dm-verity based images - can be removed with next SWUpdate
release
SRC_URI += "file://0001-debian-patches-add-patches-for-dm-verity.patch"
@@ -41,15 +42,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# GBP_DEPENDS += "swupdate-handlers"
# SWUPDATE_BUILD_PROFILES += "pkg.swupdate.embeddedlua"

-# modify for debian buster build
-SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-
debian-buster.patch"
-
-# disable documentation due to missing packages in debian buster -#
disable create filesystem due to missing symbols in debian buster -#
disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages # disable create
+filesystem due to missing symbols # disable webserver due to missing
+symbols SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not detect
other
# compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"





Re: [isar-cip-core][PATCH 2/2] swupdate: Drop conditional includes for buster

Quirin Gylstorff
 

Hi,

On 12/16/21 14:04, Kanagarajan, Vijaikumar via lists.cip-project.org wrote:
Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..826982a 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -23,7 +23,8 @@ SRC_URI += "file://0001-debian-Add-option-to-build-with-efibootguard.patch \
file://0005-debian-rules-Add-option-to-disable-fs-creation.patch \
file://0006-debian-rules-Add-option-to-disable-webserver.patch \
file://0007-debian-Make-CONFIG_HW_COMPATIBILTY-optional.patch \
- file://0008-debian-rules-Add-Embedded-Lua-handler-option.patch"
+ file://0008-debian-rules-Add-Embedded-Lua-handler-option.patch \
+ file://0009-debian-prepare-build-for-isar-debian-buster.patch"
The patch 0009-debian-prepare-build-for-isar-debian-buster.patch should not be applied to bullseye as it can have an impact on the functionality of SWUpdate.

Quirin
# Patch for dm-verity based images - can be removed with next SWUpdate release
SRC_URI += "file://0001-debian-patches-add-patches-for-dm-verity.patch"
@@ -41,15 +42,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# GBP_DEPENDS += "swupdate-handlers"
# SWUPDATE_BUILD_PROFILES += "pkg.swupdate.embeddedlua"
-# modify for debian buster build
-SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-debian-buster.patch"
-
-# disable documentation due to missing packages in debian buster
-# disable create filesystem due to missing symbols in debian buster
-# disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages
+# disable create filesystem due to missing symbols
+# disable webserver due to missing symbols
+SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not detect other
# compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"


[isar-cip-core][PATCH 2/2] swupdate: Drop conditional includes for buster

Kanagarajan, Vijaikumar
 

Stretch in now dropped. The conditional includes for buster is now not
needed. Those includes are applicable to buster as well as bullseye.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
index a4d67fe..826982a 100644
--- a/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
+++ b/recipes-core/swupdate/swupdate_2021.04-1+debian-gbp.bb
@@ -23,7 +23,8 @@ SRC_URI += "file://0001-debian-Add-option-to-build-with-efibootguard.patch \
file://0005-debian-rules-Add-option-to-disable-fs-creation.patch \
file://0006-debian-rules-Add-option-to-disable-webserver.patch \
file://0007-debian-Make-CONFIG_HW_COMPATIBILTY-optional.patch \
- file://0008-debian-rules-Add-Embedded-Lua-handler-option.patch"
+ file://0008-debian-rules-Add-Embedded-Lua-handler-option.patch \
+ file://0009-debian-prepare-build-for-isar-debian-buster.patch"

# Patch for dm-verity based images - can be removed with next SWUpdate release
SRC_URI += "file://0001-debian-patches-add-patches-for-dm-verity.patch"
@@ -41,15 +42,12 @@ SWUPDATE_BUILD_PROFILES += "cross nocheck"
# GBP_DEPENDS += "swupdate-handlers"
# SWUPDATE_BUILD_PROFILES += "pkg.swupdate.embeddedlua"

-# modify for debian buster build
-SRC_URI_append_buster = " file://0009-debian-prepare-build-for-isar-debian-buster.patch"
-
-# disable documentation due to missing packages in debian buster
-# disable create filesystem due to missing symbols in debian buster
-# disable webserver due to missing symbols in debian buster
-SWUPDATE_BUILD_PROFILES_append_buster = " nodoc \
- pkg.swupdate.nocreatefs \
- pkg.swupdate.nowebserver "
+# disable documentation due to missing packages
+# disable create filesystem due to missing symbols
+# disable webserver due to missing symbols
+SWUPDATE_BUILD_PROFILES_append = " nodoc \
+ pkg.swupdate.nocreatefs \
+ pkg.swupdate.nowebserver "
# In debian buster the git-compression defaults to gz and does not detect other
# compression formats.
GBP_EXTRA_OPTIONS += "--git-compression=xz"
--
2.25.1


[isar-cip-core][PATCH 1/2] Drop stretch support

Kanagarajan, Vijaikumar
 

stretch is now old enough to be dropped. Support the current
stable(bullseye) and old-stable(buster).

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@...>
---
Kconfig | 4 ----
conf/distro/cip-core-stretch.conf | 16 ----------------
conf/machine/bbb.conf | 4 ----
kas/opt/stretch.yml | 15 ---------------
start-qemu.sh | 2 --
5 files changed, 41 deletions(-)
delete mode 100644 conf/distro/cip-core-stretch.conf
delete mode 100644 kas/opt/stretch.yml

diff --git a/Kconfig b/Kconfig
index e69293f..8032ede 100644
--- a/Kconfig
+++ b/Kconfig
@@ -82,9 +82,6 @@ choice
prompt "Debian Release"
default DEBIAN_BUSTER

-config DEBIAN_STRETCH
- bool "stretch (9)"
-
config DEBIAN_BUSTER
bool "buster (10)"

@@ -95,7 +92,6 @@ endchoice

config KAS_INCLUDE_DEBIAN
string
- default "kas/opt/stretch.yml" if DEBIAN_STRETCH
default "kas/opt/bullseye.yml" if DEBIAN_BULLSEYE

comment "Image features"
diff --git a/conf/distro/cip-core-stretch.conf b/conf/distro/cip-core-stretch.conf
deleted file mode 100644
index 31900fa..0000000
--- a/conf/distro/cip-core-stretch.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# CIP Core, generic profile
-#
-# Copyright (c) Siemens AG, 2019
-#
-# Authors:
-# Jan Kiszka <jan.kiszka@...>
-#
-# SPDX-License-Identifier: MIT
-#
-
-require conf/distro/debian-stretch.conf
-require cip-core-common.inc
-
-PREFERRED_VERSION_linux-cip ?= "4.19.%"
-PREFERRED_VERSION_linux-cip-rt ?= "4.19.%"
diff --git a/conf/machine/bbb.conf b/conf/machine/bbb.conf
index a9b460e..6d8facb 100644
--- a/conf/machine/bbb.conf
+++ b/conf/machine/bbb.conf
@@ -11,8 +11,4 @@ DISTRO_ARCH = "armhf"
IMAGE_TYPE ?= "wic-img"
IMAGER_INSTALL += "u-boot-omap"

-# On stretch, select U-Boot from buster which comes with distro-boot support
-DISTRO_APT_SOURCES_append_cip-core-stretch = " conf/distro/debian-buster.list"
-DISTRO_APT_PREFERENCES_cip-core-stretch += "conf/machine/preferences.bbb.conf"
-
IMAGE_INSTALL += "u-boot-script"
diff --git a/kas/opt/stretch.yml b/kas/opt/stretch.yml
deleted file mode 100644
index 8e854c2..0000000
--- a/kas/opt/stretch.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# CIP Core, generic profile
-#
-# Copyright (c) Siemens AG, 2019
-#
-# Authors:
-# Jan Kiszka <jan.kiszka@...>
-#
-# SPDX-License-Identifier: MIT
-#
-
-header:
- version: 10
-
-distro: cip-core-stretch
diff --git a/start-qemu.sh b/start-qemu.sh
index 4ab3861..489e0e0 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -33,8 +33,6 @@ fi
if [ -z "${DISTRO_RELEASE}" ]; then
if grep -s -q "DEBIAN_BULLSEYE: true" .config.yaml; then
DISTRO_RELEASE="bullseye"
- elif grep -s -q "DEBIAN_STRETCH: true" .config.yaml; then
- DISTRO_RELEASE="stretch"
else
DISTRO_RELEASE="buster"
fi
--
2.25.1


[isar-cip-core][PATCH 0/2] Drop Stretch support

Kanagarajan, Vijaikumar
 

This series has 2 patches

P1 drops stretch support
P2 cleans up overrides / conditional includes for buster/bullseye

CI Job is successful:
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/pipelines/430980698

Thanks,
Vijai Kumar K

Vijai Kumar K (2):
Drop stretch support
swupdate: Drop conditional includes for buster

Kconfig | 4 ----
conf/distro/cip-core-stretch.conf | 16 ----------------
conf/machine/bbb.conf | 4 ----
kas/opt/stretch.yml | 15 ---------------
.../swupdate/swupdate_2021.04-1+debian-gbp.bb | 18 ++++++++----------
start-qemu.sh | 2 --
6 files changed, 8 insertions(+), 51 deletions(-)
delete mode 100644 conf/distro/cip-core-stretch.conf
delete mode 100644 kas/opt/stretch.yml

--
2.25.1


[PATCH 5.10.y-cip 24/24] clk: renesas: rzg2l: Fix clk status function

Lad Prabhakar
 

From: Biju Das <biju.das.jz@...>

commit fa2a30f8e0aa9304919750b116a9e9e322465299 upstream.

As per RZ/G2L HW(Rev.0.50) manual, clock monitor register value
0 means clock is not supplied and 1 means clock is supplied.
This patch fixes the issue by removing the inverted logic.

Fixing the above, triggered following 2 issues

1) GIC interrupts don't work if we disable IA55_CLK and DMAC_ACLK.
Fixed this issue by adding these clocks as critical clocks.

2) DMA is not working, since the DMA driver is not turning on DMAC_PCLK.
So will provide a fix in the DMA driver to turn on DMA_PCLK.

Fixes: ef3c613ccd68 ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC")
Signed-off-by: Biju Das <biju.das.jz@...>
Link: https://lore.kernel.org/r/20210922112405.26413-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/renesas/rzg2l-cpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
index 834a7a73de33..1501547a11a3 100644
--- a/drivers/clk/renesas/rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -451,7 +451,7 @@ static int rzg2l_mod_clock_is_enabled(struct clk_hw *hw)

value = readl(priv->base + CLK_MON_R(clock->off));

- return !(value & bitmask);
+ return value & bitmask;
}

static const struct clk_ops rzg2l_mod_clock_ops = {
--
2.17.1


[PATCH 5.10.y-cip 23/24] clk: renesas: rzg2l: Add support to handle coupled clocks

Lad Prabhakar
 

From: Biju Das <biju.das.jz@...>

commit 32897e6fff196a5de4981030466ae391dfe56c7b upstream.

The AXI and CHI clocks use the same register bit for controlling clock
output. Add a new clock type for coupled clocks, which sets the
CPG_CLKON_ETH.CLK[01]_ON bit when at least one clock is enabled, and
clears the bit only when both clocks are disabled.

Signed-off-by: Biju Das <biju.das.jz@...>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
Link: https://lore.kernel.org/r/20210922155145.28156-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/renesas/rzg2l-cpg.c | 71 +++++++++++++++++++++++++++++++++
drivers/clk/renesas/rzg2l-cpg.h | 11 ++++-
2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
index 597efc2504eb..834a7a73de33 100644
--- a/drivers/clk/renesas/rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -333,13 +333,17 @@ rzg2l_cpg_register_core_clk(const struct cpg_core_clk *core,
* @hw: handle between common and hardware-specific interfaces
* @off: register offset
* @bit: ON/MON bit
+ * @enabled: soft state of the clock, if it is coupled with another clock
* @priv: CPG/MSTP private data
+ * @sibling: pointer to the other coupled clock
*/
struct mstp_clock {
struct clk_hw hw;
u16 off;
u8 bit;
+ bool enabled;
struct rzg2l_cpg_priv *priv;
+ struct mstp_clock *sibling;
};

#define to_mod_clock(_hw) container_of(_hw, struct mstp_clock, hw)
@@ -392,11 +396,41 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable)

static int rzg2l_mod_clock_enable(struct clk_hw *hw)
{
+ struct mstp_clock *clock = to_mod_clock(hw);
+
+ if (clock->sibling) {
+ struct rzg2l_cpg_priv *priv = clock->priv;
+ unsigned long flags;
+ bool enabled;
+
+ spin_lock_irqsave(&priv->rmw_lock, flags);
+ enabled = clock->sibling->enabled;
+ clock->enabled = true;
+ spin_unlock_irqrestore(&priv->rmw_lock, flags);
+ if (enabled)
+ return 0;
+ }
+
return rzg2l_mod_clock_endisable(hw, true);
}

static void rzg2l_mod_clock_disable(struct clk_hw *hw)
{
+ struct mstp_clock *clock = to_mod_clock(hw);
+
+ if (clock->sibling) {
+ struct rzg2l_cpg_priv *priv = clock->priv;
+ unsigned long flags;
+ bool enabled;
+
+ spin_lock_irqsave(&priv->rmw_lock, flags);
+ enabled = clock->sibling->enabled;
+ clock->enabled = false;
+ spin_unlock_irqrestore(&priv->rmw_lock, flags);
+ if (enabled)
+ return;
+ }
+
rzg2l_mod_clock_endisable(hw, false);
}

@@ -412,6 +446,9 @@ static int rzg2l_mod_clock_is_enabled(struct clk_hw *hw)
return 1;
}

+ if (clock->sibling)
+ return clock->enabled;
+
value = readl(priv->base + CLK_MON_R(clock->off));

return !(value & bitmask);
@@ -423,6 +460,28 @@ static const struct clk_ops rzg2l_mod_clock_ops = {
.is_enabled = rzg2l_mod_clock_is_enabled,
};

+static struct mstp_clock
+*rzg2l_mod_clock__get_sibling(struct mstp_clock *clock,
+ struct rzg2l_cpg_priv *priv)
+{
+ struct clk_hw *hw;
+ unsigned int i;
+
+ for (i = 0; i < priv->num_mod_clks; i++) {
+ struct mstp_clock *clk;
+
+ if (priv->clks[priv->num_core_clks + i] == ERR_PTR(-ENOENT))
+ continue;
+
+ hw = __clk_get_hw(priv->clks[priv->num_core_clks + i]);
+ clk = to_mod_clock(hw);
+ if (clock->off == clk->off && clock->bit == clk->bit)
+ return clk;
+ }
+
+ return NULL;
+}
+
static void __init
rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod,
const struct rzg2l_cpg_info *info,
@@ -484,6 +543,18 @@ rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod,

dev_dbg(dev, "Module clock %pC at %lu Hz\n", clk, clk_get_rate(clk));
priv->clks[id] = clk;
+
+ if (mod->is_coupled) {
+ struct mstp_clock *sibling;
+
+ clock->enabled = rzg2l_mod_clock_is_enabled(&clock->hw);
+ sibling = rzg2l_mod_clock__get_sibling(clock, priv);
+ if (sibling) {
+ clock->sibling = sibling;
+ sibling->sibling = clock;
+ }
+ }
+
return;

fail:
diff --git a/drivers/clk/renesas/rzg2l-cpg.h b/drivers/clk/renesas/rzg2l-cpg.h
index f538ffa3371c..ebf716bb913e 100644
--- a/drivers/clk/renesas/rzg2l-cpg.h
+++ b/drivers/clk/renesas/rzg2l-cpg.h
@@ -90,6 +90,7 @@ enum clk_types {
* @parent: id of parent clock
* @off: register offset
* @bit: ON/MON bit
+ * @is_coupled: flag to indicate coupled clock
*/
struct rzg2l_mod_clk {
const char *name;
@@ -97,17 +98,25 @@ struct rzg2l_mod_clk {
unsigned int parent;
u16 off;
u8 bit;
+ bool is_coupled;
};

-#define DEF_MOD(_name, _id, _parent, _off, _bit) \
+#define DEF_MOD_BASE(_name, _id, _parent, _off, _bit, _is_coupled) \
{ \
.name = _name, \
.id = MOD_CLK_BASE + (_id), \
.parent = (_parent), \
.off = (_off), \
.bit = (_bit), \
+ .is_coupled = (_is_coupled), \
}

+#define DEF_MOD(_name, _id, _parent, _off, _bit) \
+ DEF_MOD_BASE(_name, _id, _parent, _off, _bit, false)
+
+#define DEF_COUPLED(_name, _id, _parent, _off, _bit) \
+ DEF_MOD_BASE(_name, _id, _parent, _off, _bit, true)
+
/**
* struct rzg2l_reset - Reset definitions
*
--
2.17.1


[PATCH 5.10.y-cip 22/24] clk: renesas: rzg2l: Add support to handle MUX clocks

Lad Prabhakar
 

From: Biju Das <biju.das.jz@...>

commit 7c5a2561737d88b55764034b27f897498e90a319 upstream.

Add support to handle mux clocks in order to select a clock source
from multiple sources.

Signed-off-by: Biju Das <biju.das.jz@...>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
Link: https://lore.kernel.org/r/20210922155145.28156-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/renesas/rzg2l-cpg.c | 23 +++++++++++++++++++++++
drivers/clk/renesas/rzg2l-cpg.h | 12 ++++++++++++
2 files changed, 35 insertions(+)

diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
index 3b3b2c3347f3..597efc2504eb 100644
--- a/drivers/clk/renesas/rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -130,6 +130,26 @@ rzg2l_cpg_div_clk_register(const struct cpg_core_clk *core,
return clk_hw->clk;
}

+static struct clk * __init
+rzg2l_cpg_mux_clk_register(const struct cpg_core_clk *core,
+ void __iomem *base,
+ struct rzg2l_cpg_priv *priv)
+{
+ const struct clk_hw *clk_hw;
+
+ clk_hw = devm_clk_hw_register_mux(priv->dev, core->name,
+ core->parent_names, core->num_parents,
+ core->flag,
+ base + GET_REG_OFFSET(core->conf),
+ GET_SHIFT(core->conf),
+ GET_WIDTH(core->conf),
+ core->mux_flags, &priv->rmw_lock);
+ if (IS_ERR(clk_hw))
+ return ERR_CAST(clk_hw);
+
+ return clk_hw->clk;
+}
+
struct pll_clk {
struct clk_hw hw;
unsigned int conf;
@@ -288,6 +308,9 @@ rzg2l_cpg_register_core_clk(const struct cpg_core_clk *core,
clk = rzg2l_cpg_div_clk_register(core, priv->clks,
priv->base, priv);
break;
+ case CLK_TYPE_MUX:
+ clk = rzg2l_cpg_mux_clk_register(core, priv->base, priv);
+ break;
default:
goto fail;
}
diff --git a/drivers/clk/renesas/rzg2l-cpg.h b/drivers/clk/renesas/rzg2l-cpg.h
index 63695280ce8b..f538ffa3371c 100644
--- a/drivers/clk/renesas/rzg2l-cpg.h
+++ b/drivers/clk/renesas/rzg2l-cpg.h
@@ -24,6 +24,9 @@
#define DIVPL3A DDIV_PACK(CPG_PL3A_DDIV, 0, 3)
#define DIVPL3B DDIV_PACK(CPG_PL3A_DDIV, 4, 3)

+#define SEL_PLL_PACK(offset, bitpos, size) \
+ (((offset) << 20) | ((bitpos) << 12) | ((size) << 8))
+
/**
* Definitions of CPG Core Clocks
*
@@ -43,6 +46,7 @@ struct cpg_core_clk {
const struct clk_div_table *dtable;
const char * const *parent_names;
int flag;
+ int mux_flags;
int num_parents;
};

@@ -54,6 +58,9 @@ enum clk_types {

/* Clock with divider */
CLK_TYPE_DIV,
+
+ /* Clock with clock source selector */
+ CLK_TYPE_MUX,
};

#define DEF_TYPE(_name, _id, _type...) \
@@ -69,6 +76,11 @@ enum clk_types {
#define DEF_DIV(_name, _id, _parent, _conf, _dtable, _flag) \
DEF_TYPE(_name, _id, CLK_TYPE_DIV, .conf = _conf, \
.parent = _parent, .dtable = _dtable, .flag = _flag)
+#define DEF_MUX(_name, _id, _conf, _parent_names, _num_parents, _flag, \
+ _mux_flags) \
+ DEF_TYPE(_name, _id, CLK_TYPE_MUX, .conf = _conf, \
+ .parent_names = _parent_names, .num_parents = _num_parents, \
+ .flag = _flag, .mux_flags = _mux_flags)

/**
* struct rzg2l_mod_clk - Module Clocks definitions
--
2.17.1


[PATCH 5.10.y-cip 21/24] clk: mux: provide devm_clk_hw_register_mux()

Lad Prabhakar
 

From: Dmitry Baryshkov <dmitry.baryshkov@...>

commit b3084079c1779645222d5ea4e9da88d38026cae8 upstream.

Add devm_clk_hw_register_mux() - devres-managed version of
clk_hw_register_mux().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...>
Reviewed-by: Abhinav Kumar <abhinavk@...>
Acked-by: Stephen Boyd <sboyd@...>
Link: https://lore.kernel.org/r/20210331105735.3690009-2-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/clk-mux.c | 35 +++++++++++++++++++++++++++++++++++
include/linux/clk-provider.h | 13 +++++++++++++
2 files changed, 48 insertions(+)

diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index e54e79714818..20582aae7a35 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -8,6 +8,7 @@
*/

#include <linux/clk-provider.h>
+#include <linux/device.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/io.h>
@@ -206,6 +207,40 @@ struct clk_hw *__clk_hw_register_mux(struct device *dev, struct device_node *np,
}
EXPORT_SYMBOL_GPL(__clk_hw_register_mux);

+static void devm_clk_hw_release_mux(struct device *dev, void *res)
+{
+ clk_hw_unregister_mux(*(struct clk_hw **)res);
+}
+
+struct clk_hw *__devm_clk_hw_register_mux(struct device *dev, struct device_node *np,
+ const char *name, u8 num_parents,
+ const char * const *parent_names,
+ const struct clk_hw **parent_hws,
+ const struct clk_parent_data *parent_data,
+ unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
+ u8 clk_mux_flags, u32 *table, spinlock_t *lock)
+{
+ struct clk_hw **ptr, *hw;
+
+ ptr = devres_alloc(devm_clk_hw_release_mux, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return ERR_PTR(-ENOMEM);
+
+ hw = __clk_hw_register_mux(dev, np, name, num_parents, parent_names, parent_hws,
+ parent_data, flags, reg, shift, mask,
+ clk_mux_flags, table, lock);
+
+ if (!IS_ERR(hw)) {
+ *ptr = hw;
+ devres_add(dev, ptr);
+ } else {
+ devres_free(ptr);
+ }
+
+ return hw;
+}
+EXPORT_SYMBOL_GPL(__devm_clk_hw_register_mux);
+
struct clk *clk_register_mux_table(struct device *dev, const char *name,
const char * const *parent_names, u8 num_parents,
unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 03a5de5f99f4..dab50fbca954 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -841,6 +841,13 @@ struct clk_hw *__clk_hw_register_mux(struct device *dev, struct device_node *np,
const struct clk_parent_data *parent_data,
unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
u8 clk_mux_flags, u32 *table, spinlock_t *lock);
+struct clk_hw *__devm_clk_hw_register_mux(struct device *dev, struct device_node *np,
+ const char *name, u8 num_parents,
+ const char * const *parent_names,
+ const struct clk_hw **parent_hws,
+ const struct clk_parent_data *parent_data,
+ unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
+ u8 clk_mux_flags, u32 *table, spinlock_t *lock);
struct clk *clk_register_mux_table(struct device *dev, const char *name,
const char * const *parent_names, u8 num_parents,
unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
@@ -875,6 +882,12 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name,
__clk_hw_register_mux((dev), NULL, (name), (num_parents), NULL, NULL, \
(parent_data), (flags), (reg), (shift), \
BIT((width)) - 1, (clk_mux_flags), NULL, (lock))
+#define devm_clk_hw_register_mux(dev, name, parent_names, num_parents, flags, reg, \
+ shift, width, clk_mux_flags, lock) \
+ __devm_clk_hw_register_mux((dev), NULL, (name), (num_parents), \
+ (parent_names), NULL, NULL, (flags), (reg), \
+ (shift), BIT((width)) - 1, (clk_mux_flags), \
+ NULL, (lock))

int clk_mux_val_to_index(struct clk_hw *hw, u32 *table, unsigned int flags,
unsigned int val);
--
2.17.1


[PATCH 5.10.y-cip 20/24] clk: renesas: Rename renesas-rzg2l-cpg.[ch] to rzg2l-cpg.[ch]

Lad Prabhakar
 

From: Geert Uytterhoeven <geert+renesas@...>

commit 0aae437ac5c264e8e2cb6c3fead20b44d2fa31d1 upstream.

Rename renesas-rzg2l-cpg.c and renesas-rzg2l-cpg.h to rzg2l-cpg.c resp.
rzg2l-cpg.h, for consistency with other (sub)drivers.

Signed-off-by: Geert Uytterhoeven <geert+renesas@...>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
Acked-by: Biju Das <biju.das.jz@...>
Link: https://lore.kernel.org/r/edc442daaedffcf10e835ff479d906fcae0e59db.1626268821.git.geert+renesas@glider.be
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/renesas/Makefile | 2 +-
drivers/clk/renesas/r9a07g044-cpg.c | 2 +-
drivers/clk/renesas/{renesas-rzg2l-cpg.c => rzg2l-cpg.c} | 2 +-
drivers/clk/renesas/{renesas-rzg2l-cpg.h => rzg2l-cpg.h} | 0
4 files changed, 3 insertions(+), 3 deletions(-)
rename drivers/clk/renesas/{renesas-rzg2l-cpg.c => rzg2l-cpg.c} (99%)
rename drivers/clk/renesas/{renesas-rzg2l-cpg.h => rzg2l-cpg.h} (100%)

diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
index 077fae8b0846..cd104e75dab6 100644
--- a/drivers/clk/renesas/Makefile
+++ b/drivers/clk/renesas/Makefile
@@ -36,7 +36,7 @@ obj-$(CONFIG_CLK_SH73A0) += clk-sh73a0.o
obj-$(CONFIG_CLK_RCAR_GEN2_CPG) += rcar-gen2-cpg.o
obj-$(CONFIG_CLK_RCAR_GEN3_CPG) += rcar-gen3-cpg.o
obj-$(CONFIG_CLK_RCAR_USB2_CLOCK_SEL) += rcar-usb2-clock-sel.o
-obj-$(CONFIG_CLK_RZG2L) += renesas-rzg2l-cpg.o
+obj-$(CONFIG_CLK_RZG2L) += rzg2l-cpg.o

# Generic
obj-$(CONFIG_CLK_RENESAS_CPG_MSSR) += renesas-cpg-mssr.o
diff --git a/drivers/clk/renesas/r9a07g044-cpg.c b/drivers/clk/renesas/r9a07g044-cpg.c
index ae24e0397d3c..fb8e199c7409 100644
--- a/drivers/clk/renesas/r9a07g044-cpg.c
+++ b/drivers/clk/renesas/r9a07g044-cpg.c
@@ -12,7 +12,7 @@

#include <dt-bindings/clock/r9a07g044-cpg.h>

-#include "renesas-rzg2l-cpg.h"
+#include "rzg2l-cpg.h"

enum clk_ids {
/* Core Clock Outputs exported to DT */
diff --git a/drivers/clk/renesas/renesas-rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
similarity index 99%
rename from drivers/clk/renesas/renesas-rzg2l-cpg.c
rename to drivers/clk/renesas/rzg2l-cpg.c
index 9addc9dae31a..3b3b2c3347f3 100644
--- a/drivers/clk/renesas/renesas-rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -29,7 +29,7 @@

#include <dt-bindings/clock/renesas-cpg-mssr.h>

-#include "renesas-rzg2l-cpg.h"
+#include "rzg2l-cpg.h"

#ifdef DEBUG
#define WARN_DEBUG(x) WARN_ON(x)
diff --git a/drivers/clk/renesas/renesas-rzg2l-cpg.h b/drivers/clk/renesas/rzg2l-cpg.h
similarity index 100%
rename from drivers/clk/renesas/renesas-rzg2l-cpg.h
rename to drivers/clk/renesas/rzg2l-cpg.h
--
2.17.1


[PATCH 5.10.y-cip 19/24] clk: renesas: rzg2l: Fix off-by-one check in rzg2l_cpg_clk_src_twocell_get()

Lad Prabhakar
 

commit 1606e81543f80fc3b1912957cf6d8fa62e40b8e5 upstream.

Fix clock index out of range check for module clocks in
rzg2l_cpg_clk_src_twocell_get().

Fixes: ef3c613ccd68 ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC")
Reported-by: Dan Carpenter <dan.carpenter@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
Link: https://lore.kernel.org/r/20210617155432.18827-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/renesas/renesas-rzg2l-cpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/renesas-rzg2l-cpg.c b/drivers/clk/renesas/renesas-rzg2l-cpg.c
index 34e90ee46290..9addc9dae31a 100644
--- a/drivers/clk/renesas/renesas-rzg2l-cpg.c
+++ b/drivers/clk/renesas/renesas-rzg2l-cpg.c
@@ -222,7 +222,7 @@ static struct clk

case CPG_MOD:
type = "module";
- if (clkidx > priv->num_mod_clks) {
+ if (clkidx >= priv->num_mod_clks) {
dev_err(dev, "Invalid %s clock index %u\n", type,
clkidx);
return ERR_PTR(-EINVAL);
--
2.17.1


[PATCH 5.10.y-cip 18/24] clk: renesas: rzg2l: Avoid mixing error pointers and NULL

Lad Prabhakar
 

From: Dan Carpenter <dan.carpenter@...>

commit e37868f14416bc5f22235dce073c496381d349c3 upstream.

These functions accidentally return both error pointers and NULL when
there is an error. It doesn't cause a problem but it is confusing and
seems unintentional.

Signed-off-by: Dan Carpenter <dan.carpenter@...>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
Link: https://lore.kernel.org/r/YMtY7nOtqEvTokh7@mwanda
Signed-off-by: Geert Uytterhoeven <geert+renesas@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
drivers/clk/renesas/renesas-rzg2l-cpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/renesas-rzg2l-cpg.c b/drivers/clk/renesas/renesas-rzg2l-cpg.c
index 6808390f8ee0..34e90ee46290 100644
--- a/drivers/clk/renesas/renesas-rzg2l-cpg.c
+++ b/drivers/clk/renesas/renesas-rzg2l-cpg.c
@@ -125,7 +125,7 @@ rzg2l_cpg_div_clk_register(const struct cpg_core_clk *core,
core->flag, &priv->rmw_lock);

if (IS_ERR(clk_hw))
- return NULL;
+ return ERR_CAST(clk_hw);

return clk_hw->clk;
}
--
2.17.1

3001 - 3020 of 10158