[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

[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 Documentation/devicetr

[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 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

[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

[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,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

[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 ++ include/linux/platform_data/mt

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

2018-12-25 Thread Pi-Hsun Shih
iew / comments 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 E

[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 Documentation/devicetree/bindings/remoteproc/mtk,scp.txt

[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/remot

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

2019-04-18 Thread Pi-Hsun Shih
x13c/0x158 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 86

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

Re: [PATCH v2 2/2] platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot.

2021-01-10 Thread Pi-Hsun Shih
gentle ping on these two patches for EC_REBOOT_COLD_AP_OFF. On Mon, Dec 21, 2020 at 12:12 PM Pi-Hsun Shih wrote: > > Add cold-ap-off to ChromeOS EC sysfs reboot file option, corresponds to > the EC_REBOOT_COLD_AP_OFF flag, that will reset EC and keep AP off. > > Signed-off-b

Re: [PATCH v8 2/2] soc: mediatek: add mt6779 devapc driver

2021-01-14 Thread Pi-Hsun Shih
Hi Neal, Please see inline comments below. On Thu, Oct 15, 2020 at 11:21 AM Neal Liu wrote: > > MediaTek bus fabric provides TrustZone security support and data > protection to prevent slaves from being accessed by unexpected > masters. > The security violation is logged and sent to the processor

[PATCH] platform/chrome: cros_usbpd_notify: Listen to EC_HOST_EVENT_USB_MUX host event

2021-04-13 Thread Pi-Hsun Shih
]: https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/refs/heads/chromeos-2016.05/src/ec/google/chromeec/acpi/ec.asl#382 Signed-off-by: Pi-Hsun Shih --- drivers/platform/chrome/cros_usbpd_notify.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 1/2] platform/chrome: cros_ec: Add host command to keep AP off after EC reset.

2020-12-20 Thread Pi-Hsun Shih
Add command to EC_CMD_REBOOT_EC to reset EC but don't boot AP. Signed-off-by: Pi-Hsun Shih --- include/linux/platform_data/cros_ec_commands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_comma

[PATCH v2 2/2] platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot.

2020-12-20 Thread Pi-Hsun Shih
Add cold-ap-off to ChromeOS EC sysfs reboot file option, corresponds to the EC_REBOOT_COLD_AP_OFF flag, that will reset EC and keep AP off. Signed-off-by: Pi-Hsun Shih --- drivers/platform/chrome/cros_ec_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH 1/2] platform/chrome: cros_ec: Add host command to keep AP off after EC reset.

2020-12-17 Thread Pi-Hsun Shih
Add command to EC_CMD_REBOOT_EC to reset EC but don't boot AP. Signed-off-by: Pi-Hsun Shih --- The corresponding changes in ChromeOS EC firmware is at crrev.com/c/2428361 --- include/linux/platform_data/cros_ec_commands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/

[PATCH 2/2] platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot.

2020-12-17 Thread Pi-Hsun Shih
Signed-off-by: Pi-Hsun Shih --- drivers/platform/chrome/cros_ec_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c index f521a5c65091..8210fb10e839 100644 --- a/drivers/platform/chrome

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 spdxcheck.py, an

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

2019-09-03 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 v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on

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

2019-09-03 Thread Pi-Hsun Shih
SCP into separate patch (Patch 6). Eddie Huang (1): arm64: dts: mt8183: add scp node Erin Lo (3): dt-bindings: Add a binding for Mediatek SCP remoteproc/mediatek: add SCP support for mt8183 remoteproc: mt8183: add reserved memory manager API Pi-Hsun Shih (1): rpmsg: add rpmsg suppo

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

2019-09-03 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 v16: - Change the desc_lock mutex to be a per-id lock. - Put the execution of handler inside the per-id lock, to prevent

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

2019-09-03 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 v16, v15, v14: - No change. Changes from v13: - Change the size of the cfg register region. Changes from v12, v11, v10: - No change

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

2019-09-03 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 v16, v15: - No change. Changes from v14: - Fix a typo in variable name in DEBUG section. Changes from v13: - Add

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

2019-09-03 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 v16: - Change year on another Copyright header to 2019. Changes from v15: - No change. Changes from v14: - Change year on Copyright header to 2019. Changes from v13: - No

[PATCH] platform/chrome: cros_ec_rpmsg: Fix race with host command when probe failed.

2019-09-03 Thread Pi-Hsun Shih
's no more new calls to cros_ec_rpmsg_callback), and then cancel all works in the host_event_work workqueue. Fixes: 2de89fd98958 ("platform/chrome: cros_ec: Add EC host command support using rpmsg") Signed-off-by: Pi-Hsun Shih --- drivers/platform/chrome/cros_ec_rpmsg.c | 33

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

2019-08-15 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 v15: - No change. Changes from v14: - Fix a typo in variable name in DEBUG section. Changes from v13: - Add one

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

2019-08-15 Thread Pi-Hsun Shih
msg.c. - Extract feature detection for SCP into separate patch (Patch 6). Eddie Huang (1): arm64: dts: mt8183: add scp node Erin Lo (3): dt-bindings: Add a binding for Mediatek SCP remoteproc/mediatek: add SCP support for mt8183 remoteproc: mt8183: add reserved memory manager API

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

2019-08-15 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 v15: - No change. Changes from v14: - Change year on Copyright header to 2019. Changes from v13: - No change. Changes from v12: - Use strscpy instead of strncpy. Changes

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

2019-08-15 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 v15, v14: - No change. Changes from v13: - Change the size of the cfg register region. Changes from v12, v11, v10: - No change. Changes

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

2019-08-15 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 v15: - Fix a bug on incorrect usage of wait_event_timeout return value. Changes from v14: - No change. Changes from

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

2019-08-15 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 v15, v14, v13, v12, v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on

Re: [PATCH] platform/chrome: cros_ec_rpmsg: Add host command AP sleep state support

2019-08-26 Thread Pi-Hsun Shih
Tested that with this patch, SCP does receive host command from AP while AP goes to suspend and back. Tested-by: Pi-Hsun Shih On Fri, Aug 23, 2019 at 3:36 AM Enric Balletbo i Serra wrote: > > Hi, > > On 14/8/19 10:17, Yilun Lin wrote: > > Add EC host command to inform EC of

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

2019-09-04 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 v17: - Mark mtk_rpmsg_{prepare,unprepare,stop} as static. Changes from v16: - Change year on another Copyright header to 2019. Changes from v15: - No change. Changes from

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

2019-09-04 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 v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on

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

2019-09-04 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 v17, v16, v15: - No change. Changes from v14: - Fix a typo in variable name in DEBUG section. Changes from v13

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

2019-09-04 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 v17: - Fix mixture use of __iomem found by sparse. - Change the ipi handler to take a u32 instead of enum scp_ipi_id

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

2019-09-04 Thread Pi-Hsun Shih
gs: Add a binding for Mediatek 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.dt

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

2019-09-04 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 v17, v16, v15, v14: - No change. Changes from v13: - Change the size of the cfg register region. Changes from v12, v11, v10: - No change

[PATCH v19 3/4] rpmsg: add rpmsg support for mt8183 SCP.

2019-09-04 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 v18: - No change. Changes from v17: - Mark mtk_rpmsg_{prepare,unprepare,stop} as static. Changes from v16: - Change year on another Copyright header to 2019. Changes from

[PATCH v19 0/4] Add support for mt8183 SCP.

2019-09-04 Thread Pi-Hsun Shih
. Eddie Huang (1): arm64: dts: mt8183: add scp node Erin Lo (2): dt-bindings: Add a binding for Mediatek SCP remoteproc/mediatek: add SCP support for mt8183 Pi-Hsun Shih (1): rpmsg: add rpmsg support for mt8183 SCP. .../bindings/remoteproc/mtk,scp.txt | 36 ++ arch/arm64/boot/dt

[PATCH v19 1/4] dt-bindings: Add a binding for Mediatek SCP

2019-09-04 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 v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency

[PATCH v19 4/4] arm64: dts: mt8183: add scp node

2019-09-04 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 v18, v17, v16, v15, v14: - No change. Changes from v13: - Change the size of the cfg register region. Changes from v12, v11, v10: - No

[PATCH v19 2/4] remoteproc/mediatek: add SCP support for mt8183

2019-09-04 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 v18: - Use of_reserved_mem_device_init_by_idx() to hook the scp device to DMA mapping API to provide a shared dma pool

[PATCH v20 1/4] dt-bindings: Add a binding for Mediatek SCP

2019-10-14 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 v19 ... v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP. Changes from v4

[PATCH v20 0/4] Add support for mt8183 SCP.

2019-10-14 Thread Pi-Hsun Shih
ix based on feedback for cros_ec_rpmsg.c. - Extract feature detection for SCP into separate patch (Patch 6). Eddie Huang (1): arm64: dts: mt8183: add scp node Erin Lo (2): dt-bindings: Add a binding for Mediatek SCP remoteproc/mediatek: add SCP support for mt8183 Pi-Hsun Shih (1): rpms

[PATCH v20 2/4] remoteproc/mediatek: add SCP support for mt8183

2019-10-14 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 v19: - No change. Changes from v18: - Use of_reserved_mem_device_init_by_idx() to hook the scp device to DMA mapping

[PATCH v20 4/4] arm64: dts: mt8183: add scp node

2019-10-14 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 v19 ... v14: - No change. Changes from v13: - Change the size of the cfg register region. Changes from v12 ... v10: - No change

[PATCH v20 3/4] rpmsg: add rpmsg support for mt8183 SCP.

2019-10-14 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 v19: - Fix an incorrect include in mtk_rpmsg.h (linux/device.h -> linux/platform_device.h) Changes from v18: - No change. Changes from v17: - Mark mtk_rpmsg_{prep

[PATCH] arm64: dts: mt8183: add dpi node to mt8183

2019-10-15 Thread Pi-Hsun Shih
Add dpi node to mt8183. Signed-off-by: Jitao Shi Signed-off-by: Pi-Hsun Shih --- This depends on https://patchwork.kernel.org/cover/11081047/ (for the dpi driver on mt8183) and https://patchwork.kernel.org/cover/8371/ (for the scpsys node). --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 11

Re: [PATCH v5 3/3] PM / AVS: SVS: Introduce SVS engine

2019-10-21 Thread Pi-Hsun Shih
Hi Roger, On Fri, Sep 6, 2019 at 6:06 PM Roger Lu wrote: > ... > +static int svs_resource_setup(struct mtk_svs *svs) > ... > + for (i = 0, freq = (u32)-1; i < svsb->opp_count; i++, freq--) > { > + opp = dev_pm_opp_find_freq_floor(svsb->dev, &freq); > +

[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

[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 cha

[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 by

[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 to

[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: - No

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 changed,

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 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 --- driver

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 + include/linux/soc/mediatek/mtk-cmd

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_

[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)

[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 scp_ipi_unregis

[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 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_SE

[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

[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

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

2019-05-19 Thread Pi-Hsun Shih
e tfm 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..8355

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

2019-08-05 Thread Pi-Hsun Shih
Thanks for the review. I'll address most of the comments in the next version. On Mon, Jul 22, 2019 at 5:37 PM Alexandre Courbot wrote: > > Hi Pi-Hsun, > > On Tue, Jul 9, 2019 at 4:27 PM Pi-Hsun Shih wrote: > > +static void *scp_da_to_va(struct rproc

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

2019-08-05 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 v13: - Move include/linux/platform_data/mtk_scp.h to include/linux/remoteproc/mtk_scp.h. - Add lock for access of scp

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

2019-08-05 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 v13: - Add one more reserved region. - Rename scp_get_reserve_* to scp_get_reserved_*. - Minor fixes addressing

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

2019-08-05 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 v13: - No change. Changes from v12: - Use strscpy instead of strncpy. Changes from v11: - Fix a bug that when rproc_boot fails, the ns_ept won't be properly dest

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

2019-08-05 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 v13: - Change the size of the cfg register region. Changes from v12, v11, v10: - No change. Changes from v9: - Remove extra reserve

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

2019-08-05 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 v13, v12, v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on CONFIG_RPMSG_MTK_SCP

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

2019-08-05 Thread Pi-Hsun Shih
t-bindings: Add a binding for Mediatek 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/mt818

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

2019-08-07 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 v14: - Fix a typo in variable name in DEBUG section. Changes from v13: - Add one more reserved region. - Rename

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

2019-08-07 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 v14: - Change year on Copyright header to 2019. Changes from v13: - No change. Changes from v12: - Use strscpy instead of strncpy. Changes from v11: - Fix a bug that when

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

2019-08-07 Thread Pi-Hsun Shih
uang (1): arm64: dts: mt8183: add scp node Erin Lo (3): dt-bindings: Add a binding for Mediatek 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/remot

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

2019-08-07 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 v14: - No change. Changes from v13: - Change the size of the cfg register region. Changes from v12, v11, v10: - No change. Changes from

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

2019-08-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 Signed-off-by: Pi-Hsun Shih Reviewed-by: Rob Herring --- Changes from v14, v13, v12, v11, v10, v9, v8, v7, v6: - No change. Changes from v5: - Remove dependency on

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

2019-08-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 Signed-off-by: Pi-Hsun Shih --- Changes from v14: - No change. Changes from v13: - Move include/linux/platform_data/mtk_scp.h to include/linux/remoteproc

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

2019-07-01 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 v12 5/5] arm64: dts: mt8183: add scp node

2019-07-01 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-01 Thread Pi-Hsun Shih
g for Mediatek 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 + a

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

2019-07-01 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-01 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, v

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

2019-07-01 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 v11: - No change. Changes from v10: - Add a clock reset before loading firmware. Changes from v9: - No change

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

2019-07-09 Thread Pi-Hsun Shih
c: 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 + drivers/remo

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

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

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

2019-07-09 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 v12: - Reformat a line to fit 80 character width. Changes from v11: - No change. Changes from v10: - Fix some

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

2019-07-09 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 v12: - Use strscpy instead of strncpy. Changes from v11: - Fix a bug that when rproc_boot fails, the ns_ept won't be properly destroyed, causing memory leak.

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

2019-07-09 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 v12, v11, v10: - No change. Changes from v9: - Remove extra reserve-memory-vpu_share node. Changes from v8: - New patch. --- arch/arm64

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

2019-07-09 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 v12: - Initialize cache before firmware load, to avoid problem while loading large firmware. - Disable watchdog

  1   2   3   >