82
82
#define GS_CLUSTER2_NONCPU_INT_EN 0x1644
83
83
#define GS_RST_STAT_REG_OFFSET 0x3B44
84
84
85
+ #define EXYNOS990_CLUSTER2_NONCPU_OUT 0x1620
86
+ #define EXYNOS990_CLUSTER2_NONCPU_INT_EN 0x1644
87
+ #define EXYNOS990_CLUSTER2_WDTRESET_BIT 23
88
+
85
89
/**
86
90
* DOC: Quirk flags for different Samsung watchdog IP-cores
87
91
*
@@ -259,6 +263,32 @@ static const struct s3c2410_wdt_variant drv_data_exynos850_cl1 = {
259
263
QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN ,
260
264
};
261
265
266
+ static const struct s3c2410_wdt_variant drv_data_exynos990_cl0 = {
267
+ .mask_reset_reg = GS_CLUSTER0_NONCPU_INT_EN ,
268
+ .mask_bit = 2 ,
269
+ .mask_reset_inv = true,
270
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET ,
271
+ .rst_stat_bit = EXYNOS850_CLUSTER0_WDTRESET_BIT ,
272
+ .cnt_en_reg = EXYNOSAUTOV920_CLUSTER0_NONCPU_OUT ,
273
+ .cnt_en_bit = 7 ,
274
+ .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
275
+ QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN |
276
+ QUIRK_HAS_DBGACK_BIT ,
277
+ };
278
+
279
+ static const struct s3c2410_wdt_variant drv_data_exynos990_cl2 = {
280
+ .mask_reset_reg = EXYNOS990_CLUSTER2_NONCPU_INT_EN ,
281
+ .mask_bit = 2 ,
282
+ .mask_reset_inv = true,
283
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET ,
284
+ .rst_stat_bit = EXYNOS990_CLUSTER2_WDTRESET_BIT ,
285
+ .cnt_en_reg = EXYNOS990_CLUSTER2_NONCPU_OUT ,
286
+ .cnt_en_bit = 7 ,
287
+ .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
288
+ QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN |
289
+ QUIRK_HAS_DBGACK_BIT ,
290
+ };
291
+
262
292
static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl0 = {
263
293
.mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN ,
264
294
.mask_bit = 2 ,
@@ -350,6 +380,8 @@ static const struct of_device_id s3c2410_wdt_match[] = {
350
380
.data = & drv_data_exynos7 },
351
381
{ .compatible = "samsung,exynos850-wdt" ,
352
382
.data = & drv_data_exynos850_cl0 },
383
+ { .compatible = "samsung,exynos990-wdt" ,
384
+ .data = & drv_data_exynos990_cl0 },
353
385
{ .compatible = "samsung,exynosautov9-wdt" ,
354
386
.data = & drv_data_exynosautov9_cl0 },
355
387
{ .compatible = "samsung,exynosautov920-wdt" ,
@@ -678,7 +710,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt)
678
710
if (variant == & drv_data_exynos850_cl0 ||
679
711
variant == & drv_data_exynosautov9_cl0 ||
680
712
variant == & drv_data_gs101_cl0 ||
681
- variant == & drv_data_exynosautov920_cl0 ) {
713
+ variant == & drv_data_exynosautov920_cl0 ||
714
+ variant == & drv_data_exynos990_cl0 ) {
682
715
u32 index ;
683
716
int err ;
684
717
@@ -700,6 +733,10 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt)
700
733
else if (variant == & drv_data_exynosautov920_cl0 )
701
734
variant = & drv_data_exynosautov920_cl1 ;
702
735
break ;
736
+ case 2 :
737
+ if (variant == & drv_data_exynos990_cl0 )
738
+ variant = & drv_data_exynos990_cl2 ;
739
+ break ;
703
740
default :
704
741
return dev_err_probe (dev , - EINVAL , "wrong cluster index: %u\n" , index );
705
742
}
0 commit comments