[PATCH] spi: mediatek: Don't modify spi_transfer when transfer.

2018-09-09 Thread Peter Shih
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a

[PATCH v2] spi: mediatek: Don't modify spi_transfer when transfer.

2018-09-09 Thread Peter Shih
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a

[PATCH] tty: serial: 8250_mtk: always resume the device in probe.

2018-11-26 Thread Peter Shih
a runtime suspend in remove. This basically reverts the change in commit 68e5fc4a255a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling"), but still use pm_runtime callbacks. Fixes: 68e5fc4a255a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling") Signe

[PATCH v3] spi: mediatek: Don't modify spi_transfer when transfer.

2018-09-19 Thread Peter Shih
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a

Re: [RFC v2 1/6] dt-bindings: Add a binding for Mediatek SCP

2019-01-15 Thread Peter Shih
On Wed, Jan 16, 2019 at 4:34 AM Rob Herring wrote: > > On Tue, Jan 08, 2019 at 01:26:01PM +0800, Pi-Hsun Shih wrote: > > From: Erin Lo > > > > Add a DT binding documentation of SCP for the > > MT8183 SoC from Mediatek. > > > > Signed-off-by: Erin Lo > > --- > > Changes from v1: > > - no change

Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-29 Thread Peter Shih
Adding Michael Kao to cc list. On Wed, Jan 9, 2019 at 1:57 PM Pi-Hsun Shih wrote: > > The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];', > but the allocation only allocates sizeof(struct mtk_thermal) bytes, > which cause out of bound access with the ->banks[] member. Change it

[PATCH] tty: serial: 8250_mtk: always resume the device in probe.

2018-11-26 Thread Peter Shih
a runtime suspend in remove. This basically reverts the change in commit 68e5fc4a255a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling"), but still use pm_runtime callbacks. Fixes: 68e5fc4a255a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling") Signe

[PATCH v7 3/7] remoteproc: mt8183: add reserved memory manager API

2019-03-26 Thread Peter Shih
From: Erin Lo Add memory table mapping API for other driver to lookup reserved physical and virtual memory Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih --- Changes from v6: - No change. Changes from v5: - No change. Changes from v4: - New patch. --- drivers/remoteproc/mtk_scp.c

[PATCH v7 2/7] remoteproc/mediatek: add SCP support for mt8183

2019-03-26 Thread Peter Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat Signed-off-by: Pi-Hsun Shih --- Changes from v6: - No change. Changes from v5: - Changed some space to tab. Changes from v4: - Rename most function from mtk_scp_*

[PATCH v7 6/7] platform/chrome: cros_ec: add EC host command support using rpmsg.

2019-03-26 Thread Peter Shih
From: Pi-Hsun Shih Add EC host command support through rpmsg. Signed-off-by: Pi-Hsun Shih --- Changes from v6: - Make data for response aligned to 4 bytes. Changes from v5: - Change commit title. - Add documents for some structs, and fix all warning from scripts/kernel-doc. -

[PATCH v7 4/7] rpmsg: add rpmsg support for mt8183 SCP.

2019-03-26 Thread Peter Shih
From: Pi-Hsun Shih Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v6: - Decouple mtk_rpmsg from mtk_scp by putting all necessary informations (name service IPI id, register/unregister/send functions) into a struct,

[PATCH v7 1/7] dt-bindings: Add a binding for Mediatek SCP

2019-03-26 Thread Peter Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Reviewed-by: Rob Herring --- Changes from v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes from v4: - Add detail

[PATCH v7 7/7] cros_ec: differentiate SCP from EC by feature bit.

2019-03-26 Thread Peter Shih
From: Pi-Hsun Shih Since a SCP and EC would both exist on a system, and use the cros_ec_dev driver, we need to differentiate between them for the userspace, or they would both be registered at /dev/cros_ec, causing a conflict. Signed-off-by: Pi-Hsun Shih --- Changes from v6: - No change.

[PATCH v7 5/7] dt-bindings: Add binding for cros-ec-rpmsg.

2019-03-26 Thread Peter Shih
From: Pi-Hsun Shih Add a DT binding documentation for ChromeOS EC driver over rpmsg. Signed-off-by: Pi-Hsun Shih --- Changes from v6: - No change. Changes from v5: - New patch. --- Documentation/devicetree/bindings/mfd/cros-ec.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [RFC v2 3/6] remoteproc: move IPI interface into separate file.

2019-01-20 Thread Peter Shih
On Sat, Jan 19, 2019 at 5:04 AM Nicolas Boichat wrote: > > Hi, > > On Mon, Jan 7, 2019 at 9:26 PM Pi-Hsun Shih wrote: > > > > Move the IPI interface into a separate file mtk_scp_ipi.c, so the things > > that use the interface only can depend on the module only. > > > > Signed-off-by: Pi-Hsun

Re: [RFC,5/5] mfd: cros_ec: add EC host command support using rpmsg.

2019-01-06 Thread Peter Shih
On Fri, Jan 4, 2019 at 7:39 PM Enric Balletbo Serra wrote: > > Hi Peter, > > Missatge de Peter Shih del dia dv., 4 de gen. > 2019 a les 8:58: > > > > Thanks for the review. > > I would leave some formatting comment to v2, and reply others first. > > &g

Re: [RFC,5/5] mfd: cros_ec: add EC host command support using rpmsg.

2019-01-03 Thread Peter Shih
Thanks for the review. I would leave some formatting comment to v2, and reply others first. On Fri, Jan 4, 2019 at 12:05 AM Enric Balletbo Serra wrote: > > Hi, > > Many thanks for sending this. Please, add Guenter and me for next > versions, we are interested in it, thanks :) > > Missatge de

[PATCH] spi: mediatek: Don't modify spi_transfer when transfer.

2018-09-09 Thread Peter Shih
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a

[PATCH v2] spi: mediatek: Don't modify spi_transfer when transfer.

2018-09-09 Thread Peter Shih
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a

[PATCH v3] spi: mediatek: Don't modify spi_transfer when transfer.

2018-09-19 Thread Peter Shih
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a