* [PATCH] ARM: omap2plus_defconfig: Enable more droid4 devices as loadable modules
From: Tony Lindgren @ 2019-09-22 17:57 UTC (permalink / raw)
To: linux-omap; +Cc: linux-arm-kernel
Droid4 needs USB option serial driver for modem, and lm3532 for the
LCD backlight.
Note that the LCD backlight does not yet get enabled automatically,
but needs to be done manually with:
# echo 50 > /sys/class/leds/lm3532::backlight/brightness
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/configs/omap2plus_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -429,6 +429,7 @@ CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_SIMPLE=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_TEST=m
CONFIG_NOP_USB_XCEIV=m
CONFIG_AM335X_PHY_USB=m
@@ -466,6 +467,7 @@ CONFIG_MMC_SDHCI_OMAP=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=m
CONFIG_LEDS_CPCAP=m
+CONFIG_LEDS_LM3532=m
CONFIG_LEDS_GPIO=m
CONFIG_LEDS_PCA963X=m
CONFIG_LEDS_PWM=m
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] ARM: at91: Documentation: update the sama5d3 and armv7m datasheets
From: Alexandre Belloni @ 2019-09-22 18:00 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: Ludovic Desroches, linux-kernel, linux-arm-kernel
In-Reply-To: <20190819151219.19727-1-nicolas.ferre@microchip.com>
On 19/08/2019 17:12:19+0200, Nicolas Ferre wrote:
> Update SAMA5D3 and SAM E70/S70/V70/V71 Family SoC Datasheets. URL are
> updated in Microchip documentation.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
> Documentation/arm/microchip.rst | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH AUTOSEL 5.3 063/203] firmware: arm_scmi: Check if platform has released shmem before using
From: Sasha Levin @ 2019-09-22 18:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, linux-arm-kernel, Jim Quinlan, Sudeep Holla
In-Reply-To: <20190922184350.30563-1-sashal@kernel.org>
From: Sudeep Holla <sudeep.holla@arm.com>
[ Upstream commit 9dc34d635c67e57051853855c43249408641a5ab ]
Sometimes platfom may take too long to respond to the command and OS
might timeout before platform transfer the ownership of the shared
memory region to the OS with the response.
Since the mailbox channel associated with the channel is freed and new
commands are dispatch on the same channel, OS needs to wait until it
gets back the ownership. If not, either OS may end up overwriting the
platform response for the last command(which is fine as OS timed out
that command) or platform might overwrite the payload for the next
command with the response for the old.
The latter is problematic as platform may end up interpretting the
response as the payload. In order to avoid such race, let's wait until
the OS gets back the ownership before we prepare the shared memory with
the payload for the next command.
Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index b5bc4c7a8fab2..b49c9e6f4bf10 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -271,6 +271,14 @@ static void scmi_tx_prepare(struct mbox_client *cl, void *m)
struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl);
struct scmi_shared_mem __iomem *mem = cinfo->payload;
+ /*
+ * Ideally channel must be free by now unless OS timeout last
+ * request and platform continued to process the same, wait
+ * until it releases the shared memory, otherwise we may endup
+ * overwriting its response with new message payload or vice-versa
+ */
+ spin_until_cond(ioread32(&mem->channel_status) &
+ SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE);
/* Mark channel busy + clear error */
iowrite32(0x0, &mem->channel_status);
iowrite32(t->hdr.poll_completion ? 0 : SCMI_SHMEM_FLAG_INTR_ENABLED,
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 5.3 079/203] perf ftrace: Use CAP_SYS_ADMIN instead of euid==0
From: Sasha Levin @ 2019-09-22 18:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mathieu Poirier, Suzuki Poulouse, Alexander Shishkin,
Alexey Budankov, Igor Lubashev, James Morris,
Arnaldo Carvalho de Melo, Peter Zijlstra, Jiri Olsa, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <20190922184350.30563-1-sashal@kernel.org>
From: Igor Lubashev <ilubashe@akamai.com>
[ Upstream commit c766f3df635de14295e410c6dd5410bc416c24a0 ]
The kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs
for ftrace. Make perf do the same.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/bd8763b72ed4d58d0b42d44fbc7eb474d32e53a3.1565188228.git.ilubashe@akamai.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 0193128104056..10971255fd2dc 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -13,6 +13,7 @@
#include <signal.h>
#include <fcntl.h>
#include <poll.h>
+#include <linux/capability.h>
#include "debug.h"
#include <subcmd/parse-options.h>
@@ -21,6 +22,7 @@
#include "target.h"
#include "cpumap.h"
#include "thread_map.h"
+#include "util/cap.h"
#include "util/config.h"
@@ -281,7 +283,7 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
.events = POLLIN,
};
- if (geteuid() != 0) {
+ if (!perf_cap__capable(CAP_SYS_ADMIN)) {
pr_err("ftrace only works for root!\n");
return -1;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 5.3 090/203] ARM: dts: imx7d: cl-som-imx7: make ethernet work again
From: Sasha Levin @ 2019-09-22 18:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Rutland, devicetree, Fabio Estevam, linux-arm-kernel,
Sasha Levin, André Draszik, Sascha Hauer, Rob Herring,
Igor Grinberg, Pengutronix Kernel Team, Shawn Guo, Ilya Ledvich,
NXP Linux Team
In-Reply-To: <20190922184350.30563-1-sashal@kernel.org>
From: André Draszik <git@andred.net>
[ Upstream commit 9846a4524ac90b63496580b7ad50674b40d92a8f ]
Recent changes to the atheros at803x driver caused
ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode")
and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode")
fix the AR8031 driver to configure the phy's (RX/TX)
delays as per the 'phy-mode' in the device tree.
This now prevents ethernet from working on this board.
It used to work before those commits, because the
AR8031 comes out of reset with RX delay enabled, and
the at803x driver didn't touch the delay configuration
at all when "rgmii" mode was selected, and because
arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup()
unconditionally enables TX delay.
Since above commits ar8031_phy_fixup() also has no
effect anymore, and the end-result is that all delays
are disabled in the phy, no ethernet.
Update the device tree to restore functionality.
Signed-off-by: André Draszik <git@andred.net>
CC: Ilya Ledvich <ilya@compulab.co.il>
CC: Igor Grinberg <grinberg@compulab.co.il>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
CC: devicetree@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
index e61567437d73c..62d5e9a4a7818 100644
--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
+++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
@@ -44,7 +44,7 @@
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
fsl,magic-packet;
status = "okay";
@@ -70,7 +70,7 @@
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "okay";
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 5.2 054/185] firmware: arm_scmi: Check if platform has released shmem before using
From: Sasha Levin @ 2019-09-22 18:47 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, linux-arm-kernel, Jim Quinlan, Sudeep Holla
In-Reply-To: <20190922184924.32534-1-sashal@kernel.org>
From: Sudeep Holla <sudeep.holla@arm.com>
[ Upstream commit 9dc34d635c67e57051853855c43249408641a5ab ]
Sometimes platfom may take too long to respond to the command and OS
might timeout before platform transfer the ownership of the shared
memory region to the OS with the response.
Since the mailbox channel associated with the channel is freed and new
commands are dispatch on the same channel, OS needs to wait until it
gets back the ownership. If not, either OS may end up overwriting the
platform response for the last command(which is fine as OS timed out
that command) or platform might overwrite the payload for the next
command with the response for the old.
The latter is problematic as platform may end up interpretting the
response as the payload. In order to avoid such race, let's wait until
the OS gets back the ownership before we prepare the shared memory with
the payload for the next command.
Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index b5bc4c7a8fab2..b49c9e6f4bf10 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -271,6 +271,14 @@ static void scmi_tx_prepare(struct mbox_client *cl, void *m)
struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl);
struct scmi_shared_mem __iomem *mem = cinfo->payload;
+ /*
+ * Ideally channel must be free by now unless OS timeout last
+ * request and platform continued to process the same, wait
+ * until it releases the shared memory, otherwise we may endup
+ * overwriting its response with new message payload or vice-versa
+ */
+ spin_until_cond(ioread32(&mem->channel_status) &
+ SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE);
/* Mark channel busy + clear error */
iowrite32(0x0, &mem->channel_status);
iowrite32(t->hdr.poll_completion ? 0 : SCMI_SHMEM_FLAG_INTR_ENABLED,
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 5.2 070/185] perf ftrace: Use CAP_SYS_ADMIN instead of euid==0
From: Sasha Levin @ 2019-09-22 18:47 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mathieu Poirier, Suzuki Poulouse, Alexander Shishkin,
Alexey Budankov, Igor Lubashev, James Morris,
Arnaldo Carvalho de Melo, Peter Zijlstra, Jiri Olsa, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <20190922184924.32534-1-sashal@kernel.org>
From: Igor Lubashev <ilubashe@akamai.com>
[ Upstream commit c766f3df635de14295e410c6dd5410bc416c24a0 ]
The kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs
for ftrace. Make perf do the same.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/bd8763b72ed4d58d0b42d44fbc7eb474d32e53a3.1565188228.git.ilubashe@akamai.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 22386ab350504..2026364a61dc2 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -13,6 +13,7 @@
#include <signal.h>
#include <fcntl.h>
#include <poll.h>
+#include <linux/capability.h>
#include "debug.h"
#include <subcmd/parse-options.h>
@@ -21,6 +22,7 @@
#include "target.h"
#include "cpumap.h"
#include "thread_map.h"
+#include "util/cap.h"
#include "util/config.h"
@@ -281,7 +283,7 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
.events = POLLIN,
};
- if (geteuid() != 0) {
+ if (!perf_cap__capable(CAP_SYS_ADMIN)) {
pr_err("ftrace only works for root!\n");
return -1;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 5.2 081/185] ARM: dts: imx7d: cl-som-imx7: make ethernet work again
From: Sasha Levin @ 2019-09-22 18:47 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Rutland, devicetree, Fabio Estevam, linux-arm-kernel,
Sasha Levin, André Draszik, Sascha Hauer, Rob Herring,
Igor Grinberg, Pengutronix Kernel Team, Shawn Guo, Ilya Ledvich,
NXP Linux Team
In-Reply-To: <20190922184924.32534-1-sashal@kernel.org>
From: André Draszik <git@andred.net>
[ Upstream commit 9846a4524ac90b63496580b7ad50674b40d92a8f ]
Recent changes to the atheros at803x driver caused
ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode")
and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode")
fix the AR8031 driver to configure the phy's (RX/TX)
delays as per the 'phy-mode' in the device tree.
This now prevents ethernet from working on this board.
It used to work before those commits, because the
AR8031 comes out of reset with RX delay enabled, and
the at803x driver didn't touch the delay configuration
at all when "rgmii" mode was selected, and because
arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup()
unconditionally enables TX delay.
Since above commits ar8031_phy_fixup() also has no
effect anymore, and the end-result is that all delays
are disabled in the phy, no ethernet.
Update the device tree to restore functionality.
Signed-off-by: André Draszik <git@andred.net>
CC: Ilya Ledvich <ilya@compulab.co.il>
CC: Igor Grinberg <grinberg@compulab.co.il>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
CC: devicetree@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
index e61567437d73c..62d5e9a4a7818 100644
--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
+++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
@@ -44,7 +44,7 @@
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
fsl,magic-packet;
status = "okay";
@@ -70,7 +70,7 @@
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "okay";
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 040/128] firmware: arm_scmi: Check if platform has released shmem before using
From: Sasha Levin @ 2019-09-22 18:52 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, linux-arm-kernel, Jim Quinlan, Sudeep Holla
In-Reply-To: <20190922185418.2158-1-sashal@kernel.org>
From: Sudeep Holla <sudeep.holla@arm.com>
[ Upstream commit 9dc34d635c67e57051853855c43249408641a5ab ]
Sometimes platfom may take too long to respond to the command and OS
might timeout before platform transfer the ownership of the shared
memory region to the OS with the response.
Since the mailbox channel associated with the channel is freed and new
commands are dispatch on the same channel, OS needs to wait until it
gets back the ownership. If not, either OS may end up overwriting the
platform response for the last command(which is fine as OS timed out
that command) or platform might overwrite the payload for the next
command with the response for the old.
The latter is problematic as platform may end up interpretting the
response as the payload. In order to avoid such race, let's wait until
the OS gets back the ownership before we prepare the shared memory with
the payload for the next command.
Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 8f952f2f1a292..09119e3f5c018 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -271,6 +271,14 @@ static void scmi_tx_prepare(struct mbox_client *cl, void *m)
struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl);
struct scmi_shared_mem __iomem *mem = cinfo->payload;
+ /*
+ * Ideally channel must be free by now unless OS timeout last
+ * request and platform continued to process the same, wait
+ * until it releases the shared memory, otherwise we may endup
+ * overwriting its response with new message payload or vice-versa
+ */
+ spin_until_cond(ioread32(&mem->channel_status) &
+ SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE);
/* Mark channel busy + clear error */
iowrite32(0x0, &mem->channel_status);
iowrite32(t->hdr.poll_completion ? 0 : SCMI_SHMEM_FLAG_INTR_ENABLED,
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 051/128] perf ftrace: Use CAP_SYS_ADMIN instead of euid==0
From: Sasha Levin @ 2019-09-22 18:53 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mathieu Poirier, Suzuki Poulouse, Alexander Shishkin,
Alexey Budankov, Igor Lubashev, James Morris,
Arnaldo Carvalho de Melo, Peter Zijlstra, Jiri Olsa, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <20190922185418.2158-1-sashal@kernel.org>
From: Igor Lubashev <ilubashe@akamai.com>
[ Upstream commit c766f3df635de14295e410c6dd5410bc416c24a0 ]
The kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs
for ftrace. Make perf do the same.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/bd8763b72ed4d58d0b42d44fbc7eb474d32e53a3.1565188228.git.ilubashe@akamai.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 137955197ba8d..e0c61c572db06 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -14,6 +14,7 @@
#include <signal.h>
#include <fcntl.h>
#include <poll.h>
+#include <linux/capability.h>
#include "debug.h"
#include <subcmd/parse-options.h>
@@ -22,6 +23,7 @@
#include "target.h"
#include "cpumap.h"
#include "thread_map.h"
+#include "util/cap.h"
#include "util/config.h"
@@ -282,7 +284,7 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
.events = POLLIN,
};
- if (geteuid() != 0) {
+ if (!perf_cap__capable(CAP_SYS_ADMIN)) {
pr_err("ftrace only works for root!\n");
return -1;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 059/128] ARM: dts: imx7d: cl-som-imx7: make ethernet work again
From: Sasha Levin @ 2019-09-22 18:53 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Rutland, devicetree, Fabio Estevam, linux-arm-kernel,
Sasha Levin, André Draszik, Sascha Hauer, Rob Herring,
Igor Grinberg, Pengutronix Kernel Team, Shawn Guo, Ilya Ledvich,
NXP Linux Team
In-Reply-To: <20190922185418.2158-1-sashal@kernel.org>
From: André Draszik <git@andred.net>
[ Upstream commit 9846a4524ac90b63496580b7ad50674b40d92a8f ]
Recent changes to the atheros at803x driver caused
ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode")
and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode")
fix the AR8031 driver to configure the phy's (RX/TX)
delays as per the 'phy-mode' in the device tree.
This now prevents ethernet from working on this board.
It used to work before those commits, because the
AR8031 comes out of reset with RX delay enabled, and
the at803x driver didn't touch the delay configuration
at all when "rgmii" mode was selected, and because
arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup()
unconditionally enables TX delay.
Since above commits ar8031_phy_fixup() also has no
effect anymore, and the end-result is that all delays
are disabled in the phy, no ethernet.
Update the device tree to restore functionality.
Signed-off-by: André Draszik <git@andred.net>
CC: Ilya Ledvich <ilya@compulab.co.il>
CC: Igor Grinberg <grinberg@compulab.co.il>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
CC: devicetree@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
index 8bf365d28cacf..584418f517a88 100644
--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
+++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
@@ -43,7 +43,7 @@
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
fsl,magic-packet;
status = "okay";
@@ -69,7 +69,7 @@
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "okay";
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 4.14 38/89] perf ftrace: Use CAP_SYS_ADMIN instead of euid==0
From: Sasha Levin @ 2019-09-22 18:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mathieu Poirier, Suzuki Poulouse, Alexander Shishkin,
Alexey Budankov, Igor Lubashev, James Morris,
Arnaldo Carvalho de Melo, Peter Zijlstra, Jiri Olsa, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <20190922185717.3412-1-sashal@kernel.org>
From: Igor Lubashev <ilubashe@akamai.com>
[ Upstream commit c766f3df635de14295e410c6dd5410bc416c24a0 ]
The kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs
for ftrace. Make perf do the same.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/bd8763b72ed4d58d0b42d44fbc7eb474d32e53a3.1565188228.git.ilubashe@akamai.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 13a33fb71a6da..6f07c5541fdea 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -14,6 +14,7 @@
#include <signal.h>
#include <fcntl.h>
#include <poll.h>
+#include <linux/capability.h>
#include "debug.h"
#include <subcmd/parse-options.h>
@@ -22,6 +23,7 @@
#include "target.h"
#include "cpumap.h"
#include "thread_map.h"
+#include "util/cap.h"
#include "util/config.h"
@@ -270,7 +272,7 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
.events = POLLIN,
};
- if (geteuid() != 0) {
+ if (!perf_cap__capable(CAP_SYS_ADMIN)) {
pr_err("ftrace only works for root!\n");
return -1;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 4.14 44/89] ARM: dts: imx7d: cl-som-imx7: make ethernet work again
From: Sasha Levin @ 2019-09-22 18:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Rutland, devicetree, Fabio Estevam, linux-arm-kernel,
Sasha Levin, André Draszik, Sascha Hauer, Rob Herring,
Igor Grinberg, Pengutronix Kernel Team, Shawn Guo, Ilya Ledvich,
NXP Linux Team
In-Reply-To: <20190922185717.3412-1-sashal@kernel.org>
From: André Draszik <git@andred.net>
[ Upstream commit 9846a4524ac90b63496580b7ad50674b40d92a8f ]
Recent changes to the atheros at803x driver caused
ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode")
and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode")
fix the AR8031 driver to configure the phy's (RX/TX)
delays as per the 'phy-mode' in the device tree.
This now prevents ethernet from working on this board.
It used to work before those commits, because the
AR8031 comes out of reset with RX delay enabled, and
the at803x driver didn't touch the delay configuration
at all when "rgmii" mode was selected, and because
arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup()
unconditionally enables TX delay.
Since above commits ar8031_phy_fixup() also has no
effect anymore, and the end-result is that all delays
are disabled in the phy, no ethernet.
Update the device tree to restore functionality.
Signed-off-by: André Draszik <git@andred.net>
CC: Ilya Ledvich <ilya@compulab.co.il>
CC: Igor Grinberg <grinberg@compulab.co.il>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
CC: devicetree@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
index 3cc1fb9ce4418..60a28281d3d16 100644
--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
+++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
@@ -43,7 +43,7 @@
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
fsl,magic-packet;
status = "okay";
@@ -69,7 +69,7 @@
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "okay";
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH AUTOSEL 4.9 27/60] ARM: dts: imx7d: cl-som-imx7: make ethernet work again
From: Sasha Levin @ 2019-09-22 18:59 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Rutland, devicetree, Fabio Estevam, linux-arm-kernel,
Sasha Levin, André Draszik, Sascha Hauer, Rob Herring,
Igor Grinberg, Pengutronix Kernel Team, Shawn Guo, Ilya Ledvich,
NXP Linux Team
In-Reply-To: <20190922185934.4305-1-sashal@kernel.org>
From: André Draszik <git@andred.net>
[ Upstream commit 9846a4524ac90b63496580b7ad50674b40d92a8f ]
Recent changes to the atheros at803x driver caused
ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode")
and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode")
fix the AR8031 driver to configure the phy's (RX/TX)
delays as per the 'phy-mode' in the device tree.
This now prevents ethernet from working on this board.
It used to work before those commits, because the
AR8031 comes out of reset with RX delay enabled, and
the at803x driver didn't touch the delay configuration
at all when "rgmii" mode was selected, and because
arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup()
unconditionally enables TX delay.
Since above commits ar8031_phy_fixup() also has no
effect anymore, and the end-result is that all delays
are disabled in the phy, no ethernet.
Update the device tree to restore functionality.
Signed-off-by: André Draszik <git@andred.net>
CC: Ilya Ledvich <ilya@compulab.co.il>
CC: Igor Grinberg <grinberg@compulab.co.il>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
CC: devicetree@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
index 2051306008534..72d1b8209f5e6 100644
--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
+++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
@@ -43,7 +43,7 @@
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
fsl,magic-packet;
status = "okay";
@@ -69,7 +69,7 @@
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "okay";
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH net] net: stmmac: selftests: Flow Control test can also run with ASYM Pause
From: Jakub Kicinski @ 2019-09-22 21:56 UTC (permalink / raw)
To: Jose Abreu
Cc: Joao Pinto, Alexandre Torgue, netdev, linux-kernel, linux-stm32,
Maxime Coquelin, Giuseppe Cavallaro, David S. Miller,
linux-arm-kernel
In-Reply-To: <f35fa5a51f52fc1ef17a0a9ecd470e2a6792b3f8.1568887745.git.joabreu@synopsys.com>
On Thu, 19 Sep 2019 12:09:49 +0200, Jose Abreu wrote:
> The Flow Control selftest is also available with ASYM Pause. Lets add
> this check to the test and fix eventual false positive failures.
>
> Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support")
> Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Hi Jose!
Thanks for the patch it looks good, seems like you posted it from
a slightly different email address than was used for signoff:
From: Jose Abreu <Jose.Abreu@synopsys.com>
vs
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Could you please fix and repost? Automation may get upset otherwise.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimization
From: Jakub Kicinski @ 2019-09-22 22:12 UTC (permalink / raw)
To: Christophe Roullier
Cc: mark.rutland, robh, alexandre.torgue, devicetree, netdev,
linux-kernel, linux-stm32, joabreu, andrew, mcoquelin.stm32,
peppe.cavallaro, davem, linux-arm-kernel
In-Reply-To: <20190920053817.13754-1-christophe.roullier@st.com>
On Fri, 20 Sep 2019 07:38:12 +0200, Christophe Roullier wrote:
> Some improvements (manage syscfg as optional clock, update slew rate of
> ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
> Fix warning build message when W=1
There seems to be some new features/cleanups (or improvements as
you say) here. Could you explain the negative impact not applying
these changes will have? Patches 1 and 3 in particular.
net-next is now closed [1], and will reopen some time after the merge
window is over. For now we are only expecting fixes for the net tree.
Could you (a) provide stronger motivation these changes are fixes; or
(b) separate the fixes from improvements?
Thank you!
[1] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v6 2/2] drm/bridge: Add NWL MIPI DSI host controller support
From: kbuild test robot @ 2019-09-22 22:52 UTC (permalink / raw)
To: Guido Günther
Cc: Mark Rutland, Sam Ravnborg, Neil Armstrong, David Airlie,
Guido Günther, dri-devel, Andrzej Hajda, Laurent Pinchart,
Fabio Estevam, Lee Jones, NXP Linux Team, Robert Chiras,
devicetree, Daniel Vetter, Arnd Bergmann, Jonas Karlman,
Sascha Hauer, Rob Herring, linux-arm-kernel, Jernej Skrabec,
linux-kernel, kbuild-all, Pengutronix Kernel Team, Shawn Guo
In-Reply-To: <c0ac0b203fb65ae7efd1b9b54664b491ca2fb157.1569170717.git.agx@sigxcpu.org>
Hi "Guido,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[cannot apply to v5.3 next-20190920]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Guido-G-nther/drm-bridge-Add-NWL-MIPI-DSI-host-controller-support/20190923-005010
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
smatch warnings:
drivers/gpu/drm/bridge/nwl-dsi.c:272 nwl_dsi_config_dpi() warn: unsigned 'color_format' is never less than zero.
vim +/color_format +272 drivers/gpu/drm/bridge/nwl-dsi.c
245
246 static int nwl_dsi_config_dpi(struct nwl_dsi *dsi)
247 {
248 u32 color_format, mode;
249 bool burst_mode;
250 int hfront_porch, hback_porch, vfront_porch, vback_porch;
251 int hsync_len, vsync_len;
252
253 hfront_porch = dsi->mode.hsync_start - dsi->mode.hdisplay;
254 hsync_len = dsi->mode.hsync_end - dsi->mode.hsync_start;
255 hback_porch = dsi->mode.htotal - dsi->mode.hsync_end;
256
257 vfront_porch = dsi->mode.vsync_start - dsi->mode.vdisplay;
258 vsync_len = dsi->mode.vsync_end - dsi->mode.vsync_start;
259 vback_porch = dsi->mode.vtotal - dsi->mode.vsync_end;
260
261 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hfront_porch = %d\n", hfront_porch);
262 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hback_porch = %d\n", hback_porch);
263 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hsync_len = %d\n", hsync_len);
264 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hdisplay = %d\n", dsi->mode.hdisplay);
265 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vfront_porch = %d\n", vfront_porch);
266 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vback_porch = %d\n", vback_porch);
267 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vsync_len = %d\n", vsync_len);
268 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vactive = %d\n", dsi->mode.vdisplay);
269 DRM_DEV_DEBUG_DRIVER(dsi->dev, "clock = %d kHz\n", dsi->mode.clock);
270
271 color_format = nwl_dsi_get_dpi_pixel_format(dsi->format);
> 272 if (color_format < 0) {
273 DRM_DEV_ERROR(dsi->dev, "Invalid color format 0x%x\n",
274 dsi->format);
275 return color_format;
276 }
277 DRM_DEV_DEBUG_DRIVER(dsi->dev, "pixel fmt = %d\n", dsi->format);
278
279 nwl_dsi_write(dsi, NWL_DSI_INTERFACE_COLOR_CODING, NWL_DSI_DPI_24_BIT);
280 nwl_dsi_write(dsi, NWL_DSI_PIXEL_FORMAT, color_format);
281 /*
282 * Adjusting input polarity based on the video mode results in
283 * a black screen so always pick active low:
284 */
285 nwl_dsi_write(dsi, NWL_DSI_VSYNC_POLARITY,
286 NWL_DSI_VSYNC_POLARITY_ACTIVE_LOW);
287 nwl_dsi_write(dsi, NWL_DSI_HSYNC_POLARITY,
288 NWL_DSI_HSYNC_POLARITY_ACTIVE_LOW);
289
290 burst_mode = (dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_BURST) &&
291 !(dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE);
292
293 if (burst_mode) {
294 nwl_dsi_write(dsi, NWL_DSI_VIDEO_MODE, NWL_DSI_VM_BURST_MODE);
295 nwl_dsi_write(dsi, NWL_DSI_PIXEL_FIFO_SEND_LEVEL, 256);
296 } else {
297 mode = ((dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) ?
298 NWL_DSI_VM_BURST_MODE_WITH_SYNC_PULSES :
299 NWL_DSI_VM_NON_BURST_MODE_WITH_SYNC_EVENTS);
300 nwl_dsi_write(dsi, NWL_DSI_VIDEO_MODE, mode);
301 nwl_dsi_write(dsi, NWL_DSI_PIXEL_FIFO_SEND_LEVEL,
302 dsi->mode.hdisplay);
303 }
304
305 nwl_dsi_write(dsi, NWL_DSI_HFP, hfront_porch);
306 nwl_dsi_write(dsi, NWL_DSI_HBP, hback_porch);
307 nwl_dsi_write(dsi, NWL_DSI_HSA, hsync_len);
308
309 nwl_dsi_write(dsi, NWL_DSI_ENABLE_MULT_PKTS, 0x0);
310 nwl_dsi_write(dsi, NWL_DSI_BLLP_MODE, 0x1);
311 nwl_dsi_write(dsi, NWL_DSI_USE_NULL_PKT_BLLP, 0x0);
312 nwl_dsi_write(dsi, NWL_DSI_VC, 0x0);
313
314 nwl_dsi_write(dsi, NWL_DSI_PIXEL_PAYLOAD_SIZE, dsi->mode.hdisplay);
315 nwl_dsi_write(dsi, NWL_DSI_VACTIVE, dsi->mode.vdisplay - 1);
316 nwl_dsi_write(dsi, NWL_DSI_VBP, vback_porch);
317 nwl_dsi_write(dsi, NWL_DSI_VFP, vfront_porch);
318
319 return 0;
320 }
321
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 2/2] soc: ti: move 2 driver config options into the TI SOC drivers menu
From: santosh.shilimkar @ 2019-09-23 0:05 UTC (permalink / raw)
To: Randy Dunlap, LKML, LAK
Cc: Nishanth Menon, Benjamin Fair, Tony Lindgren, Tero Kristo,
Santosh Shilimkar, Olof Johansson
In-Reply-To: <2f0cd6cf-83c3-f60f-3d72-fd0cec64105e@infradead.org>
On 9/21/19 1:46 PM, Randy Dunlap wrote:
> Hi Santosh,
>
> Would you also pick up patch 2/2, which I didn't Cc: you on? :(
>
> Do I need to resend it?
>
Yes please. I don't have your 2/2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v2] soc: ti: move 2 driver config options into the TI SOC drivers menu
From: Randy Dunlap @ 2019-09-23 1:11 UTC (permalink / raw)
To: LKML, LAK, Santosh Shilimkar
Cc: Olof Johansson, Nishanth Menon, Tony Lindgren, Tero Kristo
From: Randy Dunlap <rdunlap@infradead.org>
Move the AM654 and J721E SOC config options inside the "TI SOC drivers"
menu with the other TI SOC drivers.
Fixes: a869b7b30dac ("soc: ti: Add Support for AM654 SoC config option")
Fixes: cff377f7897a ("soc: ti: Add Support for J721E SoC config option")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Nishanth Menon <nm@ti.com>
#Cc: Benjamin Fair <b-fair@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
---
v2: add Santosh (maintainer) for merging
drop Benjamin Fair (email address bounces)
drivers/soc/ti/Kconfig | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--- lnx-53.orig/drivers/soc/ti/Kconfig
+++ lnx-53/drivers/soc/ti/Kconfig
@@ -1,4 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+# TI SOC drivers
+#
+menuconfig SOC_TI
+ bool "TI SOC drivers support"
+
+if SOC_TI
+
# 64-bit ARM SoCs from TI
if ARM64
@@ -14,17 +22,9 @@ config ARCH_K3_J721E_SOC
help
Enable support for TI's J721E SoC Family.
-endif
+endif # ARCH_K3
-endif
-
-#
-# TI SOC drivers
-#
-menuconfig SOC_TI
- bool "TI SOC drivers support"
-
-if SOC_TI
+endif # ARM64
config KEYSTONE_NAVIGATOR_QMSS
tristate "Keystone Queue Manager Subsystem"
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* RE: [PATCH 2/2] nvmem: imx: scu: support write
From: Peng Fan @ 2019-09-23 1:17 UTC (permalink / raw)
To: Srinivas Kandagatla, shawnguo@kernel.org, s.hauer@pengutronix.de
Cc: Aisheng Dong, linux-kernel@vger.kernel.org, dl-linux-imx,
kernel@pengutronix.de, festevam@gmail.com,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <dd82e84d-ab22-9dd9-f895-776570f46fee@linaro.org>
Hi Srinivas,
> >> Subject: [PATCH 2/2] nvmem: imx: scu: support write
> >
> > Ping..
> >
> Thanks for your patience!
> I normally do not take patches after rc5 for nvmem.
> These will be applied after rc1 is released!
Sorry to ping again. Will you pick up since merge window is open?
Thanks,
Peng.
>
> Thanks,
> srini
> > Thanks,
> > Peng.
> >
> >>
> >> From: Peng Fan <peng.fan@nxp.com>
> >>
> >> The fuse programming from non-secure world is blocked, so we could
> >> only use Arm Trusted Firmware SIP call to let ATF program fuse.
> >>
> >> Because there is ECC region that could only be programmed once, so
> >> add a heler in_ecc to check the ecc region.
> >>
> >> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >> ---
> >>
> >> The ATF patch will soon be posted to ATF community.
> >>
> >> drivers/nvmem/imx-ocotp-scu.c | 73
> >> ++++++++++++++++++++++++++++++++++++++++++-
> >> 1 file changed, 72 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/nvmem/imx-ocotp-scu.c
> >> b/drivers/nvmem/imx-ocotp-scu.c index 2f339d7432e6..0f064f2e74a8
> >> 100644
> >> --- a/drivers/nvmem/imx-ocotp-scu.c
> >> +++ b/drivers/nvmem/imx-ocotp-scu.c
> >> @@ -7,6 +7,7 @@
> >> * Peng Fan <peng.fan@nxp.com>
> >> */
> >>
> >> +#include <linux/arm-smccc.h>
> >> #include <linux/firmware/imx/sci.h>
> >> #include <linux/module.h>
> >> #include <linux/nvmem-provider.h>
> >> @@ -14,6 +15,9 @@
> >> #include <linux/platform_device.h>
> >> #include <linux/slab.h>
> >>
> >> +#define IMX_SIP_OTP 0xC200000A
> >> +#define IMX_SIP_OTP_WRITE 0x2
> >> +
> >> enum ocotp_devtype {
> >> IMX8QXP,
> >> };
> >> @@ -45,6 +49,8 @@ struct imx_sc_msg_misc_fuse_read {
> >> u32 word;
> >> } __packed;
> >>
> >> +static DEFINE_MUTEX(scu_ocotp_mutex);
> >> +
> >> static struct ocotp_devtype_data imx8qxp_data = {
> >> .devtype = IMX8QXP,
> >> .nregs = 800,
> >> @@ -73,6 +79,23 @@ static bool in_hole(void *context, u32 index)
> >> return false;
> >> }
> >>
> >> +static bool in_ecc(void *context, u32 index) {
> >> + struct ocotp_priv *priv = context;
> >> + const struct ocotp_devtype_data *data = priv->data;
> >> + int i;
> >> +
> >> + for (i = 0; i < data->num_region; i++) {
> >> + if (data->region[i].flag & ECC_REGION) {
> >> + if ((index >= data->region[i].start) &&
> >> + (index <= data->region[i].end))
> >> + return true;
> >> + }
> >> + }
> >> +
> >> + return false;
> >> +}
> >> +
> >> static int imx_sc_misc_otp_fuse_read(struct imx_sc_ipc *ipc, u32
> word,
> >> u32 *val)
> >> {
> >> @@ -116,6 +139,8 @@ static int imx_scu_ocotp_read(void *context,
> >> unsigned int offset,
> >> if (!p)
> >> return -ENOMEM;
> >>
> >> + mutex_lock(&scu_ocotp_mutex);
> >> +
> >> buf = p;
> >>
> >> for (i = index; i < (index + count); i++) { @@ -126,6 +151,7 @@
> >> static int imx_scu_ocotp_read(void *context, unsigned int offset,
> >>
> >> ret = imx_sc_misc_otp_fuse_read(priv->nvmem_ipc, i, buf);
> >> if (ret) {
> >> + mutex_unlock(&scu_ocotp_mutex);
> >> kfree(p);
> >> return ret;
> >> }
> >> @@ -134,18 +160,63 @@ static int imx_scu_ocotp_read(void *context,
> >> unsigned int offset,
> >>
> >> memcpy(val, (u8 *)p + offset % 4, bytes);
> >>
> >> + mutex_unlock(&scu_ocotp_mutex);
> >> +
> >> kfree(p);
> >>
> >> return 0;
> >> }
> >>
> >> +static int imx_scu_ocotp_write(void *context, unsigned int offset,
> >> + void *val, size_t bytes)
> >> +{
> >> + struct ocotp_priv *priv = context;
> >> + struct arm_smccc_res res;
> >> + u32 *buf = val;
> >> + u32 tmp;
> >> + u32 index;
> >> + int ret;
> >> +
> >> + /* allow only writing one complete OTP word at a time */
> >> + if ((bytes != 4) || (offset % 4))
> >> + return -EINVAL;
> >> +
> >> + index = offset >> 2;
> >> +
> >> + if (in_hole(context, index))
> >> + return -EINVAL;
> >> +
> >> + if (in_ecc(context, index)) {
> >> + pr_warn("ECC region, only program once\n");
> >> + mutex_lock(&scu_ocotp_mutex);
> >> + ret = imx_sc_misc_otp_fuse_read(priv->nvmem_ipc, index, &tmp);
> >> + mutex_unlock(&scu_ocotp_mutex);
> >> + if (ret)
> >> + return ret;
> >> + if (tmp) {
> >> + pr_warn("ECC region, already has value: %x\n", tmp);
> >> + return -EIO;
> >> + }
> >> + }
> >> +
> >> + mutex_lock(&scu_ocotp_mutex);
> >> +
> >> + arm_smccc_smc(IMX_SIP_OTP, IMX_SIP_OTP_WRITE, index, *buf,
> >> + 0, 0, 0, 0, &res);
> >> +
> >> + mutex_unlock(&scu_ocotp_mutex);
> >> +
> >> + return res.a0;
> >> +}
> >> +
> >> static struct nvmem_config imx_scu_ocotp_nvmem_config = {
> >> .name = "imx-scu-ocotp",
> >> - .read_only = true,
> >> + .read_only = false,
> >> .word_size = 4,
> >> .stride = 1,
> >> .owner = THIS_MODULE,
> >> .reg_read = imx_scu_ocotp_read,
> >> + .reg_write = imx_scu_ocotp_write,
> >> };
> >>
> >> static const struct of_device_id imx_scu_ocotp_dt_ids[] = {
> >> --
> >> 2.16.4
> >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [RFC, v3, 4/4] media: platform: mtk-mdp3: Add Mediatek MDP3 driver
From: CK Hu @ 2019-09-23 1:58 UTC (permalink / raw)
To: Bibby Hsieh
Cc: laurent.pinchart+renesas, Rynn.Wu, Jerry-ch.Chen, jungo.lin,
hans.verkuil, Ping-Hsun Wu, frederic.chen, linux-media,
devicetree, daoyuan huang, holmes.chiou, sj.huang, yuzhao,
linux-mediatek, matthias.bgg, mchehab, linux-arm-kernel,
Sean.Cheng, srv_heupstream, tfiga, christie.yu, zwisler
In-Reply-To: <20190911094013.5892-1-bibby.hsieh@mediatek.com>
Hi, Bibby:
On Wed, 2019-09-11 at 17:40 +0800, Bibby Hsieh wrote:
> From: daoyuan huang <daoyuan.huang@mediatek.com>
>
> This patch adds driver for Media Data Path 3 (MDP3).
> Each modules' related operation control is sited in mtk-mdp3-comp.c
> Each modules' register table is defined in file with "mdp_reg_"
> and "mmsys_" prefix
> GCE related API, operation control sited in mtk-mdp3-cmdq.c
> V4L2 m2m device functions are implemented in mtk-mdp3-m2m.c
> Probe, power, suspend/resume, system level functions are defined in
> mtk-mdp3-core.c
>
> Signed-off-by: Ping-Hsun Wu <ping-hsun.wu@mediatek.com>
> Signed-off-by: daoyuan huang <daoyuan.huang@mediatek.com>
> ---
[snip]
> +
> diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c
> new file mode 100644
> index 000000000000..bd8f274fcaa9
> --- /dev/null
> +++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c
> @@ -0,0 +1,504 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2018 MediaTek Inc.
> + * Author: Ping-Hsun Wu <ping-hsun.wu@mediatek.com>
> + */
> +
> +#include <linux/platform_device.h>
> +#include "mtk-mdp3-cmdq.h"
> +#include "mtk-mdp3-comp.h"
> +#include "mtk-mdp3-core.h"
> +#include "mtk-mdp3-m2m.h"
> +
> +#include "mdp-platform.h"
> +#include "mmsys_mutex.h"
> +
> +#define DISP_MUTEX_MDP_FIRST (5)
> +#define DISP_MUTEX_MDP_COUNT (5)
> +
> +#define MDP_PATH_MAX_COMPS IMG_MAX_COMPONENTS
> +
> +struct mdp_path {
> + struct mdp_dev *mdp_dev;
> + struct mdp_comp_ctx comps[MDP_PATH_MAX_COMPS];
> + u32 num_comps;
> + const struct img_config *config;
> + const struct img_ipi_frameparam *param;
> + const struct v4l2_rect *composes[IMG_MAX_HW_OUTPUTS];
> + struct v4l2_rect bounds[IMG_MAX_HW_OUTPUTS];
> +};
> +
> +#define has_op(ctx, op) \
> + (ctx->comp->ops && ctx->comp->ops->op)
> +#define call_op(ctx, op, ...) \
> + (has_op(ctx, op) ? ctx->comp->ops->op(ctx, ##__VA_ARGS__) : 0)
> +
> +struct mdp_path_subfrm {
> + s32 mutex_id;
> + u32 mutex_mod;
> + s32 sofs[MDP_PATH_MAX_COMPS];
> + u32 num_sofs;
> +};
> +
> +static bool is_output_disable(const struct img_compparam *param, u32 count)
> +{
> + return (count < param->num_subfrms) ?
> + (param->frame.output_disable ||
> + param->subfrms[count].tile_disable) :
> + true;
> +}
> +
> +static int mdp_path_subfrm_require(struct mdp_path_subfrm *subfrm,
> + const struct mdp_path *path,
> + struct mdp_cmd *cmd, u32 count)
> +{
> + const struct img_config *config = path->config;
> + const struct mdp_comp_ctx *ctx;
> + phys_addr_t mm_mutex = path->mdp_dev->mm_mutex.reg_base;
> + s32 mutex_id = -1;
> + u32 mutex_sof = 0;
> + int mdp_color = 0;
> + int index;
> + u8 subsys_id = path->mdp_dev->mm_mutex.subsys_id;
> +
> + /* Default value */
> + memset(subfrm, 0, sizeof(*subfrm));
> +
> + for (index = 0; index < config->num_components; index++) {
> + ctx = &path->comps[index];
> + if (is_output_disable(ctx->param, count))
> + continue;
> + switch (ctx->comp->id) {
> + /**********************************************
> + * Name MSB LSB
> + * DISP_MUTEX_MOD 23 0
> + *
> + * Specifies which modules are in this mutex.
> + * Every bit denotes a module. Bit definition:
> + * 2 mdp_rdma0
> + * 4 mdp_rsz0
> + * 5 mdp_rsz1
> + * 6 mdp_tdshp
> + * 7 mdp_wrot0
> + * 8 mdp_wdma
> + * 13 mdp_color
> + * 23 mdp_aal
> + * 24 mdp_ccorr
> + **********************************************/
> + case MDP_AAL0:
> + subfrm->mutex_mod |= 1 << 23;
> + break;
> + case MDP_CCORR0:
> + subfrm->mutex_mod |= 1 << 24;
> + break;
> + case MDP_COLOR0:
> + if (mdp_color)
> + subfrm->mutex_mod |= 1 << 13;
> + break;
> + case MDP_WDMA:
> + subfrm->mutex_mod |= 1 << 8;
> + subfrm->sofs[subfrm->num_sofs++] = MDP_WDMA;
> + break;
> + case MDP_WROT0:
> + subfrm->mutex_mod |= 1 << 7;
> + subfrm->sofs[subfrm->num_sofs++] = MDP_WROT0;
> + break;
> + case MDP_TDSHP0:
> + subfrm->mutex_mod |= 1 << 6;
> + subfrm->sofs[subfrm->num_sofs++] = MDP_TDSHP0;
> + break;
> + case MDP_SCL1:
> + subfrm->mutex_mod |= 1 << 5;
> + subfrm->sofs[subfrm->num_sofs++] = MDP_SCL1;
> + break;
> + case MDP_SCL0:
> + subfrm->mutex_mod |= 1 << 4;
> + subfrm->sofs[subfrm->num_sofs++] = MDP_SCL0;
> + break;
> + case MDP_RDMA0:
> + mutex_id = DISP_MUTEX_MDP_FIRST + 1;
> + subfrm->mutex_mod |= 1 << 2;
> + subfrm->sofs[subfrm->num_sofs++] = MDP_RDMA0;
> + break;
> + case MDP_IMGI:
> + mutex_id = DISP_MUTEX_MDP_FIRST;
> + break;
> + case MDP_WPEI:
> + mutex_id = DISP_MUTEX_MDP_FIRST + 3;
> + break;
> + case MDP_WPEI2:
> + mutex_id = DISP_MUTEX_MDP_FIRST + 4;
> + break;
> + default:
> + break;
> + }
> + }
> +
> + subfrm->mutex_id = mutex_id;
> + if (-1 == mutex_id) {
> + mdp_err("No mutex assigned");
> + return -EINVAL;
> + }
> +
> + if (subfrm->mutex_mod) {
> + /* Set mutex modules */
> + MM_REG_WRITE(cmd, subsys_id, mm_mutex, MM_MUTEX_MOD,
> + subfrm->mutex_mod, 0x07FFFFFF);
> + MM_REG_WRITE(cmd, subsys_id, mm_mutex, MM_MUTEX_SOF,
> + mutex_sof, 0x00000007);
> + }
In [1], mdp3 device has a pointer to mutex device, and you directly
write mutex register in mdp3 driver.
mdp_rdma0: mdp_rdma0@14001000 {
compatible = "mediatek,mt8183-mdp-rdma",
"mediatek,mt8183-mdp3";
mediatek,mm-mutex = <&mutex>;
};
mutex: mutex@14016000 {
compatible = "mediatek,mt8183-disp-mutex";
reg = <0 0x14016000 0 0x1000>;
};
But mutex already has its own driver in mediatek drm driver [2]. This is
not a good design. I would like all mutex device register is controlled
in single driver.
[1] https://patchwork.kernel.org/patch/11140747/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/mediatek/mtk_drm_ddp.c?h=v5.3#n429
Regards,
CK
> + return 0;
> +}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* RE: [PATCH] ARM: Add support for Realtek SOC
From: James Tai @ 2019-09-23 2:25 UTC (permalink / raw)
To: 'Arnd Bergmann'
Cc: Jason A . Donenfeld, CY_Huang[黃鉦晏],
Linus Walleij, Stefan Agner, Masahiro Yamada, Benjamin Gaignard,
Mauro Carvalho Chehab, Phinex Hung, Rob Herring,
Lorenzo Pieralisi, Russell King, Mike Rapoport, Thierry Reding,
jamestai.sky@gmail.com, Doug Anderson, Linux ARM, Ard Biesheuvel,
Nicolas Pitre, Nick Desaulniers, linux-kernel@vger.kernel.org,
Paul Burton, Andreas Färber
In-Reply-To: <CAK8P3a39VrC1Xn+HZc5gvh1-nUYKywDGjTfO9WPCqim89WtGAg@mail.gmail.com>
> <james.tai@realtek.com> wrote:
> > > Subject: Re: [PATCH] ARM: Add support for Realtek SOC
>
> > > > @@ -148,6 +148,7 @@ endif
> > > > textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
> > > > textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
> > > > textofs-$(CONFIG_ARCH_MESON) := 0x00208000
> > > > +textofs-$(CONFIG_ARCH_REALTEK) := 0x00208000
> > > > textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
> > >
> > > Can you explain why this is needed for your platform?
> > >
> > We need to reserve memory (0x00000000 ~ 0x001B0000) for rom and boot
> code.
>
> Ok.
>
> > > > +config ARCH_RTD16XX
> > > > + bool "Enable support for RTD1619"
> > > > + depends on ARCH_REALTEK
> > > > + select ARM_GIC_V3
> > > > + select ARM_PSCI
> > >
> > > As I understand, this chip uses a Cortex-A55. What is the reason for
> > > adding support only to the 32-bit ARM architecture rather than 64-bit?
> >
> > The RTD16XX platform also support the 64-bit ARM architecture.
> > I will add the 64-bit ARM architecture in new version patch.
> >
> > > Most 64-bit SoCs are only supported with arch/arm64, but generally
> > > speaking that is not a requirement. My rule of thumb is that on
> > > systems with 1GB of RAM or more, one would want to run a 64-bit
> > > kernel, while systems with less than that are better off with a
> > > 32-bit one, but that is clearly not the only reason for picking one over the
> other.
> > >
> > Support 32-bit ARM architecture is for application compatibility.
>
> Generally speaking, a 64-bit kernel should work better on 64-bit hardware
> even when you are running mostly 32-bit applications. However, you may have
> device drivers that do not correctly set compat_ioctl handlers.
>
> As I said, it's no problem to allow both, just explain this in the changelog text
> for the driver, along with the need for the textofs setting.
>
OK.
> > > It's very unusual to see custom smp operations on an ARMv8 system,
> > > as we normally use PSCI here. Can you explain what is going on here?
> > > Are you able to use a boot wrapper that implements these in psci instead?
> > >
> > The smp operations is porting form other Realtek platform.
> >
> > Currently, The RTD16XX platform can use the PSCI method.
> > I will add PSCI method in new version patch.
>
> Ok, perfect!
>
> > > > + timer_probe();
> > > > + tick_setup_hrtimer_broadcast(); }
> > >
> > > What do you need tick_setup_hrtimer_broadcast() for? I don't see any
> > > other platform calling this.
> > >
> > I want to initialize the HR timer.
>
> I'm still unsure about this one. My feeling is that it should not be in the
> platform code, but I don't quite understand which hardware needs it. I see that
> Lorenzo Pieralisi added the same code to arm64 in commit 9358d755bd5c
> ("arm64: kernel: initialize broadcast hrtimer based clock event device"), but
> nothing ever calls it on 32-bit arch/arm even though the code does get built in
> to the kernel.
I will add the 'hrtimer' initialization flow in related devices drivers.
> My feeling is that either you don't really need it, or this is something that other
> platforms should really do as well, and it should be called from the generic
> time_init() function in arch/arm/kernel/time.c instead.
>
OK. I understand.
> Can you try to find out more of the background here, and then move the call to
> time_init() assuming it is indeed useful?
I agree with you. It is not necessary to call 'time_init()' function in platform code.
> Arnd
>
> ------Please consider the environment before printing this e-mail.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* RE: [PATCH V2 1/5] dt-bindings: fsl: scu: add scu power key binding
From: Anson Huang @ 2019-09-23 2:31 UTC (permalink / raw)
To: Pavel Machek
Cc: mark.rutland@arm.com, ulf.hansson@linaro.org, Jacky Bai,
catalin.marinas@arm.com, Peng Fan, stefan@agner.ch,
bjorn.andersson@linaro.org, Leonard Crestez, will@kernel.org,
festevam@gmail.com, yuehaibing@huawei.com,
marcin.juszkiewicz@linaro.org, jagan@amarulasolutions.com,
linux-input@vger.kernel.org, ronald@innovation.ch, dl-linux-imx,
devicetree@vger.kernel.org, arnd@arndb.de, s.hauer@pengutronix.de,
mripard@kernel.org, m.felsch@pengutronix.de, robh+dt@kernel.org,
tglx@linutronix.de, andriy.shevchenko@linux.intel.com,
Daniel Baluta, linux-arm-kernel@lists.infradead.org, Aisheng Dong,
Andy Duan, gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com,
linux-kernel@vger.kernel.org, dinguyen@kernel.org,
kernel@pengutronix.de, olof@lixom.net, shawnguo@kernel.org
In-Reply-To: <20190922161347.GB1999@bug>
Hi, Pavel
> Subject: Re: [PATCH V2 1/5] dt-bindings: fsl: scu: add scu power key binding
>
> Hi!
>
> > NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system
> > controller, the system controller is in charge of system power, clock
> > and power key event etc. management, Linux kernel has to communicate
> > with system controller via MU (message unit) IPC to get power key
> > event, add binding doc for i.MX system controller power key driver.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
>
> > +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> > @@ -157,6 +157,15 @@ Required properties:
> > Optional properties:
> > - timeout-sec: contains the watchdog timeout in seconds.
> >
> > +Power key bindings based on SCU Message Protocol
> > +------------------------------------------------------------
> > +
> > +Required properties:
> > +- compatible: should be:
> > + "fsl,imx8qxp-sc-pwrkey"
> > + followed by "fsl,imx-sc-pwrkey";
> > +- linux,keycodes: See
> > +Documentation/devicetree/bindings/input/keys.txt
>
> Actually there's no reason for having "linux,keycodes" property when it is
> always a power button.
The latest version of patch already change the compatible name to *-sc-key which
is more general as key driver, so the "linux,keycodes" is needed now for driver
to define the key function.
Thanks,
Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* RE: [PATCH] ARM: Add support for Realtek SOC
From: James Tai @ 2019-09-23 2:32 UTC (permalink / raw)
To: 'Masahiro Yamada', Arnd Bergmann
Cc: Rob Herring, Jason A . Donenfeld, Thierry Reding, Ard Biesheuvel,
CY_Huang[黃鉦晏], Linus Walleij, Nicolas Pitre,
Nick Desaulniers, Russell King, Stefan Agner,
linux-kernel@vger.kernel.org, Paul Burton, Lorenzo Pieralisi,
jamestai.sky@gmail.com, Benjamin Gaignard, Andreas Färber,
Mauro Carvalho Chehab, Doug Anderson, Mike Rapoport, Phinex Hung,
Linux ARM
In-Reply-To: <CAK7LNATpbAMGU1u6T_1tX57mHbCR-57q+kDwXMOHAJ2R5kvfrg@mail.gmail.com>
> Subject: Re: [PATCH] ARM: Add support for Realtek SOC
>
> On Wed, Sep 11, 2019 at 5:17 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Wed, Sep 11, 2019 at 9:46 AM James Tai[戴志峰]
> <james.tai@realtek.com> wrote:
> > > > Subject: Re: [PATCH] ARM: Add support for Realtek SOC
> >
> > > > > @@ -148,6 +148,7 @@ endif
> > > > > textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
> > > > > textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
> > > > > textofs-$(CONFIG_ARCH_MESON) := 0x00208000
> > > > > +textofs-$(CONFIG_ARCH_REALTEK) := 0x00208000
> > > > > textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
> > > >
> > > > Can you explain why this is needed for your platform?
> > > >
> > > We need to reserve memory (0x00000000 ~ 0x001B0000) for rom and boot
> code.
> >
> > Ok.
>
>
> I do not like this much.
>
> This platform is ARCH_MULTI_V7.
>
> ARM_PATCH_PHYS_VIRT allows you to place the kernel image anywhere in
> memory as long as the base is aligned at 16MB.
>
> The minimum 'textofs-y := 0x0008000' + extra 16MB offset will create a space
> (0x00000000 ~ 0x01008000).
>
> This is more than needed, but it is not a big deal to waste some megabytes of
> memory.
>
OK. I understand.
> --
> Best Regards
> Masahiro Yamada
>
> ------Please consider the environment before printing this e-mail.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* RE: [PATCH V2 1/5] dt-bindings: fsl: scu: add scu power key binding
From: Anson Huang @ 2019-09-23 2:34 UTC (permalink / raw)
To: Pavel Machek
Cc: mark.rutland@arm.com, ulf.hansson@linaro.org, Jacky Bai,
catalin.marinas@arm.com, Peng Fan, stefan@agner.ch,
bjorn.andersson@linaro.org, Leonard Crestez, will@kernel.org,
festevam@gmail.com, yuehaibing@huawei.com,
marcin.juszkiewicz@linaro.org, jagan@amarulasolutions.com,
linux-input@vger.kernel.org, ronald@innovation.ch, dl-linux-imx,
devicetree@vger.kernel.org, arnd@arndb.de, s.hauer@pengutronix.de,
mripard@kernel.org, m.felsch@pengutronix.de, robh+dt@kernel.org,
tglx@linutronix.de, andriy.shevchenko@linux.intel.com,
Daniel Baluta, linux-arm-kernel@lists.infradead.org, Aisheng Dong,
Andy Duan, gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com,
linux-kernel@vger.kernel.org, dinguyen@kernel.org,
kernel@pengutronix.de, olof@lixom.net, shawnguo@kernel.org
In-Reply-To: <20190922161415.GD1999@bug>
Hi, Pavel
> Subject: Re: [PATCH V2 1/5] dt-bindings: fsl: scu: add scu power key binding
>
> On Tue 2019-09-03 10:03:40, Anson Huang wrote:
> > NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system
> > controller, the system controller is in charge of system power, clock
> > and power key event etc. management, Linux kernel has to communicate
> > with system controller via MU (message unit) IPC to get power key
> > event, add binding doc for i.MX system controller power key driver.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > ---
> > Changes since V1:
> > - remove "wakeup-source" property, as it is NOT needed for SCU
> interrupt;
> > - remove "status" in example.
> > ---
> > .../devicetree/bindings/arm/freescale/fsl,scu.txt | 14
> ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> > b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> > index c149fad..f93e2e4 100644
> > --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> > +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> > @@ -157,6 +157,15 @@ Required properties:
> > Optional properties:
> > - timeout-sec: contains the watchdog timeout in seconds.
> >
> > +Power key bindings based on SCU Message Protocol
> > +------------------------------------------------------------
> > +
> > +Required properties:
> > +- compatible: should be:
> > + "fsl,imx8qxp-sc-pwrkey"
> > + followed by "fsl,imx-sc-pwrkey";
> > +- linux,keycodes: See
> > +Documentation/devicetree/bindings/input/keys.txt
>
> Note you have keycode_s_ here, but keycode in the example and in the dts
> patch.
NOT quite understand your point, could you please provide more details?
Thanks,
Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox