lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211210175223.31131-7-flora.fu@mediatek.com>
Date:   Sat, 11 Dec 2021 01:52:17 +0800
From:   Flora Fu <flora.fu@...iatek.com>
To:     Matthias Brugger <matthias.bgg@...il.com>,
        Pi-Cheng Chen <pi-cheng.chen@...iatek.com>,
        Yong Wu <yong.wu@...iatek.com>
CC:     <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>,
        Flora Fu <flora.fu@...iatek.com>,
        JB Tsai <jb.tsai@...iatek.com>
Subject: [PATCH 06/12] soc: mediatek: apu: Add MT8195 APU power driver

Add APU power driver for MT8195 to support for
subsys clock and regulator controller.

Signed-off-by: Flora Fu <flora.fu@...iatek.com>

---
 drivers/soc/mediatek/apusys/apu-pwr.c | 34 ++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/mediatek/apusys/apu-pwr.c b/drivers/soc/mediatek/apusys/apu-pwr.c
index e8e54a767aff..73e08b442558 100644
--- a/drivers/soc/mediatek/apusys/apu-pwr.c
+++ b/drivers/soc/mediatek/apusys/apu-pwr.c
@@ -578,10 +578,25 @@ static struct apupwr_plat_data mt8192_apu_power_data = {
 	.ops = &mt8192_pwr_ops,
 };
 
+static const struct apupwr_plat_reg mt8195_pwr_reg = {
+	.opp_user = 0x40,
+	.opp_thermal = 0x44,
+	.opp_curr = 0x48,
+	.opp_mask = 0xF,
+};
+
+static struct apupwr_plat_data mt8195_apu_power_data = {
+	.dvfs_user = MDLA1,
+	.plat_regs = &mt8195_pwr_reg,
+};
+
 static const struct of_device_id apu_power_of_match[] = {
 	{
 		.compatible = "mediatek,mt8192-apu-power",
 		.data = &mt8192_apu_power_data
+	}, {
+		.compatible = "mediatek,mt8195-apu-power",
+		.data = &mt8195_apu_power_data
 	}, {
 		/* Terminator */
 	},
@@ -597,13 +612,30 @@ static struct platform_driver apu_power_driver = {
 	},
 };
 
+static const struct of_device_id apu_combo_iommu[] = {
+	{ .compatible = "mediatek,apu_combo_iommu0"},
+	{ .compatible = "mediatek,apu_combo_iommu1"},
+	{},
+};
+MODULE_DEVICE_TABLE(of, apu_combo_iommu);
+
+static struct platform_driver apu_combo_iommu_driver = {
+	.driver = {
+		.name = "apu_combo_iommu",
+		.of_match_table = of_match_ptr(apu_combo_iommu),
+	},
+};
+
 static int __init apu_power_drv_init(void)
 {
-	return platform_driver_register(&apu_power_driver);
+	platform_driver_register(&apu_power_driver);
+	platform_driver_register(&apu_combo_iommu_driver);
+	return 0;
 }
 
 static void __exit apu_power_drv_exit(void)
 {
+	platform_driver_unregister(&apu_combo_iommu_driver);
 	platform_driver_unregister(&apu_power_driver);
 }
 
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ