Commit 59c15025 authored by Samuel Holland's avatar Samuel Holland Committed by Linus Walleij
Browse files

pinctrl: sunxi: Remove reset controller consumers



None of the sunxi pin controllers have a module reset line. All of the
SoC documentation, where available, agrees. The bits that would be used
for the PIO reset (i.e. matching the order of the clock gate bits) are
always reserved, both in the CCU and in the PRCM. And experiments on
several SoCs, including the A33, confirm that those reserved bits indeed
have no effect.

Let's remove this superfluous code and dependency, and also remove the
include statement that was copied to the other r_pio drivers.

Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220531053623.43851-2-samuel@sholland.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 353d2ef7
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ config PINCTRL_SUN6I_A31
config PINCTRL_SUN6I_A31_R
	bool "Support for the Allwinner A31 R-PIO"
	default MACH_SUN6I
	depends on RESET_CONTROLLER
	select PINCTRL_SUNXI

config PINCTRL_SUN8I_A23
@@ -55,7 +54,6 @@ config PINCTRL_SUN8I_A83T_R
config PINCTRL_SUN8I_A23_R
	bool "Support for the Allwinner A23 and A33 R-PIO"
	default MACH_SUN8I
	depends on RESET_CONTROLLER
	select PINCTRL_SUNXI

config PINCTRL_SUN8I_H3
@@ -81,7 +79,6 @@ config PINCTRL_SUN9I_A80
config PINCTRL_SUN9I_A80_R
	bool "Support for the Allwinner A80 R-PIO"
	default MACH_SUN9I
	depends on RESET_CONTROLLER
	select PINCTRL_SUNXI

config PINCTRL_SUN50I_A64
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@
#include <linux/of_device.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/platform_device.h>
#include <linux/reset.h>

#include "pinctrl-sunxi.h"

+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/reset.h>

#include "pinctrl-sunxi.h"

+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/reset.h>

#include "pinctrl-sunxi.h"

+1 −21
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/reset.h>

#include "pinctrl-sunxi.h"

@@ -111,26 +110,7 @@ static const struct sunxi_pinctrl_desc sun6i_a31_r_pinctrl_data = {

static int sun6i_a31_r_pinctrl_probe(struct platform_device *pdev)
{
	struct reset_control *rstc;
	int ret;

	rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
	if (IS_ERR(rstc)) {
		dev_err(&pdev->dev, "Reset controller missing\n");
		return PTR_ERR(rstc);
	}

	ret = reset_control_deassert(rstc);
	if (ret)
		return ret;

	ret = sunxi_pinctrl_init(pdev,
				 &sun6i_a31_r_pinctrl_data);

	if (ret)
		reset_control_assert(rstc);

	return ret;
	return sunxi_pinctrl_init(pdev, &sun6i_a31_r_pinctrl_data);
}

static const struct of_device_id sun6i_a31_r_pinctrl_match[] = {
Loading