From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 E259740F8C3 for ; Wed, 6 May 2026 14:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078604; cv=none; b=GVMi5fZRRl6UEcchFr2DBfqXRMBnfJW9pR3Fh+t8nL4Jlz/AZTOv7DDvg7JfL9NvD0y3Imu560Hb+X7BD56FM6NhKbpoRey2mRfkyQCitkspb8/fQtDjewHjFTvfKw+mNE69XhLyadQAK9dwKG9CeBuOQ7yi9jvOj+B525SuYtc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078604; c=relaxed/simple; bh=YE2HiJapcrtRmLkJXoOvhyFAHnEnDwHUUKApcT4luvM=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z7f8kBlZR5RdMAR0ExpfO6lzuSROKzIuwhUksAG2tcqkMUqu1SCsPu3A+dmf/RjqGNanDEgLJjlrKpAhQ1uH3/+49nuEtaCfAKplmR/hC5TSe81h6b+yozrmRPY9E/t4OYJo9Ar6KbcC7e2Lyyip2iH8HdXF0ZmLwyE4ZdlNY8I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=Et93uLeC; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=eBgwK/wG; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="Et93uLeC"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="eBgwK/wG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078596; bh=YE2HiJapcrtRmLkJXoOvhyFAHnEnDwHUUKApcT4luvM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Et93uLeCRqnmwUAwUaneMLOPCnMKe1P+pxy6EGDoKQF9u2tLJ2txBJbtRCX2r8o6B Ej6kbpdVRH91AJPyfka7eMP/vJXyJ4VFnmXhatihyHBdLpC2itR/0gwfK6LP/RkFXf sQczxEarG9L3CYMkDCtbOg8PicIExMDim6Grk7FDyX4PQ9q2J/iflErpr9memskOf5 y8scbsCA1frfSw89yGweIAhndNMgTiiyNzImlw13urXgSUZKo9HECwIL1rMTf1zfiT WHRo5Ciu2s4zclDPqmV7RrPyokFHDnFbmNGT0mCnopXZ3RlM6ZyEXceR2nf9O/agsw 9Agt4+++oataQ== Received: by extorris.mess.org (Postfix, from userid 1004) id 0342141CE5; Wed, 06 May 2026 15:43:15 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078587; bh=YE2HiJapcrtRmLkJXoOvhyFAHnEnDwHUUKApcT4luvM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eBgwK/wG26R0QU/EWj8pIqoCdQeHpy9eGnMQ0ErjdAmot2Mv/pxlbD/bDJ3Xz18e/ AM9i8to6WsulGWY4E2PiJRj7oCLtEMY+lIN8nu5rnonvegkxX88WzNJqu166SaORs1 E7ZrPEDxB2qdeklw/amvZLavmGxTVPHMyNbm4XJV/SGAoG3JkI6awOjp1RP98Qwo+B 6qBxsAYpVZGW4CA1idpCgZW0pB/tiP1aEHpI/XYrFuiHPF0iGfNu6AsA88/uffThpb NTo5heIdqTHBB4lwHg5Ys4TklUuyXF2DXcD2vubWtIODTJXEDf+c57zoSju3pysHiL D/aW+LTk4yJ4A== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id 5D00C41CDC; Wed, 06 May 2026 15:43:07 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH 1/8] x86/platform: Remove Technology Systems 5500 board Date: Wed, 6 May 2026 15:42:46 +0100 Message-ID: X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), this board is no longer supported. Remove the platform support too. Signed-off-by: Sean Young --- .../ABI/testing/sysfs-platform-ts5500 | 54 --- MAINTAINERS | 5 - arch/x86/Kconfig | 9 - arch/x86/platform/Makefile | 1 - arch/x86/platform/ts5500/Makefile | 2 - arch/x86/platform/ts5500/ts5500.c | 341 ------------------ 6 files changed, 412 deletions(-) delete mode 100644 Documentation/ABI/testing/sysfs-platform-ts5500 delete mode 100644 arch/x86/platform/ts5500/Makefile delete mode 100644 arch/x86/platform/ts5500/ts5500.c diff --git a/Documentation/ABI/testing/sysfs-platform-ts5500 b/Documentatio= n/ABI/testing/sysfs-platform-ts5500 deleted file mode 100644 index e685957caa12..000000000000 --- a/Documentation/ABI/testing/sysfs-platform-ts5500 +++ /dev/null @@ -1,54 +0,0 @@ -What: /sys/devices/platform/ts5500/adc -Date: January 2013 -KernelVersion: 3.7 -Contact: "Savoir-faire Linux Inc." -Description: - Indicates the presence of an A/D Converter. If it is present, - it will display "1", otherwise "0". - -What: /sys/devices/platform/ts5500/ereset -Date: January 2013 -KernelVersion: 3.7 -Contact: "Savoir-faire Linux Inc." -Description: - Indicates the presence of an external reset. If it is present, - it will display "1", otherwise "0". - -What: /sys/devices/platform/ts5500/id -Date: January 2013 -KernelVersion: 3.7 -Contact: "Savoir-faire Linux Inc." -Description: - Product ID of the TS board. TS-5500 ID is 0x60. - -What: /sys/devices/platform/ts5500/jumpers -Date: January 2013 -KernelVersion: 3.7 -Contact: "Savoir-faire Linux Inc." -Description: - Bitfield showing the jumpers' state. If a jumper is present, - the corresponding bit is set. For instance, 0x0e means jumpers - 2, 3 and 4 are set. - -What: /sys/devices/platform/ts5500/name -Date: July 2014 -KernelVersion: 3.16 -Contact: "Savoir-faire Linux Inc." -Description: - Model name of the TS board, e.g. "TS-5500". - -What: /sys/devices/platform/ts5500/rs485 -Date: January 2013 -KernelVersion: 3.7 -Contact: "Savoir-faire Linux Inc." -Description: - Indicates the presence of the RS485 option. If it is present, - it will display "1", otherwise "0". - -What: /sys/devices/platform/ts5500/sram -Date: January 2013 -KernelVersion: 3.7 -Contact: "Savoir-faire Linux Inc." -Description: - Indicates the presence of the SRAM option. If it is present, - it will display "1", otherwise "0". diff --git a/MAINTAINERS b/MAINTAINERS index 882214b0e7db..b526739b9947 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -26182,11 +26182,6 @@ S: Maintained F: Documentation/process/contribution-maturity-model.rst F: Documentation/process/researcher-guidelines.rst =20 -TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT -M: "Savoir-faire Linux Inc." -S: Maintained -F: arch/x86/platform/ts5500/ - TECHNOTREND USB IR RECEIVER M: Sean Young L: linux-media@vger.kernel.org diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f3f7cb01d69d..4ea5465a9d93 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -3100,15 +3100,6 @@ config GEOS help This option enables system support for the Traverse Technologies GEOS. =20 -config TS5500 - bool "Technologic Systems TS-5500 platform support" - depends on MELAN - select CHECK_SIGNATURE - select NEW_LEDS - select LEDS_CLASS - help - This option enables system support for the Technologic Systems TS-5500. - endif # X86_32 =20 config AMD_NB diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile index 3ed03a2552d0..727b92d0ca25 100644 --- a/arch/x86/platform/Makefile +++ b/arch/x86/platform/Makefile @@ -10,5 +10,4 @@ obj-y +=3D intel-mid/ obj-y +=3D intel-quark/ obj-y +=3D olpc/ obj-y +=3D scx200/ -obj-y +=3D ts5500/ obj-y +=3D uv/ diff --git a/arch/x86/platform/ts5500/Makefile b/arch/x86/platform/ts5500/M= akefile deleted file mode 100644 index 910fe9e3ffb4..000000000000 --- a/arch/x86/platform/ts5500/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_TS5500) +=3D ts5500.o diff --git a/arch/x86/platform/ts5500/ts5500.c b/arch/x86/platform/ts5500/t= s5500.c deleted file mode 100644 index 0b67da056fd9..000000000000 --- a/arch/x86/platform/ts5500/ts5500.c +++ /dev/null @@ -1,341 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Technologic Systems TS-5500 Single Board Computer support - * - * Copyright (C) 2013-2014 Savoir-faire Linux Inc. - * Vivien Didelot - * - * This driver registers the Technologic Systems TS-5500 Single Board Comp= uter - * (SBC) and its devices, and exposes information to userspace such as jum= pers' - * state or available options. For further information about sysfs entries= , see - * Documentation/ABI/testing/sysfs-platform-ts5500. - * - * This code may be extended to support similar x86-based platforms. - * Actually, the TS-5500 and TS-5400 are supported. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* Product code register */ -#define TS5500_PRODUCT_CODE_ADDR 0x74 -#define TS5500_PRODUCT_CODE 0x60 /* TS-5500 product code */ -#define TS5400_PRODUCT_CODE 0x40 /* TS-5400 product code */ - -/* SRAM/RS-485/ADC options, and RS-485 RTS/Automatic RS-485 flags register= */ -#define TS5500_SRAM_RS485_ADC_ADDR 0x75 -#define TS5500_SRAM BIT(0) /* SRAM option */ -#define TS5500_RS485 BIT(1) /* RS-485 option */ -#define TS5500_ADC BIT(2) /* A/D converter option */ -#define TS5500_RS485_RTS BIT(6) /* RTS for RS-485 */ -#define TS5500_RS485_AUTO BIT(7) /* Automatic RS-485 */ - -/* External Reset/Industrial Temperature Range options register */ -#define TS5500_ERESET_ITR_ADDR 0x76 -#define TS5500_ERESET BIT(0) /* External Reset option */ -#define TS5500_ITR BIT(1) /* Indust. Temp. Range option */ - -/* LED/Jumpers register */ -#define TS5500_LED_JP_ADDR 0x77 -#define TS5500_LED BIT(0) /* LED flag */ -#define TS5500_JP1 BIT(1) /* Automatic CMOS */ -#define TS5500_JP2 BIT(2) /* Enable Serial Console */ -#define TS5500_JP3 BIT(3) /* Write Enable Drive A */ -#define TS5500_JP4 BIT(4) /* Fast Console (115K baud) */ -#define TS5500_JP5 BIT(5) /* User Jumper */ -#define TS5500_JP6 BIT(6) /* Console on COM1 (req. JP2) */ -#define TS5500_JP7 BIT(7) /* Undocumented (Unused) */ - -/* A/D Converter registers */ -#define TS5500_ADC_CONV_BUSY_ADDR 0x195 /* Conversion state register */ -#define TS5500_ADC_CONV_BUSY BIT(0) -#define TS5500_ADC_CONV_INIT_LSB_ADDR 0x196 /* Start conv. / LSB register = */ -#define TS5500_ADC_CONV_MSB_ADDR 0x197 /* MSB register */ -#define TS5500_ADC_CONV_DELAY 12 /* usec */ - -/** - * struct ts5500_sbc - TS-5500 board description - * @name: Board model name. - * @id: Board product ID. - * @sram: Flag for SRAM option. - * @rs485: Flag for RS-485 option. - * @adc: Flag for Analog/Digital converter option. - * @ereset: Flag for External Reset option. - * @itr: Flag for Industrial Temperature Range option. - * @jumpers: Bitfield for jumpers' state. - */ -struct ts5500_sbc { - const char *name; - int id; - bool sram; - bool rs485; - bool adc; - bool ereset; - bool itr; - u8 jumpers; -}; - -/* Board signatures in BIOS shadow RAM */ -static const struct { - const char * const string; - const ssize_t offset; -} ts5500_signatures[] __initconst =3D { - { "TS-5x00 AMD Elan", 0xb14 }, -}; - -static int __init ts5500_check_signature(void) -{ - void __iomem *bios; - int i, ret =3D -ENODEV; - - bios =3D ioremap(0xf0000, 0x10000); - if (!bios) - return -ENOMEM; - - for (i =3D 0; i < ARRAY_SIZE(ts5500_signatures); i++) { - if (check_signature(bios + ts5500_signatures[i].offset, - ts5500_signatures[i].string, - strlen(ts5500_signatures[i].string))) { - ret =3D 0; - break; - } - } - - iounmap(bios); - return ret; -} - -static int __init ts5500_detect_config(struct ts5500_sbc *sbc) -{ - u8 tmp; - int ret =3D 0; - - if (!request_region(TS5500_PRODUCT_CODE_ADDR, 4, "ts5500")) - return -EBUSY; - - sbc->id =3D inb(TS5500_PRODUCT_CODE_ADDR); - if (sbc->id =3D=3D TS5500_PRODUCT_CODE) { - sbc->name =3D "TS-5500"; - } else if (sbc->id =3D=3D TS5400_PRODUCT_CODE) { - sbc->name =3D "TS-5400"; - } else { - pr_err("ts5500: unknown product code 0x%x\n", sbc->id); - ret =3D -ENODEV; - goto cleanup; - } - - tmp =3D inb(TS5500_SRAM_RS485_ADC_ADDR); - sbc->sram =3D tmp & TS5500_SRAM; - sbc->rs485 =3D tmp & TS5500_RS485; - sbc->adc =3D tmp & TS5500_ADC; - - tmp =3D inb(TS5500_ERESET_ITR_ADDR); - sbc->ereset =3D tmp & TS5500_ERESET; - sbc->itr =3D tmp & TS5500_ITR; - - tmp =3D inb(TS5500_LED_JP_ADDR); - sbc->jumpers =3D tmp & ~TS5500_LED; - -cleanup: - release_region(TS5500_PRODUCT_CODE_ADDR, 4); - return ret; -} - -static ssize_t name_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct ts5500_sbc *sbc =3D dev_get_drvdata(dev); - - return sprintf(buf, "%s\n", sbc->name); -} -static DEVICE_ATTR_RO(name); - -static ssize_t id_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct ts5500_sbc *sbc =3D dev_get_drvdata(dev); - - return sprintf(buf, "0x%.2x\n", sbc->id); -} -static DEVICE_ATTR_RO(id); - -static ssize_t jumpers_show(struct device *dev, struct device_attribute *a= ttr, - char *buf) -{ - struct ts5500_sbc *sbc =3D dev_get_drvdata(dev); - - return sprintf(buf, "0x%.2x\n", sbc->jumpers >> 1); -} -static DEVICE_ATTR_RO(jumpers); - -#define TS5500_ATTR_BOOL(_field) \ - static ssize_t _field##_show(struct device *dev, \ - struct device_attribute *attr, char *buf) \ - { \ - struct ts5500_sbc *sbc =3D dev_get_drvdata(dev); \ - \ - return sprintf(buf, "%d\n", sbc->_field); \ - } \ - static DEVICE_ATTR_RO(_field) - -TS5500_ATTR_BOOL(sram); -TS5500_ATTR_BOOL(rs485); -TS5500_ATTR_BOOL(adc); -TS5500_ATTR_BOOL(ereset); -TS5500_ATTR_BOOL(itr); - -static struct attribute *ts5500_attributes[] =3D { - &dev_attr_id.attr, - &dev_attr_name.attr, - &dev_attr_jumpers.attr, - &dev_attr_sram.attr, - &dev_attr_rs485.attr, - &dev_attr_adc.attr, - &dev_attr_ereset.attr, - &dev_attr_itr.attr, - NULL -}; - -static const struct attribute_group ts5500_attr_group =3D { - .attrs =3D ts5500_attributes, -}; - -static struct resource ts5500_dio1_resource[] =3D { - DEFINE_RES_IRQ_NAMED(7, "DIO1 interrupt"), -}; - -static struct platform_device ts5500_dio1_pdev =3D { - .name =3D "ts5500-dio1", - .id =3D -1, - .resource =3D ts5500_dio1_resource, - .num_resources =3D 1, -}; - -static struct resource ts5500_dio2_resource[] =3D { - DEFINE_RES_IRQ_NAMED(6, "DIO2 interrupt"), -}; - -static struct platform_device ts5500_dio2_pdev =3D { - .name =3D "ts5500-dio2", - .id =3D -1, - .resource =3D ts5500_dio2_resource, - .num_resources =3D 1, -}; - -static void ts5500_led_set(struct led_classdev *led_cdev, - enum led_brightness brightness) -{ - outb(!!brightness, TS5500_LED_JP_ADDR); -} - -static enum led_brightness ts5500_led_get(struct led_classdev *led_cdev) -{ - return (inb(TS5500_LED_JP_ADDR) & TS5500_LED) ? LED_FULL : LED_OFF; -} - -static struct led_classdev ts5500_led_cdev =3D { - .name =3D "ts5500:green:", - .brightness_set =3D ts5500_led_set, - .brightness_get =3D ts5500_led_get, -}; - -static int ts5500_adc_convert(u8 ctrl) -{ - u8 lsb, msb; - - /* Start conversion (ensure the 3 MSB are set to 0) */ - outb(ctrl & 0x1f, TS5500_ADC_CONV_INIT_LSB_ADDR); - - /* - * The platform has CPLD logic driving the A/D converter. - * The conversion must complete within 11 microseconds, - * otherwise we have to re-initiate a conversion. - */ - udelay(TS5500_ADC_CONV_DELAY); - if (inb(TS5500_ADC_CONV_BUSY_ADDR) & TS5500_ADC_CONV_BUSY) - return -EBUSY; - - /* Read the raw data */ - lsb =3D inb(TS5500_ADC_CONV_INIT_LSB_ADDR); - msb =3D inb(TS5500_ADC_CONV_MSB_ADDR); - - return (msb << 8) | lsb; -} - -static struct max197_platform_data ts5500_adc_pdata =3D { - .convert =3D ts5500_adc_convert, -}; - -static struct platform_device ts5500_adc_pdev =3D { - .name =3D "max197", - .id =3D -1, - .dev =3D { - .platform_data =3D &ts5500_adc_pdata, - }, -}; - -static int __init ts5500_init(void) -{ - struct platform_device *pdev; - struct ts5500_sbc *sbc; - int err; - - /* - * There is no DMI available or PCI bridge subvendor info, - * only the BIOS provides a 16-bit identification call. - * It is safer to find a signature in the BIOS shadow RAM. - */ - err =3D ts5500_check_signature(); - if (err) - return err; - - pdev =3D platform_device_register_simple("ts5500", -1, NULL, 0); - if (IS_ERR(pdev)) - return PTR_ERR(pdev); - - sbc =3D devm_kzalloc(&pdev->dev, sizeof(struct ts5500_sbc), GFP_KERNEL); - if (!sbc) { - err =3D -ENOMEM; - goto error; - } - - err =3D ts5500_detect_config(sbc); - if (err) - goto error; - - platform_set_drvdata(pdev, sbc); - - err =3D sysfs_create_group(&pdev->dev.kobj, &ts5500_attr_group); - if (err) - goto error; - - if (sbc->id =3D=3D TS5500_PRODUCT_CODE) { - ts5500_dio1_pdev.dev.parent =3D &pdev->dev; - if (platform_device_register(&ts5500_dio1_pdev)) - dev_warn(&pdev->dev, "DIO1 block registration failed\n"); - ts5500_dio2_pdev.dev.parent =3D &pdev->dev; - if (platform_device_register(&ts5500_dio2_pdev)) - dev_warn(&pdev->dev, "DIO2 block registration failed\n"); - } - - if (led_classdev_register(&pdev->dev, &ts5500_led_cdev)) - dev_warn(&pdev->dev, "LED registration failed\n"); - - if (sbc->adc) { - ts5500_adc_pdev.dev.parent =3D &pdev->dev; - if (platform_device_register(&ts5500_adc_pdev)) - dev_warn(&pdev->dev, "ADC registration failed\n"); - } - - return 0; -error: - platform_device_unregister(pdev); - return err; -} -device_initcall(ts5500_init); --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 8891B3FE358 for ; Wed, 6 May 2026 14:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078600; cv=none; b=M5PMvTEogFbOLY58wmI6UdNRYw61vRYfFuXTP6ncwbM/tnVTuL5xtfkbkDLvMpETRNtXpAEZLVt/z21OXlVWEQgf19IRwg4Xwv+E4Jb/sFu/YB8eqRoIycahx1jfW+wwu7PXf5bgqLj4UEixXMH+8mxiaX1+ydYAN0G5SAW/Pes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078600; c=relaxed/simple; bh=lCAD2uuvS1OzCKFoVS6wMeTz7zJp401WPc88JwnQcB4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LpQYdJocp45tawis9ScrRcyparg5HHhs6Gf++WZWfoIh059eAEpAUYzFgb1z9OsV4dQyYSQvGg8BHR7bMEagC0jLmQ4gj83jPz79iifiqkfzb0Vk+Wbd5K9EejRVNJrlgqcrLqgHnc0Yf5JPOeCGqKdcmNuzEA/rbhxcQOlFAa4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=qtj51DpF; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=r6nYjWGn; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="qtj51DpF"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="r6nYjWGn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078596; bh=lCAD2uuvS1OzCKFoVS6wMeTz7zJp401WPc88JwnQcB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qtj51DpFHd4PXm+ZYhPZZc3FReiLCW1o79WzzOkUuA33sckb+OyUuXZtvlCD+vJTb 1fsgUQOtu9BTDyUQyGJu+Oj+kp951+B4ypyeuEPXhXL5rDcUBbnlkdu6SsVNaNPPbx N9OCVXnBbiQGtKpsOWCXuZp83T8MBa2ZzxYkQmTYRKhnkaW2i9V+oKzkFNOLXsbF0n QDzvj5qSPzNsswtAsVN/nd8aihPxL6d4lAuHPt0ZRapJCLmdl9Nkcw5C2YwcX7ZnsD jmIZDr3WJFh3w57xHB0B2a3yqY0Hu/geS7tQMqq0M3ddoPNaJfLTLDR/nMMyCEPwTC bpMvCVWQl3M0w== Received: by extorris.mess.org (Postfix, from userid 1004) id CE4BE41CEB; Wed, 06 May 2026 15:43:16 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078588; bh=lCAD2uuvS1OzCKFoVS6wMeTz7zJp401WPc88JwnQcB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r6nYjWGn4a07c+LaSNidXhLzuxeFZ9izYlzllOGekGq7nI6JrBRJEfXBbgkW2fgh2 gDh/21IxLK6z4pMdm3cATSKCIvIUwQwujqndhNdp7POPzGV1fVfG7Qy3UJALqWZ2Cs bvEdSKfH53WKbKRNkifoVsgYUAn22K6mrHQ4Nfpy9U1ZC5LyBmOixKWIxTu9ey9L45 ZFXTRECOiQR2uN81tmR5uwOTEhls4AiOip0x2zDcT5y+FzLfe0asimEAGB5E9LQAIM msFazDBDQ7dJKbdpa85rDJp2puo8y/yMpNSb6YTSWqEjNPPK/htIj1wWRAPihY2ehe T1h5xTENhqEdg== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id 27B8A41CDD; Wed, 06 May 2026 15:43:08 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Subject: [PATCH 2/8] mtd: ts5500_flash: Remove mapping since board is no longer supported Date: Wed, 6 May 2026 15:42:47 +0100 Message-ID: <307a7d3cdb6e650a2c8585b5ba1e81915b00f8e0.1778071745.git.sean@mess.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), this board is no longer supported. Remove the mtd map too. Signed-off-by: Sean Young --- drivers/mtd/maps/Kconfig | 18 ------ drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/ts5500_flash.c | 108 -------------------------------- 3 files changed, 127 deletions(-) delete mode 100644 drivers/mtd/maps/ts5500_flash.c diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 99d5ff9a1fbe..e48221e97f8d 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -141,24 +141,6 @@ config MTD_NETSC520 demonstration board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. =20 -config MTD_TS5500 - tristate "JEDEC Flash device mapped on Technologic Systems TS-5500" - depends on TS5500 || COMPILE_TEST - select MTD_JEDECPROBE - select MTD_CFI_AMDSTD - help - This provides a driver for the on-board flash of the Technologic - System's TS-5500 board. The 2MB flash is split into 3 partitions - which are accessed as separate MTD devices. - - mtd0 and mtd2 are the two BIOS drives, which use the resident - flash disk (RFD) flash translation layer. - - mtd1 allows you to reprogram your BIOS. BE VERY CAREFUL. - - Note that jumper 3 ("Write Enable Drive A") must be set - otherwise detection won't succeed. - config MTD_SBC_GXX tristate "CFI Flash device mapped on Arcom SBC-GXx boards" depends on X86 && MTD_CFI_INTELEXT && MTD_COMPLEX_MAPPINGS diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index 51af1d2ebd52..46ff278006a7 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile @@ -28,7 +28,6 @@ obj-$(CONFIG_MTD_SA1100) +=3D sa1100-flash.o obj-$(CONFIG_MTD_SBC_GXX) +=3D sbc_gxx.o obj-$(CONFIG_MTD_SC520CDP) +=3D sc520cdp.o obj-$(CONFIG_MTD_NETSC520) +=3D netsc520.o -obj-$(CONFIG_MTD_TS5500) +=3D ts5500_flash.o obj-$(CONFIG_MTD_SUN_UFLASH) +=3D sun_uflash.o obj-$(CONFIG_MTD_SCx200_DOCFLASH)+=3D scx200_docflash.o obj-$(CONFIG_MTD_SOLUTIONENGINE)+=3D solutionengine.o diff --git a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flas= h.c deleted file mode 100644 index 70d6e865f555..000000000000 --- a/drivers/mtd/maps/ts5500_flash.c +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * ts5500_flash.c -- MTD map driver for Technology Systems TS-5500 board - * - * Copyright (C) 2004 Sean Young - * - * Note: - * - In order for detection to work, jumper 3 must be set. - * - Drive A and B use the resident flash disk (RFD) flash translation lay= er. - * - If you have created your own jffs file system and the bios overwrites - * it during boot, try disabling Drive A: and B: in the boot order. - */ - -#include -#include -#include -#include -#include -#include -#include - - -#define WINDOW_ADDR 0x09400000 -#define WINDOW_SIZE 0x00200000 - -static struct map_info ts5500_map =3D { - .name =3D "TS-5500 Flash", - .size =3D WINDOW_SIZE, - .bankwidth =3D 1, - .phys =3D WINDOW_ADDR -}; - -static const struct mtd_partition ts5500_partitions[] =3D { - { - .name =3D "Drive A", - .offset =3D 0, - .size =3D 0x0e0000 - }, - { - .name =3D "BIOS", - .offset =3D 0x0e0000, - .size =3D 0x020000, - }, - { - .name =3D "Drive B", - .offset =3D 0x100000, - .size =3D 0x100000 - } -}; - -#define NUM_PARTITIONS ARRAY_SIZE(ts5500_partitions) - -static struct mtd_info *mymtd; - -static int __init init_ts5500_map(void) -{ - int rc =3D 0; - - ts5500_map.virt =3D ioremap(ts5500_map.phys, ts5500_map.size); - - if (!ts5500_map.virt) { - printk(KERN_ERR "Failed to ioremap\n"); - rc =3D -EIO; - goto err2; - } - - simple_map_init(&ts5500_map); - - mymtd =3D do_map_probe("jedec_probe", &ts5500_map); - if (!mymtd) - mymtd =3D do_map_probe("map_rom", &ts5500_map); - - if (!mymtd) { - rc =3D -ENXIO; - goto err1; - } - - mymtd->owner =3D THIS_MODULE; - mtd_device_register(mymtd, ts5500_partitions, NUM_PARTITIONS); - - return 0; - -err1: - iounmap(ts5500_map.virt); -err2: - return rc; -} - -static void __exit cleanup_ts5500_map(void) -{ - if (mymtd) { - mtd_device_unregister(mymtd); - map_destroy(mymtd); - } - - if (ts5500_map.virt) { - iounmap(ts5500_map.virt); - ts5500_map.virt =3D NULL; - } -} - -module_init(init_ts5500_map); -module_exit(cleanup_ts5500_map); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Sean Young "); -MODULE_DESCRIPTION("MTD map driver for Technology Systems TS-5500 board"); - --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 EF7AB421890 for ; Wed, 6 May 2026 14:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078600; cv=none; b=FCExK4Z1CmUO5zG26zmpRS7o2pamGzhb9pzh2floZlRJwpG1AJKluXr0fETh0/vdiYs4K33/1aYVk021cpgLTLljQ9EScZalqHPEJ7Rxzy7GC9VMP63IREKE6pDPF5/SYHp1UKXwZB6RKROXkm92WiSfjEuxxRdSURs92Gri8Vw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078600; c=relaxed/simple; bh=G1bGyQ92mZxo9cX1G/JO7vqGJFj875AcyucMClNOOZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gRmfVayveavcIex263/FGyBO6OQZBE7CUwJ0g0KF+KFHbEaPS9xc2/c2MdDMn/4OLvMw7od4noHm/ebZciMUWWZWzxVbSrbiE1PwmW1gt0M8RH5w80NeYXFiH0gwztk5Ieh3OhbArzW+2u/QqzvVRGCiMFfaMK0L60HqCip6ffg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=hqz/MCu7; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=DUV7J8vP; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="hqz/MCu7"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="DUV7J8vP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078597; bh=G1bGyQ92mZxo9cX1G/JO7vqGJFj875AcyucMClNOOZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hqz/MCu7SA0VnHH3Y6rP/x8iEcDfG3adOtSzFgIccgqI5xuhWk1mhrvWxjdSm4zGC yxCsLLvF9Fpd4csotf6kEqAf8Xrx21NomB+6DDWVNKwHfU8qeHlMdIMXlGM8NwNDQO V4opMWro1mx7rzmMAgVRPhttEzt+oB+j1mNvIAilIH7jhz+IY3NAHKL0PLsEBSEZrC CLlv9ViAnhF6uUn7cHw3OFHHbnxatcZ4fJKZJAAxxByhDBMUG3T3DTxkrx9uCIjHi7 hPo19MZKbjYnczUB4G7HQQA2Y4teStK6rrwgnx9Qz9GWIF/WoIMtVQQppPwhWV//MD qC/CgDPfix4Rw== Received: by extorris.mess.org (Postfix, from userid 1004) id A774941CF1; Wed, 06 May 2026 15:43:17 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078588; bh=G1bGyQ92mZxo9cX1G/JO7vqGJFj875AcyucMClNOOZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DUV7J8vPc1t/BSdIPY3nIFLuSJMEChFbW5BU7QfIw5ku7qFqMTj4WlYD0Ta69FWIg 1XL3pPnFvt1ZGbVTwbczs6qrK7RDJSgC49lEgwXEliFsTo6kKrlJXQUJLsZBMGMSQS UFCvQdUxL2igfytQSamxw4UMuK4GQIENXfRDAIjtxSI+MRIp+Q713ahnuXEdrWibfQ /eH3vLaTYvdiZN55Xv9p/Q8Il06ZzfaTU3JdLinZTGbxdysCCH56EtWkMrUBSP1whJ 3RLVMg1YsOEzovbLY0ZMjvl9Rjib8RykI29JTQQj10lVm64wfqhv1L+d+k9/9wgEvj 2BJ0UiwYEXHbA== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id E231441CDE; Wed, 06 May 2026 15:43:08 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Subject: [PATCH 3/8] mtd: netsc520: Remove mapping since board is no longer supported Date: Wed, 6 May 2026 15:42:48 +0100 Message-ID: <7d42d63fe53968d0e917dd6913affc9c8ecc97b6.1778071745.git.sean@mess.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), this board is no longer supported. Remove the mtd map too. Signed-off-by: Sean Young --- drivers/mtd/maps/Kconfig | 8 --- drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/netsc520.c | 127 ------------------------------------ 3 files changed, 136 deletions(-) delete mode 100644 drivers/mtd/maps/netsc520.c diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index e48221e97f8d..b34f3c34c626 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -133,14 +133,6 @@ config MTD_SC520CDP Dual-in-line JEDEC chip. This 'mapping' driver supports that arrangement, implementing three MTD devices. =20 -config MTD_NETSC520 - tristate "CFI Flash device mapped on AMD NetSc520" - depends on (MELAN || COMPILE_TEST) && MTD_CFI - help - This enables access routines for the flash chips on the AMD NetSc520 - demonstration board. If you have one of these boards and would like - to use the flash chips on it, say 'Y'. - config MTD_SBC_GXX tristate "CFI Flash device mapped on Arcom SBC-GXx boards" depends on X86 && MTD_CFI_INTELEXT && MTD_COMPLEX_MAPPINGS diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index 46ff278006a7..e8b5caa17ccc 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile @@ -27,7 +27,6 @@ obj-$(CONFIG_MTD_PCMCIA) +=3D pcmciamtd.o obj-$(CONFIG_MTD_SA1100) +=3D sa1100-flash.o obj-$(CONFIG_MTD_SBC_GXX) +=3D sbc_gxx.o obj-$(CONFIG_MTD_SC520CDP) +=3D sc520cdp.o -obj-$(CONFIG_MTD_NETSC520) +=3D netsc520.o obj-$(CONFIG_MTD_SUN_UFLASH) +=3D sun_uflash.o obj-$(CONFIG_MTD_SCx200_DOCFLASH)+=3D scx200_docflash.o obj-$(CONFIG_MTD_SOLUTIONENGINE)+=3D solutionengine.o diff --git a/drivers/mtd/maps/netsc520.c b/drivers/mtd/maps/netsc520.c deleted file mode 100644 index 0bb651624f05..000000000000 --- a/drivers/mtd/maps/netsc520.c +++ /dev/null @@ -1,127 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* netsc520.c -- MTD map driver for AMD NetSc520 Demonstration Board - * - * Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com) - * based on sc520cdp.c by Sysgo Real-Time Solutions GmbH - * - * The NetSc520 is a demonstration board for the Elan Sc520 processor avai= lable - * from AMD. It has a single back of 16 megs of 32-bit Flash ROM and anot= her - * 16 megs of SDRAM. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - - -/* -** The single, 16 megabyte flash bank is divided into four virtual -** partitions. The first partition is 768 KiB and is intended to -** store the kernel image loaded by the bootstrap loader. The second -** partition is 256 KiB and holds the BIOS image. The third -** partition is 14.5 MiB and is intended for the flash file system -** image. The last partition is 512 KiB and contains another copy -** of the BIOS image and the reset vector. -** -** Only the third partition should be mounted. The first partition -** should not be mounted, but it can erased and written to using the -** MTD character routines. The second and fourth partitions should -** not be touched - it is possible to corrupt the BIOS image by -** mounting these partitions, and potentially the board will not be -** recoverable afterwards. -*/ - -/* partition_info gives details on the logical partitions that the split t= he - * single flash device into. If the size if zero we use up to the end of t= he - * device. */ -static const struct mtd_partition partition_info[] =3D { - { - .name =3D "NetSc520 boot kernel", - .offset =3D 0, - .size =3D 0xc0000 - }, - { - .name =3D "NetSc520 Low BIOS", - .offset =3D 0xc0000, - .size =3D 0x40000 - }, - { - .name =3D "NetSc520 file system", - .offset =3D 0x100000, - .size =3D 0xe80000 - }, - { - .name =3D "NetSc520 High BIOS", - .offset =3D 0xf80000, - .size =3D 0x80000 - }, -}; -#define NUM_PARTITIONS ARRAY_SIZE(partition_info) - -#define WINDOW_SIZE 0x00100000 -#define WINDOW_ADDR 0x00200000 - -static struct map_info netsc520_map =3D { - .name =3D "netsc520 Flash Bank", - .size =3D WINDOW_SIZE, - .bankwidth =3D 4, - .phys =3D WINDOW_ADDR, -}; - -#define NUM_FLASH_BANKS ARRAY_SIZE(netsc520_map) - -static struct mtd_info *mymtd; - -static int __init init_netsc520(void) -{ - printk(KERN_NOTICE "NetSc520 flash device: 0x%Lx at 0x%Lx\n", - (unsigned long long)netsc520_map.size, - (unsigned long long)netsc520_map.phys); - netsc520_map.virt =3D ioremap(netsc520_map.phys, netsc520_map.size); - - if (!netsc520_map.virt) { - printk("Failed to ioremap\n"); - return -EIO; - } - - simple_map_init(&netsc520_map); - - mymtd =3D do_map_probe("cfi_probe", &netsc520_map); - if(!mymtd) - mymtd =3D do_map_probe("map_ram", &netsc520_map); - if(!mymtd) - mymtd =3D do_map_probe("map_rom", &netsc520_map); - - if (!mymtd) { - iounmap(netsc520_map.virt); - return -ENXIO; - } - - mymtd->owner =3D THIS_MODULE; - mtd_device_register(mymtd, partition_info, NUM_PARTITIONS); - return 0; -} - -static void __exit cleanup_netsc520(void) -{ - if (mymtd) { - mtd_device_unregister(mymtd); - map_destroy(mymtd); - } - if (netsc520_map.virt) { - iounmap(netsc520_map.virt); - netsc520_map.virt =3D NULL; - } -} - -module_init(init_netsc520); -module_exit(cleanup_netsc520); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Mark Langsdorf "); -MODULE_DESCRIPTION("MTD map driver for AMD NetSc520 Demonstration Board"); --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 5CDFD481A86 for ; Wed, 6 May 2026 14:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078608; cv=none; b=kS8/sRxu+aKlzhFGMvWpuEt36NNsp2YNBwjfIOTyV3KWvSTiI8zzpXcAQnVU86saVrBx9Qij12pGsR7eMw3/GIlacQMLgo+7YKtzJuRW3y7I/9wDWS53Rkm2GzO/qVjXfrG1GQJpQqxlAHRge1nkH0HWBgLXYEmKsEx86FGVLyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078608; c=relaxed/simple; bh=IpaJU7Ptdixw7tkDNDKcQUsgWqg5xyH5+gvrwGBrZpA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qgybczwARhnwwtjU4xs+y0+OQW1MOt2OCojaeG9qgSLSNs7wxuRTyqiHe19q0RSrMaOKITCNRCCc8WBIgkRcVD3wQqkMEaMh59E8GlGhABT/K2l4ZFTeb9QBL3+XFElCoLHQK7jRQr9VugGOXtucMBTdweOEo+t6CXbs9USiUmM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=mLuuCeu/; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=EoCDAjif; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="mLuuCeu/"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="EoCDAjif" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078605; bh=IpaJU7Ptdixw7tkDNDKcQUsgWqg5xyH5+gvrwGBrZpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mLuuCeu/2LaFIZcw32FDHMCf6ReGQO2aEnhm4N9OuKoMCZW4dqmF8hIsKFKUZWPRR nVx/jYWTxO6xzrZYtd0tRsv1rhnf5CvqG+TgQassl6gLGzMG3xApDDyieymF6oxilE iY4L+QyXGsY3+mQauXqG4aoOQUfaasWNKQkNu0F/VsLS3Mk7L+OPhVA/72TNn2GP19 ekMDE1FeI7oAM8Q2c0lQ38+fEbIg1hZCcAa0MZiXnO5U2O1W3hYKRxeFseKFlEbgK+ LeTz4ZCOYVeFfnvItGLbtAEUZQ+J+lv+HGDfjLVtcWXWGG0QCHhPJnPnOsLRC//xOG 1c/CAws5/TUUg== Received: by extorris.mess.org (Postfix, from userid 1004) id 0227341CEA; Wed, 06 May 2026 15:43:24 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078589; bh=IpaJU7Ptdixw7tkDNDKcQUsgWqg5xyH5+gvrwGBrZpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EoCDAjif85TtrTsFPF1ho2ir0arDnyvmDaLRDyOCAbSMqaQByJ4e7+vNOq1eG2LFQ ZwVqBNsERNW8qC+ysSzUTgWkZivm5vUGy7gK8ZufDmzDPmx4LGroZl9iO9Pu/8Giux ftiRUQ6hIpwtEc5ghRsrQnjUbRxygwY1ZA5QznCgza3As6mjBeYVAIIlCsSR/rKLM4 UtiJkV2HVswODGs8OloceTdiBdCGgYNRmp080X28LCdrDAyNdA5i7Jkb0F1X5l7fP0 jacMV0Ev1ocbk7TQ+xqECnMGEx/ZgRY18rTXWQgzqMIW1DIOlxzGP2j7uwtNgkH3Ga ocAQf9oJHyCKw== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id BBC8341CDF; Wed, 06 May 2026 15:43:09 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Subject: [PATCH 4/8] mtd: sc520cdp: Remove mapping since board is no longer supported Date: Wed, 6 May 2026 15:42:49 +0100 Message-ID: X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), this board is no longer supported. Remove the mtd map too. Signed-off-by: Sean Young --- drivers/mtd/maps/Kconfig | 8 - drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/sc520cdp.c | 294 ------------------------------------ 3 files changed, 303 deletions(-) delete mode 100644 drivers/mtd/maps/sc520cdp.c diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index b34f3c34c626..db63b5af4b39 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -125,14 +125,6 @@ config MTD_SUN_UFLASH Sun Microsystems boardsets. This driver will require CFI support in the kernel, so if you did not enable CFI previously, do that now. =20 -config MTD_SC520CDP - tristate "CFI Flash device mapped on AMD SC520 CDP" - depends on (MELAN || COMPILE_TEST) && MTD_CFI - help - The SC520 CDP board has two banks of CFI-compliant chips and one - Dual-in-line JEDEC chip. This 'mapping' driver supports that - arrangement, implementing three MTD devices. - config MTD_SBC_GXX tristate "CFI Flash device mapped on Arcom SBC-GXx boards" depends on X86 && MTD_CFI_INTELEXT && MTD_COMPLEX_MAPPINGS diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index e8b5caa17ccc..c545d1e68e91 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile @@ -26,7 +26,6 @@ obj-$(CONFIG_MTD_PISMO) +=3D pismo.o obj-$(CONFIG_MTD_PCMCIA) +=3D pcmciamtd.o obj-$(CONFIG_MTD_SA1100) +=3D sa1100-flash.o obj-$(CONFIG_MTD_SBC_GXX) +=3D sbc_gxx.o -obj-$(CONFIG_MTD_SC520CDP) +=3D sc520cdp.o obj-$(CONFIG_MTD_SUN_UFLASH) +=3D sun_uflash.o obj-$(CONFIG_MTD_SCx200_DOCFLASH)+=3D scx200_docflash.o obj-$(CONFIG_MTD_SOLUTIONENGINE)+=3D solutionengine.o diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c deleted file mode 100644 index 8ef7aec634c7..000000000000 --- a/drivers/mtd/maps/sc520cdp.c +++ /dev/null @@ -1,294 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* sc520cdp.c -- MTD map driver for AMD SC520 Customer Development Platform - * - * Copyright (C) 2001 Sysgo Real-Time Solutions GmbH - * - * The SC520CDP is an evaluation board for the Elan SC520 processor availa= ble - * from AMD. It has two banks of 32-bit Flash ROM, each 8 Megabytes in siz= e, - * and up to 512 KiB of 8-bit DIL Flash ROM. - * For details see https://www.amd.com/products/epd/desiging/evalboards/18= .elansc520/520_cdp_brief/index.html - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* -** The Embedded Systems BIOS decodes the first FLASH starting at -** 0x8400000. This is a *terrible* place for it because accessing -** the flash at this location causes the A22 address line to be high -** (that's what 0x8400000 binary's ought to be). But this is the highest -** order address line on the raw flash devices themselves!! -** This causes the top HALF of the flash to be accessed first. Beyond -** the physical limits of the flash, the flash chip aliases over (to -** 0x880000 which causes the bottom half to be accessed. This splits the -** flash into two and inverts it! If you then try to access this from anot= her -** program that does NOT do this insanity, then you *will* access the -** first half of the flash, but not find what you expect there. That -** stuff is in the *second* half! Similarly, the address used by the -** BIOS for the second FLASH bank is also quite a bad choice. -** If REPROGRAM_PAR is defined below (the default), then this driver will -** choose more useful addresses for the FLASH banks by reprogramming the -** responsible PARxx registers in the SC520's MMCR region. This will -** cause the settings to be incompatible with the BIOS's settings, which -** shouldn't be a problem since you are running Linux, (i.e. the BIOS is -** not much use anyway). However, if you need to be compatible with -** the BIOS for some reason, just undefine REPROGRAM_PAR. -*/ -#define REPROGRAM_PAR - - - -#ifdef REPROGRAM_PAR - -/* These are the addresses we want.. */ -#define WINDOW_ADDR_0 0x08800000 -#define WINDOW_ADDR_1 0x09000000 -#define WINDOW_ADDR_2 0x09800000 - -/* .. and these are the addresses the BIOS gives us */ -#define WINDOW_ADDR_0_BIOS 0x08400000 -#define WINDOW_ADDR_1_BIOS 0x08c00000 -#define WINDOW_ADDR_2_BIOS 0x09400000 - -#else - -#define WINDOW_ADDR_0 0x08400000 -#define WINDOW_ADDR_1 0x08C00000 -#define WINDOW_ADDR_2 0x09400000 - -#endif - -#define WINDOW_SIZE_0 0x00800000 -#define WINDOW_SIZE_1 0x00800000 -#define WINDOW_SIZE_2 0x00080000 - - -static struct map_info sc520cdp_map[] =3D { - { - .name =3D "SC520CDP Flash Bank #0", - .size =3D WINDOW_SIZE_0, - .bankwidth =3D 4, - .phys =3D WINDOW_ADDR_0 - }, - { - .name =3D "SC520CDP Flash Bank #1", - .size =3D WINDOW_SIZE_1, - .bankwidth =3D 4, - .phys =3D WINDOW_ADDR_1 - }, - { - .name =3D "SC520CDP DIL Flash", - .size =3D WINDOW_SIZE_2, - .bankwidth =3D 1, - .phys =3D WINDOW_ADDR_2 - }, -}; - -#define NUM_FLASH_BANKS ARRAY_SIZE(sc520cdp_map) - -static struct mtd_info *mymtd[NUM_FLASH_BANKS]; -static struct mtd_info *merged_mtd; - -#ifdef REPROGRAM_PAR - -/* -** The SC520 MMCR (memory mapped control register) region resides -** at 0xFFFEF000. The 16 Programmable Address Region (PAR) registers -** are at offset 0x88 in the MMCR: -*/ -#define SC520_MMCR_BASE 0xFFFEF000 -#define SC520_MMCR_EXTENT 0x1000 -#define SC520_PAR(x) ((0x88/sizeof(unsigned long)) + (x)) -#define NUM_SC520_PAR 16 /* total number of PAR registers */ - -/* -** The highest three bits in a PAR register determine what target -** device is controlled by this PAR. Here, only ROMCS? and BOOTCS -** devices are of interest. -*/ -#define SC520_PAR_BOOTCS (0x4<<29) -#define SC520_PAR_ROMCS0 (0x5<<29) -#define SC520_PAR_ROMCS1 (0x6<<29) -#define SC520_PAR_TRGDEV (0x7<<29) - -/* -** Bits 28 thru 26 determine some attributes for the -** region controlled by the PAR. (We only use non-cacheable) -*/ -#define SC520_PAR_WRPROT (1<<26) /* write protected */ -#define SC520_PAR_NOCACHE (1<<27) /* non-cacheable */ -#define SC520_PAR_NOEXEC (1<<28) /* code execution denied */ - - -/* -** Bit 25 determines the granularity: 4K or 64K -*/ -#define SC520_PAR_PG_SIZ4 (0<<25) -#define SC520_PAR_PG_SIZ64 (1<<25) - -/* -** Build a value to be written into a PAR register. -** We only need ROM entries, 64K page size: -*/ -#define SC520_PAR_ENTRY(trgdev, address, size) \ - ((trgdev) | SC520_PAR_NOCACHE | SC520_PAR_PG_SIZ64 | \ - (address) >> 16 | (((size) >> 16) - 1) << 14) - -struct sc520_par_table -{ - unsigned long trgdev; - unsigned long new_par; - unsigned long default_address; -}; - -static const struct sc520_par_table par_table[NUM_FLASH_BANKS] =3D -{ - { /* Flash Bank #0: selected by ROMCS0 */ - SC520_PAR_ROMCS0, - SC520_PAR_ENTRY(SC520_PAR_ROMCS0, WINDOW_ADDR_0, WINDOW_SIZE_0), - WINDOW_ADDR_0_BIOS - }, - { /* Flash Bank #1: selected by ROMCS1 */ - SC520_PAR_ROMCS1, - SC520_PAR_ENTRY(SC520_PAR_ROMCS1, WINDOW_ADDR_1, WINDOW_SIZE_1), - WINDOW_ADDR_1_BIOS - }, - { /* DIL (BIOS) Flash: selected by BOOTCS */ - SC520_PAR_BOOTCS, - SC520_PAR_ENTRY(SC520_PAR_BOOTCS, WINDOW_ADDR_2, WINDOW_SIZE_2), - WINDOW_ADDR_2_BIOS - } -}; - - -static void sc520cdp_setup_par(void) -{ - unsigned long __iomem *mmcr; - unsigned long mmcr_val; - int i, j; - - /* map in SC520's MMCR area */ - mmcr =3D ioremap(SC520_MMCR_BASE, SC520_MMCR_EXTENT); - if(!mmcr) { /* ioremap failed: skip the PAR reprogramming */ - /* force physical address fields to BIOS defaults: */ - for(i =3D 0; i < NUM_FLASH_BANKS; i++) - sc520cdp_map[i].phys =3D par_table[i].default_address; - return; - } - - /* - ** Find the PARxx registers that are responsible for activating - ** ROMCS0, ROMCS1 and BOOTCS. Reprogram each of these with a - ** new value from the table. - */ - for(i =3D 0; i < NUM_FLASH_BANKS; i++) { /* for each par_table entry */ - for(j =3D 0; j < NUM_SC520_PAR; j++) { /* for each PAR register */ - mmcr_val =3D readl(&mmcr[SC520_PAR(j)]); - /* if target device field matches, reprogram the PAR */ - if((mmcr_val & SC520_PAR_TRGDEV) =3D=3D par_table[i].trgdev) - { - writel(par_table[i].new_par, &mmcr[SC520_PAR(j)]); - break; - } - } - if(j =3D=3D NUM_SC520_PAR) - { /* no matching PAR found: try default BIOS address */ - printk(KERN_NOTICE "Could not find PAR responsible for %s\n", - sc520cdp_map[i].name); - printk(KERN_NOTICE "Trying default address 0x%lx\n", - par_table[i].default_address); - sc520cdp_map[i].phys =3D par_table[i].default_address; - } - } - iounmap(mmcr); -} -#endif - - -static int __init init_sc520cdp(void) -{ - int i, j, devices_found =3D 0; - -#ifdef REPROGRAM_PAR - /* reprogram PAR registers so flash appears at the desired addresses */ - sc520cdp_setup_par(); -#endif - - for (i =3D 0; i < NUM_FLASH_BANKS; i++) { - printk(KERN_NOTICE "SC520 CDP flash device: 0x%Lx at 0x%Lx\n", - (unsigned long long)sc520cdp_map[i].size, - (unsigned long long)sc520cdp_map[i].phys); - - sc520cdp_map[i].virt =3D ioremap(sc520cdp_map[i].phys, sc520cdp_map[i].s= ize); - - if (!sc520cdp_map[i].virt) { - printk("Failed to ioremap\n"); - for (j =3D 0; j < i; j++) { - if (mymtd[j]) { - map_destroy(mymtd[j]); - iounmap(sc520cdp_map[j].virt); - } - } - return -EIO; - } - - simple_map_init(&sc520cdp_map[i]); - - mymtd[i] =3D do_map_probe("cfi_probe", &sc520cdp_map[i]); - if(!mymtd[i]) - mymtd[i] =3D do_map_probe("jedec_probe", &sc520cdp_map[i]); - if(!mymtd[i]) - mymtd[i] =3D do_map_probe("map_rom", &sc520cdp_map[i]); - - if (mymtd[i]) { - mymtd[i]->owner =3D THIS_MODULE; - ++devices_found; - } - else { - iounmap(sc520cdp_map[i].virt); - } - } - if(devices_found >=3D 2) { - /* Combine the two flash banks into a single MTD device & register it: */ - merged_mtd =3D mtd_concat_create(mymtd, 2, "SC520CDP Flash Banks #0 and = #1"); - if(merged_mtd) - mtd_device_register(merged_mtd, NULL, 0); - } - if(devices_found =3D=3D 3) /* register the third (DIL-Flash) device */ - mtd_device_register(mymtd[2], NULL, 0); - return(devices_found ? 0 : -ENXIO); -} - -static void __exit cleanup_sc520cdp(void) -{ - int i; - - if (merged_mtd) { - mtd_device_unregister(merged_mtd); - mtd_concat_destroy(merged_mtd); - } - if (mymtd[2]) - mtd_device_unregister(mymtd[2]); - - for (i =3D 0; i < NUM_FLASH_BANKS; i++) { - if (mymtd[i]) - map_destroy(mymtd[i]); - if (sc520cdp_map[i].virt) { - iounmap(sc520cdp_map[i].virt); - sc520cdp_map[i].virt =3D NULL; - } - } -} - -module_init(init_sc520cdp); -module_exit(cleanup_sc520cdp); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Sysgo Real-Time Solutions GmbH"); -MODULE_DESCRIPTION("MTD map driver for AMD SC520 Customer Development Plat= form"); --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 2FA7148166E; Wed, 6 May 2026 14:43:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078610; cv=none; b=NJZs55F0QvEMHpXSfh9UmYQD6eVr7mfja8dD1crggx+AR/5T2aPCn7+dv0SBnoUT05fKBrmMoilNWZaM1Hf205xv0vW9kbaersRqSADRdSuskL3DMjh2WWws4OGLdZ/YHAJ+wfrt2diQR31GHiLx6rJLTmycuJwtbMKhZCbrvww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078610; c=relaxed/simple; bh=A1B3nJpY4ScbQWP11G5jpvKqoxxwkHCRodBvg0PzDdg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HFtATlzkMAnzeNdzxYRixqVABalzkCwXdpaXOEl2ZBeJ9a0KUhySV8xLFGUPzTPwIs9qiSp/CT9KRinsWodXhul5Lg5y39Nj2mEU9RCQvaTbGQAfsmxMu1GHC0X+ORX5Je/3+Crc+McdCMGAOQgu1ew8nCc5e/vDLEutTihBccc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=Y+sNC/Ek; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=RhslPSKM; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="Y+sNC/Ek"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="RhslPSKM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078606; bh=A1B3nJpY4ScbQWP11G5jpvKqoxxwkHCRodBvg0PzDdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y+sNC/EklmcfadL/jIgi8uMI0OurI754hf1cY4LsNmuuJKeRR2zbS4f2IXSNHS9WI cHHpJhmNXNmL1+a/SzF3Z/h8TfrBnS6w7Ps806fp8wup/l0LHGO62HwRe68WrZnSXA Y7B+9vLs/mhqujP5c5UmqEjQ9OPylkv2Cbn8ThPdYMbWoUp+wuL7LypcGwgNWknD4w 6jZ3eeymkb7YuGt8jOJdJT0oj+Y8xXAqbXL+xqvGDAQwwd6NN0ZAc8cveAQPni+bQ9 UQexary2aS3ItEspz238uLu3sNTW60HSVvUTt4jFjU6czwMa0rjHOZjEgledAFi0JO b2icS0BBPtC1g== Received: by extorris.mess.org (Postfix, from userid 1004) id C2E5441CE2; Wed, 06 May 2026 15:43:26 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078590; bh=A1B3nJpY4ScbQWP11G5jpvKqoxxwkHCRodBvg0PzDdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RhslPSKMuQUHbMtcvW5yJwF2caxDNLvs9lji3W7RBq0QS8BDNXY7jPJGGQptCedym TxboVJq6ttADi/ICQRzB+80Obbu4wSlcPJn02JqWBHIGb463l06C8qAnI6132jAZfx 1vg3QNnBLZcGP6bM0waeP/nShmt5wxlJv96CBBh7IDfeGtBnDKNQeJCN6B4H6eu9+n Vspgy2QpvsuEqYAVw3MVMjx426y4wHLsa41ItaXkJg3B0IUp4yCaeGyZoEW5ms2Xz/ 0ePAFN8XP8NpDPHmjjGjngWZsFXV29gL6X4XT7sZKNPu4az0PgVuxp+VLMFp3fseFU JqqIzRu9JYoKQ== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id A1A4441CE0; Wed, 06 May 2026 15:43:10 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, Linus Walleij , Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Subject: [PATCH 5/8] gpio: ts5500: Remove gpio driver as board no longer supported Date: Wed, 6 May 2026 15:42:50 +0100 Message-ID: X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), this board is no longer supported. Remove the gpio driver too. Signed-off-by: Sean Young Acked-by: Bartosz Golaszewski --- drivers/gpio/Kconfig | 9 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-ts5500.c | 446 ------------------------------------- 3 files changed, 456 deletions(-) delete mode 100644 drivers/gpio/gpio-ts5500.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 020e51e30317..359a21cb093e 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -1093,15 +1093,6 @@ config GPIO_SCH311X To compile this driver as a module, choose M here: the module will be called gpio-sch311x. =20 -config GPIO_TS5500 - tristate "TS-5500 DIO blocks and compatibles" - depends on TS5500 || COMPILE_TEST - help - This driver supports Digital I/O exposed by pin blocks found on some - Technologic Systems platforms. It includes, but is not limited to, 3 - blocks of the TS-5500: DIO1, DIO2 and the LCD port, and the TS-5600 - LCD port. - config GPIO_WINBOND tristate "Winbond Super I/O GPIO support" select ISA_BUS_API diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index b267598b517d..dc9d1106e75f 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -194,7 +194,6 @@ obj-$(CONFIG_GPIO_TPS68470) +=3D gpio-tps68470.o obj-$(CONFIG_GPIO_TQMX86) +=3D gpio-tqmx86.o obj-$(CONFIG_GPIO_TS4800) +=3D gpio-ts4800.o obj-$(CONFIG_GPIO_TS4900) +=3D gpio-ts4900.o -obj-$(CONFIG_GPIO_TS5500) +=3D gpio-ts5500.o obj-$(CONFIG_GPIO_TWL4030) +=3D gpio-twl4030.o obj-$(CONFIG_GPIO_TWL6040) +=3D gpio-twl6040.o obj-$(CONFIG_GPIO_UNIPHIER) +=3D gpio-uniphier.o diff --git a/drivers/gpio/gpio-ts5500.c b/drivers/gpio/gpio-ts5500.c deleted file mode 100644 index 3c7f2efe10fd..000000000000 --- a/drivers/gpio/gpio-ts5500.c +++ /dev/null @@ -1,446 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Digital I/O driver for Technologic Systems TS-5500 - * - * Copyright (c) 2012 Savoir-faire Linux Inc. - * Vivien Didelot - * - * Technologic Systems platforms have pin blocks, exposing several Digital - * Input/Output lines (DIO). This driver aims to support single pin blocks. - * In that sense, the support is not limited to the TS-5500 blocks. - * Actually, the following platforms have DIO support: - * - * TS-5500: - * Documentation: https://docs.embeddedts.com/TS-5500 - * Blocks: DIO1, DIO2 and LCD port. - * - * TS-5600: - * Documentation: https://docs.embeddedts.com/TS-5600 - * Blocks: LCD port (identical to TS-5500 LCD). - */ - -#include -#include -#include -#include -#include -#include - -/* List of supported Technologic Systems platforms DIO blocks */ -enum ts5500_blocks { TS5500_DIO1, TS5500_DIO2, TS5500_LCD, TS5600_LCD }; - -struct ts5500_priv { - const struct ts5500_dio *pinout; - struct gpio_chip gpio_chip; - spinlock_t lock; - bool strap; - u8 hwirq; -}; - -/* - * Hex 7D is used to control several blocks (e.g. DIO2 and LCD port). - * This flag ensures that the region has been requested by this driver. - */ -static bool hex7d_reserved; - -/* - * This structure is used to describe capabilities of DIO lines, - * such as available directions and connected interrupt (if any). - */ -struct ts5500_dio { - const u8 value_addr; - const u8 value_mask; - const u8 control_addr; - const u8 control_mask; - const bool no_input; - const bool no_output; - const u8 irq; -}; - -#define TS5500_DIO_IN_OUT(vaddr, vbit, caddr, cbit) \ - { \ - .value_addr =3D vaddr, \ - .value_mask =3D BIT(vbit), \ - .control_addr =3D caddr, \ - .control_mask =3D BIT(cbit), \ - } - -#define TS5500_DIO_IN(addr, bit) \ - { \ - .value_addr =3D addr, \ - .value_mask =3D BIT(bit), \ - .no_output =3D true, \ - } - -#define TS5500_DIO_IN_IRQ(addr, bit, _irq) \ - { \ - .value_addr =3D addr, \ - .value_mask =3D BIT(bit), \ - .no_output =3D true, \ - .irq =3D _irq, \ - } - -#define TS5500_DIO_OUT(addr, bit) \ - { \ - .value_addr =3D addr, \ - .value_mask =3D BIT(bit), \ - .no_input =3D true, \ - } - -/* - * Input/Output DIO lines are programmed in groups of 4. Their values are - * available through 4 consecutive bits in a value port, whereas the direc= tion - * of these 4 lines is driven by only 1 bit in a control port. - */ -#define TS5500_DIO_GROUP(vaddr, vbitfrom, caddr, cbit) \ - TS5500_DIO_IN_OUT(vaddr, vbitfrom + 0, caddr, cbit), \ - TS5500_DIO_IN_OUT(vaddr, vbitfrom + 1, caddr, cbit), \ - TS5500_DIO_IN_OUT(vaddr, vbitfrom + 2, caddr, cbit), \ - TS5500_DIO_IN_OUT(vaddr, vbitfrom + 3, caddr, cbit) - -/* - * TS-5500 DIO1 block - * - * value control dir hw - * addr bit addr bit in out irq name pin offset - * - * 0x7b 0 0x7a 0 x x DIO1_0 1 0 - * 0x7b 1 0x7a 0 x x DIO1_1 3 1 - * 0x7b 2 0x7a 0 x x DIO1_2 5 2 - * 0x7b 3 0x7a 0 x x DIO1_3 7 3 - * 0x7b 4 0x7a 1 x x DIO1_4 9 4 - * 0x7b 5 0x7a 1 x x DIO1_5 11 5 - * 0x7b 6 0x7a 1 x x DIO1_6 13 6 - * 0x7b 7 0x7a 1 x x DIO1_7 15 7 - * 0x7c 0 0x7a 5 x x DIO1_8 4 8 - * 0x7c 1 0x7a 5 x x DIO1_9 6 9 - * 0x7c 2 0x7a 5 x x DIO1_10 8 10 - * 0x7c 3 0x7a 5 x x DIO1_11 10 11 - * 0x7c 4 x DIO1_12 12 12 - * 0x7c 5 x 7 DIO1_13 14 13 - */ -static const struct ts5500_dio ts5500_dio1[] =3D { - TS5500_DIO_GROUP(0x7b, 0, 0x7a, 0), - TS5500_DIO_GROUP(0x7b, 4, 0x7a, 1), - TS5500_DIO_GROUP(0x7c, 0, 0x7a, 5), - TS5500_DIO_IN(0x7c, 4), - TS5500_DIO_IN_IRQ(0x7c, 5, 7), -}; - -/* - * TS-5500 DIO2 block - * - * value control dir hw - * addr bit addr bit in out irq name pin offset - * - * 0x7e 0 0x7d 0 x x DIO2_0 1 0 - * 0x7e 1 0x7d 0 x x DIO2_1 3 1 - * 0x7e 2 0x7d 0 x x DIO2_2 5 2 - * 0x7e 3 0x7d 0 x x DIO2_3 7 3 - * 0x7e 4 0x7d 1 x x DIO2_4 9 4 - * 0x7e 5 0x7d 1 x x DIO2_5 11 5 - * 0x7e 6 0x7d 1 x x DIO2_6 13 6 - * 0x7e 7 0x7d 1 x x DIO2_7 15 7 - * 0x7f 0 0x7d 5 x x DIO2_8 4 8 - * 0x7f 1 0x7d 5 x x DIO2_9 6 9 - * 0x7f 2 0x7d 5 x x DIO2_10 8 10 - * 0x7f 3 0x7d 5 x x DIO2_11 10 11 - * 0x7f 4 x 6 DIO2_13 14 12 - */ -static const struct ts5500_dio ts5500_dio2[] =3D { - TS5500_DIO_GROUP(0x7e, 0, 0x7d, 0), - TS5500_DIO_GROUP(0x7e, 4, 0x7d, 1), - TS5500_DIO_GROUP(0x7f, 0, 0x7d, 5), - TS5500_DIO_IN_IRQ(0x7f, 4, 6), -}; - -/* - * TS-5500 LCD port used as DIO block - * TS-5600 LCD port is identical - * - * value control dir hw - * addr bit addr bit in out irq name pin offset - * - * 0x72 0 0x7d 2 x x LCD_0 8 0 - * 0x72 1 0x7d 2 x x LCD_1 7 1 - * 0x72 2 0x7d 2 x x LCD_2 10 2 - * 0x72 3 0x7d 2 x x LCD_3 9 3 - * 0x72 4 0x7d 3 x x LCD_4 12 4 - * 0x72 5 0x7d 3 x x LCD_5 11 5 - * 0x72 6 0x7d 3 x x LCD_6 14 6 - * 0x72 7 0x7d 3 x x LCD_7 13 7 - * 0x73 0 x LCD_EN 5 8 - * 0x73 6 x LCD_WR 6 9 - * 0x73 7 x 1 LCD_RS 3 10 - */ -static const struct ts5500_dio ts5500_lcd[] =3D { - TS5500_DIO_GROUP(0x72, 0, 0x7d, 2), - TS5500_DIO_GROUP(0x72, 4, 0x7d, 3), - TS5500_DIO_OUT(0x73, 0), - TS5500_DIO_IN(0x73, 6), - TS5500_DIO_IN_IRQ(0x73, 7, 1), -}; - -static inline void ts5500_set_mask(u8 mask, u8 addr) -{ - u8 val =3D inb(addr); - val |=3D mask; - outb(val, addr); -} - -static inline void ts5500_clear_mask(u8 mask, u8 addr) -{ - u8 val =3D inb(addr); - val &=3D ~mask; - outb(val, addr); -} - -static int ts5500_gpio_input(struct gpio_chip *chip, unsigned offset) -{ - struct ts5500_priv *priv =3D gpiochip_get_data(chip); - const struct ts5500_dio line =3D priv->pinout[offset]; - unsigned long flags; - - if (line.no_input) - return -ENXIO; - - if (line.no_output) - return 0; - - spin_lock_irqsave(&priv->lock, flags); - ts5500_clear_mask(line.control_mask, line.control_addr); - spin_unlock_irqrestore(&priv->lock, flags); - - return 0; -} - -static int ts5500_gpio_get(struct gpio_chip *chip, unsigned offset) -{ - struct ts5500_priv *priv =3D gpiochip_get_data(chip); - const struct ts5500_dio line =3D priv->pinout[offset]; - - return !!(inb(line.value_addr) & line.value_mask); -} - -static int ts5500_gpio_output(struct gpio_chip *chip, unsigned offset, int= val) -{ - struct ts5500_priv *priv =3D gpiochip_get_data(chip); - const struct ts5500_dio line =3D priv->pinout[offset]; - unsigned long flags; - - if (line.no_output) - return -ENXIO; - - spin_lock_irqsave(&priv->lock, flags); - if (!line.no_input) - ts5500_set_mask(line.control_mask, line.control_addr); - - if (val) - ts5500_set_mask(line.value_mask, line.value_addr); - else - ts5500_clear_mask(line.value_mask, line.value_addr); - spin_unlock_irqrestore(&priv->lock, flags); - - return 0; -} - -static int ts5500_gpio_set(struct gpio_chip *chip, unsigned offset, int va= l) -{ - struct ts5500_priv *priv =3D gpiochip_get_data(chip); - const struct ts5500_dio line =3D priv->pinout[offset]; - unsigned long flags; - - spin_lock_irqsave(&priv->lock, flags); - if (val) - ts5500_set_mask(line.value_mask, line.value_addr); - else - ts5500_clear_mask(line.value_mask, line.value_addr); - spin_unlock_irqrestore(&priv->lock, flags); - - return 0; -} - -static int ts5500_gpio_to_irq(struct gpio_chip *chip, unsigned offset) -{ - struct ts5500_priv *priv =3D gpiochip_get_data(chip); - const struct ts5500_dio *block =3D priv->pinout; - const struct ts5500_dio line =3D block[offset]; - - /* Only one pin is connected to an interrupt */ - if (line.irq) - return line.irq; - - /* As this pin is input-only, we may strap it to another in/out pin */ - if (priv->strap) - return priv->hwirq; - - return -ENXIO; -} - -static int ts5500_enable_irq(struct ts5500_priv *priv) -{ - int ret =3D 0; - unsigned long flags; - - spin_lock_irqsave(&priv->lock, flags); - if (priv->hwirq =3D=3D 7) - ts5500_set_mask(BIT(7), 0x7a); /* DIO1_13 on IRQ7 */ - else if (priv->hwirq =3D=3D 6) - ts5500_set_mask(BIT(7), 0x7d); /* DIO2_13 on IRQ6 */ - else if (priv->hwirq =3D=3D 1) - ts5500_set_mask(BIT(6), 0x7d); /* LCD_RS on IRQ1 */ - else - ret =3D -EINVAL; - spin_unlock_irqrestore(&priv->lock, flags); - - return ret; -} - -static void ts5500_disable_irq(struct ts5500_priv *priv) -{ - unsigned long flags; - - spin_lock_irqsave(&priv->lock, flags); - if (priv->hwirq =3D=3D 7) - ts5500_clear_mask(BIT(7), 0x7a); /* DIO1_13 on IRQ7 */ - else if (priv->hwirq =3D=3D 6) - ts5500_clear_mask(BIT(7), 0x7d); /* DIO2_13 on IRQ6 */ - else if (priv->hwirq =3D=3D 1) - ts5500_clear_mask(BIT(6), 0x7d); /* LCD_RS on IRQ1 */ - else - dev_err(priv->gpio_chip.parent, "invalid hwirq %d\n", - priv->hwirq); - spin_unlock_irqrestore(&priv->lock, flags); -} - -static int ts5500_dio_probe(struct platform_device *pdev) -{ - enum ts5500_blocks block =3D platform_get_device_id(pdev)->driver_data; - struct device *dev =3D &pdev->dev; - const char *name =3D dev_name(dev); - struct ts5500_priv *priv; - unsigned long flags; - int ret; - - ret =3D platform_get_irq(pdev, 0); - if (ret < 0) - return ret; - - priv =3D devm_kzalloc(dev, sizeof(struct ts5500_priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; - - platform_set_drvdata(pdev, priv); - priv->hwirq =3D ret; - spin_lock_init(&priv->lock); - - priv->gpio_chip.owner =3D THIS_MODULE; - priv->gpio_chip.label =3D name; - priv->gpio_chip.parent =3D dev; - priv->gpio_chip.direction_input =3D ts5500_gpio_input; - priv->gpio_chip.direction_output =3D ts5500_gpio_output; - priv->gpio_chip.get =3D ts5500_gpio_get; - priv->gpio_chip.set =3D ts5500_gpio_set; - priv->gpio_chip.to_irq =3D ts5500_gpio_to_irq; - priv->gpio_chip.base =3D -1; - - switch (block) { - case TS5500_DIO1: - priv->pinout =3D ts5500_dio1; - priv->gpio_chip.ngpio =3D ARRAY_SIZE(ts5500_dio1); - - if (!devm_request_region(dev, 0x7a, 3, name)) { - dev_err(dev, "failed to request %s ports\n", name); - return -EBUSY; - } - break; - case TS5500_DIO2: - priv->pinout =3D ts5500_dio2; - priv->gpio_chip.ngpio =3D ARRAY_SIZE(ts5500_dio2); - - if (!devm_request_region(dev, 0x7e, 2, name)) { - dev_err(dev, "failed to request %s ports\n", name); - return -EBUSY; - } - - if (hex7d_reserved) - break; - - if (!devm_request_region(dev, 0x7d, 1, name)) { - dev_err(dev, "failed to request %s 7D\n", name); - return -EBUSY; - } - - hex7d_reserved =3D true; - break; - case TS5500_LCD: - case TS5600_LCD: - priv->pinout =3D ts5500_lcd; - priv->gpio_chip.ngpio =3D ARRAY_SIZE(ts5500_lcd); - - if (!devm_request_region(dev, 0x72, 2, name)) { - dev_err(dev, "failed to request %s ports\n", name); - return -EBUSY; - } - - if (!hex7d_reserved) { - if (!devm_request_region(dev, 0x7d, 1, name)) { - dev_err(dev, "failed to request %s 7D\n", name); - return -EBUSY; - } - - hex7d_reserved =3D true; - } - - /* Ensure usage of LCD port as DIO */ - spin_lock_irqsave(&priv->lock, flags); - ts5500_clear_mask(BIT(4), 0x7d); - spin_unlock_irqrestore(&priv->lock, flags); - break; - } - - ret =3D devm_gpiochip_add_data(dev, &priv->gpio_chip, priv); - if (ret) { - dev_err(dev, "failed to register the gpio chip\n"); - return ret; - } - - ret =3D ts5500_enable_irq(priv); - if (ret) { - dev_err(dev, "invalid interrupt %d\n", priv->hwirq); - return ret; - } - - return 0; -} - -static void ts5500_dio_remove(struct platform_device *pdev) -{ - struct ts5500_priv *priv =3D platform_get_drvdata(pdev); - - ts5500_disable_irq(priv); -} - -static const struct platform_device_id ts5500_dio_ids[] =3D { - { "ts5500-dio1", TS5500_DIO1 }, - { "ts5500-dio2", TS5500_DIO2 }, - { "ts5500-dio-lcd", TS5500_LCD }, - { "ts5600-dio-lcd", TS5600_LCD }, - { } -}; -MODULE_DEVICE_TABLE(platform, ts5500_dio_ids); - -static struct platform_driver ts5500_dio_driver =3D { - .driver =3D { - .name =3D "ts5500-dio", - }, - .probe =3D ts5500_dio_probe, - .remove =3D ts5500_dio_remove, - .id_table =3D ts5500_dio_ids, -}; - -module_platform_driver(ts5500_dio_driver); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Savoir-faire Linux Inc. "); -MODULE_DESCRIPTION("Technologic Systems TS-5500 Digital I/O driver"); --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 14CB6481672; Wed, 6 May 2026 14:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078611; cv=none; b=TFXDPHlwbIs/0iAkD+Ali1nsylNai2S5BcaSpjl9bqE4zhgbqKCd1EDEky4UMOwX/Od2q+xAF/L9m6ljVejtg9pLpp8cnzS1TtCHaMOvXvtebw/OIvAPkdtSqDFWUJplt+faZ0AZov+yFQbNJaWo5NuHkWz2aHlzrifEAwFF3f0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078611; c=relaxed/simple; bh=6d9F+pJci21rx/PgvsDV0n4eVOiHg0n3rX/welKGutg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SRGt3Lo0CB6kZfl0yZ7TkLw1XQjONSkdsXoBEyMajkWQ78seziRaFlAz+Ipur9mnSibfeS/EF8bYW/BAnFkJM8pfOKkMBEaTCKyPrSBNSJMDU5/4suTb+NU1mU18M71vvcX1zk/uUYszps45BqnNlkmPDEHA0nT+XKkVYGqniJ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=c+WEFXxj; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=HQrfukeb; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="c+WEFXxj"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="HQrfukeb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078607; bh=6d9F+pJci21rx/PgvsDV0n4eVOiHg0n3rX/welKGutg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c+WEFXxjFy1t52H+xSgoZKl8Ry4UzrjgXnVtXD0z+8VAmPi+QSchclZzuJWPvt74h 2tGG8KI9/I2o4NzhB607MV9B3RNpxz/nggMVT2wqoupOAPBUaN3eLRcr0Qz+3Hdjqr RLpC7TKakItV34DgST8gWZKW/zAyJ6Q0RzkC8qCEM8hi829vQbUegpJ9O1vUP1jMIO IIp0TULsxUZEvPeP9jRv98aapmqB0vS2roI5qL1bziRMKSZeRqF/uFGYTi7U8C1I9g 6Ox+YVCYg3uHyW4qRW/aVIrZArVENBqdZ2s0Z4iANT7K10i5z7vhSJmBh72Xo7Uyql Ka1xOEYnmOYvQ== Received: by extorris.mess.org (Postfix, from userid 1004) id EAD6A41CDE; Wed, 06 May 2026 15:43:27 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078591; bh=6d9F+pJci21rx/PgvsDV0n4eVOiHg0n3rX/welKGutg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HQrfukeb0e+hloXa9AS8KjoT8CbZANeOZzDvoTBnBObeKuOznToRgR9mnHdam2dzi IoRIsKLuVIHwwQdQbJj5MbZGE/9YMGHpJnYP4MRVhxT5Ka+1Cgv21r4WpJ2gXpJRU9 VXXgufKSE+rLGpcYVaqzpMFVLVyLvIUb2wnQtRQeyOOIjU+8bY5vKXZOPCI5NZqpVx Q0RYouIirhqwAy2jUiuagL//AviXvFnF3UZpB+8Jr8QHNpjRz2ag1O3Kw9W4aRITqW FtswzzQiCy0zmXTHioUmbhZkUT46uQYPQ2tdvCgNMgkcIlzSpmPvpPa2t0ZGwid4dk NoS4018ioNyOw== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id A1BE040154; Wed, 06 May 2026 15:43:11 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, Wim Van Sebroeck , Guenter Roeck , Jonathan Corbet , Shuah Khan Cc: linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 6/8] watchdog: sc520: Drop AMD Elan SC520 support Date: Wed, 6 May 2026 15:42:51 +0100 Message-ID: <59c97749c14a4ad1039bb9cc920cf32babb9d6f7.1778071745.git.sean@mess.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), this board is no longer supported. Remove the watchdog too. Signed-off-by: Sean Young --- .../watchdog/watchdog-parameters.rst | 9 - drivers/watchdog/Kconfig | 13 - drivers/watchdog/Makefile | 1 - drivers/watchdog/sc520_wdt.c | 430 ------------------ 4 files changed, 453 deletions(-) delete mode 100644 drivers/watchdog/sc520_wdt.c diff --git a/Documentation/watchdog/watchdog-parameters.rst b/Documentation= /watchdog/watchdog-parameters.rst index 773241ed9986..638b972e0b16 100644 --- a/Documentation/watchdog/watchdog-parameters.rst +++ b/Documentation/watchdog/watchdog-parameters.rst @@ -532,15 +532,6 @@ sc1200wdt: =20 ------------------------------------------------- =20 -sc520_wdt: - timeout: - Watchdog timeout in seconds. (1 <=3D timeout <=3D 3600, default=3D30) - nowayout: - Watchdog cannot be stopped once started - (default=3Dkernel config parameter) - -------------------------------------------------- - sch311x_wdt: force_id: Override the detected device ID diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index dc78729ba2a5..4e36e4b5bf39 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -1270,19 +1270,6 @@ config GEODE_WDT You can compile this driver directly into the kernel, or use it as a module. The module will be called geodewdt. =20 -config SC520_WDT - tristate "AMD Elan SC520 processor Watchdog" - depends on MELAN || COMPILE_TEST - help - This is the driver for the hardware watchdog built in to the - AMD "Elan" SC520 microcomputer commonly used in embedded systems. - This watchdog simply watches your kernel to make sure it doesn't - freeze, and if it does, it reboots your computer after a certain - amount of time. - - You can compile this driver directly into the kernel, or use - it as a module. The module will be called sc520_wdt. - config SBC_FITPC2_WATCHDOG tristate "Compulab SBC-FITPC2 watchdog" depends on (X86 || COMPILE_TEST) && HAS_IOPORT diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index d2fb16b9f9ce..1daeab5b2473 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -116,7 +116,6 @@ obj-$(CONFIG_EXAR_WDT) +=3D exar_wdt.o obj-$(CONFIG_F71808E_WDT) +=3D f71808e_wdt.o obj-$(CONFIG_SP5100_TCO) +=3D sp5100_tco.o obj-$(CONFIG_GEODE_WDT) +=3D geodewdt.o -obj-$(CONFIG_SC520_WDT) +=3D sc520_wdt.o obj-$(CONFIG_SBC_FITPC2_WATCHDOG) +=3D sbc_fitpc2_wdt.o obj-$(CONFIG_EUROTECH_WDT) +=3D eurotechwdt.o obj-$(CONFIG_IB700_WDT) +=3D ib700wdt.o diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c deleted file mode 100644 index 005f62e4a4fb..000000000000 --- a/drivers/watchdog/sc520_wdt.c +++ /dev/null @@ -1,430 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * AMD Elan SC520 processor Watchdog Timer driver - * - * Based on acquirewdt.c by Alan Cox, - * and sbc60xxwdt.c by Jakob Oestergaard - * - * The authors do NOT admit liability nor provide warranty for - * any of this software. This material is provided "AS-IS" in - * the hope that it may be useful for others. - * - * (c) Copyright 2001 Scott Jennings - * 9/27 - 2001 [Initial release] - * - * Additional fixes Alan Cox - * - Fixed formatting - * - Removed debug printks - * - Fixed SMP built kernel deadlock - * - Switched to private locks not lock_kernel - * - Used ioremap/writew/readw - * - Added NOWAYOUT support - * 4/12 - 2002 Changes by Rob Radez - * - Change comments - * - Eliminate fop_llseek - * - Change CONFIG_WATCHDOG_NOWAYOUT semantics - * - Add KERN_* tags to printks - * - fix possible wdt_is_open race - * - Report proper capabilities in watchdog_info - * - Add WDIOC_{GETSTATUS, GETBOOTSTATUS, SETTIMEOUT, - * GETTIMEOUT, SETOPTIONS} ioctls - * 09/8 - 2003 Changes by Wim Van Sebroeck - * - cleanup of trailing spaces - * - added extra printk's for startup problems - * - use module_param - * - made timeout (the emulated heartbeat) a module_param - * - made the keepalive ping an internal subroutine - * 3/27 - 2004 Changes by Sean Young - * - set MMCR_BASE to 0xfffef000 - * - CBAR does not need to be read - * - removed debugging printks - * - * This WDT driver is different from most other Linux WDT - * drivers in that the driver will ping the watchdog by itself, - * because this particular WDT has a very short timeout (1.6 - * seconds) and it would be insane to count on any userspace - * daemon always getting scheduled within that time frame. - * - * This driver uses memory mapped IO, and spinlock. - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* - * The AMD Elan SC520 timeout value is 492us times a power of 2 (0-7) - * - * 0: 492us 2: 1.01s 4: 4.03s 6: 16.22s - * 1: 503ms 3: 2.01s 5: 8.05s 7: 32.21s - * - * We will program the SC520 watchdog for a timeout of 2.01s. - * If we reset the watchdog every ~250ms we should be safe. - */ - -#define WDT_INTERVAL (HZ/4+1) - -/* - * We must not require too good response from the userspace daemon. - * Here we require the userspace daemon to send us a heartbeat - * char to /dev/watchdog every 30 seconds. - */ - -#define WATCHDOG_TIMEOUT 30 /* 30 sec default timeout */ -/* in seconds, will be multiplied by HZ to get seconds to wait for a ping = */ -static int timeout =3D WATCHDOG_TIMEOUT; -module_param(timeout, int, 0); -MODULE_PARM_DESC(timeout, - "Watchdog timeout in seconds. (1 <=3D timeout <=3D 3600, default=3D" - __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); - -static bool nowayout =3D WATCHDOG_NOWAYOUT; -module_param(nowayout, bool, 0); -MODULE_PARM_DESC(nowayout, - "Watchdog cannot be stopped once started (default=3D" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); - -/* - * AMD Elan SC520 - Watchdog Timer Registers - */ -#define MMCR_BASE 0xfffef000 /* The default base address */ -#define OFFS_WDTMRCTL 0xCB0 /* Watchdog Timer Control Register */ - -/* WDT Control Register bit definitions */ -#define WDT_EXP_SEL_01 0x0001 /* [01] Time-out =3D 496 us (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_02 0x0002 /* [02] Time-out =3D 508 ms (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_03 0x0004 /* [03] Time-out =3D 1.02 s (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_04 0x0008 /* [04] Time-out =3D 2.03 s (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_05 0x0010 /* [05] Time-out =3D 4.07 s (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_06 0x0020 /* [06] Time-out =3D 8.13 s (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_07 0x0040 /* [07] Time-out =3D 16.27s (with 33 Mhz clk= ). */ -#define WDT_EXP_SEL_08 0x0080 /* [08] Time-out =3D 32.54s (with 33 Mhz clk= ). */ -#define WDT_IRQ_FLG 0x1000 /* [12] Interrupt Request Flag */ -#define WDT_WRST_ENB 0x4000 /* [14] Watchdog Timer Reset Enable */ -#define WDT_ENB 0x8000 /* [15] Watchdog Timer Enable */ - -static __u16 __iomem *wdtmrctl; - -static void wdt_timer_ping(struct timer_list *); -static DEFINE_TIMER(timer, wdt_timer_ping); -static unsigned long next_heartbeat; -static unsigned long wdt_is_open; -static char wdt_expect_close; -static DEFINE_SPINLOCK(wdt_spinlock); - -/* - * Whack the dog - */ - -static void wdt_timer_ping(struct timer_list *unused) -{ - /* If we got a heartbeat pulse within the WDT_US_INTERVAL - * we agree to ping the WDT - */ - if (time_before(jiffies, next_heartbeat)) { - /* Ping the WDT */ - spin_lock(&wdt_spinlock); - writew(0xAAAA, wdtmrctl); - writew(0x5555, wdtmrctl); - spin_unlock(&wdt_spinlock); - - /* Re-set the timer interval */ - mod_timer(&timer, jiffies + WDT_INTERVAL); - } else - pr_warn("Heartbeat lost! Will not ping the watchdog\n"); -} - -/* - * Utility routines - */ - -static void wdt_config(int writeval) -{ - unsigned long flags; - - /* buy some time (ping) */ - spin_lock_irqsave(&wdt_spinlock, flags); - readw(wdtmrctl); /* ensure write synchronization */ - writew(0xAAAA, wdtmrctl); - writew(0x5555, wdtmrctl); - /* unlock WDT =3D make WDT configuration register writable one time */ - writew(0x3333, wdtmrctl); - writew(0xCCCC, wdtmrctl); - /* write WDT configuration register */ - writew(writeval, wdtmrctl); - spin_unlock_irqrestore(&wdt_spinlock, flags); -} - -static int wdt_startup(void) -{ - next_heartbeat =3D jiffies + (timeout * HZ); - - /* Start the timer */ - mod_timer(&timer, jiffies + WDT_INTERVAL); - - /* Start the watchdog */ - wdt_config(WDT_ENB | WDT_WRST_ENB | WDT_EXP_SEL_04); - - pr_info("Watchdog timer is now enabled\n"); - return 0; -} - -static int wdt_turnoff(void) -{ - /* Stop the timer */ - timer_delete_sync(&timer); - - /* Stop the watchdog */ - wdt_config(0); - - pr_info("Watchdog timer is now disabled...\n"); - return 0; -} - -static int wdt_keepalive(void) -{ - /* user land ping */ - next_heartbeat =3D jiffies + (timeout * HZ); - return 0; -} - -static int wdt_set_heartbeat(int t) -{ - if ((t < 1) || (t > 3600)) /* arbitrary upper limit */ - return -EINVAL; - - timeout =3D t; - return 0; -} - -/* - * /dev/watchdog handling - */ - -static ssize_t fop_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) -{ - /* See if we got the magic character 'V' and reload the timer */ - if (count) { - if (!nowayout) { - size_t ofs; - - /* note: just in case someone wrote the magic character - * five months ago... */ - wdt_expect_close =3D 0; - - /* now scan */ - for (ofs =3D 0; ofs !=3D count; ofs++) { - char c; - if (get_user(c, buf + ofs)) - return -EFAULT; - if (c =3D=3D 'V') - wdt_expect_close =3D 42; - } - } - - /* Well, anyhow someone wrote to us, we should - return that favour */ - wdt_keepalive(); - } - return count; -} - -static int fop_open(struct inode *inode, struct file *file) -{ - /* Just in case we're already talking to someone... */ - if (test_and_set_bit(0, &wdt_is_open)) - return -EBUSY; - if (nowayout) - __module_get(THIS_MODULE); - - /* Good, fire up the show */ - wdt_startup(); - return stream_open(inode, file); -} - -static int fop_close(struct inode *inode, struct file *file) -{ - if (wdt_expect_close =3D=3D 42) - wdt_turnoff(); - else { - pr_crit("Unexpected close, not stopping watchdog!\n"); - wdt_keepalive(); - } - clear_bit(0, &wdt_is_open); - wdt_expect_close =3D 0; - return 0; -} - -static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long a= rg) -{ - void __user *argp =3D (void __user *)arg; - int __user *p =3D argp; - static const struct watchdog_info ident =3D { - .options =3D WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT - | WDIOF_MAGICCLOSE, - .firmware_version =3D 1, - .identity =3D "SC520", - }; - - switch (cmd) { - case WDIOC_GETSUPPORT: - return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; - case WDIOC_GETSTATUS: - case WDIOC_GETBOOTSTATUS: - return put_user(0, p); - case WDIOC_SETOPTIONS: - { - int new_options, retval =3D -EINVAL; - - if (get_user(new_options, p)) - return -EFAULT; - - if (new_options & WDIOS_DISABLECARD) { - wdt_turnoff(); - retval =3D 0; - } - - if (new_options & WDIOS_ENABLECARD) { - wdt_startup(); - retval =3D 0; - } - - return retval; - } - case WDIOC_KEEPALIVE: - wdt_keepalive(); - return 0; - case WDIOC_SETTIMEOUT: - { - int new_timeout; - - if (get_user(new_timeout, p)) - return -EFAULT; - - if (wdt_set_heartbeat(new_timeout)) - return -EINVAL; - - wdt_keepalive(); - } - fallthrough; - case WDIOC_GETTIMEOUT: - return put_user(timeout, p); - default: - return -ENOTTY; - } -} - -static const struct file_operations wdt_fops =3D { - .owner =3D THIS_MODULE, - .write =3D fop_write, - .open =3D fop_open, - .release =3D fop_close, - .unlocked_ioctl =3D fop_ioctl, - .compat_ioctl =3D compat_ptr_ioctl, -}; - -static struct miscdevice wdt_miscdev =3D { - .minor =3D WATCHDOG_MINOR, - .name =3D "watchdog", - .fops =3D &wdt_fops, -}; - -/* - * Notifier for system down - */ - -static int wdt_notify_sys(struct notifier_block *this, unsigned long code, - void *unused) -{ - if (code =3D=3D SYS_DOWN || code =3D=3D SYS_HALT) - wdt_turnoff(); - return NOTIFY_DONE; -} - -/* - * The WDT needs to learn about soft shutdowns in order to - * turn the timebomb registers off. - */ - -static struct notifier_block wdt_notifier =3D { - .notifier_call =3D wdt_notify_sys, -}; - -static void __exit sc520_wdt_unload(void) -{ - if (!nowayout) - wdt_turnoff(); - - /* Deregister */ - misc_deregister(&wdt_miscdev); - unregister_reboot_notifier(&wdt_notifier); - iounmap(wdtmrctl); -} - -static int __init sc520_wdt_init(void) -{ - int rc =3D -EBUSY; - - /* Check that the timeout value is within it's range ; - if not reset to the default */ - if (wdt_set_heartbeat(timeout)) { - wdt_set_heartbeat(WATCHDOG_TIMEOUT); - pr_info("timeout value must be 1 <=3D timeout <=3D 3600, using %d\n", - WATCHDOG_TIMEOUT); - } - - wdtmrctl =3D ioremap(MMCR_BASE + OFFS_WDTMRCTL, 2); - if (!wdtmrctl) { - pr_err("Unable to remap memory\n"); - rc =3D -ENOMEM; - goto err_out_region2; - } - - rc =3D register_reboot_notifier(&wdt_notifier); - if (rc) { - pr_err("cannot register reboot notifier (err=3D%d)\n", rc); - goto err_out_ioremap; - } - - rc =3D misc_register(&wdt_miscdev); - if (rc) { - pr_err("cannot register miscdev on minor=3D%d (err=3D%d)\n", - WATCHDOG_MINOR, rc); - goto err_out_notifier; - } - - pr_info("WDT driver for SC520 initialised. timeout=3D%d sec (nowayout=3D%= d)\n", - timeout, nowayout); - - return 0; - -err_out_notifier: - unregister_reboot_notifier(&wdt_notifier); -err_out_ioremap: - iounmap(wdtmrctl); -err_out_region2: - return rc; -} - -module_init(sc520_wdt_init); -module_exit(sc520_wdt_unload); - -MODULE_AUTHOR("Scott and Bill Jennings"); -MODULE_DESCRIPTION( - "Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor"); -MODULE_LICENSE("GPL"); --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 C383E481FCA; Wed, 6 May 2026 14:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078611; cv=none; b=JwIlrhjPsiA3jlWKHxmKFrulbMGVrxIaCjDk0O8U04VgPrL6Cq3SVCUIRvteCEzyGdjmszA+frIRJG+YYOAom0X9agEtDQKvMHrv5X403B4mVZexsQ/oHG6HaO2dYaCGAScgXUroNeDBTmUjdm9Wu19PSTF+cnd9EZAVsuwXD6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078611; c=relaxed/simple; bh=Ny7nqMN8NxdAkg6MWBl3xuIS09EV4Jp6rIEFDcRJSV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=krI5EP+RiYhSYn/6Onf4REZ7iws4C5/ykD/H+N5tNGjRMrRgRlRJJ8hAVlbSTC4FhP/Pztz636O5MItUcgrcrPtMjIQdKL+0fkOo2ApdiCHxp0yMh8m2lSkF1DVG3JXjTurNutKDFKD5LvkXEPgzJOtO12PtWqcgBtxcAXoyC2I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=KVQSWrZ2; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=Q/xJpGIN; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="KVQSWrZ2"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="Q/xJpGIN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078608; bh=Ny7nqMN8NxdAkg6MWBl3xuIS09EV4Jp6rIEFDcRJSV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KVQSWrZ2ZT0ahZElPyJhfmve9L7mYtNymM9jIxuIXBJOcGoQnL4BHfJ4N7uNfQ9hm I95pe1t9tYixLFMUZzqHNwFf6U0rVCeTR2JDSfoaj97TC8+zyhSTb8hCJ+r2zTpxG4 c+WYnC8kszF6Il1d/p6NSoitg9HKNGqifqvYErT7vab4KQpljL9IGQqk83HgApHV/K +qOMv5+bOIlJhGMJcVjOfEqRciKzL4D0TNm40s3vl7Nva8iY45ypLQ3FDK9o6u7ry9 7eHvcYFk1Cwxij53PvK5TUs3dla2P9anuHcpcEvAhhtiajmNL5z/AuINOMTlVjX7lq q3jid4y3BeK7A== Received: by extorris.mess.org (Postfix, from userid 1004) id 94F7241CE6; Wed, 06 May 2026 15:43:28 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078592; bh=Ny7nqMN8NxdAkg6MWBl3xuIS09EV4Jp6rIEFDcRJSV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q/xJpGINnFJoJi5k/0Nsh3lNKvSppoZhvVKWu7GHbVX6JkdXPfHN4uD4EEnSTQOIJ aFXedWaqKtDgW5MSpUO/BTRzUELJNzoxlQ2GN7RnNFz3waqVgNHHPORVwBxWQ6r8+O p+p3cJoc0D4JUvVqrzsSaL9vbsoJYbkJzG/r4IR9NRKqNp8fjl/R2/GtV8fvmKdz0K TnpQz2oQaIjq7E9kLPlpIk46IforZ8kYsDUXbJufQOTgtZVzTf1Y/FN+Zq+TRkmWvG WDLypgPfYGnef9AFkuadMZjvxIH05Dw6KI2rVK0sabn4qVHMVjmu5JQmtsVMSYsUSr n0bFganxaojpw== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id 780A541CE1; Wed, 06 May 2026 15:43:12 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar Cc: linux-pm@vger.kernel.org Subject: [PATCH 7/8] cpufreq: sc520_freq: Drop support for AMD Elan SC520 Date: Wed, 6 May 2026 15:42:52 +0100 Message-ID: <12a3abd097fda750ae905290c86ddb8d2b0a716c.1778071745.git.sean@mess.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), the AMD Elan SC520 is no longer supported, so the cpu frequency driver is no longer needed. Signed-off-by: Sean Young Acked-by: Viresh Kumar Reviewed-by: Zhongqiu Han --- drivers/cpufreq/Kconfig.x86 | 11 --- drivers/cpufreq/Makefile | 1 - drivers/cpufreq/sc520_freq.c | 136 ----------------------------------- 3 files changed, 148 deletions(-) delete mode 100644 drivers/cpufreq/sc520_freq.c diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86 index 027e6ea2e038..865b290b01ff 100644 --- a/drivers/cpufreq/Kconfig.x86 +++ b/drivers/cpufreq/Kconfig.x86 @@ -141,17 +141,6 @@ config ELAN_CPUFREQ =20 If in doubt, say N. =20 -config SC520_CPUFREQ - tristate "AMD Elan SC520" - depends on MELAN - help - This adds the CPUFreq driver for AMD Elan SC520 processor. - - For details, take a look at . - - If in doubt, say N. - - config X86_POWERNOW_K6 tristate "AMD Mobile K6-2/K6-3 PowerNow!" depends on X86_32 diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 385c9fcc65c6..96196edf79d5 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -41,7 +41,6 @@ obj-$(CONFIG_X86_POWERNOW_K7) +=3D powernow-k7.o obj-$(CONFIG_X86_LONGHAUL) +=3D longhaul.o obj-$(CONFIG_X86_E_POWERSAVER) +=3D e_powersaver.o obj-$(CONFIG_ELAN_CPUFREQ) +=3D elanfreq.o -obj-$(CONFIG_SC520_CPUFREQ) +=3D sc520_freq.o obj-$(CONFIG_X86_LONGRUN) +=3D longrun.o obj-$(CONFIG_X86_GX_SUSPMOD) +=3D gx-suspmod.o obj-$(CONFIG_X86_SPEEDSTEP_ICH) +=3D speedstep-ich.o diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c deleted file mode 100644 index b360f03a116f..000000000000 --- a/drivers/cpufreq/sc520_freq.c +++ /dev/null @@ -1,136 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * sc520_freq.c: cpufreq driver for the AMD Elan sc520 - * - * Copyright (C) 2005 Sean Young - * - * Based on elanfreq.c - * - * 2005-03-30: - initial revision - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define MMCR_BASE 0xfffef000 /* The default base address */ -#define OFFS_CPUCTL 0x2 /* CPU Control Register */ - -static __u8 __iomem *cpuctl; - -static struct cpufreq_frequency_table sc520_freq_table[] =3D { - {0, 0x01, 100000}, - {0, 0x02, 133000}, - {0, 0, CPUFREQ_TABLE_END}, -}; - -static unsigned int sc520_freq_get_cpu_frequency(unsigned int cpu) -{ - u8 clockspeed_reg =3D *cpuctl; - - switch (clockspeed_reg & 0x03) { - default: - pr_err("error: cpuctl register has unexpected value %02x\n", - clockspeed_reg); - fallthrough; - case 0x01: - return 100000; - case 0x02: - return 133000; - } -} - -static int sc520_freq_target(struct cpufreq_policy *policy, unsigned int s= tate) -{ - - u8 clockspeed_reg; - - local_irq_disable(); - - clockspeed_reg =3D *cpuctl & ~0x03; - *cpuctl =3D clockspeed_reg | sc520_freq_table[state].driver_data; - - local_irq_enable(); - - return 0; -} - -/* - * Module init and exit code - */ - -static int sc520_freq_cpu_init(struct cpufreq_policy *policy) -{ - struct cpuinfo_x86 *c =3D &cpu_data(0); - - /* capability check */ - if (c->x86_vendor !=3D X86_VENDOR_AMD || - c->x86 !=3D 4 || c->x86_model !=3D 9) - return -ENODEV; - - /* cpuinfo and default policy values */ - policy->cpuinfo.transition_latency =3D 1000000; /* 1ms */ - policy->freq_table =3D sc520_freq_table; - - return 0; -} - - -static struct cpufreq_driver sc520_freq_driver =3D { - .get =3D sc520_freq_get_cpu_frequency, - .verify =3D cpufreq_generic_frequency_table_verify, - .target_index =3D sc520_freq_target, - .init =3D sc520_freq_cpu_init, - .name =3D "sc520_freq", -}; - -static const struct x86_cpu_id sc520_ids[] =3D { - X86_MATCH_VENDOR_FAM_MODEL(AMD, 4, 9, NULL), - {} -}; -MODULE_DEVICE_TABLE(x86cpu, sc520_ids); - -static int __init sc520_freq_init(void) -{ - int err; - - if (!x86_match_cpu(sc520_ids)) - return -ENODEV; - - cpuctl =3D ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); - if (!cpuctl) { - pr_err("sc520_freq: error: failed to remap memory\n"); - return -ENOMEM; - } - - err =3D cpufreq_register_driver(&sc520_freq_driver); - if (err) - iounmap(cpuctl); - - return err; -} - - -static void __exit sc520_freq_exit(void) -{ - cpufreq_unregister_driver(&sc520_freq_driver); - iounmap(cpuctl); -} - - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Sean Young "); -MODULE_DESCRIPTION("cpufreq driver for AMD's Elan sc520 CPU"); - -module_init(sc520_freq_init); -module_exit(sc520_freq_exit); - --=20 2.54.0 From nobody Sat Jun 13 16:17:31 2026 Received: from extorris.mess.org (extorris.mess.org [92.243.27.206]) (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 1EC2D481A82; Wed, 6 May 2026 14:43:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078612; cv=none; b=aKaaxmK7AVgLAfE5LyUHu+F9hNYmwVMtPUgrjhULWlKj3QIQ2frlDr5flV/+LSioKWR89JiONmo4athv1lNmEVBuRWRNOdR7W58KcZmzSfdLoVyijAbbqJcgdkUFqodO3AbsvfnEV0jnVtve8PmtU4a23qHEjUHEo9JeCTJYW+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778078612; c=relaxed/simple; bh=EJYPNIkU2lkXebQ0MSiT9IqDsI/92zNLVUK1lTMrcfI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kh05wAlhmFkf6vgVsr4Q6Iyay5Dh35lMRwUS5erDbplYrw2wZKbnlF7urs2BAPnL3zqTLGViThQhIBl1nU4TfKD3f4jpsBv39imhR1owUKqlkKXLAujw4UkAdmrtSEGn1gO9lnX1B9PcW49Hk/VGy55oTh2U3g3PzQIyzxJ+TCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=CJiwElLV; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=pSTF0pF4; arc=none smtp.client-ip=92.243.27.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="CJiwElLV"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="pSTF0pF4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078608; bh=EJYPNIkU2lkXebQ0MSiT9IqDsI/92zNLVUK1lTMrcfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CJiwElLVy2HCLb97rLoILHJ1aQz4o5HOp18EZudGsTzL5NWrg7w7o+Pnbm0gcI2uJ io5cBd/VhsOYGUMQ3bLCVSH/Egl8LTQ8jpAHFmVxtnJ//SBlQ2UBjrQUUz801+N7kI 4NaxSTW4HUNDNVoGHRu13ZnYoDgwy8dY6NlljVnxsqJQBgQJvhtXW6OoTR91NfqEw1 NEx9U2sg3qJtVMGcLvW9Ni/qIAPokEuJEacsIQpbnlAqrim6rCqPvATKJ6LtGKxBZP kQVpf2x/AcMtFLYsXdKMAJnxrEyRvXMHuN/ygUDqrvtrbShusd+PRuGDdp3C0fY7Jx JzTDVjMbh5NWw== Received: by extorris.mess.org (Postfix, from userid 1004) id CD90141CE5; Wed, 06 May 2026 15:43:28 +0100 (BST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1778078593; bh=EJYPNIkU2lkXebQ0MSiT9IqDsI/92zNLVUK1lTMrcfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pSTF0pF4k/pAvv2+s9/cOKoI07BLsUPUu4+VPhkqi2sRzLs6y/znVs1++qPBpAtP/ fNE3wzom6gskBHq87MTEOhZq/XmaizCxuFKv5t8HeXiK3gGNb9yHTUbYRyk76Wd9pU P37J0eAcjbRA67cblJ+kprXfmYGQKo9hZ3zKJyGZHUD3N6Y6IIj8VKG20eUaDniYR9 JT+7YDF8sA9EsgAHYWTmvTKS3F1x5M6Un9FW92AIgZ37FLvEFxuTae4jQaXGIlIjcz 9x5WExBJ4gHA/yWOlMFVciE6JWqY0z+qMEwbXwD9z38fq8rN97hUFUBspn3fXrXFyM hznkJDNluTedQ== Received: from maru.local (unknown [140.228.74.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by extorris.mess.org (Postfix) with ESMTPSA id 4924141CE4; Wed, 06 May 2026 15:43:13 +0100 (BST) From: Sean Young To: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar Cc: linux-pm@vger.kernel.org Subject: [PATCH 8/8] cpufreq: elanfreq: Drop support for AMD Elan SC4* Date: Wed, 6 May 2026 15:42:53 +0100 Message-ID: X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"), the AMD Elan SC4* is no longer supported, so the cpu frequency driver is no longer needed. Signed-off-by: Sean Young Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig.x86 | 15 --- drivers/cpufreq/Makefile | 1 - drivers/cpufreq/elanfreq.c | 226 ------------------------------------ 3 files changed, 242 deletions(-) delete mode 100644 drivers/cpufreq/elanfreq.c diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86 index 865b290b01ff..c42dd39e0b2a 100644 --- a/drivers/cpufreq/Kconfig.x86 +++ b/drivers/cpufreq/Kconfig.x86 @@ -126,21 +126,6 @@ config X86_ACPI_CPUFREQ_CPB By enabling this option the acpi_cpufreq driver provides the old entry in addition to the new boost ones, for compatibility reasons. =20 -config ELAN_CPUFREQ - tristate "AMD Elan SC400 and SC410" - depends on MELAN - help - This adds the CPUFreq driver for AMD Elan SC400 and SC410 - processors. - - You need to specify the processor maximum speed as boot - parameter: elanfreq=3Dmaxspeed (in kHz) or as module - parameter "max_freq". - - For details, take a look at . - - If in doubt, say N. - config X86_POWERNOW_K6 tristate "AMD Mobile K6-2/K6-3 PowerNow!" depends on X86_32 diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 96196edf79d5..6c7a39b7f8d2 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -40,7 +40,6 @@ obj-$(CONFIG_X86_POWERNOW_K6) +=3D powernow-k6.o obj-$(CONFIG_X86_POWERNOW_K7) +=3D powernow-k7.o obj-$(CONFIG_X86_LONGHAUL) +=3D longhaul.o obj-$(CONFIG_X86_E_POWERSAVER) +=3D e_powersaver.o -obj-$(CONFIG_ELAN_CPUFREQ) +=3D elanfreq.o obj-$(CONFIG_X86_LONGRUN) +=3D longrun.o obj-$(CONFIG_X86_GX_SUSPMOD) +=3D gx-suspmod.o obj-$(CONFIG_X86_SPEEDSTEP_ICH) +=3D speedstep-ich.o diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c deleted file mode 100644 index fc5a58088b35..000000000000 --- a/drivers/cpufreq/elanfreq.c +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * elanfreq: cpufreq driver for the AMD ELAN family - * - * (c) Copyright 2002 Robert Schwebel - * - * Parts of this code are (c) Sven Geggus - * - * All Rights Reserved. - * - * 2002-02-13: - initial revision for 2.4.18-pre9 by Robert Schwebel - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#define REG_CSCIR 0x22 /* Chip Setup and Control Index Register */ -#define REG_CSCDR 0x23 /* Chip Setup and Control Data Register */ - -/* Module parameter */ -static int max_freq; - -struct s_elan_multiplier { - int clock; /* frequency in kHz */ - int val40h; /* PMU Force Mode register */ - int val80h; /* CPU Clock Speed Register */ -}; - -/* - * It is important that the frequencies - * are listed in ascending order here! - */ -static struct s_elan_multiplier elan_multiplier[] =3D { - {1000, 0x02, 0x18}, - {2000, 0x02, 0x10}, - {4000, 0x02, 0x08}, - {8000, 0x00, 0x00}, - {16000, 0x00, 0x02}, - {33000, 0x00, 0x04}, - {66000, 0x01, 0x04}, - {99000, 0x01, 0x05} -}; - -static struct cpufreq_frequency_table elanfreq_table[] =3D { - {0, 0, 1000}, - {0, 1, 2000}, - {0, 2, 4000}, - {0, 3, 8000}, - {0, 4, 16000}, - {0, 5, 33000}, - {0, 6, 66000}, - {0, 7, 99000}, - {0, 0, CPUFREQ_TABLE_END}, -}; - - -/** - * elanfreq_get_cpu_frequency: determine current cpu speed - * - * Finds out at which frequency the CPU of the Elan SOC runs - * at the moment. Frequencies from 1 to 33 MHz are generated - * the normal way, 66 and 99 MHz are called "Hyperspeed Mode" - * and have the rest of the chip running with 33 MHz. - */ - -static unsigned int elanfreq_get_cpu_frequency(unsigned int cpu) -{ - u8 clockspeed_reg; /* Clock Speed Register */ - - local_irq_disable(); - outb_p(0x80, REG_CSCIR); - clockspeed_reg =3D inb_p(REG_CSCDR); - local_irq_enable(); - - if ((clockspeed_reg & 0xE0) =3D=3D 0xE0) - return 0; - - /* Are we in CPU clock multiplied mode (66/99 MHz)? */ - if ((clockspeed_reg & 0xE0) =3D=3D 0xC0) { - if ((clockspeed_reg & 0x01) =3D=3D 0) - return 66000; - else - return 99000; - } - - /* 33 MHz is not 32 MHz... */ - if ((clockspeed_reg & 0xE0) =3D=3D 0xA0) - return 33000; - - return (1<<((clockspeed_reg & 0xE0) >> 5)) * 1000; -} - - -static int elanfreq_target(struct cpufreq_policy *policy, - unsigned int state) -{ - /* - * Access to the Elan's internal registers is indexed via - * 0x22: Chip Setup & Control Register Index Register (CSCI) - * 0x23: Chip Setup & Control Register Data Register (CSCD) - * - */ - - /* - * 0x40 is the Power Management Unit's Force Mode Register. - * Bit 6 enables Hyperspeed Mode (66/100 MHz core frequency) - */ - - local_irq_disable(); - outb_p(0x40, REG_CSCIR); /* Disable hyperspeed mode */ - outb_p(0x00, REG_CSCDR); - local_irq_enable(); /* wait till internal pipelines and */ - udelay(1000); /* buffers have cleaned up */ - - local_irq_disable(); - - /* now, set the CPU clock speed register (0x80) */ - outb_p(0x80, REG_CSCIR); - outb_p(elan_multiplier[state].val80h, REG_CSCDR); - - /* now, the hyperspeed bit in PMU Force Mode Register (0x40) */ - outb_p(0x40, REG_CSCIR); - outb_p(elan_multiplier[state].val40h, REG_CSCDR); - udelay(10000); - local_irq_enable(); - - return 0; -} -/* - * Module init and exit code - */ - -static int elanfreq_cpu_init(struct cpufreq_policy *policy) -{ - struct cpuinfo_x86 *c =3D &cpu_data(0); - struct cpufreq_frequency_table *pos; - - /* capability check */ - if ((c->x86_vendor !=3D X86_VENDOR_AMD) || - (c->x86 !=3D 4) || (c->x86_model !=3D 10)) - return -ENODEV; - - /* max freq */ - if (!max_freq) - max_freq =3D elanfreq_get_cpu_frequency(0); - - /* table init */ - cpufreq_for_each_entry(pos, elanfreq_table) - if (pos->frequency > max_freq) - pos->frequency =3D CPUFREQ_ENTRY_INVALID; - - policy->freq_table =3D elanfreq_table; - return 0; -} - - -#ifndef MODULE -/** - * elanfreq_setup - elanfreq command line parameter parsing - * - * elanfreq command line parameter. Use: - * elanfreq=3D66000 - * to set the maximum CPU frequency to 66 MHz. Note that in - * case you do not give this boot parameter, the maximum - * frequency will fall back to _current_ CPU frequency which - * might be lower. If you build this as a module, use the - * max_freq module parameter instead. - */ -static int __init elanfreq_setup(char *str) -{ - max_freq =3D simple_strtoul(str, &str, 0); - pr_warn("You're using the deprecated elanfreq command line option. Use el= anfreq.max_freq instead, please!\n"); - return 1; -} -__setup("elanfreq=3D", elanfreq_setup); -#endif - - -static struct cpufreq_driver elanfreq_driver =3D { - .get =3D elanfreq_get_cpu_frequency, - .flags =3D CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING, - .verify =3D cpufreq_generic_frequency_table_verify, - .target_index =3D elanfreq_target, - .init =3D elanfreq_cpu_init, - .name =3D "elanfreq", -}; - -static const struct x86_cpu_id elan_id[] =3D { - X86_MATCH_VENDOR_FAM_MODEL(AMD, 4, 10, NULL), - {} -}; -MODULE_DEVICE_TABLE(x86cpu, elan_id); - -static int __init elanfreq_init(void) -{ - if (!x86_match_cpu(elan_id)) - return -ENODEV; - return cpufreq_register_driver(&elanfreq_driver); -} - - -static void __exit elanfreq_exit(void) -{ - cpufreq_unregister_driver(&elanfreq_driver); -} - - -module_param(max_freq, int, 0444); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Robert Schwebel , " - "Sven Geggus "); -MODULE_DESCRIPTION("cpufreq driver for AMD's Elan CPUs"); - -module_init(elanfreq_init); -module_exit(elanfreq_exit); --=20 2.54.0