* [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory
@ 2014-08-29 17:19 Maxime Ripard
2014-09-05 14:59 ` Kevin Hilman
0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2014-08-29 17:19 UTC (permalink / raw)
To: linux-arm-kernel
Now that the restart code has been merged in the watchdog driver, we don't need
the restart code in the mach-sunxi directory anymore.
Remove it entirely.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
Hi Arnd, Kevin, Olof,
I don't know if this can be considered 3.17 material, but if so, it would be
great if you could merge it directly.
Thanks!
Maxime
arch/arm/mach-sunxi/sunxi.c | 76 ---------------------------------------------
1 file changed, 76 deletions(-)
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 42d4753683ce..d7598aeed803 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -12,81 +12,9 @@
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
-#include <linux/delay.h>
-#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
-#include <linux/io.h>
-#include <linux/reboot.h>
#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/system_misc.h>
-
-#define SUN4I_WATCHDOG_CTRL_REG 0x00
-#define SUN4I_WATCHDOG_CTRL_RESTART BIT(0)
-#define SUN4I_WATCHDOG_MODE_REG 0x04
-#define SUN4I_WATCHDOG_MODE_ENABLE BIT(0)
-#define SUN4I_WATCHDOG_MODE_RESET_ENABLE BIT(1)
-
-#define SUN6I_WATCHDOG1_IRQ_REG 0x00
-#define SUN6I_WATCHDOG1_CTRL_REG 0x10
-#define SUN6I_WATCHDOG1_CTRL_RESTART BIT(0)
-#define SUN6I_WATCHDOG1_CONFIG_REG 0x14
-#define SUN6I_WATCHDOG1_CONFIG_RESTART BIT(0)
-#define SUN6I_WATCHDOG1_CONFIG_IRQ BIT(1)
-#define SUN6I_WATCHDOG1_MODE_REG 0x18
-#define SUN6I_WATCHDOG1_MODE_ENABLE BIT(0)
-
-static void __iomem *wdt_base;
-
-static void sun4i_restart(enum reboot_mode mode, const char *cmd)
-{
- if (!wdt_base)
- return;
-
- /* Enable timer and set reset bit in the watchdog */
- writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
- wdt_base + SUN4I_WATCHDOG_MODE_REG);
-
- /*
- * Restart the watchdog. The default (and lowest) interval
- * value for the watchdog is 0.5s.
- */
- writel(SUN4I_WATCHDOG_CTRL_RESTART, wdt_base + SUN4I_WATCHDOG_CTRL_REG);
-
- while (1) {
- mdelay(5);
- writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
- wdt_base + SUN4I_WATCHDOG_MODE_REG);
- }
-}
-
-static struct of_device_id sunxi_restart_ids[] = {
- { .compatible = "allwinner,sun4i-a10-wdt" },
- { /*sentinel*/ }
-};
-
-static void sunxi_setup_restart(void)
-{
- struct device_node *np;
-
- np = of_find_matching_node(NULL, sunxi_restart_ids);
- if (WARN(!np, "unable to setup watchdog restart"))
- return;
-
- wdt_base = of_iomap(np, 0);
- WARN(!wdt_base, "failed to map watchdog base address");
-}
-
-static void __init sunxi_dt_init(void)
-{
- sunxi_setup_restart();
-
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
static const char * const sunxi_board_dt_compat[] = {
"allwinner,sun4i-a10",
@@ -96,9 +24,7 @@ static const char * const sunxi_board_dt_compat[] = {
};
DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
- .init_machine = sunxi_dt_init,
.dt_compat = sunxi_board_dt_compat,
- .restart = sun4i_restart,
MACHINE_END
static const char * const sun6i_board_dt_compat[] = {
@@ -126,9 +52,7 @@ static const char * const sun7i_board_dt_compat[] = {
};
DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
- .init_machine = sunxi_dt_init,
.dt_compat = sun7i_board_dt_compat,
- .restart = sun4i_restart,
MACHINE_END
static const char * const sun8i_board_dt_compat[] = {
--
2.0.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory
2014-08-29 17:19 [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory Maxime Ripard
@ 2014-09-05 14:59 ` Kevin Hilman
2014-09-05 20:15 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hilman @ 2014-09-05 14:59 UTC (permalink / raw)
To: linux-arm-kernel
Maxime Ripard <maxime.ripard@free-electrons.com> writes:
> Now that the restart code has been merged in the watchdog driver, we don't need
> the restart code in the mach-sunxi directory anymore.
>
> Remove it entirely.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>
> Hi Arnd, Kevin, Olof,
>
> I don't know if this can be considered 3.17 material, but if so, it would be
> great if you could merge it directly.
I don't think it's v3.17 material at this point in the cycle because
it's not a regression fix.
Please add it to your queue for v3.18.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory
2014-09-05 14:59 ` Kevin Hilman
@ 2014-09-05 20:15 ` Arnd Bergmann
2014-09-11 17:54 ` Maxime Ripard
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2014-09-05 20:15 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 05 September 2014, Kevin Hilman wrote:
> Maxime Ripard <maxime.ripard@free-electrons.com> writes:
>
> > Now that the restart code has been merged in the watchdog driver, we don't need
> > the restart code in the mach-sunxi directory anymore.
> >
> > Remove it entirely.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >
> > Hi Arnd, Kevin, Olof,
> >
> > I don't know if this can be considered 3.17 material, but if so, it would be
> > great if you could merge it directly.
>
> I don't think it's v3.17 material at this point in the cycle because
> it's not a regression fix.
>
> Please add it to your queue for v3.18.
I agree. I had actually put it into my apply-for-3.18 queue already, but
it's better if this comes through the normal cleanups from Maxime, unless
he has nothing else yet and prefers me to apply it to the next/cleanup
branch now.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory
2014-09-05 20:15 ` Arnd Bergmann
@ 2014-09-11 17:54 ` Maxime Ripard
2014-09-11 19:02 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2014-09-11 17:54 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Fri, Sep 05, 2014 at 10:15:29PM +0200, Arnd Bergmann wrote:
> On Friday 05 September 2014, Kevin Hilman wrote:
> > Maxime Ripard <maxime.ripard@free-electrons.com> writes:
> >
> > > Now that the restart code has been merged in the watchdog driver, we don't need
> > > the restart code in the mach-sunxi directory anymore.
> > >
> > > Remove it entirely.
> > >
> > > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > > ---
> > >
> > > Hi Arnd, Kevin, Olof,
> > >
> > > I don't know if this can be considered 3.17 material, but if so, it would be
> > > great if you could merge it directly.
> >
> > I don't think it's v3.17 material at this point in the cycle because
> > it's not a regression fix.
> >
> > Please add it to your queue for v3.18.
>
> I agree. I had actually put it into my apply-for-3.18 queue already, but
> it's better if this comes through the normal cleanups from Maxime, unless
> he has nothing else yet and prefers me to apply it to the next/cleanup
> branch now.
If possible, yes. I have no other cleanups queued up so far.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140911/92b81b62/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory
2014-09-11 17:54 ` Maxime Ripard
@ 2014-09-11 19:02 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-09-11 19:02 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 11 September 2014 19:54:26 Maxime Ripard wrote:
> On Fri, Sep 05, 2014 at 10:15:29PM +0200, Arnd Bergmann wrote:
> > On Friday 05 September 2014, Kevin Hilman wrote:
> > > Maxime Ripard <maxime.ripard@free-electrons.com> writes:
> > >
> > > > Now that the restart code has been merged in the watchdog driver, we don't need
> > > > the restart code in the mach-sunxi directory anymore.
> > > >
> > > > Remove it entirely.
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > > > ---
> > > >
> > > > Hi Arnd, Kevin, Olof,
> > > >
> > > > I don't know if this can be considered 3.17 material, but if so, it would be
> > > > great if you could merge it directly.
> > >
> > > I don't think it's v3.17 material at this point in the cycle because
> > > it's not a regression fix.
> > >
> > > Please add it to your queue for v3.18.
> >
> > I agree. I had actually put it into my apply-for-3.18 queue already, but
> > it's better if this comes through the normal cleanups from Maxime, unless
> > he has nothing else yet and prefers me to apply it to the next/cleanup
> > branch now.
>
> If possible, yes. I have no other cleanups queued up so far.
Ok, applied to next/cleanup now.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-11 19:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29 17:19 [PATCH] ARM: sunxi: Remove sun4i reboot code from mach directory Maxime Ripard
2014-09-05 14:59 ` Kevin Hilman
2014-09-05 20:15 ` Arnd Bergmann
2014-09-11 17:54 ` Maxime Ripard
2014-09-11 19:02 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).