[PATCH v12 3/5] remoteproc: mt8183: add reserved memory manager API

2019-07-02 Thread Pi-Hsun 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 v11: - No change. Changes from v10: - Fix some type mismatch warnings when printing debug messages. Changes from

[PATCH v12 4/5] rpmsg: add rpmsg support for mt8183 SCP.

2019-07-02 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v11: - Fix a bug that when rproc_boot fails, the ns_ept won't be properly destroyed, causing memory leak. - Add documentation for mtk_rpmsg_info. Changes from v10, v9, v8

[PATCH v12 5/5] arm64: dts: mt8183: add scp node

2019-07-02 Thread Pi-Hsun Shih
From: Eddie Huang Add scp node to mt8183 and mt8183-evb Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Signed-off-by: Eddie Huang --- Changes from v11, v10: - No change. Changes from v9: - Remove extra reserve-memory-vpu_share node. Changes from v8: - New patch. --- arch/arm64/boot

[PATCH v12 0/5] Add support for mt8183 SCP.

2019-07-02 Thread Pi-Hsun Shih
atek SCP remoteproc/mediatek: add SCP support for mt8183 remoteproc: mt8183: add reserved memory manager API Pi-Hsun Shih (1): rpmsg: add rpmsg support for mt8183 SCP. .../bindings/remoteproc/mtk,scp.txt | 36 + arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 11 + arch/arm64/

[PATCH v12 1/5] dt-bindings: Add a binding for Mediatek SCP

2019-07-02 Thread Pi-Hsun 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 v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes

[PATCH v11 1/5] dt-bindings: Add a binding for Mediatek SCP

2019-06-13 Thread Pi-Hsun 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 v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes from

[PATCH v11 5/5] arm64: dts: mt8183: add scp node

2019-06-13 Thread Pi-Hsun Shih
From: Eddie Huang Add scp node to mt8183 and mt8183-evb Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Signed-off-by: Eddie Huang --- Changes from v10: - No change. Changes from v9: - Remove extra reserve-memory-vpu_share node. Changes from v8: - New patch. --- arch/arm64/boot/dts

[PATCH v11 0/5] Add support for mt8183 SCP.

2019-06-13 Thread Pi-Hsun Shih
8183 remoteproc: mt8183: add reserved memory manager API Pi-Hsun Shih (1): rpmsg: add rpmsg support for mt8183 SCP. .../bindings/remoteproc/mtk,scp.txt | 36 + arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 11 + arch/arm64/boot/dts/mediatek/mt8183.dtsi | 12 + dri

[PATCH v11 4/5] rpmsg: add rpmsg support for mt8183 SCP.

2019-06-13 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v10, v9, v8, v7: - No change. Changes from v6: - Decouple mtk_rpmsg from mtk_scp by putting all necessary informations (name service IPI id, register/unregister/send

[PATCH v11 2/5] remoteproc/mediatek: add SCP support for mt8183

2019-06-13 Thread Pi-Hsun 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 v10: - Add a clock reset before loading firmware. Changes from v9: - No change. Changes from v8: - Add a missing

[PATCH v11 3/5] remoteproc: mt8183: add reserved memory manager API

2019-06-13 Thread Pi-Hsun 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 v10: - Fix some type mismatch warnings when printing debug messages. Changes from v9: - No change. Changes from v8

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

2019-06-02 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v9, v8, v7: - No change. Changes from v6: - Decouple mtk_rpmsg from mtk_scp by putting all necessary informations (name service IPI id, register/unregister/send functions

[PATCH v10 6/7] mfd: cros_ec: differentiate SCP from EC by feature bit.

2019-06-02 Thread Pi-Hsun Shih
/cros_ec, causing a conflict. Signed-off-by: Pi-Hsun Shih Acked-by: Enric Balletbo i Serra --- Changes from v9: - Remove changes in cros_ec_commands.h (which is sync in https://lore.kernel.org/lkml/20190518063949.GY4319@dell/T/). Changes from v8: - No change. Changes from v7: - Address

[PATCH v10 7/7] arm64: dts: mt8183: add scp node

2019-06-02 Thread Pi-Hsun Shih
From: Eddie Huang Add scp node to mt8183 and mt8183-evb Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Signed-off-by: Eddie Huang --- Changes from v9: - Remove extra reserve-memory-vpu_share node. Changes from v8: - New patch. --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 11

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

2019-06-02 Thread Pi-Hsun 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 v9: - No change. Changes from v8: - Add more reserved regions for camera ISP. Changes from v7, v6, v5

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

2019-06-02 Thread Pi-Hsun Shih
Add a DT binding documentation for ChromeOS EC driver over rpmsg. Signed-off-by: Pi-Hsun Shih Acked-by: Rob Herring --- Changes from v9, v8, v7, v6: - No change. Changes from v5: - New patch. --- Documentation/devicetree/bindings/mfd/cros-ec.txt | 5 - 1 file changed, 4 insertions(+), 1

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

2019-06-02 Thread Pi-Hsun 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 v9: - No change. Changes from v8: - Add a missing space. Changes from v7: - Moved the location of shared SCP buffer

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

2019-06-02 Thread Pi-Hsun 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 v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes from v4

[PATCH v10 0/7] Add support for mt8183 SCP.

2019-06-02 Thread Pi-Hsun Shih
proc: mt8183: add reserved memory manager API Pi-Hsun Shih (3): rpmsg: add rpmsg support for mt8183 SCP. dt-bindings: Add binding for cros-ec-rpmsg. mfd: cros_ec: differentiate SCP from EC by feature bit. .../devicetree/bindings/mfd/cros-ec.txt | 5 +- .../bindings/remoteproc/mtk,scp

[PATCH v9 7/7] arm64: dts: mt8183: add scp node

2019-05-31 Thread Pi-Hsun Shih
From: Eddie Huang Add scp node to mt8183 and mt8183-evb Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih --- Changes from v8: - New patch. --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 18 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi| 12 2 files

[PATCH v9 6/7] mfd: cros_ec: differentiate SCP from EC by feature bit.

2019-05-31 Thread Pi-Hsun Shih
/cros_ec, causing a conflict. Signed-off-by: Pi-Hsun Shih --- Changes from v8: - No change. Changes from v7: - Address comments in v7. - Rebase the series onto https://lore.kernel.org/patchwork/patch/1059196/. Changes from v6, v5, v4, v3, v2: - No change. Changes from v1: - New patch

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

2019-05-31 Thread Pi-Hsun 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 v8: - Add a missing space. Changes from v7: - Moved the location of shared SCP buffer. - Fix clock enable/disable

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

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

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

2019-05-31 Thread Pi-Hsun 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 v8, v7, v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes from v4

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

2019-05-31 Thread Pi-Hsun 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 v8: - Add more reserved regions for camera ISP. Changes from v7, v6, v5: - No change. Changes from v4: - New

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

2019-05-31 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v8, v7: - No change. Changes from v6: - Decouple mtk_rpmsg from mtk_scp by putting all necessary informations (name service IPI id, register/unregister/send functions

[PATCH] pstore: Set tfm to NULL on free_buf_for_compression.

2019-05-20 Thread Pi-Hsun Shih
pointer is not NULL. Fixes: 95047b0519c1 ("pstore: Refactor compression initialization") Signed-off-by: Pi-Hsun Shih --- fs/pstore/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 75887a269b64..8355a4663

[PATCH] wireless: Use offsetof instead of custom macro.

2019-04-18 Thread Pi-Hsun Shih
ret_from_fork+0x10/0x18 === Signed-off-by: Pi-Hsun Shih --- include/uapi/linux/wireless.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/uapi/linux/wireless.h b/include/uapi/linux/wireless.h index 86eca3208b6b

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

2019-04-12 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Signed-off-by: Pi-Hsun Shih --- Changes from v7: - Remove one unnecessary dev_err. 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

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

2019-04-12 Thread Pi-Hsun Shih
/cros_ec, causing a conflict. Signed-off-by: Pi-Hsun Shih --- Changes from v7: - Address comments in v7. - Rebase the series onto https://lore.kernel.org/patchwork/patch/1059196/. Changes from v6: - No change. Changes from v5: - No change. Changes from v4: - No change. Changes from v3

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

2019-04-12 Thread Pi-Hsun 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 v7: - Moved the location of shared SCP buffer. - Fix clock enable/disable sequence. - Add more IPI ID that would

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

2019-04-12 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v7: - No change. Changes from v6: - Decouple mtk_rpmsg from mtk_scp by putting all necessary informations (name service IPI id, register/unregister/send functions

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

2019-04-12 Thread Pi-Hsun Shih
Add a DT binding documentation for ChromeOS EC driver over rpmsg. Signed-off-by: Pi-Hsun Shih Acked-by: Rob Herring --- Changes from v7: - No change. Changes from v6: - No change. Changes from v5: - New patch. --- Documentation/devicetree/bindings/mfd/cros-ec.txt | 5 - 1 file changed

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

2019-04-12 Thread Pi-Hsun 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 v7: - No change. Changes from v6: - No change. Changes from v5: - No change. Changes from v4: - New patch

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

2019-04-12 Thread Pi-Hsun 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 v7: - No change. Changes from v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP

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

2019-04-10 Thread Pi-Hsun Shih
Hi, On Thu, Mar 28, 2019 at 7:16 PM Enric Balletbo Serra wrote: > > Hi > > Thanks for sending this upstream, Some few comments and questions > below. Apart from these LGTM. > > Missatge de Peter Shih del dia dc., 27 de març > 2019 a les 6:17: > > > > Fro

[PATCH v2] mm/swap: Use offsetof instead of custom __swapoffset macro.

2019-03-12 Thread Pi-Hsun Shih
__arm64_sys_swapon+0x1c/0x24 el0_svc_common+0xa8/0x150 el0_svc_compat_handler+0x2c/0x38 el0_svc_compat+0x8/0x18 Signed-off-by: Pi-Hsun Shih --- include/linux/swap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index fc50e21b3b88

Re: [PATCH] mm/swap: Avoid undefined behavior in __swapoffset

2019-03-12 Thread Pi-Hsun Shih
On Tue, Mar 12, 2019 at 4:07 PM Michal Hocko wrote: > > On Tue 12-03-19 15:02:38, Pi-Hsun Shih wrote: > > On Thu, Mar 7, 2019 at 9:23 PM Michal Hocko wrote: > > > > > > On Thu 07-03-19 20:47:52, Pi-Hsun Shih wrote: > > > > On Thu,

Re: [PATCH] mm/swap: Avoid undefined behavior in __swapoffset

2019-03-12 Thread Pi-Hsun Shih
On Thu, Mar 7, 2019 at 9:23 PM Michal Hocko wrote: > > On Thu 07-03-19 20:47:52, Pi-Hsun Shih wrote: > > On Thu, Mar 7, 2019 at 8:23 PM Michal Hocko wrote: > > > > > > On Thu 07-03-19 17:46:50, Pi-Hsun Shih wrote: > > > > Use offsetof to calculate off

[PATCH] mfd: mt6397: Don't call irq_dispose_mapping.

2019-03-11 Thread Pi-Hsun Shih
rning when unbinding the driver. Fixes: e695d3a0b3b3 ("mfd: mt6397: Create irq mappings in mfd core driver") Signed-off-by: Pi-Hsun Shih --- drivers/rtc/rtc-mt6397.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rt

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

2019-03-11 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Signed-off-by: Pi-Hsun Shih --- Changes from v5: - Change commit title. - Add documents for some structs, and fix all warning from scripts/kernel-doc. - Miscellaneous fixes based on feedback. Changes from v4: - Change from work queue

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

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

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

2019-03-11 Thread 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 v5: - No change. Changes from v4

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

2019-03-11 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat --- Changes from v5: - Changed some space to tab. Changes from v4: - Rename most function from mtk_scp_* to scp_*. - Change the irq to threaded handler. - Load ELF

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

2019-03-11 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v5: - CONFIG_MTK_SCP now selects CONFIG_RPMSG_MTK_SCP, and the dummy implementation for mtk_rpmsg_{create,destroy}_rproc_subdev when CONFIG_RPMSG_MTK_SCP is not defined

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

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

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

2019-03-11 Thread Pi-Hsun Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo --- Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes from v4: - Add detail of more properties. - Document the usage of mtk,rpmsg-name in subnode from the new

Re: [PATCH] mm/swap: Avoid undefined behavior in __swapoffset

2019-03-07 Thread Pi-Hsun Shih
On Thu, Mar 7, 2019 at 8:23 PM Michal Hocko wrote: > > On Thu 07-03-19 17:46:50, Pi-Hsun Shih wrote: > > Use offsetof to calculate offset of a field to avoid UBSAN warning like: > > > > === > > UB

[PATCH] mm/swap: Avoid undefined behavior in __swapoffset

2019-03-07 Thread Pi-Hsun Shih
el0_svc_common+0xa8/0x150 el0_svc_compat_handler+0x2c/0x38 el0_svc_compat+0x8/0x18 == Signed-off-by: Pi-Hsun Shih --- include/linux/swap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux

Re: [PATCH v2 08/10] soc: mediatek: cmdq: add polling function

2019-03-06 Thread Pi-Hsun Shih
On Wed, Mar 6, 2019 at 5:51 PM Bibby Hsieh wrote: > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c > b/drivers/soc/mediatek/mtk-cmdq-helper.c > index d3873ab..71c167c 100644 > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c > @@ -231,6 +231,27 @@

[PATCH 1/2] ASoC: mediatek: Fix UBSAN warning.

2019-03-06 Thread Pi-Hsun Shih
Note that since the code explicitly checks .mono_shift >= 0 and .fs_shift >= 0 before using them in '<<' operator, those two members are not set to 0. Signed-off-by: Pi-Hsun Shih --- sound/soc/mediatek/common/mtk-afe-fe-dai.c | 9 - sound/soc/mediatek/mt2701/mt2

[PATCH 2/2] ASoC: mediatek: Reduce repititive code on mtk_regmap_update_bits.

2019-03-06 Thread Pi-Hsun Shih
Change the signature of mtk_regmap_update_bits to also take a shift, and warn when reg >= 0 but shift < 0. This reduce the code repetition on the calling side, and prevent future UBSAN warning when some of the xxx_shift and xxx_reg are both set to -1. Signed-off-by: Pi-Hsun Shih --- sou

[PATCH 0/2] Fix UBSAN warning in mtk-afe-fe-dai

2019-03-06 Thread Pi-Hsun Shih
This fix a UBSAN warning on mediatek mtk-afe-fe-dai, and also clean up code to prevent new config introduce the UBSAN warning again. Pi-Hsun Shih (2): ASoC: mediatek: Fix UBSAN warning. ASoC: mediatek: Reduce repititive code on mtk_regmap_update_bits. sound/soc/mediatek/common/mtk-afe-fe

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

2019-03-04 Thread Pi-Hsun Shih
On Tue, Mar 5, 2019 at 1:52 AM Rob Herring wrote: > > On Mon, Feb 25, 2019 at 12:15 AM Pi-Hsun Shih wrote: > > > > On Fri, Feb 22, 2019 at 10:43 PM Rob Herring wrote: > > > > > > On Thu, Feb 21, 2019 at 04:47:24PM +0800, Pi-Hsun Shih wrote: > > &

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

2019-02-24 Thread Pi-Hsun Shih
On Fri, Feb 22, 2019 at 10:43 PM Rob Herring wrote: > > On Thu, Feb 21, 2019 at 04:47:24PM +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 L

[PATCH v5 5/6] mfd: add EC host command support using rpmsg.

2019-02-21 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Signed-off-by: Pi-Hsun Shih --- Changes from v4: - Change from work queue to completion. - Change from matching using rpmsg id to device tree compatible, to support EC subdevices. Changes from v3: - Add host event support by adding an extra bytes

[PATCH v5 6/6] cros_ec: differentiate SCP from EC by feature bit.

2019-02-21 Thread 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 v4: - No change. Changes from v3

[PATCH v5 4/6] rpmsg: add rpmsg support for mt8183 SCP.

2019-02-21 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v4: - Match and fill the device tree node to the created rpmsg subdevice, so the rpmsg subdevice can utilize the properties and subnodes on device tree (This is similar

[PATCH v5 2/6] remoteproc/mediatek: add SCP support for mt8183

2019-02-21 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat --- Changes from v4: - Rename most function from mtk_scp_* to scp_*. - Change the irq to threaded handler. - Load ELF file instead of plain binary file as firmware

[PATCH v5 1/6] dt-bindings: Add a binding for Mediatek SCP

2019-02-21 Thread Pi-Hsun Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo --- Changes from v4: - Add detail of more properties. - Document the usage of mtk,rpmsg-name in subnode from the new design. Changes from v3: - No change. Changes from v2: - No

[PATCH v5 3/6] remoteproc: mt8183: add reserved memory manager API

2019-02-21 Thread Pi-Hsun Shih
From: Erin Lo Add memory table mapping API for other driver to lookup reserved physical and virtual memory Signed-off-by: Erin Lo --- Changes from v4: - New patch. --- drivers/remoteproc/mtk_scp.c | 110 ++ include/linux/platform_data/mtk_scp.h | 20 + 2

Re: [PATCH v4 2/6] remoteproc/mediatek: add SCP support for mt8183

2019-02-12 Thread Pi-Hsun Shih
tanding of the driver at this point ;-) > > On Thu, Jan 31, 2019 at 05:31:27PM +0800, Pi-Hsun Shih wrote: > > diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c > > new file mode 100644 > > index 00..920c81c3525c2a > > -

Re: [PATCH v4 2/6] remoteproc/mediatek: add SCP support for mt8183

2019-02-12 Thread Pi-Hsun Shih
mplete understanding of the driver at this point ;-) > > > > On Thu, Jan 31, 2019 at 05:31:27PM +0800, Pi-Hsun Shih wrote: > >> From: Erin Lo > >> > >> Provide a basic driver to control Cortex M4 co-processor > >> > >> Signed-off-by: Erin Lo >

Re: [PATCH] checkpatch: Properly detect /* */ style SPDX header.

2019-02-12 Thread Pi-Hsun Shih
On Fri, Feb 1, 2019 at 12:54 AM Joe Perches wrote: > > On Thu, 2019-01-31 at 17:56 +0800, Pi-Hsun Shih wrote: > > Currently for a header line "/* SPDX-License-Identifier: GPL-2.0 */", > > only the part starting from "SPDX-" is passed to spdxchec

[PATCH] checkpatch: Properly detect /* */ style SPDX header.

2019-01-31 Thread Pi-Hsun Shih
license with spdxcheck.py") Signed-off-by: Pi-Hsun Shih --- scripts/checkpatch.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index cfe0396c98459a..8a7cca4e2efb00 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch

[PATCH v4 2/6] remoteproc/mediatek: add SCP support for mt8183

2019-01-31 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat --- Changes from v3: - Fix some issue found by checkpatch. - Make writes aligned in scp_ipi_send. Changes from v2: - Squash patch 3 from v2 (separate the ipi

[PATCH v4 3/6] rpmsg: add rpmsg support for mt8183 SCP.

2019-01-31 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v3: - Change from unprepare to stop, to stop the rpmsg driver before the rproc is stopped, avoiding problem that some rpmsg would fail after rproc is stopped. - Add

[PATCH v4 6/6] remoteproc/mediatek: Load ELF instead of bin file for mtk_scp.

2019-01-31 Thread Pi-Hsun Shih
For better flexibility on loading firmware image, change firmware load for mtk_scp from a plain binary file to ELF format instead. Signed-off-by: Pi-Hsun Shih --- Changes from v3: - New patch to load ELF instead of plain bin file. --- drivers/remoteproc/mtk_common.h | 2 ++ drivers

[PATCH v4 4/6] mfd: add EC host command support using rpmsg.

2019-01-31 Thread Pi-Hsun Shih
Add EC host command / host event support through rpmsg. Cc: Enric Balletbo Serra Cc: Guenter Roeck Signed-off-by: Pi-Hsun Shih --- This patch depends on https://lore.kernel.org/patchwork/patch/1024376/ Changes from v3: - Add host event support by adding an extra bytes at the start of IPC

[PATCH v4 5/6] cros_ec: differentiate SCP from EC by feature bit.

2019-01-31 Thread 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. Cc: Enric Balletbo Serra Cc: Guenter Roeck Signed-off-by: Pi-Hsun Shih --- Changes

[PATCH v4 1/6] dt-bindings: Add a binding for Mediatek SCP

2019-01-31 Thread Pi-Hsun Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo Reviewed-by: Rob Herring --- Changes from v3: - No change. Changes from v2: - No change. I realized that for this patch series, there's no need to add anything under the

Re: [RFC v3 5/5] cros_ec: differentiate SCP from EC by feature bit.

2019-01-30 Thread Pi-Hsun Shih
Hi Enric, On Wed, Jan 30, 2019 at 11:06 PM Enric Balletbo Serra wrote: > > Hi Lee, Pi-Hsun, > > Missatge de Lee Jones del dia dc., 30 de gen. > 2019 a les 14:07: > > > > On Mon, 21 Jan 2019, Pi-Hsun Shih wrote: > > > > > Since a SCP and EC would both

Re: [PATCH 4/6] mfd: Add support for the MediaTek MT6358 PMIC

2019-01-30 Thread Pi-Hsun Shih
On Wed, Jan 30, 2019 at 5:19 PM Hsin-Hsiung Wang wrote: > > This adds support for the MediaTek MT6358 PMIC. This is a > multifunction device with the following sub modules: > > - Regulator > - RTC > - Codec > - Interrupt > > It is interfaced to the host controller using SPI interface > by a

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

2019-01-30 Thread Pi-Hsun Shih
On Wed, Jan 30, 2019 at 3:44 PM Daniel Lezcano wrote: > > On 30/01/2019 07:04, Peter Shih wrote: > > 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_therm

Re: [PATCH 08/10] soc: mediatek: add packet encoder function

2019-01-29 Thread Pi-Hsun Shih
On 01/29/2019 03:32 PM, Bibby Hsieh wrote: Implement a function can encode the GCE instructions Signed-off-by: Bibby Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 102 --- include/linux/mailbox/mtk-cmdq-mailbox.h | 2 +

Re: [PATCH 07/10] soc: mediatek: add cmdq_dev_get_event function

2019-01-29 Thread Pi-Hsun Shih
On 01/29/2019 03:32 PM, Bibby Hsieh wrote: When client ask gce to clear or wait for event, client need to pass event number to the API. We suggest client store the event information in device node, so we provide an API for client parse the event property. Signed-off-by: Bibby Hsieh ---

Re: [PATCH 06/10] soc: mediatek: add register device function

2019-01-29 Thread Pi-Hsun Shih
On 01/29/2019 03:32 PM, Bibby Hsieh wrote: GCE cannot know the register base address, we store the subsys-base address relationship in the device node, and store the relationship by cmdq_register_device function. Signed-off-by: Bibby Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 24

Re: [PATCH 03/10] soc: mediatek: move the CMDQ_IRQ_MASK into cmdq driver data

2019-01-29 Thread Pi-Hsun Shih
On 01/29/2019 03:32 PM, Bibby Hsieh wrote: The interrupt mask and thread number has positive correlation, so we move the CMDQ_IRQ_MASK into cmdq driver data and calculate it by thread number. Signed-off-by: Bibby Hsieh --- drivers/mailbox/mtk-cmdq-mailbox.c | 12 1 file

[PATCH 1/2] remoteproc: Add __iomem to return of rproc_da_to_va.

2019-01-20 Thread Pi-Hsun Shih
The return value of rproc_da_to_va would probably be device memory. Add __iomem annotation to it. Signed-off-by: Pi-Hsun Shih --- I feel that there might be more things that need to be changed (especially for the carveouts things). I didn't change them since I don't know how to test that part

[PATCH 2/2] remoteproc: elf_loader: Use memset_io instead of memset.

2019-01-20 Thread Pi-Hsun Shih
Use memset_io and memcpy_toio instead of memset and memcpy in rproc_elf_load_segments, since the target ptr may be device memory. Signed-off-by: Pi-Hsun Shih --- This fix issue while trying to load ELF firmware based on https://lore.kernel.org/patchwork/patch/1033804/, that the memset(..., 0

[RFC v3 3/5] rpmsg: add rpmsg support for mt8183 SCP.

2019-01-20 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Lots of TODO, and I'm not sure on all file / type / variable namings. Signed-off-by: Pi-Hsun Shih --- Changes from v2: - Unregiser IPI handler on unprepare. - Lock the channel list on operations. - Move SCP_IPI_NS_SERVICE

[RFC v3 5/5] cros_ec: differentiate SCP from EC by feature bit.

2019-01-20 Thread 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. Cc: Enric Balletbo Serra Cc: Guenter Roeck Signed-off-by: Pi-Hsun Shih --- Changes

[RFC v3 4/5] mfd: add EC host command support using rpmsg.

2019-01-20 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Cc: Enric Balletbo Serra Cc: Guenter Roeck Signed-off-by: Pi-Hsun Shih --- Changes from v2: - Wait for ipi ack instead of depends on the behavior in mtk-rpmsg. Changes from v1: - Code format fix based on feedback for cros_ec_rpmsg.c. - Extract

[RFC v3 2/5] remoteproc/mediatek: add SCP support for mt8183

2019-01-20 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat --- Changes from v2: - Squash patch 3 from v2 (separate the ipi interface) into this patch. - Remove unused name argument from scp_ipi_register. - Add

[RFC v3 1/5] dt-bindings: Add a binding for Mediatek SCP

2019-01-20 Thread Pi-Hsun Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo --- Changes from v2: - No change. I realized that for this patch series, there's no need to add anything under the mt8183-scp node (neither the mt8183-rpmsg or the cros-ec-rpmsg)

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

2019-01-08 Thread Pi-Hsun Shih
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 to a fixed size array instead. Signed-off-by: Pi-Hsun Shih --- drivers/ther

[RFC v2 5/6] mfd: add EC host command support using rpmsg.

2019-01-07 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Cc: Enric Balletbo Serra Cc: Guenter Roeck Signed-off-by: Pi-Hsun Shih --- Changes from v1: - Code format fix based on feedback for cros_ec_rpmsg.c. - Extract feature detection for SCP into separate patch (Patch 6). --- drivers/platform/chrome

[RFC v2 2/6] remoteproc/mediatek: add SCP support for mt8183

2019-01-07 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat --- Changes from v1: - Extract functions and rename variables in mtk_scp.c. --- drivers/remoteproc/Kconfig| 9 + drivers/remoteproc/Makefile |

[RFC v2 4/6] rpmsg: add rpmsg support for mt8183 SCP.

2019-01-07 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Lots of TODO, and I'm not sure on all file / type / variable namings. Signed-off-by: Pi-Hsun Shih --- Changes from v1: - Do cleanup properly in mtk_rpmsg.c, which also removes the problem of short-lived work items

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

2019-01-07 Thread Pi-Hsun Shih
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 Shih --- Changes from v1: - Resolved conflict because of change in Patch 2. --- drivers/remoteproc/Makefile | 2 +- drivers

[RFC v2 6/6] cros_ec: differentiate SCP from EC by feature bit.

2019-01-07 Thread 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. Cc: Enric Balletbo Serra Cc: Guenter Roeck Signed-off-by: Pi-Hsun Shih --- Changes

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

2019-01-07 Thread Pi-Hsun Shih
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 --- .../devicetree/bindings/remoteproc/mtk,scp.txt | 10 ++ 1 file changed, 10 insertions(+) create mode 100644

[PATCH] rpmsg: core: Make remove handler for rpmsg driver optional.

2019-01-07 Thread Pi-Hsun Shih
Most other bus (for example, SPI, i2c) have the remove handler for driver optional. Make remove handler for rpmsg driver optional too. Signed-off-by: Pi-Hsun Shih --- drivers/rpmsg/rpmsg_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_core.c b

[PATCH] arm64: Mirror arm for small unimplemented compat syscalls

2019-01-02 Thread Pi-Hsun Shih
ompat syscalls") Signed-off-by: Pi-Hsun Shih --- arch/arm64/kernel/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index 8f3371415642ad..95fd8c7ec8a171 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/ar

[RFC,4/5] rpmsg: add rpmsg support for mt8183 SCP.

2018-12-25 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- There are lots of TODO comments on things that are not done yet / I have doubt on whether it's the best way to do it. drivers/remoteproc/mtk_common.h | 3 + drivers/remoteproc

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

2018-12-25 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Signed-off-by: Pi-Hsun Shih --- drivers/mfd/cros_ec_dev.c | 9 ++ drivers/platform/chrome/Kconfig | 8 ++ drivers/platform/chrome/Makefile| 1 + drivers/platform/chrome/cros_ec_rpmsg.c | 164

[RFC,2/5] remoteproc/mediatek: add SCP support for mt8183

2018-12-25 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo --- drivers/remoteproc/Kconfig| 9 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/mtk_scp.c | 568 ++

[RFC,0/5] Add support for mt8183 SCP.

2018-12-25 Thread Pi-Hsun Shih
ents on the overall structure of the driver. Erin Lo (2): dt-bindings: Add a binding for Mediatek SCP remoteproc/mediatek: add SCP support for mt8183 Pi-Hsun Shih (3): remoteproc: move IPI interface into separate file. rpmsg: add rpmsg support for mt8183 SCP. mfd: cros_ec: add EC host com

[RFC,1/5] dt-bindings: Add a binding for Mediatek SCP

2018-12-25 Thread Pi-Hsun Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo --- .../devicetree/bindings/remoteproc/mtk,scp.txt | 10 ++ 1 file changed, 10 insertions(+) create mode 100644

[RFC,3/5] remoteproc: move IPI interface into separate file.

2018-12-25 Thread Pi-Hsun Shih
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 Shih --- drivers/remoteproc/Makefile | 2 +- drivers/remoteproc/mtk_common.h | 73 +++ drivers/remoteproc/mtk_scp.c

<    1   2   3   >