* [PATCH 1/7] ARM: dts: tps65217: Specify the interrupt controller
From: Milo Kim @ 2016-10-21 14:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161021140106.21531-1-woogyom.kim@gmail.com>
TPS65217 MFD driver supports the IRQ domain to handle the charger input
interrupts and push button status event. The interrupt controller enables
corresponding IRQ handling in the charger[*] and power button driver[**].
[*] drivers/power/supply/tps65217_charger.c
[**] drivers/input/misc/tps65218-pwrbutton.c
Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
---
arch/arm/boot/dts/tps65217.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/tps65217.dtsi b/arch/arm/boot/dts/tps65217.dtsi
index a632724..27935f8 100644
--- a/arch/arm/boot/dts/tps65217.dtsi
+++ b/arch/arm/boot/dts/tps65217.dtsi
@@ -13,6 +13,8 @@
&tps {
compatible = "ti,tps65217";
+ interrupt-controller;
+ #interrupt-cells = <1>;
regulators {
#address-cells = <1>;
--
2.9.3
^ permalink raw reply related
* [PATCH 0/7] Support TPS65217 PMIC interrupt in DT
From: Milo Kim @ 2016-10-21 14:00 UTC (permalink / raw)
To: linux-arm-kernel
TPS65217 interrupt events include push button pressed/released, USB and AC
voltage status change. AM335x bone based boards (like BB, BBB, BBG) have
common PMIC interrupt pin (named NMI) of AM335x core.
This patchset support interrupts in device tree file.
Milo Kim (7):
ARM: dts: tps65217: Specify the interrupt controller
ARM: dts: tps65217: Add the charger device
ARM: dts: tps65217: Add the power button device
ARM: dts: am335x: Support the PMIC interrupt
ARM: dts: am335x: Add the charger interrupt
ARM: dts: am335x: Add the power button interrupt
mfd: tps65217: Fix mismatched interrupt number
arch/arm/boot/dts/am335x-bone-common.dtsi | 17 +++++++++++++++++
arch/arm/boot/dts/tps65217.dtsi | 12 ++++++++++++
include/linux/mfd/tps65217.h | 4 ++--
3 files changed, 31 insertions(+), 2 deletions(-)
--
2.9.3
^ permalink raw reply
* [PATCH 4/4] mtk-mdp: fix compilation warnings if !DEBUG
From: Mauro Carvalho Chehab @ 2016-10-21 13:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cd14afdb178cf490e257368bc899c7a0c690d140.1477058332.git.mchehab@s-opensource.com>
The mtk_mdp_dbg() is empty if !DEBUG. This causes the following
warnings:
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c: In function ?mtk_mdp_try_fmt_mplane?:
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:231:52: warning: suggest braces around empty body in an ?if? statement [-Wempty-body]
org_w, org_h, pix_mp->width, pix_mp->height);
^
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c: In function ?mtk_mdp_m2m_start_streaming?:
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:414:21: warning: suggest braces around empty body in an ?if? statement [-Wempty-body]
ctx->id, ret);
^
With could actually make the code to do something wrong. So,
add an empty block to make it be parsed ok.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
drivers/media/platform/mtk-mdp/mtk_mdp_core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.h b/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
index 2e979f97d1df..848569d4ab90 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
@@ -250,7 +250,7 @@ extern int mtk_mdp_dbg_level;
#else
-#define mtk_mdp_dbg(level, fmt, args...)
+#define mtk_mdp_dbg(level, fmt, args...) {}
#define mtk_mdp_err(fmt, args...)
#define mtk_mdp_dbg_enter()
#define mtk_mdp_dbg_leave()
--
2.7.4
^ permalink raw reply related
* [PATCH 3/4] mtk_mdp_m2m: remove an unused struct
From: Mauro Carvalho Chehab @ 2016-10-21 13:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cd14afdb178cf490e257368bc899c7a0c690d140.1477058332.git.mchehab@s-opensource.com>
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:48:33: warning: ?mtk_mdp_size_align? defined but not used [-Wunused-variable]
static struct mtk_mdp_pix_align mtk_mdp_size_align = {
^~~~~~~~~~~~~~~~~~
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c b/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
index 065502757133..33124a6c9951 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
@@ -45,13 +45,6 @@ struct mtk_mdp_pix_limit {
u16 target_rot_en_h;
};
-static struct mtk_mdp_pix_align mtk_mdp_size_align = {
- .org_w = 16,
- .org_h = 16,
- .target_w = 2,
- .target_h = 2,
-};
-
static const struct mtk_mdp_fmt mtk_mdp_formats[] = {
{
.pixelformat = V4L2_PIX_FMT_NV12M,
--
2.7.4
^ permalink raw reply related
* [PATCH 2/4] mtk_mdp_vpu: remove a double unlock at the error path
From: Mauro Carvalho Chehab @ 2016-10-21 13:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cd14afdb178cf490e257368bc899c7a0c690d140.1477058332.git.mchehab@s-opensource.com>
As warned by smatch:
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:98 mtk_mdp_vpu_send_msg() error: double unlock 'mutex:&ctx->mdp_dev->vpulock'
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
index b38d29e99f7a..5c8caa864e32 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
@@ -91,7 +91,6 @@ static int mtk_mdp_vpu_send_msg(void *msg, int len, struct mtk_mdp_vpu *vpu,
mutex_lock(&ctx->mdp_dev->vpulock);
err = vpu_ipi_send(vpu->pdev, (enum ipi_id)id, msg, len);
if (err) {
- mutex_unlock(&ctx->mdp_dev->vpulock);
dev_err(&ctx->mdp_dev->pdev->dev,
"vpu_ipi_send fail status %d\n", err);
}
--
2.7.4
^ permalink raw reply related
* [PATCH 1/4] mtk_mdp_vpu: fix build with COMPILE_TEST for 32 bits
From: Mauro Carvalho Chehab @ 2016-10-21 13:59 UTC (permalink / raw)
To: linux-arm-kernel
When building on i386 in 32 bits, several new warnings appear:
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c: In function 'mtk_mdp_vpu_handle_init_ack':
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:28:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)msg->ap_inst;
^
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c: In function 'mtk_mdp_vpu_ipi_handler':
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:40:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)msg->ap_inst;
^
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c: In function 'mtk_mdp_vpu_send_ap_ipi':
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:111:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
msg.ap_inst = (uint64_t)vpu;
^
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c: In function 'mtk_mdp_vpu_init':
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:129:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
msg.ap_inst = (uint64_t)vpu;
^
That's because the driver assumes that it will be built only on
64 bits. As we don't want extra warnings when building with 32
bits, we need to double-cast.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
index fb07bf3dbd8b..b38d29e99f7a 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
@@ -25,7 +25,7 @@ static inline struct mtk_mdp_ctx *vpu_to_ctx(struct mtk_mdp_vpu *vpu)
static void mtk_mdp_vpu_handle_init_ack(struct mdp_ipi_comm_ack *msg)
{
- struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)msg->ap_inst;
+ struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)(long)msg->ap_inst;
/* mapping VPU address to kernel virtual address */
vpu->vsi = (struct mdp_process_vsi *)
@@ -37,7 +37,7 @@ static void mtk_mdp_vpu_ipi_handler(void *data, unsigned int len, void *priv)
{
unsigned int msg_id = *(unsigned int *)data;
struct mdp_ipi_comm_ack *msg = (struct mdp_ipi_comm_ack *)data;
- struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)msg->ap_inst;
+ struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)(long)msg->ap_inst;
struct mtk_mdp_ctx *ctx;
vpu->failure = msg->status;
@@ -108,7 +108,7 @@ static int mtk_mdp_vpu_send_ap_ipi(struct mtk_mdp_vpu *vpu, uint32_t msg_id)
msg.msg_id = msg_id;
msg.ipi_id = IPI_MDP;
msg.vpu_inst_addr = vpu->inst_addr;
- msg.ap_inst = (uint64_t)vpu;
+ msg.ap_inst = (uint64_t)(long)vpu;
err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP);
if (!err && vpu->failure)
err = -EINVAL;
@@ -126,7 +126,7 @@ int mtk_mdp_vpu_init(struct mtk_mdp_vpu *vpu)
msg.msg_id = AP_MDP_INIT;
msg.ipi_id = IPI_MDP;
- msg.ap_inst = (uint64_t)vpu;
+ msg.ap_inst = (uint64_t)(long)vpu;
err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP);
if (!err && vpu->failure)
err = -EINVAL;
--
2.7.4
^ permalink raw reply related
* [PATCH] mtk-vcodec: fix some smatch warnings
From: Mauro Carvalho Chehab @ 2016-10-21 13:58 UTC (permalink / raw)
To: linux-arm-kernel
Fix this bug:
drivers/media/platform/mtk-vcodec/vdec_drv_if.c:38 vdec_if_init() info: ignoring unreachable code.
With is indeed a real problem that prevents the driver to work!
While here, also remove an used var, as reported by smatch:
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c: In function 'mtk_vcodec_init_dec_pm':
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:29:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
struct device *dev;
^~~
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 2 --
drivers/media/platform/mtk-vcodec/vdec_drv_if.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c
index 18182f5676d8..79ca03ac449c 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c
@@ -26,14 +26,12 @@ int mtk_vcodec_init_dec_pm(struct mtk_vcodec_dev *mtkdev)
{
struct device_node *node;
struct platform_device *pdev;
- struct device *dev;
struct mtk_vcodec_pm *pm;
int ret = 0;
pdev = mtkdev->plat_dev;
pm = &mtkdev->pm;
pm->mtkdev = mtkdev;
- dev = &pdev->dev;
node = of_parse_phandle(pdev->dev.of_node, "mediatek,larb", 0);
if (!node) {
mtk_v4l2_err("of_parse_phandle mediatek,larb fail!");
diff --git a/drivers/media/platform/mtk-vcodec/vdec_drv_if.c b/drivers/media/platform/mtk-vcodec/vdec_drv_if.c
index 3cb04ef45144..9813b2ffd5fa 100644
--- a/drivers/media/platform/mtk-vcodec/vdec_drv_if.c
+++ b/drivers/media/platform/mtk-vcodec/vdec_drv_if.c
@@ -31,6 +31,7 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc)
switch (fourcc) {
case V4L2_PIX_FMT_H264:
case V4L2_PIX_FMT_VP8:
+ break;
default:
return -EINVAL;
}
--
2.7.4
^ permalink raw reply related
* [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
From: Krzysztof Kozlowski @ 2016-10-21 13:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAJZ5v0iOQyCwCuMBVcJjX1mMHFb=NkfXFf6yBNdswRw1HMYC=Q@mail.gmail.com>
On Fri, Oct 21, 2016 at 02:29:05PM +0200, Rafael J. Wysocki wrote:
> On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Currently the generic PM Domain code code checks for the presence of
> > both (generic) "power-domains" and (Samsung Exynos legacy)
> > "samsung,power-domain" properties in all device tree nodes representing
> > devices.
> >
> > There are two issues with this:
> > 1. This imposes a small boot-time penalty on all platforms using DT,
> > 2. Platform-specific checks do not really belong in core framework
> > code.
> >
> > While moving the check from platform-agnostic code to Samsung-specific
> > code is non-trivial, the runtime overhead can be restricted to kernels
> > including support for 32-bit Samsung Exynos platforms.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > "samsung,power-domain" was only ever used in:
> > - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> > - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> > - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> > - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> > exynos4212.dtsi is unused?
> > - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> > - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> > ---
> > drivers/base/power/domain.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index e023066e421547c5..d94d6a4b9b527108 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> > ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> > "#power-domain-cells", 0, &pd_args);
> > if (ret < 0) {
> > - if (ret != -ENOENT)
> > + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
>
> Please don't check things like CONFIG_ARCH_EXYNOS in the core.
>
> If you need to put checks like that here, there is a design problem somewhere.
>
> And imagine someone 5 years ahead from now looking at this code and
> wondering why on Earth the check is here.
I don't find the argument of performance penalty such important but for
the sake of design, the samsung-specific code could be moved to
drivers/soc/samsung/pm_domains.c, called "legacy_pm_parse" and exported
through a header. Thus with !ARCH_EXYNOS that would be 'static inline
{}'. However that is not a nice solution - there will be still
direct call to platform-specific code in the core. I am not sure if it
is worth the effort.
The samsung,power-domain was made deprecated (although not explicitly)
in January 2015 (0da658704136 ("ARM: dts: convert to generic power
domain bindings for exynos DT")) so how about:
1. Printing a dev_warn() about usage of deprecated bindings.
2. Complete removal in January 2017?
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH 0/4] ARM: boot: mxs: Add On-Chip RAM
From: Shawn Guo @ 2016-10-21 13:53 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1473789066-8955-1-git-send-email-stefan.wahren@i2se.com>
On Tue, Sep 13, 2016 at 05:51:02PM +0000, Stefan Wahren wrote:
> The i.MX23 / i.MX28 have a small amount of On-Chip RAM which is also necessary
> for suspend to RAM and standby mode. But before we need to remove the fake reg
> properties of all internal bus nodes as discussed in this thread [1].
>
> This patch series requires Fabio Estevam's recent series "ARM: dts: imx23:
> Remove skeleton.dtsi inclusion" [2].
>
> [1] - https://marc.info/?l=devicetree&m=146139948426520&w=2
The page cannot be reached. I would like to understand the
background for this change.
Shawn
> [2] - http://www.spinics.net/lists/arm-kernel/msg528974.html
>
> Stefan Wahren (4):
> ARM: dts: imx23: Remove fake "reg" properties from bus nodes
> ARM: dts: imx28: Remove fake "reg" properties from bus nodes
> ARM: dts: imx23: add On-Chip RAM
> ARM: dts: imx28: add On-Chip RAM
>
> arch/arm/boot/dts/imx23-evk.dts | 8 ++++----
> arch/arm/boot/dts/imx23-olinuxino.dts | 8 ++++----
> arch/arm/boot/dts/imx23-sansa.dts | 8 ++++----
> arch/arm/boot/dts/imx23-stmp378x_devb.dts | 6 +++---
> arch/arm/boot/dts/imx23-xfi3.dts | 8 ++++----
> arch/arm/boot/dts/imx23.dtsi | 15 +++++++++------
> arch/arm/boot/dts/imx28-apf28.dts | 8 ++++----
> arch/arm/boot/dts/imx28-apf28dev.dts | 8 ++++----
> arch/arm/boot/dts/imx28-apx4devkit.dts | 8 ++++----
> arch/arm/boot/dts/imx28-cfa10036.dts | 8 ++++----
> arch/arm/boot/dts/imx28-cfa10037.dts | 8 ++++----
> arch/arm/boot/dts/imx28-cfa10049.dts | 10 +++++-----
> arch/arm/boot/dts/imx28-cfa10055.dts | 6 +++---
> arch/arm/boot/dts/imx28-cfa10056.dts | 4 ++--
> arch/arm/boot/dts/imx28-cfa10057.dts | 10 +++++-----
> arch/arm/boot/dts/imx28-cfa10058.dts | 10 +++++-----
> arch/arm/boot/dts/imx28-duckbill.dts | 8 ++++----
> arch/arm/boot/dts/imx28-evk.dts | 8 ++++----
> arch/arm/boot/dts/imx28-m28.dtsi | 6 +++---
> arch/arm/boot/dts/imx28-m28cu3.dts | 8 ++++----
> arch/arm/boot/dts/imx28-m28evk.dts | 8 ++++----
> arch/arm/boot/dts/imx28-sps1.dts | 8 ++++----
> arch/arm/boot/dts/imx28.dtsi | 17 +++++++++--------
> 23 files changed, 100 insertions(+), 96 deletions(-)
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] arm64: fix show_regs fallout from KERN_CONT changes
From: Robin Murphy @ 2016-10-21 13:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161021125439.GE16630@leverpostej>
On 21/10/16 13:54, Mark Rutland wrote:
> Hi,
>
> On Fri, Oct 21, 2016 at 12:34:11PM +0100, Robin Murphy wrote:
>>> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
>>> index ddce61b..3f31cf93 100644
>>> --- a/arch/arm64/kernel/process.c
>>> +++ b/arch/arm64/kernel/process.c
>>> @@ -187,10 +187,19 @@ void __show_regs(struct pt_regs *regs)
>>> printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
>>> regs->pc, lr, regs->pstate);
>>> printk("sp : %016llx\n", sp);
>>> - for (i = top_reg; i >= 0; i--) {
>>> +
>>> + i = top_reg;
>>> +
>>> + while (i >= 0) {
>>> printk("x%-2d: %016llx ", i, regs->regs[i]);
>>> - if (i % 2 == 0)
>>> - printk("\n");
>>> + i--;
>>> +
>>> + if (i % 2 == 0) {
>>> + pr_cont("x%-2d: %016llx ", i, regs->regs[i]);
>>> + i--;
>>> + }
>>> +
>>> + pr_cont("\n");
>>> }
>>
>> Might it be nicer to simply do this (or thereabouts)?
>
> I don't think so; top_reg is either 12 (for compat), or 29 (for native),
> so for the compat case, with the existing code the first line should be
> one register (r12), with r1; r0 on the final line.
Heh, the "or thereabouts" was intended to acknowledge the act of
copy-pasting patch context around in an email client without even
looking at the original code (or how it's called) ;)
The main idea was that it looks feasible to avoid pr_cont() and the
yucky floating "\n"s altogether.
>> for (i = top_reg; i > 1; i -= 2)
>> printk("x%-2d: %016llx x%-2d: %016llx\n", i-1,
>> regs->regs[i-1], i, regs->regs[i]);
>
> ... whereas here the first line would be two (r12 and r11) ...
>
>> if (i > 0)
>> printk("x%-2d: %016llx\n", i-1, regs->regs[i-1]);
>
> ... and then r0 on its own.
>
> Perhaps that's fine, but it would differ from the existing behaviour,
> and make native and compat noticeably different.
>
> We could try fixing up the first line prior to the loop, but that still
> requires duplicating the format string thrice, manipulation of i, etc.
>
> It looks like Will's taken my patch as-is, but if we can clean this up
> further it would certainly be nice.
Sure, getting it un-broken for 4.9 is the important thing. I'll take a
proper look into the refactoring idea next time I get bored.
Robin.
>
> Thanks,
> Mark.
>
^ permalink raw reply
* [PATCH v2 0/2] Assign RK3066 clocks at boot time
From: Heiko Stuebner @ 2016-10-21 13:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <58a16125-d0bd-1019-eee3-615b35c71c6a@gmail.com>
Am Freitag, 14. Oktober 2016, 16:11:26 CEST schrieb Pawe? Jarosz:
> W dniu 14.10.2016 o 15:28, Heiko Stuebner pisze:
> > changes look good. One thing to keep in mind is that we need clock-id
> > additions in a separate patch (as they need to be on a shared branch).
> >
> > I can do this split of patch1 on my own here, so no need to resend the
> > series and will do that after 4.9-rc1 (probably somewhere after sunday)
> > as I need a stable base for that shared branch.
> >
As written before, I've now split up patch1 into two and applied all 3 patches
for 4.10
Thanks
Heiko
^ permalink raw reply
* [PATCH 00/10] [v3] arm64: dts: add QorIQ LS1046A SoC and boards support
From: Shawn Guo @ 2016-10-21 13:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1473754203-22970-1-git-send-email-shh.xie@gmail.com>
On Tue, Sep 13, 2016 at 04:09:53PM +0800, shh.xie at gmail.com wrote:
> From: Shaohui Xie <Shaohui.Xie@nxp.com>
>
> This patchest adds support for QorIQ LS1046A SoC which is based on ARMv8
> architecture, also adds LS1046A-RDB and LS1046A-QDS board support.
>
> Also, updates bindings for SoC-specific devices SCFG and DCFG,
> I2C devices, qoriq-clock and ahci-fsl-qoriq.
>
> Mingkai Hu (2):
> arm64: dts: add QorIQ LS1046A SoC support
> arm64: dts: add LS1046A-RDB board support
>
> Shaohui Xie (8):
> dt-bindings: fsl: update for more SoCs
> dt-bindings: fsl: updates bindings for some SoC-specific devices
> dt-bindings: i2c: adds two more nxp devices
> dt-bindings: qoriq-clock: update for more SoCs
> dt-bindings: ahci-fsl-qoriq: updated for SoC ls1046a
> Documentation: DT: Add entry for QorIQ LS1046A-RDB board
> Documentation: DT: Add entry for QorIQ LS1046A-QDS board
> arm64: dts: add LS1046A-QDS board support
I updated dt-bindings patch subject per Rob's comment, and then applied
the series.
Shawn
^ permalink raw reply
* [PATCH 2/3] ARM: convert to generated system call tables
From: Russell King - ARM Linux @ 2016-10-21 13:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <3851270.xZRcP9hae0@wuerfel>
On Fri, Oct 21, 2016 at 03:06:45PM +0200, Arnd Bergmann wrote:
> Regarding the review process, I'd really hope we've improved enough
> that we can rely on the review on linux-arch/linux-api to catch
> all serious issues like system call that cannot be defined the same
> way on all architectures. If we fail at this, there is a more
> serious issue with the review process.
Well, forget linux-arch, that's hopeless because that became a very
x86-centric linux-kernel-v2, and as such I refuse to subscribe to it -
it would be a total waste of my network bandwidth because I wouldn't
have time to read it.
I somehow suspect that linux-api isn't that much better either. What
I want from any "arch" specific thing is a heads-up to alert me to
something so that I can then choose whether to look deeper at the
subject or just ignore it completely. I don't want to be buried under
lots of x86 specific drivel about a new feature.
So, the reality is, that I don't see any of the new syscall discussions
anymore. The first that I'm aware of them is when they hit in some way
that becomes visible to me - which is normally sometime during the merge
window.
> Since all syscalls now go through SYSCALL_DEFINEx(), we have
> covered the hardest part (sign/zero extending short arguments),
> and a lot more people are aware of problems with struct alignment
> since it differs between i386 and x86_64 and also affects all
> ioctl interfaces. I think the last time a syscall made it in that
> didn't just work on all architectures was sync_file_range, and
> that was nine years ago.
It's not really about struct alignment, although that is a concern.
For ARM, it's more about argument alignment, and whether a 64-bit
argument gets passed in (eg) r1/r2 or r2/r3, and whether we run out
of registers to pass the arguments.
> If we hit this case, why not just use the wrapper on both EABI
> and OABI for simplicity? It's not like we care a lot about
> micro-optimizing OABI any more.
I'd still like to retain the ability to only add to EABI in the future.
> > You'll find the latest version in the next linux-next, or my current
> > for-next branch.
>
> Ok. After rebasing my randconfig tree on today's linux-next, I needed
> this hunk to avoid a warning:
>
> <stdin>:1143:2: error: #warning syscall sync_file_range not implemented [-Werror=cpp]
I don't get that on my builds, for EABI or OABI - for EABI:
CHK include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
CALL /home/rmk/git/linux-rmk/scripts/checksyscalls.sh
make[1]: Leaving directory '/home/rmk/git/build/hdrtst'
and for OABI:
CHK include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
CALL /home/rmk/git/linux-rmk/scripts/checksyscalls.sh
make[1]: Leaving directory '/home/rmk/git/build/hdrtst-oabi'
So, I'd like to know how you're seeing that warning. We have never
provided sync_file_range on ARM, and we must never define it, because
the user API for it is broken.
> diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl
> index 70558e4459fd..7da1bbe69e56 100644
> --- a/arch/arm/tools/syscall.tbl
> +++ b/arch/arm/tools/syscall.tbl
> @@ -355,7 +355,8 @@
> 338 common set_robust_list sys_set_robust_list
> 339 common get_robust_list sys_get_robust_list
> 340 common splice sys_splice
> -341 common arm_sync_file_range sys_sync_file_range2
> +341 common sync_file_range2 sys_sync_file_range2
> +341 common arm_sync_file_range
> 342 common tee sys_tee
> 343 common vmsplice sys_vmsplice
> 344 common move_pages sys_move_pages
>
> (or alternatively, add "#define sync_file_range2 arm_sync_file_range"
> to uapi/asm/unistd.h).
Well, I think you have a mis-merge somewhere, beacuse uapi/asm/unistd.h
does have:
#define __NR_sync_file_range2 __NR_arm_sync_file_range
in it, which triggers this in scripts/checksyscalls.sh:
/* sync_file_range had a stupid ABI. Allow sync_file_range2 instead */
#ifdef __NR_sync_file_range2
#define __IGNORE_sync_file_range
#endif
Hence why I don't see the warning you're seeing.
> That brings up an interesting issue: it would be nice to use the
> same input file for arch/arm/ and the compat mode of arch/arm64,
> like x86 does. If we handle both oabi and arm64-compat in the same
> file, we end up with a superset of what x86 does, and we could
> use a single script again, and generate all four tables for
> ARM (native OABI, OABI-on-EABI, native EABI, EABI-on-arm64).
OABI-compat != ARM64-EABI-compat though. They're two completely
different things.
Moreover, the syscall numbers ARM64 uses natively are completely
different from the syscall numbers 32-bit ARM uses, either for EABI
or OABI. So I really don't see this working.
I've no idea how ARM64 deals with 32-bit binaries, so I can't comment
on how it deals with those syscalls, sorry.
> Another related case in asm-generic, which defines three tables:
> native 32-bit, native 64-bit and compat 32-bit. This one not only
> needs to have three different function pointers (e.g. sys_fcntl64,
> sys_fcntl and compat_sys_fcntl64) but also different macros (e.g.
> __NR_fcntl64 and __NR_fcntl).
>
> Anything wrong with this approach:?
>
> /* ARM */
> 221 oabi fcntl64 sys_fcntl64 sys_oabi_fcntl64
> 221 eabi fcntl64 sys_fcntl64 compat_sys_fcntl64
>
> /* asm-generic */
> 25 32 fcntl64 sys_fcntl64 compat_sys_fcntl64
> 25 64 fcntl sys_fcntl
Don't know, sorry. I know virtually nothing about the differences
between the 64-bit and 32-bit ABIs, so I can't comment on anything
to do with the compat_* interfaces.
> > The syscallnr.sh script kind-of looks like a candidate, but it has
> > ARM arch specifics to it (knowing that the number of system calls
> > needs to fit within the 8-bit value plus 4-bit shift constant
> > representation of ARM ALU instructions.) Maybe a generic version
> > without that knowledge would work, provided architectures can
> > override it.
>
> syscallnr.sh isn't used on x86, and probably won't be needed on
> most (or all) others, right?
Why not - the point of syscallnr.sh is to remove the need to manually
update the __NR_syscalls definition, which is a generic kernel thing.
Unless other architectures just define a fixed-size table with plenty
of extra space, they'd need to adjust __NR_syscalls when adding new
calls.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply
* [PATCH 1/3] ARM: dts: sun8i: Add common dtsi file for NanoPi SBCs
From: Milo Kim @ 2016-10-21 13:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161020160443.kbdtp626kvibgte4@lukather>
On 10/21/2016 01:04 AM, Maxime Ripard wrote:
>> + * Copyright (C) 2016 Milo Kim <woogyom.kim@gmail.com>
> This looks like a copy of James' DT. Keeping him as the copyright
> holder seems like the right thing to do.
Oh... thanks for catching this. Sorry to James.
Best regards,
Milo
^ permalink raw reply
* [PATCH] ARM: dts: sun8i: Add SPI controller node in H3
From: Milo Kim @ 2016-10-21 13:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161020154442.m2lphzwfabjacw5t@lukather>
Hi Maxime,
On 10/21/2016 12:44 AM, Maxime Ripard wrote:
> Ideally, this would be part of your serie to add the H3 support to the
> spi driver. This way, you make it explicit that there is a dependency
> between the two, and it's easier for us :)
OK, I hesitated before dividing it. It's clear to me now.
Thanks for your comment!
Best regards,
Milo
^ permalink raw reply
* [PATCH v2 0/4] ARM: K2G: Add support for TI-SCI Generic PM Domains
From: Rafael J. Wysocki @ 2016-10-21 13:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161019203347.17893-1-d-gerlach@ti.com>
On Wed, Oct 19, 2016 at 10:33 PM, Dave Gerlach <d-gerlach@ti.com> wrote:
> Hi,
> This is v2 of the series to add support for TI SCI PM Domains. v1 of
> the series can be found here [1]. Several things have changed since v1:
>
> - New patch to add a void *data to struct generic_pm_domain_data to
> allow to store per device data associated with a genpd
> - From v1, squash patch 1 and 2 to introduce docs and dt-bindings in
> one patch based on comment from Ulf
> - Fix some grammar errors in Documentation
> - Based on comments from Ulf, rework actual genpd implementation to
> avoid creating one genpd per device and instead use device start/stop
> hooks provided as part of genpd to control device state based on pm_runtime
> implementation. Also make use of new of_genpd_add_provider_simple API
> introduced by Jon Hunter and do not provide custom of_xlate to genpd core,
> instead registering devices as they probe through attach_dev hook provided
> by genpd framework.
>
> Most of the changes were motivated by the comments from Ulf Hannson on v1 that we
> should not use a 1-to-1 genpd to device mapping. The new approach allows us to
> create a single genpd and store information about each device as they attach to
> the genpd. Then the device start/stop hooks for that genpd leverage the
> per-device data to control power states over the TI SCI protocol.
>
> This driver makes use of the ti_sci driver sent here [2] by Nishanth Menon and
> applies on top of his series on v4.9-rc1.
>
> Regards,
> Dave
>
> [1] http://www.spinics.net/lists/arm-kernel/msg525204.html
> [2] http://www.spinics.net/lists/arm-kernel/msg536851.html
>
> Dave Gerlach (4):
> PM / Domains: Add generic data pointer to genpd data struct
> dt-bindings: Add TI SCI PM Domains
> soc: ti: Add ti_sci_pm_domains driver
> ARM: keystone: Drop PM domain support for k2g
If I'm to apply this at one point, ACKs are required from Ulf/Kevin,
the appropriate platform maintainers, and the DT bindings people.
Also it should be applicable on top of the LInus' tree for me to apply
it.
Thanks,
Rafael
^ permalink raw reply
* [PATCH v4 23/23] clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init()
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
The R-Car Gen2 board code no longer calls rcar_gen2_clocks_init().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- Rebased,
v2:
- No changes.
---
drivers/clk/renesas/clk-rcar-gen2.c | 7 -------
include/linux/clk/renesas.h | 2 --
2 files changed, 9 deletions(-)
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 3291fd430ad4e215..f39519edc645ca87 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -445,10 +445,3 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
}
CLK_OF_DECLARE(rcar_gen2_cpg_clks, "renesas,rcar-gen2-cpg-clocks",
rcar_gen2_cpg_clocks_init);
-
-void __init rcar_gen2_clocks_init(u32 mode)
-{
- cpg_mode = mode;
-
- of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index 9e969941f3f62878..9ebf1f8243bb57af 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,8 +20,6 @@
struct device_node;
struct generic_pm_domain;
-void rcar_gen2_clocks_init(u32 mode);
-
void cpg_mstp_add_clk_domain(struct device_node *np);
#ifdef CONFIG_CLK_RENESAS_CPG_MSTP
int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev);
--
1.9.1
^ permalink raw reply related
* [PATCH v4 22/23] clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
The R-Car H1 board code no longer calls r8a7779_clocks_init().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- New.
---
drivers/clk/renesas/clk-r8a7779.c | 9 ---------
include/linux/clk/renesas.h | 1 -
2 files changed, 10 deletions(-)
diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c
index ca7551bcb1153c3d..27fbfafaf2cd0353 100644
--- a/drivers/clk/renesas/clk-r8a7779.c
+++ b/drivers/clk/renesas/clk-r8a7779.c
@@ -89,8 +89,6 @@ struct cpg_clk_config {
* Initialization
*/
-static u32 cpg_mode __initdata;
-
static struct clk * __init
r8a7779_cpg_register_clock(struct device_node *np, struct r8a7779_cpg *cpg,
const struct cpg_clk_config *config,
@@ -178,10 +176,3 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
}
CLK_OF_DECLARE(r8a7779_cpg_clks, "renesas,r8a7779-cpg-clocks",
r8a7779_cpg_clocks_init);
-
-void __init r8a7779_clocks_init(u32 mode)
-{
- cpg_mode = mode;
-
- of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index 2b663bba1adcc7c1..9e969941f3f62878 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,7 +20,6 @@
struct device_node;
struct generic_pm_domain;
-void r8a7779_clocks_init(u32 mode);
void rcar_gen2_clocks_init(u32 mode);
void cpg_mstp_add_clk_domain(struct device_node *np);
--
1.9.1
^ permalink raw reply related
* [PATCH v4 21/23] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
The R-Car M1A board code no longer calls r8a7778_clocks_init().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- New.
---
drivers/clk/renesas/clk-r8a7778.c | 13 -------------
include/linux/clk/renesas.h | 1 -
2 files changed, 14 deletions(-)
diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
index 07ea411098a75ad1..886a8380e91247a1 100644
--- a/drivers/clk/renesas/clk-r8a7778.c
+++ b/drivers/clk/renesas/clk-r8a7778.c
@@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
r8a7778_cpg_clocks_init);
-
-void __init r8a7778_clocks_init(u32 mode)
-{
- BUG_ON(!(mode & BIT(19)));
-
- cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
- (!!(mode & BIT(12)) << 1) |
- (!!(mode & BIT(11)));
- cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
- (!!(mode & BIT(1)));
-
- of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index ba6fa4148515e5c9..2b663bba1adcc7c1 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,7 +20,6 @@
struct device_node;
struct generic_pm_domain;
-void r8a7778_clocks_init(u32 mode);
void r8a7779_clocks_init(u32 mode);
void rcar_gen2_clocks_init(u32 mode);
--
1.9.1
^ permalink raw reply related
* [PATCH v4 19/23] ARM: shmobile: r8a7779: Stop passing mode pins state to clock driver
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
Now the R-Car H1 CPG clock driver obtains the state of the mode pins
from the R-Car RST driver, there's no longer a need to pass this state
explicitly. Hence we can just remove the .init_time() callback, the
generic ARM code will take care of calling of_clk_init() and
clocksource_probe().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- New.
---
arch/arm/mach-shmobile/setup-r8a7779.c | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 0007ff51d180379f..0686112f243525b6 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -14,8 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <linux/clk/renesas.h>
-#include <linux/clocksource.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
@@ -76,30 +74,6 @@ static void __init r8a7779_init_irq_dt(void)
__raw_writel(0x003fee3f, INT2SMSKCR4);
}
-#define MODEMR 0xffcc0020
-
-static u32 __init r8a7779_read_mode_pins(void)
-{
- static u32 mode;
- static bool mode_valid;
-
- if (!mode_valid) {
- void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
- BUG_ON(!modemr);
- mode = ioread32(modemr);
- iounmap(modemr);
- mode_valid = true;
- }
-
- return mode;
-}
-
-static void __init r8a7779_init_time(void)
-{
- r8a7779_clocks_init(r8a7779_read_mode_pins());
- clocksource_probe();
-}
-
static const char *const r8a7779_compat_dt[] __initconst = {
"renesas,r8a7779",
NULL,
@@ -109,7 +83,6 @@ static void __init r8a7779_init_time(void)
.smp = smp_ops(r8a7779_smp_ops),
.map_io = r8a7779_map_io,
.init_early = shmobile_init_delay,
- .init_time = r8a7779_init_time,
.init_irq = r8a7779_init_irq_dt,
.init_late = shmobile_init_late,
.dt_compat = r8a7779_compat_dt,
--
1.9.1
^ permalink raw reply related
* [PATCH v4 15/23] clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RST module.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
v4:
- Add Acked-by, Reviewed-by,
v3:
- New.
---
drivers/clk/renesas/r8a7795-cpg-mssr.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index f255e451e8cafbbf..726c3d7940b491b9 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -15,6 +15,7 @@
#include <linux/device.h>
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/soc/renesas/rcar-rst.h>
#include <dt-bindings/clock/r8a7795-cpg-mssr.h>
@@ -311,7 +312,12 @@ enum clk_ids {
static int __init r8a7795_cpg_mssr_init(struct device *dev)
{
const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
- u32 cpg_mode = rcar_gen3_read_mode_pins();
+ u32 cpg_mode;
+ int error;
+
+ error = rcar_rst_read_mode_pins(&cpg_mode);
+ if (error)
+ return error;
cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
if (!cpg_pll_config->extal_div) {
--
1.9.1
^ permalink raw reply related
* [PATCH v4 14/23] clk: renesas: rcar-gen2: Obtain mode pin values using RST driver
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RST module.
Fall back to our own private copy of rcar_gen2_read_mode_pins() for
backward-compatibility with old DTs.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
- Use our own private copy of rcar_gen2_read_mode_pins() instead of
the one in the R-Car Gen2 platform code, as the latter is planned to
be removed,
v3:
- Use the R-Car RST driver instead of syscon/regmap and the
"renesas,modemr" property in DT,
v2:
- drivers/clk/shmobile/ was renamed to drivers/clk/renesas/.
---
drivers/clk/renesas/clk-rcar-gen2.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 00e6aba4b9c09596..3291fd430ad4e215 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -19,6 +19,7 @@
#include <linux/of_address.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
+#include <linux/soc/renesas/rcar-rst.h>
struct rcar_gen2_cpg {
struct clk_onecell_data data;
@@ -364,6 +365,23 @@ struct cpg_pll_config {
4, 0, table, &cpg->lock);
}
+/*
+ * Reset register definitions.
+ */
+#define MODEMR 0xe6160060
+
+static u32 __init rcar_gen2_read_mode_pins(void)
+{
+ void __iomem *modemr = ioremap_nocache(MODEMR, 4);
+ u32 mode;
+
+ BUG_ON(!modemr);
+ mode = ioread32(modemr);
+ iounmap(modemr);
+
+ return mode;
+}
+
static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
{
const struct cpg_pll_config *config;
@@ -372,6 +390,13 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
unsigned int i;
int num_clks;
+ if (rcar_rst_read_mode_pins(&cpg_mode)) {
+ /* Backward-compatibility with old DT */
+ pr_warn("%s: failed to obtain mode pins from RST\n",
+ np->full_name);
+ cpg_mode = rcar_gen2_read_mode_pins();
+ }
+
num_clks = of_property_count_strings(np, "clock-output-names");
if (num_clks < 0) {
pr_err("%s: failed to count clocks\n", __func__);
--
1.9.1
^ permalink raw reply related
* [PATCH v4 13/23] clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RESET/WDT module.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- New.
---
drivers/clk/renesas/clk-r8a7779.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c
index cf2a37df03b15e60..ca7551bcb1153c3d 100644
--- a/drivers/clk/renesas/clk-r8a7779.c
+++ b/drivers/clk/renesas/clk-r8a7779.c
@@ -18,6 +18,7 @@
#include <linux/of_address.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
+#include <linux/soc/renesas/rcar-rst.h>
#include <dt-bindings/clock/r8a7779-clock.h>
@@ -127,6 +128,10 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
struct clk **clks;
unsigned int i, plla_mult;
int num_clks;
+ u32 mode;
+
+ if (rcar_rst_read_mode_pins(&mode))
+ return;
num_clks = of_property_count_strings(np, "clock-output-names");
if (num_clks < 0) {
@@ -148,8 +153,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
cpg->data.clks = clks;
cpg->data.clk_num = num_clks;
- config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(cpg_mode)];
- plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(cpg_mode)];
+ config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(mode)];
+ plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(mode)];
for (i = 0; i < num_clks; ++i) {
const char *name;
--
1.9.1
^ permalink raw reply related
* [PATCH v4 11/23] arm64: renesas: r8a7796 dtsi: Add device node for RST module
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- New.
---
arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index 9217da9835256573..75c8c55a824835bf 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -233,6 +233,11 @@
#power-domain-cells = <0>;
};
+ rst: reset-controller at e6160000 {
+ compatible = "renesas,r8a7796-rst";
+ reg = <0 0xe6160000 0 0x0200>;
+ };
+
sysc: system-controller at e6180000 {
compatible = "renesas,r8a7796-sysc";
reg = <0 0xe6180000 0 0x0400>;
--
1.9.1
^ permalink raw reply related
* [PATCH v4 10/23] arm64: renesas: r8a7795 dtsi: Add device node for RST module
From: Geert Uytterhoeven @ 2016-10-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>
Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
---
v4:
- Add Acked-by,
v3:
- Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
- Drop "syscon" compatible value,
v2:
- New.
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 8c15040f2540d63a..625dda713548da78 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -321,6 +321,11 @@
#power-domain-cells = <0>;
};
+ rst: reset-controller at e6160000 {
+ compatible = "renesas,r8a7795-rst";
+ reg = <0 0xe6160000 0 0x0200>;
+ };
+
sysc: system-controller at e6180000 {
compatible = "renesas,r8a7795-sysc";
reg = <0 0xe6180000 0 0x0400>;
--
1.9.1
^ permalink raw reply related
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