<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mailbox, branch v6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-12-21T17:31:18Z</updated>
<entry>
<title>Merge tag 'mailbox-v6.2' of git://git.linaro.org/landing-teams/working/fujitsu/integration</title>
<updated>2022-12-21T17:31:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-12-21T17:31:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2855eec19cadddad2900da3a009ee39df6116a7'/>
<id>urn:sha1:f2855eec19cadddad2900da3a009ee39df6116a7</id>
<content type='text'>
Pull mailbox updates from Jassi Brar:

 - qcom: enable sc8280xp, sm8550 and sm4250 support

 - ti: default to ARCH_K3 for msg manager

 - mediatek:
    - add mt8188 and mt8186 support
    - request irq only after got ready

 - zynq-ipi: fix error handling after device_register

 - mpfs: check sys-con status

 - rockchip: simplify by using device_get_match_data

* tag 'mailbox-v6.2' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  dt-bindings: mailbox: qcom-ipcc: Add compatible for SM8550
  mailbox: mtk-cmdq: Do not request irq until we are ready
  mailbox: zynq-ipi: fix error handling while device_register() fails
  mailbox: mtk-cmdq-mailbox: Use platform data directly instead of copying
  mailbox: arm_mhuv2: Fix return value check in mhuv2_probe()
  dt-bindings: mailbox: mediatek,gce-mailbox: add mt8188 compatible name
  dt-bindings: mailbox: add GCE header file for mt8188
  mailbox: mpfs: read the system controller's status
  mailbox: mtk-cmdq: add MT8186 support
  mailbox: mtk-cmdq: add gce ddr enable support flow
  mailbox: mtk-cmdq: add gce software ddr enable private data
  mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number
  mailbox: rockchip: Use device_get_match_data() to simplify the code
  dt-bindings: mailbox: qcom-ipcc: Add sc8280xp compatible
  mailbox: config: ti-msgmgr: Default set to ARCH_K3 for TI msg manager
  mailbox: qcom-apcs-ipc: Add SM4250 APCS IPC support
  dt-bindings: mailbox: qcom: Add SM4250 APCS compatible
</content>
</entry>
<entry>
<title>mailbox: mtk-cmdq: Do not request irq until we are ready</title>
<updated>2022-12-19T02:40:31Z</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2022-11-30T12:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16edcfef77147748c43c9c58ce18f59c61d1c357'/>
<id>urn:sha1:16edcfef77147748c43c9c58ce18f59c61d1c357</id>
<content type='text'>
If the system comes from kexec() the peripheral might trigger an IRQ
befoe we are ready for it. Triggering a crash due to an access to
invalid memory.

Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: zynq-ipi: fix error handling while device_register() fails</title>
<updated>2022-12-19T02:40:30Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-10T15:08:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6792a0cdef0b1c2d77920246283a72537e60e94'/>
<id>urn:sha1:a6792a0cdef0b1c2d77920246283a72537e60e94</id>
<content type='text'>
If device_register() fails, it has two issues:
1. The name allocated by dev_set_name() is leaked.
2. The parent of device is not NULL, device_unregister() is called
   in zynqmp_ipi_free_mboxes(), it will lead a kernel crash because
   of removing not added device.

Call put_device() to give up the reference, so the name is freed in
kobject_cleanup(). Add device registered check in zynqmp_ipi_free_mboxes()
to avoid null-ptr-deref.

Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: mtk-cmdq-mailbox: Use platform data directly instead of copying</title>
<updated>2022-12-19T02:40:30Z</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
<email>angelogioacchino.delregno@collabora.com</email>
</author>
<published>2022-11-02T10:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=acabe12c6106b105ac8285d6d5ba2aeeab74fd47'/>
<id>urn:sha1:acabe12c6106b105ac8285d6d5ba2aeeab74fd47</id>
<content type='text'>
Copying platform data to struct cmdq serves to no purpose, as that
data is never modified during runtime: it's worth at this point
storing a pointer to gce_plat in gce and.

Remove all duplicated `struct gce_plat` members from `struct gce`
and reuse the platform data across the driver to save some memory.

Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Reviewed-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: arm_mhuv2: Fix return value check in mhuv2_probe()</title>
<updated>2022-12-19T02:40:30Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-25T06:35:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=165b7643f2df890066b1b4e8a387888a600ca9bf'/>
<id>urn:sha1:165b7643f2df890066b1b4e8a387888a600ca9bf</id>
<content type='text'>
If devm_of_iomap() fails, it returns ERR_PTR() and never
return NULL, so replace NULL pointer check with IS_ERR()
to fix this problem.

Fixes: 5a6338cce9f4 ("mailbox: arm_mhuv2: Add driver")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: mpfs: read the system controller's status</title>
<updated>2022-12-19T02:40:30Z</updated>
<author>
<name>Conor Dooley</name>
<email>conor.dooley@microchip.com</email>
</author>
<published>2022-11-23T17:56:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab47d0bfdf88faac0eb02749e5bfaa306e004300'/>
<id>urn:sha1:ab47d0bfdf88faac0eb02749e5bfaa306e004300</id>
<content type='text'>
Some services explicitly return an error code in their response, but
others rely on the system controller to set a status in its status
register. The meaning of the bits varies based on what service is
requested, so pass it back up to the driver that requested the service
in the first place. The field in the message struct already existed, but
was unused until now.

If the system controller is busy, in which case we should never actually
be in the interrupt handler, or if the service fails the mailbox itself
should not be read. Callers should check the status before operating on
the response.

There's an existing, but unused, #define for the mailbox mask - but it
was incorrect. It was doing a GENMASK_ULL(32, 16) which should've just
been a GENMASK(31, 16), so fix that up and start using it.

Fixes: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox")
Signed-off-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Reviewed-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: mtk-cmdq: add MT8186 support</title>
<updated>2022-12-19T02:40:30Z</updated>
<author>
<name>Yongqiang Niu</name>
<email>yongqiang.niu@mediatek.com</email>
</author>
<published>2022-12-15T07:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=926d6214f66955f0c066175127cbcf2eaae5ad6b'/>
<id>urn:sha1:926d6214f66955f0c066175127cbcf2eaae5ad6b</id>
<content type='text'>
add MT8186 cmdq support

Signed-off-by: Yongqiang Niu &lt;yongqiang.niu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: mtk-cmdq: add gce ddr enable support flow</title>
<updated>2022-12-19T02:40:30Z</updated>
<author>
<name>Yongqiang Niu</name>
<email>yongqiang.niu@mediatek.com</email>
</author>
<published>2022-12-15T07:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7abd037aa581dcdc16c30ebdea758a4e3877f8e1'/>
<id>urn:sha1:7abd037aa581dcdc16c30ebdea758a4e3877f8e1</id>
<content type='text'>
add gce ddr enable control flow when gce suspend/resume

when all cmdq instruction task has been processed done,
we need set this gce ddr enable to disable status to tell
cmdq hardware gce there is none task need process, and the hardware
can go into idle mode and no access ddr anymore, then the spm can go
into suspend.

the original issue is gce still access ddr when cmdq suspend function
call, but there is no task run.
so, we need control gce access ddr with this flow.
when cmdq suspend function, there is no task need process, we can
disable gce access ddr, to make sure system go into suspend success.

Signed-off-by: Yongqiang Niu &lt;yongqiang.niu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: mtk-cmdq: add gce software ddr enable private data</title>
<updated>2022-12-19T02:40:29Z</updated>
<author>
<name>Yongqiang Niu</name>
<email>yongqiang.niu@mediatek.com</email>
</author>
<published>2022-12-15T07:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63f40a7f5dbdb70f8574754475346a9e72ccef6c'/>
<id>urn:sha1:63f40a7f5dbdb70f8574754475346a9e72ccef6c</id>
<content type='text'>
if gce work control by software, we need set software enable
for MT8186 Soc

there is a handshake flow between gce and ddr hardware,
if not set ddr enable flag of gce, ddr will fall into idle
mode, then gce instructions will not process done.
we need set this flag of gce to tell ddr when gce is idle or busy
controlled by software flow.

0x48[2:0] means control by software
0x48[18:16] means ddr enable
0x48[2:0] is pre-condition of 0x48[18:16].
if we want set 0x48[18:16] ddr enable, 0x48[2:0] must be set at same
time.
and only these bits is useful, other bits is useless bits

Signed-off-by: Yongqiang Niu &lt;yongqiang.niu@mediatek.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
<entry>
<title>mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number</title>
<updated>2022-12-19T02:40:29Z</updated>
<author>
<name>Yongqiang Niu</name>
<email>yongqiang.niu@mediatek.com</email>
</author>
<published>2022-12-15T07:28:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23ba2e7fa282dd8e6c51c284ab1ea184c96c88b2'/>
<id>urn:sha1:23ba2e7fa282dd8e6c51c284ab1ea184c96c88b2</id>
<content type='text'>
Use GCE_CTRL_BY_SW definition instead of number

Signed-off-by: Yongqiang Niu &lt;yongqiang.niu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
</entry>
</feed>
