Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (6 weeks ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/drivers/watchdog/s3c2410_wdt.c

    r31574 r31859  
    4747#define S3C2410_WTDAT           0x04
    4848#define S3C2410_WTCNT           0x08
     49#define S3C2410_WTCLRINT        0x0c
    4950
    5051#define S3C2410_WTCNT_MAXCNT    0xffff
     
    7374#define QUIRK_HAS_PMU_CONFIG                    (1 << 0)
    7475#define QUIRK_HAS_RST_STAT                      (1 << 1)
     76#define QUIRK_HAS_WTCLRINT_REG                  (1 << 2)
    7577
    7678/* These quirks require that we have a PMU register map */
     
    144146
    145147#ifdef CONFIG_OF
     148static const struct s3c2410_wdt_variant drv_data_s3c6410 = {
     149        .quirks = QUIRK_HAS_WTCLRINT_REG,
     150};
     151
    146152static const struct s3c2410_wdt_variant drv_data_exynos5250  = {
    147153        .disable_reg = EXYNOS5_WDT_DISABLE_REG_OFFSET,
     
    150156        .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
    151157        .rst_stat_bit = 20,
    152         .quirks = QUIRK_HAS_PMU_CONFIG | QUIRK_HAS_RST_STAT,
     158        .quirks = QUIRK_HAS_PMU_CONFIG | QUIRK_HAS_RST_STAT \
     159                  | QUIRK_HAS_WTCLRINT_REG,
    153160};
    154161
     
    159166        .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
    160167        .rst_stat_bit = 9,
    161         .quirks = QUIRK_HAS_PMU_CONFIG | QUIRK_HAS_RST_STAT,
     168        .quirks = QUIRK_HAS_PMU_CONFIG | QUIRK_HAS_RST_STAT \
     169                  | QUIRK_HAS_WTCLRINT_REG,
    162170};
    163171
     
    168176        .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
    169177        .rst_stat_bit = 23,     /* A57 WDTRESET */
    170         .quirks = QUIRK_HAS_PMU_CONFIG | QUIRK_HAS_RST_STAT,
     178        .quirks = QUIRK_HAS_PMU_CONFIG | QUIRK_HAS_RST_STAT \
     179                  | QUIRK_HAS_WTCLRINT_REG,
    171180};
    172181
     
    174183        { .compatible = "samsung,s3c2410-wdt",
    175184          .data = &drv_data_s3c2410 },
     185        { .compatible = "samsung,s3c6410-wdt",
     186          .data = &drv_data_s3c6410 },
    176187        { .compatible = "samsung,exynos5250-wdt",
    177188          .data = &drv_data_exynos5250 },
     
    419430
    420431        s3c2410wdt_keepalive(&wdt->wdt_device);
     432
     433        if (wdt->drv_data->quirks & QUIRK_HAS_WTCLRINT_REG)
     434                writel(0x1, wdt->reg_base + S3C2410_WTCLRINT);
     435
    421436        return IRQ_HANDLED;
    422437}
Note: See TracChangeset for help on using the changeset viewer.