[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now, from a policy perspective, what is the difference between a
system that crashes or locks up, and a system that halts?
I.e. should the system reboot on halt, or not?

I think halting a system where the watchdog has been activated makes
no sense, and the user either wants to explicitly reboot the system, or
power it off, but never halt it.  So I think this patch is not needed.

Watchdog people: what is your opinion?
Thanks!

> --- a/drivers/clk/renesas/r9a06g032-clocks.c
> +++ b/drivers/clk/renesas/r9a06g032-clocks.c
> @@ -129,6 +129,11 @@ enum { K_GATE = 0, K_FFC, K_DIV, K_BITSEL, K_DUALGATE };
>
>  #define R9A06G032_CLOCK_COUNT          (R9A06G032_UART_GROUP_34567 + 1)
>
> +#define R9A06G032_SYSCTRL_REG_RSTEN            0x120
> +#define WDA7RST1       BIT(2)
> +#define WDA7RST0       BIT(1)
> +#define MRESET         BIT(0)
> +
>  static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
>         D_ROOT(CLKOUT, "clkout", 25, 1),
>         D_ROOT(CLK_PLL_USB, "clk_pll_usb", 12, 10),
> @@ -893,6 +898,19 @@ static void r9a06g032_clocks_del_clk_provider(void *data)
>         of_clk_del_provider(data);
>  }
>
> +static void r9a06g032_reset_sources(struct r9a06g032_priv *clocks,
> +                       uint32_t mask, uint32_t value)
> +{
> +       uint32_t rsten;
> +       unsigned long flags;
> +
> +       spin_lock_irqsave(&clocks->lock, flags);
> +       rsten = readl(clocks->reg);
> +       rsten = (rsten & ~mask) | (value & mask);
> +       writel(rsten, clocks->reg + R9A06G032_SYSCTRL_REG_RSTEN);
> +       spin_unlock_irqrestore(&clocks->lock, flags);
> +}
> +
>  static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> @@ -910,6 +928,8 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
>         if (!clocks || !clks)
>                 return -ENOMEM;
>
> +       platform_set_drvdata(pdev, clocks);
> +
>         spin_lock_init(&clocks->lock);
>
>         clocks->data.clks = clks;
> @@ -963,9 +983,18 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
>         if (error)
>                 return error;
>
> +
>         return r9a06g032_add_clk_domain(dev);
>  }
>
> +static void r9a06g032_clocks_shutdown(struct platform_device *pdev)
> +{
> +       struct r9a06g032_priv *clocks = platform_get_drvdata(pdev);
> +
> +       /* Disable the watchdog reset sources */
> +       r9a06g032_reset_sources(clocks, WDA7RST0 | WDA7RST1, 0);
> +}
> +
>  static const struct of_device_id r9a06g032_match[] = {
>         { .compatible = "renesas,r9a06g032-sysctrl" },
>         { }
> @@ -976,6 +1005,7 @@ static struct platform_driver r9a06g032_clock_driver = {
>                 .name   = "renesas,r9a06g032-sysctrl",
>                 .of_match_table = r9a06g032_match,
>         },
> +       .shutdown = r9a06g032_clocks_shutdown,
>  };
>
>  static int __init r9a06g032_clocks_init(void)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux