aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-02-19 03:44:09 -0500
committerMatthias Brugger <matthias.bgg@gmail.com>2016-04-20 07:03:02 -0400
commite5eef49bc34b2adda3d3d0549d92a7f252130e79 (patch)
tree276b9c7e6d9221ba90aae19207e3852f65caecc3
parent41c11f32d86ac1b64c78b827f977432df4934147 (diff)
soc: mediatek: PMIC wrap: WRAP_INT_EN needs a different bitmask for MT2701/7623
MT2701 and MT7623 use a different bitmask for PWRAP_INT_EN. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
-rw-r--r--drivers/soc/mediatek/mtk-pmic-wrap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 22c89e96a731..9df113546160 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -371,6 +371,7 @@ struct pmic_wrapper_type {
371 int *regs; 371 int *regs;
372 enum pwrap_type type; 372 enum pwrap_type type;
373 u32 arb_en_all; 373 u32 arb_en_all;
374 u32 int_en_all;
374 int (*init_reg_clock)(struct pmic_wrapper *wrp); 375 int (*init_reg_clock)(struct pmic_wrapper *wrp);
375 int (*init_soc_specific)(struct pmic_wrapper *wrp); 376 int (*init_soc_specific)(struct pmic_wrapper *wrp);
376}; 377};
@@ -825,6 +826,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = {
825 .regs = mt8135_regs, 826 .regs = mt8135_regs,
826 .type = PWRAP_MT8135, 827 .type = PWRAP_MT8135,
827 .arb_en_all = 0x1ff, 828 .arb_en_all = 0x1ff,
829 .int_en_all = ~(BIT(31) | BIT(1)),
828 .init_reg_clock = pwrap_mt8135_init_reg_clock, 830 .init_reg_clock = pwrap_mt8135_init_reg_clock,
829 .init_soc_specific = pwrap_mt8135_init_soc_specific, 831 .init_soc_specific = pwrap_mt8135_init_soc_specific,
830}; 832};
@@ -833,6 +835,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = {
833 .regs = mt8173_regs, 835 .regs = mt8173_regs,
834 .type = PWRAP_MT8173, 836 .type = PWRAP_MT8173,
835 .arb_en_all = 0x3f, 837 .arb_en_all = 0x3f,
838 .int_en_all = ~(BIT(31) | BIT(1)),
836 .init_reg_clock = pwrap_mt8173_init_reg_clock, 839 .init_reg_clock = pwrap_mt8173_init_reg_clock,
837 .init_soc_specific = pwrap_mt8173_init_soc_specific, 840 .init_soc_specific = pwrap_mt8173_init_soc_specific,
838}; 841};
@@ -946,7 +949,7 @@ static int pwrap_probe(struct platform_device *pdev)
946 PWRAP_WDT_SRC_MASK_NO_STAUPD : PWRAP_WDT_SRC_MASK_ALL; 949 PWRAP_WDT_SRC_MASK_NO_STAUPD : PWRAP_WDT_SRC_MASK_ALL;
947 pwrap_writel(wrp, wdt_src, PWRAP_WDT_SRC_EN); 950 pwrap_writel(wrp, wdt_src, PWRAP_WDT_SRC_EN);
948 pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN); 951 pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN);
949 pwrap_writel(wrp, ~((1 << 31) | (1 << 1)), PWRAP_INT_EN); 952 pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN);
950 953
951 irq = platform_get_irq(pdev, 0); 954 irq = platform_get_irq(pdev, 0);
952 ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt, IRQF_TRIGGER_HIGH, 955 ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt, IRQF_TRIGGER_HIGH,