From patchwork Tue Jun 10 20:58:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 896078 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22AC1264A85; Tue, 10 Jun 2025 20:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749589121; cv=none; b=XwulPhYkFa+K58gB7rd6phx9xKDTGz9ewMNR2OwMRFZvUPl5SSzzAKcoC1EKUvgLnZAc/7WvBfZjsTvy53N/32Frtc/RUjnqSinUZwQlqVh0ezwwZUxifGHuhPE5RpsrqHov78lrUbGnBTQ1ocQPQVNxOx2eybsPEFxeSIvgWis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749589121; c=relaxed/simple; bh=qm3uF6HSzJnRnw72+spsb/hFAmy0FfViB4PecXNYNVg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qImX44JLVhpbQpf84Q9Kw1+aEkJXRIW2fD11jxNQo5TG226ZIHeGTBGtfgooWDoTnqCnbpFrLJSlj6eNyZFf3vtfqpjVXsYzBVak05AnT+NoyJM3MzhuSBu/qgjgHGPXSTROtNs4JJRlfYXBOszeRDiFj3DqH9lgpkCtNWLK8GU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k1fplW04; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k1fplW04" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DB9FC4CEED; Tue, 10 Jun 2025 20:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749589121; bh=qm3uF6HSzJnRnw72+spsb/hFAmy0FfViB4PecXNYNVg=; h=From:To:Cc:Subject:Date:From; b=k1fplW04yy6+qHw/isDiwWRXbz+MBex3RvCws52wxu8s7yojNk1RfUT1OeNpJSSMR IeMhDzuQC9Yxl52p0ODzdHjbepJyfRjNqnOzfK6KW+wSoyYUyMeoewTxzLAw+yV5wD DH4g+B7v+ldHkheavFnTz1Pfr+m4LkE3g/jsstlQTbb5zjSWH1GKsL9zgmE3eqiZ03 i8Xk7a+WAy07BQe1kBHBPzDuOgaxlqQF1in8KMnzizkVAWU8Ch7A3PgjoKGXdLcm9x Va5Ou8s69GjMWDTrE+e4pBWrfah6Dl/TtEYYHYLKgcXEW1ZVwF1pkpzivScatniuQG hJypUqLSIN18g== From: Mario Limonciello To: Ingo Molnar , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), "H . Peter Anvin" , Andi Shyti , Jean Delvare , Shyam Sundar S K , Hans de Goede , Mario Limonciello , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)), linux-i2c@vger.kernel.org (open list:I2C SUBSYSTEM HOST DRIVERS), platform-driver-x86@vger.kernel.org (open list:AMD PMC DRIVER), Hans de Goede Subject: [PATCH 1/2] Move FCH header to a location accessible by all archs Date: Tue, 10 Jun 2025 15:58:16 -0500 Message-ID: <20250610205817.3912944-1-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mario Limonciello A new header fch.h was created to store registers used by different AMD drivers. This header was included by i2c-piix4 in commit 624b0d5696a8 ("i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to "). To prevent compile failures on non-x86 archs i2c-piix4 was set to only compile on x86 by commit 7e173eb82ae9717 ("i2c: piix4: Make CONFIG_I2C_PIIX4 dependent on CONFIG_X86"). This was not a good decision because loongarch and mips both actually support i2c-piix4 and set it enabled in the defconfig. Move the header to a location accessible by all architectures. Fixes: 624b0d5696a89 ("i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to ") Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello --- arch/x86/kernel/cpu/amd.c | 2 +- drivers/i2c/busses/i2c-piix4.c | 2 +- drivers/platform/x86/amd/pmc/pmc-quirks.c | 2 +- .../asm/amd/fch.h => include/linux/platform_data/x86/amd-fch.h | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename arch/x86/include/asm/amd/fch.h => include/linux/platform_data/x86/amd-fch.h (100%) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 93da466dfe2cb..9543d5de4e7d6 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 9d3a4dc2bd60c..ac3bb550303fe 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "i2c-piix4.h" diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c index 5c7c01f66cde0..6648fe0dce537 100644 --- a/drivers/platform/x86/amd/pmc/pmc-quirks.c +++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "pmc.h" diff --git a/arch/x86/include/asm/amd/fch.h b/include/linux/platform_data/x86/amd-fch.h similarity index 100% rename from arch/x86/include/asm/amd/fch.h rename to include/linux/platform_data/x86/amd-fch.h From patchwork Tue Jun 10 20:58:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 895393 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AAD5267728; Tue, 10 Jun 2025 20:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749589123; cv=none; b=L2G+59Q+TfX+IGHVjA+QEPrzyFwi/T2GTbggpIKmiClrBHS1wSF0ByTWnmcv7GMiSlEee5SGTWXKJWZHDAgtAb/xX+khEd/ZJ46x1VDJWeUSv4u2EZc14wKX4I2uFv52r/oB2nlFbJabskS8XR8qU581KTgxrSwSA7UO9TNbdNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749589123; c=relaxed/simple; bh=OXrjCKmjyzr6ZOd61Pn1+kve/DAc9dhbDa/S85q7zkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DFeH0sol0fHH6Ui15NJTctFSYaCZQg4JpEXd6DSsxPUBPm2RWKIzRP3+RjH0fH3KNf67J7Tw5XvInWsT1wz533dRtJ6aXwgicDql+PslLx1tgmNn7boHc5hPfu1jZ76tqnyZ3OIzf5udIGPcCaVSxdi4O7LGF0MPPLVmSGB+V0Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IVXiU4wM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IVXiU4wM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 425D9C4CEF0; Tue, 10 Jun 2025 20:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749589122; bh=OXrjCKmjyzr6ZOd61Pn1+kve/DAc9dhbDa/S85q7zkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IVXiU4wMaHETWcnleeHweUzEkZzWRZfpTFMK28+M6CEiyXDtpGbEhjAVZ3KK+5fT6 s1nS/1bWkDcd/vop0oJLluL7gAeqvQ22uqblmZVdF8Wi4LQeD5WVz226gIdeF0u9N4 EJOA7yKFS1tO51KxQYYgvkWKlUQjcxGBWXONhLbR3qJbsWHGzQX3HnbXBBllLe0CAg Jy82qlHHZM/hDj8HCUrOr6Ivw/HYIJW5eUvjK4yeKUmMMg1xztP4e3Dq/iJD+gZKFR Ss4gxwl9t/KUtp4KiY+ITSY1PB9sNpFcOUsgxROAR3ee3rb4kCIqe6uXtt8lQIPjfg FZ3XxXuW3jlsA== From: Mario Limonciello To: Ingo Molnar , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), "H . Peter Anvin" , Andi Shyti , Jean Delvare , Shyam Sundar S K , Hans de Goede , Mario Limonciello , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)), linux-i2c@vger.kernel.org (open list:I2C SUBSYSTEM HOST DRIVERS), platform-driver-x86@vger.kernel.org (open list:AMD PMC DRIVER), Geert Uytterhoeven Subject: [PATCH 2/2] i2c: Re-enable piix4 driver on non-x86 Date: Tue, 10 Jun 2025 15:58:17 -0500 Message-ID: <20250610205817.3912944-2-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250610205817.3912944-1-superm1@kernel.org> References: <20250610205817.3912944-1-superm1@kernel.org> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mario Limonciello loongarch and mips both support hardware that uses the i2c-piix4 driver. It should not be restricted to x86, so drop the x86 dependency. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdVPQLjOox5sMp34Z5MTwKv2WOpHa=MpZr8hWG22fQKcjw@mail.gmail.com/ Fixes: 7e173eb82ae97175 ("i2c: piix4: Make CONFIG_I2C_PIIX4 dependent on CONFIG_X86"). Signed-off-by: Mario Limonciello Acked-by: Andi Shyti Reviewed-by: Hans de Goede --- drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 48c5ab8320090..3be623735ca8a 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -200,7 +200,7 @@ config I2C_ISMT config I2C_PIIX4 tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)" - depends on PCI && HAS_IOPORT && X86 + depends on PCI && HAS_IOPORT select I2C_SMBUS help If you say yes to this option, support will be included for the Intel