From 01b8845ac69279edbc177cf075b45a3da6f306d8 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 27 Jun 2024 16:19:32 +0200 Subject: [PATCH 1/4] Update to kas 4.4 Signed-off-by: Jan Kiszka --- .gitlab-ci.yml | 4 +- kas-container | 136 +++++++++++++++++++++++++++++++------------------ 2 files changed, 88 insertions(+), 52 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a7187b59..950d7fefb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # -# Copyright (c) Siemens AG, 2020-2022 +# Copyright (c) Siemens AG, 2020-2024 # # Authors: # Jan Kiszka @@ -8,7 +8,7 @@ # COPYING.MIT file in the top-level directory. # -image: ghcr.io/siemens/kas/kas-isar:4.0 +image: ghcr.io/siemens/kas/kas-isar:4.4 variables: GIT_STRATEGY: clone diff --git a/kas-container b/kas-container index 8fa2d16e9..169ea1bc4 100755 --- a/kas-container +++ b/kas-container @@ -2,7 +2,7 @@ # # kas - setup tool for bitbake based projects # -# Copyright (c) Siemens AG, 2018-2022 +# Copyright (c) Siemens AG, 2018-2024 # # Authors: # Jan Kiszka @@ -27,13 +27,19 @@ set -e +KAS_IMAGE_VERSION_DEFAULT="4.4" +KAS_CONTAINER_IMAGE_PATH_DEFAULT="ghcr.io/siemens/kas" +KAS_CONTAINER_IMAGE_NAME_DEFAULT="kas" +KAS_CONTAINER_SELF_NAME="$(basename "$0")" + usage() { - printf "%b" "Usage: $0 [OPTIONS] { build | shell } [KASOPTIONS] [KASFILE]\n" - printf "%b" " $0 [OPTIONS] { checkout | dump } [KASOPTIONS] [KASFILE]\n" - printf "%b" " $0 [OPTIONS] for-all-repos [KASOPTIONS] [KASFILE] COMMAND\n" - printf "%b" " $0 [OPTIONS] { clean | cleansstate | cleanall}\n" - printf "%b" " $0 [OPTIONS] menu [KCONFIG]\n" + SELF="${KAS_CONTAINER_SELF_NAME}" + printf "%b" "Usage: ${SELF} [OPTIONS] { build | shell } [KASOPTIONS] [KASFILE]\n" + printf "%b" " ${SELF} [OPTIONS] { checkout | dump } [KASOPTIONS] [KASFILE]\n" + printf "%b" " ${SELF} [OPTIONS] for-all-repos [KASOPTIONS] [KASFILE] COMMAND\n" + printf "%b" " ${SELF} [OPTIONS] { clean | cleansstate | cleanall} [KASFILE]\n" + printf "%b" " ${SELF} [OPTIONS] menu [KCONFIG]\n" printf "%b" "\nPositional arguments:\n" printf "%b" "build\t\t\tCheck out repositories and build target.\n" printf "%b" "checkout\t\tCheck out repositories but do not build.\n" @@ -80,6 +86,15 @@ usage() exit 1 } +fatal_error(){ + echo "${KAS_CONTAINER_SELF_NAME}: Error: $*" >&2 + exit 1 +} + +warning(){ + echo "${KAS_CONTAINER_SELF_NAME}: Warning: $*" >&2 +} + trace() { [ -n "${KAS_VERBOSE}" ] && echo "+ $*" >&2 @@ -113,7 +128,6 @@ enable_oe_mode() { run_clean() { if [ -n "${KAS_ISAR_ARGS}" ]; then - set_container_image_var # SC2086: Double quote to prevent globbing and word splitting. # shellcheck disable=2086 trace ${KAS_CONTAINER_COMMAND} run -v "${KAS_BUILD_DIR}":/build:rw \ @@ -135,10 +149,6 @@ run_clean() { fi } -KAS_IMAGE_VERSION_DEFAULT="4.0" -KAS_CONTAINER_IMAGE_PATH_DEFAULT="ghcr.io/siemens/kas" -KAS_CONTAINER_IMAGE_NAME_DEFAULT="kas" - set_container_image_var() { KAS_IMAGE_VERSION="${KAS_IMAGE_VERSION:-${KAS_IMAGE_VERSION_DEFAULT}}" KAS_CONTAINER_IMAGE_NAME="${KAS_CONTAINER_IMAGE_NAME:-${KAS_CONTAINER_IMAGE_NAME_DEFAULT}}" @@ -168,14 +178,12 @@ if [ -z "${KAS_CONTAINER_ENGINE}" ]; then ;; *) # The docker command is an unknown engine - echo "$0: docker command found, but unknown engine detected" >&2 - exit 1 + fatal_error "docker command found, but unknown engine detected" esac elif command -v podman >/dev/null; then KAS_CONTAINER_ENGINE=podman else - echo "$0: no container engine found, need docker or podman" >&2 - exit 1 + fatal_error "no container engine found, need docker or podman" fi fi @@ -190,8 +198,7 @@ podman) KAS_RUNTIME_ARGS="${KAS_RUNTIME_ARGS} --security-opt label=disable" ;; *) - echo "$0: unknown container engine '${KAS_CONTAINER_ENGINE}'" >&2 - exit 1 + fatal_error "unknown container engine '${KAS_CONTAINER_ENGINE}'" ;; esac @@ -205,8 +212,7 @@ while [ $# -gt 0 ]; do --with-loop-dev) if ! KAS_LOOP_DEV=$(/sbin/losetup -f 2>/dev/null); then if [ "$(id -u)" -eq 0 ]; then - echo "Error: loop device not available!" - exit 1 + fatal_error "loop device not available!" fi sudo_command="/sbin/losetup -f" sudo_message="[sudo] enter password to setup loop" @@ -216,10 +222,9 @@ while [ $# -gt 0 ]; do # shellcheck disable=2086 if ! KAS_LOOP_DEV=$(sudo -p "$sudo_message" $sudo_command \ 2>/dev/null); then - echo "Error: loop device setup unsuccessful!" - echo "try calling '$sudo_command' with root" \ - "permissions manually." - exit 1 + fatal_error "loop device setup unsuccessful!" \ + "try calling '$sudo_command' with root" \ + "permissions manually." fi fi KAS_WITH_LOOP_DEV="--device ${KAS_LOOP_DEV}" @@ -236,6 +241,9 @@ while [ $# -gt 0 ]; do shift 2 ;; --ssh-agent) + if [ -z "${SSH_AUTH_SOCK}" ]; then + fatal_error "no SSH agent running" + fi KAS_SSH_AUTH_SOCK=$(readlink -fv "$SSH_AUTH_SOCK") shift 1 ;; @@ -274,16 +282,16 @@ while [ $# -gt 0 ]; do shift 2 ;; --version) - echo "$(basename "$0") $KAS_IMAGE_VERSION_DEFAULT" + echo "${KAS_CONTAINER_SELF_NAME} $KAS_IMAGE_VERSION_DEFAULT" exit 0 ;; --*) usage ;; clean|cleansstate|cleanall) - [ $# -eq 1 ] || usage - run_clean "$1" - exit 0 + KAS_CMD=$1 + shift 1 + break ;; shell) KAS_REPO_MOUNT_OPT_DEFAULT="rw" @@ -322,15 +330,21 @@ while [ $# -gt 0 ] && [ $KAS_EXTRA_BITBAKE_ARGS -eq 0 ]; do case "$1" in --skip|--target|--task) KAS_OPTIONS="${KAS_OPTIONS} $1 $2" - shift 2 + shift 1 + shift 1 || KAS_OPTIONS="--help" ;; -c|--cmd|--command) KAS_BITBAKE_C_OPTION_ARGS="$2" - shift 2 + shift 1 + shift 1 || KAS_OPTIONS="--help" ;; -E|--preserve-env) - echo "$1 is not supported with kas-container" - exit 1 + fatal_error "$1 is not supported with ${KAS_CONTAINER_SELF_NAME}" + ;; + --provenance) + KAS_OPTIONS="${KAS_OPTIONS} $1 $2" + shift 1 + shift 1 || KAS_OPTIONS="--help" ;; --) KAS_EXTRA_BITBAKE_ARGS=$# @@ -345,8 +359,7 @@ while [ $# -gt 0 ] && [ $KAS_EXTRA_BITBAKE_ARGS -eq 0 ]; do # shellcheck disable=2086 for FILE in $(IFS=':'; echo $1); do if ! KAS_REAL_FILE="$(realpath -qe "$FILE")"; then - echo "Error: configuration file '${FILE}' not found" - exit 1 + fatal_error "configuration file '${FILE}' not found" fi if [ -z "${KAS_FILES}" ]; then KAS_FIRST_FILE="${KAS_REAL_FILE}" @@ -395,7 +408,7 @@ if [ "${KAS_CMD}" = "menu" ]; then set -- "$@" -e _KAS_REPO_DIR_HOST="$(readlink -fv "${KAS_REPO_DIR}")" fi - BUILD_SYSTEM=$(tr '\n' '\f' 2>/dev/null < ${KAS_FIRST_FILE} | \ + BUILD_SYSTEM=$(tr '\n' '\f' 2>/dev/null < "${KAS_FIRST_FILE}" | \ sed -e 's/\(.*\fconfig KAS_BUILD_SYSTEM\f\(.*\)\|.*\)/\2/' \ -e 's/\f\([[:alpha:]].*\|$\)//' \ -e 's/.*default \"\(.*\)\".*/\1/') @@ -416,18 +429,24 @@ fi set_container_image_var +# short circuit for clean* commands. We just need +# the build-system information, but no repo mounts, etc... +if echo "${KAS_CMD}" | grep -qe "^clean"; then + run_clean "${KAS_CMD}" + exit 0 +fi + KAS_REPO_MOUNT_OPT="${KAS_REPO_MOUNT_OPT:-${KAS_REPO_MOUNT_OPT_DEFAULT}}" KAS_FILES="$(echo "${KAS_FILES}" | sed 's|'"${KAS_REPO_DIR}"'/|/repo/|g')" if [ "$(id -u)" -eq 0 ] && [ "${KAS_ALLOW_ROOT}" != "yes" ] ; then - echo "Error: Running as root - may break certain recipes." - echo "Better give a regular user docker access. Set" \ - "KAS_ALLOW_ROOT=yes to override." - exit 1 + fatal_error "Running as root - may break certain recipes." \ + "Better give a regular user docker access. Set" \ + "KAS_ALLOW_ROOT=yes to override." fi -set -- "$@" -v "${KAS_REPO_DIR}":/repo:${KAS_REPO_MOUNT_OPT} \ +set -- "$@" -v "${KAS_REPO_DIR}:/repo:${KAS_REPO_MOUNT_OPT}" \ -v "${KAS_WORK_DIR}":/work:rw -e KAS_WORK_DIR=/work \ -v "${KAS_BUILD_DIR}":/build:rw \ --workdir=/repo \ @@ -436,16 +455,14 @@ set -- "$@" -v "${KAS_REPO_DIR}":/repo:${KAS_REPO_MOUNT_OPT} \ if [ -n "${KAS_SSH_DIR}" ] ; then if [ ! -d "${KAS_SSH_DIR}" ]; then - echo "Passed KAS_SSH_DIR '${KAS_SSH_DIR}' is not a directory" - exit 1 + fatal_error "passed KAS_SSH_DIR '${KAS_SSH_DIR}' is not a directory" fi set -- "$@" -v "$(readlink -fv "${KAS_SSH_DIR}")":/var/kas/userdata/.ssh:ro fi if [ -n "${KAS_SSH_AUTH_SOCK}" ]; then if [ ! -S "${KAS_SSH_AUTH_SOCK}" ]; then - echo "Passed SSH_AUTH_SOCK '${KAS_SSH_AUTH_SOCK}' is not a socket" - exit 1 + fatal_error "passed SSH_AUTH_SOCK '${KAS_SSH_AUTH_SOCK}' is not a socket" fi set -- "$@" -v "${KAS_SSH_AUTH_SOCK}":/ssh-agent/ssh-auth-sock \ -e SSH_AUTH_SOCK=/ssh-agent/ssh-auth-sock @@ -453,20 +470,27 @@ fi if [ -n "${KAS_AWS_DIR}" ] ; then if [ ! -d "${KAS_AWS_DIR}" ]; then - echo "Passed KAS_AWS_DIR '${KAS_AWS_DIR}' is not a directory" - exit 1 + fatal_error "passed KAS_AWS_DIR '${KAS_AWS_DIR}' is not a directory" fi set -- "$@" -v "$(readlink -fv "${KAS_AWS_DIR}")":/var/kas/userdata/.aws:ro \ -e AWS_CONFIG_FILE="${AWS_CONFIG_FILE:-/var/kas/userdata/.aws/config}" \ -e AWS_SHARED_CREDENTIALS_FILE="${AWS_SHARED_CREDENTIALS_FILE:-/var/kas/userdata/.aws/credentials}" fi +if [ -n "${AWS_WEB_IDENTITY_TOKEN_FILE}" ] ; then + if [ ! -f "${AWS_WEB_IDENTITY_TOKEN_FILE}" ]; then + echo "Passed AWS_WEB_IDENTITY_TOKEN_FILE '${AWS_WEB_IDENTITY_TOKEN_FILE}' is not a directory" + exit 1 + fi + set -- "$@" -v "$(readlink -fv "${AWS_WEB_IDENTITY_TOKEN_FILE}")":/var/kas/userdata/.aws/web_identity_token:ro \ + -e AWS_WEB_IDENTITY_TOKEN_FILE="${AWS_CONFIG_FILE:-/var/kas/userdata/.aws/web_identity_token}" \ + -e AWS_ROLE_ARN="${AWS_ROLE_ARN}" +fi KAS_GIT_CREDENTIAL_HELPER_DEFAULT="" if [ -n "${KAS_GIT_CREDENTIAL_STORE}" ] ; then if [ ! -f "${KAS_GIT_CREDENTIAL_STORE}" ]; then - echo "Passed KAS_GIT_CREDENTIAL_STORE '${KAS_GIT_CREDENTIAL_STORE}' is not a file" - exit 1 + fatal_error "passed KAS_GIT_CREDENTIAL_STORE '${KAS_GIT_CREDENTIAL_STORE}' is not a file" fi KAS_GIT_CREDENTIAL_HELPER_DEFAULT="store --file=/var/kas/userdata/.git-credentials" set -- "$@" -v "$(readlink -fv "${KAS_GIT_CREDENTIAL_STORE}")":/var/kas/userdata/.git-credentials:ro @@ -483,6 +507,11 @@ if [ -f "${NETRC_FILE}" ]; then -e NETRC_FILE="/var/kas/userdata/.netrc" fi +if [ -f "${GITCONFIG_FILE}" ]; then + set -- "$@" -v "$(readlink -fv "${GITCONFIG_FILE}")":/var/kas/userdata/.gitconfig:ro \ + -e GITCONFIG_FILE="/var/kas/userdata/.gitconfig" +fi + if [ -t 1 ]; then set -- "$@" -t -i fi @@ -500,18 +529,24 @@ if [ -n "${SSTATE_DIR}" ]; then -v "$(readlink -fv "${SSTATE_DIR}")":/sstate:rw \ -e SSTATE_DIR=/sstate fi +if [ -n "${SSTATE_MIRRORS}" ]; then + if echo "${SSTATE_MIRRORS}" | grep -q "file:///"; then + warning "SSTATE_MIRRORS contains a local path." \ + "Make sure to make this path available inside the container." + fi + set -- "$@" -e "SSTATE_MIRRORS=${SSTATE_MIRRORS}" +fi if [ -n "${KAS_REPO_REF_DIR}" ]; then if [ ! -d "${KAS_REPO_REF_DIR}" ]; then - echo "Passed KAS_REPO_REF_DIR '${KAS_REPO_REF_DIR}' is not a directory" - exit 1 + fatal_error "Passed KAS_REPO_REF_DIR '${KAS_REPO_REF_DIR}' is not a directory" fi set -- "$@" \ -v "$(readlink -fv "${KAS_REPO_REF_DIR}")":/repo-ref:rw \ -e KAS_REPO_REF_DIR=/repo-ref fi -for var in TERM KAS_DISTRO KAS_MACHINE KAS_TARGET KAS_TASK \ +for var in TERM KAS_DISTRO KAS_MACHINE KAS_TARGET KAS_TASK KAS_CLONE_DEPTH \ KAS_PREMIRRORS DISTRO_APT_PREMIRRORS BB_NUMBER_THREADS PARALLEL_MAKE \ GIT_CREDENTIAL_USEHTTPPATH; do if [ -n "$(eval echo \$${var})" ]; then @@ -559,4 +594,5 @@ while [ $KAS_EXTRA_BITBAKE_ARGS -gt 0 ]; do KAS_EXTRA_BITBAKE_ARGS=$((KAS_EXTRA_BITBAKE_ARGS - 1)) done +# shellcheck disable=SC2086 trace ${KAS_CONTAINER_COMMAND} run "$@" From 9bf4dac8c6af45ba33a8fcb93b123b1fa36bda8c Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 20 Aug 2024 09:00:48 +0200 Subject: [PATCH 2/4] Update isar and isar-cip core This allows to drop our own snapshot mechanism in favor of ISAR_USE_APT_SNAPSHOT. Signed-off-by: Jan Kiszka --- conf/distro/debian-snapshot.list | 8 ----- conf/distro/iot2050-debian.conf | 15 --------- kas/iot2050.yml | 6 ++-- kas/opt/package-lock.yml | 6 ++-- recipes-core/images/iot2050-image-base.bb | 39 ----------------------- 5 files changed, 7 insertions(+), 67 deletions(-) delete mode 100644 conf/distro/debian-snapshot.list diff --git a/conf/distro/debian-snapshot.list b/conf/distro/debian-snapshot.list deleted file mode 100644 index 11feaf5b7..000000000 --- a/conf/distro/debian-snapshot.list +++ /dev/null @@ -1,8 +0,0 @@ -deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20231023T151630Z/ bookworm main contrib non-free-firmware non-free -deb-src [check-valid-until=no] http://snapshot.debian.org/archive/debian/20231023T151630Z/ bookworm main contrib non-free-firmware non-free - -deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20231023T151630Z/ bookworm-security/updates main contrib non-free-firmware non-free -deb-src [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20231023T151630Z/ bookworm-security/updates main contrib non-free-firmware non-free - -deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20231023T151630Z/ bookworm-updates main contrib non-free-firmware non-free -deb-src [check-valid-until=no] http://snapshot.debian.org/archive/debian/20231023T151630Z/ bookworm-updates main contrib non-free-firmware non-free diff --git a/conf/distro/iot2050-debian.conf b/conf/distro/iot2050-debian.conf index 584fe88ae..ec03bd45f 100644 --- a/conf/distro/iot2050-debian.conf +++ b/conf/distro/iot2050-debian.conf @@ -24,21 +24,6 @@ KERNEL_NAME ?= "cip" PREFERRED_VERSION_customizations ?= "0.1-iot2050-debian" PREFERRED_VERSION_customizations-debug ?= "0.1-iot2050-debian" -OVERRIDES .= ':${PACKAGES_SELECTION}' - -# packages-mainline: Use the mainline debian packages -# packages-snapshot: Use the snapshot debian packages -PACKAGES_SELECTION ?= "packages-mainline" - -DISTRO_APT_SOURCES_MAINLINE_LIST := "${DISTRO_APT_SOURCES}" -DISTRO_APT_SOURCES_SNAPSHOT_LIST ?= "conf/distro/debian-snapshot.list" - -DISTRO_APT_SOURCES:append:packages-snapshot = " ${DISTRO_APT_SOURCES_SNAPSHOT_LIST}" -DISTRO_APT_SOURCES:remove:packages-snapshot = "${DISTRO_APT_SOURCES_MAINLINE_LIST}" - -HOST_DISTRO_APT_SOURCES:append:packages-snapshot = " ${DISTRO_APT_SOURCES_SNAPSHOT_LIST}" -HOST_DISTRO_APT_SOURCES:remove:packages-snapshot = "${DISTRO_APT_SOURCES_MAINLINE_LIST}" - SDK_INSTALL += "linux-headers-${KERNEL_NAME} mraa" SDK_PREINSTALL += "zlib1g-dev:${DISTRO_ARCH} libjson-c-dev:${DISTRO_ARCH}" diff --git a/kas/iot2050.yml b/kas/iot2050.yml index 80a279ec9..ba472229f 100644 --- a/kas/iot2050.yml +++ b/kas/iot2050.yml @@ -1,5 +1,5 @@ # -# Copyright (c) Siemens AG, 2019-2023 +# Copyright (c) Siemens AG, 2019-2024 # # Authors: # Le Jin @@ -27,13 +27,13 @@ repos: isar: url: https://github.com/ilbers/isar - commit: 9dc362cd7115074c0f60843e687ed89db5c9339a + commit: a2a997b66daf3d684a7ad29108971a463cfac522 layers: meta: cip-core: url: https://gitlab.com/cip-project/cip-core/isar-cip-core.git - commit: 704353612238cb2ac1c16f29db6f314b60cd83b0 + commit: bafd102601ae21c2b2643d536d62fb7cc5f98767 local_conf_header: standard: | diff --git a/kas/opt/package-lock.yml b/kas/opt/package-lock.yml index 3c1d43c81..afe0dcd5b 100644 --- a/kas/opt/package-lock.yml +++ b/kas/opt/package-lock.yml @@ -1,5 +1,5 @@ # -# Copyright (c) Siemens AG, 2019 +# Copyright (c) Siemens AG, 2019-2024 # # Authors: # Su Bao Cheng @@ -13,4 +13,6 @@ header: local_conf_header: package-lock: | - PACKAGES_SELECTION := "packages-snapshot" + # 2023-10-23 15:16:30 UTC + ISAR_APT_SNAPSHOT_TIMESTAMP = "1698074190" + ISAR_USE_APT_SNAPSHOT = "1" diff --git a/recipes-core/images/iot2050-image-base.bb b/recipes-core/images/iot2050-image-base.bb index efa3f5cfc..b4b45fa01 100644 --- a/recipes-core/images/iot2050-image-base.bb +++ b/recipes-core/images/iot2050-image-base.bb @@ -18,45 +18,6 @@ IMAGE_INSTALL += "customizations-base" IMAGE_PREINSTALL += "libubootenv-tool" -python aggregate_mainline_apt_sources () { - import shutil - - aggregated_sources_fp = '%s/bootstrap.list' % d.getVar("WORKDIR", True) - raw_apt_sources_list = d.getVar("DISTRO_APT_SOURCES_MAINLINE_LIST", True) or "" - apt_sources_list = raw_apt_sources_list.strip().split() - - if len(apt_sources_list) == 0: - bb.fatal("Cannot parse DISTRO_APT_SOURCES_MAINLINE_LIST: %s" % - raw_apt_sources_list) - - with open(aggregated_sources_fp, "wb") as out_fd: - for entry in apt_sources_list: - entry_real = bb.parse.resolve_file(entry, d) - with open(entry_real, "rb") as in_fd: - shutil.copyfileobj(in_fd, out_fd, 1024*1024*10) - out_fd.write("\n".encode()) -} - -install_mainline_sources_list () { - sudo rm -f '${IMAGE_ROOTFS}/etc/apt/sources-list' - sudo install -m 644 '${WORKDIR}/bootstrap.list' '${IMAGE_ROOTFS}/etc/apt/sources-list' - sudo rm -f '${WORKDIR}/bootstrap.list' -} - -# For rootfs build using debian snapshot packages, restore the source list file -# with the mainline sources list, so that users can update packages via -# `apt update`. -# TODO: this code should be merged to ISAR. -ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_restore_sources_list" -python image_postprocess_restore_sources_list () { - pkg_selection = d.getVar("PACKAGES_SELECTION", True) or "" - if pkg_selection == 'packages-snapshot': - bb.build.exec_func("aggregate_mainline_apt_sources", d) - bb.build.exec_func("install_mainline_sources_list", d) - else: - bb.note('No need to restore sources for mainline packages') -} - # Make the .wic.img symlink to the .wic file for better backward compatibility do_deploy() { echo "Linking wic img" From 40f89a92bf6b0eadcc03271fe24258f7599b8a9f Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 20 Aug 2024 09:06:20 +0200 Subject: [PATCH 3/4] linux-iot2050: Update to 6.1.102-cip26[-rt14] Also switch to tar.xz at this chance - smaller, and we can reuse the SHAs from isar-cip-core. 4 patches went upstream, 4 are new to add DMA protection via the PVU. Signed-off-by: Jan Kiszka --- .../linux/files/iot2050_defconfig_base | 2 + ...fy-pin-group-node-names-for-make-dtb.patch | 2 +- ...udma-Add-system-suspend-resume-suppo.patch | 4 +- ...k3-udma-Fix-BCDMA-for-case-w-o-BCHAN.patch | 4 +- ...udma-remove-non-fatal-probe-deferral.patch | 4 +- ...Use-dev_err_probe-for-mmc_of_parse-r.patch | 4 +- ...54-Add-support-for-PM-suspend-resume.patch | 8 +- ..._wdt-Add-support-for-WDIOF_CARDRESET.patch | 10 +- ...-ti-k3-am65-main-Add-ICSSG-IEP-nodes.patch | 2 +- ...am65-main-Add-PRU-system-events-for-.patch | 2 +- ...-supplicant-based-device-enumeration.patch | 25 +- ...-efivarfs-expose-used-and-total-size.patch | 24 +- ...s-drop-kobject-from-efivars_register.patch | 24 +- ...efivar-generic-ops-register-function.patch | 8 +- ...fi-Add-EFI_ACCESS_DENIED-status-code.patch | 2 +- ...3-am65-main-fix-DSS-irq-trigger-type.patch | 36 -- ...isable-data-error-interrupts-while-.patch} | 6 +- ...ert-to-using-hierarchy-domain-for-l.patch} | 2 +- ...PCI-legacy-interrupt-support-for-AM.patch} | 2 +- ...ost-sdhci_am654-fix-start-loop-index.patch | 30 - ...workaround-for-Errata-i2037-AM65x-S.patch} | 2 +- ...-sdhci_am654-update-OTAP-and-ITAP-de.patch | 42 -- ...m65-main-Add-properties-to-support-.patch} | 0 ...pdate-ti_sci_msg_req_reboot-to-incl.patch} | 4 +- ...th-Add-missing-icss_iep_put-to-erro.patch} | 0 ...th-Fix-error-cleanup-on-failing-pru.patch} | 0 ...ts-ti-iot2050-Drop-unused-ecap0-PWM.patch} | 0 ...050-Definitions-for-runtime-pinmuxi.patch} | 0 ...050-Refactor-the-m.2-and-minipcie-p.patch} | 0 ...050-Add-icssg-prueth-nodes-for-PG2-.patch} | 0 ...iot2050-Add-node-for-generic-spidev.patch} | 0 ...cate-the-green-light-is-off-when-pa.patch} | 0 ...-setting-the-RJ45-port-led-behavior.patch} | 0 ...tend-led-panic-indicator-on-and-off.patch} | 2 +- ...050-Disable-R5-lockstep-for-all-PG2.patch} | 0 ...050-Factor-out-arduino-connector-bi.patch} | 0 ...dings-vendor-prefixes-Add-EVERLIGHT.patch} | 0 ...s-iio-Add-everlight-pm16d17-binding.patch} | 0 ...-support-for-everlight-pmd16d17-sen.patch} | 0 ...i-Add-binding-for-Siemens-IOT2050-S.patch} | 0 ...-iot2050-Support-IOT2050-SM-variant.patch} | 0 ...s-iot2050-Add-spidev-for-IOT2050-SM.patch} | 0 ...ig-add-SR1.0-specific-configuration.patch} | 0 ...th-add-SR1.0-specific-configuration.patch} | 0 ...sg-classifier-Add-support-for-SR1.0.patch} | 0 ...ig-Add-SR1.0-configuration-function.patch} | 0 ...tool-Adjust-channel-count-for-SR1.0.patch} | 0 ...th-Add-necessary-functions-for-SR1..patch} | 0 ...sg-prueth-Wire-up-support-for-SR1.0.patch} | 0 ...090-net-ti-icss_iep-Add-SR1-support.patch} | 0 ...050-Add-icssg-prueth-nodes-for-PG1-.patch} | 0 ...keystone-Fix-pci_ops-for-AM654x-SoC.patch} | 2 +- ...050-Disable-lock-step-for-all-iot20.patch} | 0 ...094-soc-ti-Add-IOMPU-like-PVU-driver.patch | 567 ++++++++++++++++++ ...-race-condition-when-initializing-PH.patch | 54 -- ...am65-main-Add-VMAP-registers-to-PCI-.patch | 49 ++ ...-supported-for-PVU-based-DMA-isolati.patch | 168 ++++++ ...2050-Enforce-DMA-isolation-for-devic.patch | 77 +++ recipes-kernel/linux/linux-iot2050-6.1.inc | 4 +- ...=> linux-iot2050-rt_6.1.102-cip26-rt14.bb} | 4 +- ...cip6.bb => linux-iot2050_6.1.102-cip26.bb} | 4 +- 61 files changed, 935 insertions(+), 245 deletions(-) delete mode 100644 recipes-kernel/linux/files/patches-6.1/0059-arm64-dts-ti-k3-am65-main-fix-DSS-irq-trigger-type.patch rename recipes-kernel/linux/files/patches-6.1/{0060-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch => 0059-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch} (91%) rename recipes-kernel/linux/files/patches-6.1/{0063-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch => 0060-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch} (99%) rename recipes-kernel/linux/files/patches-6.1/{0064-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch => 0061-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch} (99%) delete mode 100644 recipes-kernel/linux/files/patches-6.1/0061-drivers-mmc-host-sdhci_am654-fix-start-loop-index.patch rename recipes-kernel/linux/files/patches-6.1/{0065-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch => 0062-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch} (98%) delete mode 100644 recipes-kernel/linux/files/patches-6.1/0062-drivers-mmc-host-sdhci_am654-update-OTAP-and-ITAP-de.patch rename recipes-kernel/linux/files/patches-6.1/{0066-arm64-dts-ti-k3-am65-main-Add-properties-to-support-.patch => 0063-arm64-dts-ti-k3-am65-main-Add-properties-to-support-.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0067-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch => 0064-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch} (94%) rename recipes-kernel/linux/files/patches-6.1/{0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch => 0065-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch => 0066-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0070-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch => 0067-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0071-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch => 0068-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0072-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch => 0069-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0073-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch => 0070-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0074-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch => 0071-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0075-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch => 0072-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0076-HACK-setting-the-RJ45-port-led-behavior.patch => 0073-HACK-setting-the-RJ45-port-led-behavior.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch => 0074-WIP-feat-extend-led-panic-indicator-on-and-off.patch} (99%) rename recipes-kernel/linux/files/patches-6.1/{0078-arm64-dts-ti-iot2050-Disable-R5-lockstep-for-all-PG2.patch => 0075-arm64-dts-ti-iot2050-Disable-R5-lockstep-for-all-PG2.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0079-arm64-dts-ti-iot2050-Factor-out-arduino-connector-bi.patch => 0076-arm64-dts-ti-iot2050-Factor-out-arduino-connector-bi.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0080-dt-bindings-vendor-prefixes-Add-EVERLIGHT.patch => 0077-dt-bindings-vendor-prefixes-Add-EVERLIGHT.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0081-dt-bindings-iio-Add-everlight-pm16d17-binding.patch => 0078-dt-bindings-iio-Add-everlight-pm16d17-binding.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0082-iio-proximity-Add-support-for-everlight-pmd16d17-sen.patch => 0079-iio-proximity-Add-support-for-everlight-pmd16d17-sen.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0083-dt-bindings-arm-ti-Add-binding-for-Siemens-IOT2050-S.patch => 0080-dt-bindings-arm-ti-Add-binding-for-Siemens-IOT2050-S.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0084-dts-iot2050-Support-IOT2050-SM-variant.patch => 0081-dts-iot2050-Support-IOT2050-SM-variant.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0085-WIP-dts-iot2050-Add-spidev-for-IOT2050-SM.patch => 0082-WIP-dts-iot2050-Add-spidev-for-IOT2050-SM.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0086-net-ti-icssg-config-add-SR1.0-specific-configuration.patch => 0083-net-ti-icssg-config-add-SR1.0-specific-configuration.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0087-net-ti-icssg-prueth-add-SR1.0-specific-configuration.patch => 0084-net-ti-icssg-prueth-add-SR1.0-specific-configuration.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0088-net-ti-icssg-classifier-Add-support-for-SR1.0.patch => 0085-net-ti-icssg-classifier-Add-support-for-SR1.0.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0089-net-ti-icssg-config-Add-SR1.0-configuration-function.patch => 0086-net-ti-icssg-config-Add-SR1.0-configuration-function.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0090-net-ti-icssg-ethtool-Adjust-channel-count-for-SR1.0.patch => 0087-net-ti-icssg-ethtool-Adjust-channel-count-for-SR1.0.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0091-net-ti-iccsg-prueth-Add-necessary-functions-for-SR1..patch => 0088-net-ti-iccsg-prueth-Add-necessary-functions-for-SR1..patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0092-net-ti-icssg-prueth-Wire-up-support-for-SR1.0.patch => 0089-net-ti-icssg-prueth-Wire-up-support-for-SR1.0.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0093-net-ti-icss_iep-Add-SR1-support.patch => 0090-net-ti-icss_iep-Add-SR1-support.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0094-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG1-.patch => 0091-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG1-.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0096-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch => 0092-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch} (98%) rename recipes-kernel/linux/files/patches-6.1/{0097-arm64-dts-ti-iot2050-Disable-lock-step-for-all-iot20.patch => 0093-arm64-dts-ti-iot2050-Disable-lock-step-for-all-iot20.patch} (100%) create mode 100644 recipes-kernel/linux/files/patches-6.1/0094-soc-ti-Add-IOMPU-like-PVU-driver.patch delete mode 100644 recipes-kernel/linux/files/patches-6.1/0095-PCI-keystone-Fix-race-condition-when-initializing-PH.patch create mode 100644 recipes-kernel/linux/files/patches-6.1/0095-arm64-dts-ti-k3-am65-main-Add-VMAP-registers-to-PCI-.patch create mode 100644 recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Add-supported-for-PVU-based-DMA-isolati.patch create mode 100644 recipes-kernel/linux/files/patches-6.1/0097-arm64-dts-ti-iot2050-Enforce-DMA-isolation-for-devic.patch rename recipes-kernel/linux/{linux-iot2050-rt_6.1.54-cip6-rt3.bb => linux-iot2050-rt_6.1.102-cip26-rt14.bb} (60%) rename recipes-kernel/linux/{linux-iot2050_6.1.54-cip6.bb => linux-iot2050_6.1.102-cip26.bb} (56%) diff --git a/recipes-kernel/linux/files/iot2050_defconfig_base b/recipes-kernel/linux/files/iot2050_defconfig_base index 9ac4027c3..ec1358f6a 100644 --- a/recipes-kernel/linux/files/iot2050_defconfig_base +++ b/recipes-kernel/linux/files/iot2050_defconfig_base @@ -609,6 +609,7 @@ CONFIG_RPMSG_QCOM_GLINK_RPM=y CONFIG_RPMSG_VIRTIO=m CONFIG_TI_SCI_PM_DOMAINS=y CONFIG_TI_PRUSS=y +CONFIG_TI_PVU=y CONFIG_EXTCON_PALMAS=m CONFIG_EXTCON_USB_GPIO=m CONFIG_MEMORY=y @@ -662,6 +663,7 @@ CONFIG_SECURITY=y CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_ECHAINIV=y CONFIG_CRYPTO_ANSI_CPRNG=y +CONFIG_DMA_RESTRICTED_POOL=y CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=24 CONFIG_PRINTK_TIME=y diff --git a/recipes-kernel/linux/files/patches-6.1/0006-arm64-dts-ti-Unify-pin-group-node-names-for-make-dtb.patch b/recipes-kernel/linux/files/patches-6.1/0006-arm64-dts-ti-Unify-pin-group-node-names-for-make-dtb.patch index d644024e8..3b22438d9 100644 --- a/recipes-kernel/linux/files/patches-6.1/0006-arm64-dts-ti-Unify-pin-group-node-names-for-make-dtb.patch +++ b/recipes-kernel/linux/files/patches-6.1/0006-arm64-dts-ti-Unify-pin-group-node-names-for-make-dtb.patch @@ -80,7 +80,7 @@ index 93a5f0817efc..6c6655369e52 100644 AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ >; diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts -index b08a083d722d..7152b04eec52 100644 +index 7f265c671654..4a0ae0c817fe 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -114,35 +114,35 @@ led-0 { diff --git a/recipes-kernel/linux/files/patches-6.1/0038-dmaengine-ti-k3-udma-Add-system-suspend-resume-suppo.patch b/recipes-kernel/linux/files/patches-6.1/0038-dmaengine-ti-k3-udma-Add-system-suspend-resume-suppo.patch index 7441ae453..f202193a6 100644 --- a/recipes-kernel/linux/files/patches-6.1/0038-dmaengine-ti-k3-udma-Add-system-suspend-resume-suppo.patch +++ b/recipes-kernel/linux/files/patches-6.1/0038-dmaengine-ti-k3-udma-Add-system-suspend-resume-suppo.patch @@ -37,7 +37,7 @@ Acked-by: Peter Ujfalusi 1 file changed, 54 insertions(+) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c -index b86b809eb1f7..b0286df3383d 100644 +index 82e7acfda6ed..53f3c08dd256 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -303,6 +303,8 @@ struct udma_chan { @@ -49,7 +49,7 @@ index b86b809eb1f7..b0286df3383d 100644 /* dmapool for packet mode descriptors */ bool use_dma_pool; -@@ -5504,11 +5506,63 @@ static int udma_probe(struct platform_device *pdev) +@@ -5510,11 +5512,63 @@ static int udma_probe(struct platform_device *pdev) return ret; } diff --git a/recipes-kernel/linux/files/patches-6.1/0039-dmaengine-ti-k3-udma-Fix-BCDMA-for-case-w-o-BCHAN.patch b/recipes-kernel/linux/files/patches-6.1/0039-dmaengine-ti-k3-udma-Fix-BCDMA-for-case-w-o-BCHAN.patch index 0bd69ba8c..20bbb6066 100644 --- a/recipes-kernel/linux/files/patches-6.1/0039-dmaengine-ti-k3-udma-Fix-BCDMA-for-case-w-o-BCHAN.patch +++ b/recipes-kernel/linux/files/patches-6.1/0039-dmaengine-ti-k3-udma-Fix-BCDMA-for-case-w-o-BCHAN.patch @@ -13,10 +13,10 @@ Signed-off-by: Vignesh Raghavendra 1 file changed, 3 insertions(+) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c -index b0286df3383d..bbc26c18a590 100644 +index 53f3c08dd256..a4316c759392 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c -@@ -4784,7 +4784,10 @@ static int bcdma_setup_resources(struct udma_dev *ud) +@@ -4790,7 +4790,10 @@ static int bcdma_setup_resources(struct udma_dev *ud) irq_res.desc[i].num = rm_res->desc[i].num; } } diff --git a/recipes-kernel/linux/files/patches-6.1/0041-dmaengine-ti-k3-udma-remove-non-fatal-probe-deferral.patch b/recipes-kernel/linux/files/patches-6.1/0041-dmaengine-ti-k3-udma-remove-non-fatal-probe-deferral.patch index b1b6382fc..61bb97275 100644 --- a/recipes-kernel/linux/files/patches-6.1/0041-dmaengine-ti-k3-udma-remove-non-fatal-probe-deferral.patch +++ b/recipes-kernel/linux/files/patches-6.1/0041-dmaengine-ti-k3-udma-remove-non-fatal-probe-deferral.patch @@ -15,10 +15,10 @@ Acked-by: Peter Ujfalusi 1 file changed, 1 deletion(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c -index bbc26c18a590..3aa8b9b4321d 100644 +index a4316c759392..8e3cd33b3bca 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c -@@ -5362,7 +5362,6 @@ static int udma_probe(struct platform_device *pdev) +@@ -5368,7 +5368,6 @@ static int udma_probe(struct platform_device *pdev) dev->msi.domain = of_msi_get_domain(dev, dev->of_node, DOMAIN_BUS_TI_SCI_INTA_MSI); if (!dev->msi.domain) { diff --git a/recipes-kernel/linux/files/patches-6.1/0042-mmc-sdhci_am654-Use-dev_err_probe-for-mmc_of_parse-r.patch b/recipes-kernel/linux/files/patches-6.1/0042-mmc-sdhci_am654-Use-dev_err_probe-for-mmc_of_parse-r.patch index eb899b0ff..571143271 100644 --- a/recipes-kernel/linux/files/patches-6.1/0042-mmc-sdhci_am654-Use-dev_err_probe-for-mmc_of_parse-r.patch +++ b/recipes-kernel/linux/files/patches-6.1/0042-mmc-sdhci_am654-Use-dev_err_probe-for-mmc_of_parse-r.patch @@ -16,10 +16,10 @@ Signed-off-by: Ulf Hansson 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c -index 8e22b375247e..672d37ea98d0 100644 +index 52d6cc07e38c..55f457126f8f 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c -@@ -834,7 +834,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) +@@ -909,7 +909,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) ret = mmc_of_parse(host->mmc); if (ret) { diff --git a/recipes-kernel/linux/files/patches-6.1/0043-mmc-sdhci_am654-Add-support-for-PM-suspend-resume.patch b/recipes-kernel/linux/files/patches-6.1/0043-mmc-sdhci_am654-Add-support-for-PM-suspend-resume.patch index 94623373d..3a0ec4877 100644 --- a/recipes-kernel/linux/files/patches-6.1/0043-mmc-sdhci_am654-Add-support-for-PM-suspend-resume.patch +++ b/recipes-kernel/linux/files/patches-6.1/0043-mmc-sdhci_am654-Add-support-for-PM-suspend-resume.patch @@ -14,7 +14,7 @@ Signed-off-by: Vignesh Raghavendra 1 file changed, 131 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c -index 672d37ea98d0..7cdf0f54e3a5 100644 +index 55f457126f8f..d47672bcc508 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -85,6 +85,7 @@ @@ -25,7 +25,7 @@ index 672d37ea98d0..7cdf0f54e3a5 100644 /* Command Queue Host Controller Interface Base address */ #define SDHCI_AM654_CQE_BASE_ADDR 0x200 -@@ -808,16 +809,10 @@ static int sdhci_am654_probe(struct platform_device *pdev) +@@ -883,16 +884,10 @@ static int sdhci_am654_probe(struct platform_device *pdev) pltfm_host->clk = clk_xin; @@ -43,7 +43,7 @@ index 672d37ea98d0..7cdf0f54e3a5 100644 } sdhci_am654->base = devm_regmap_init_mmio(dev, base, -@@ -825,31 +820,47 @@ static int sdhci_am654_probe(struct platform_device *pdev) +@@ -900,31 +895,47 @@ static int sdhci_am654_probe(struct platform_device *pdev) if (IS_ERR(sdhci_am654->base)) { dev_err(dev, "Failed to initialize regmap\n"); ret = PTR_ERR(sdhci_am654->base); @@ -98,7 +98,7 @@ index 672d37ea98d0..7cdf0f54e3a5 100644 err_pltfm_free: sdhci_pltfm_free(pdev); return ret; -@@ -858,23 +869,127 @@ static int sdhci_am654_probe(struct platform_device *pdev) +@@ -933,23 +944,127 @@ static int sdhci_am654_probe(struct platform_device *pdev) static int sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); diff --git a/recipes-kernel/linux/files/patches-6.1/0045-watchdog-rit_wdt-Add-support-for-WDIOF_CARDRESET.patch b/recipes-kernel/linux/files/patches-6.1/0045-watchdog-rit_wdt-Add-support-for-WDIOF_CARDRESET.patch index b89cadfed..77c7d0186 100644 --- a/recipes-kernel/linux/files/patches-6.1/0045-watchdog-rit_wdt-Add-support-for-WDIOF_CARDRESET.patch +++ b/recipes-kernel/linux/files/patches-6.1/0045-watchdog-rit_wdt-Add-support-for-WDIOF_CARDRESET.patch @@ -22,7 +22,7 @@ Signed-off-by: Wim Van Sebroeck 1 file changed, 48 insertions(+) diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c -index 6e9253761fc1..bc13e7687f04 100644 +index fe27039f6f5a..486438c41e1d 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -14,6 +14,8 @@ @@ -34,9 +34,9 @@ index 6e9253761fc1..bc13e7687f04 100644 #include #include #include -@@ -52,6 +54,11 @@ +@@ -54,6 +56,11 @@ - #define DWDST BIT(1) + #define MAX_HW_ERROR 250 +#define PON_REASON_SOF_NUM 0xBBBBCCCC +#define PON_REASON_MAGIC_NUM 0xDDDDDDDD @@ -46,7 +46,7 @@ index 6e9253761fc1..bc13e7687f04 100644 static int heartbeat = DEFAULT_HEARTBEAT; /* -@@ -198,6 +205,11 @@ static int rti_wdt_probe(struct platform_device *pdev) +@@ -207,6 +214,11 @@ static int rti_wdt_probe(struct platform_device *pdev) struct rti_wdt_device *wdt; struct clk *clk; u32 last_ping = 0; @@ -58,7 +58,7 @@ index 6e9253761fc1..bc13e7687f04 100644 wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); if (!wdt) -@@ -284,6 +296,42 @@ static int rti_wdt_probe(struct platform_device *pdev) +@@ -285,6 +297,42 @@ static int rti_wdt_probe(struct platform_device *pdev) } } diff --git a/recipes-kernel/linux/files/patches-6.1/0047-arm64-dts-ti-k3-am65-main-Add-ICSSG-IEP-nodes.patch b/recipes-kernel/linux/files/patches-6.1/0047-arm64-dts-ti-k3-am65-main-Add-ICSSG-IEP-nodes.patch index 78922e41d..c54371247 100644 --- a/recipes-kernel/linux/files/patches-6.1/0047-arm64-dts-ti-k3-am65-main-Add-ICSSG-IEP-nodes.patch +++ b/recipes-kernel/linux/files/patches-6.1/0047-arm64-dts-ti-k3-am65-main-Add-ICSSG-IEP-nodes.patch @@ -16,7 +16,7 @@ Signed-off-by: MD Danish Anwar 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi -index ebb1c5ce7aec..a3edfec481ce 100644 +index 83dd8993027a..e239287ee9d7 100644 --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi @@ -967,6 +967,18 @@ icssg0_iepclk_mux: iepclk-mux@30 { diff --git a/recipes-kernel/linux/files/patches-6.1/0051-arm64-dts-ti-k3-am65-main-Add-PRU-system-events-for-.patch b/recipes-kernel/linux/files/patches-6.1/0051-arm64-dts-ti-k3-am65-main-Add-PRU-system-events-for-.patch index 0089bfa60..b78c225d8 100644 --- a/recipes-kernel/linux/files/patches-6.1/0051-arm64-dts-ti-k3-am65-main-Add-PRU-system-events-for-.patch +++ b/recipes-kernel/linux/files/patches-6.1/0051-arm64-dts-ti-k3-am65-main-Add-PRU-system-events-for-.patch @@ -31,7 +31,7 @@ Signed-off-by: MD Danish Anwar 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi -index a3edfec481ce..5d862f4f45cf 100644 +index e239287ee9d7..231634fdc469 100644 --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi @@ -1015,6 +1015,9 @@ pru0_0: pru@34000 { diff --git a/recipes-kernel/linux/files/patches-6.1/0053-tee-optee-Fix-supplicant-based-device-enumeration.patch b/recipes-kernel/linux/files/patches-6.1/0053-tee-optee-Fix-supplicant-based-device-enumeration.patch index 284d7c31d..7e73670b2 100644 --- a/recipes-kernel/linux/files/patches-6.1/0053-tee-optee-Fix-supplicant-based-device-enumeration.patch +++ b/recipes-kernel/linux/files/patches-6.1/0053-tee-optee-Fix-supplicant-based-device-enumeration.patch @@ -24,9 +24,9 @@ Tested-by: Masahisa Kojima [Taken from https://lore.kernel.org/all/20230728134832.326467-1-sumit.garg@linaro.org/] --- drivers/tee/optee/core.c | 13 ++----------- - drivers/tee/optee/device.c | 13 ++++++++++--- + drivers/tee/optee/device.c | 9 ++++++++- drivers/tee/optee/optee_private.h | 2 -- - 3 files changed, 12 insertions(+), 16 deletions(-) + 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index daf07737c4fd..52c08055826b 100644 @@ -67,22 +67,18 @@ index daf07737c4fd..52c08055826b 100644 } diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c -index 64f0e047c23d..78fc0a15c463 100644 +index 1892e49a8e6a..56ef3b1faf35 100644 --- a/drivers/tee/optee/device.c +++ b/drivers/tee/optee/device.c -@@ -60,9 +60,10 @@ static void optee_release_device(struct device *dev) - kfree(optee_device); - } - --static int optee_register_device(const uuid_t *device_uuid) -+static int optee_register_device(const uuid_t *device_uuid, u32 func) +@@ -72,6 +72,7 @@ static DEVICE_ATTR_RO(need_supplicant); + static int optee_register_device(const uuid_t *device_uuid, u32 func) { struct tee_client_device *optee_device = NULL; + const char *dev_name_fmt = NULL; int rc; optee_device = kzalloc(sizeof(*optee_device), GFP_KERNEL); -@@ -71,7 +72,13 @@ static int optee_register_device(const uuid_t *device_uuid) +@@ -80,7 +81,13 @@ static int optee_register_device(const uuid_t *device_uuid, u32 func) optee_device->dev.bus = &tee_bus_type; optee_device->dev.release = optee_release_device; @@ -97,15 +93,6 @@ index 64f0e047c23d..78fc0a15c463 100644 kfree(optee_device); return -ENOMEM; } -@@ -142,7 +149,7 @@ static int __optee_enumerate_devices(u32 func) - num_devices = shm_size / sizeof(uuid_t); - - for (idx = 0; idx < num_devices; idx++) { -- rc = optee_register_device(&device_uuid[idx]); -+ rc = optee_register_device(&device_uuid[idx], func); - if (rc) - goto out_shm; - } diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h index 04ae58892608..7e9b3e7cd26b 100644 --- a/drivers/tee/optee/optee_private.h diff --git a/recipes-kernel/linux/files/patches-6.1/0054-efivarfs-expose-used-and-total-size.patch b/recipes-kernel/linux/files/patches-6.1/0054-efivarfs-expose-used-and-total-size.patch index 121dc6d60..141c18e2d 100644 --- a/recipes-kernel/linux/files/patches-6.1/0054-efivarfs-expose-used-and-total-size.patch +++ b/recipes-kernel/linux/files/patches-6.1/0054-efivarfs-expose-used-and-total-size.patch @@ -53,10 +53,10 @@ index b0b848d6933a..f0cc00032751 100644 * In the nonblocking case we do not attempt to perform garbage * collection if we do not have enough free space. Rather, we do the diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index b43e5e6ddaf6..db3c0ce08e44 100644 +index 28d4defc5d0c..04f75a9f7091 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -190,6 +190,7 @@ static int generic_ops_register(void) +@@ -211,6 +211,7 @@ static int generic_ops_register(void) generic_ops.get_variable = efi.get_variable; generic_ops.get_next_variable = efi.get_next_variable; generic_ops.query_variable_store = efi_query_variable_store; @@ -65,10 +65,10 @@ index b43e5e6ddaf6..db3c0ce08e44 100644 if (efi_rt_services_supported(EFI_RT_SUPPORTED_SET_VARIABLE)) { generic_ops.set_variable = efi.set_variable; diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c -index 0ba9f18312f5..de36d4e4bd95 100644 +index 4ca256bcd697..d22160e7c785 100644 --- a/drivers/firmware/efi/vars.c +++ b/drivers/firmware/efi/vars.c -@@ -241,3 +241,15 @@ efi_status_t efivar_set_variable(efi_char16_t *name, efi_guid_t *vendor, +@@ -250,3 +250,15 @@ efi_status_t efivar_set_variable(efi_char16_t *name, efi_guid_t *vendor, return status; } EXPORT_SYMBOL_NS_GPL(efivar_set_variable, EFIVAR); @@ -85,18 +85,18 @@ index 0ba9f18312f5..de36d4e4bd95 100644 +} +EXPORT_SYMBOL_NS_GPL(efivar_query_variable_info, EFIVAR); diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c -index 6780fc81cc11..0994446a3544 100644 +index 77c7615bba5e..9c7e17657468 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c -@@ -13,6 +13,7 @@ - #include +@@ -14,6 +14,7 @@ #include #include + #include +#include #include "internal.h" -@@ -23,8 +24,44 @@ static void efivarfs_evict_inode(struct inode *inode) +@@ -24,8 +25,44 @@ static void efivarfs_evict_inode(struct inode *inode) clear_inode(inode); } @@ -143,10 +143,10 @@ index 6780fc81cc11..0994446a3544 100644 .evict_inode = efivarfs_evict_inode, }; diff --git a/include/linux/efi.h b/include/linux/efi.h -index 4e1bfee9675d..b8cd4db7a1bf 100644 +index a849b533be5b..cffd2d4f8f71 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -1045,6 +1045,7 @@ struct efivar_operations { +@@ -1038,6 +1038,7 @@ struct efivar_operations { efi_set_variable_t *set_variable; efi_set_variable_t *set_variable_nonblocking; efi_query_variable_store_t *query_variable_store; @@ -154,7 +154,7 @@ index 4e1bfee9675d..b8cd4db7a1bf 100644 }; struct efivars { -@@ -1053,6 +1054,12 @@ struct efivars { +@@ -1046,6 +1047,12 @@ struct efivars { const struct efivar_operations *ops; }; @@ -167,7 +167,7 @@ index 4e1bfee9675d..b8cd4db7a1bf 100644 /* * The maximum size of VariableName + Data = 1024 * Therefore, it's reasonable to save that much -@@ -1087,6 +1094,10 @@ efi_status_t efivar_set_variable_locked(efi_char16_t *name, efi_guid_t *vendor, +@@ -1080,6 +1087,10 @@ efi_status_t efivar_set_variable_locked(efi_char16_t *name, efi_guid_t *vendor, efi_status_t efivar_set_variable(efi_char16_t *name, efi_guid_t *vendor, u32 attr, unsigned long data_size, void *data); diff --git a/recipes-kernel/linux/files/patches-6.1/0055-efi-efivars-drop-kobject-from-efivars_register.patch b/recipes-kernel/linux/files/patches-6.1/0055-efi-efivars-drop-kobject-from-efivars_register.patch index a8a451914..dca2e479c 100644 --- a/recipes-kernel/linux/files/patches-6.1/0055-efi-efivars-drop-kobject-from-efivars_register.patch +++ b/recipes-kernel/linux/files/patches-6.1/0055-efi-efivars-drop-kobject-from-efivars_register.patch @@ -29,10 +29,10 @@ Signed-off-by: Ard Biesheuvel 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index db3c0ce08e44..54dda4309892 100644 +index 04f75a9f7091..7d758df19b64 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -196,7 +196,7 @@ static int generic_ops_register(void) +@@ -217,7 +217,7 @@ static int generic_ops_register(void) generic_ops.set_variable = efi.set_variable; generic_ops.set_variable_nonblocking = efi.set_variable_nonblocking; } @@ -42,10 +42,10 @@ index db3c0ce08e44..54dda4309892 100644 static void generic_ops_unregister(void) diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c -index de36d4e4bd95..26a05bf37fdd 100644 +index d22160e7c785..e19e8f19ebc0 100644 --- a/drivers/firmware/efi/vars.c +++ b/drivers/firmware/efi/vars.c -@@ -40,37 +40,30 @@ static efi_status_t check_var_size(bool nonblocking, u32 attributes, +@@ -40,31 +40,25 @@ static efi_status_t check_var_size(bool nonblocking, u32 attributes, } /** @@ -81,8 +81,10 @@ index de36d4e4bd95..26a05bf37fdd 100644 - struct kobject *kobject) + const struct efivar_operations *ops) { - if (down_interruptible(&efivars_lock)) - return -EINTR; + int rv; + +@@ -78,7 +72,6 @@ int efivars_register(struct efivars *efivars, + } efivars->ops = ops; - efivars->kobject = kobject; @@ -103,10 +105,10 @@ index 871bedf533a8..96ea1fa76d35 100644 printk(KERN_INFO "gsmi: Failed to register efivars\n"); sysfs_remove_files(gsmi_kobj, gsmi_attrs); diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c -index 0994446a3544..36d5fcf2591e 100644 +index 9c7e17657468..225c4854b8eb 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c -@@ -290,7 +290,7 @@ static struct file_system_type efivarfs_type = { +@@ -305,7 +305,7 @@ static struct file_system_type efivarfs_type = { static __init int efivarfs_init(void) { @@ -116,10 +118,10 @@ index 0994446a3544..36d5fcf2591e 100644 return register_filesystem(&efivarfs_type); diff --git a/include/linux/efi.h b/include/linux/efi.h -index b8cd4db7a1bf..953575e29da6 100644 +index cffd2d4f8f71..558ce68a5c5d 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -1050,7 +1050,6 @@ struct efivar_operations { +@@ -1043,7 +1043,6 @@ struct efivar_operations { struct efivars { struct kset *kset; @@ -127,7 +129,7 @@ index b8cd4db7a1bf..953575e29da6 100644 const struct efivar_operations *ops; }; -@@ -1070,10 +1069,14 @@ static inline u64 efivar_reserved_space(void) { return 0; } +@@ -1063,10 +1062,14 @@ static inline u64 efivar_reserved_space(void) { return 0; } #define EFI_VAR_NAME_LEN 1024 int efivars_register(struct efivars *efivars, diff --git a/recipes-kernel/linux/files/patches-6.1/0056-efi-expose-efivar-generic-ops-register-function.patch b/recipes-kernel/linux/files/patches-6.1/0056-efi-expose-efivar-generic-ops-register-function.patch index ea2770f42..ef4413ba7 100644 --- a/recipes-kernel/linux/files/patches-6.1/0056-efi-expose-efivar-generic-ops-register-function.patch +++ b/recipes-kernel/linux/files/patches-6.1/0056-efi-expose-efivar-generic-ops-register-function.patch @@ -20,10 +20,10 @@ Signed-off-by: Masahisa Kojima 2 files changed, 15 insertions(+) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index 54dda4309892..65850e445f93 100644 +index 7d758df19b64..756d38db19f7 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -204,6 +204,18 @@ static void generic_ops_unregister(void) +@@ -228,6 +228,18 @@ static void generic_ops_unregister(void) efivars_unregister(&generic_efivars); } @@ -43,10 +43,10 @@ index 54dda4309892..65850e445f93 100644 #define EFIVAR_SSDT_NAME_MAX 16UL static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata; diff --git a/include/linux/efi.h b/include/linux/efi.h -index 953575e29da6..f19abc71995b 100644 +index 558ce68a5c5d..4a8f9db5f751 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -1370,4 +1370,7 @@ struct linux_efi_initrd { +@@ -1363,4 +1363,7 @@ struct linux_efi_initrd { /* Header of a populated EFI secret area */ #define EFI_SECRET_TABLE_HEADER_GUID EFI_GUID(0x1e74f542, 0x71dd, 0x4d66, 0x96, 0x3e, 0xef, 0x42, 0x87, 0xff, 0x17, 0x3b) diff --git a/recipes-kernel/linux/files/patches-6.1/0057-efi-Add-EFI_ACCESS_DENIED-status-code.patch b/recipes-kernel/linux/files/patches-6.1/0057-efi-Add-EFI_ACCESS_DENIED-status-code.patch index 37c74e1a8..ae21e386c 100644 --- a/recipes-kernel/linux/files/patches-6.1/0057-efi-Add-EFI_ACCESS_DENIED-status-code.patch +++ b/recipes-kernel/linux/files/patches-6.1/0057-efi-Add-EFI_ACCESS_DENIED-status-code.patch @@ -15,7 +15,7 @@ Signed-off-by: Masahisa Kojima 1 file changed, 1 insertion(+) diff --git a/include/linux/efi.h b/include/linux/efi.h -index f19abc71995b..776c362b086b 100644 +index 4a8f9db5f751..9ef2212b4507 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -39,6 +39,7 @@ diff --git a/recipes-kernel/linux/files/patches-6.1/0059-arm64-dts-ti-k3-am65-main-fix-DSS-irq-trigger-type.patch b/recipes-kernel/linux/files/patches-6.1/0059-arm64-dts-ti-k3-am65-main-fix-DSS-irq-trigger-type.patch deleted file mode 100644 index a4b506b76..000000000 --- a/recipes-kernel/linux/files/patches-6.1/0059-arm64-dts-ti-k3-am65-main-fix-DSS-irq-trigger-type.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen -Date: Mon, 31 May 2021 16:31:35 +0530 -Subject: [PATCH] arm64: dts: ti: k3-am65-main: fix DSS irq trigger type - -DSS irq trigger type is set to IRQ_TYPE_EDGE_RISING. For some reason this -results in double the amount of expected interrupts, e.g. for normal -page flipping test the number of interrupts per second is 2 * fps. It is -as if the IRQ would trigger on both edges. - -In any case, it's better to use IRQ_TYPE_LEVEL_HIGH, like the other -devices do, which seems to fix this problem. - -Signed-off-by: Tomi Valkeinen -Signed-off-by: Jyri Sarha -Signed-off-by: Nikhil Devshatwar -Signed-off-by: Vignesh Raghavendra -Tested-by: Praneeth Bajjuri -[Taken from TI 5.10 SDK] ---- - arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi -index 5d862f4f45cf..231634fdc469 100644 ---- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi -+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi -@@ -856,7 +856,7 @@ dss: dss@4a00000 { - assigned-clocks = <&k3_clks 67 2>; - assigned-clock-parents = <&k3_clks 67 5>; - -- interrupts = ; -+ interrupts = ; - - dma-coherent; - diff --git a/recipes-kernel/linux/files/patches-6.1/0060-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch b/recipes-kernel/linux/files/patches-6.1/0059-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch similarity index 91% rename from recipes-kernel/linux/files/patches-6.1/0060-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch rename to recipes-kernel/linux/files/patches-6.1/0059-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch index a793009dc..de2491f94 100644 --- a/recipes-kernel/linux/files/patches-6.1/0060-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch +++ b/recipes-kernel/linux/files/patches-6.1/0059-mmc-sdhci_am654-Disable-data-error-interrupts-while-.patch @@ -15,10 +15,10 @@ Signed-off-by: Vignesh Raghavendra 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c -index 7cdf0f54e3a5..596e80d3d4c0 100644 +index d47672bcc508..526d25e6961c 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c -@@ -390,8 +390,18 @@ static void sdhci_am654_reset(struct sdhci_host *host, u8 mask) +@@ -414,8 +414,18 @@ static void sdhci_am654_reset(struct sdhci_host *host, u8 mask) static int sdhci_am654_execute_tuning(struct mmc_host *mmc, u32 opcode) { struct sdhci_host *host = mmc_priv(mmc); @@ -38,7 +38,7 @@ index 7cdf0f54e3a5..596e80d3d4c0 100644 if (err) return err; /* -@@ -400,6 +410,13 @@ static int sdhci_am654_execute_tuning(struct mmc_host *mmc, u32 opcode) +@@ -424,6 +434,13 @@ static int sdhci_am654_execute_tuning(struct mmc_host *mmc, u32 opcode) */ sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); diff --git a/recipes-kernel/linux/files/patches-6.1/0063-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch b/recipes-kernel/linux/files/patches-6.1/0060-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch similarity index 99% rename from recipes-kernel/linux/files/patches-6.1/0063-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch rename to recipes-kernel/linux/files/patches-6.1/0060-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch index cde6c36b4..2720c02b2 100644 --- a/recipes-kernel/linux/files/patches-6.1/0063-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch +++ b/recipes-kernel/linux/files/patches-6.1/0060-PCI-keystone-Convert-to-using-hierarchy-domain-for-l.patch @@ -18,7 +18,7 @@ Signed-off-by: Vignesh Raghavendra 1 file changed, 120 insertions(+), 91 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c -index 78818853af9e..44545536641d 100644 +index 7ecad72cff7e..273bd221e948 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -69,6 +69,7 @@ diff --git a/recipes-kernel/linux/files/patches-6.1/0064-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch b/recipes-kernel/linux/files/patches-6.1/0061-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch similarity index 99% rename from recipes-kernel/linux/files/patches-6.1/0064-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch rename to recipes-kernel/linux/files/patches-6.1/0061-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch index 3e98f49aa..a5393f4c6 100644 --- a/recipes-kernel/linux/files/patches-6.1/0064-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch +++ b/recipes-kernel/linux/files/patches-6.1/0061-PCI-keystone-Add-PCI-legacy-interrupt-support-for-AM.patch @@ -23,7 +23,7 @@ Signed-off-by: Vignesh Raghavendra 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c -index 44545536641d..5797818860e5 100644 +index 273bd221e948..1f80a08b8ca7 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -118,6 +118,7 @@ struct keystone_pcie { diff --git a/recipes-kernel/linux/files/patches-6.1/0061-drivers-mmc-host-sdhci_am654-fix-start-loop-index.patch b/recipes-kernel/linux/files/patches-6.1/0061-drivers-mmc-host-sdhci_am654-fix-start-loop-index.patch deleted file mode 100644 index 3af946464..000000000 --- a/recipes-kernel/linux/files/patches-6.1/0061-drivers-mmc-host-sdhci_am654-fix-start-loop-index.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nitin Yadav -Date: Mon, 28 Nov 2022 16:25:36 +0530 -Subject: [PATCH] drivers: mmc: host: sdhci_am654: fix start loop index - -ti,otap-del-sel-legacy/ti,itap-del-sel-legacy passed -from DT are currently ignored for all SD/MMC and eMMC -modes. -Fix this by making start loop index to MMC_TIMING_LEGACY. - -Fixes: 8ee5fc0e0b3be ("mmc: sdhci_am654: Update OTAPDLY writes") -Signed-off-by: Nitin Yadav -[Taken from TI 6.1 SDK] ---- - drivers/mmc/host/sdhci_am654.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c -index 596e80d3d4c0..64d9bb545dcc 100644 ---- a/drivers/mmc/host/sdhci_am654.c -+++ b/drivers/mmc/host/sdhci_am654.c -@@ -615,7 +615,7 @@ static int sdhci_am654_get_otap_delay(struct sdhci_host *host, - return 0; - } - -- for (i = MMC_TIMING_MMC_HS; i <= MMC_TIMING_MMC_HS400; i++) { -+ for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) { - - ret = device_property_read_u32(dev, td[i].otap_binding, - &sdhci_am654->otap_del_sel[i]); diff --git a/recipes-kernel/linux/files/patches-6.1/0065-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch b/recipes-kernel/linux/files/patches-6.1/0062-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch similarity index 98% rename from recipes-kernel/linux/files/patches-6.1/0065-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch rename to recipes-kernel/linux/files/patches-6.1/0062-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch index c4e36f3a4..bd0230944 100644 --- a/recipes-kernel/linux/files/patches-6.1/0065-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch +++ b/recipes-kernel/linux/files/patches-6.1/0062-PCI-keystone-Add-workaround-for-Errata-i2037-AM65x-S.patch @@ -28,7 +28,7 @@ Signed-off-by: Vignesh Raghavendra 1 file changed, 42 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c -index 5797818860e5..fefb375a777a 100644 +index 1f80a08b8ca7..50a777cbfb77 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -35,6 +35,11 @@ diff --git a/recipes-kernel/linux/files/patches-6.1/0062-drivers-mmc-host-sdhci_am654-update-OTAP-and-ITAP-de.patch b/recipes-kernel/linux/files/patches-6.1/0062-drivers-mmc-host-sdhci_am654-update-OTAP-and-ITAP-de.patch deleted file mode 100644 index d56accc5a..000000000 --- a/recipes-kernel/linux/files/patches-6.1/0062-drivers-mmc-host-sdhci_am654-update-OTAP-and-ITAP-de.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nitin Yadav -Date: Mon, 28 Nov 2022 16:25:37 +0530 -Subject: [PATCH] drivers: mmc: host: sdhci_am654: update OTAP and ITAP delay - -Linux is fail to detect class U1 UHS SD cards (such as microcenter) -due to incorrect OTAP and ITAP delay select values. Update OTAP and -ITAP delay select values and masks based on recommeded RIOT values. - -Signed-off-by: Nitin Yadav -[Taken from TI 6.1 SDK] ---- - drivers/mmc/host/sdhci_am654.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c -index 64d9bb545dcc..6d7681956b19 100644 ---- a/drivers/mmc/host/sdhci_am654.c -+++ b/drivers/mmc/host/sdhci_am654.c -@@ -311,6 +311,7 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, - struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host); - unsigned char timing = host->mmc->ios.timing; - u32 otap_del_sel; -+ u32 itap_del_sel; - u32 mask, val; - - /* Setup DLL Output TAP delay */ -@@ -322,7 +323,14 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, - mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK; - val = (0x1 << OTAPDLYENA_SHIFT) | - (otap_del_sel << OTAPDLYSEL_SHIFT); -+ -+ itap_del_sel = sdhci_am654->itap_del_sel[timing]; -+ mask |= ITAPDLYSEL_MASK | ITAPDLYENA_MASK; -+ val |= (1 << ITAPDLYENA_SHIFT) | (itap_del_sel << ITAPDLYSEL_SHIFT); -+ regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, -+ 1 << ITAPCHGWIN_SHIFT); - regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); -+ regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, 0); - - regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, - sdhci_am654->clkbuf_sel); diff --git a/recipes-kernel/linux/files/patches-6.1/0066-arm64-dts-ti-k3-am65-main-Add-properties-to-support-.patch b/recipes-kernel/linux/files/patches-6.1/0063-arm64-dts-ti-k3-am65-main-Add-properties-to-support-.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0066-arm64-dts-ti-k3-am65-main-Add-properties-to-support-.patch rename to recipes-kernel/linux/files/patches-6.1/0063-arm64-dts-ti-k3-am65-main-Add-properties-to-support-.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0067-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch b/recipes-kernel/linux/files/patches-6.1/0064-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch similarity index 94% rename from recipes-kernel/linux/files/patches-6.1/0067-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch rename to recipes-kernel/linux/files/patches-6.1/0064-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch index 7d95232c3..dc7edeada 100644 --- a/recipes-kernel/linux/files/patches-6.1/0067-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch +++ b/recipes-kernel/linux/files/patches-6.1/0064-firmware-ti_sci-Update-ti_sci_msg_req_reboot-to-incl.patch @@ -22,10 +22,10 @@ Signed-off-by: Dave Gerlach 2 files changed, 3 insertions(+) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c -index 4c550cfbc086..b7a52e5855e3 100644 +index 6231c98ba291..94372441ac55 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c -@@ -1690,6 +1690,7 @@ static int ti_sci_cmd_core_reboot(const struct ti_sci_handle *handle) +@@ -1677,6 +1677,7 @@ static int ti_sci_cmd_core_reboot(const struct ti_sci_handle *handle) return ret; } req = (struct ti_sci_msg_req_reboot *)xfer->xfer_buf; diff --git a/recipes-kernel/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch b/recipes-kernel/linux/files/patches-6.1/0065-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch rename to recipes-kernel/linux/files/patches-6.1/0065-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch b/recipes-kernel/linux/files/patches-6.1/0066-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch rename to recipes-kernel/linux/files/patches-6.1/0066-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch b/recipes-kernel/linux/files/patches-6.1/0067-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch rename to recipes-kernel/linux/files/patches-6.1/0067-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0071-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch b/recipes-kernel/linux/files/patches-6.1/0068-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0071-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch rename to recipes-kernel/linux/files/patches-6.1/0068-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0072-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch b/recipes-kernel/linux/files/patches-6.1/0069-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0072-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch rename to recipes-kernel/linux/files/patches-6.1/0069-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0073-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch b/recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0073-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch rename to recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0074-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch b/recipes-kernel/linux/files/patches-6.1/0071-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0074-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch rename to recipes-kernel/linux/files/patches-6.1/0071-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0075-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch b/recipes-kernel/linux/files/patches-6.1/0072-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0075-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch rename to recipes-kernel/linux/files/patches-6.1/0072-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0076-HACK-setting-the-RJ45-port-led-behavior.patch b/recipes-kernel/linux/files/patches-6.1/0073-HACK-setting-the-RJ45-port-led-behavior.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0076-HACK-setting-the-RJ45-port-led-behavior.patch rename to recipes-kernel/linux/files/patches-6.1/0073-HACK-setting-the-RJ45-port-led-behavior.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch b/recipes-kernel/linux/files/patches-6.1/0074-WIP-feat-extend-led-panic-indicator-on-and-off.patch similarity index 99% rename from recipes-kernel/linux/files/patches-6.1/0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch rename to recipes-kernel/linux/files/patches-6.1/0074-WIP-feat-extend-led-panic-indicator-on-and-off.patch index 40e587ded..becafda65 100644 --- a/recipes-kernel/linux/files/patches-6.1/0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch +++ b/recipes-kernel/linux/files/patches-6.1/0074-WIP-feat-extend-led-panic-indicator-on-and-off.patch @@ -69,7 +69,7 @@ index 092eb59a7d32..055272aa8289 100644 ret = create_gpio_led(&led, led_dat, dev, child, NULL); if (ret < 0) { diff --git a/drivers/leds/trigger/ledtrig-panic.c b/drivers/leds/trigger/ledtrig-panic.c -index 64abf2e91608..579c84bc4d79 100644 +index 5a6b21bfeb9a..87c1e5218254 100644 --- a/drivers/leds/trigger/ledtrig-panic.c +++ b/drivers/leds/trigger/ledtrig-panic.c @@ -33,6 +33,7 @@ static void led_trigger_set_panic(struct led_classdev *led_cdev) diff --git a/recipes-kernel/linux/files/patches-6.1/0078-arm64-dts-ti-iot2050-Disable-R5-lockstep-for-all-PG2.patch b/recipes-kernel/linux/files/patches-6.1/0075-arm64-dts-ti-iot2050-Disable-R5-lockstep-for-all-PG2.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0078-arm64-dts-ti-iot2050-Disable-R5-lockstep-for-all-PG2.patch rename to recipes-kernel/linux/files/patches-6.1/0075-arm64-dts-ti-iot2050-Disable-R5-lockstep-for-all-PG2.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0079-arm64-dts-ti-iot2050-Factor-out-arduino-connector-bi.patch b/recipes-kernel/linux/files/patches-6.1/0076-arm64-dts-ti-iot2050-Factor-out-arduino-connector-bi.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0079-arm64-dts-ti-iot2050-Factor-out-arduino-connector-bi.patch rename to recipes-kernel/linux/files/patches-6.1/0076-arm64-dts-ti-iot2050-Factor-out-arduino-connector-bi.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0080-dt-bindings-vendor-prefixes-Add-EVERLIGHT.patch b/recipes-kernel/linux/files/patches-6.1/0077-dt-bindings-vendor-prefixes-Add-EVERLIGHT.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0080-dt-bindings-vendor-prefixes-Add-EVERLIGHT.patch rename to recipes-kernel/linux/files/patches-6.1/0077-dt-bindings-vendor-prefixes-Add-EVERLIGHT.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0081-dt-bindings-iio-Add-everlight-pm16d17-binding.patch b/recipes-kernel/linux/files/patches-6.1/0078-dt-bindings-iio-Add-everlight-pm16d17-binding.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0081-dt-bindings-iio-Add-everlight-pm16d17-binding.patch rename to recipes-kernel/linux/files/patches-6.1/0078-dt-bindings-iio-Add-everlight-pm16d17-binding.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0082-iio-proximity-Add-support-for-everlight-pmd16d17-sen.patch b/recipes-kernel/linux/files/patches-6.1/0079-iio-proximity-Add-support-for-everlight-pmd16d17-sen.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0082-iio-proximity-Add-support-for-everlight-pmd16d17-sen.patch rename to recipes-kernel/linux/files/patches-6.1/0079-iio-proximity-Add-support-for-everlight-pmd16d17-sen.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0083-dt-bindings-arm-ti-Add-binding-for-Siemens-IOT2050-S.patch b/recipes-kernel/linux/files/patches-6.1/0080-dt-bindings-arm-ti-Add-binding-for-Siemens-IOT2050-S.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0083-dt-bindings-arm-ti-Add-binding-for-Siemens-IOT2050-S.patch rename to recipes-kernel/linux/files/patches-6.1/0080-dt-bindings-arm-ti-Add-binding-for-Siemens-IOT2050-S.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0084-dts-iot2050-Support-IOT2050-SM-variant.patch b/recipes-kernel/linux/files/patches-6.1/0081-dts-iot2050-Support-IOT2050-SM-variant.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0084-dts-iot2050-Support-IOT2050-SM-variant.patch rename to recipes-kernel/linux/files/patches-6.1/0081-dts-iot2050-Support-IOT2050-SM-variant.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0085-WIP-dts-iot2050-Add-spidev-for-IOT2050-SM.patch b/recipes-kernel/linux/files/patches-6.1/0082-WIP-dts-iot2050-Add-spidev-for-IOT2050-SM.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0085-WIP-dts-iot2050-Add-spidev-for-IOT2050-SM.patch rename to recipes-kernel/linux/files/patches-6.1/0082-WIP-dts-iot2050-Add-spidev-for-IOT2050-SM.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0086-net-ti-icssg-config-add-SR1.0-specific-configuration.patch b/recipes-kernel/linux/files/patches-6.1/0083-net-ti-icssg-config-add-SR1.0-specific-configuration.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0086-net-ti-icssg-config-add-SR1.0-specific-configuration.patch rename to recipes-kernel/linux/files/patches-6.1/0083-net-ti-icssg-config-add-SR1.0-specific-configuration.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0087-net-ti-icssg-prueth-add-SR1.0-specific-configuration.patch b/recipes-kernel/linux/files/patches-6.1/0084-net-ti-icssg-prueth-add-SR1.0-specific-configuration.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0087-net-ti-icssg-prueth-add-SR1.0-specific-configuration.patch rename to recipes-kernel/linux/files/patches-6.1/0084-net-ti-icssg-prueth-add-SR1.0-specific-configuration.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0088-net-ti-icssg-classifier-Add-support-for-SR1.0.patch b/recipes-kernel/linux/files/patches-6.1/0085-net-ti-icssg-classifier-Add-support-for-SR1.0.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0088-net-ti-icssg-classifier-Add-support-for-SR1.0.patch rename to recipes-kernel/linux/files/patches-6.1/0085-net-ti-icssg-classifier-Add-support-for-SR1.0.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0089-net-ti-icssg-config-Add-SR1.0-configuration-function.patch b/recipes-kernel/linux/files/patches-6.1/0086-net-ti-icssg-config-Add-SR1.0-configuration-function.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0089-net-ti-icssg-config-Add-SR1.0-configuration-function.patch rename to recipes-kernel/linux/files/patches-6.1/0086-net-ti-icssg-config-Add-SR1.0-configuration-function.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0090-net-ti-icssg-ethtool-Adjust-channel-count-for-SR1.0.patch b/recipes-kernel/linux/files/patches-6.1/0087-net-ti-icssg-ethtool-Adjust-channel-count-for-SR1.0.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0090-net-ti-icssg-ethtool-Adjust-channel-count-for-SR1.0.patch rename to recipes-kernel/linux/files/patches-6.1/0087-net-ti-icssg-ethtool-Adjust-channel-count-for-SR1.0.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0091-net-ti-iccsg-prueth-Add-necessary-functions-for-SR1..patch b/recipes-kernel/linux/files/patches-6.1/0088-net-ti-iccsg-prueth-Add-necessary-functions-for-SR1..patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0091-net-ti-iccsg-prueth-Add-necessary-functions-for-SR1..patch rename to recipes-kernel/linux/files/patches-6.1/0088-net-ti-iccsg-prueth-Add-necessary-functions-for-SR1..patch diff --git a/recipes-kernel/linux/files/patches-6.1/0092-net-ti-icssg-prueth-Wire-up-support-for-SR1.0.patch b/recipes-kernel/linux/files/patches-6.1/0089-net-ti-icssg-prueth-Wire-up-support-for-SR1.0.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0092-net-ti-icssg-prueth-Wire-up-support-for-SR1.0.patch rename to recipes-kernel/linux/files/patches-6.1/0089-net-ti-icssg-prueth-Wire-up-support-for-SR1.0.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0093-net-ti-icss_iep-Add-SR1-support.patch b/recipes-kernel/linux/files/patches-6.1/0090-net-ti-icss_iep-Add-SR1-support.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0093-net-ti-icss_iep-Add-SR1-support.patch rename to recipes-kernel/linux/files/patches-6.1/0090-net-ti-icss_iep-Add-SR1-support.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0094-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG1-.patch b/recipes-kernel/linux/files/patches-6.1/0091-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG1-.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0094-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG1-.patch rename to recipes-kernel/linux/files/patches-6.1/0091-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG1-.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch b/recipes-kernel/linux/files/patches-6.1/0092-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch similarity index 98% rename from recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch rename to recipes-kernel/linux/files/patches-6.1/0092-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch index 4d96683f5..2c5c50df5 100644 --- a/recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch +++ b/recipes-kernel/linux/files/patches-6.1/0092-PCI-keystone-Fix-pci_ops-for-AM654x-SoC.patch @@ -28,7 +28,7 @@ Reviewed-by: Serge Semin 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c -index a5dbe8c9b077..356bfdec00eb 100644 +index 50a777cbfb77..623aafc0303a 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -581,6 +581,12 @@ static struct pci_ops ks_pcie_ops = { diff --git a/recipes-kernel/linux/files/patches-6.1/0097-arm64-dts-ti-iot2050-Disable-lock-step-for-all-iot20.patch b/recipes-kernel/linux/files/patches-6.1/0093-arm64-dts-ti-iot2050-Disable-lock-step-for-all-iot20.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0097-arm64-dts-ti-iot2050-Disable-lock-step-for-all-iot20.patch rename to recipes-kernel/linux/files/patches-6.1/0093-arm64-dts-ti-iot2050-Disable-lock-step-for-all-iot20.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0094-soc-ti-Add-IOMPU-like-PVU-driver.patch b/recipes-kernel/linux/files/patches-6.1/0094-soc-ti-Add-IOMPU-like-PVU-driver.patch new file mode 100644 index 000000000..2aac51656 --- /dev/null +++ b/recipes-kernel/linux/files/patches-6.1/0094-soc-ti-Add-IOMPU-like-PVU-driver.patch @@ -0,0 +1,567 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Mon, 24 Jun 2024 13:55:56 +0200 +Subject: [PATCH] soc: ti: Add IOMPU-like PVU driver + +The TI Peripheral Virtualization Unit (PVU) permits to define a limited +set of mappings for DMA requests on the system memory. Unlike with an +IOMMU, there is no fallback to a memory-backed page table, only a fixed +set of register-backed TLBs. Emulating an IOMMU behavior appears to be +the more fragile the more fragmentation of pending requests occur. + +Therefore, this driver does not expose the PVU as an IOMMU. It rather +introduces a simple, static interface to devices that are under +restricted-dma-pool constraints. They can register their pools with the +PVUs, enabling only those pools to work for DMA. As also MSI is issued +as DMA, the PVU already register the related translator region of the +AM654 as valid DMA target. + +This driver is the essential building block for limiting DMA from +untrusted devices to clearly defined memory regions in the absence of a +real IOMMU (SMMU). + +Co-developed-by: Diogo Ivo +Signed-off-by: Jan Kiszka +--- + drivers/soc/ti/Kconfig | 4 + + drivers/soc/ti/Makefile | 1 + + drivers/soc/ti/ti-pvu.c | 487 ++++++++++++++++++++++++++++++++++++++++ + include/linux/ti-pvu.h | 11 + + 4 files changed, 503 insertions(+) + create mode 100644 drivers/soc/ti/ti-pvu.c + create mode 100644 include/linux/ti-pvu.h + +diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig +index 7e2fb1c16af1..b6960046b0e9 100644 +--- a/drivers/soc/ti/Kconfig ++++ b/drivers/soc/ti/Kconfig +@@ -94,6 +94,10 @@ config TI_PRUSS + processors on various TI SoCs. It's safe to say N here if you're + not interested in the PRU or if you are unsure. + ++config TI_PVU ++ bool "TI Peripheral Virtualization Unit driver" ++ depends on ARCH_K3 && DMA_RESTRICTED_POOL ++ + endif # SOC_TI + + config TI_SCI_INTA_MSI_DOMAIN +diff --git a/drivers/soc/ti/Makefile b/drivers/soc/ti/Makefile +index cc3c972fad2e..15a0d598ac60 100644 +--- a/drivers/soc/ti/Makefile ++++ b/drivers/soc/ti/Makefile +@@ -14,3 +14,4 @@ obj-$(CONFIG_TI_K3_RINGACC) += k3-ringacc.o + obj-$(CONFIG_TI_K3_SOCINFO) += k3-socinfo.o + obj-$(CONFIG_TI_PRUSS) += pruss.o + obj-$(CONFIG_POWER_AVS_OMAP) += smartreflex.o ++obj-$(CONFIG_TI_PVU) += ti-pvu.o +diff --git a/drivers/soc/ti/ti-pvu.c b/drivers/soc/ti/ti-pvu.c +new file mode 100644 +index 000000000000..af1cadc2f4bc +--- /dev/null ++++ b/drivers/soc/ti/ti-pvu.c +@@ -0,0 +1,487 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * TI Peripheral Virtualization Unit driver for static DMA isolation ++ * ++ * Copyright (c) 2024, Siemens AG ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define PVU_CONFIG 0x4 ++#define PVU_ENABLE 0x10 ++#define PVU_VIRTID_MAP1 0x14 ++#define PVU_VIRTID_MAP2 0x18 ++#define PVU_EXCEPTION_LOGGING_CONTROL 0x120 ++#define PVU_EXCEPTION_LOGGING_HEADER0 0x124 ++#define PVU_EXCEPTION_LOGGING_HEADER1 0x128 ++#define PVU_EXCEPTION_LOGGING_DATA0 0x12c ++#define PVU_EXCEPTION_LOGGING_DATA1 0x130 ++#define PVU_EXCEPTION_LOGGING_DATA2 0x134 ++#define PVU_EXCEPTION_LOGGING_DATA2_SECURE BIT(0) ++#define PVU_EXCEPTION_LOGGING_DATA2_PRIV BIT(1) ++#define PVU_EXCEPTION_LOGGING_DATA2_CACHEABLE BIT(2) ++#define PVU_EXCEPTION_LOGGING_DATA2_DEBUG BIT(3) ++#define PVU_EXCEPTION_LOGGING_DATA2_READ BIT(4) ++#define PVU_EXCEPTION_LOGGING_DATA2_WRITE BIT(5) ++#define PVU_EXCEPTION_LOGGING_DATA3 0x138 ++#define PVU_EXCEPTION_ENABLE_SET 0x148 ++#define PVU_EOI_REG 0x150 ++ ++#define PVU_CHAIN 0x0 ++#define PVU_CHAIN_EN BIT(31) ++#define PVU_CHAIN_LOG_DIS BIT(30) ++#define PVU_CHAIN_FAULT BIT(29) ++#define PVU_CHAIN_MASK 0xfff ++#define PVU_ENTRY0 0x20 ++#define PVU_ENTRY1 0x24 ++#define PVU_ENTRY1_RESERVED_MASK 0xffff0000 ++#define PVU_ENTRY1_VBASE_H_MASK 0xffff ++#define PVU_ENTRY2 0x28 ++#define PVU_ENTRY2_RESERVED_MASK 0x1fd00080 ++#define PVU_ENTRY2_INVALID (0U << 30) ++#define PVU_ENTRY2_VALID (2U << 30) ++#define PVU_ENTRY2_MODE_MASK 0xc0000000 ++#define PVU_ENTRY2_PSIZE_SHIFT 16 ++#define PVU_ENTRY2_PSIZE_MASK 0xf ++#define PVU_ENTRY2_PERM_SX BIT(15) ++#define PVU_ENTRY2_PERM_SW BIT(14) ++#define PVU_ENTRY2_PERM_SR BIT(13) ++#define PVU_ENTRY2_PERM_UX BIT(12) ++#define PVU_ENTRY2_PERM_UW BIT(11) ++#define PVU_ENTRY2_PERM_UR BIT(10) ++#define PVU_ENTRY2_MEM_WRITETHROUGH (2 << 8) ++#define PVU_ENTRY2_OUTER_SHARABLE BIT(4) ++#define PVU_ENTRY2_IS_NOALLOC (0 << 2) ++#define PVU_ENTRY2_OS_NOALLOC (0 << 0) ++#define PVU_ENTRY4 0x30 ++#define PVU_ENTRY5 0x34 ++#define PVU_ENTRY5_RESERVED_MASK 0xffff0000 ++#define PVU_ENTRY5_PBASE_H_MASK 0xffff ++#define PVU_ENTRY6 0x38 ++#define PVU_ENTRY6_RESERVED_MASK 0xffffffe0 ++ ++#define NUM_VIRTIDS 1 ++ ++static const struct regmap_config pvu_cfg_regmap_cfg = { ++ .name = "pvu-cfg", ++ .reg_bits = 32, ++ .reg_stride = 4, ++ .val_bits = 32, ++ .max_register = PVU_EOI_REG, ++}; ++ ++enum pvu_cfg_regfields { ++ PVU_TLBS, ++ PVU_TLB_ENTRIES, ++ PVU_ENABLED, ++ PVU_DMA_CNT, ++ PVU_DMA_CL0, ++ PVU_DMA_CL1, ++ PVU_DMA_CL2, ++ PVU_DMA_CL3, ++ PVU_MAX_VIRTID, ++ PVU_EXC_SRC_ID, ++ PVU_EXC_CODE, ++ PVU_EXC_ADDR_L, ++ PVU_EXC_ADDR_H, ++ PVU_EXC_PRIV_ID, ++ PVU_EXC_PROPS, ++ PVU_EXC_ROUTE_ID, ++ PVU_EXC_BYTE_CNT, ++ PVU_EXC_ENABLE, ++ PVU_EOI, ++ PVU_MAX_CFG_FIELDS, ++}; ++ ++static const struct reg_field pvu_cfg_reg_fields[] = { ++ [PVU_TLBS] = REG_FIELD(PVU_CONFIG, 0, 15), ++ [PVU_TLB_ENTRIES] = REG_FIELD(PVU_CONFIG, 16, 23), ++ [PVU_ENABLED] = REG_FIELD(PVU_ENABLE, 0, 0), ++ [PVU_DMA_CNT] = REG_FIELD(PVU_VIRTID_MAP1, 0, 11), ++ [PVU_DMA_CL0] = REG_FIELD(PVU_VIRTID_MAP1, 16, 17), ++ [PVU_DMA_CL1] = REG_FIELD(PVU_VIRTID_MAP1, 18, 19), ++ [PVU_DMA_CL2] = REG_FIELD(PVU_VIRTID_MAP1, 20, 21), ++ [PVU_DMA_CL3] = REG_FIELD(PVU_VIRTID_MAP1, 22, 23), ++ [PVU_MAX_VIRTID] = REG_FIELD(PVU_VIRTID_MAP2, 0, 11), ++ [PVU_EXC_SRC_ID] = REG_FIELD(PVU_EXCEPTION_LOGGING_HEADER0, 8, 23), ++ [PVU_EXC_CODE] = REG_FIELD(PVU_EXCEPTION_LOGGING_HEADER1, 16, 23), ++ [PVU_EXC_ADDR_L] = REG_FIELD(PVU_EXCEPTION_LOGGING_DATA0, 0, 31), ++ [PVU_EXC_ADDR_H] = REG_FIELD(PVU_EXCEPTION_LOGGING_DATA1, 0, 15), ++ [PVU_EXC_PRIV_ID] = REG_FIELD(PVU_EXCEPTION_LOGGING_DATA2, 0, 7), ++ [PVU_EXC_PROPS] = REG_FIELD(PVU_EXCEPTION_LOGGING_DATA2, 8, 13), ++ [PVU_EXC_ROUTE_ID] = REG_FIELD(PVU_EXCEPTION_LOGGING_DATA2, 16, 27), ++ [PVU_EXC_BYTE_CNT] = REG_FIELD(PVU_EXCEPTION_LOGGING_DATA3, 0, 9), ++ [PVU_EXC_ENABLE] = REG_FIELD(PVU_EXCEPTION_ENABLE_SET, 0, 0), ++ [PVU_EOI] = REG_FIELD(PVU_EOI_REG, 0, 15), ++}; ++ ++struct ti_pvu { ++ struct list_head entry; ++ struct platform_device *pdev; ++ struct regmap *cfg; ++ struct regmap_field *cfg_fields[PVU_MAX_CFG_FIELDS]; ++ void __iomem *tlbif_base; ++ unsigned int num_tlbs; ++ unsigned int num_entries; ++}; ++ ++static const char *pvu_excp_code_string[] = { ++ "PVU miss", ++ "maximum VirtID violation", ++ "", ++ "read permission violation", ++ "write permission violation", ++ "execute permission violation", ++ "prefetch permission violation", ++ "", ++}; ++ ++static const u64 pvu_page_size[] = { ++ 4 * 1024ULL, ++ 16 * 1024ULL, ++ 64 * 1024ULL, ++ 2 * 1024 * 1024ULL, ++ 32 * 1024 * 1024ULL, ++ 512 * 1024 * 1024ULL, ++ 1 * 1024 * 1024 * 1024ULL, ++ 16 * 1024 * 1024 * 1024ULL ++}; ++ ++static DEFINE_MUTEX(ti_pvu_lock); ++static LIST_HEAD(ti_pvu_list); ++ ++static unsigned int pvu_field_read(struct ti_pvu *pvu, enum pvu_cfg_regfields f) ++{ ++ int ret; ++ unsigned int val; ++ ++ ret = regmap_field_read(pvu->cfg_fields[f], &val); ++ if (ret) ++ dev_err(&pvu->pdev->dev, "failed to read field\n"); ++ ++ return val; ++} ++ ++static void pvu_field_write(struct ti_pvu *pvu, enum pvu_cfg_regfields f, ++ unsigned int val) ++{ ++ int ret; ++ ++ ret = regmap_field_write(pvu->cfg_fields[f], val); ++ if (ret) ++ dev_err(&pvu->pdev->dev, "failed to write field\n"); ++} ++ ++static irqreturn_t pvu_fault_isr(int irq, void *dev_id) ++{ ++ u32 code, bytes, route_id, priv_id, props; ++ struct ti_pvu *pvu = dev_id; ++ const char *code_str; ++ u64 address; ++ ++ code = pvu_field_read(pvu, PVU_EXC_CODE); ++ code_str = pvu_excp_code_string[ ++ min(code, (u32)ARRAY_SIZE(pvu_excp_code_string) - 1)]; ++ ++ dev_err(&pvu->pdev->dev, "fault detected, code %d (%s)\n", ++ code, code_str); ++ ++ address = pvu_field_read(pvu, PVU_EXC_ADDR_L); ++ address |= (u64)pvu_field_read(pvu, PVU_EXC_ADDR_H) << 32; ++ ++ bytes = pvu_field_read(pvu, PVU_EXC_BYTE_CNT); ++ ++ route_id = pvu_field_read(pvu, PVU_EXC_ROUTE_ID); ++ priv_id = pvu_field_read(pvu, PVU_EXC_PRIV_ID); ++ props = pvu_field_read(pvu, PVU_EXC_PROPS); ++ ++ dev_err(&pvu->pdev->dev, ++ " address 0x%016llx size %d route-ID %d priv-ID %d flags %c%c%c%c%c%c\n", ++ address, bytes, route_id, priv_id, ++ (props & PVU_EXCEPTION_LOGGING_DATA2_WRITE) ? 'W' : '-', ++ (props & PVU_EXCEPTION_LOGGING_DATA2_READ) ? 'R' : '-', ++ (props & PVU_EXCEPTION_LOGGING_DATA2_DEBUG) ? 'D' : '-', ++ (props & PVU_EXCEPTION_LOGGING_DATA2_CACHEABLE) ? 'C' : '-', ++ (props & PVU_EXCEPTION_LOGGING_DATA2_PRIV) ? 'P' : '-', ++ (props & PVU_EXCEPTION_LOGGING_DATA2_SECURE) ? 'S' : '-'); ++ ++ pvu_field_write(pvu, PVU_EOI, 0); ++ ++ return IRQ_HANDLED; ++} ++ ++static int pvu_get_free_entry(struct ti_pvu *pvu) ++{ ++ unsigned int n; ++ u32 val; ++ ++ for (n = 0; n < pvu->num_entries; n++) { ++ val = readl(pvu->tlbif_base + n * 0x20 + PVU_ENTRY2); ++ if ((val & PVU_ENTRY2_MODE_MASK) == PVU_ENTRY2_INVALID) ++ return n; ++ } ++ return -ENOSPC; ++} ++ ++static void pvu_write_entry(struct ti_pvu *pvu, unsigned int entry, ++ u64 addr, u32 psize) ++{ ++ void __iomem *entry_base = pvu->tlbif_base + entry * 0x20; ++ u32 val; ++ ++ writel((u32)addr, entry_base + PVU_ENTRY0); ++ ++ val = readl(entry_base + PVU_ENTRY1); ++ val &= PVU_ENTRY1_RESERVED_MASK; ++ val |= (addr >> 32) & PVU_ENTRY1_VBASE_H_MASK; ++ writel(val, entry_base + PVU_ENTRY1); ++ ++ writel((u32)addr, entry_base + PVU_ENTRY4); ++ ++ val = readl(entry_base + PVU_ENTRY5); ++ val &= PVU_ENTRY5_RESERVED_MASK; ++ val |= (addr >> 32) & PVU_ENTRY5_PBASE_H_MASK; ++ writel(val, entry_base + PVU_ENTRY5); ++ ++ val = readl(entry_base + PVU_ENTRY6); ++ val &= PVU_ENTRY6_RESERVED_MASK; ++ writel(val, entry_base + PVU_ENTRY6); ++ ++ val = readl(entry_base + PVU_ENTRY2); ++ val &= PVU_ENTRY2_RESERVED_MASK; ++ val |= psize << PVU_ENTRY2_PSIZE_SHIFT; ++ val |= PVU_ENTRY2_VALID | ++ PVU_ENTRY2_PERM_UR | PVU_ENTRY2_PERM_SR | ++ PVU_ENTRY2_PERM_UW | PVU_ENTRY2_PERM_SW | ++ PVU_ENTRY2_PERM_UX | PVU_ENTRY2_PERM_SX | ++ PVU_ENTRY2_MEM_WRITETHROUGH | PVU_ENTRY2_OUTER_SHARABLE | ++ PVU_ENTRY2_IS_NOALLOC | PVU_ENTRY2_OS_NOALLOC; ++ writel(val, entry_base + PVU_ENTRY2); ++} ++ ++static int pvu_create_region(struct ti_pvu *pvu, u64 addr, u64 size) ++{ ++ u64 page_size; ++ int psize; ++ int entry; ++ ++ while (size > 0) { ++ entry = pvu_get_free_entry(pvu); ++ if (entry < 0) { ++ dev_err(&pvu->pdev->dev, "ran out of TLB entries\n"); ++ return -ENOSPC; ++ } ++ ++ for (psize = ARRAY_SIZE(pvu_page_size) - 1; psize >= 0; psize--) { ++ page_size = pvu_page_size[psize]; ++ if (size >= page_size && (addr & (page_size - 1)) == 0) ++ break; ++ } ++ if (psize < 0) { ++ dev_err(&pvu->pdev->dev, "unaligned region provided\n"); ++ return -EINVAL; ++ } ++ ++ pvu_write_entry(pvu, entry, addr, psize); ++ dev_info(&pvu->pdev->dev, ++ "created TLB entry 0.%d: 0x%08llx, psize %d (0x%08llx)\n", ++ entry, addr, psize, page_size); ++ ++ size -= page_size; ++ addr += page_size; ++ } ++ ++ return 0; ++} ++ ++static void pvu_remove_region(struct ti_pvu *pvu, u64 addr, u64 size) ++{ ++ void __iomem *entry_base; ++ unsigned int n, psize; ++ u64 entry_addr; ++ u32 entry2; ++ ++ for (n = 0; n < pvu->num_entries; n++) { ++ entry_base = pvu->tlbif_base + n * 0x20; ++ entry2 = readl(entry_base + PVU_ENTRY2); ++ if ((entry2 & PVU_ENTRY2_MODE_MASK) != PVU_ENTRY2_VALID) ++ continue; ++ ++ entry_addr = readl(entry_base + PVU_ENTRY0); ++ entry_addr |= (u64)(readl(entry_base + PVU_ENTRY1) & ++ PVU_ENTRY1_VBASE_H_MASK) << 32; ++ ++ psize = (entry2 >> PVU_ENTRY2_PSIZE_SHIFT) & ++ PVU_ENTRY2_PSIZE_MASK; ++ if (psize >= ARRAY_SIZE(pvu_page_size)) ++ continue; ++ ++ if (entry_addr >= addr && ++ (entry_addr + pvu_page_size[psize]) <= (addr + size)) { ++ entry2 &= ~PVU_ENTRY2_MODE_MASK; ++ entry2 |= PVU_ENTRY2_INVALID; ++ writel(entry2, entry_base + PVU_ENTRY2); ++ ++ dev_info(&pvu->pdev->dev, ++ "removed TLB entry 0.%d\n", n); ++ } ++ } ++} ++ ++int ti_pvu_create_region(unsigned int virt_id, const struct resource *region) ++{ ++ struct ti_pvu *pvu; ++ int err = 0; ++ ++ if (virt_id >= NUM_VIRTIDS) ++ return -EINVAL; ++ ++ mutex_lock(&ti_pvu_lock); ++ ++ list_for_each_entry(pvu, &ti_pvu_list, entry) { ++ err = pvu_create_region(pvu, region->start, ++ region->end + 1 - region->start); ++ if (err) ++ break; ++ } ++ ++ mutex_unlock(&ti_pvu_lock); ++ ++ return err; ++} ++ ++int ti_pvu_remove_region(unsigned int virt_id, const struct resource *region) ++{ ++ struct ti_pvu *pvu; ++ ++ if (virt_id >= NUM_VIRTIDS) ++ return -EINVAL; ++ ++ mutex_lock(&ti_pvu_lock); ++ ++ list_for_each_entry(pvu, &ti_pvu_list, entry) { ++ pvu_remove_region(pvu, region->start, ++ region->end + 1 - region->start); ++ } ++ ++ mutex_unlock(&ti_pvu_lock); ++ ++ return 0; ++} ++ ++static int ti_pvu_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct device_node *its_node; ++ void __iomem *base; ++ struct ti_pvu *pvu; ++ u32 val; ++ int ret; ++ ++ pvu = devm_kzalloc(dev, sizeof(struct ti_pvu), GFP_KERNEL); ++ if (!pvu) ++ return -ENOMEM; ++ ++ pvu->pdev = pdev; ++ ++ base = devm_platform_ioremap_resource_byname(pdev, "cfg"); ++ if (IS_ERR(base)) ++ return PTR_ERR(base); ++ ++ pvu->cfg = devm_regmap_init_mmio(dev, base, &pvu_cfg_regmap_cfg); ++ if (IS_ERR(pvu->cfg)) ++ return dev_err_probe(dev, PTR_ERR(pvu->cfg), "failed to init cfg regmap"); ++ ++ ret = devm_regmap_field_bulk_alloc(dev, pvu->cfg, pvu->cfg_fields, ++ pvu_cfg_reg_fields, PVU_MAX_CFG_FIELDS); ++ if (ret) ++ return dev_err_probe(dev, ret, "failed to alloc cfg regmap fields"); ++ ++ pvu->num_tlbs = pvu_field_read(pvu, PVU_TLBS); ++ pvu->num_entries = pvu_field_read(pvu, PVU_TLB_ENTRIES); ++ dev_info(dev, "TLBs: %d, entries per TLB: %d\n", pvu->num_tlbs, ++ pvu->num_entries); ++ ++ pvu->tlbif_base = devm_platform_ioremap_resource_byname(pdev, "tlbif"); ++ if (IS_ERR(pvu->tlbif_base)) ++ return PTR_ERR(pvu->tlbif_base); ++ ++ its_node = of_find_compatible_node(0, 0, "arm,gic-v3-its"); ++ if (its_node) { ++ u32 pre_its_window[2]; ++ ++ ret = of_property_read_u32_array(its_node, ++ "socionext,synquacer-pre-its", ++ pre_its_window, ++ ARRAY_SIZE(pre_its_window)); ++ if (ret) { ++ dev_err(dev, "failed to read pre-its property\n"); ++ return ret; ++ } ++ ++ ret = pvu_create_region(pvu, pre_its_window[0], ++ pre_its_window[1]); ++ if (ret) ++ return ret; ++ } ++ ++ val = readl(pvu->tlbif_base + PVU_CHAIN); ++ val |= PVU_CHAIN_EN; ++ writel(val, pvu->tlbif_base + PVU_CHAIN); ++ ++ pvu_field_write(pvu, PVU_DMA_CNT, 0); ++ pvu_field_write(pvu, PVU_DMA_CL0, 0); ++ pvu_field_write(pvu, PVU_DMA_CL1, 0); ++ pvu_field_write(pvu, PVU_DMA_CL2, 0); ++ pvu_field_write(pvu, PVU_DMA_CL3, 0); ++ pvu_field_write(pvu, PVU_MAX_VIRTID, NUM_VIRTIDS); ++ ++ ret = platform_get_irq(pdev, 0); ++ if (ret < 0) ++ return dev_err_probe(dev, ret, "failed to get irq\n"); ++ ++ ret = devm_request_irq(dev, ret, pvu_fault_isr, 0, dev_name(dev), pvu); ++ if (ret) ++ return dev_err_probe(dev, ret, "failed to request irq\n"); ++ ++ pvu_field_write(pvu, PVU_EXC_ENABLE, 1); ++ pvu_field_write(pvu, PVU_ENABLED, 1); ++ ++ dev_set_drvdata(dev, pvu); ++ ++ mutex_lock(&ti_pvu_lock); ++ list_add(&pvu->entry, &ti_pvu_list); ++ mutex_unlock(&ti_pvu_lock); ++ ++ return 0; ++} ++ ++static void ti_pvu_remove(struct platform_device *pdev) ++{ ++ struct ti_pvu *pvu = dev_get_drvdata(&pdev->dev); ++ ++ mutex_lock(&ti_pvu_lock); ++ list_del(&pvu->entry); ++ mutex_unlock(&ti_pvu_lock); ++} ++ ++static const struct of_device_id ti_pvu_of_match[] = { ++ { .compatible = "ti,am654-pvu", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, ti_pvu_of_match); ++ ++static struct platform_driver ti_pvu_driver = { ++ .driver = { ++ .name = "ti-pvu", ++ .of_match_table = ti_pvu_of_match, ++ }, ++ .probe = ti_pvu_probe, ++ .remove_new = ti_pvu_remove, ++}; ++module_platform_driver(ti_pvu_driver); +diff --git a/include/linux/ti-pvu.h b/include/linux/ti-pvu.h +new file mode 100644 +index 000000000000..d40642522cf0 +--- /dev/null ++++ b/include/linux/ti-pvu.h +@@ -0,0 +1,11 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * TI Peripheral Virtualization Unit driver for static DMA isolation ++ * ++ * Copyright (c) 2024, Siemens AG ++ */ ++ ++#include ++ ++int ti_pvu_create_region(unsigned int virt_id, const struct resource *region); ++int ti_pvu_remove_region(unsigned int virt_id, const struct resource *region); diff --git a/recipes-kernel/linux/files/patches-6.1/0095-PCI-keystone-Fix-race-condition-when-initializing-PH.patch b/recipes-kernel/linux/files/patches-6.1/0095-PCI-keystone-Fix-race-condition-when-initializing-PH.patch deleted file mode 100644 index 4f95cecba..000000000 --- a/recipes-kernel/linux/files/patches-6.1/0095-PCI-keystone-Fix-race-condition-when-initializing-PH.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Siddharth Vadapalli -Date: Wed, 27 Sep 2023 09:48:45 +0530 -Subject: [PATCH] PCI: keystone: Fix race condition when initializing PHYs - -The PCI driver invokes the PHY APIs using the ks_pcie_enable_phy() -function. The PHY in this case is the Serdes. It is possible that the -PCI instance is configured for two lane operation across two different -Serdes instances, using one lane of each Serdes. - -In such a configuration, if the reference clock for one Serdes is -provided by the other Serdes, it results in a race condition. After the -Serdes providing the reference clock is initialized by the PCI driver by -invoking its PHY APIs, it is not guaranteed that this Serdes remains -powered on long enough for the PHY APIs based initialization of the -dependent Serdes. In such cases, the PLL of the dependent Serdes fails -to lock due to the absence of the reference clock from the former Serdes -which has been powered off by the PM Core. - -Fix this by obtaining reference to the PHYs before invoking the PHY -initialization APIs and releasing reference after the initialization is -complete. - -Link: https://lore.kernel.org/linux-pci/20230927041845.1222080-1-s-vadapalli@ti.com -Fixes: 49229238ab47 ("PCI: keystone: Cleanup PHY handling") -Signed-off-by: Siddharth Vadapalli -Signed-off-by: Krzysztof WilczyƄski -Acked-by: Ravi Gunasekaran -[Commit c12ca110c613 upstream] ---- - drivers/pci/controller/dwc/pci-keystone.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c -index fefb375a777a..a5dbe8c9b077 100644 ---- a/drivers/pci/controller/dwc/pci-keystone.c -+++ b/drivers/pci/controller/dwc/pci-keystone.c -@@ -1367,7 +1367,16 @@ static int __init ks_pcie_probe(struct platform_device *pdev) - goto err_link; - } - -+ /* Obtain references to the PHYs */ -+ for (i = 0; i < num_lanes; i++) -+ phy_pm_runtime_get_sync(ks_pcie->phy[i]); -+ - ret = ks_pcie_enable_phy(ks_pcie); -+ -+ /* Release references to the PHYs */ -+ for (i = 0; i < num_lanes; i++) -+ phy_pm_runtime_put_sync(ks_pcie->phy[i]); -+ - if (ret) { - dev_err(dev, "failed to enable phy\n"); - goto err_link; diff --git a/recipes-kernel/linux/files/patches-6.1/0095-arm64-dts-ti-k3-am65-main-Add-VMAP-registers-to-PCI-.patch b/recipes-kernel/linux/files/patches-6.1/0095-arm64-dts-ti-k3-am65-main-Add-VMAP-registers-to-PCI-.patch new file mode 100644 index 000000000..f5d2acd68 --- /dev/null +++ b/recipes-kernel/linux/files/patches-6.1/0095-arm64-dts-ti-k3-am65-main-Add-VMAP-registers-to-PCI-.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Mon, 24 Jun 2024 13:43:58 +0200 +Subject: [PATCH] arm64: dts: ti: k3-am65-main: Add VMAP registers to PCI root + complexes + +Rewrap the long lines at this chance. + +Signed-off-by: Jan Kiszka +--- + arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi +index b781aea9979c..91ebeee30a24 100644 +--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi ++++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi +@@ -690,8 +690,13 @@ main_gpio1: gpio@601000 { + + pcie0_rc: pcie@5500000 { + compatible = "ti,am654-pcie-rc"; +- reg = <0x0 0x5500000 0x0 0x1000>, <0x0 0x5501000 0x0 0x1000>, <0x0 0x10000000 0x0 0x2000>, <0x0 0x5506000 0x0 0x1000>; +- reg-names = "app", "dbics", "config", "atu"; ++ reg = <0x0 0x5500000 0x0 0x1000>, ++ <0x0 0x5501000 0x0 0x1000>, ++ <0x0 0x10000000 0x0 0x2000>, ++ <0x0 0x5506000 0x0 0x1000>, ++ <0x0 0x2900000 0x0 0x1000>, ++ <0x0 0x2908000 0x0 0x1000>; ++ reg-names = "app", "dbics", "config", "atu", "vmap_lp", "vmap_hp"; + power-domains = <&k3_pds 120 TI_SCI_PD_EXCLUSIVE>; + #address-cells = <3>; + #size-cells = <2>; +@@ -736,8 +741,13 @@ pcie0_ep: pcie-ep@5500000 { + + pcie1_rc: pcie@5600000 { + compatible = "ti,am654-pcie-rc"; +- reg = <0x0 0x5600000 0x0 0x1000>, <0x0 0x5601000 0x0 0x1000>, <0x0 0x18000000 0x0 0x2000>, <0x0 0x5606000 0x0 0x1000>; +- reg-names = "app", "dbics", "config", "atu"; ++ reg = <0x0 0x5600000 0x0 0x1000>, ++ <0x0 0x5601000 0x0 0x1000>, ++ <0x0 0x18000000 0x0 0x2000>, ++ <0x0 0x5606000 0x0 0x1000>, ++ <0x0 0x2910000 0x0 0x1000>, ++ <0x0 0x2918000 0x0 0x1000>; ++ reg-names = "app", "dbics", "config", "atu", "vmap_lp", "vmap_hp"; + power-domains = <&k3_pds 121 TI_SCI_PD_EXCLUSIVE>; + #address-cells = <3>; + #size-cells = <2>; diff --git a/recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Add-supported-for-PVU-based-DMA-isolati.patch b/recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Add-supported-for-PVU-based-DMA-isolati.patch new file mode 100644 index 000000000..8671d768f --- /dev/null +++ b/recipes-kernel/linux/files/patches-6.1/0096-PCI-keystone-Add-supported-for-PVU-based-DMA-isolati.patch @@ -0,0 +1,168 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Mon, 24 Jun 2024 14:16:40 +0200 +Subject: [PATCH] PCI: keystone: Add supported for PVU-based DMA isolation on + AM654 + +The AM654 lacks an IOMMU, thus does not support isolating DMA requests +from untrusted PCI devices to selected memory regions this way. Use +static PVU-based protection instead. + +For this, we use the availability of restricted-dma-pool memory regions +as trigger and register those as valid DMA targets with the PVU. In +addition, we need to enable the mapping of requester IDs to VirtIDs in +the PCI RC. We only use a single VirtID so far, catching all devices. +This may be extended later on. + +Signed-off-by: Jan Kiszka +--- + drivers/pci/controller/dwc/pci-keystone.c | 101 ++++++++++++++++++++++ + 1 file changed, 101 insertions(+) + +diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c +index 623aafc0303a..f8fe663e6e75 100644 +--- a/drivers/pci/controller/dwc/pci-keystone.c ++++ b/drivers/pci/controller/dwc/pci-keystone.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -27,6 +28,7 @@ + #include + #include + #include ++#include + + #include "../../pci.h" + #include "pcie-designware.h" +@@ -113,6 +115,16 @@ + + #define PCI_DEVICE_ID_TI_AM654X 0xb00c + ++#define KS_PCI_VIRTID 0 ++ ++#define PCIE_VMAP_xP_CTRL 0x0 ++#define PCIE_VMAP_xP_REQID 0x4 ++#define PCIE_VMAP_xP_VIRTID 0x8 ++ ++#define PCIE_VMAP_xP_CTRL_EN BIT(0) ++ ++#define PCIE_VMAP_xP_VIRTID_VID_MASK 0xfff ++ + struct ks_pcie_of_data { + enum dw_pcie_device_mode mode; + const struct dw_pcie_host_ops *host_ops; +@@ -1255,6 +1267,89 @@ static const struct of_device_id ks_pcie_of_match[] = { + { }, + }; + ++#ifdef CONFIG_TI_PVU ++static const char *ks_vmap_res[] = {"vmap_lp", "vmap_hp"}; ++ ++static int ks_init_restricted_dma(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct of_phandle_iterator it; ++ bool init_vmap = false; ++ struct resource phys; ++ struct resource *res; ++ void __iomem *base; ++ unsigned int n; ++ u32 val; ++ int err; ++ ++ of_for_each_phandle(&it, err, dev->of_node, "memory-region", ++ NULL, 0) { ++ if (!of_device_is_compatible(it.node, "restricted-dma-pool")) ++ continue; ++ ++ err = of_address_to_resource(it.node, 0, &phys); ++ if (err < 0) { ++ dev_err(dev, "failed to parse memory region %pOF: %d\n", ++ it.node, err); ++ continue; ++ } ++ ++ err = ti_pvu_create_region(KS_PCI_VIRTID, &phys); ++ if (err < 0) ++ return err; ++ ++ init_vmap = true; ++ } ++ ++ if (init_vmap) { ++ for (n = 0; n < ARRAY_SIZE(ks_vmap_res); n++) { ++ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, ++ ks_vmap_res[n]); ++ base = devm_pci_remap_cfg_resource(dev, res); ++ if (IS_ERR(base)) ++ return PTR_ERR(base); ++ ++ writel(0, base + PCIE_VMAP_xP_REQID); ++ ++ val = readl(base + PCIE_VMAP_xP_VIRTID); ++ val &= ~PCIE_VMAP_xP_VIRTID_VID_MASK; ++ val |= KS_PCI_VIRTID; ++ writel(val, base + PCIE_VMAP_xP_VIRTID); ++ ++ val = readl(base + PCIE_VMAP_xP_CTRL); ++ val |= PCIE_VMAP_xP_CTRL_EN; ++ writel(val, base + PCIE_VMAP_xP_CTRL); ++ } ++ } ++ ++ return 0; ++} ++ ++static void ks_release_restricted_dma(struct platform_device *pdev) ++{ ++ struct of_phandle_iterator it; ++ struct resource phys; ++ int err; ++ ++ of_for_each_phandle(&it, err, pdev->dev.of_node, "memory-region", ++ NULL, 0) { ++ if (of_device_is_compatible(it.node, "restricted-dma-pool") && ++ of_address_to_resource(it.node, 0, &phys) == 0) ++ ti_pvu_remove_region(KS_PCI_VIRTID, &phys); ++ ++ } ++} ++#else ++static inline int ks_init_restricted_dma(struct platform_device *pdev) ++{ ++ return 0; ++} ++ ++static inline void ks_release_restricted_dma(struct platform_device *pdev) ++{ ++} ++#endif ++ + static int ks_pcie_probe(struct platform_device *pdev) + { + const struct dw_pcie_host_ops *host_ops; +@@ -1403,6 +1498,10 @@ static int ks_pcie_probe(struct platform_device *pdev) + if (ret < 0) + goto err_get_sync; + ++ ret = ks_init_restricted_dma(pdev); ++ if (ret < 0) ++ goto err_get_sync; ++ + switch (mode) { + case DW_PCIE_RC_TYPE: + if (!IS_ENABLED(CONFIG_PCI_KEYSTONE_HOST)) { +@@ -1473,6 +1572,8 @@ static int ks_pcie_remove(struct platform_device *pdev) + int num_lanes = ks_pcie->num_lanes; + struct device *dev = &pdev->dev; + ++ ks_release_restricted_dma(pdev); ++ + pm_runtime_put(dev); + pm_runtime_disable(dev); + ks_pcie_disable_phy(ks_pcie); diff --git a/recipes-kernel/linux/files/patches-6.1/0097-arm64-dts-ti-iot2050-Enforce-DMA-isolation-for-devic.patch b/recipes-kernel/linux/files/patches-6.1/0097-arm64-dts-ti-iot2050-Enforce-DMA-isolation-for-devic.patch new file mode 100644 index 000000000..03dc33471 --- /dev/null +++ b/recipes-kernel/linux/files/patches-6.1/0097-arm64-dts-ti-iot2050-Enforce-DMA-isolation-for-devic.patch @@ -0,0 +1,77 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Mon, 24 Jun 2024 14:41:30 +0200 +Subject: [PATCH] arm64: dts: ti: iot2050: Enforce DMA isolation for devices + behind PCI RC + +Reserve a 64M memory region below the top of 1G RAM (smallest RAM size +across the series, space left for firmware carve-outs) and ensure that +all PCI devices do their DMA only inside that region. This is configured +via a restricted-dma-pool and enforced with the help of the first PVU. + +Signed-off-by: Jan Kiszka +--- + .../boot/dts/ti/k3-am65-iot2050-common.dtsi | 32 +++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +index 35675663ef1a..dbc7ddf273eb 100644 +--- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi ++++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +@@ -72,6 +72,11 @@ wdt_reset_memory_region: wdt-memory@a2200000 { + reg = <0x00 0xa2200000 0x00 0x1000>; + no-map; + }; ++ ++ pci_restricted_dma_region: restricted-dma@ba000000 { ++ compatible = "restricted-dma-pool"; ++ reg = <0 0xba000000 0 0x4000000>; ++ }; + }; + + leds { +@@ -643,6 +648,10 @@ &pcie0_ep { + status = "disabled"; + }; + ++&pcie0_rc { ++ memory-region = <&pci_restricted_dma_region>; ++}; ++ + &pcie1_rc { + pinctrl-names = "default"; + pinctrl-0 = <&minipcie_pins_default>; +@@ -651,6 +660,8 @@ &pcie1_rc { + phys = <&serdes1 PHY_TYPE_PCIE 0>; + phy-names = "pcie-phy0"; + reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>; ++ ++ memory-region = <&pci_restricted_dma_region>; + }; + + &m_can0 { +@@ -785,3 +796,24 @@ &mcu_r5fss0 { + /* lock-step mode not supported on iot2050 boards */ + ti,cluster-mode = <0>; + }; ++ ++&main_navss { ++ ti_pvu0: ti-pvu@30f80000 { ++ compatible = "ti,am654-pvu"; ++ reg = <0 0x30f80000 0 0x1000>, ++ <0 0x36000000 0 0x100000>; ++ reg-names = "cfg", "tlbif"; ++ interrupts-extended = <&intr_main_navss 390>; ++ interrupt-names = "pvu"; ++ }; ++ ++ ti_pvu1: ti-pvu@30f81000 { ++ compatible = "ti,am654-pvu"; ++ reg = <0 0x30f81000 0 0x1000>, ++ <0 0x36100000 0 0x100000>; ++ reg-names = "cfg", "tlbif"; ++ interrupts-extended = <&intr_main_navss 389>; ++ interrupt-names = "pvu"; ++ status = "disabled"; ++ }; ++}; diff --git a/recipes-kernel/linux/linux-iot2050-6.1.inc b/recipes-kernel/linux/linux-iot2050-6.1.inc index 28a21cf88..51ac9bc59 100644 --- a/recipes-kernel/linux/linux-iot2050-6.1.inc +++ b/recipes-kernel/linux/linux-iot2050-6.1.inc @@ -1,5 +1,5 @@ # -# Copyright (c) Siemens AG, 2018-2022 +# Copyright (c) Siemens AG, 2018-2024 # # This file is subject to the terms and conditions of the MIT License. See # COPYING.MIT file in the top-level directory. @@ -18,7 +18,7 @@ def get_patches(d, patchdir): return ' '.join(['file://' + patch[len(files_dir)+1:] for patch in patches]) SRC_URI += " \ - https://cdn.kernel.org/pub/linux/kernel/projects/cip/6.1/linux-cip-${PV}.tar.gz \ + https://cdn.kernel.org/pub/linux/kernel/projects/cip/6.1/linux-cip-${PV}.tar.xz \ ${@get_patches(d, 'patches-6.1')} \ file://patches-6.1/ \ file://${KERNEL_DEFCONFIG} \ diff --git a/recipes-kernel/linux/linux-iot2050-rt_6.1.54-cip6-rt3.bb b/recipes-kernel/linux/linux-iot2050-rt_6.1.102-cip26-rt14.bb similarity index 60% rename from recipes-kernel/linux/linux-iot2050-rt_6.1.54-cip6-rt3.bb rename to recipes-kernel/linux/linux-iot2050-rt_6.1.102-cip26-rt14.bb index e9e2d497f..28b777de4 100644 --- a/recipes-kernel/linux/linux-iot2050-rt_6.1.54-cip6-rt3.bb +++ b/recipes-kernel/linux/linux-iot2050-rt_6.1.102-cip26-rt14.bb @@ -1,5 +1,5 @@ # -# Copyright (c) Siemens AG, 2018-2023 +# Copyright (c) Siemens AG, 2018-2024 # # This file is subject to the terms and conditions of the MIT License. See # COPYING.MIT file in the top-level directory. @@ -7,6 +7,6 @@ require linux-iot2050-6.1.inc -SRC_URI[sha256sum] = "8c9cb5edc7318cdf8b50594003934bb1465ab8aabc76393f5f402690b2c1f071" +SRC_URI[sha256sum] = "7b11725df3d3d460d5f5a178517c6d4bf1c6e3354acb6d2a9b8df0f8d267149f" SRC_URI += "file://iot2050-rt.cfg" diff --git a/recipes-kernel/linux/linux-iot2050_6.1.54-cip6.bb b/recipes-kernel/linux/linux-iot2050_6.1.102-cip26.bb similarity index 56% rename from recipes-kernel/linux/linux-iot2050_6.1.54-cip6.bb rename to recipes-kernel/linux/linux-iot2050_6.1.102-cip26.bb index a69f6395c..7ca9ed801 100644 --- a/recipes-kernel/linux/linux-iot2050_6.1.54-cip6.bb +++ b/recipes-kernel/linux/linux-iot2050_6.1.102-cip26.bb @@ -1,5 +1,5 @@ # -# Copyright (c) Siemens AG, 2018-2023 +# Copyright (c) Siemens AG, 2018-2024 # # This file is subject to the terms and conditions of the MIT License. See # COPYING.MIT file in the top-level directory. @@ -7,4 +7,4 @@ require linux-iot2050-6.1.inc -SRC_URI[sha256sum] = "431498a219a445a17b79c7a4467dda912e4a31e1add35684aa6e36483c898304" +SRC_URI[sha256sum] = "d14dd53b262d415e1a2e80a9dc6977156248ee403b00833ded66e126fb7139f3" From 3607dfce3814fe17dc518ef67aa60056156ad8ec Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 20 Aug 2024 11:28:09 +0200 Subject: [PATCH 4/4] Add linux-headers package to example image This allows to build kernel modules on the device - if that should ever be needed. Signed-off-by: Jan Kiszka --- recipes-core/images/iot2050-image-example.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/images/iot2050-image-example.bb b/recipes-core/images/iot2050-image-example.bb index 9208b2189..a3195aa83 100644 --- a/recipes-core/images/iot2050-image-example.bb +++ b/recipes-core/images/iot2050-image-example.bb @@ -42,6 +42,7 @@ IMAGE_INSTALL += " \ optee-client-dev \ tee-supplicant \ iot2050-event-record \ + linux-headers-${KERNEL_NAME} \ " IOT2050_NODE_RED_SUPPORT ?= "1"