60
60
#define EXYNOS850_CLUSTER0_NONCPU_INT_EN 0x1244
61
61
#define EXYNOS850_CLUSTER1_NONCPU_OUT 0x1620
62
62
#define EXYNOS850_CLUSTER1_NONCPU_INT_EN 0x1644
63
+ #define EXYNOSAUTOV9_CLUSTER1_NONCPU_OUT 0x1520
64
+ #define EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN 0x1544
63
65
64
66
#define EXYNOS850_CLUSTER0_WDTRESET_BIT 24
65
67
#define EXYNOS850_CLUSTER1_WDTRESET_BIT 23
68
+ #define EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT 25
69
+ #define EXYNOSAUTOV9_CLUSTER1_WDTRESET_BIT 24
66
70
67
71
/**
68
72
* DOC: Quirk flags for different Samsung watchdog IP-cores
@@ -236,6 +240,30 @@ static const struct s3c2410_wdt_variant drv_data_exynos850_cl1 = {
236
240
QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN ,
237
241
};
238
242
243
+ static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl0 = {
244
+ .mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN ,
245
+ .mask_bit = 2 ,
246
+ .mask_reset_inv = true,
247
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET ,
248
+ .rst_stat_bit = EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT ,
249
+ .cnt_en_reg = EXYNOS850_CLUSTER0_NONCPU_OUT ,
250
+ .cnt_en_bit = 7 ,
251
+ .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
252
+ QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN ,
253
+ };
254
+
255
+ static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl1 = {
256
+ .mask_reset_reg = EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN ,
257
+ .mask_bit = 2 ,
258
+ .mask_reset_inv = true,
259
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET ,
260
+ .rst_stat_bit = EXYNOSAUTOV9_CLUSTER1_WDTRESET_BIT ,
261
+ .cnt_en_reg = EXYNOSAUTOV9_CLUSTER1_NONCPU_OUT ,
262
+ .cnt_en_bit = 7 ,
263
+ .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
264
+ QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN ,
265
+ };
266
+
239
267
static const struct of_device_id s3c2410_wdt_match [] = {
240
268
{ .compatible = "samsung,s3c2410-wdt" ,
241
269
.data = & drv_data_s3c2410 },
@@ -249,6 +277,8 @@ static const struct of_device_id s3c2410_wdt_match[] = {
249
277
.data = & drv_data_exynos7 },
250
278
{ .compatible = "samsung,exynos850-wdt" ,
251
279
.data = & drv_data_exynos850_cl0 },
280
+ { .compatible = "samsung,exynosautov9-wdt" ,
281
+ .data = & drv_data_exynosautov9_cl0 },
252
282
{},
253
283
};
254
284
MODULE_DEVICE_TABLE (of , s3c2410_wdt_match );
@@ -630,8 +660,9 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev)
630
660
}
631
661
632
662
#ifdef CONFIG_OF
633
- /* Choose Exynos850 driver data w.r.t. cluster index */
634
- if (variant == & drv_data_exynos850_cl0 ) {
663
+ /* Choose Exynos850/ExynosAutov9 driver data w.r.t. cluster index */
664
+ if (variant == & drv_data_exynos850_cl0 ||
665
+ variant == & drv_data_exynosautov9_cl0 ) {
635
666
u32 index ;
636
667
int err ;
637
668
@@ -644,9 +675,11 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev)
644
675
645
676
switch (index ) {
646
677
case 0 :
647
- return & drv_data_exynos850_cl0 ;
678
+ return variant ;
648
679
case 1 :
649
- return & drv_data_exynos850_cl1 ;
680
+ return (variant == & drv_data_exynos850_cl0 ) ?
681
+ & drv_data_exynos850_cl1 :
682
+ & drv_data_exynosautov9_cl1 ;
650
683
default :
651
684
dev_err (dev , "wrong cluster index: %u\n" , index );
652
685
return NULL ;
0 commit comments