summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch')
-rw-r--r--target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch31
1 files changed, 13 insertions, 18 deletions
diff --git a/target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch b/target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch
index 9412897..1841416 100644
--- a/target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch
+++ b/target/linux/mediatek/patches-4.4/0039-soc-mediatek-PMIC-wrap-add-a-slave-specific-struct.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 159 ++++++++++++++++++++++++----------
1 file changed, 112 insertions(+), 47 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index a2bacda..bcc841e 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -69,33 +69,54 @@
@@ -125,7 +123,7 @@ index a2bacda..bcc841e 100644
struct clk *clk_spi;
struct clk *clk_wrap;
struct reset_control *rstc;
-@@ -544,7 +575,8 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp)
+@@ -544,7 +575,8 @@ static int pwrap_init_sidly(struct pmic_
for (i = 0; i < 4; i++) {
pwrap_writel(wrp, i, PWRAP_SIDLY);
@@ -135,7 +133,7 @@ index a2bacda..bcc841e 100644
if (rdata == PWRAP_DEW_READ_TEST_VAL) {
dev_dbg(wrp->dev, "[Read Test] pass, SIDLY=%x\n", i);
pass |= 1 << i;
-@@ -593,7 +625,8 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp)
+@@ -593,7 +625,8 @@ static bool pwrap_is_pmic_cipher_ready(s
u32 rdata;
int ret;
@@ -145,7 +143,7 @@ index a2bacda..bcc841e 100644
if (ret)
return 0;
-@@ -621,12 +654,12 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -621,12 +654,12 @@ static int pwrap_init_cipher(struct pmic
}
/* Config cipher mode @PMIC */
@@ -164,7 +162,7 @@ index a2bacda..bcc841e 100644
/* wait for cipher data ready@AP */
ret = pwrap_wait_for_state(wrp, pwrap_is_cipher_ready);
-@@ -643,7 +676,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -643,7 +676,7 @@ static int pwrap_init_cipher(struct pmic
}
/* wait for cipher mode idle */
@@ -173,7 +171,7 @@ index a2bacda..bcc841e 100644
ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle);
if (ret) {
dev_err(wrp->dev, "cipher mode idle fail, ret=%d\n", ret);
-@@ -653,9 +686,11 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -653,9 +686,11 @@ static int pwrap_init_cipher(struct pmic
pwrap_writel(wrp, 1, PWRAP_CIPHER_MODE);
/* Write Test */
@@ -188,7 +186,7 @@ index a2bacda..bcc841e 100644
dev_err(wrp->dev, "rdata=0x%04X\n", rdata);
return -EFAULT;
}
-@@ -677,8 +712,10 @@ static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp)
+@@ -677,8 +712,10 @@ static int pwrap_mt8135_init_soc_specifi
writel(0x7ff, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INT_EN);
/* enable PMIC event out and sources */
@@ -201,7 +199,7 @@ index a2bacda..bcc841e 100644
dev_err(wrp->dev, "enable dewrap fail\n");
return -EFAULT;
}
-@@ -689,8 +726,10 @@ static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp)
+@@ -689,8 +726,10 @@ static int pwrap_mt8135_init_soc_specifi
static int pwrap_mt8173_init_soc_specific(struct pmic_wrapper *wrp)
{
/* PMIC_DEWRAP enables */
@@ -214,7 +212,7 @@ index a2bacda..bcc841e 100644
dev_err(wrp->dev, "enable dewrap fail\n");
return -EFAULT;
}
-@@ -734,7 +773,7 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -734,7 +773,7 @@ static int pwrap_init(struct pmic_wrappe
return ret;
/* Enable dual IO mode */
@@ -223,7 +221,7 @@ index a2bacda..bcc841e 100644
/* Check IDLE & INIT_DONE in advance */
ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle);
-@@ -746,7 +785,7 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -746,7 +785,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 1, PWRAP_DIO_EN);
/* Read Test */
@@ -232,7 +230,7 @@ index a2bacda..bcc841e 100644
if (rdata != PWRAP_DEW_READ_TEST_VAL) {
dev_err(wrp->dev, "Read test failed after switch to DIO mode: 0x%04x != 0x%04x\n",
PWRAP_DEW_READ_TEST_VAL, rdata);
-@@ -759,12 +798,13 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -759,12 +798,13 @@ static int pwrap_init(struct pmic_wrappe
return ret;
/* Signature checking - using CRC */
@@ -248,7 +246,7 @@ index a2bacda..bcc841e 100644
pwrap_writel(wrp, wrp->master->arb_en_all, PWRAP_HIPRIO_ARB_EN);
if (wrp->master->type == PWRAP_MT8135)
-@@ -818,6 +858,21 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -818,6 +858,21 @@ static const struct regmap_config pwrap_
.max_register = 0xffff,
};
@@ -270,7 +268,7 @@ index a2bacda..bcc841e 100644
static struct pmic_wrapper_type pwrap_mt8135 = {
.regs = mt8135_regs,
.type = PWRAP_MT8135,
-@@ -862,8 +917,17 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -862,8 +917,17 @@ static int pwrap_probe(struct platform_d
struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id =
of_match_device(of_pwrap_match_tbl, &pdev->dev);
@@ -288,7 +286,7 @@ index a2bacda..bcc841e 100644
wrp = devm_kzalloc(&pdev->dev, sizeof(*wrp), GFP_KERNEL);
if (!wrp)
return -ENOMEM;
-@@ -871,6 +935,7 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -871,6 +935,7 @@ static int pwrap_probe(struct platform_d
platform_set_drvdata(pdev, wrp);
wrp->master = of_id->data;
@@ -296,6 +294,3 @@ index a2bacda..bcc841e 100644
wrp->dev = &pdev->dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
---
-1.7.10.4
-