History log of /linux-master/drivers/reset/reset-sunxi.c
Revision Date Author Comments
# 9357b046 27-May-2020 Maxime Ripard <maxime@cerno.tech>

reset: Move reset-simple header out of drivers/reset

The reset-simple code can be useful for drivers outside of drivers/reset
that have a few reset controls as part of their features. Let's move it to
include/linux/reset.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fdce6078 12-Dec-2018 Philipp Zabel <p.zabel@pengutronix.de>

reset: sunxi: declare sun6i_reset_init in a header file

Avoid declaring extern functions in c files. To make sure function
definition and usage don't get out of sync, declare sun6i_reset_init
in a common header.

Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>


# e13c205a 10-Aug-2017 Philipp Zabel <p.zabel@pengutronix.de>

reset: sunxi: use reset-simple driver

Use the newly created copies in the reset-simple driver to replace the
sunxi platform driver code and reset operations. The separate sunxi
driver still remains to register the early reset controllers, but it
reuses the reset operations in reset-simple.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Alexandru Gagniuc <alex.g@adaptrum.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>


# 726cc791 10-Aug-2017 Philipp Zabel <p.zabel@pengutronix.de>

reset: sunxi: fix number of reset lines

The Allwinner reset controller has 32-bit registers, but resource_size
is measured in bytes, not number of registers.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Chen-Yu Tsai <wens@csie.org>


# 11282a49 05-Mar-2017 Andre Przywara <andre.przywara@arm.com>

reset: sunxi: fix for 64-bit compilation

The Allwinner reset controller has 32-bit registers, so translating
the reset cell number into a register and bit offset should not use
any architecture dependent data size. Otherwise this breaks for 64-bit
architectures like arm64.
Fix this by making it clear that it's the hardware register width which
matters here in the calculation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>


# c4742ed3 13-Jun-2016 Paul Gortmaker <paul.gortmaker@windriver.com>

reset: sunxi: make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/reset/Kconfig:config RESET_SUNXI
drivers/reset/Kconfig: bool "Allwinner SoCs Reset Driver" if COMPILE_TEST && !ARCH_SUNXI
drivers/reset/Kconfig: default ARCH_SUNXI

or

arch/arm/mach-sunxi/Kconfig:menuconfig ARCH_SUNXI
arch/arm/mach-sunxi/Kconfig: bool "Allwinner SoCs" if ARCH_MULTI_V7

...meaning that it currently is not being built as a module by anyone.

Lets remove the few remaining traces of modular macro usage, so that
when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>


# 2f38a88c 01-May-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

reset: sunxi: use devm_reset_controller_register()

Use devm_reset_controller_register() for the reset controller
registration and drop the .remove callback.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>


# 01501d573 17-Jan-2016 Philipp Zabel <p.zabel@pengutronix.de>

reset: sunxi: Make reset_control_ops const

The sunxi_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>


# d1f15aa0 04-Nov-2015 Masahiro Yamada <yamada.masahiro@socionext.com>

reset: check return value of reset_controller_register()

Currently, reset_controller_register() always return 0, but it would
be better to check its return code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>


# fddad17e 29-Oct-2015 Philipp Zabel <p.zabel@pengutronix.de>

reset: sunxi: mark the of_device_id array as __initconst

Since this array is static const, it should be marked as __initconst.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>


# 41544f9f 12-Jan-2015 Tyler Baker <tyler.baker@linaro.org>

reset: sunxi: fix spinlock initialization

Call spin_lock_init() before the spinlocks are used, both in early init
and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2]
when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat,
and has been tested on a few other sunxi platforms without issue.

[1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
Cc: <stable@vger.kernel.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>


# 569d5e91 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

reset: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# cd90f0cf 14-May-2014 Boris Brezillon <bbrezillon@kernel.org>

reset: sunxi: allow MFD subdevices probe

The current implementation uses sunxi_reset_init function for both early
init and platform device probe.

The sunxi_reset_init function uses DT to retrieve device resources, which
will be an issue if reset controllers are registered from an MFD device
that define resources from mfd_cell definition.

Moreover, we can make of devm functions when we're in the probe context.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>


# 8f1ae77f 24-Sep-2013 Maxime Ripard <mripard@kernel.org>

reset: Add Allwinner SoCs Reset Controller Driver

The Allwinner A31 and most of the other Allwinner SoCs have an IP
maintaining a few other IPs in the SoC in reset by default. Among these
IPs are the A31's High Speed Timers, hence why we can't use the regular
driver construct in every cases, and need to call the registering
function directly during machine initialisation.

Apart from this, the implementation is fairly straightforward, and could
easily be moved to a generic MMIO-based reset controller driver if the
need ever arise.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>