0035-soc-mediatek-PMIC-wrap-WRAP_INT_EN-needs-a-different.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 7046dc2a485b2b2ec993d7c933820c8ae2b45718 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <[email protected]>
  3. Date: Wed, 20 Jan 2016 10:14:39 +0100
  4. Subject: [PATCH 35/91] soc: mediatek: PMIC wrap: WRAP_INT_EN needs a
  5. different bitmask for MT2701/7623
  6. MT2701 and MT7623 use a different bitmask for PWRAP_INT_EN.
  7. Signed-off-by: John Crispin <[email protected]>
  8. ---
  9. drivers/soc/mediatek/mtk-pmic-wrap.c | 5 ++++-
  10. 1 file changed, 4 insertions(+), 1 deletion(-)
  11. diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
  12. index 22c89e9..9df1135 100644
  13. --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
  14. +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
  15. @@ -371,6 +371,7 @@ struct pmic_wrapper_type {
  16. int *regs;
  17. enum pwrap_type type;
  18. u32 arb_en_all;
  19. + u32 int_en_all;
  20. int (*init_reg_clock)(struct pmic_wrapper *wrp);
  21. int (*init_soc_specific)(struct pmic_wrapper *wrp);
  22. };
  23. @@ -825,6 +826,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = {
  24. .regs = mt8135_regs,
  25. .type = PWRAP_MT8135,
  26. .arb_en_all = 0x1ff,
  27. + .int_en_all = ~(BIT(31) | BIT(1)),
  28. .init_reg_clock = pwrap_mt8135_init_reg_clock,
  29. .init_soc_specific = pwrap_mt8135_init_soc_specific,
  30. };
  31. @@ -833,6 +835,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = {
  32. .regs = mt8173_regs,
  33. .type = PWRAP_MT8173,
  34. .arb_en_all = 0x3f,
  35. + .int_en_all = ~(BIT(31) | BIT(1)),
  36. .init_reg_clock = pwrap_mt8173_init_reg_clock,
  37. .init_soc_specific = pwrap_mt8173_init_soc_specific,
  38. };
  39. @@ -946,7 +949,7 @@ static int pwrap_probe(struct platform_device *pdev)
  40. PWRAP_WDT_SRC_MASK_NO_STAUPD : PWRAP_WDT_SRC_MASK_ALL;
  41. pwrap_writel(wrp, wdt_src, PWRAP_WDT_SRC_EN);
  42. pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN);
  43. - pwrap_writel(wrp, ~((1 << 31) | (1 << 1)), PWRAP_INT_EN);
  44. + pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN);
  45. irq = platform_get_irq(pdev, 0);
  46. ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt, IRQF_TRIGGER_HIGH,
  47. --
  48. 1.7.10.4