From patchwork Thu Dec 7 12:54:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13483259 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Zeoq22n+" Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A99D7F for ; Thu, 7 Dec 2023 04:55:04 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c9c18e7990so9471581fa.2 for ; Thu, 07 Dec 2023 04:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701953702; x=1702558502; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dRRcxjW3hYUF4pvL7cDymuG16d1D2vZw+YzDn6n0y/M=; b=Zeoq22n+b3z4auVgMXGzve+VqM8ikqeT/CtZtWXmiBzXHjVknfMYtTDJ0Cxo9N2TZ7 t7WwqrV7LDx2r/DUVsNu+p0U8OUI2yuF0uJpn6t1zzZTJPMiartQJ4LWqbf5kJ2L5FMQ O1VNbhbf/s9cTS8zIFk1Eb40LuMMSZVXUuvBsR6ehfuaO7/LUkC5TT2s7/HS6G4Kehdu lwpk4aHvpG4JR+cWEJUmerCtLd2ZrmIusFjeanTMWU2J+PnjP209IG5EETHO64yu7VF7 jARHmM28J75JS6h794bTSwnl4x2xzCIaUivFttKf2NNXP9e2tLYYNzpK5x3BTZ7EX2lo PCcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701953702; x=1702558502; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dRRcxjW3hYUF4pvL7cDymuG16d1D2vZw+YzDn6n0y/M=; b=UMhBQbuLiP/moJMJhM/FPQMRS+5tQXU+u+PsShRVlNtPQMn5Q0YO8KMTjH4wNrZBrP htZX1uADTBmw54uGZtKj024OoAL0FnBGYEqNXecmMV4vCXt3G2nf8D4eQC8YVMCd04p4 rNWnFxk2d8iZECACUczZc4IcTIZxL/N7u6oe+Yt6dKjRGU1O7uhb8sBPoYo0X3wuQuNE FfrfoiZAMNRC4nTYi9PcnWcBQfwWTI+CaO46R3e8plvU1hig8Z4Jz8HRi7gEtqyf1+/H nSKx4EvVkPG7pGHf00NpnFK8Lk9ajI34r/TSTHjWaBI/OpEYhM+5ON4voxb20xqT5i85 jCZg== X-Gm-Message-State: AOJu0YzZn4cLs73pnF9wZNf2Q6EVvQElMk2Vmh2ufSj7fL3bPXKc1UFb TknAgfA9XLATZvYbmDO4qKosAw== X-Google-Smtp-Source: AGHT+IFZ7sHhE81Ocy92+1ArPxojSOEYpfmENzAM2vPFw3RZ+Xcz+EuXmeZtcNaYJEK+StIVY5K/Rg== X-Received: by 2002:a05:6512:29b:b0:50b:f8d8:b176 with SMTP id j27-20020a056512029b00b0050bf8d8b176mr1354154lfp.124.1701953702303; Thu, 07 Dec 2023 04:55:02 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id cf30-20020a056512281e00b0050bfc6dbb8asm163659lfb.302.2023.12.07.04.55.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:55:02 -0800 (PST) From: Dmitry Baryshkov To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Konrad Dybcio , Rob Clark Cc: Vinod Koul , Sai Prakash Ranjan , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much Date: Thu, 7 Dec 2023 15:54:58 +0300 Message-Id: <20231207125500.3322229-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231207125500.3322229-1-dmitry.baryshkov@linaro.org> References: <20231207125500.3322229-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In preparation of dropping most of ARCH_QCOM subtypes, stop limiting the driver just to those machines. Allow it to be built for any 32-bit Qualcomm platform (ARCH_QCOM). Signed-off-by: Dmitry Baryshkov Acked-by: Robin Murphy Acked-by: Joerg Roedel --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 7673bb82945b..fd67f586f010 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -178,7 +178,7 @@ config FSL_PAMU config MSM_IOMMU bool "MSM IOMMU Support" depends on ARM - depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST + depends on ARCH_QCOM || COMPILE_TEST select IOMMU_API select IOMMU_IO_PGTABLE_ARMV7S help From patchwork Thu Dec 7 12:54:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13483261 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vS9g3SHV" Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D109F10C9 for ; Thu, 7 Dec 2023 04:55:04 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50bfe99b6edso761876e87.1 for ; Thu, 07 Dec 2023 04:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701953703; x=1702558503; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MXRZlAau+k7NGTbzeyPNFZOgIyK71YnKo+kgg/iWUAM=; b=vS9g3SHVs2A55tdg6+yaKVy7xh5AfQWZEs22yuWPJDg5JVyNd32o59c05V5tB9vjfU f3nQESSEMituK8GpAeHnbqUw2yeE9RjOGzAEFWWpEHyNzNirCOP5k3x5vfxhm678+lU5 c5f3M45sI+QUURgfrNxwyrsRp+raQcA4Z+/fKM2IIsA1W2Sy8PJcPxRdO92DLcJzipxQ ir5U45IM7YAz/z+TobRseU9vwkkNgg1cY7N799idHJWlDYqejHvE6Bmkf0UiX5iPn+c0 PXcCkytjbNvrzJm4alsuy0MUIQgBJHpfIstB9TfM2LyQb0BDqnnTgA2ya4T93XHeygNg Y7kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701953703; x=1702558503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MXRZlAau+k7NGTbzeyPNFZOgIyK71YnKo+kgg/iWUAM=; b=iNA19BzXWl8yarEygiUsFT/uKg40BIcTnMhMmDPiKHrU3qtmsylX1gqT2movLlQHKn HVMBanBN/2YTEJ3tIddIz66kNK28190lWAmSTUV7ezjMOgNaMBTXL55C5gqUI4cDft24 vLgnLu28BZjQXcRSytGI0rpZ7363qX4VX1fOyFsIqGYFUVrP8zLulr/h8FsQ10bqJTeN NVUsoK6GKewtz4OK90ECpr7MBlZhrkaapObmVEpMtqDPZlzEWhd8CZcvGuASj9aG7qU3 MD0MjZhqT/pcFmBU+AiJ/m050+pocGwNC6iKbEDbj0AydKp+uOV1vhRjl5XPcIuWLHNg bMdQ== X-Gm-Message-State: AOJu0Yz4crOb7tEdJjvsbnPw3Zobs2Eni9rNdLa+RVPyyXwZ8nr0SkpL 057vplCQuVuCHRQzLikozu/ZtQ== X-Google-Smtp-Source: AGHT+IH8ass7HzS6uZLXeKJmVhmIziNGBwk8jv4tdxJanOaneYQPNZLBKTC6kWejFA4F6qBuDA1Nrg== X-Received: by 2002:a19:9102:0:b0:50b:ee85:ef5e with SMTP id t2-20020a199102000000b0050bee85ef5emr1247967lfd.119.1701953703035; Thu, 07 Dec 2023 04:55:03 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id cf30-20020a056512281e00b0050bfc6dbb8asm163659lfb.302.2023.12.07.04.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:55:02 -0800 (PST) From: Dmitry Baryshkov To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Konrad Dybcio , Rob Clark Cc: Vinod Koul , Sai Prakash Ranjan , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH 2/3] ARM: qcom: drop most of 32-bit ARCH_QCOM subtypes Date: Thu, 7 Dec 2023 15:54:59 +0300 Message-Id: <20231207125500.3322229-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231207125500.3322229-1-dmitry.baryshkov@linaro.org> References: <20231207125500.3322229-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Historically we had several subtypes of 32-bit Qualcomm platforms. Nowadays they became just useless symbols in Kconfig. Drop them and pull corresponding clocksource entries towards top-level ARCH_QCOM entry. Note, I've left ARCH_IPQ40XX, ARCH_MSM8x60 and ARCH_MSM8960 in place, since they have special TEXT_OFFSET handling, which can be sorted out separately. Signed-off-by: Dmitry Baryshkov --- arch/arm/mach-qcom/Kconfig | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig index 12a812e61c16..27d5ca0043be 100644 --- a/arch/arm/mach-qcom/Kconfig +++ b/arch/arm/mach-qcom/Kconfig @@ -4,46 +4,24 @@ menuconfig ARCH_QCOM depends on ARCH_MULTI_V7 select ARM_GIC select ARM_AMBA + select CLKSRC_QCOM + select HAVE_ARM_ARCH_TIMER select PINCTRL select QCOM_SCM if SMP help Support for Qualcomm's devicetree based systems. + This includes support for a few devices with ARM64 SoC, that have + ARM32 signed firmware that does not allow booting ARM64 kernels. if ARCH_QCOM config ARCH_IPQ40XX bool "Enable support for IPQ40XX" - select CLKSRC_QCOM - select HAVE_ARM_ARCH_TIMER config ARCH_MSM8X60 bool "Enable support for MSM8X60" - select CLKSRC_QCOM - -config ARCH_MSM8909 - bool "Enable support for MSM8909" - select HAVE_ARM_ARCH_TIMER - -config ARCH_MSM8916 - bool "Enable support for MSM8916" - select HAVE_ARM_ARCH_TIMER - help - Enable support for the Qualcomm Snapdragon 410 (MSM8916/APQ8016). - - Note that ARM64 is the main supported architecture for MSM8916. - The ARM32 option is intended for a few devices with signed firmware - that does not allow booting ARM64 kernels. config ARCH_MSM8960 bool "Enable support for MSM8960" - select CLKSRC_QCOM - -config ARCH_MSM8974 - bool "Enable support for MSM8974" - select HAVE_ARM_ARCH_TIMER - -config ARCH_MDM9615 - bool "Enable support for MDM9615" - select CLKSRC_QCOM endif From patchwork Thu Dec 7 12:55:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13483262 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EDhtN4RT" Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C563610CB for ; Thu, 7 Dec 2023 04:55:05 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50bfd8d5c77so752236e87.1 for ; Thu, 07 Dec 2023 04:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701953704; x=1702558504; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j5KSmEP1TGocOwJYVVwYZKa9nj2Hg1ok92vdy7xwTe8=; b=EDhtN4RT4tBoe43bD3lk3YMoUGa/IxbdmBxoclZny95f7xW6QJUAC1B5RrybY7X9xU oQcyAv/cczxJQMjHnoTUoZPJeyQAkOiUKSqM9e6Tg8HuiDQEDFgVHvNPH9Y0inn83aLt 5Zuf4KouuYFcCR1+XAT4Iai7xYFPsqMLoc3twyNDzLAaYcke2JspuYFbHr38UbDr7/LF pZ0ZDN6ABFnHzdV7fY2+ZIjxmnoUhIW/brqgZ57odpfqacJHGPMetGEHewKkkSiNOfvj 6pLVBMlwnAeyxxuWhzfaokkeuPIfGjAUc9FSjzo7gR+OHGSPb/SX98DNgROZlA0JI+GP bpAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701953704; x=1702558504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j5KSmEP1TGocOwJYVVwYZKa9nj2Hg1ok92vdy7xwTe8=; b=f9eHwqfW6KMYsbTYi9QfRs4Xl/lyDuMCya0SyDJAr17S2UiVKrzzaHbzREnKQzX68h 6/nsFgiWZGcKL82k+X7iEG71Y5W4YMQMKEniM7wXj2pQkrnPByqsZFd9qX7IfiN6zumY aRq5uIq+6jc5igQz5elR1I00+Ffdyz51S+Z5RrjT9ftBxHpYlPpF6WgaJVoKR1TDIYc7 lQ8ouGtSKf3AqPc39f/xO93XejFDAwBsf2x+1+w560LOKNLHnXjte3ram5vi3UtDo2UL gbmPHB2O9HxlE32BQADlINN0JNbkfGXDrxFkbtQJLlFZ3p8BQ89H1oT/z9QuBSGxseW4 LVrw== X-Gm-Message-State: AOJu0YzCblQ2klJWHFZmykkBVnuUUWhOhh+lSnNiyF5U7hLpng+NzN7n FfJNd4+1ZGrkB32CqV4QQAmIBw== X-Google-Smtp-Source: AGHT+IEPd3y1di3O6hl7akm24VuD+UvFlBj59LsViuKsxVfNbyodkQMJ3vhlHaDmvfNAZZhg7vxVeA== X-Received: by 2002:ac2:538b:0:b0:50b:f881:862a with SMTP id g11-20020ac2538b000000b0050bf881862amr704995lfh.128.1701953703825; Thu, 07 Dec 2023 04:55:03 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id cf30-20020a056512281e00b0050bfc6dbb8asm163659lfb.302.2023.12.07.04.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:55:03 -0800 (PST) From: Dmitry Baryshkov To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Konrad Dybcio , Rob Clark Cc: Vinod Koul , Sai Prakash Ranjan , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry Date: Thu, 7 Dec 2023 15:55:00 +0300 Message-Id: <20231207125500.3322229-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231207125500.3322229-1-dmitry.baryshkov@linaro.org> References: <20231207125500.3322229-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Three remaining Qualcomm platforms have special handling of the TEXT_OFFSET to reserve the memory at the beginnig of the system RAM, see the commit 9e775ad19f52 ("ARM: 7012/1: Set proper TEXT_OFFSET for newer MSMs"). This is required for older platforms like IPQ40xx, MSM8x60, MSM8960 and APQ8064 and is compatible with other 32-bit Qualcomm platforms. Signed-off-by: Dmitry Baryshkov --- arch/arm/Makefile | 4 +--- arch/arm/mach-qcom/Kconfig | 13 +++++-------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 5ba42f69f8ce..45fa8ac001c5 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -158,9 +158,7 @@ textofs-$(CONFIG_ARCH_REALTEK) := 0x00108000 ifeq ($(CONFIG_ARCH_SA1100),y) textofs-$(CONFIG_SA1111) := 0x00208000 endif -textofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000 -textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 -textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 +textofs-$(CONFIG_ARCH_QCOM_SMEM) := 0x00208000 textofs-$(CONFIG_ARCH_MESON) := 0x00208000 textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig index 27d5ca0043be..0c99d0a746d4 100644 --- a/arch/arm/mach-qcom/Kconfig +++ b/arch/arm/mach-qcom/Kconfig @@ -15,13 +15,10 @@ menuconfig ARCH_QCOM if ARCH_QCOM -config ARCH_IPQ40XX - bool "Enable support for IPQ40XX" - -config ARCH_MSM8X60 - bool "Enable support for MSM8X60" - -config ARCH_MSM8960 - bool "Enable support for MSM8960" +config ARCH_QCOM_SMEM + bool "Reserve SMEM at the beginning of RAM" + help + Reserve 2MB at the beginning of the System RAM for shared mem. + This is required on IPQ40xx, MSM8x60 and MSM8960 platforms. endif