<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/soc/mediatek, branch linux-5.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE</title>
<updated>2024-06-16T11:32:02+00:00</updated>
<author>
<name>Chun-Kuang Hu</name>
<email>chunkuang.hu@kernel.org</email>
</author>
<published>2024-02-22T15:41:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b2f8354f732a54ae4f8ab9a6f5e32abcbb710e2b'/>
<id>b2f8354f732a54ae4f8ab9a6f5e32abcbb710e2b</id>
<content type='text'>
[ Upstream commit ed4d5ab179b9f0a60da87c650a31f1816db9b4b4 ]

For cmdq jump command, offset 0 means relative jump and offset 1
means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the
typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump().

Fixes: 946f1792d3d7 ("soc: mediatek: cmdq: add jump function")
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-2-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ed4d5ab179b9f0a60da87c650a31f1816db9b4b4 ]

For cmdq jump command, offset 0 means relative jump and offset 1
means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the
typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump().

Fixes: 946f1792d3d7 ("soc: mediatek: cmdq: add jump function")
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-2-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "ASoC: mediatek: Check for error clk pointer"</title>
<updated>2022-02-08T17:30:36+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2022-02-05T01:47:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=080f371d984e8039c66db87f3c54804b0d172329'/>
<id>080f371d984e8039c66db87f3c54804b0d172329</id>
<content type='text'>
This reverts commit d491a2c2cf96f9f3d855cf0bcd807d48ccb98e81 which is
commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e upstream

With this patch in the tree, Chromebooks running the affected hardware
no longer boot. Bisect points to this patch, and reverting it fixes
the problem.

An analysis of the code with this patch applied shows:

        ret = init_clks(pdev, clk);
        if (ret)
                return ERR_PTR(ret);
...
                for (j = 0; j &lt; MAX_CLKS &amp;&amp; data-&gt;clk_id[j]; j++) {
                        struct clk *c = clk[data-&gt;clk_id[j]];

                        if (IS_ERR(c)) {
                                dev_err(&amp;pdev-&gt;dev, "%s: clk unavailable\n",
                                        data-&gt;name);
                                return ERR_CAST(c);
                        }

                        scpd-&gt;clk[j] = c;
                }

Not all clocks in the clk_names array have to be present. Only the clocks
in the data-&gt;clk_id array are actually needed. The code already checks if
the required clocks are available and bails out if not. The assumption that
all clocks have to be present is wrong, and commit 9de2b9286a6d needs to be
reverted.

Fixes: 9de2b9286a6d ("ASoC: mediatek: Check for error clk pointer")
Cc: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com
Cc: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Cc: Daniel Golle &lt;daniel@makrotopia.org&gt;
Link: https://lore.kernel.org/lkml/20220205014755.699603-1-linux@roeck-us.net/
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d491a2c2cf96f9f3d855cf0bcd807d48ccb98e81 which is
commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e upstream

With this patch in the tree, Chromebooks running the affected hardware
no longer boot. Bisect points to this patch, and reverting it fixes
the problem.

An analysis of the code with this patch applied shows:

        ret = init_clks(pdev, clk);
        if (ret)
                return ERR_PTR(ret);
...
                for (j = 0; j &lt; MAX_CLKS &amp;&amp; data-&gt;clk_id[j]; j++) {
                        struct clk *c = clk[data-&gt;clk_id[j]];

                        if (IS_ERR(c)) {
                                dev_err(&amp;pdev-&gt;dev, "%s: clk unavailable\n",
                                        data-&gt;name);
                                return ERR_CAST(c);
                        }

                        scpd-&gt;clk[j] = c;
                }

Not all clocks in the clk_names array have to be present. Only the clocks
in the data-&gt;clk_id array are actually needed. The code already checks if
the required clocks are available and bails out if not. The assumption that
all clocks have to be present is wrong, and commit 9de2b9286a6d needs to be
reverted.

Fixes: 9de2b9286a6d ("ASoC: mediatek: Check for error clk pointer")
Cc: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com
Cc: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Cc: Daniel Golle &lt;daniel@makrotopia.org&gt;
Link: https://lore.kernel.org/lkml/20220205014755.699603-1-linux@roeck-us.net/
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: mediatek: Check for error clk pointer</title>
<updated>2022-01-27T09:54:08+00:00</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiasheng@iscas.ac.cn</email>
</author>
<published>2021-12-22T01:51:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d491a2c2cf96f9f3d855cf0bcd807d48ccb98e81'/>
<id>d491a2c2cf96f9f3d855cf0bcd807d48ccb98e81</id>
<content type='text'>
[ Upstream commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e ]

Yes, you are right and now the return code depending on the
init_clks().

Fixes: 6078c651947a ("soc: mediatek: Refine scpsys to support multiple platform")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Link: https://lore.kernel.org/r/20211222015157.1025853-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e ]

Yes, you are right and now the return code depending on the
init_clks().

Fixes: 6078c651947a ("soc: mediatek: Refine scpsys to support multiple platform")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Link: https://lore.kernel.org/r/20211222015157.1025853-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h</title>
<updated>2021-08-26T12:35:42+00:00</updated>
<author>
<name>Yongqiang Niu</name>
<email>yongqiang.niu@mediatek.com</email>
</author>
<published>2020-10-06T19:33:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6715cefa72f6c008cf104761331ed1cb14392caa'/>
<id>6715cefa72f6c008cf104761331ed1cb14392caa</id>
<content type='text'>
[ Upstream commit 51c0e618b219c025ddaaf14baea8942cb7e2105b ]

MMSYS is the driver which controls the routing of these DDP components,
so the definition of the mtk_ddp_comp_id enum should be placed in mtk-mmsys.h

Signed-off-by: Yongqiang Niu &lt;yongqiang.niu@mediatek.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/20201006193320.405529-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 51c0e618b219c025ddaaf14baea8942cb7e2105b ]

MMSYS is the driver which controls the routing of these DDP components,
so the definition of the mtk_ddp_comp_id enum should be placed in mtk-mmsys.h

Signed-off-by: Yongqiang Niu &lt;yongqiang.niu@mediatek.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/20201006193320.405529-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: mediatek: Check if power domains can be powered on at boot time</title>
<updated>2020-12-30T10:52:56+00:00</updated>
<author>
<name>Nicolas Boichat</name>
<email>drinkcat@chromium.org</email>
</author>
<published>2020-09-28T03:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a2eaddba03b3bfb7ca51e793b14e4d011a69de49'/>
<id>a2eaddba03b3bfb7ca51e793b14e4d011a69de49</id>
<content type='text'>
[ Upstream commit 4007844b05815717f522c7ea9914e24ad0ff6c79 ]

In the error case, where a power domain cannot be powered on
successfully at boot time (in mtk_register_power_domains),
pm_genpd_init would still be called with is_off=false, and the
system would later try to disable the power domain again, triggering
warnings as disabled clocks are disabled again (and other potential
issues).

Also print a warning splat in that case, as this should never
happen.

Fixes: c84e358718a66f7 ("soc: Mediatek: Add SCPSYS power domain driver")
Signed-off-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Link: https://lore.kernel.org/r/20200928113107.v2.1.I5e6f8c262031d0451fe7241b744f4f3111c1ce71@changeid
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 4007844b05815717f522c7ea9914e24ad0ff6c79 ]

In the error case, where a power domain cannot be powered on
successfully at boot time (in mtk_register_power_domains),
pm_genpd_init would still be called with is_off=false, and the
system would later try to disable the power domain again, triggering
warnings as disabled clocks are disabled again (and other potential
issues).

Also print a warning splat in that case, as this should never
happen.

Fixes: c84e358718a66f7 ("soc: Mediatek: Add SCPSYS power domain driver")
Signed-off-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Link: https://lore.kernel.org/r/20200928113107.v2.1.I5e6f8c262031d0451fe7241b744f4f3111c1ce71@changeid
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api</title>
<updated>2020-09-25T15:27:39+00:00</updated>
<author>
<name>Dennis YC Hsieh</name>
<email>dennis-yc.hsieh@mediatek.com</email>
</author>
<published>2020-07-07T15:45:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=23c22299cd290409c6b78f57c42b64f8dfb6dd92'/>
<id>23c22299cd290409c6b78f57c42b64f8dfb6dd92</id>
<content type='text'>
Add clear parameter to let client decide if
event should be clear to 0 after GCE receive it.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Acked-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/1594136714-11650-9-git-send-email-dennis-yc.hsieh@mediatek.com
[mb: fix commit message]
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add clear parameter to let client decide if
event should be clear to 0 after GCE receive it.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Acked-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/1594136714-11650-9-git-send-email-dennis-yc.hsieh@mediatek.com
[mb: fix commit message]
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: add jump function</title>
<updated>2020-09-25T15:27:38+00:00</updated>
<author>
<name>Dennis YC Hsieh</name>
<email>dennis-yc.hsieh@mediatek.com</email>
</author>
<published>2020-07-07T15:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=946f1792d3d7942acfbc6afa9a733f608f4622d6'/>
<id>946f1792d3d7942acfbc6afa9a733f608f4622d6</id>
<content type='text'>
Add jump function so that client can jump to any address which
contains instruction.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-8-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add jump function so that client can jump to any address which
contains instruction.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-8-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: add write_s_mask value function</title>
<updated>2020-09-25T15:27:36+00:00</updated>
<author>
<name>Dennis YC Hsieh</name>
<email>dennis-yc.hsieh@mediatek.com</email>
</author>
<published>2020-07-07T15:45:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=88a2ffc48d5bc85119ef7961df12369dcd53b4d2'/>
<id>88a2ffc48d5bc85119ef7961df12369dcd53b4d2</id>
<content type='text'>
add write_s_mask_value function in cmdq helper functions which
writes a constant value to address with mask and large dma
access support.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-7-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add write_s_mask_value function in cmdq helper functions which
writes a constant value to address with mask and large dma
access support.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-7-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: add write_s value function</title>
<updated>2020-09-25T15:27:35+00:00</updated>
<author>
<name>Dennis YC Hsieh</name>
<email>dennis-yc.hsieh@mediatek.com</email>
</author>
<published>2020-07-07T15:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1af43fce813ebd74c76d080beb261603bd0853e1'/>
<id>1af43fce813ebd74c76d080beb261603bd0853e1</id>
<content type='text'>
add write_s function in cmdq helper functions which
writes a constant value to address with large dma
access support.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-6-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add write_s function in cmdq helper functions which
writes a constant value to address with large dma
access support.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-6-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: add read_s function</title>
<updated>2020-09-25T15:27:34+00:00</updated>
<author>
<name>Dennis YC Hsieh</name>
<email>dennis-yc.hsieh@mediatek.com</email>
</author>
<published>2020-07-07T15:45:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d3b04aab06fbc33ddea15725f3ff1667c9717929'/>
<id>d3b04aab06fbc33ddea15725f3ff1667c9717929</id>
<content type='text'>
Add read_s function in cmdq helper functions which support read value from
register or dma physical address into gce internal register.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-5-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add read_s function in cmdq helper functions which support read value from
register or dma physical address into gce internal register.

Signed-off-by: Dennis YC Hsieh &lt;dennis-yc.hsieh@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594136714-11650-5-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
