* [PATCH] reset: remove the reset-tn48m driver
@ 2026-01-12 6:49 Randy Dunlap
2026-01-12 7:26 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2026-01-12 6:49 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Robert Marko, Philipp Zabel, Greg Kroah-Hartman,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree
The reset-tn48m driver is useless without the simple-mfd parent, which
is not present in the kernel tree, so remove it and references to it.
Fixes: 5cd3921d16b6 ("reset: Add Delta TN48M CPLD reset controller")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Based on v6.19-rc4.
Cc: Robert Marko <robert.marko@sartura.hr>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
.../bindings/reset/delta,tn48m-reset.yaml | 35 ------
drivers/reset/Kconfig | 13 ---
drivers/reset/Makefile | 1 -
drivers/reset/reset-tn48m.c | 128 ---------------------
include/dt-bindings/reset/delta,tn48m-reset.h | 20 ----
5 files changed, 197 deletions(-)
diff --git a/Documentation/devicetree/bindings/reset/delta,tn48m-reset.yaml b/Documentation/devicetree/bindings/reset/delta,tn48m-reset.yaml
deleted file mode 100644
index 0e5ee8decc0d..000000000000
--- a/Documentation/devicetree/bindings/reset/delta,tn48m-reset.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/reset/delta,tn48m-reset.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Delta Networks TN48M CPLD reset controller
-
-maintainers:
- - Robert Marko <robert.marko@sartura.hr>
-
-description: |
- This module is part of the Delta TN48M multi-function device. For more
- details see ../mfd/delta,tn48m-cpld.yaml.
-
- Reset controller modules provides resets for the following:
- * 88F7040 SoC
- * 88F6820 SoC
- * 98DX3265 switch MAC-s
- * 88E1680 PHY-s
- * 88E1512 PHY
- * PoE PSE controller
-
-properties:
- compatible:
- const: delta,tn48m-reset
-
- "#reset-cells":
- const: 1
-
-required:
- - compatible
- - "#reset-cells"
-
-additionalProperties: false
diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index 6e5d6deffa7d..e7fca3e5d3b0 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -360,19 +360,6 @@ config RESET_TI_TPS380X
you wish to use the reset framework for such devices, say Y here.
Otherwise, say N.
-config RESET_TN48M_CPLD
- tristate "Delta Networks TN48M switch CPLD reset controller"
- depends on MFD_TN48M_CPLD || COMPILE_TEST
- default MFD_TN48M_CPLD
- help
- This enables the reset controller driver for the Delta TN48M CPLD.
- It provides reset signals for Armada 7040 and 385 SoC-s, Alleycat 3X
- switch MAC-s, Alaska OOB ethernet PHY, Quad Alaska ethernet PHY-s and
- Microchip PD69200 PoE PSE controller.
-
- This driver can also be built as a module. If so, the module will be
- called reset-tn48m.
-
config RESET_UNIPHIER
tristate "Reset controller driver for UniPhier SoCs"
depends on ARCH_UNIPHIER || COMPILE_TEST
diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
index 9c3e484dfd81..b6212c21b5b7 100644
--- a/drivers/reset/Makefile
+++ b/drivers/reset/Makefile
@@ -45,7 +45,6 @@ obj-$(CONFIG_RESET_TH1520) += reset-th1520.o
obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o
obj-$(CONFIG_RESET_TI_SYSCON) += reset-ti-syscon.o
obj-$(CONFIG_RESET_TI_TPS380X) += reset-tps380x.o
-obj-$(CONFIG_RESET_TN48M_CPLD) += reset-tn48m.o
obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
obj-$(CONFIG_RESET_UNIPHIER_GLUE) += reset-uniphier-glue.o
obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o
diff --git a/drivers/reset/reset-tn48m.c b/drivers/reset/reset-tn48m.c
deleted file mode 100644
index 130027291b6e..000000000000
--- a/drivers/reset/reset-tn48m.c
+++ /dev/null
@@ -1,128 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Delta TN48M CPLD reset driver
- *
- * Copyright (C) 2021 Sartura Ltd.
- *
- * Author: Robert Marko <robert.marko@sartura.hr>
- */
-
-#include <linux/device.h>
-#include <linux/kernel.h>
-#include <linux/mod_devicetable.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/regmap.h>
-#include <linux/reset-controller.h>
-
-#include <dt-bindings/reset/delta,tn48m-reset.h>
-
-#define TN48M_RESET_REG 0x10
-
-#define TN48M_RESET_TIMEOUT_US 125000
-#define TN48M_RESET_SLEEP_US 10
-
-struct tn48_reset_map {
- u8 bit;
-};
-
-struct tn48_reset_data {
- struct reset_controller_dev rcdev;
- struct regmap *regmap;
-};
-
-static const struct tn48_reset_map tn48m_resets[] = {
- [CPU_88F7040_RESET] = {0},
- [CPU_88F6820_RESET] = {1},
- [MAC_98DX3265_RESET] = {2},
- [PHY_88E1680_RESET] = {4},
- [PHY_88E1512_RESET] = {6},
- [POE_RESET] = {7},
-};
-
-static inline struct tn48_reset_data *to_tn48_reset_data(
- struct reset_controller_dev *rcdev)
-{
- return container_of(rcdev, struct tn48_reset_data, rcdev);
-}
-
-static int tn48m_control_reset(struct reset_controller_dev *rcdev,
- unsigned long id)
-{
- struct tn48_reset_data *data = to_tn48_reset_data(rcdev);
- unsigned int val;
-
- regmap_update_bits(data->regmap, TN48M_RESET_REG,
- BIT(tn48m_resets[id].bit), 0);
-
- return regmap_read_poll_timeout(data->regmap,
- TN48M_RESET_REG,
- val,
- val & BIT(tn48m_resets[id].bit),
- TN48M_RESET_SLEEP_US,
- TN48M_RESET_TIMEOUT_US);
-}
-
-static int tn48m_control_status(struct reset_controller_dev *rcdev,
- unsigned long id)
-{
- struct tn48_reset_data *data = to_tn48_reset_data(rcdev);
- unsigned int regval;
- int ret;
-
- ret = regmap_read(data->regmap, TN48M_RESET_REG, ®val);
- if (ret < 0)
- return ret;
-
- if (BIT(tn48m_resets[id].bit) & regval)
- return 0;
- else
- return 1;
-}
-
-static const struct reset_control_ops tn48_reset_ops = {
- .reset = tn48m_control_reset,
- .status = tn48m_control_status,
-};
-
-static int tn48m_reset_probe(struct platform_device *pdev)
-{
- struct tn48_reset_data *data;
- struct regmap *regmap;
-
- regmap = dev_get_regmap(pdev->dev.parent, NULL);
- if (!regmap)
- return -ENODEV;
-
- data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
- if (!data)
- return -ENOMEM;
-
- data->regmap = regmap;
-
- data->rcdev.owner = THIS_MODULE;
- data->rcdev.ops = &tn48_reset_ops;
- data->rcdev.nr_resets = ARRAY_SIZE(tn48m_resets);
- data->rcdev.of_node = pdev->dev.of_node;
-
- return devm_reset_controller_register(&pdev->dev, &data->rcdev);
-}
-
-static const struct of_device_id tn48m_reset_of_match[] = {
- { .compatible = "delta,tn48m-reset" },
- { }
-};
-MODULE_DEVICE_TABLE(of, tn48m_reset_of_match);
-
-static struct platform_driver tn48m_reset_driver = {
- .driver = {
- .name = "delta-tn48m-reset",
- .of_match_table = tn48m_reset_of_match,
- },
- .probe = tn48m_reset_probe,
-};
-module_platform_driver(tn48m_reset_driver);
-
-MODULE_AUTHOR("Robert Marko <robert.marko@sartura.hr>");
-MODULE_DESCRIPTION("Delta TN48M CPLD reset driver");
-MODULE_LICENSE("GPL");
diff --git a/include/dt-bindings/reset/delta,tn48m-reset.h b/include/dt-bindings/reset/delta,tn48m-reset.h
deleted file mode 100644
index d4e9ed12de3e..000000000000
--- a/include/dt-bindings/reset/delta,tn48m-reset.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Delta TN48M CPLD GPIO driver
- *
- * Copyright (C) 2021 Sartura Ltd.
- *
- * Author: Robert Marko <robert.marko@sartura.hr>
- */
-
-#ifndef _DT_BINDINGS_RESET_TN48M_H
-#define _DT_BINDINGS_RESET_TN48M_H
-
-#define CPU_88F7040_RESET 0
-#define CPU_88F6820_RESET 1
-#define MAC_98DX3265_RESET 2
-#define PHY_88E1680_RESET 3
-#define PHY_88E1512_RESET 4
-#define POE_RESET 5
-
-#endif /* _DT_BINDINGS_RESET_TN48M_H */
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] reset: remove the reset-tn48m driver
2026-01-12 6:49 [PATCH] reset: remove the reset-tn48m driver Randy Dunlap
@ 2026-01-12 7:26 ` Krzysztof Kozlowski
2026-01-12 9:16 ` Robert Marko
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-12 7:26 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Robert Marko, Philipp Zabel, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
On 12/01/2026 07:49, Randy Dunlap wrote:
> The reset-tn48m driver is useless without the simple-mfd parent, which
> is not present in the kernel tree, so remove it and references to it.
I don't understand that sentence. simple-mfd is present in the kernel
tree, so the condition is clearly false.
Driver has proper instantiation mechanism, thus all out of tree users
can properly use it and there is no ever requirement to have in-tree
DTS. Otherwise you would remove half of the kernel drivers...
>
> Fixes: 5cd3921d16b6 ("reset: Add Delta TN48M CPLD reset controller")
No bug to be fixed. Or at least not explained yet...
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> Based on v6.19-rc4.
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] reset: remove the reset-tn48m driver
2026-01-12 7:26 ` Krzysztof Kozlowski
@ 2026-01-12 9:16 ` Robert Marko
2026-01-12 11:51 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Robert Marko @ 2026-01-12 9:16 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Randy Dunlap, linux-kernel, Philipp Zabel, Greg Kroah-Hartman,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree
On Mon, Jan 12, 2026 at 8:26 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 12/01/2026 07:49, Randy Dunlap wrote:
> > The reset-tn48m driver is useless without the simple-mfd parent, which
> > is not present in the kernel tree, so remove it and references to it.
>
> I don't understand that sentence. simple-mfd is present in the kernel
> tree, so the condition is clearly false.
>
> Driver has proper instantiation mechanism, thus all out of tree users
> can properly use it and there is no ever requirement to have in-tree
> DTS. Otherwise you would remove half of the kernel drivers...
The simple-mfd driver itself exists, but all of the TN48M drivers
depend on a symbol
that sadly, was reverted in [1], and thus you cannot build them, nor
are they instantiated without it.
I am sad that was the case as the drivers work, and they were planned
for expansion for more
switch models but it ended up in this limbo state.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260109&id=540e6a8114d0
Regards,
Robert
>
> >
> > Fixes: 5cd3921d16b6 ("reset: Add Delta TN48M CPLD reset controller")
>
> No bug to be fixed. Or at least not explained yet...
>
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > ---
> > Based on v6.19-rc4.
> >
>
> Best regards,
> Krzysztof
--
Robert Marko
Staff Embedded Linux Engineer
Sartura d.d.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] reset: remove the reset-tn48m driver
2026-01-12 9:16 ` Robert Marko
@ 2026-01-12 11:51 ` Krzysztof Kozlowski
2026-01-12 19:01 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-12 11:51 UTC (permalink / raw)
To: Robert Marko
Cc: Randy Dunlap, linux-kernel, Philipp Zabel, Greg Kroah-Hartman,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree
On Mon, Jan 12, 2026 at 10:16:44AM +0100, Robert Marko wrote:
> On Mon, Jan 12, 2026 at 8:26 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > On 12/01/2026 07:49, Randy Dunlap wrote:
> > > The reset-tn48m driver is useless without the simple-mfd parent, which
> > > is not present in the kernel tree, so remove it and references to it.
> >
> > I don't understand that sentence. simple-mfd is present in the kernel
> > tree, so the condition is clearly false.
> >
> > Driver has proper instantiation mechanism, thus all out of tree users
> > can properly use it and there is no ever requirement to have in-tree
> > DTS. Otherwise you would remove half of the kernel drivers...
>
> The simple-mfd driver itself exists, but all of the TN48M drivers
> depend on a symbol
> that sadly, was reverted in [1], and thus you cannot build them, nor
> are they instantiated without it.
Ah, so missing is MFD_TN48M_CPLD. You should just say that driver is
impossible to build outside of compile testing, thus it is unusable.
simple-mfd is rather confusing in this context, because itself exists.
>
> I am sad that was the case as the drivers work, and they were planned
> for expansion for more
> switch models but it ended up in this limbo state.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260109&id=540e6a8114d0
>
> Regards,
> Robert
>
> >
> > >
> > > Fixes: 5cd3921d16b6 ("reset: Add Delta TN48M CPLD reset controller")
> >
> > No bug to be fixed. Or at least not explained yet...
In that case I would say fixed commit is what you pointed:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260109&id=540e6a8114d0
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] reset: remove the reset-tn48m driver
2026-01-12 11:51 ` Krzysztof Kozlowski
@ 2026-01-12 19:01 ` Randy Dunlap
0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2026-01-12 19:01 UTC (permalink / raw)
To: Krzysztof Kozlowski, Robert Marko
Cc: linux-kernel, Philipp Zabel, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
Hi,
On 1/12/26 3:51 AM, Krzysztof Kozlowski wrote:
> On Mon, Jan 12, 2026 at 10:16:44AM +0100, Robert Marko wrote:
>> On Mon, Jan 12, 2026 at 8:26 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>>
>>> On 12/01/2026 07:49, Randy Dunlap wrote:
>>>> The reset-tn48m driver is useless without the simple-mfd parent, which
>>>> is not present in the kernel tree, so remove it and references to it.
>>>
>>> I don't understand that sentence. simple-mfd is present in the kernel
>>> tree, so the condition is clearly false.
>>>
>>> Driver has proper instantiation mechanism, thus all out of tree users
>>> can properly use it and there is no ever requirement to have in-tree
>>> DTS. Otherwise you would remove half of the kernel drivers...
>>
>> The simple-mfd driver itself exists, but all of the TN48M drivers
>> depend on a symbol
>> that sadly, was reverted in [1], and thus you cannot build them, nor
>> are they instantiated without it.
>
> Ah, so missing is MFD_TN48M_CPLD. You should just say that driver is
> impossible to build outside of compile testing, thus it is unusable.
> simple-mfd is rather confusing in this context, because itself exists.
>
>>
>> I am sad that was the case as the drivers work, and they were planned
>> for expansion for more
>> switch models but it ended up in this limbo state.
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260109&id=540e6a8114d0
>>
>> Regards,
>> Robert
>>
>>>
>>>>
>>>> Fixes: 5cd3921d16b6 ("reset: Add Delta TN48M CPLD reset controller")
>>>
>>> No bug to be fixed. Or at least not explained yet...
>
> In that case I would say fixed commit is what you pointed:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260109&id=540e6a8114d0
OK, if there is another version.
Hopefully there will just be a patch for the simple-mfd parent.
thanks.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-12 19:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12 6:49 [PATCH] reset: remove the reset-tn48m driver Randy Dunlap
2026-01-12 7:26 ` Krzysztof Kozlowski
2026-01-12 9:16 ` Robert Marko
2026-01-12 11:51 ` Krzysztof Kozlowski
2026-01-12 19:01 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®