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 21:27
To: Kanagarajan, Vijaikumar <Vijaikumar_Kanagarajan@...>; cip-
dev@...; Quirin Gylstorff <quirin.gylstorff@...>
Subject: Re: [isar-cip-core][PATCH v2 2/2] swupdate: Drop conditional
includes for buster

On 16.12.21 15:23, Kanagarajan, Vijaikumar wrote:


-----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.
Quirin just told me that only nodoc is needed for all.

Dropping this patch again (keeping 1/2 though). Please send a v3 which does
that, ie. adds a _bullseye profile and keeps the existing buster one.
Ok. Will resend v3 of this particular patch.

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 15:23, Kanagarajan, Vijaikumar via lists.cip-project.org wrote:

-----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
The flags `pkg.swupdate.nocreatefs` and `pkg.swupdate.nowebserver` are
for Debian Buster.

A build for Debian Bullseye can use the webserver and createfs option as the are active in the Debian provided package on salsa.

Only `nodoc` needs to applied to buster and bullseye.


Quirin


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

Jan Kiszka
 

On 16.12.21 15:23, Kanagarajan, Vijaikumar wrote:


-----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.
Quirin just told me that only nodoc is needed for all.

Dropping this patch again (keeping 1/2 though). Please send a v3 which
does that, ie. adds a _bullseye profile and keeps the existing buster one.

Jan

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


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

Jan Kiszka
 

On 16.12.21 14:36, Vijai Kumar K wrote:
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
Thanks, applied.

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

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

2041 - 2060 of 9202