Thread (28 messages) 28 messages, 7 authors, 2015-06-26

[PATCH v2 4/6] soc: mediatek: Add SMI driver

From: yong.wu@mediatek.com (Yong Wu)
Date: 2015-05-21 07:38:46
Also in: linux-devicetree, linux-iommu, linux-mediatek, lkml

On Thu, 2015-05-21 at 09:30 +0200, Matthias Brugger wrote:
2015-05-21 8:16 GMT+02:00 Yong Wu [off-list ref]:
quoted
Hi Matthias,
     Thanks very much for your suggestion.
     Abort the smi clock name, Could you help check below.
     The others I will improve in next time.

On Tue, 2015-05-19 at 13:14 +0200, Matthias Brugger wrote:
quoted
2015-05-15 11:43 GMT+02:00 Yong Wu [off-list ref]:
quoted
    This patch add SMI(Smart Multimedia Interface) driver. This driver is
responsible to enable/disable iommu and control the clocks of each local arbiter.
[snip]
quoted
quoted
+
+#define SMI_LARB_MMU_EN                (0xf00)
+#define F_SMI_MMU_EN(port)     (1 << (port))
+
+enum {
+       MTK_CLK_APB,
+       MTK_CLK_SMI,
+       MTK_CLK_MAX,
Maybe add something like:
MTK_CLK_FIRST = MTK_CLK_APB,
to make the for loops better readable.
Then, Is it like this? :
 enum {
        MTK_CLK_FIRST = MTK_CLK_APB,
        MTK_CLK_SMI,
        MTK_CLK_MAX,
 }
or the CLK_SMI also need MTK_CLK_SECOND = MTK_CLK_SMI.

something like:
enum {
         MTK_CLK_FIRST,
         MTK_CLK_APB = MTK_CLK_FIRST,
         MTK_CLK_SMI,
         MTK_CLK_LAST,
}

So you can rewrite the for loop:
if (i = MTK_CLK_FIRST; i < MTK_CLK_LAST; i++)
Get it.
Thanks very much.
Regards,
Matthias
quoted
quoted
quoted
+};
+
+struct mtk_smi_common {
+       void __iomem            *base;
That seems to be never used. Please delete it.
quoted
+       struct clk              *clk[MTK_CLK_MAX];
+};
+
+struct mtk_smi_larb {
+       void __iomem            *base;
+       spinlock_t              portlock; /* lock for config port */
+       struct clk              *clk[MTK_CLK_MAX];
+       struct device           *smi;
+};
+
Thanks,
Matthias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help