From glbesse at gator3019.hostgator.com  Wed Jul  5 08:41:19 2017
From: glbesse at gator3019.hostgator.com (glbesse at gator3019.hostgator.com)
Date: Wed, 5 Jul 2017 10:41:19 -0500
Subject: Status of your UPS delivery ID:05208541
Message-ID: <E1dSmQZ-001Yy6-Iy@gator3019.hostgator.com>

Dear Customer,

UPS courier was unable to contact you for your parcel delivery.

Please check the attachment for complete details!

Thank you for your time,
 ,
UPS Senior Support Manager.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UPS-Label-05208541.zip
Type: application/zip
Size: 1469 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170705/c6ce93fe/attachment.zip>

From karpenko.arina at bk.ru  Wed Jul  5 19:02:00 2017
From: karpenko.arina at bk.ru (karpenko.arina at bk.ru)
Date: Thu, 6 Jul 2017 05:02:00 +0300
Subject: We have delivery problems with your parcel #07821966
Message-ID: <20170706020201.10AEFBE69EA@spl53.hosting.reg.ru>

Dear Customer,



Your parcel was successfully delivered July 04 to UPS Station, but our courier cound not contact you.



Please review delivery label in attachment!



Yours respectfully,

 ,

UPS Senior Office Manager.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UPS-Receipt-07821966.zip
Type: application/zip
Size: 1475 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170706/ea40e98f/attachment.zip>

From kukabu at gmail.com  Fri Jul  7 04:02:49 2017
From: kukabu at gmail.com (Michael Tatarinov)
Date: Fri, 7 Jul 2017 15:02:49 +0400
Subject: Issue with upstream BCM2835 thermal and hwmon.
Message-ID: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>

Hello

I uses custom kernel based on downstream code (branch rpi-4.12.y now).
My kernel builds with
CONFIG_HWMON=y
CONFIG_THERMAL=y
CONFIG_THERMAL_HWMON=y
The downstream thermal driver is registered in hwmon subsystem as
virtual device but the upstream isn't.
I'm not sure that the problem is in the upstream driver, maybe this is
my issue.
Does anybody can check it with upstream kernel?

This output from rpi-4.12.y with downstream thermal driver:
mike at rpi ~ $ sensors
bcm2835_thermal-virtual-0
Adapter: Virtual device
temp1:        +56.2?C

ds3231-i2c-1-68
Adapter: bcm2835 I2C adapter
temp1:        +33.5?C


From stefan.wahren at i2se.com  Fri Jul  7 04:32:26 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Fri, 7 Jul 2017 13:32:26 +0200
Subject: Issue with upstream BCM2835 thermal and hwmon.
In-Reply-To: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
References: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
Message-ID: <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>

Hi Michael,

Am 07.07.2017 um 13:02 schrieb Michael Tatarinov:
> Hello
>
> I uses custom kernel based on downstream code (branch rpi-4.12.y now).
> My kernel builds with
> CONFIG_HWMON=y
> CONFIG_THERMAL=y
> CONFIG_THERMAL_HWMON=y
> The downstream thermal driver is registered in hwmon subsystem as
> virtual device but the upstream isn't.
> I'm not sure that the problem is in the upstream driver, maybe this is
> my issue.
> Does anybody can check it with upstream kernel?

i didn't know about the relation between hwmon and thermal.

Could you please do me a favor and do the following steps:
1. Check with your upstream kernel that the thermal_zone is successfully 
registered under /sys/class/thermal.
2. Please show me the (missing) hwmon sysfs entries on your downstream 
kernel, because i won't trust some userspace program like sensors.

Best regards
Stefan

>
> This output from rpi-4.12.y with downstream thermal driver:
> mike at rpi ~ $ sensors
> bcm2835_thermal-virtual-0
> Adapter: Virtual device
> temp1:        +56.2?C
>
> ds3231-i2c-1-68
> Adapter: bcm2835 I2C adapter
> temp1:        +33.5?C
>
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel



From kukabu at gmail.com  Fri Jul  7 04:59:42 2017
From: kukabu at gmail.com (Michael Tatarinov)
Date: Fri, 7 Jul 2017 15:59:42 +0400
Subject: Issue with upstream BCM2835 thermal and hwmon.
In-Reply-To: <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>
References: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
 <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>
Message-ID: <CABrG=ZyD4twwU+C-bV74U4faPMrDNqJSyydu_+JEgOUdo-tEeA@mail.gmail.com>

2017-07-07 15:32 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
> Hi Michael,
>
> Am 07.07.2017 um 13:02 schrieb Michael Tatarinov:
>> Hello
>>
>> I uses custom kernel based on downstream code (branch rpi-4.12.y now).
>> My kernel builds with
>> CONFIG_HWMON=y
>> CONFIG_THERMAL=y
>> CONFIG_THERMAL_HWMON=y
>> The downstream thermal driver is registered in hwmon subsystem as
>> virtual device but the upstream isn't.
>> I'm not sure that the problem is in the upstream driver, maybe this is
>> my issue.
>> Does anybody can check it with upstream kernel?
>
> i didn't know about the relation between hwmon and thermal.

The thermal subsystem have helper for hwmon.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/thermal/Kconfig#n35

> Could you please do me a favor and do the following steps:
> 1. Check with your upstream kernel that the thermal_zone is successfully
> registered under /sys/class/thermal.

Yes, /sys/class/thermal is exists and I see the current data.

> 2. Please show me the (missing) hwmon sysfs entries on your downstream
> kernel, because i won't trust some userspace program like sensors.

mike at rpi ~ $ head /sys/class/hwmon/hwmon0/{name,temp1_input}
==> /sys/class/hwmon/hwmon0/name <==
bcm2835_thermal

==> /sys/class/hwmon/hwmon0/temp1_input <==
59451
mike at rpi ~ $

> Best regards
> Stefan


From stefan.wahren at i2se.com  Fri Jul  7 16:16:54 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sat, 8 Jul 2017 01:16:54 +0200 (CEST)
Subject: Issue with upstream BCM2835 thermal and hwmon.
In-Reply-To: <CABrG=ZyD4twwU+C-bV74U4faPMrDNqJSyydu_+JEgOUdo-tEeA@mail.gmail.com>
References: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
 <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>
 <CABrG=ZyD4twwU+C-bV74U4faPMrDNqJSyydu_+JEgOUdo-tEeA@mail.gmail.com>
Message-ID: <1586896308.125195.1499469414289@email.1und1.de>

Hi Michael,

> Michael Tatarinov <kukabu at gmail.com> hat am 7. Juli 2017 um 13:59 geschrieben:
> 
> 
> 2017-07-07 15:32 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
> > Hi Michael,
> >
> > Am 07.07.2017 um 13:02 schrieb Michael Tatarinov:
> >> Hello
> >>
> >> I uses custom kernel based on downstream code (branch rpi-4.12.y now).
> >> My kernel builds with
> >> CONFIG_HWMON=y
> >> CONFIG_THERMAL=y
> >> CONFIG_THERMAL_HWMON=y
> >> The downstream thermal driver is registered in hwmon subsystem as
> >> virtual device but the upstream isn't.
> >> I'm not sure that the problem is in the upstream driver, maybe this is
> >> my issue.
> >> Does anybody can check it with upstream kernel?
> >
> > i didn't know about the relation between hwmon and thermal.
> 
> The thermal subsystem have helper for hwmon.
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/thermal/Kconfig#n35
> 
> > Could you please do me a favor and do the following steps:
> > 1. Check with your upstream kernel that the thermal_zone is successfully
> > registered under /sys/class/thermal.
> 
> Yes, /sys/class/thermal is exists and I see the current data.
> 
> > 2. Please show me the (missing) hwmon sysfs entries on your downstream
> > kernel, because i won't trust some userspace program like sensors.
> 
> mike at rpi ~ $ head /sys/class/hwmon/hwmon0/{name,temp1_input}
> ==> /sys/class/hwmon/hwmon0/name <==
> bcm2835_thermal
> 
> ==> /sys/class/hwmon/hwmon0/temp1_input <==
> 59451
> mike at rpi ~ $

thanks. I can reproduce it with my Raspberry Pi Zero W. But this behavior is desired and not an issue (since the driver has thermal_zone_params):

https://github.com/torvalds/linux/commit/ccba4ffd9eff6120a20cc7656458ac554aec4b0c

Please ask the thermal guys for a better explanation. Sorry

> 
> > Best regards
> > Stefan


From stefan.wahren at i2se.com  Sat Jul  8 03:13:56 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sat,  8 Jul 2017 12:13:56 +0200
Subject: [PATCH 0/2] pwm: bcm2835: Support for polarity setting via DT
Message-ID: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>

This patch series adds support for the third (optional) pwm cell to specify the
polarity.

Stefan Wahren (2):
  dt-bindings: pwm-bcm2835: Increase pwm-cells
  pwm: bcm2835: Support for polarity setting via DT

 Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++--
 drivers/pwm/pwm-bcm2835.c                             | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.7.4



From stefan.wahren at i2se.com  Sat Jul  8 03:13:57 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sat,  8 Jul 2017 12:13:57 +0200
Subject: [PATCH 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells
In-Reply-To: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
References: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1499508838-20715-2-git-send-email-stefan.wahren@i2se.com>

We need to increase the pwm-cells for the optional flags parameter,
before we can implement support for polarity setting via DT.

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
---
 Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
index cf573e8..8cf87d1 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
@@ -6,7 +6,7 @@ Required properties:
 - clocks: This clock defines the base clock frequency of the PWM hardware
   system, the period and the duty_cycle of the PWM signal is a multiple of
   the base period.
-- #pwm-cells: Should be 2. See pwm.txt in this directory for a description of
+- #pwm-cells: Should be 3. See pwm.txt in this directory for a description of
   the cells format.
 
 Examples:
@@ -15,7 +15,7 @@ pwm at 2020c000 {
 	compatible = "brcm,bcm2835-pwm";
 	reg = <0x2020c000 0x28>;
 	clocks = <&clk_pwm>;
-	#pwm-cells = <2>;
+	#pwm-cells = <3>;
 };
 
 clocks {
-- 
2.7.4



From stefan.wahren at i2se.com  Sat Jul  8 03:13:58 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sat,  8 Jul 2017 12:13:58 +0200
Subject: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
In-Reply-To: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
References: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1499508838-20715-3-git-send-email-stefan.wahren@i2se.com>

This adds support for the third (optional) pwm cell to specify the
polarity, which is needed by display backlights for example.

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
---
 drivers/pwm/pwm-bcm2835.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index c5dbf16..db001cb 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -167,6 +167,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
 	pc->chip.dev = &pdev->dev;
 	pc->chip.ops = &bcm2835_pwm_ops;
 	pc->chip.npwm = 2;
+	pc->chip.of_xlate = of_pwm_xlate_with_flags;
+	pc->chip.of_pwm_n_cells = 3;
 
 	platform_set_drvdata(pdev, pc);
 
-- 
2.7.4



From edwin at auth-secure.auth-secure.com  Sat Jul  8 18:22:42 2017
From: edwin at auth-secure.auth-secure.com (edwin at auth-secure.auth-secure.com)
Date: Sat, 8 Jul 2017 20:22:42 -0500
Subject: Delivery Notification, ID 1049964
Message-ID: <E1dU0vq-0006iL-F4@auth-secure.auth-secure.com>

Dear Customer,

Your parcel was successfully delivered July 05 to UPS Station, but our courier cound not contact you.

Download postal receipt attached to e-mail!

Yours faithfully,
 ,
UPS Chief Operation Agent.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UPS-Delivery-1049964.zip
Type: application/zip
Size: 1461 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170708/f06c64b8/attachment.zip>

From stefan.wahren at i2se.com  Sun Jul  9 06:10:58 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sun, 9 Jul 2017 15:10:58 +0200 (CEST)
Subject: [PATCH RFC 0/7] ARM: bcm283x: Raspberry Pi Zero W support
In-Reply-To: <1498249646-8949-1-git-send-email-stefan.wahren@i2se.com>
References: <1498249646-8949-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <409027531.152449.1499605858793@email.1und1.de>

Hi,

> Stefan Wahren <stefan.wahren at i2se.com> hat am 23. Juni 2017 um 22:27 geschrieben:
> 
> ...
> 
> Known issues:
> 
> The Wifi chip is present in DT and detected during boot, but doesn't work
> properly. I assume i need to apply some of Gerd's patches:
> 
>     brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 ...
>     brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>     brcmfmac: brcmf_sdio_bus_rxctl: reproto_bcdc_msg failed w/status -110
>     brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
>     brcmfmac: brcmf_bus_started: failed: -12
>     brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
> 

i figured out this is a regression in linux-next. So i rebased my changes on a clean 4.12:

https://github.com/lategoodbye/rpi-zero/tree/rpi-zero-w-v2

After that the wifi interface comes up.

Regards


From kukabu at gmail.com  Sun Jul  9 21:34:32 2017
From: kukabu at gmail.com (Michael Tatarinov)
Date: Mon, 10 Jul 2017 08:34:32 +0400
Subject: Issue with upstream BCM2835 thermal and hwmon.
In-Reply-To: <1586896308.125195.1499469414289@email.1und1.de>
References: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
 <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>
 <CABrG=ZyD4twwU+C-bV74U4faPMrDNqJSyydu_+JEgOUdo-tEeA@mail.gmail.com>
 <1586896308.125195.1499469414289@email.1und1.de>
Message-ID: <CABrG=ZwdFnkNNd7uLqwKpPEKeTZ02jBFCCtNwRPtXwm8zgvbAQ@mail.gmail.com>

2017-07-08 3:16 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
> Hi Michael,
>
>> Michael Tatarinov <kukabu at gmail.com> hat am 7. Juli 2017 um 13:59
>> geschrieben:
>>
>>
>> 2017-07-07 15:32 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
>> > Hi Michael,
>> >
>> > Am 07.07.2017 um 13:02 schrieb Michael Tatarinov:
>> >> Hello
>> >>
>> >> I uses custom kernel based on downstream code (branch rpi-4.12.y now).
>> >> My kernel builds with
>> >> CONFIG_HWMON=y
>> >> CONFIG_THERMAL=y
>> >> CONFIG_THERMAL_HWMON=y
>> >> The downstream thermal driver is registered in hwmon subsystem as
>> >> virtual device but the upstream isn't.
>> >> I'm not sure that the problem is in the upstream driver, maybe this is
>> >> my issue.
>> >> Does anybody can check it with upstream kernel?
>> >
>> > i didn't know about the relation between hwmon and thermal.
>>
>> The thermal subsystem have helper for hwmon.
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/thermal/Kconfig#n35
>>
>> > Could you please do me a favor and do the following steps:
>> > 1. Check with your upstream kernel that the thermal_zone is
>> > successfully
>> > registered under /sys/class/thermal.
>>
>> Yes, /sys/class/thermal is exists and I see the current data.
>>
>> > 2. Please show me the (missing) hwmon sysfs entries on your downstream
>> > kernel, because i won't trust some userspace program like sensors.
>>
>> mike at rpi ~ $ head /sys/class/hwmon/hwmon0/{name,temp1_input}
>> ==> /sys/class/hwmon/hwmon0/name <==
>> bcm2835_thermal
>>
>> ==> /sys/class/hwmon/hwmon0/temp1_input <==
>> 59451
>> mike at rpi ~ $
>
> thanks. I can reproduce it with my Raspberry Pi Zero W. But this behavior is
> desired and not an issue (since the driver has thermal_zone_params):
>
> https://github.com/torvalds/linux/commit/ccba4ffd9eff6120a20cc7656458ac554aec4b0c
>
> Please ask the thermal guys for a better explanation. Sorry

Thanks!


From kukabu at gmail.com  Sun Jul  9 22:41:58 2017
From: kukabu at gmail.com (Michael Tatarinov)
Date: Mon, 10 Jul 2017 09:41:58 +0400
Subject: Issue with upstream BCM2835 thermal and hwmon.
In-Reply-To: <1586896308.125195.1499469414289@email.1und1.de>
References: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
 <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>
 <CABrG=ZyD4twwU+C-bV74U4faPMrDNqJSyydu_+JEgOUdo-tEeA@mail.gmail.com>
 <1586896308.125195.1499469414289@email.1und1.de>
Message-ID: <CABrG=Zxsuz7MkLvBAhvekOLxCEv_X-ByQiOVq7oMxOP0UMXFKg@mail.gmail.com>

2017-07-08 3:16 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
> Hi Michael,
>
>> Michael Tatarinov <kukabu at gmail.com> hat am 7. Juli 2017 um 13:59
>> geschrieben:
>>
>>
>> 2017-07-07 15:32 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
>> > Hi Michael,
>> >
>> > Am 07.07.2017 um 13:02 schrieb Michael Tatarinov:
>> >> Hello
>> >>
>> >> I uses custom kernel based on downstream code (branch rpi-4.12.y now).
>> >> My kernel builds with
>> >> CONFIG_HWMON=y
>> >> CONFIG_THERMAL=y
>> >> CONFIG_THERMAL_HWMON=y
>> >> The downstream thermal driver is registered in hwmon subsystem as
>> >> virtual device but the upstream isn't.
>> >> I'm not sure that the problem is in the upstream driver, maybe this is
>> >> my issue.
>> >> Does anybody can check it with upstream kernel?
>> >
>> > i didn't know about the relation between hwmon and thermal.
>>
>> The thermal subsystem have helper for hwmon.
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/thermal/Kconfig#n35
>>
>> > Could you please do me a favor and do the following steps:
>> > 1. Check with your upstream kernel that the thermal_zone is
>> > successfully
>> > registered under /sys/class/thermal.
>>
>> Yes, /sys/class/thermal is exists and I see the current data.
>>
>> > 2. Please show me the (missing) hwmon sysfs entries on your downstream
>> > kernel, because i won't trust some userspace program like sensors.
>>
>> mike at rpi ~ $ head /sys/class/hwmon/hwmon0/{name,temp1_input}
>> ==> /sys/class/hwmon/hwmon0/name <==
>> bcm2835_thermal
>>
>> ==> /sys/class/hwmon/hwmon0/temp1_input <==
>> 59451
>> mike at rpi ~ $
>
> thanks. I can reproduce it with my Raspberry Pi Zero W. But this behavior is
> desired and not an issue (since the driver has thermal_zone_params):
>
> https://github.com/torvalds/linux/commit/ccba4ffd9eff6120a20cc7656458ac554aec4b0c
>
> Please ask the thermal guys for a better explanation. Sorry

It's part of the truth.
The downstream driver uses thermal_zone_device_register() whereas the
upstream - thermal_zone_of_sensor_register(). The
thermal_zone_device_register() calls thermal_add_hwmon_sysfs() but
thermal_zone_of_sensor_register() doesn't.


From stefan.wahren at i2se.com  Mon Jul 10 02:11:51 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Mon, 10 Jul 2017 11:11:51 +0200
Subject: Issue with upstream BCM2835 thermal and hwmon.
In-Reply-To: <CABrG=Zxsuz7MkLvBAhvekOLxCEv_X-ByQiOVq7oMxOP0UMXFKg@mail.gmail.com>
References: <CABrG=ZyYXG7h-dHE8_Z9yrEX_9-48Fx2BvTOcQSwJ8-YM4hrYA@mail.gmail.com>
 <0d0ea147-29da-47bf-6a03-88978a8844c9@i2se.com>
 <CABrG=ZyD4twwU+C-bV74U4faPMrDNqJSyydu_+JEgOUdo-tEeA@mail.gmail.com>
 <1586896308.125195.1499469414289@email.1und1.de>
 <CABrG=Zxsuz7MkLvBAhvekOLxCEv_X-ByQiOVq7oMxOP0UMXFKg@mail.gmail.com>
Message-ID: <6241e9c3-e1d1-6c59-ed38-d4e68f13a378@i2se.com>

Am 10.07.2017 um 07:41 schrieb Michael Tatarinov:

> 2017-07-08 3:16 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
>> Hi Michael,
>>
>>> Michael Tatarinov <kukabu at gmail.com> hat am 7. Juli 2017 um 13:59
>>> geschrieben:
>>>
>>>
>>> 2017-07-07 15:32 GMT+04:00, Stefan Wahren <stefan.wahren at i2se.com>:
>>>> Hi Michael,
>>>>
>>>> Am 07.07.2017 um 13:02 schrieb Michael Tatarinov:
>>>>> Hello
>>>>>
>>>>> I uses custom kernel based on downstream code (branch rpi-4.12.y now).
>>>>> My kernel builds with
>>>>> CONFIG_HWMON=y
>>>>> CONFIG_THERMAL=y
>>>>> CONFIG_THERMAL_HWMON=y
>>>>> The downstream thermal driver is registered in hwmon subsystem as
>>>>> virtual device but the upstream isn't.
>>>>> I'm not sure that the problem is in the upstream driver, maybe this is
>>>>> my issue.
>>>>> Does anybody can check it with upstream kernel?
>>>> i didn't know about the relation between hwmon and thermal.
>>> The thermal subsystem have helper for hwmon.
>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/thermal/Kconfig#n35
>>>
>>>> Could you please do me a favor and do the following steps:
>>>> 1. Check with your upstream kernel that the thermal_zone is
>>>> successfully
>>>> registered under /sys/class/thermal.
>>> Yes, /sys/class/thermal is exists and I see the current data.
>>>
>>>> 2. Please show me the (missing) hwmon sysfs entries on your downstream
>>>> kernel, because i won't trust some userspace program like sensors.
>>> mike at rpi ~ $ head /sys/class/hwmon/hwmon0/{name,temp1_input}
>>> ==> /sys/class/hwmon/hwmon0/name <==
>>> bcm2835_thermal
>>>
>>> ==> /sys/class/hwmon/hwmon0/temp1_input <==
>>> 59451
>>> mike at rpi ~ $
>> thanks. I can reproduce it with my Raspberry Pi Zero W. But this behavior is
>> desired and not an issue (since the driver has thermal_zone_params):
>>
>> https://github.com/torvalds/linux/commit/ccba4ffd9eff6120a20cc7656458ac554aec4b0c
>>
>> Please ask the thermal guys for a better explanation. Sorry
> It's part of the truth.
> The downstream driver uses thermal_zone_device_register() whereas the
> upstream - thermal_zone_of_sensor_register(). The
> thermal_zone_device_register() calls thermal_add_hwmon_sysfs() but
> thermal_zone_of_sensor_register() doesn't.

Correct, but of-thermal which is a dependency of the upstream driver 
calls thermal_zone_device_register().

Again, if you have a problem with the current of-thermal implementation 
please talk to the thermal guys. Sorry, if this sounds a bit harsh but 
it took us over a year to get this driver upstream.

Regards
Stefan


From robh at kernel.org  Mon Jul 10 09:00:24 2017
From: robh at kernel.org (Rob Herring)
Date: Mon, 10 Jul 2017 11:00:24 -0500
Subject: [PATCH 1/2] dt-bindings: pwm-bcm2835: Increase pwm-cells
In-Reply-To: <1499508838-20715-2-git-send-email-stefan.wahren@i2se.com>
References: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
 <1499508838-20715-2-git-send-email-stefan.wahren@i2se.com>
Message-ID: <20170710160024.5uoplp7hzacereon@rob-hp-laptop>

On Sat, Jul 08, 2017 at 12:13:57PM +0200, Stefan Wahren wrote:
> We need to increase the pwm-cells for the optional flags parameter,
> before we can implement support for polarity setting via DT.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
> ---
>  Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh at kernel.org>


From eric at anholt.net  Mon Jul 10 09:56:06 2017
From: eric at anholt.net (Eric Anholt)
Date: Mon, 10 Jul 2017 09:56:06 -0700
Subject: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
In-Reply-To: <1499508838-20715-3-git-send-email-stefan.wahren@i2se.com>
References: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
 <1499508838-20715-3-git-send-email-stefan.wahren@i2se.com>
Message-ID: <87pod8qli1.fsf@eliezer.anholt.net>

Stefan Wahren <stefan.wahren at i2se.com> writes:

> This adds support for the third (optional) pwm cell to specify the
> polarity, which is needed by display backlights for example.
>
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170710/1a6ef1ac/attachment.sig>

From gregkh at linuxfoundation.org  Tue Jul 11 05:20:23 2017
From: gregkh at linuxfoundation.org (Greg KH)
Date: Tue, 11 Jul 2017 14:20:23 +0200
Subject: [PATCH] staging: bcm2835-audio: replace BUG_ON with WARN_ON
In-Reply-To: <CAHRz_yZ6OCke+umsprLmfgExe446jXi-Jnexn=t6bi9Jj7vBzQ@mail.gmail.com>
References: <CAHRz_yZ6OCke+umsprLmfgExe446jXi-Jnexn=t6bi9Jj7vBzQ@mail.gmail.com>
Message-ID: <20170711122023.GB21677@kroah.com>

On Tue, Jul 11, 2017 at 04:54:24PM +0530, karuna grewal wrote:
> replace BUG_ON with WARN_ON as pointed out by checkpatch
> 
> Signed-off-by: Karuna Grewal <karunagrewal98 at gmail.com>

I can not accept patches sent in html format...

> ---
> ?drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 2 +-
> ?1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/
> drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> index 5ff4b1c..30d310b 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> @@ -93,7 +93,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol,
> ? ? ? ? if (mutex_lock_interruptible(&chip->audio_mutex))
> ? ? ? ? ? ? ? ? return -EINTR;
> 
> -? ? ? ?BUG_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));
> +? ? ? ?WARN_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));

Why will this make things better?

thanks,

greg k-h


From pawel at skonecki.eu  Thu Jul 13 13:14:40 2017
From: pawel at skonecki.eu (Pawel Skonecki)
Date: Thu, 13 Jul 2017 21:14:40 +0100
Subject: Kernel configuration
Message-ID: <03ac988575e9c917ea4d566609b3aeb1@skonecki.eu>


Hi All,

I would like to change my kernel setting on PI 2. I downloaded rosbian 
from this location https://www.raspberrypi.org/downloads/raspbian/ - 
version lite. I would like to compile module for my WiFi card but I 
cannot find .config in /boot. Would you send me configuration of kernel 
for this distribution please.

Thank you for help

-- 
Pawel Skonecki



From phil at raspberrypi.org  Thu Jul 13 14:29:06 2017
From: phil at raspberrypi.org (Phil Elwell)
Date: Thu, 13 Jul 2017 22:29:06 +0100
Subject: Kernel configuration
In-Reply-To: <03ac988575e9c917ea4d566609b3aeb1@skonecki.eu>
References: <03ac988575e9c917ea4d566609b3aeb1@skonecki.eu>
Message-ID: <7d2fbe8c-4993-0519-8217-6e15ca1fef4e@raspberrypi.org>

On 13/07/2017 21:14, Pawel Skonecki wrote:
>
> Hi All,
>
> I would like to change my kernel setting on PI 2. I downloaded rosbian from this location https://www.raspberrypi.org/downloads/raspbian/ - version lite. I would like to compile module for my WiFi card but I cannot find .config in /boot. Would you send me configuration of kernel for this distribution please.
>
> Thank you for help

The configuration is stored in the "configs" module:

     sudo modprobe configs
     zcat /proc/config.gz

Phil


From stefan.wahren at i2se.com  Mon Jul 17 06:10:53 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Mon, 17 Jul 2017 15:10:53 +0200 (CEST)
Subject: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W
In-Reply-To: <384537059.123625.1498678388857@email.1und1.de>
References: <384537059.123625.1498678388857@email.1und1.de>
Message-ID: <1133935948.74840.1500297053336@email.1und1.de>

Hi,

> Stefan Wahren <stefan.wahren at i2se.com> hat am 28. Juni 2017 um 21:33 geschrieben:
> 
> 
> Hi,
> 
> i'm currently working on Raspberry Pi Zero W for Mainline. Here is my first patch series [1].
> 
> Unfortunately i didn't get brcmfmac (connected via SDIO) probed with this patch series against 4.12.0-rc5-next-20170616+
> 
> [    8.389167] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
> [    8.735111] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
> [    8.786016] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
> [   11.288798] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> [   11.292822] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> [   13.848777] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> [   13.852974] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> [   16.408762] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> [   16.413004] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> [   18.968769] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> [   18.972965] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> [   21.528743] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> [   21.532924] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> [   24.088745] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> [   24.092948] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> [   26.648764] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
> [   26.648789] brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
> [   26.648831] brcmfmac: brcmf_bus_started: failed: -12
> [   26.648842] brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
> 
> I already tried the additional patches from Gerd Hofmann's repo [2], but this didn't improve anything.
> 
> Any ideas what could be the problem?

i found out that 4.12 didn't have the problem and rebased my changes [3].

Now 4.13-rc1 is out and i bisected the regression:

5771a8c08880cdca3bfb4a3fc6d309d6bba20877 bad
6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c good
e5f76a2e0e84ca2a215ecbf6feae88780d055c56 bad
1849f800fba32cd5a0b647f824f11426b85310d8 good
ca7bbc845e0aa2d9d6d252e72f0a2602ebd16361 bad
0c90e9c6b5549825e410b6589ad6c4478f81ebad good
44e179da0e27a1cc1001becefa0931634dbafae3 bad
219569ad0c41df7a7f999a2cad688c6b6ce173e2 bad
fb53905cf2c3db6eb1ce37a37c5002456fa7ee20 bad
37a5be0cfca6487bbdf423a09dfe70e9bfb049db bad
a3b2ba8666b7947eb323368b5c6f751450e61766 bad
21f569af9ab3608382482166ae9aba802b097e3f bad
94ed6ffb7965aa09409a5ff7d17b2f84ed085c3c bad
a95cfad947d5f40cfbf9ad3019575aac1d8ac7a6 good

9fe929aaace6a3019dd64a70063cc7b0bb956a4e bad

brcmfmac: add firmware feature detection for gscan feature
Detect gscan support in firmware by doing pfn_gscan_cfg iovar with
invalid version.

Unfortunately this commit cannot be simply reverted and i wasn't sure about the dependencies. So i need to revert the following commits to get it running with 4.13-rc1:

123fef3fd4ae6052bad5cf1623c49845d16a6c67
2526ff21aa77c205f72e8263335f20b7d7e636fc
b8a64f0e96c2b258321ee03975aeb0f5e88a055b
69897f390b006948ca4cfa37174fa653a0ef7223
42596f761449595e3f0f18ce57c88472ad2d6160
efc2c1fa8e145b60a7805fa9b6c92ac0746fccc3
94ed6ffb7965aa09409a5ff7d17b2f84ed085c3c
9fe929aaace6a3019dd64a70063cc7b0bb956a4e

Would be nice to get this fixed.

Regards
Stefan

[3] - https://github.com/lategoodbye/rpi-zero/commits/rpi-zero-w-v2

> 
> Thanks
> Stefan
> 
> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-June/006598.html
> [2] - https://www.kraxel.org/cgit/linux/log/?h=bcm2837


From franky.lin at broadcom.com  Mon Jul 17 12:50:34 2017
From: franky.lin at broadcom.com (Franky Lin)
Date: Mon, 17 Jul 2017 12:50:34 -0700
Subject: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W
In-Reply-To: <1133935948.74840.1500297053336@email.1und1.de>
References: <384537059.123625.1498678388857@email.1und1.de>
 <1133935948.74840.1500297053336@email.1und1.de>
Message-ID: <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>

On Mon, Jul 17, 2017 at 6:10 AM, Stefan Wahren <stefan.wahren at i2se.com> wrote:
> Hi,
>
>> Stefan Wahren <stefan.wahren at i2se.com> hat am 28. Juni 2017 um 21:33 geschrieben:
>>
>>
>> Hi,
>>
>> i'm currently working on Raspberry Pi Zero W for Mainline. Here is my first patch series [1].
>>
>> Unfortunately i didn't get brcmfmac (connected via SDIO) probed with this patch series against 4.12.0-rc5-next-20170616+
>>
>> [    8.389167] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
>> [    8.735111] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
>> [    8.786016] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>> [   11.288798] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> [   11.292822] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>> [   13.848777] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> [   13.852974] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>> [   16.408762] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> [   16.413004] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>> [   18.968769] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> [   18.972965] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>> [   21.528743] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> [   21.532924] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>> [   24.088745] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> [   24.092948] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>> [   26.648764] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
>> [   26.648789] brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
>> [   26.648831] brcmfmac: brcmf_bus_started: failed: -12
>> [   26.648842] brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
>>
>> I already tried the additional patches from Gerd Hofmann's repo [2], but this didn't improve anything.
>>
>> Any ideas what could be the problem?
>
> i found out that 4.12 didn't have the problem and rebased my changes [3].
>
> Now 4.13-rc1 is out and i bisected the regression:
>
> 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 bad
> 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c good
> e5f76a2e0e84ca2a215ecbf6feae88780d055c56 bad
> 1849f800fba32cd5a0b647f824f11426b85310d8 good
> ca7bbc845e0aa2d9d6d252e72f0a2602ebd16361 bad
> 0c90e9c6b5549825e410b6589ad6c4478f81ebad good
> 44e179da0e27a1cc1001becefa0931634dbafae3 bad
> 219569ad0c41df7a7f999a2cad688c6b6ce173e2 bad
> fb53905cf2c3db6eb1ce37a37c5002456fa7ee20 bad
> 37a5be0cfca6487bbdf423a09dfe70e9bfb049db bad
> a3b2ba8666b7947eb323368b5c6f751450e61766 bad
> 21f569af9ab3608382482166ae9aba802b097e3f bad
> 94ed6ffb7965aa09409a5ff7d17b2f84ed085c3c bad
> a95cfad947d5f40cfbf9ad3019575aac1d8ac7a6 good
>
> 9fe929aaace6a3019dd64a70063cc7b0bb956a4e bad
>
> brcmfmac: add firmware feature detection for gscan feature
> Detect gscan support in firmware by doing pfn_gscan_cfg iovar with
> invalid version.
>
> Unfortunately this commit cannot be simply reverted and i wasn't sure about the dependencies. So i need to revert the following commits to get it running with 4.13-rc1:
>

Can you please try to comment out the following lines in
brcmf_feat_attach? That's the only suspicious line that interact with
firmware in the patch.

+ brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
+                                            &gscan_cfg, sizeof(gscan_cfg));

I don't have a pi zero w but will try to see if I can reproduce it on a pi 3.

Regards,
Franky

> 123fef3fd4ae6052bad5cf1623c49845d16a6c67
> 2526ff21aa77c205f72e8263335f20b7d7e636fc
> b8a64f0e96c2b258321ee03975aeb0f5e88a055b
> 69897f390b006948ca4cfa37174fa653a0ef7223
> 42596f761449595e3f0f18ce57c88472ad2d6160
> efc2c1fa8e145b60a7805fa9b6c92ac0746fccc3
> 94ed6ffb7965aa09409a5ff7d17b2f84ed085c3c
> 9fe929aaace6a3019dd64a70063cc7b0bb956a4e
>
> Would be nice to get this fixed.
>
> Regards
> Stefan
>
> [3] - https://github.com/lategoodbye/rpi-zero/commits/rpi-zero-w-v2
>
>>
>> Thanks
>> Stefan
>>
>> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-June/006598.html
>> [2] - https://www.kraxel.org/cgit/linux/log/?h=bcm2837


From stefan.wahren at i2se.com  Mon Jul 17 13:31:10 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Mon, 17 Jul 2017 22:31:10 +0200 (CEST)
Subject: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W
In-Reply-To: <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>
References: <384537059.123625.1498678388857@email.1und1.de>
 <1133935948.74840.1500297053336@email.1und1.de>
 <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>
Message-ID: <1389331679.85833.1500323470395@email.1und1.de>

Hi,

> Franky Lin <franky.lin at broadcom.com> hat am 17. Juli 2017 um 21:50 geschrieben:
> 
> 
> On Mon, Jul 17, 2017 at 6:10 AM, Stefan Wahren <stefan.wahren at i2se.com> wrote:
> > Hi,
> >
> >> Stefan Wahren <stefan.wahren at i2se.com> hat am 28. Juni 2017 um 21:33 geschrieben:
> >>
> >>
> >> Hi,
> >>
> >> i'm currently working on Raspberry Pi Zero W for Mainline. Here is my first patch series [1].
> >>
> >> Unfortunately i didn't get brcmfmac (connected via SDIO) probed with this patch series against 4.12.0-rc5-next-20170616+
> >>
> >> [    8.389167] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
> >> [    8.735111] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
> >> [    8.786016] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
> >> [   11.288798] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> >> [   11.292822] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> >> [   13.848777] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> >> [   13.852974] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> >> [   16.408762] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> >> [   16.413004] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> >> [   18.968769] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> >> [   18.972965] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> >> [   21.528743] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> >> [   21.532924] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> >> [   24.088745] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> >> [   24.092948] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> >> [   26.648764] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
> >> [   26.648789] brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
> >> [   26.648831] brcmfmac: brcmf_bus_started: failed: -12
> >> [   26.648842] brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
> >>
> >> I already tried the additional patches from Gerd Hofmann's repo [2], but this didn't improve anything.
> >>
> >> Any ideas what could be the problem?
> >
> > i found out that 4.12 didn't have the problem and rebased my changes [3].
> >
> > Now 4.13-rc1 is out and i bisected the regression:
> >
> > 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 bad
> > 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c good
> > e5f76a2e0e84ca2a215ecbf6feae88780d055c56 bad
> > 1849f800fba32cd5a0b647f824f11426b85310d8 good
> > ca7bbc845e0aa2d9d6d252e72f0a2602ebd16361 bad
> > 0c90e9c6b5549825e410b6589ad6c4478f81ebad good
> > 44e179da0e27a1cc1001becefa0931634dbafae3 bad
> > 219569ad0c41df7a7f999a2cad688c6b6ce173e2 bad
> > fb53905cf2c3db6eb1ce37a37c5002456fa7ee20 bad
> > 37a5be0cfca6487bbdf423a09dfe70e9bfb049db bad
> > a3b2ba8666b7947eb323368b5c6f751450e61766 bad
> > 21f569af9ab3608382482166ae9aba802b097e3f bad
> > 94ed6ffb7965aa09409a5ff7d17b2f84ed085c3c bad
> > a95cfad947d5f40cfbf9ad3019575aac1d8ac7a6 good
> >
> > 9fe929aaace6a3019dd64a70063cc7b0bb956a4e bad
> >
> > brcmfmac: add firmware feature detection for gscan feature
> > Detect gscan support in firmware by doing pfn_gscan_cfg iovar with
> > invalid version.
> >
> > Unfortunately this commit cannot be simply reverted and i wasn't sure about the dependencies. So i need to revert the following commits to get it running with 4.13-rc1:
> >
> 
> Can you please try to comment out the following lines in
> brcmf_feat_attach? That's the only suspicious line that interact with
> firmware in the patch.
> 
> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
> +                                            &gscan_cfg, sizeof(gscan_cfg));

after commenting out this line, the issue doesn't appear.

> 
> I don't have a pi zero w but will try to see if I can reproduce it on a pi 3.

Unfortunately the Pi 3 doesn't have out of the box Wifi support in Mainline. Gerd Hoffmann currently maintains some patches for Wifi support [2]. But they aren't against 4.13-rc1. I could prepare a branch against 4.13-rc1.

> 
> Regards,
> Franky
> 
> > 123fef3fd4ae6052bad5cf1623c49845d16a6c67
> > 2526ff21aa77c205f72e8263335f20b7d7e636fc
> > b8a64f0e96c2b258321ee03975aeb0f5e88a055b
> > 69897f390b006948ca4cfa37174fa653a0ef7223
> > 42596f761449595e3f0f18ce57c88472ad2d6160
> > efc2c1fa8e145b60a7805fa9b6c92ac0746fccc3
> > 94ed6ffb7965aa09409a5ff7d17b2f84ed085c3c
> > 9fe929aaace6a3019dd64a70063cc7b0bb956a4e
> >
> > Would be nice to get this fixed.
> >
> > Regards
> > Stefan
> >
> > [3] - https://github.com/lategoodbye/rpi-zero/commits/rpi-zero-w-v2
> >
> >>
> >> Thanks
> >> Stefan
> >>
> >> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-June/006598.html
> >> [2] - https://www.kraxel.org/cgit/linux/log/?h=bcm2837


From james.hughes at raspberrypi.org  Tue Jul 18 01:59:06 2017
From: james.hughes at raspberrypi.org (James Hughes)
Date: Tue, 18 Jul 2017 09:59:06 +0100
Subject: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W
In-Reply-To: <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>
References: <384537059.123625.1498678388857@email.1und1.de>
 <1133935948.74840.1500297053336@email.1und1.de>
 <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>
Message-ID: <CAE_XsMJ-Ssd_uY2qr1GcL5emO46akee+CjMAeP9pBmY0cfZe3Q@mail.gmail.com>

>>
>
> Can you please try to comment out the following lines in
> brcmf_feat_attach? That's the only suspicious line that interact with
> firmware in the patch.
>
> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
> +                                            &gscan_cfg, sizeof(gscan_cfg));
>
> I don't have a pi zero w but will try to see if I can reproduce it on a pi 3.

Franky/Arend, if a ZeroW would help now and in future Pi Wifi issues,
I can get one to you. Email me off list.

James

>>> [2] - https://www.kraxel.org/cgit/linux/log/?h=bcm2837


From stefan.wahren at i2se.com  Tue Jul 18 04:41:55 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Tue, 18 Jul 2017 13:41:55 +0200 (CEST)
Subject: [PATCH RFC 0/7] ARM: bcm283x: Raspberry Pi Zero W support
In-Reply-To: <409027531.152449.1499605858793@email.1und1.de>
References: <1498249646-8949-1-git-send-email-stefan.wahren@i2se.com>
 <409027531.152449.1499605858793@email.1und1.de>
Message-ID: <93450762.109206.1500378115032@email.1und1.de>


> Stefan Wahren <stefan.wahren at i2se.com> hat am 9. Juli 2017 um 15:10 geschrieben:
> 
> 
> Hi,
> 
> > Stefan Wahren <stefan.wahren at i2se.com> hat am 23. Juni 2017 um 22:27 geschrieben:
> > 
> > ...
> > 
> > Known issues:
> > 
> > The Wifi chip is present in DT and detected during boot, but doesn't work
> > properly. I assume i need to apply some of Gerd's patches:
> > 
> >     brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 ...
> >     brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
> >     brcmfmac: brcmf_sdio_bus_rxctl: reproto_bcdc_msg failed w/status -110
> >     brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
> >     brcmfmac: brcmf_bus_started: failed: -12
> >     brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
> > 
> 
> i figured out this is a regression in linux-next. So i rebased my changes on a clean 4.12:
> 
> https://github.com/lategoodbye/rpi-zero/tree/rpi-zero-w-v2
> 
> After that the wifi interface comes up.

I prepared a branch based on 4.13-rc1, which contains a workaround for the issue above:

https://github.com/lategoodbye/rpi-zero/commits/rpi-zero-w-v3

> 
> Regards


From eric at anholt.net  Wed Jul 19 13:46:18 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 19 Jul 2017 13:46:18 -0700
Subject: [PATCH RFC 0/7] ARM: bcm283x: Raspberry Pi Zero W support
In-Reply-To: <93450762.109206.1500378115032@email.1und1.de>
References: <1498249646-8949-1-git-send-email-stefan.wahren@i2se.com>
 <409027531.152449.1499605858793@email.1und1.de>
 <93450762.109206.1500378115032@email.1und1.de>
Message-ID: <87mv80dujp.fsf@eliezer.anholt.net>

Stefan Wahren <stefan.wahren at i2se.com> writes:

>> Stefan Wahren <stefan.wahren at i2se.com> hat am 9. Juli 2017 um 15:10 geschrieben:
>> 
>> 
>> Hi,
>> 
>> > Stefan Wahren <stefan.wahren at i2se.com> hat am 23. Juni 2017 um 22:27 geschrieben:
>> > 
>> > ...
>> > 
>> > Known issues:
>> > 
>> > The Wifi chip is present in DT and detected during boot, but doesn't work
>> > properly. I assume i need to apply some of Gerd's patches:
>> > 
>> >     brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 ...
>> >     brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>> >     brcmfmac: brcmf_sdio_bus_rxctl: reproto_bcdc_msg failed w/status -110
>> >     brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
>> >     brcmfmac: brcmf_bus_started: failed: -12
>> >     brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
>> > 
>> 
>> i figured out this is a regression in linux-next. So i rebased my changes on a clean 4.12:
>> 
>> https://github.com/lategoodbye/rpi-zero/tree/rpi-zero-w-v2
>> 
>> After that the wifi interface comes up.
>
> I prepared a branch based on 4.13-rc1, which contains a workaround for the issue above:
>
> https://github.com/lategoodbye/rpi-zero/commits/rpi-zero-w-v3

I've sent out a patch today that introduces a slight conflict for this,
but would allow squashing patch 1+2 together so they make more sense
(and avoid a possible need for a cross-merge from arm32 to arm64 for
patch 2).

I've merged the defconfig stuff to for-next, as we don't need any other
acks for that.  Want to send your DT stuff as non-RFC, and Cc the DT
maintainers so we can get the binding doc acked and start merging it?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170719/a1cf50f9/attachment.sig>

From stefan.wahren at i2se.com  Wed Jul 19 23:31:13 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 20 Jul 2017 08:31:13 +0200
Subject: [PATCH RFC 0/7] ARM: bcm283x: Raspberry Pi Zero W support
In-Reply-To: <87mv80dujp.fsf@eliezer.anholt.net>
References: <1498249646-8949-1-git-send-email-stefan.wahren@i2se.com>
 <409027531.152449.1499605858793@email.1und1.de>
 <93450762.109206.1500378115032@email.1und1.de>
 <87mv80dujp.fsf@eliezer.anholt.net>
Message-ID: <c41575eb-4306-67c0-11bf-78ebf6e8bf92@i2se.com>

Am 19.07.2017 um 22:46 schrieb Eric Anholt:
> Stefan Wahren <stefan.wahren at i2se.com> writes:
>
>>> Stefan Wahren <stefan.wahren at i2se.com> hat am 9. Juli 2017 um 15:10 geschrieben:
>>>
>>>
>>> Hi,
>>>
>>>> Stefan Wahren <stefan.wahren at i2se.com> hat am 23. Juni 2017 um 22:27 geschrieben:
>>>>
>>>> ...
>>>>
>>>> Known issues:
>>>>
>>>> The Wifi chip is present in DT and detected during boot, but doesn't work
>>>> properly. I assume i need to apply some of Gerd's patches:
>>>>
>>>>     brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 ...
>>>>     brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>>>     brcmfmac: brcmf_sdio_bus_rxctl: reproto_bcdc_msg failed w/status -110
>>>>     brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
>>>>     brcmfmac: brcmf_bus_started: failed: -12
>>>>     brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
>>>>
>>> i figured out this is a regression in linux-next. So i rebased my changes on a clean 4.12:
>>>
>>> https://github.com/lategoodbye/rpi-zero/tree/rpi-zero-w-v2
>>>
>>> After that the wifi interface comes up.
>> I prepared a branch based on 4.13-rc1, which contains a workaround for the issue above:
>>
>> https://github.com/lategoodbye/rpi-zero/commits/rpi-zero-w-v3
> I've sent out a patch today that introduces a slight conflict for this,
> but would allow squashing patch 1+2 together so they make more sense
> (and avoid a possible need for a cross-merge from arm32 to arm64 for
> patch 2).
>
> I've merged the defconfig stuff to for-next, as we don't need any other
> acks for that.  Want to send your DT stuff as non-RFC, and Cc the DT
> maintainers so we can get the binding doc acked and start merging it?

Yes, i've made some longterm tests with my RPi Zero W in AP mode and it
looks very promising. Currently i can't see any need of those RPi
specific downstream patches on brcmfmac. So the final patch series would
be very small.



From thierry.reding at gmail.com  Thu Jul 20 09:59:12 2017
From: thierry.reding at gmail.com (Thierry Reding)
Date: Thu, 20 Jul 2017 18:59:12 +0200
Subject: [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
Message-ID: <20170720165912.14360-1-thierry.reding@gmail.com>

From: Thierry Reding <treding at nvidia.com>

The irq_group field stores a 1:1 mapping. Use the loop variable to
derive the values instead of storing them in an extra array.

Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index a605d74552b6..834d4862dd15 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -92,7 +92,6 @@ struct bcm2835_pinctrl {
 	struct gpio_chip gpio_chip;
 	struct pinctrl_gpio_range gpio_range;
 
-	int irq_group[BCM2835_NUM_IRQS];
 	spinlock_t irq_lock[BCM2835_NUM_BANKS];
 };
 
@@ -400,7 +399,7 @@ static void bcm2835_gpio_irq_handler(struct irq_desc *desc)
 
 	for (i = 0; i < ARRAY_SIZE(pc->irq); i++) {
 		if (pc->irq[i] == irq) {
-			group = pc->irq_group[i];
+			group = i;
 			break;
 		}
 	}
@@ -1047,7 +1046,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 
 	for (i = 0; i < BCM2835_NUM_IRQS; i++) {
 		pc->irq[i] = irq_of_parse_and_map(np, i);
-		pc->irq_group[i] = i;
 
 		if (pc->irq[i] == 0)
 			continue;
-- 
2.13.3



From stefan.wahren at i2se.com  Thu Jul 20 10:34:50 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 20 Jul 2017 19:34:50 +0200 (CEST)
Subject: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
In-Reply-To: <87pod8qli1.fsf@eliezer.anholt.net>
References: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
 <1499508838-20715-3-git-send-email-stefan.wahren@i2se.com>
 <87pod8qli1.fsf@eliezer.anholt.net>
Message-ID: <748942990.26302.1500572090339@email.1und1.de>


> Eric Anholt <eric at anholt.net> hat am 10. Juli 2017 um 18:56 geschrieben:
> 
> 
> Stefan Wahren <stefan.wahren at i2se.com> writes:
> 
> > This adds support for the third (optional) pwm cell to specify the
> > polarity, which is needed by display backlights for example.
> >
> > Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
> 
> Reviewed-by: Eric Anholt <eric at anholt.net>

gentle ping to Thierry


From afaerber at suse.de  Sat Jul 22 05:29:51 2017
From: afaerber at suse.de (=?UTF-8?Q?Andreas_F=c3=a4rber?=)
Date: Sat, 22 Jul 2017 14:29:51 +0200
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
Message-ID: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>

Hello,

With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
The v4.13-rc1 DT works okay with a 4.12 kernel.

Possibly related:

[   15.916350] OF: /soc/usb at 7e980000: could not get #phy-cells for /phy

[   16.496662] usb 1-1: new high-speed USB device number 2 using dwc2
[   16.502988] dwc2 3f980000.usb: Cannot do DMA to address
0x00000000335da400
[   16.510035] Unable to handle kernel paging request at virtual address
ffff800000000000
[   16.518103] swapper pgtable: 4k pages, 48-bit VAs, pgd = ffff0000096ac000
[   16.524995] [ffff800000000000] *pgd=0000000036ff7003,
*pud=0000000036ff6003, *pmd=0000000036ff5003, *pte=0000000000000000
[   16.536229] Internal error: Oops: 96000147 [#1] SMP
[   16.536243] Modules linked in: brcmutil cfg80211 soundcore
drm_kms_helper rfkill drm fb_sys_fops syscopyarea dwc2 sysfillrect
sysimgblt udc_core usbcore i2c_bcm2835 bcm2835_rng spi_bcm2835
pwm_bcm2835 bcm2835_wdt uio_pdrv_genirq uio crc32_ce phy_generic
leds_gpio mmc_block sdhci_iproc sdhci_pltfm sdhci bcm2835 mmc_core
bcm2835_dma sg efivarfs
[   16.536335] CPU: 1 PID: 34 Comm: kworker/1:1 Not tainted
4.13.0-rc1-2.g9c198f2-default #1
[   16.536338] Hardware name: raspberrypi rpi/rpi, BIOS 2017.07-rc3
07/10/2017
[   16.536560] Workqueue: usb_hub_wq hub_event [usbcore]
[   16.536568] task: ffff800034cc6100 task.stack: ffff800034ccc000
[   16.536585] PC is at __clean_dcache_area_poc+0x20/0x40
[   16.536592] LR is at __swiotlb_map_page+0x9c/0xb8
[   16.536597] pc : [<ffff00000809c160>] lr : [<ffff00000809a254>]
pstate: 80000145
[   16.536600] sp : ffff800034ccf8f0
[   16.536603] x29: ffff800034ccf8f0 x28: ffff000000b2cfe8
[   16.536611] x27: 0000000000000080 x26: ffff8000335a6800
[   16.536619] x25: 0000000080000080 x24: 0000000000000400
[   16.536626] x23: 0000000000000001 x22: 0000000000000008
[   16.536633] x21: 00000000c0000000 x20: 0000000000000000
[   16.536640] x19: ffff800034cf0c10 x18: ffffffffffffffff
[   16.536647] x17: 0000000000003000 x16: ffff7e0000bd0080
[   16.536654] x15: ffff000009429c08 x14: ffff0000895ba17f
[   16.536662] x13: ffff0000095ba18d x12: ffff000009450000
[   16.536669] x11: ffff00000942a078 x10: ffff000008624e28
[   16.536676] x9 : 00000000ffffffd0 x8 : 0000000000000017
[   16.536683] x7 : 3030303030307830 x6 : 00000000000000f6
[   16.536690] x5 : 0000000000000000 x4 : 0000000000000002
[   16.536696] x3 : 000000000000003f x2 : 0000000000000040
[   16.536703] x1 : ffff800000000008 x0 : ffff800000000000
[   16.536712] Process kworker/1:1 (pid: 34, stack limit =
0xffff800034ccc000)
[   16.536718] Stack: (0xffff800034ccf8f0 to 0xffff800034cd0000)
[   16.536724] f8e0:                                   ffff800034ccf930
ffff000000b028c0
[   16.536732] f900: ffff800026549100 0000000001400000 ffff80003446fc00
0000000001400000
[   16.536739] f920: 0000000000000002 0000000000000000 ffff800034ccf980
ffff000000b9784c
[   16.536746] f940: ffff800026549100 0000000001400000 ffff80003446fc00
0000000001400000
[   16.536754] f960: ffff800034ccfa80 ffff000008669290 0000000000000006
ffff8000335a6898
[   16.536761] f980: ffff800034ccf9b0 ffff000000b038d8 ffff800026549100
ffff80003446fc00
[   16.536769] f9a0: ffff000009429c08 ffff800032b65800 ffff800034ccfa90
ffff000000b0574c
[   16.536776] f9c0: ffff800026549100 ffff8000335a6800 0000000000000000
0000000001400000
[   16.536783] f9e0: ffff800034ccfaf0 00000000ffffffd8 ffff800036f60080
4554535953425553
[   16.536791] fa00: 4544006273753d4d ffff000000b2cfe8 ffff00312d313a62
ffff800034ccfb00
[   16.536799] fa20: ffff800034ccfa50 ffff00000814c7f4 ffff800034ccfa50
ffff00000814c804
[   16.536807] fa40: ffff800036f60080 0000000000000000 ffff800034ccfa80
ffff00000814de54
[   16.536814] fa60: ffff800034ccfb00 0000000000000032 ffff80002649c400
0000000000040d00
[   16.536821] fa80: ffff800034ccfb20 0000000000040d00 ffff800034ccfaf0
ffff000000b06184
[   16.536829] faa0: ffff800026549100 ffff800034ccfb38 0000000000000000
ffff800034ccfbcc
[   16.536836] fac0: 0000000000001388 ffff800033175800 ffff800034ccfaf0
ffff000000b06170
[   16.536843] fae0: ffff800026549100 0000000001400000 ffff800034ccfb60
ffff000000b06324
[   16.536850] fb00: ffff8000335da400 0000000000000040 0000000000000000
0000000000000100
[   16.536858] fb20: 0000000000000006 ffff800033175800 0000000080000080
ffff800000000000
[   16.536865] fb40: ffff800000000000 ffff800034ccfb48 ffff800034ccfb48
0000000000000040
[   16.536873] fb60: ffff800034ccfbe0 ffff000000afaa54 ffff8000335a6800
ffff8000264ac000
[   16.536879] fb80: ffff80003446fc00 0000000000000001 0000000000000003
0000000000000002
[   16.536887] fba0: ffff800033175800 0000000080000080 0000000000000000
0000000000000002
[   16.536894] fbc0: 0000000000000000 ffff800032b65800 ffff800000001388
ffff800032b65800
[   16.536901] fbe0: ffff800034ccfc50 ffff000000afe7d0 ffff8000264ac000
0000000000000001
[   16.536909] fc00: ffff800032b65800 0000000000000000 ffff80002649c400
ffff80003446fc30
[   16.536916] fc20: ffff80003446fc00 ffff80003446fc00 ffff8000335a6800
ffff80002649c718
[   16.536924] fc40: 0000000300000001 0000003200000000 ffff800034ccfce0
ffff000000aff714
[   16.536931] fc60: ffff8000264ac000 0000000000000001 ffff8000264ac058
ffff80002649c718
[   16.536939] fc80: ffff80002649c718 0000000000000101 0000000000000000
ffff80002649c408
[   16.536946] fca0: 0000000000000000 0000000000000000 ffff000000b2ed28
0000006400aff34c
[   16.536953] fcc0: ffff800000000002 ffff000000b2d018 ffff8000264ac000
0000000000000004
[   16.536961] fce0: ffff800034ccfdc0 ffff0000080e8c0c ffff8000264ac1d0
ffff8000357a4f00
[   16.536968] fd00: ffff7dffbffa9100 0000000000000000 ffff800036f67980
0000000000000000
[   16.536975] fd20: 00000000fffffef7 ffff000008b77728 0000000000000000
0000000000000000
[   16.536982] fd40: ffff8000264ac170 ffff8000357a4f00 ffff800036f6bd00
0000000000000000
[   16.536990] fd60: ffff000000b2efc8 ffff800032b658f8 ffff8000344a5c00
ffff8000264ac058
[   16.536997] fd80: ffff8000264ac1d0 0000000000000000 ffff800032b65800
ffff8000264ac070
[   16.537004] fda0: ffff8000264ac060 ffff8000344a5c30 ffff8000264ac1d0
ffff800000000101
[   16.537012] fdc0: ffff800034ccfe10 ffff0000080e8ec0 ffff8000357a4f00
ffff800036f67980
[   16.537020] fde0: ffff8000357a4f30 ffff0000095b5800 ffff800036f679a0
ffff000009427000
[   16.537027] fe00: ffff8000357a4f00 ffff0000080e8f54 ffff800034ccfe70
ffff0000080effa8
[   16.537035] fe20: ffff8000357a0680 ffff800034c46680 ffff800034cc6100
ffff000008b77728
[   16.537042] fe40: ffff800035703d00 ffff8000357a4f00 ffff0000080e8e70
ffff800034c46680
[   16.537050] fe60: ffff800034ccfe70 ffff0000080eff4c 0000000000000000
ffff0000080836c0
[   16.537057] fe80: ffff0000080efe70 ffff8000357a0680 0000000000000000
0000000000000000
[   16.537063] fea0: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537070] fec0: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537076] fee0: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537083] ff00: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537089] ff20: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537096] ff40: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537102] ff60: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537109] ff80: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537116] ffa0: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   16.537122] ffc0: 0000000000000000 0000000000000005 0000000000000000
0000000000000000
[   16.537129] ffe0: 0000000000000000 0000000000000000 57810d82330b7058
a6c1bc314470bbc6
[   16.537133] Call trace:
[   16.537139] Exception stack(0xffff800034ccf720 to 0xffff800034ccf850)
[   16.537147] f720: ffff800034cf0c10 0001000000000000 ffff800034ccf8f0
ffff00000809c160
[   16.537154] f740: ffff800034ccf7b0 ffff800034ccf7b0 ffff800034ccf780
00000000ffffffd8
[   16.537162] f760: ffff800034ccf7b0 ffff800034ccf7b0 ffff800034ccf780
00000000ffffffd8
[   16.537169] f780: ffff0000096940a8 ffff000000bac320 ffff800034cec780
ffff800034ccf800
[   16.537176] f7a0: ffff00000968e0a0 0000000000000008 ffff800034ccf7e0
ffff000008669664
[   16.537183] f7c0: ffff800000000000 ffff800000000008 0000000000000040
000000000000003f
[   16.537190] f7e0: 0000000000000002 0000000000000000 00000000000000f6
3030303030307830
[   16.537197] f800: 0000000000000017 00000000ffffffd0 ffff000008624e28
ffff00000942a078
[   16.537204] f820: ffff000009450000 ffff0000095ba18d ffff0000895ba17f
ffff000009429c08
[   16.537209] f840: ffff7e0000bd0080 0000000000003000
[   16.537219] [<ffff00000809c160>] __clean_dcache_area_poc+0x20/0x40
[   16.537422] [<ffff000000b028c0>] usb_hcd_map_urb_for_dma+0x1e8/0x598
[usbcore]
[   16.537544] [<ffff000000b9784c>] dwc2_map_urb_for_dma+0x54/0xf0 [dwc2]
[   16.537726] [<ffff000000b038d8>] usb_hcd_submit_urb+0xc0/0xb10 [usbcore]
[   16.537902] [<ffff000000b0574c>] usb_submit_urb+0x23c/0x588 [usbcore]
[   16.538078] [<ffff000000b06184>] usb_start_wait_urb+0x54/0x148 [usbcore]
[   16.538253] [<ffff000000b06324>] usb_control_msg+0xac/0x108 [usbcore]
[   16.538427] [<ffff000000afaa54>] hub_port_init+0x194/0xb38 [usbcore]
[   16.538602] [<ffff000000afe7d0>] hub_port_connect+0x128/0x8e8 [usbcore]
[   16.538777] [<ffff000000aff714>] hub_event+0x784/0xa38 [usbcore]
[   16.538792] [<ffff0000080e8c0c>] process_one_work+0x1e4/0x448
[   16.538800] [<ffff0000080e8ec0>] worker_thread+0x50/0x488
[   16.538811] [<ffff0000080effa8>] kthread+0x138/0x140
[   16.538821] [<ffff0000080836c0>] ret_from_fork+0x10/0x50
[   16.538831] Code: 9ac32042 8b010001 d1000443 8a230000 (d50b7a20)
[   16.538883] ---[ end trace 7c524f10d9e752dc ]---

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)


From stefan.wahren at i2se.com  Sat Jul 22 06:08:15 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sat, 22 Jul 2017 15:08:15 +0200 (CEST)
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
Message-ID: <634582831.41619.1500728895557@email.1und1.de>

Hi Andreas,

> Andreas F?rber <afaerber at suse.de> hat am 22. Juli 2017 um 14:29 geschrieben:
> 
> 
> Hello,
> 
> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
> The v4.13-rc1 DT works okay with a 4.12 kernel.
> 

do you use arm64/defconfig or a modified one?


From afaerber at suse.de  Sat Jul 22 06:33:57 2017
From: afaerber at suse.de (=?UTF-8?Q?Andreas_F=c3=a4rber?=)
Date: Sat, 22 Jul 2017 15:33:57 +0200
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <634582831.41619.1500728895557@email.1und1.de>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <634582831.41619.1500728895557@email.1und1.de>
Message-ID: <dff231c6-feb4-fc15-75e9-cc5696ad2e55@suse.de>

Hi Stefan,

Am 22.07.2017 um 15:08 schrieb Stefan Wahren:
> Andreas F?rber <afaerber at suse.de> hat am 22. Juli 2017 um 14:29 geschrieben:
>> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
>> The v4.13-rc1 DT works okay with a 4.12 kernel.
> 
> do you use arm64/defconfig or a modified one?

I had updated our custom config via oldconfig, the result is here:

https://kernel.opensuse.org/cgit/kernel-source/plain/config/arm64/default

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)


From afaerber at suse.de  Sat Jul 22 11:12:40 2017
From: afaerber at suse.de (=?UTF-8?Q?Andreas_F=c3=a4rber?=)
Date: Sat, 22 Jul 2017 20:12:40 +0200
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <dff231c6-feb4-fc15-75e9-cc5696ad2e55@suse.de>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <634582831.41619.1500728895557@email.1und1.de>
 <dff231c6-feb4-fc15-75e9-cc5696ad2e55@suse.de>
Message-ID: <7a432eab-f65b-fdae-3e9f-e4095b19012a@suse.de>

Am 22.07.2017 um 15:33 schrieb Andreas F?rber:
> Hi Stefan,
> 
> Am 22.07.2017 um 15:08 schrieb Stefan Wahren:
>> Andreas F?rber <afaerber at suse.de> hat am 22. Juli 2017 um 14:29 geschrieben:
>>> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
>>> The v4.13-rc1 DT works okay with a 4.12 kernel.
>>
>> do you use arm64/defconfig or a modified one?
> 
> I had updated our custom config via oldconfig, the result is here:
> 
> https://kernel.opensuse.org/cgit/kernel-source/plain/config/arm64/default

USB related errors also show up on the Zero with a USB Ethernet
adapter/hub. There the device remains available and working though.

[  769.471986] ksoftirqd/0: page allocation failure: order:3,
mode:0x1284020(GFP_ATOMIC|__GFP_COMP|__GFP_NOTRACK), nodemask=(null)
[  769.483530] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted
4.13.0-rc1-2.g9c198f2-default #1
[  769.491618] Hardware name: BCM2835
[  769.495071] [<c011b3fc>] (unwind_backtrace) from [<c0117aa4>]
(show_stack+0x18/0x1c)
[  769.502839] [<c0117aa4>] (show_stack) from [<c021d24c>]
(warn_alloc+0xb4/0x16c)
[  769.510163] [<c021d24c>] (warn_alloc) from [<c021dd94>]
(__alloc_pages_nodemask+0x9f4/0xe64)
[  769.518626] [<c021dd94>] (__alloc_pages_nodemask) from [<c0263080>]
(cache_alloc_refill+0xe0/0x990)
[  769.527685] [<c0263080>] (cache_alloc_refill) from [<c0263f08>]
(__kmalloc+0x158/0x188)
[  769.535932] [<c0263f08>] (__kmalloc) from [<bf12caa8>]
(dwc2_map_urb_for_dma+0xb8/0x118 [dwc2])
[  769.544815] [<bf12caa8>] (dwc2_map_urb_for_dma [dwc2]) from
[<c059d45c>] (usb_hcd_submit_urb+0xb4/0x9ec)
[  769.554404] [<c059d45c>] (usb_hcd_submit_urb) from [<bf197400>]
(rx_submit+0x154/0x2c8 [usbnet])
[  769.563285] [<bf197400>] (rx_submit [usbnet]) from [<bf197b90>]
(rx_complete+0x2ac/0x308 [usbnet])
[  769.572301] [<bf197b90>] (rx_complete [usbnet]) from [<c059b5bc>]
(__usb_hcd_giveback_urb+0xa0/0x14c)
[  769.581538] [<c059b5bc>] (__usb_hcd_giveback_urb) from [<c059b6ec>]
(usb_giveback_urb_bh+0x84/0xb8)
[  769.590600] [<c059b6ec>] (usb_giveback_urb_bh) from [<c01301cc>]
(tasklet_action+0x60/0xac)
[  769.598960] [<c01301cc>] (tasklet_action) from [<c012f884>]
(__do_softirq+0xd0/0x2f0)
[  769.606798] [<c012f884>] (__do_softirq) from [<c012fad0>]
(run_ksoftirqd+0x2c/0x44)
[  769.614481] [<c012fad0>] (run_ksoftirqd) from [<c014bb0c>]
(smpboot_thread_fn+0x104/0x188)
[  769.622761] [<c014bb0c>] (smpboot_thread_fn) from [<c0147ee4>]
(kthread+0x138/0x150)
[  769.630514] [<c0147ee4>] (kthread) from [<c0113138>]
(ret_from_fork+0x14/0x3c)
[  769.637734] Mem-Info:
[  769.640025] active_anon:7547 inactive_anon:7455 isolated_anon:0
[  769.640025]  active_file:29517 inactive_file:49366 isolated_file:0
[  769.640025]  unevictable:20 dirty:133 writeback:0 unstable:0
[  769.640025]  slab_reclaimable:20 slab_unreclaimable:133
[  769.640025]  mapped:10320 shmem:66 pagetables:271 bounce:0
[  769.640025]  free:933 free_pcp:62 free_cma:0
[  769.672717] Node 0 active_anon:30188kB inactive_anon:29820kB
active_file:118068kB inactive_file:197464kB unevictable:80kB
isolated(anon):0kB isolated(file):0kB mapped:41280kB dirty:532kB
writeback:0kB shmem:264kB writeback_tmp:0kB unstable:0kB
all_unreclaimable? no
[  769.696194] Normal free:3732kB min:2536kB low:3168kB high:3800kB
active_anon:30188kB inactive_anon:29820kB active_file:118068kB
inactive_file:197464kB unevictable:80kB writepending:532kB
present:425984kB managed:410140kB mlocked:80kB kernel_stack:512kB
pagetables:1084kB bounce:0kB free_pcp:248kB local_pcp:248kB free_cma:0kB
[  769.724859] lowmem_reserve[]: 0 0 0
[  769.728352] Normal: 199*4kB (UH) 187*8kB (UMEH) 90*16kB (U) 0*32kB
0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3732kB
[  769.740389] 78955 total pagecache pages
[  769.744221] 0 pages in swap cache
[  769.747532] Swap cache stats: add 0, delete 0, find 0/0
[  769.752751] Free swap  = 505648kB
[  769.756060] Total swap = 505648kB
[  769.759369] 106496 pages RAM
[  769.762243] 0 pages HighMem/MovableOnly
[  769.766072] 3961 pages reserved
[  769.769749] ksoftirqd/0: page allocation failure: order:3,
mode:0x1284020(GFP_ATOMIC|__GFP_COMP|__GFP_NOTRACK), nodemask=(null)
[  769.781274] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted
4.13.0-rc1-2.g9c198f2-default #1
[  769.789360] Hardware name: BCM2835
[  769.792804] [<c011b3fc>] (unwind_backtrace) from [<c0117aa4>]
(show_stack+0x18/0x1c)
[  769.800568] [<c0117aa4>] (show_stack) from [<c021d24c>]
(warn_alloc+0xb4/0x16c)
[  769.807891] [<c021d24c>] (warn_alloc) from [<c021dd94>]
(__alloc_pages_nodemask+0x9f4/0xe64)
[  769.816355] [<c021dd94>] (__alloc_pages_nodemask) from [<c0263080>]
(cache_alloc_refill+0xe0/0x990)
[  769.825415] [<c0263080>] (cache_alloc_refill) from [<c0263f08>]
(__kmalloc+0x158/0x188)
[  769.833634] [<c0263f08>] (__kmalloc) from [<bf12caa8>]
(dwc2_map_urb_for_dma+0xb8/0x118 [dwc2])
[  769.842501] [<bf12caa8>] (dwc2_map_urb_for_dma [dwc2]) from
[<c059d45c>] (usb_hcd_submit_urb+0xb4/0x9ec)
[  769.852083] [<c059d45c>] (usb_hcd_submit_urb) from [<bf197400>]
(rx_submit+0x154/0x2c8 [usbnet])
[  769.860954] [<bf197400>] (rx_submit [usbnet]) from [<bf197b90>]
(rx_complete+0x2ac/0x308 [usbnet])
[  769.869969] [<bf197b90>] (rx_complete [usbnet]) from [<c059b5bc>]
(__usb_hcd_giveback_urb+0xa0/0x14c)
[  769.879208] [<c059b5bc>] (__usb_hcd_giveback_urb) from [<c059b6ec>]
(usb_giveback_urb_bh+0x84/0xb8)
[  769.888268] [<c059b6ec>] (usb_giveback_urb_bh) from [<c01301cc>]
(tasklet_action+0x60/0xac)
[  769.896629] [<c01301cc>] (tasklet_action) from [<c012f884>]
(__do_softirq+0xd0/0x2f0)
[  769.904465] [<c012f884>] (__do_softirq) from [<c012fad0>]
(run_ksoftirqd+0x2c/0x44)
[  769.912146] [<c012fad0>] (run_ksoftirqd) from [<c014bb0c>]
(smpboot_thread_fn+0x104/0x188)
[  769.920424] [<c014bb0c>] (smpboot_thread_fn) from [<c0147ee4>]
(kthread+0x138/0x150)
[  769.928175] [<c0147ee4>] (kthread) from [<c0113138>]
(ret_from_fork+0x14/0x3c)
[  769.935420] ax88179_178a 1-1.1:1.0 eth0: kevent 2 may have been dropped
[  769.942484] ksoftirqd/0: page allocation failure: order:3,
mode:0x1284020(GFP_ATOMIC|__GFP_COMP|__GFP_NOTRACK), nodemask=(null)
[  769.954008] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted
4.13.0-rc1-2.g9c198f2-default #1
[  769.962096] Hardware name: BCM2835
[  769.965539] [<c011b3fc>] (unwind_backtrace) from [<c0117aa4>]
(show_stack+0x18/0x1c)
[  769.973303] [<c0117aa4>] (show_stack) from [<c021d24c>]
(warn_alloc+0xb4/0x16c)
[  769.980627] [<c021d24c>] (warn_alloc) from [<c021dd94>]
(__alloc_pages_nodemask+0x9f4/0xe64)
[  769.989090] [<c021dd94>] (__alloc_pages_nodemask) from [<c0263080>]
(cache_alloc_refill+0xe0/0x990)
[  769.998147] [<c0263080>] (cache_alloc_refill) from [<c0263f08>]
(__kmalloc+0x158/0x188)
[  770.006362] [<c0263f08>] (__kmalloc) from [<bf12caa8>]
(dwc2_map_urb_for_dma+0xb8/0x118 [dwc2])
[  770.015230] [<bf12caa8>] (dwc2_map_urb_for_dma [dwc2]) from
[<c059d45c>] (usb_hcd_submit_urb+0xb4/0x9ec)
[  770.024810] [<c059d45c>] (usb_hcd_submit_urb) from [<bf197400>]
(rx_submit+0x154/0x2c8 [usbnet])
[  770.033679] [<bf197400>] (rx_submit [usbnet]) from [<bf197b90>]
(rx_complete+0x2ac/0x308 [usbnet])
[  770.042695] [<bf197b90>] (rx_complete [usbnet]) from [<c059b5bc>]
(__usb_hcd_giveback_urb+0xa0/0x14c)
[  770.051931] [<c059b5bc>] (__usb_hcd_giveback_urb) from [<c059b6ec>]
(usb_giveback_urb_bh+0x84/0xb8)
[  770.060991] [<c059b6ec>] (usb_giveback_urb_bh) from [<c01301cc>]
(tasklet_action+0x60/0xac)
[  770.069350] [<c01301cc>] (tasklet_action) from [<c012f884>]
(__do_softirq+0xd0/0x2f0)
[  770.077187] [<c012f884>] (__do_softirq) from [<c012fad0>]
(run_ksoftirqd+0x2c/0x44)
[  770.084868] [<c012fad0>] (run_ksoftirqd) from [<c014bb0c>]
(smpboot_thread_fn+0x104/0x188)
[  770.093145] [<c014bb0c>] (smpboot_thread_fn) from [<c0147ee4>]
(kthread+0x138/0x150)
[  770.100896] [<c0147ee4>] (kthread) from [<c0113138>]
(ret_from_fork+0x14/0x3c)
[  770.108141] ax88179_178a 1-1.1:1.0 eth0: kevent 2 may have been dropped

https://kernel.opensuse.org/cgit/kernel-source/plain/config/armv6hl/default

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)


From stefan.wahren at i2se.com  Sun Jul 23 14:02:53 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sun, 23 Jul 2017 23:02:53 +0200 (CEST)
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <dff231c6-feb4-fc15-75e9-cc5696ad2e55@suse.de>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <634582831.41619.1500728895557@email.1und1.de>
 <dff231c6-feb4-fc15-75e9-cc5696ad2e55@suse.de>
Message-ID: <1115544947.95458.1500843773126@email.1und1.de>


> Andreas F?rber <afaerber at suse.de> hat am 22. Juli 2017 um 15:33 geschrieben:
> 
> 
> Hi Stefan,
> 
> Am 22.07.2017 um 15:08 schrieb Stefan Wahren:
> > Andreas F?rber <afaerber at suse.de> hat am 22. Juli 2017 um 14:29 geschrieben:
> >> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
> >> The v4.13-rc1 DT works okay with a 4.12 kernel.
> > 
> > do you use arm64/defconfig or a modified one?
> 
> I had updated our custom config via oldconfig, the result is here:
> 
> https://kernel.opensuse.org/cgit/kernel-source/plain/config/arm64/default

There seems to be multiple issues. Using the arm64/defconfig USB seems to completly broken (4.10, 4.11, 4.12).

Since i don't know the reason, i would start bisecting based on the custom config.

> 
> Regards,
> Andreas
> 
> -- 
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
> GF: Felix Imend?rffer, Jane Smithard, Graham Norton
> HRB 21284 (AG N?rnberg)
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


From robin.murphy at arm.com  Mon Jul 24 04:22:24 2017
From: robin.murphy at arm.com (Robin Murphy)
Date: Mon, 24 Jul 2017 12:22:24 +0100
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
Message-ID: <b849a4dc-a095-6bb4-caf1-a1f7470bed91@arm.com>

Hi Andreas,

On 22/07/17 13:29, Andreas F?rber wrote:
> Hello,
> 
> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
> The v4.13-rc1 DT works okay with a 4.12 kernel.
> 
> Possibly related:
> 
> [   15.916350] OF: /soc/usb at 7e980000: could not get #phy-cells for /phy
> 
> [   16.496662] usb 1-1: new high-speed USB device number 2 using dwc2
> [   16.502988] dwc2 3f980000.usb: Cannot do DMA to address
> 0x00000000335da400

This is from SWIOTLB's map_single(), which means whatever device was
passed into dma_map_single() when mapping the URB had a DMA mask smaller
than 30 bits (or none at all), which sounds wrong and is almost
certainly the root of the problem (i.e. it probably wasn't the actual
HCD device described in DT and set up by of_dma_configure()). However,
arm64's __swiotlb_map_page() still shouldn't be trying to perform cache
maintenance on the error value returned, which looks to be where the
actual splat below hails from - leave that one with me ;)

Robin.

> [   16.510035] Unable to handle kernel paging request at virtual address
> ffff800000000000
> [   16.518103] swapper pgtable: 4k pages, 48-bit VAs, pgd = ffff0000096ac000
> [   16.524995] [ffff800000000000] *pgd=0000000036ff7003,
> *pud=0000000036ff6003, *pmd=0000000036ff5003, *pte=0000000000000000
> [   16.536229] Internal error: Oops: 96000147 [#1] SMP
> [   16.536243] Modules linked in: brcmutil cfg80211 soundcore
> drm_kms_helper rfkill drm fb_sys_fops syscopyarea dwc2 sysfillrect
> sysimgblt udc_core usbcore i2c_bcm2835 bcm2835_rng spi_bcm2835
> pwm_bcm2835 bcm2835_wdt uio_pdrv_genirq uio crc32_ce phy_generic
> leds_gpio mmc_block sdhci_iproc sdhci_pltfm sdhci bcm2835 mmc_core
> bcm2835_dma sg efivarfs
> [   16.536335] CPU: 1 PID: 34 Comm: kworker/1:1 Not tainted
> 4.13.0-rc1-2.g9c198f2-default #1
> [   16.536338] Hardware name: raspberrypi rpi/rpi, BIOS 2017.07-rc3
> 07/10/2017
> [   16.536560] Workqueue: usb_hub_wq hub_event [usbcore]
> [   16.536568] task: ffff800034cc6100 task.stack: ffff800034ccc000
> [   16.536585] PC is at __clean_dcache_area_poc+0x20/0x40
> [   16.536592] LR is at __swiotlb_map_page+0x9c/0xb8
> [   16.536597] pc : [<ffff00000809c160>] lr : [<ffff00000809a254>]
> pstate: 80000145
> [   16.536600] sp : ffff800034ccf8f0
> [   16.536603] x29: ffff800034ccf8f0 x28: ffff000000b2cfe8
> [   16.536611] x27: 0000000000000080 x26: ffff8000335a6800
> [   16.536619] x25: 0000000080000080 x24: 0000000000000400
> [   16.536626] x23: 0000000000000001 x22: 0000000000000008
> [   16.536633] x21: 00000000c0000000 x20: 0000000000000000
> [   16.536640] x19: ffff800034cf0c10 x18: ffffffffffffffff
> [   16.536647] x17: 0000000000003000 x16: ffff7e0000bd0080
> [   16.536654] x15: ffff000009429c08 x14: ffff0000895ba17f
> [   16.536662] x13: ffff0000095ba18d x12: ffff000009450000
> [   16.536669] x11: ffff00000942a078 x10: ffff000008624e28
> [   16.536676] x9 : 00000000ffffffd0 x8 : 0000000000000017
> [   16.536683] x7 : 3030303030307830 x6 : 00000000000000f6
> [   16.536690] x5 : 0000000000000000 x4 : 0000000000000002
> [   16.536696] x3 : 000000000000003f x2 : 0000000000000040
> [   16.536703] x1 : ffff800000000008 x0 : ffff800000000000
> [   16.536712] Process kworker/1:1 (pid: 34, stack limit =
> 0xffff800034ccc000)
> [   16.536718] Stack: (0xffff800034ccf8f0 to 0xffff800034cd0000)
> [   16.536724] f8e0:                                   ffff800034ccf930
> ffff000000b028c0
> [   16.536732] f900: ffff800026549100 0000000001400000 ffff80003446fc00
> 0000000001400000
> [   16.536739] f920: 0000000000000002 0000000000000000 ffff800034ccf980
> ffff000000b9784c
> [   16.536746] f940: ffff800026549100 0000000001400000 ffff80003446fc00
> 0000000001400000
> [   16.536754] f960: ffff800034ccfa80 ffff000008669290 0000000000000006
> ffff8000335a6898
> [   16.536761] f980: ffff800034ccf9b0 ffff000000b038d8 ffff800026549100
> ffff80003446fc00
> [   16.536769] f9a0: ffff000009429c08 ffff800032b65800 ffff800034ccfa90
> ffff000000b0574c
> [   16.536776] f9c0: ffff800026549100 ffff8000335a6800 0000000000000000
> 0000000001400000
> [   16.536783] f9e0: ffff800034ccfaf0 00000000ffffffd8 ffff800036f60080
> 4554535953425553
> [   16.536791] fa00: 4544006273753d4d ffff000000b2cfe8 ffff00312d313a62
> ffff800034ccfb00
> [   16.536799] fa20: ffff800034ccfa50 ffff00000814c7f4 ffff800034ccfa50
> ffff00000814c804
> [   16.536807] fa40: ffff800036f60080 0000000000000000 ffff800034ccfa80
> ffff00000814de54
> [   16.536814] fa60: ffff800034ccfb00 0000000000000032 ffff80002649c400
> 0000000000040d00
> [   16.536821] fa80: ffff800034ccfb20 0000000000040d00 ffff800034ccfaf0
> ffff000000b06184
> [   16.536829] faa0: ffff800026549100 ffff800034ccfb38 0000000000000000
> ffff800034ccfbcc
> [   16.536836] fac0: 0000000000001388 ffff800033175800 ffff800034ccfaf0
> ffff000000b06170
> [   16.536843] fae0: ffff800026549100 0000000001400000 ffff800034ccfb60
> ffff000000b06324
> [   16.536850] fb00: ffff8000335da400 0000000000000040 0000000000000000
> 0000000000000100
> [   16.536858] fb20: 0000000000000006 ffff800033175800 0000000080000080
> ffff800000000000
> [   16.536865] fb40: ffff800000000000 ffff800034ccfb48 ffff800034ccfb48
> 0000000000000040
> [   16.536873] fb60: ffff800034ccfbe0 ffff000000afaa54 ffff8000335a6800
> ffff8000264ac000
> [   16.536879] fb80: ffff80003446fc00 0000000000000001 0000000000000003
> 0000000000000002
> [   16.536887] fba0: ffff800033175800 0000000080000080 0000000000000000
> 0000000000000002
> [   16.536894] fbc0: 0000000000000000 ffff800032b65800 ffff800000001388
> ffff800032b65800
> [   16.536901] fbe0: ffff800034ccfc50 ffff000000afe7d0 ffff8000264ac000
> 0000000000000001
> [   16.536909] fc00: ffff800032b65800 0000000000000000 ffff80002649c400
> ffff80003446fc30
> [   16.536916] fc20: ffff80003446fc00 ffff80003446fc00 ffff8000335a6800
> ffff80002649c718
> [   16.536924] fc40: 0000000300000001 0000003200000000 ffff800034ccfce0
> ffff000000aff714
> [   16.536931] fc60: ffff8000264ac000 0000000000000001 ffff8000264ac058
> ffff80002649c718
> [   16.536939] fc80: ffff80002649c718 0000000000000101 0000000000000000
> ffff80002649c408
> [   16.536946] fca0: 0000000000000000 0000000000000000 ffff000000b2ed28
> 0000006400aff34c
> [   16.536953] fcc0: ffff800000000002 ffff000000b2d018 ffff8000264ac000
> 0000000000000004
> [   16.536961] fce0: ffff800034ccfdc0 ffff0000080e8c0c ffff8000264ac1d0
> ffff8000357a4f00
> [   16.536968] fd00: ffff7dffbffa9100 0000000000000000 ffff800036f67980
> 0000000000000000
> [   16.536975] fd20: 00000000fffffef7 ffff000008b77728 0000000000000000
> 0000000000000000
> [   16.536982] fd40: ffff8000264ac170 ffff8000357a4f00 ffff800036f6bd00
> 0000000000000000
> [   16.536990] fd60: ffff000000b2efc8 ffff800032b658f8 ffff8000344a5c00
> ffff8000264ac058
> [   16.536997] fd80: ffff8000264ac1d0 0000000000000000 ffff800032b65800
> ffff8000264ac070
> [   16.537004] fda0: ffff8000264ac060 ffff8000344a5c30 ffff8000264ac1d0
> ffff800000000101
> [   16.537012] fdc0: ffff800034ccfe10 ffff0000080e8ec0 ffff8000357a4f00
> ffff800036f67980
> [   16.537020] fde0: ffff8000357a4f30 ffff0000095b5800 ffff800036f679a0
> ffff000009427000
> [   16.537027] fe00: ffff8000357a4f00 ffff0000080e8f54 ffff800034ccfe70
> ffff0000080effa8
> [   16.537035] fe20: ffff8000357a0680 ffff800034c46680 ffff800034cc6100
> ffff000008b77728
> [   16.537042] fe40: ffff800035703d00 ffff8000357a4f00 ffff0000080e8e70
> ffff800034c46680
> [   16.537050] fe60: ffff800034ccfe70 ffff0000080eff4c 0000000000000000
> ffff0000080836c0
> [   16.537057] fe80: ffff0000080efe70 ffff8000357a0680 0000000000000000
> 0000000000000000
> [   16.537063] fea0: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537070] fec0: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537076] fee0: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537083] ff00: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537089] ff20: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537096] ff40: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537102] ff60: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537109] ff80: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537116] ffa0: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [   16.537122] ffc0: 0000000000000000 0000000000000005 0000000000000000
> 0000000000000000
> [   16.537129] ffe0: 0000000000000000 0000000000000000 57810d82330b7058
> a6c1bc314470bbc6
> [   16.537133] Call trace:
> [   16.537139] Exception stack(0xffff800034ccf720 to 0xffff800034ccf850)
> [   16.537147] f720: ffff800034cf0c10 0001000000000000 ffff800034ccf8f0
> ffff00000809c160
> [   16.537154] f740: ffff800034ccf7b0 ffff800034ccf7b0 ffff800034ccf780
> 00000000ffffffd8
> [   16.537162] f760: ffff800034ccf7b0 ffff800034ccf7b0 ffff800034ccf780
> 00000000ffffffd8
> [   16.537169] f780: ffff0000096940a8 ffff000000bac320 ffff800034cec780
> ffff800034ccf800
> [   16.537176] f7a0: ffff00000968e0a0 0000000000000008 ffff800034ccf7e0
> ffff000008669664
> [   16.537183] f7c0: ffff800000000000 ffff800000000008 0000000000000040
> 000000000000003f
> [   16.537190] f7e0: 0000000000000002 0000000000000000 00000000000000f6
> 3030303030307830
> [   16.537197] f800: 0000000000000017 00000000ffffffd0 ffff000008624e28
> ffff00000942a078
> [   16.537204] f820: ffff000009450000 ffff0000095ba18d ffff0000895ba17f
> ffff000009429c08
> [   16.537209] f840: ffff7e0000bd0080 0000000000003000
> [   16.537219] [<ffff00000809c160>] __clean_dcache_area_poc+0x20/0x40
> [   16.537422] [<ffff000000b028c0>] usb_hcd_map_urb_for_dma+0x1e8/0x598
> [usbcore]
> [   16.537544] [<ffff000000b9784c>] dwc2_map_urb_for_dma+0x54/0xf0 [dwc2]
> [   16.537726] [<ffff000000b038d8>] usb_hcd_submit_urb+0xc0/0xb10 [usbcore]
> [   16.537902] [<ffff000000b0574c>] usb_submit_urb+0x23c/0x588 [usbcore]
> [   16.538078] [<ffff000000b06184>] usb_start_wait_urb+0x54/0x148 [usbcore]
> [   16.538253] [<ffff000000b06324>] usb_control_msg+0xac/0x108 [usbcore]
> [   16.538427] [<ffff000000afaa54>] hub_port_init+0x194/0xb38 [usbcore]
> [   16.538602] [<ffff000000afe7d0>] hub_port_connect+0x128/0x8e8 [usbcore]
> [   16.538777] [<ffff000000aff714>] hub_event+0x784/0xa38 [usbcore]
> [   16.538792] [<ffff0000080e8c0c>] process_one_work+0x1e4/0x448
> [   16.538800] [<ffff0000080e8ec0>] worker_thread+0x50/0x488
> [   16.538811] [<ffff0000080effa8>] kthread+0x138/0x140
> [   16.538821] [<ffff0000080836c0>] ret_from_fork+0x10/0x50
> [   16.538831] Code: 9ac32042 8b010001 d1000443 8a230000 (d50b7a20)
> [   16.538883] ---[ end trace 7c524f10d9e752dc ]---
> 
> Regards,
> Andreas
> 



From robh at kernel.org  Mon Jul 24 13:18:39 2017
From: robh at kernel.org (Rob Herring)
Date: Mon, 24 Jul 2017 15:18:39 -0500
Subject: [PATCH 2/3] dt-bindings: bcm: Add Raspberry Pi Zero W
In-Reply-To: <1500579429-9101-3-git-send-email-stefan.wahren@i2se.com>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
 <1500579429-9101-3-git-send-email-stefan.wahren@i2se.com>
Message-ID: <20170724201839.474rhadxcggz2lpe@rob-hp-laptop>

On Thu, Jul 20, 2017 at 09:37:08PM +0200, Stefan Wahren wrote:
> This adds the root properties for the Raspberry Pi Zero W.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
> Reviewed-by: Eric Anholt <eric at anholt.net>
> ---
>  Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
>  1 file changed, 4 insertions(+)

Acked-by: Rob Herring <robh at kernel.org>


From stefan.wahren at i2se.com  Mon Jul 24 22:19:56 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Tue, 25 Jul 2017 07:19:56 +0200 (CEST)
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <b849a4dc-a095-6bb4-caf1-a1f7470bed91@arm.com>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <b849a4dc-a095-6bb4-caf1-a1f7470bed91@arm.com>
Message-ID: <1435162494.87709.1500959996834@email.1und1.de>

Hi Robin,

> Robin Murphy <robin.murphy at arm.com> hat am 24. Juli 2017 um 13:22 geschrieben:
> 
> 
> Hi Andreas,
> 
> On 22/07/17 13:29, Andreas F?rber wrote:
> > Hello,
> > 
> > With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
> > The v4.13-rc1 DT works okay with a 4.12 kernel.
> > 
> > Possibly related:
> > 
> > [   15.916350] OF: /soc/usb at 7e980000: could not get #phy-cells for /phy
> > 
> > [   16.496662] usb 1-1: new high-speed USB device number 2 using dwc2
> > [   16.502988] dwc2 3f980000.usb: Cannot do DMA to address
> > 0x00000000335da400
> 
> This is from SWIOTLB's map_single(), which means whatever device was
> passed into dma_map_single() when mapping the URB had a DMA mask smaller
> than 30 bits (or none at all), which sounds wrong and is almost
> certainly the root of the problem (i.e. it probably wasn't the actual
> HCD device described in DT and set up by of_dma_configure()). 

how can i figure out what's cause this issue (bcm283x or dwc2 specific)?

The dwc2 hcd already check the DMA mask on probe [1] and i never saw a warning in error case.

Regards
Stefan

[1] - http://elixir.free-electrons.com/linux/latest/source/drivers/usb/dwc2/hcd.c#L5096

> However,
> arm64's __swiotlb_map_page() still shouldn't be trying to perform cache
> maintenance on the error value returned, which looks to be where the
> actual splat below hails from - leave that one with me ;)
> 
> Robin.
>


From robin.murphy at arm.com  Tue Jul 25 06:21:37 2017
From: robin.murphy at arm.com (Robin Murphy)
Date: Tue, 25 Jul 2017 14:21:37 +0100
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <1435162494.87709.1500959996834@email.1und1.de>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <b849a4dc-a095-6bb4-caf1-a1f7470bed91@arm.com>
 <1435162494.87709.1500959996834@email.1und1.de>
Message-ID: <38cfb4d7-c356-d2b2-0367-69ef3417d941@arm.com>

Hi Stefan,

On 25/07/17 06:19, Stefan Wahren wrote:
>>> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
>>> The v4.13-rc1 DT works okay with a 4.12 kernel.
>>>
>>> Possibly related:
>>>
>>> [   15.916350] OF: /soc/usb at 7e980000: could not get #phy-cells for /phy
>>>
>>> [   16.496662] usb 1-1: new high-speed USB device number 2 using dwc2
>>> [   16.502988] dwc2 3f980000.usb: Cannot do DMA to address
>>> 0x00000000335da400
>>
>> This is from SWIOTLB's map_single(), which means whatever device was
>> passed into dma_map_single() when mapping the URB had a DMA mask smaller
>> than 30 bits (or none at all), which sounds wrong and is almost
>> certainly the root of the problem (i.e. it probably wasn't the actual
>> HCD device described in DT and set up by of_dma_configure()). 
> 
> how can i figure out what's cause this issue (bcm283x or dwc2 specific)?
> 
> The dwc2 hcd already check the DMA mask on probe [1] and i never saw a warning in error case.

I'll admit I'm a little stumped, since the two commits to dwc2 since
4.12 seem entirely inconsequential.

The only way I can see this happening is if the first dma_capable()
check in swiotlb_map_page() fails, and since swiotlb_force must be set
to SWIOTLB_NOFORCE in order to print the error later, and the address
and size look reasonable, that only leaves dev->dma_mask as the culprit.

>From the subsequent fallout (which on closer inspection looks more to do
with calling into uninitialised SWIOTLB state than the arm64 DMA code
actually doing anything wrong), I'd guess dev->dma_pfn_offset is
probably 0 as well, which further points to the wrong device. Maybe
something's changed lower down in the USB core? Turning on tracing and
booting with "tp_printk trace_event=swiotlb_bounced" on the command line
should shed a bit more light on what's going on.

Robin.


From stefan.wahren at i2se.com  Tue Jul 25 11:44:38 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Tue, 25 Jul 2017 20:44:38 +0200 (CEST)
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <38cfb4d7-c356-d2b2-0367-69ef3417d941@arm.com>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <b849a4dc-a095-6bb4-caf1-a1f7470bed91@arm.com>
 <1435162494.87709.1500959996834@email.1und1.de>
 <38cfb4d7-c356-d2b2-0367-69ef3417d941@arm.com>
Message-ID: <378781535.113835.1501008278477@email.1und1.de>


> Robin Murphy <robin.murphy at arm.com> hat am 25. Juli 2017 um 15:21 geschrieben:
> 
> From the subsequent fallout (which on closer inspection looks more to do
> with calling into uninitialised SWIOTLB state than the arm64 DMA code
> actually doing anything wrong), I'd guess dev->dma_pfn_offset is
> probably 0 as well, which further points to the wrong device. Maybe
> something's changed lower down in the USB core? Turning on tracing and
> booting with "tp_printk trace_event=swiotlb_bounced" on the command line
> should shed a bit more light on what's going on.

I took a slightly different config which also works with 4.12 and break with 4.13-rc1:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.0-rc1-ARCH (stefan at Latitude-E4310) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)) #34 SMP Tue Jul 25 20:31:35 CEST 2017
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Failed to reserve 512 MiB
[    0.000000] percpu: Embedded 3 pages/cpu @ffff80003ae90000 s125336 r8192 d63080 u196608
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15089
[    0.000000] Kernel command line: earlyprintk console=ttyAMA0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa02082 bcm2709.serial=0x53a68e44 bcm2709.uart_clock=48000000 smsc95xx.macaddr=B8:27:EB:A6:8E:44 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=29cb32be-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait tp_printk trace_event=swiotlb_bounced
[    0.000000] PID hash table entries: 4096 (order: -1, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 4, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 3, 524288 bytes)
[    0.000000] Memory: 939712K/966656K available (11836K kernel code, 2400K rwdata, 5376K rodata, 1600K init, 1269K bss, 26944K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7bdfffff0000   (126847 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008c10000   ( 11840 KB)
[    0.000000]     .rodata : 0xffff000008c10000 - 0xffff000009160000   (  5440 KB)
[    0.000000]       .init : 0xffff000009160000 - 0xffff0000092f0000   (  1600 KB)
[    0.000000]       .data : 0xffff0000092f0000 - 0xffff000009548200   (  2401 KB)
[    0.000000]        .bss : 0xffff000009548200 - 0xffff000009685988   (  1270 KB)
[    0.000000]     fixed   : 0xffff7fdffe7d0000 - 0xffff7fdffec00000   (  4288 KB)
[    0.000000]     PCI I/O : 0xffff7fdffee00000 - 0xffff7fdfffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7fe000000000 - 0xffff800000000000   (   128 GB maximum)
[    0.000000]               0xffff7fe000000000 - 0xffff7fe0000ec000   (     0 MB actual)
[    0.000000]     memory  : 0xffff800000000000 - 0xffff80003b000000   (   944 MB)
[    0.000000] random: get_random_u64 called from cache_random_seq_create+0x60/0x118 with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 43369 entries in 11 pages
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] arch_timer: WARNING: Invalid trigger for IRQ2, assuming level low
[    0.000000] arch_timer: WARNING: Please fix your firmware
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000006] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000180] Console: colour dummy device 80x25
[    0.001202] console [tty1] enabled
[    0.001246] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001296] pid_max: default: 32768 minimum: 301
[    0.002076] Security Framework initialized
[    0.002106] Yama: becoming mindful.
[    0.002325] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes)
[    0.002417] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes)
[    0.004540] ASID allocator initialised with 65536 entries
[    0.004664] Hierarchical SRCU implementation.
[    0.010622] EFI services will not be available.
[    0.010923] smp: Bringing up secondary CPUs ...
[    0.011453] Detected VIPT I-cache on CPU1
[    0.011509] arch_timer: WARNING: Invalid trigger for IRQ2, assuming level low
[    0.011512] arch_timer: WARNING: Please fix your firmware
[    0.011528] CPU1: Booted secondary processor [410fd034]
[    0.012110] Detected VIPT I-cache on CPU2
[    0.012141] arch_timer: WARNING: Invalid trigger for IRQ2, assuming level low
[    0.012144] arch_timer: WARNING: Please fix your firmware
[    0.012154] CPU2: Booted secondary processor [410fd034]
[    0.012684] Detected VIPT I-cache on CPU3
[    0.012715] arch_timer: WARNING: Invalid trigger for IRQ2, assuming level low
[    0.012717] arch_timer: WARNING: Please fix your firmware
[    0.012727] CPU3: Booted secondary processor [410fd034]
[    0.012834] smp: Brought up 1 node, 4 CPUs
[    0.013114] SMP: Total of 4 processors activated.
[    0.013142] CPU features: detected feature: 32-bit EL0 Support
[    0.013307] CPU: All CPU(s) started at EL2
[    0.015793] devtmpfs: initialized
[    0.022239] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.022309] futex hash table entries: 1024 (order: 1, 131072 bytes)
[    0.022999] pinctrl core: initialized pinctrl subsystem
[    0.023916] DMI not present or invalid.
[    0.024474] NET: Registered protocol family 16
[    0.028000] cpuidle: using governor ladder
[    0.028269] cpuidle: using governor menu
[    0.029692] vdso: 2 pages (1 code @ ffff000008c20000, 1 data @ ffff000009310000)
[    0.029739] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.030383] DMA: preallocated 256 KiB pool for atomic allocations
[    0.030911] Serial: AMBA PL011 UART driver
[    0.049727] HugeTLB registered 512 MiB page size, pre-allocated 0 pages
[    0.051674] ACPI: Interpreter disabled.
[    0.052370] vgaarb: loaded
[    0.053556] SCSI subsystem initialized
[    0.053990] usbcore: registered new interface driver usbfs
[    0.054069] usbcore: registered new interface driver hub
[    0.054178] usbcore: registered new device driver usb
[    0.054675] EDAC MC: Ver: 3.0.0
[    0.055011] dmi: Firmware registration failed.
[    0.055611] Advanced Linux Sound Architecture Driver Initialized.
[    0.056114] NetLabel: Initializing
[    0.056140] NetLabel:  domain hash size = 128
[    0.056164] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.056279] NetLabel:  unlabeled traffic allowed by default
[    0.057594] clocksource: Switched to clocksource arch_sys_counter
[    0.182792] VFS: Disk quotas dquot_6.6.0
[    0.182999] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[    0.184087] simple-framebuffer 3db75000.framebuffer: framebuffer at 0x3db75000, 0x85400 bytes, mapped to 0xffff000009805000
[    0.184142] simple-framebuffer 3db75000.framebuffer: format=r5g6b5, mode=656x416x16, linelength=1312
[    0.187891] Console: switching to colour frame buffer device 82x26
[    0.191335] simple-framebuffer 3db75000.framebuffer: fb0: simplefb registered!
[    0.193151] pnp: PnP ACPI: disabled
[    0.203229] NET: Registered protocol family 2
[    0.205911] TCP established hash table entries: 8192 (order: 0, 65536 bytes)
[    0.207946] TCP bind hash table entries: 8192 (order: 1, 131072 bytes)
[    0.210134] TCP: Hash tables configured (established 8192 bind 8192)
[    0.212244] UDP hash table entries: 2048 (order: 0, 65536 bytes)
[    0.214363] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes)
[    0.216763] NET: Registered protocol family 1
[    0.219246] RPC: Registered named UNIX socket transport module.
[    0.221261] RPC: Registered udp transport module.
[    0.223251] RPC: Registered tcp transport module.
[    0.225191] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.228900] kvm [1]: 8-bit VMID
[    0.230805] kvm [1]: IDype id_legacy registered
[    0.283590] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.285369] SGI XFS with ACLs, security attributes, no debug enabled
[    0.303717] NET: Registered protocol family 38
[    0.305462] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.308778] io scheduler noop registered
[    0.310387] io scheduler deadline registered (default)
[    0.312143] io scheduler cfq registered
[    0.313777] io scheduler mq-deadline registered
[    0.315373] io scheduler kyber registered
[    0.317182] io scheduler bfq registered
[    0.319158] atomic64_test: passed
[    0.328445] ipmi message handler version 39.2
[    0.337902] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.341209] console [ttyS0] disabled
[    0.342867] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 61, base_baud = 31250000) is a 16550
[    1.197104] console [ttyS0] enabled
[    1.203172] msm_serial: driver initialized
[    1.209904] bcm2835-rng 3f104000.rng: hwrng registered
[    1.217568] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.228419] libphy: Fixed MDIO Bus: probed
[    1.235986] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.244308] ehci-pci: EHCI PCI platform driver
[    1.250478] ehci-platform: EHCI generic platform driver
[    1.257466] ehci-orion: EHCI orion driver
[    1.263190] ehci-msm: Qualcomm On-Chip EHCI Host Controller
[    1.270538] tegra-ehci: Tegra EHCI driver
[    1.276353] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.284312] ohci-pci: OHCI PCI platform driver
[    1.290560] ohci-platform: OHCI generic platform driver
[    1.297709] uhci_hcd: USB Universal Host Controller Interface driver
[    1.306437] usbcore: registered new interface driver uas
[    1.313751] usbcore: registered new interface driver usb-storage
[    1.321640] usbcore: registered new interface driver ums-alauda
[    1.329376] usbcore: registered new interface driver ums-cypress
[    1.337103] usbcore: registered new interface driver ums-datafab
[    1.344744] usbcore: registered new interface driver ums_eneub6250
[    1.352544] usbcore: registered new interface driver ums-freecom
[    1.360120] usbcore: registered new interface driver ums-isd200
[    1.367552] usbcore: registered new interface driver ums-jumpshot
[    1.375110] usbcore: registered new interface driver ums-karma
[    1.382334] usbcore: registered new interface driver ums-onetouch
[    1.389768] usbcore: registered new interface driver ums-realtek
[    1.397021] usbcore: registered new interface driver ums-sddr09
[    1.404156] usbcore: registered new interface driver ums-sddr55
[    1.411253] usbcore: registered new interface driver ums-usbat
[    1.418273] usbcore: registered new interface driver usbserial
[    1.425152] usbcore: registered new interface driver usbserial_generic
[    1.432693] usbserial: USB Serial support registered for generic
[    1.440885] mousedev: PS/2 mouse device common for all mice
[    1.450044] device-mapper: uevent: version 1.0.3
[    1.455933] device-mapper: ioctl: 4.36.0-ioctl (2017-06-09) initialised: dm-devel at redhat.com
[    1.466760] Machine is not compatible with mt8173-cpufreq
[    1.473600] sdhci: Secure Digital Host Controller Interface driver
[    1.480990] sdhci: Copyright(c) Pierre Ossman
[    1.487095] Synopsys Designware Multimedia Card Interface Driver
[    1.495432] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.567684] mmc0: SDHCI controller on 3f300000.sdhci [3f300000.sdhci] using PIO
[    1.577297] ledtrig-cpu: registered to indicate activity on CPUs
[    1.585085] dmi-sysfs: dmi entry is absent.
[    1.591052] hidraw: raw HID events driver (C) Jiri Kosina
[    1.598237] usbcore: registered new interface driver usbhid
[    1.605490] usbhid: USB HID core driver
[    1.611683] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    1.617090] mmc0: new high speed SDHC card at address 0001
[    1.617693] mmcblk0: mmc0:0001 00000 29.8 GiB
[    1.622335]  mmcblk0: p1 p2
[    1.639605] drop_monitor: Initializing network drop monitor service
[    1.648144] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.655402] Initializing XFRM netlink socket
[    1.662316] NET: Registered protocol family 10
[    1.670909] Segment Routing with IPv6
[    1.676458] mip6: Mobile IPv6
[    1.681189] NET: Registered protocol family 17
[    1.687471] Key type dns_resolver registered
[    1.694865] registered taskstats version 1
[    1.700808] zswap: loaded using pool lzo/zbud
[    1.708435] Key type big_key registered
[    1.715236] Key type encrypted registered
[    1.724312] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 72, base_baud = 0) is a PL011 rev2
[    5.265460] console [ttyAMA0] enabled
[    5.284373] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-05-15 16:57
[    5.347032] dwc2 3f980000.usb: 3f980000.usb supply vusb_d not found, using dummy regulator
[    5.383637] dwc2 3f980000.usb: 3f980000.usb supply vusb_a not found, using dummy regulator
[    5.471022] dwc2 3f980000.usb: DWC OTG Controller
[    5.491923] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    5.522064] dwc2 3f980000.usb: irq 41, io mem 0x3f980000
[    5.545422] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    5.574537] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.605424] usb usb1: Product: DWC OTG Controller
[    5.626188] usb usb1: Manufacturer: Linux 4.13.0-rc1-ARCH dwc2_hsotg
[    5.653623] usb usb1: SerialNumber: 3f980000.usb
[    5.674597] hub 1-0:1.0: USB hub found
[    5.691583] hub 1-0:1.0: 1 port detected
[    5.709740] hctosys: unable to open rtc device (rtc0)
[    5.732170] ALSA device list:
[    5.745944]   No soundcards found.
[    5.761534] md: Waiting for all devices to be available before autodetect
[    5.790696] md: If you don't use raid, use raid=noautodetect
[    5.815981] md: Autodetecting RAID arrays.
[    5.834224] md: autorun ...
[    5.847116] md: ... autorun DONE.
[    5.894169] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    5.930036] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    5.968062] devtmpfs: mounted
[    5.989908] Freeing unused kernel memory: 1600K
[    6.137682] usb 1-1: new high-speed USB device number 2 using dwc2
[    6.137736] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d79d80 size=8 NO_FORCE
[    6.137754] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d79d80
[    6.137771] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d72700 size=64 NO_FORCE
[    6.137779] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d72700
[    6.138562] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d79d80 size=8 NO_FORCE
[    6.138570] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d79d80
[    6.138581] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d72700 size=64 NO_FORCE
[    6.138589] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d72700
[    6.138655] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d79d80 size=8 NO_FORCE
[    6.138663] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d79d80
[    6.138674] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d72700 size=64 NO_FORCE
[    6.138681] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d72700
[    6.357642] usb 1-1: device descriptor read/64, error -32
[    6.420281] systemd[1]: System time before build time, advancing clock.
[    6.497649] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7d400 size=8 NO_FORCE
[    6.497671] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d7d400
[    6.497686] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76080 size=64 NO_FORCE
[    6.497693] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d76080
[    6.497801] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7d400 size=8 NO_FORCE
[    6.497809] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d7d400
[    6.497820] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76080 size=64 NO_FORCE
[    6.497827] dwc2 3f980000.usb: Cannot do DMA to address 0x0000000024d76080
[    6.497884] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7d400 size=8 NO_FORCE
[    6.497895] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76080 size=64 NO_FORCE
[    6.767606] usb 1-1: device descriptor read/64, error -32
[    7.103734] systemd[1]: systemd 233 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN default-hierarchy=hybrid)
[    7.157624] usb 1-1: new high-speed USB device number 3 using dwc2
[    7.157664] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76c80 size=8 NO_FORCE
[    7.157686] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7f880 size=64 NO_FORCE
[    7.304546] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76c80 size=8 NO_FORCE
[    7.305253] systemd[1]: Detected architecture arm64.
[    7.369500] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7f880 size=64 NO_FORCE
[    7.369680] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76c80 size=8 NO_FORCE
[    7.369692] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7f880 size=64 NO_FORCE
[    7.505581] systemd[1]: Set hostname to <alarm>.
[    7.577794] usb 1-1: device descriptor read/64, error -32
[    7.629650] uart-pl011 3f201000.serial: no DMA platform data
[    7.717682] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76c80 size=8 NO_FORCE
[    7.759839] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7f880 size=64 NO_FORCE
[    7.802399] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76c80 size=8 NO_FORCE
[    7.844561] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7f880 size=64 NO_FORCE
[    7.887138] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d76c80 size=8 NO_FORCE
[    7.929426] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7f880 size=64 NO_FORCE
[    7.994968] systemd[1]: Listening on Process Core Dump Socket.
[    8.023899] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    8.062090] systemd[1]: Listening on Journal Socket.
[    8.087225] systemd[1]: Listening on Journal Socket (/dev/log).
[    8.156061] systemd[1]: Listening on udev Control Socket.
[    8.177613] usb 1-1: device descriptor read/64, error -32
[    8.208056] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    8.253168] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[    8.507731] usb 1-1: new high-speed USB device number 4 using dwc2
[    8.547742] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d77380 size=8 NO_FORCE
[    8.596619] systemd-journald[198]: Received request to flush runtime journal from PID 1
[    8.807702] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7d080 size=8 NO_FORCE
[    9.067672] usb 1-1: device not accepting address 4, error -32
[    9.307662] usb 1-1: new high-speed USB device number 5 using dwc2
[    9.334282] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7d700 size=8 NO_FORCE
[    9.587730] swiotlb_bounced: dev_name: 3f980000.usb dma_mask=7fffffff dev_addr=e4d7dd00 size=8 NO_FORCE
[    9.847705] usb 1-1: device not accepting address 5, error -32
[    9.881425] usb usb1-port1: unable to enumerate USB device
[   11.287698] random: crng init done

> 
> Robin.
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


From stefan.wahren at i2se.com  Tue Jul 25 12:56:38 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Tue, 25 Jul 2017 21:56:38 +0200 (CEST)
Subject: No Ethernet on Raspberry Pi 3 in v4.13-rc1
In-Reply-To: <38cfb4d7-c356-d2b2-0367-69ef3417d941@arm.com>
References: <5650979e-ea55-0337-2edd-d2c3e8ad0e37@suse.de>
 <b849a4dc-a095-6bb4-caf1-a1f7470bed91@arm.com>
 <1435162494.87709.1500959996834@email.1und1.de>
 <38cfb4d7-c356-d2b2-0367-69ef3417d941@arm.com>
Message-ID: <1594564275.116129.1501012598860@email.1und1.de>


> Robin Murphy <robin.murphy at arm.com> hat am 25. Juli 2017 um 15:21 geschrieben:
> 
> 
> Hi Stefan,
> 
> On 25/07/17 06:19, Stefan Wahren wrote:
> >>> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed).
> >>> The v4.13-rc1 DT works okay with a 4.12 kernel.
> >>>
> >>> Possibly related:
> >>>
> >>> [   15.916350] OF: /soc/usb at 7e980000: could not get #phy-cells for /phy
> >>>
> >>> [   16.496662] usb 1-1: new high-speed USB device number 2 using dwc2
> >>> [   16.502988] dwc2 3f980000.usb: Cannot do DMA to address
> >>> 0x00000000335da400
> >>
> >> This is from SWIOTLB's map_single(), which means whatever device was
> >> passed into dma_map_single() when mapping the URB had a DMA mask smaller
> >> than 30 bits (or none at all), which sounds wrong and is almost
> >> certainly the root of the problem (i.e. it probably wasn't the actual
> >> HCD device described in DT and set up by of_dma_configure()). 
> > 
> > how can i figure out what's cause this issue (bcm283x or dwc2 specific)?
> > 
> > The dwc2 hcd already check the DMA mask on probe [1] and i never saw a warning in error case.
> 
> I'll admit I'm a little stumped, since the two commits to dwc2 since
> 4.12 seem entirely inconsequential.
> 
> The only way I can see this happening is if the first dma_capable()
> check in swiotlb_map_page() fails, and since swiotlb_force must be set
> to SWIOTLB_NOFORCE in order to print the error later, and the address
> and size look reasonable, that only leaves dev->dma_mask as the culprit.
> 
> From the subsequent fallout (which on closer inspection looks more to do
> with calling into uninitialised SWIOTLB state than the arm64 DMA code
> actually doing anything wrong), I'd guess dev->dma_pfn_offset is
> probably 0 as well, which further points to the wrong device. Maybe
> something's changed lower down in the USB core? Turning on tracing and
> booting with "tp_printk trace_event=swiotlb_bounced" on the command line
> should shed a bit more light on what's going on.
> 

FWIW, i added some dev_info before and after dma_set_mask in dwc2 (error case):

[    5.471761] dwc2 3f980000.usb: before mask: FFFFFFFF
[    5.491016] dwc2 3f980000.usb: before coherent mask: FFFFFFFF
[    5.513379] dwc2 3f980000.usb: after mask: FFFFFFFF
[    5.532572] dwc2 3f980000.usb: after coherent mask: FFFFFFFF
[    5.555039] dwc2 3f980000.usb: DWC OTG Controller
[    5.575855] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    5.605944] dwc2 3f980000.usb: irq 41, io mem 0x3f980000

which doesn't match the tracing outputs.

> Robin.
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


From stefan.wahren at i2se.com  Tue Jul 25 23:19:25 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Wed, 26 Jul 2017 08:19:25 +0200 (CEST)
Subject: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W
In-Reply-To: <1389331679.85833.1500323470395@email.1und1.de>
References: <384537059.123625.1498678388857@email.1und1.de>
 <1133935948.74840.1500297053336@email.1und1.de>
 <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>
 <1389331679.85833.1500323470395@email.1und1.de>
Message-ID: <314866679.136055.1501049965582@email.1und1.de>

Hi,

> Stefan Wahren <stefan.wahren at i2se.com> hat am 17. Juli 2017 um 22:31 geschrieben:
> 
> 
> Hi,
> 
> > Franky Lin <franky.lin at broadcom.com> hat am 17. Juli 2017 um 21:50 geschrieben:
> > 
> > 
> > On Mon, Jul 17, 2017 at 6:10 AM, Stefan Wahren <stefan.wahren at i2se.com> wrote:
> > > Hi,
> > >
> > >> Stefan Wahren <stefan.wahren at i2se.com> hat am 28. Juni 2017 um 21:33 geschrieben:
> > >>
> > >>
> > >> Hi,
> > >>
> > >> i'm currently working on Raspberry Pi Zero W for Mainline. Here is my first patch series [1].
> > >>
> > >> Unfortunately i didn't get brcmfmac (connected via SDIO) probed with this patch series against 4.12.0-rc5-next-20170616+
> > >>
> > >> [    8.389167] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
> > >> [    8.735111] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
> > >> [    8.786016] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
> > >> [   11.288798] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> > >> [   11.292822] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> > >> [   13.848777] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> > >> [   13.852974] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> > >> [   16.408762] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> > >> [   16.413004] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> > >> [   18.968769] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> > >> [   18.972965] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> > >> [   21.528743] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> > >> [   21.532924] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> > >> [   24.088745] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> > >> [   24.092948] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
> > >> [   26.648764] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
> > >> [   26.648789] brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
> > >> [   26.648831] brcmfmac: brcmf_bus_started: failed: -12
> > >> [   26.648842] brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
> > >>
> > ...
> > Can you please try to comment out the following lines in
> > brcmf_feat_attach? That's the only suspicious line that interact with
> > firmware in the patch.
> > 
> > + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
> > +                                            &gscan_cfg, sizeof(gscan_cfg));
> 
> after commenting out this line, the issue doesn't appear.
>

what are the plans to fix this regression?


From arend.vanspriel at broadcom.com  Wed Jul 26 01:50:30 2017
From: arend.vanspriel at broadcom.com (Arend van Spriel)
Date: Wed, 26 Jul 2017 10:50:30 +0200
Subject: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W
In-Reply-To: <314866679.136055.1501049965582@email.1und1.de>
References: <384537059.123625.1498678388857@email.1und1.de>
 <1133935948.74840.1500297053336@email.1und1.de>
 <CA+8PC_eKn_LddvcpYG=V6vD7qZfVNEmmzR3gWXxWO80SNKR-3Q@mail.gmail.com>
 <1389331679.85833.1500323470395@email.1und1.de>
 <314866679.136055.1501049965582@email.1und1.de>
Message-ID: <597857D6.4010508@broadcom.com>

On 7/26/2017 8:19 AM, Stefan Wahren wrote:
> Hi,
>
>> Stefan Wahren <stefan.wahren at i2se.com> hat am 17. Juli 2017 um 22:31 geschrieben:
>>
>>
>> Hi,
>>
>>> Franky Lin <franky.lin at broadcom.com> hat am 17. Juli 2017 um 21:50 geschrieben:
>>>
>>>
>>> On Mon, Jul 17, 2017 at 6:10 AM, Stefan Wahren <stefan.wahren at i2se.com> wrote:
>>>> Hi,
>>>>
>>>>> Stefan Wahren <stefan.wahren at i2se.com> hat am 28. Juni 2017 um 21:33 geschrieben:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> i'm currently working on Raspberry Pi Zero W for Mainline. Here is my first patch series [1].
>>>>>
>>>>> Unfortunately i didn't get brcmfmac (connected via SDIO) probed with this patch series against 4.12.0-rc5-next-20170616+
>>>>>
>>>>> [    8.389167] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
>>>>> [    8.735111] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
>>>>> [    8.786016] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>>>> [   11.288798] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>>> [   11.292822] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>>>>> [   13.848777] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>>> [   13.852974] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>>>>> [   16.408762] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>>> [   16.413004] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>>>>> [   18.968769] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>>> [   18.972965] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>>>>> [   21.528743] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>>> [   21.532924] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>>>>> [   24.088745] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>>> [   24.092948] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
>>>>> [   26.648764] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
>>>>> [   26.648789] brcmfmac: brcmf_cfg80211_attach: Failed to get D11 version (-110)
>>>>> [   26.648831] brcmfmac: brcmf_bus_started: failed: -12
>>>>> [   26.648842] brcmfmac: brcmf_sdio_firmware_callback: dongle is not responding
>>>>>
>>> ...
>>> Can you please try to comment out the following lines in
>>> brcmf_feat_attach? That's the only suspicious line that interact with
>>> firmware in the patch.
>>>
>>> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
>>> +                                            &gscan_cfg, sizeof(gscan_cfg));
>>
>> after commenting out this line, the issue doesn't appear.
>>
>
> what are the plans to fix this regression?

I am a bit in doubt about this one. We can avoid the firmware config 
above for bcm4343x devices as a short term fix. However, I would like to 
root cause the issue. Received a Pi Zero over here so gearing it up.

Regards,
Arend



From eric at anholt.net  Wed Jul 26 12:49:37 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 26 Jul 2017 12:49:37 -0700
Subject: [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
In-Reply-To: <20170720165912.14360-1-thierry.reding@gmail.com>
References: <20170720165912.14360-1-thierry.reding@gmail.com>
Message-ID: <871sp3yo4u.fsf@eliezer.anholt.net>

Thierry Reding <thierry.reding at gmail.com> writes:

> From: Thierry Reding <treding at nvidia.com>
>
> The irq_group field stores a 1:1 mapping. Use the loop variable to
> derive the values instead of storing them in an extra array.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170726/a69edd11/attachment.sig>

From stefan.wahren at i2se.com  Thu Jul 27 02:26:48 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 27 Jul 2017 11:26:48 +0200
Subject: [PATCH 2/2] pwm: bcm2835: Support for polarity setting via DT
In-Reply-To: <748942990.26302.1500572090339@email.1und1.de>
References: <1499508838-20715-1-git-send-email-stefan.wahren@i2se.com>
 <1499508838-20715-3-git-send-email-stefan.wahren@i2se.com>
 <87pod8qli1.fsf@eliezer.anholt.net>
 <748942990.26302.1500572090339@email.1und1.de>
Message-ID: <409552fa-06af-e1f2-73af-2a9136d06816@i2se.com>

Am 20.07.2017 um 19:34 schrieb Stefan Wahren:
>
>> Eric Anholt <eric at anholt.net> hat am 10. Juli 2017 um 18:56 geschrieben:
>>
>>
>> Stefan Wahren <stefan.wahren at i2se.com> writes:
>>
>>> This adds support for the third (optional) pwm cell to specify the
>>> polarity, which is needed by display backlights for example.
>>>
>>> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
>> Reviewed-by: Eric Anholt <eric at anholt.net>
> gentle ping to Thierry

ping ...


From stefan.wahren at i2se.com  Thu Jul 27 04:35:18 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 27 Jul 2017 13:35:18 +0200
Subject: [PATCH 3/3] ARM: dts: bcm2835: Add Raspberry Pi Zero W
In-Reply-To: <87vamfx8nx.fsf@eliezer.anholt.net>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
 <1500579429-9101-4-git-send-email-stefan.wahren@i2se.com>
 <87vamfx8nx.fsf@eliezer.anholt.net>
Message-ID: <1bc16f65-7872-d554-d29b-d9cd746c28bd@i2se.com>

Am 26.07.2017 um 22:09 schrieb Eric Anholt:
> Stefan Wahren <stefan.wahren at i2se.com> writes:
>
>> The Raspberry Pi Zero W has the same components like the Zero plus
>> a Cypress CYW43438 wireless chip (wifi + bl).
> I sent out v2 of the arm64 patch so that hopefully we can get started
> merging this.  Couple of comments on a re-read.
>
>> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
>> Reviewed-by: Eric Anholt <eric at anholt.net>
>> ---
>>  arch/arm/boot/dts/Makefile               |  3 +-
>>  arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 73 ++++++++++++++++++++++++++++++++
>>  2 files changed, 75 insertions(+), 1 deletion(-)
>>  create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index ec60f4f..f3bf9397 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -74,7 +74,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
>>  	bcm2835-rpi-a-plus.dtb \
>>  	bcm2836-rpi-2-b.dtb \
>>  	bcm2837-rpi-3-b.dtb \
>> -	bcm2835-rpi-zero.dtb
>> +	bcm2835-rpi-zero.dtb \
>> +	bcm2835-rpi-zero-w.dtb
>>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>  	bcm4708-asus-rt-ac56u.dtb \
>>  	bcm4708-asus-rt-ac68u.dtb \
>> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
>> new file mode 100644
>> index 0000000..9c6d714
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
>> @@ -0,0 +1,73 @@
>> +/*
>> + * Copyright (C) 2017 Stefan Wahren <stefan.wahren at i2se.com>
>> + *
>> + * The code contained herein is licensed under the GNU General Public
>> + * License. You may obtain a copy of the GNU General Public License
>> + * Version 2 or later at the following locations:
>> + *
>> + * http://www.opensource.org/licenses/gpl-license.html
>> + * http://www.gnu.org/copyleft/gpl.html
>> + */
>> +
>> +/dts-v1/;
>> +#include "bcm2835.dtsi"
>> +#include "bcm2835-rpi.dtsi"
>> +#include "bcm283x-rpi-usb-host.dtsi"
>> +
>> +/ {
>> +	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
>> +	model = "Raspberry Pi Zero W";
>> +
>> +	aliases {
>> +		uart0 = "/soc/serial at 7e201000";
>> +		uart1 = "/soc/serial at 7e215040";
>> +		serial0 = "/soc/serial at 7e201000";
>> +		serial1 = "/soc/serial at 7e215040";
>> +	};
> Should we have this in the other board DTs?  What does it do?

This was the hardest part to make the Zero W useable. I took it from
downstream [1], because without it i don't see anything on debug UART
(config.txt already has enable_uart=1).

I could add a helpful comment, but i can't explain why it's necessary
for RPI Zero W and not for the older RPI Zero.

Maybe the foundation guys have an alternative solution or at least
explanation.

[1] -
https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/boot/dts/bcm2708-rpi.dtsi
[2] -
https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts

>
>> +
>> +	leds {
>> +		act {
>> +			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
>> +		};
>> +	};
>> +
>> +	wifi_pwrseq: wifi-pwrseq {
>> +		compatible = "mmc-pwrseq-simple";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&wl_on>;
>> +		reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
>> +	};
>> +};
>> +
>> +&gpio {
>> +	pinctrl-0 = <&gpioout &alt0>;
>> +
>> +	wl_on: wl-on {
>> +		brcm,pins = <41>;
>> +		brcm,function = <BCM2835_FSEL_GPIO_OUT>;
>> +	};
>> +};
> Would you be up for adding gpio-line-names based on the dt-blob.dts?

Sure

>
>> +
>> +&hdmi {
>> +	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
>> +};
>> +
>> +&sdhci {
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
>> +	mmc-pwrseq = <&wifi_pwrseq>;
>> +	non-removable;
>> +	status = "okay";
>> +
>> +	brcmf: wifi at 1 {
>> +		reg = <1>;
>> +		compatible = "brcm,bcm4329-fmac";
>> +	};
>> +};
>> +
>> +&uart0 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&uart0_gpio14>;
>> +	status = "okay";
>> +};
>> -- 
>> 2.7.4
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


From stefan.wahren at i2se.com  Thu Jul 27 11:41:21 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 27 Jul 2017 20:41:21 +0200 (CEST)
Subject: [PATCH 3/3] ARM: dts: bcm2835: Add Raspberry Pi Zero W
In-Reply-To: <1bc16f65-7872-d554-d29b-d9cd746c28bd@i2se.com>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
 <1500579429-9101-4-git-send-email-stefan.wahren@i2se.com>
 <87vamfx8nx.fsf@eliezer.anholt.net>
 <1bc16f65-7872-d554-d29b-d9cd746c28bd@i2se.com>
Message-ID: <669060612.138196.1501180881798@email.1und1.de>


> Stefan Wahren <stefan.wahren at i2se.com> hat am 27. Juli 2017 um 13:35 geschrieben:
> 
> 
> Am 26.07.2017 um 22:09 schrieb Eric Anholt:
> > Stefan Wahren <stefan.wahren at i2se.com> writes:
> >
> >> +/dts-v1/;
> >> +#include "bcm2835.dtsi"
> >> +#include "bcm2835-rpi.dtsi"
> >> +#include "bcm283x-rpi-usb-host.dtsi"
> >> +
> >> +/ {
> >> +	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
> >> +	model = "Raspberry Pi Zero W";
> >> +
> >> +	aliases {
> >> +		uart0 = "/soc/serial at 7e201000";
> >> +		uart1 = "/soc/serial at 7e215040";
> >> +		serial0 = "/soc/serial at 7e201000";
> >> +		serial1 = "/soc/serial at 7e215040";
> >> +	};
> > Should we have this in the other board DTs?  What does it do?
> 
> This was the hardest part to make the Zero W useable. I took it from
> downstream [1], because without it i don't see anything on debug UART
> (config.txt already has enable_uart=1).
> 
> I could add a helpful comment, but i can't explain why it's necessary
> for RPI Zero W and not for the older RPI Zero.
> 
> Maybe the foundation guys have an alternative solution or at least
> explanation.
> 

Here is Phil Elwell's explanation (he couldn't reply via plain text today):

Serial port usage became an issue with the release of the Pi 3. The good
UART (uart0, ttyAMA0, pl011) was required to drive the Bluetooth modem,
leaving the "mini-UART" (uart1, ttyS0, AUX UART, 8250), with limited
capabilities and even smaller FIFOs, available for a console and other
uses. However, not all users want to use Bluetooth, and some need the
better UART for other purposes.

For some reason (possibly clock related) the firmware initialises a UART
for the OS to use - I believe UBoot makes use of it. If the roles are no
longer fixed there has to be a way to tell the firmware which UART to
initialise. This is particularly important using ttyS0 because the VPU
clock has to be fixed to avoid data corruption due to baud rate changes.

At the same time, we have always tried to make it possible to use the same
SD card in any Pi, so we wanted a way to abstract away the differences in
serial port usage. I couldn't find a standard mechanism to give serial
ports in Linux arbitrary names or numbers to insulate userland from the
hardware specifics, so I added the /dev/serial<n> symbolic links.

I was trying to move away from a proliferation of config.txt settings and
make device tree the communication mechanism between user, firmware and
kernel, so I chose to use DT aliases to declare the name-to-UART mapping -
it seemed like a nice fit. Overlays can change them, and the firmware,
kernel and userspace scripts can read them. For example, a udev rule
creates the symbolic links during the boot process based on the contents of
/proc/device-tree/aliases, and the firmware rewrites the kernel command
line, replacing the aliases with the appropriate device name.

On the firmware side we added one new setting - enable_uart - which
defaults to 1 unless the mini-UART is the primary (console) UART, in which
case it must be explicitly set to 1 in config.txt in order for the UART
(and GPIO pins) to be configured. This difference is because most users
will never use the serial ports, and the need for a constant baud rate
makes it necessary to lock the VPU core frequency to 250MHz which could be
seen as a performance penalty.

To answer the question you originally asked, the aliases are needed on a
Zero W (just as on a Pi 3) because by default it uses ttyS0 for Bluetooth,
but the firmware doesn't know this unless the DT tells it so via the
aliases. Otherwise it behaves like all Pis before the 3 and puts the
console on ttyAMA0.


From Julia.Lawall at lip6.fr  Fri Jul 28 22:59:29 2017
From: Julia.Lawall at lip6.fr (Julia Lawall)
Date: Sat, 29 Jul 2017 07:59:29 +0200
Subject: [PATCH 00/12] constify mmc_host_ops structures
Message-ID: <1501307981-29745-1-git-send-email-Julia.Lawall@lip6.fr>


The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

---

 drivers/mmc/host/bcm2835.c     |    2 +-
 drivers/mmc/host/davinci_mmc.c |    2 +-
 drivers/mmc/host/moxart-mmc.c  |    2 +-
 drivers/mmc/host/mtk-sd.c      |    2 +-
 drivers/mmc/host/s3cmci.c      |    2 +-
 drivers/mmc/host/sdricoh_cs.c  |    2 +-
 drivers/mmc/host/sh_mmcif.c    |    2 +-
 drivers/mmc/host/sunxi-mmc.c   |    2 +-
 drivers/mmc/host/toshsd.c      |    2 +-
 drivers/mmc/host/usdhi6rol0.c  |    2 +-
 drivers/mmc/host/vub300.c      |    2 +-
 drivers/mmc/host/wmt-sdmmc.c   |    2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)


From ulf.hansson at linaro.org  Mon Jul 31 01:52:50 2017
From: ulf.hansson at linaro.org (Ulf Hansson)
Date: Mon, 31 Jul 2017 10:52:50 +0200
Subject: [PATCH 00/12] constify mmc_host_ops structures
In-Reply-To: <1501307981-29745-1-git-send-email-Julia.Lawall@lip6.fr>
References: <1501307981-29745-1-git-send-email-Julia.Lawall@lip6.fr>
Message-ID: <CAPDyKFpPRNAb1s4PUnkg0iFUg-Y5J+T_5TAzxLL-4SVSSVY4MA@mail.gmail.com>

On 29 July 2017 at 07:59, Julia Lawall <Julia.Lawall at lip6.fr> wrote:
>
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> ---
>
>  drivers/mmc/host/bcm2835.c     |    2 +-
>  drivers/mmc/host/davinci_mmc.c |    2 +-
>  drivers/mmc/host/moxart-mmc.c  |    2 +-
>  drivers/mmc/host/mtk-sd.c      |    2 +-
>  drivers/mmc/host/s3cmci.c      |    2 +-
>  drivers/mmc/host/sdricoh_cs.c  |    2 +-
>  drivers/mmc/host/sh_mmcif.c    |    2 +-
>  drivers/mmc/host/sunxi-mmc.c   |    2 +-
>  drivers/mmc/host/toshsd.c      |    2 +-
>  drivers/mmc/host/usdhi6rol0.c  |    2 +-
>  drivers/mmc/host/vub300.c      |    2 +-
>  drivers/mmc/host/wmt-sdmmc.c   |    2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)


Thanks, applied for next!

Kind regards
Uffe


From loic.poulain at gmail.com  Mon Jul 31 03:03:33 2017
From: loic.poulain at gmail.com (Loic Poulain)
Date: Mon, 31 Jul 2017 12:03:33 +0200
Subject: [PATCH 1/2] ARM64: dts: bcm2837-rpi-3-b: Add bcm43438 as serial slave
 device
Message-ID: <1501495414-17103-1-git-send-email-loic.poulain@gmail.com>

Add BCM43438 as a slave device of uart0 (pl011/ttyAMA0).
This allows to automatically insert the bcm43438 to the bluetooth
subsystem instead of relying on userspace helpers (hciattach).

Overwrite bootargs to use aux uart (ttyS0) instead of ttyAMA0.

Signed-off-by: Loic Poulain <loic.poulain at gmail.com>
---
 .../devicetree/bindings/net/broadcom-bluetooth.txt | 29 ++++++++++++++++++++++
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 17 +++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/broadcom-bluetooth.txt

diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
new file mode 100644
index 0000000..c51ea1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
@@ -0,0 +1,29 @@
+Broadcom Bluetooth Chips
+---------------------
+
+This documents the binding structure and common properties for serial
+attached Broadcom devices.
+
+Serial attached Broadcom devices shall be a child node of the host UART
+device the slave device is attached to.
+
+Required properties:
+
+ - compatible: should contain one of the following:
+   * "brcm,bcm43438-bt"
+
+Optional properties:
+
+ - max-speed: see Documentation/devicetree/bindings/serial/slave-device.txt
+
+Example:
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               max-speed = <921600>;
+       };
+};
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
index 972f14d..d0c669a 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -8,6 +8,11 @@
 	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
 	model = "Raspberry Pi 3 Model B";
 
+	chosen {
+		/* BCM2835 8250 auxiliar UART instead of pl011 */
+		bootargs = "console=ttyS0,115200 earlycon";
+	};
+
 	memory {
 		reg = <0 0x40000000>;
 	};
@@ -39,3 +44,15 @@
 	status = "okay";
 	bus-width = <4>;
 };
+
+/* UART0 is used to drive bcm43438 bluetooth controller */
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
+	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <921600>;
+	};
+};
-- 
1.9.1



From loic.poulain at gmail.com  Mon Jul 31 03:03:34 2017
From: loic.poulain at gmail.com (Loic Poulain)
Date: Mon, 31 Jul 2017 12:03:34 +0200
Subject: [PATCH 2/2] Bluetooth: hci_bcm: Add serdev support
In-Reply-To: <1501495414-17103-1-git-send-email-loic.poulain@gmail.com>
References: <1501495414-17103-1-git-send-email-loic.poulain@gmail.com>
Message-ID: <1501495414-17103-2-git-send-email-loic.poulain@gmail.com>

Add basic support for Broadcom serial slave devices.
Probe the serial device, retrieve its maximum speed and
register a new hci uart device.

Tested/compatible with bcm43438 (RPi3).

Signed-off-by: Loic Poulain <loic.poulain at gmail.com>
---
 drivers/bluetooth/hci_bcm.c | 82 ++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 78 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 6b42372..f824738 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -27,6 +27,7 @@
 #include <linux/firmware.h>
 #include <linux/module.h>
 #include <linux/acpi.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/gpio/consumer.h>
@@ -34,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/dmi.h>
 #include <linux/pm_runtime.h>
+#include <linux/serdev.h>
 
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
@@ -46,6 +48,7 @@
 
 #define BCM_AUTOSUSPEND_DELAY	5000 /* default autosleep delay */
 
+/* platform device driver resources */
 struct bcm_device {
 	struct list_head	list;
 
@@ -68,6 +71,12 @@ struct bcm_device {
 #endif
 };
 
+/* serdev driver resources */
+struct bcm_bt_device {
+	struct hci_uart hu;
+};
+
+/* generic bcm uart resources */
 struct bcm_data {
 	struct sk_buff		*rx_skb;
 	struct sk_buff_head	txq;
@@ -289,6 +298,11 @@ static int bcm_open(struct hci_uart *hu)
 
 	hu->priv = bcm;
 
+	if (hu->serdev) {
+		serdev_device_open(hu->serdev);
+		goto out;
+	}
+
 	if (!hu->tty->dev)
 		goto out;
 
@@ -323,6 +337,9 @@ static int bcm_close(struct hci_uart *hu)
 
 	bt_dev_dbg(hu->hdev, "hu %p", hu);
 
+	if (hu->serdev)
+		serdev_device_close(hu->serdev);
+
 	/* Protect bcm->dev against removal of the device or driver */
 	mutex_lock(&bcm_device_lock);
 	if (bcm_device_exists(bdev)) {
@@ -397,8 +414,12 @@ static int bcm_setup(struct hci_uart *hu)
 	else
 		speed = 0;
 
-	if (speed)
-		hci_uart_set_baudrate(hu, speed);
+	if (speed) {
+		if (hu->serdev)
+			serdev_device_set_baudrate(hu->serdev, speed);
+		else
+			hci_uart_set_baudrate(hu, speed);
+	}
 
 	/* Operational speed if any */
 	if (hu->oper_speed)
@@ -410,8 +431,12 @@ static int bcm_setup(struct hci_uart *hu)
 
 	if (speed) {
 		err = bcm_set_baudrate(hu, speed);
-		if (!err)
-			hci_uart_set_baudrate(hu, speed);
+		if (!err) {
+			if (hu->serdev)
+				serdev_device_set_baudrate(hu->serdev, speed);
+			else
+				hci_uart_set_baudrate(hu, speed);
+		}
 	}
 
 finalize:
@@ -903,9 +928,57 @@ static int bcm_remove(struct platform_device *pdev)
 	},
 };
 
+static int bcm_serdev_probe(struct serdev_device *serdev)
+{
+	struct bcm_bt_device *bcmdev;
+	u32 speed;
+	int err;
+
+	bcmdev = devm_kzalloc(&serdev->dev, sizeof(*bcmdev), GFP_KERNEL);
+	if (!bcmdev)
+		return -ENOMEM;
+
+	bcmdev->hu.serdev = serdev;
+	serdev_device_set_drvdata(serdev, bcmdev);
+
+	err = of_property_read_u32(serdev->dev.of_node, "max-speed", &speed);
+	if (!err)
+		bcmdev->hu.oper_speed = speed;
+
+	return hci_uart_register_device(&bcmdev->hu, &bcm_proto);
+}
+
+static void bcm_serdev_remove(struct serdev_device *serdev)
+{
+	struct bcm_bt_device *bcmdev = serdev_device_get_drvdata(serdev);
+
+	hci_uart_unregister_device(&bcmdev->hu);
+}
+
+#ifdef CONFIG_OF
+static const struct of_device_id bcm_bluetooth_of_match[] = {
+	{ .compatible = "brcm,bcm43438-bt" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);
+#endif
+
+static struct serdev_device_driver bcm_serdev_driver = {
+	.probe = bcm_serdev_probe,
+	.remove = bcm_serdev_remove,
+	.driver = {
+		.name = "hci_uart_bcm",
+		.of_match_table = of_match_ptr(bcm_bluetooth_of_match),
+	},
+};
+
 int __init bcm_init(void)
 {
+	/* For now, we need to keep both platform device
+	 * driver (ACPI generated) and serdev driver (DT).
+	 */
 	platform_driver_register(&bcm_driver);
+	serdev_device_driver_register(&bcm_serdev_driver);
 
 	return hci_uart_register_proto(&bcm_proto);
 }
@@ -913,6 +986,7 @@ int __init bcm_init(void)
 int __exit bcm_deinit(void)
 {
 	platform_driver_unregister(&bcm_driver);
+	serdev_device_driver_unregister(&bcm_serdev_driver);
 
 	return hci_uart_unregister_proto(&bcm_proto);
 }
-- 
1.9.1



From thierry.reding at gmail.com  Mon Jul 31 03:57:31 2017
From: thierry.reding at gmail.com (Thierry Reding)
Date: Mon, 31 Jul 2017 12:57:31 +0200
Subject: [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
In-Reply-To: <20170720165912.14360-1-thierry.reding@gmail.com>
References: <20170720165912.14360-1-thierry.reding@gmail.com>
Message-ID: <20170731105731.GH26667@ulmo>

On Thu, Jul 20, 2017 at 06:59:12PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
> 
> The irq_group field stores a 1:1 mapping. Use the loop variable to
> derive the values instead of storing them in an extra array.
> 
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Ping...

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170731/cc6d573e/attachment.sig>

From stefan.wahren at i2se.com  Mon Jul 31 12:56:13 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Mon, 31 Jul 2017 21:56:13 +0200 (CEST)
Subject: [PATCH 1/2] ARM64: dts: bcm2837-rpi-3-b: Add bcm43438 as serial
 slave device
In-Reply-To: <1501495414-17103-1-git-send-email-loic.poulain@gmail.com>
References: <1501495414-17103-1-git-send-email-loic.poulain@gmail.com>
Message-ID: <1992177380.228440.1501530973443@email.1und1.de>

Hi Loic,

> Loic Poulain <loic.poulain at gmail.com> hat am 31. Juli 2017 um 12:03 geschrieben:
> 
> 
> Add BCM43438 as a slave device of uart0 (pl011/ttyAMA0).
> This allows to automatically insert the bcm43438 to the bluetooth
> subsystem instead of relying on userspace helpers (hciattach).
> 
> Overwrite bootargs to use aux uart (ttyS0) instead of ttyAMA0.
> 
> Signed-off-by: Loic Poulain <loic.poulain at gmail.com>

i'm very happy to see this patch series and i can't wait to adapt it for RPI Zero W.

> ---
>  .../devicetree/bindings/net/broadcom-bluetooth.txt | 29 ++++++++++++++++++++++
>  arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 17 +++++++++++++
>  2 files changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> new file mode 100644
> index 0000000..c51ea1b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> @@ -0,0 +1,29 @@
> +Broadcom Bluetooth Chips
> +---------------------
> +
> +This documents the binding structure and common properties for serial
> +attached Broadcom devices.
> +
> +Serial attached Broadcom devices shall be a child node of the host UART
> +device the slave device is attached to.
> +
> +Required properties:
> +
> + - compatible: should contain one of the following:
> +   * "brcm,bcm43438-bt"
> +
> +Optional properties:
> +
> + - max-speed: see Documentation/devicetree/bindings/serial/slave-device.txt
> +
> +Example:
> +
> +&uart2 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&uart2_pins>;
> +
> +       bluetooth {
> +               compatible = "brcm,bcm43438-bt";
> +               max-speed = <921600>;
> +       };
> +};

This binding looks good to me, but please send it as a separate patch at first.

> diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> index 972f14d..d0c669a 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> +++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> @@ -8,6 +8,11 @@
>  	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
>  	model = "Raspberry Pi 3 Model B";
>  
> +	chosen {
> +		/* BCM2835 8250 auxiliar UART instead of pl011 */
> +		bootargs = "console=ttyS0,115200 earlycon";
> +	};
> +
>  	memory {
>  		reg = <0 0x40000000>;
>  	};
> @@ -39,3 +44,15 @@
>  	status = "okay";
>  	bus-width = <4>;
>  };
> +
> +/* UART0 is used to drive bcm43438 bluetooth controller */
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
> +	status = "okay";
> +
> +	bluetooth {
> +		compatible = "brcm,bcm43438-bt";
> +		max-speed = <921600>;
> +	};
> +};
> -- 
> 1.9.1

This also looks good, but this conflicts with the recent changes (which will be applied soon):

[PATCH v2] ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64 to arm.
[PATCH V2 0/3] ARM: bcm283x: Raspberry Pi Zero W support

Last question: how about another patch to enable serdev support as module for arm64/defconfig?

Best regards
Stefan


From eric at anholt.net  Wed Jul 12 12:24:04 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 12 Jul 2017 19:24:04 -0000
Subject: [PATCH] pinctrl: bcm2835: constify gpio_chip structure
In-Reply-To: <20170711180339.GA17806@embeddedgus>
References: <20170711180339.GA17806@embeddedgus>
Message-ID: <877ezdh3jn.fsf@eliezer.anholt.net>

"Gustavo A. R. Silva" <garsilva at embeddedor.com> writes:

> This structure is only used to copy into other structure, so declare
> it as const.
>
> This issue was detected using Coccinelle and the following semantic patch:

Acked-by: Eric Anholt <eric at anholt.net>

> ---
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 2308831..7203f35 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -353,7 +353,7 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
>  	return pinctrl_gpio_direction_output(chip->base + offset);
>  }
>  
> -static struct gpio_chip bcm2835_gpio_chip = {
> +static const struct gpio_chip bcm2835_gpio_chip = {
>  	.label = MODULE_NAME,
>  	.owner = THIS_MODULE,
>  	.request = gpiochip_generic_request,
> -- 
> 2.5.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170712/1e036ba0/attachment.sig>

From baruch at tkos.co.il  Tue Jul 18 20:57:20 2017
From: baruch at tkos.co.il (Baruch Siach)
Date: Wed, 19 Jul 2017 03:57:20 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-30-robh@kernel.org>
References: <20170718214339.7774-30-robh@kernel.org>
Message-ID: <20170719035651.32e4ium6bymztlqj@sapphire.tkos.co.il>

Hi Rob,

On Tue, Jul 18, 2017 at 04:43:10PM -0500, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Jason Cooper <jason at lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Baruch Siach <baruch at tkos.co.il>
> Cc: Vladimir Zapolskiy <vz at mleia.com>
> Cc: Sylvain Lemieux <slemieux.tyco at gmail.com>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue at st.com>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: Jonathan Hunter <jonathanh at nvidia.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann at xilinx.com>
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-tegra at vger.kernel.org
> ---

>  drivers/irqchip/irq-digicolor.c          |  8 ++++----

Acked-by: Baruch Siach <baruch at tkos.co.il>

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


From eric at anholt.net  Wed Jul 19 12:50:49 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 19 Jul 2017 19:50:49 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-30-robh@kernel.org>
References: <20170718214339.7774-30-robh@kernel.org>
Message-ID: <87tw28dx62.fsf@eliezer.anholt.net>

Rob Herring <robh at kernel.org> writes:

> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
>

For bcm283x:

Acked-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170719/78deb361/attachment.sig>

From eric at anholt.net  Wed Jul 19 12:51:14 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 19 Jul 2017 19:51:14 -0000
Subject: [PATCH] pinctrl: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-43-robh@kernel.org>
References: <20170718214339.7774-43-robh@kernel.org>
Message-ID: <87r2xcdx4q.fsf@eliezer.anholt.net>

Rob Herring <robh at kernel.org> writes:

> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.

For bcm283x:

Acked-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170719/d478e68a/attachment.sig>

From eric at anholt.net  Wed Jul 19 13:21:34 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 19 Jul 2017 20:21:34 -0000
Subject: [PATCH 2/2] arm64: dts: move rpi into rpi directory
In-Reply-To: <1500483950-9217-3-git-send-email-scott.branden@broadcom.com>
References: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
 <1500483950-9217-3-git-send-email-scott.branden@broadcom.com>
Message-ID: <87mv80dvpo.fsf@eliezer.anholt.net>

Scott Branden <scott.branden at broadcom.com> writes:

> Place rpi into its own subdirectory.  This helps as the number
> of Broadcom boards grow and we can separate them per SoC.

It seems like pretty unnecessary churn to me, though I wouldn't
necessarily block it.  However, it conflicts with the patch I was
preparing yesterday to try to resolve our DT merging troubles
(https://lkml.org/lkml/2017/5/16/707), so I'd like to hold off on it for
now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170719/d69e3027/attachment.sig>

From eric at anholt.net  Wed Jul 19 13:29:33 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 19 Jul 2017 20:29:33 -0000
Subject: [PATCH] ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64 to
 arm.
Message-ID: <20170719201916.22369-1-eric@anholt.net>

BCM2837 is somewhat unusual in that we build its DT on both arm32 and
arm64.  Most devices are being run in arm32 mode.

Having the body of the DT for 2837 separate from 2835/6 has been a
source of pain, as we often need to make changes that span both
directories simultaneously (for example, the thermal changes for 4.13,
and pinmuxing changes earlier).  Other changes are made more
complicated than they need to be, such as the SDHOST enabling, because
we end up splitting a single change into a 283[56] half and a 2837
half.

Signed-off-by: Eric Anholt <eric at anholt.net>
---

I had asked about what we could do about our DT merging troubles back
in https://lkml.org/lkml/2017/5/16/707 with no response.  I'm hoping
we can take this patch as a resolution to that, and submit (almost
all) future RPi DT changes through the arm32 dt tree.


 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
 .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
 3 files changed, 42 insertions(+), 42 deletions(-)
 rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)

diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index c72a27d908b6..972f14db28ac 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -1 +1,41 @@
-#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+	model = "Raspberry Pi 3 Model B";
+
+	memory {
+		reg = <0 0x40000000>;
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
+
+/* SDHCI is used to control the SDIO for wireless */
+&sdhci {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_gpio34>;
+	status = "okay";
+	bus-width = <4>;
+	non-removable;
+};
+
+/* SDHOST is used to drive the SD card */
+&sdhost {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdhost_gpio48>;
+	status = "okay";
+	bus-width = <4>;
+};
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/bcm2837.dtsi
rename to arch/arm/boot/dts/bcm2837.dtsi
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
index 972f14db28ac..699d340a3437 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -1,41 +1 @@
-/dts-v1/;
-#include "bcm2837.dtsi"
-#include "bcm2835-rpi.dtsi"
-#include "bcm283x-rpi-smsc9514.dtsi"
-#include "bcm283x-rpi-usb-host.dtsi"
-
-/ {
-	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
-	model = "Raspberry Pi 3 Model B";
-
-	memory {
-		reg = <0 0x40000000>;
-	};
-
-	leds {
-		act {
-			gpios = <&gpio 47 0>;
-		};
-	};
-};
-
-&uart1 {
-	status = "okay";
-};
-
-/* SDHCI is used to control the SDIO for wireless */
-&sdhci {
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	status = "okay";
-	bus-width = <4>;
-	non-removable;
-};
-
-/* SDHOST is used to drive the SD card */
-&sdhost {
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdhost_gpio48>;
-	status = "okay";
-	bus-width = <4>;
-};
+#include "arm/bcm2837-rpi-3-b.dts"
-- 
2.11.0



From eric at anholt.net  Wed Jul 26 13:00:02 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 26 Jul 2017 13:00:02 -0700
Subject: [PATCH] ARM: dts: bcm283x: Move the BCM2837 DT contents from
 arm64 to arm.
In-Reply-To: <a2e79c17-f345-e7f2-8438-d4754e4ceb3a@broadcom.com>
References: <20170719201916.22369-1-eric@anholt.net>
 <a2e79c17-f345-e7f2-8438-d4754e4ceb3a@broadcom.com>
Message-ID: <87y3rbx931.fsf@eliezer.anholt.net>

Scott Branden <scott.branden at broadcom.com> writes:

> Hi Eric,
>
> suggestion inline
>
>
> On 17-07-19 01:19 PM, Eric Anholt wrote:
>> BCM2837 is somewhat unusual in that we build its DT on both arm32 and
>> arm64.  Most devices are being run in arm32 mode.
>>
>> Having the body of the DT for 2837 separate from 2835/6 has been a
>> source of pain, as we often need to make changes that span both
>> directories simultaneously (for example, the thermal changes for 4.13,
>> and pinmuxing changes earlier).  Other changes are made more
>> complicated than they need to be, such as the SDHOST enabling, because
>> we end up splitting a single change into a 283[56] half and a 2837
>> half.
>>
>> Signed-off-by: Eric Anholt <eric at anholt.net>
>> ---
>>
>> I had asked about what we could do about our DT merging troubles back
>> in https://lkml.org/lkml/2017/5/16/707 with no response.  I'm hoping
>> we can take this patch as a resolution to that, and submit (almost
>> all) future RPi DT changes through the arm32 dt tree.
>>
>>
>>   arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
>>   .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
>>   arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
>>   3 files changed, 42 insertions(+), 42 deletions(-)
>>   rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)
>>
>> diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
>> index c72a27d908b6..972f14db28ac 100644
>> --- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
>> +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
>> @@ -1 +1,41 @@
>> -#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
>> +/dts-v1/;
>> +#include "bcm2837.dtsi"
>> +#include "bcm2835-rpi.dtsi"
>> +#include "bcm283x-rpi-smsc9514.dtsi"
>> +#include "bcm283x-rpi-usb-host.dtsi"
> If you're moving this back to the arm directory why not change the 
> include path and remove the 4 symlinks in arm64/boot/dts/broadcom?
>
> +#include "arm/bcm2837.dtsi"
> +#include "arm/bcm2835-rpi.dtsi"
> +#include "arm/bcm283x-rpi-smsc9514.dtsi"
> +#include "arm/bcm283x-rpi-usb-host.dtsi"

Even better, it seems we don't need the arm/ here -- when we're
processing the include in arm/, the neighboring files get found.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170726/a13ee4ec/attachment.sig>

From eric at anholt.net  Wed Jul 26 13:01:56 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 26 Jul 2017 13:01:56 -0700
Subject: [PATCH v2] ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64
 to arm.
Message-ID: <20170726200156.30161-1-eric@anholt.net>

BCM2837 is somewhat unusual in that we build its DT on both arm32 and
arm64.  Most devices are being run in arm32 mode.

Having the body of the DT for 2837 separate from 2835/6 has been a
source of pain, as we often need to make changes that span both
directories simultaneously (for example, the thermal changes for 4.13,
or anything that changes the name of a node referenced by '&' from
board files).  Other changes are made more complicated than they need
to be, such as the SDHOST enabling, because we have to split a single
logical change into a 283[56] half and a 2837 half.

To fix this, make the stub board include file live in arm64 instead of
arm32, and keep all of BCM283x's contents in arm32.  From here on, our
changes to DT contents can be submitted through a single tree.

Signed-off-by: Eric Anholt <eric at anholt.net>
---

v2: Drop the .dtsi symlinks from arm64 -- they get successfully found
    by the .dtsi in arm/

 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
 .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi      |  1 -
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
 .../boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi    |  1 -
 .../boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi    |  1 -
 arch/arm64/boot/dts/broadcom/bcm283x.dtsi          |  1 -
 7 files changed, 42 insertions(+), 46 deletions(-)
 rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi

diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index c72a27d908b6..972f14db28ac 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -1 +1,41 @@
-#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+	model = "Raspberry Pi 3 Model B";
+
+	memory {
+		reg = <0 0x40000000>;
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
+
+/* SDHCI is used to control the SDIO for wireless */
+&sdhci {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_gpio34>;
+	status = "okay";
+	bus-width = <4>;
+	non-removable;
+};
+
+/* SDHOST is used to drive the SD card */
+&sdhost {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdhost_gpio48>;
+	status = "okay";
+	bus-width = <4>;
+};
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/bcm2837.dtsi
rename to arch/arm/boot/dts/bcm2837.dtsi
diff --git a/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi b/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
deleted file mode 120000
index 3937b77cb310..000000000000
--- a/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm2835-rpi.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
index 972f14db28ac..699d340a3437 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -1,41 +1 @@
-/dts-v1/;
-#include "bcm2837.dtsi"
-#include "bcm2835-rpi.dtsi"
-#include "bcm283x-rpi-smsc9514.dtsi"
-#include "bcm283x-rpi-usb-host.dtsi"
-
-/ {
-	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
-	model = "Raspberry Pi 3 Model B";
-
-	memory {
-		reg = <0 0x40000000>;
-	};
-
-	leds {
-		act {
-			gpios = <&gpio 47 0>;
-		};
-	};
-};
-
-&uart1 {
-	status = "okay";
-};
-
-/* SDHCI is used to control the SDIO for wireless */
-&sdhci {
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	status = "okay";
-	bus-width = <4>;
-	non-removable;
-};
-
-/* SDHOST is used to drive the SD card */
-&sdhost {
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdhost_gpio48>;
-	status = "okay";
-	bus-width = <4>;
-};
+#include "arm/bcm2837-rpi-3-b.dts"
diff --git a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
deleted file mode 120000
index dca7c057d5a5..000000000000
--- a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
deleted file mode 120000
index cbeebe312ff8..000000000000
--- a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm283x-rpi-usb-host.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm283x.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x.dtsi
deleted file mode 120000
index 5f54e4cab99b..000000000000
--- a/arch/arm64/boot/dts/broadcom/bcm283x.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm283x.dtsi
\ No newline at end of file
-- 
2.13.3



From eric at anholt.net  Wed Jul 26 13:09:06 2017
From: eric at anholt.net (Eric Anholt)
Date: Wed, 26 Jul 2017 13:09:06 -0700
Subject: [PATCH 3/3] ARM: dts: bcm2835: Add Raspberry Pi Zero W
In-Reply-To: <1500579429-9101-4-git-send-email-stefan.wahren@i2se.com>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
 <1500579429-9101-4-git-send-email-stefan.wahren@i2se.com>
Message-ID: <87vamfx8nx.fsf@eliezer.anholt.net>

Stefan Wahren <stefan.wahren at i2se.com> writes:

> The Raspberry Pi Zero W has the same components like the Zero plus
> a Cypress CYW43438 wireless chip (wifi + bl).

I sent out v2 of the arm64 patch so that hopefully we can get started
merging this.  Couple of comments on a re-read.

> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
> Reviewed-by: Eric Anholt <eric at anholt.net>
> ---
>  arch/arm/boot/dts/Makefile               |  3 +-
>  arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 73 ++++++++++++++++++++++++++++++++
>  2 files changed, 75 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index ec60f4f..f3bf9397 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -74,7 +74,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
>  	bcm2835-rpi-a-plus.dtb \
>  	bcm2836-rpi-2-b.dtb \
>  	bcm2837-rpi-3-b.dtb \
> -	bcm2835-rpi-zero.dtb
> +	bcm2835-rpi-zero.dtb \
> +	bcm2835-rpi-zero-w.dtb
>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>  	bcm4708-asus-rt-ac56u.dtb \
>  	bcm4708-asus-rt-ac68u.dtb \
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
> new file mode 100644
> index 0000000..9c6d714
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
> @@ -0,0 +1,73 @@
> +/*
> + * Copyright (C) 2017 Stefan Wahren <stefan.wahren at i2se.com>
> + *
> + * The code contained herein is licensed under the GNU General Public
> + * License. You may obtain a copy of the GNU General Public License
> + * Version 2 or later at the following locations:
> + *
> + * http://www.opensource.org/licenses/gpl-license.html
> + * http://www.gnu.org/copyleft/gpl.html
> + */
> +
> +/dts-v1/;
> +#include "bcm2835.dtsi"
> +#include "bcm2835-rpi.dtsi"
> +#include "bcm283x-rpi-usb-host.dtsi"
> +
> +/ {
> +	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
> +	model = "Raspberry Pi Zero W";
> +
> +	aliases {
> +		uart0 = "/soc/serial at 7e201000";
> +		uart1 = "/soc/serial at 7e215040";
> +		serial0 = "/soc/serial at 7e201000";
> +		serial1 = "/soc/serial at 7e215040";
> +	};

Should we have this in the other board DTs?  What does it do?

> +
> +	leds {
> +		act {
> +			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +
> +	wifi_pwrseq: wifi-pwrseq {
> +		compatible = "mmc-pwrseq-simple";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wl_on>;
> +		reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
> +	};
> +};
> +
> +&gpio {
> +	pinctrl-0 = <&gpioout &alt0>;
> +
> +	wl_on: wl-on {
> +		brcm,pins = <41>;
> +		brcm,function = <BCM2835_FSEL_GPIO_OUT>;
> +	};
> +};

Would you be up for adding gpio-line-names based on the dt-blob.dts?

> +
> +&hdmi {
> +	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
> +};
> +
> +&sdhci {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
> +	mmc-pwrseq = <&wifi_pwrseq>;
> +	non-removable;
> +	status = "okay";
> +
> +	brcmf: wifi at 1 {
> +		reg = <1>;
> +		compatible = "brcm,bcm4329-fmac";
> +	};
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_gpio14>;
> +	status = "okay";
> +};
> -- 
> 2.7.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170726/dc6e8710/attachment.sig>

From garsilva at embeddedor.com  Tue Jul 11 11:04:18 2017
From: garsilva at embeddedor.com (Gustavo A. R. Silva)
Date: Tue, 11 Jul 2017 18:04:18 -0000
Subject: [PATCH] pinctrl: bcm2835: constify gpio_chip structure
Message-ID: <20170711180339.GA17806@embeddedgus>

This structure is only used to copy into other structure, so declare
it as const.

This issue was detected using Coccinelle and the following semantic patch:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct gpio_chip i at p = { ... };

@ok@
identifier r.i;
expression e;
position p;
@@
e = i at p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct gpio_chip e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct gpio_chip i = { ... };

In the following log you can see a significant difference in the code size
and data segment, hence in the dec segment. This log is the output
of the size command, before and after the code change:

before:
   text    data     bss     dec     hex filename
  18958    9000     128   28086    6db6 drivers/pinctrl/bcm/pinctrl-bcm2835.o

after:
   text    data     bss     dec     hex filename
  18764    8912     128   27804    6c9c drivers/pinctrl/bcm/pinctrl-bcm2835.o

Signed-off-by: Gustavo A. R. Silva <garsilva at embeddedor.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 2308831..7203f35 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -353,7 +353,7 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
 	return pinctrl_gpio_direction_output(chip->base + offset);
 }
 
-static struct gpio_chip bcm2835_gpio_chip = {
+static const struct gpio_chip bcm2835_gpio_chip = {
 	.label = MODULE_NAME,
 	.owner = THIS_MODULE,
 	.request = gpiochip_generic_request,
-- 
2.5.0



From dan.carpenter at oracle.com  Tue Jul 11 12:55:58 2017
From: dan.carpenter at oracle.com (Dan Carpenter)
Date: Tue, 11 Jul 2017 19:55:58 -0000
Subject: [PATCH] staging: vchiq_arm: fix error codes in probe
Message-ID: <20170711195456.brrzp7rotktte2jq@mwanda>

If vchiq_debugfs_init() fails, then we accidentally return a valid
pointer casted to int on error.  This code is simpler if we get rid of
the "ptr_err" variable and just use "err" throughout.

Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 030bec855d86..314ffac50bb8 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3391,7 +3391,6 @@ static int vchiq_probe(struct platform_device *pdev)
 	struct device_node *fw_node;
 	struct rpi_firmware *fw;
 	int err;
-	void *ptr_err;
 
 	fw_node = of_parse_phandle(pdev->dev.of_node, "firmware", 0);
 	if (!fw_node) {
@@ -3427,14 +3426,14 @@ static int vchiq_probe(struct platform_device *pdev)
 
 	/* create sysfs entries */
 	vchiq_class = class_create(THIS_MODULE, DEVICE_NAME);
-	ptr_err = vchiq_class;
-	if (IS_ERR(ptr_err))
+	err = PTR_ERR(vchiq_class);
+	if (IS_ERR(vchiq_class))
 		goto failed_class_create;
 
 	vchiq_dev = device_create(vchiq_class, NULL,
 		vchiq_devid, NULL, "vchiq");
-	ptr_err = vchiq_dev;
-	if (IS_ERR(ptr_err))
+	err = PTR_ERR(vchiq_dev);
+	if (IS_ERR(vchiq_dev))
 		goto failed_device_create;
 
 	/* create debugfs entries */
@@ -3455,7 +3454,6 @@ static int vchiq_probe(struct platform_device *pdev)
 	class_destroy(vchiq_class);
 failed_class_create:
 	cdev_del(&vchiq_cdev);
-	err = PTR_ERR(ptr_err);
 failed_cdev_add:
 	unregister_chrdev_region(vchiq_devid, 1);
 failed_platform_init:


From garsilva at embeddedor.com  Sun Jul 16 21:12:46 2017
From: garsilva at embeddedor.com (Gustavo A. R. Silva)
Date: Mon, 17 Jul 2017 04:12:46 -0000
Subject: [PATCH] pinctrl: bcm2835: constify gpio_chip structure
In-Reply-To: <877ezdh3jn.fsf@eliezer.anholt.net>
References: <20170711180339.GA17806@embeddedgus>
 <877ezdh3jn.fsf@eliezer.anholt.net>
Message-ID: <e2e1909e-9a8a-9fc5-a002-b8597cef6b64@embeddedor.com>



On 07/12/2017 02:13 PM, Eric Anholt wrote:
> "Gustavo A. R. Silva" <garsilva at embeddedor.com> writes:
>
>> This structure is only used to copy into other structure, so declare
>> it as const.
>>
>> This issue was detected using Coccinelle and the following semantic patch:
> Acked-by: Eric Anholt <eric at anholt.net>

Thank you, Eric

>> ---
>>   drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
>> index 2308831..7203f35 100644
>> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
>> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
>> @@ -353,7 +353,7 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
>>   	return pinctrl_gpio_direction_output(chip->base + offset);
>>   }
>>   
>> -static struct gpio_chip bcm2835_gpio_chip = {
>> +static const struct gpio_chip bcm2835_gpio_chip = {
>>   	.label = MODULE_NAME,
>>   	.owner = THIS_MODULE,
>>   	.request = gpiochip_generic_request,
>> -- 
>> 2.5.0

-- 
Gustavo A. R. Silva



From robh at kernel.org  Tue Jul 18 15:49:21 2017
From: robh at kernel.org (Rob Herring)
Date: Tue, 18 Jul 2017 22:49:21 -0000
Subject: [PATCH] pinctrl: Convert to using %pOF instead of full_name
Message-ID: <20170718214339.7774-43-robh@kernel.org>

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh at kernel.org>
Cc: Linus Walleij <linus.walleij at linaro.org>
Cc: Lee Jones <lee at kernel.org>
Cc: Eric Anholt <eric at anholt.net>
Cc: Stefan Wahren <stefan.wahren at i2se.com>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Cc: Ray Jui <rjui at broadcom.com>
Cc: Scott Branden <sbranden at broadcom.com>
Cc: bcm-kernel-feedback-list at broadcom.com
Cc: Ludovic Desroches <ludovic.desroches at microchip.com>
Cc: Patrice Chotard <patrice.chotard at st.com>
Cc: Tomasz Figa <tomasz.figa at gmail.com>
Cc: Krzysztof Kozlowski <krzk at kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Geert Uytterhoeven <geert+renesas at glider.be>
Cc: Barry Song <baohua at kernel.org>
Cc: linux-gpio at vger.kernel.org
Cc: linux-rpi-kernel at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: kernel at stlinux.com
Cc: linux-samsung-soc at vger.kernel.org
Cc: linux-renesas-soc at vger.kernel.org
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c     | 25 +++++++++++--------------
 drivers/pinctrl/devicetree.c              |  4 ++--
 drivers/pinctrl/freescale/pinctrl-imx.c   |  8 +++-----
 drivers/pinctrl/pinconf-generic.c         |  7 +++----
 drivers/pinctrl/pinctrl-at91-pio4.c       | 11 +++++------
 drivers/pinctrl/pinctrl-st.c              |  2 +-
 drivers/pinctrl/pinctrl-tb10x.c           |  4 ++--
 drivers/pinctrl/samsung/pinctrl-samsung.c |  6 +++---
 drivers/pinctrl/sh-pfc/pinctrl.c          |  2 +-
 drivers/pinctrl/sirf/pinctrl-sirf.c       |  6 +++---
 10 files changed, 34 insertions(+), 41 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 230883168e99..3e71e5d782ee 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -692,8 +692,7 @@ static int bcm2835_pctl_dt_node_to_map_func(struct bcm2835_pinctrl *pc,
 	struct pinctrl_map *map = *maps;

 	if (fnum >= ARRAY_SIZE(bcm2835_functions)) {
-		dev_err(pc->dev, "%s: invalid brcm,function %d\n",
-			of_node_full_name(np), fnum);
+		dev_err(pc->dev, "%pOF: invalid brcm,function %d\n", np, fnum);
 		return -EINVAL;
 	}

@@ -713,8 +712,7 @@ static int bcm2835_pctl_dt_node_to_map_pull(struct bcm2835_pinctrl *pc,
 	unsigned long *configs;

 	if (pull > 2) {
-		dev_err(pc->dev, "%s: invalid brcm,pull %d\n",
-			of_node_full_name(np), pull);
+		dev_err(pc->dev, "%pOF: invalid brcm,pull %d\n", np, pull);
 		return -EINVAL;
 	}

@@ -745,8 +743,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,

 	pins = of_find_property(np, "brcm,pins", NULL);
 	if (!pins) {
-		dev_err(pc->dev, "%s: missing brcm,pins property\n",
-				of_node_full_name(np));
+		dev_err(pc->dev, "%pOF: missing brcm,pins property\n", np);
 		return -EINVAL;
 	}

@@ -755,8 +752,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,

 	if (!funcs && !pulls) {
 		dev_err(pc->dev,
-			"%s: neither brcm,function nor brcm,pull specified\n",
-			of_node_full_name(np));
+			"%pOF: neither brcm,function nor brcm,pull specified\n",
+			np);
 		return -EINVAL;
 	}

@@ -766,15 +763,15 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,

 	if (num_funcs > 1 && num_funcs != num_pins) {
 		dev_err(pc->dev,
-			"%s: brcm,function must have 1 or %d entries\n",
-			of_node_full_name(np), num_pins);
+			"%pOF: brcm,function must have 1 or %d entries\n",
+			np, num_pins);
 		return -EINVAL;
 	}

 	if (num_pulls > 1 && num_pulls != num_pins) {
 		dev_err(pc->dev,
-			"%s: brcm,pull must have 1 or %d entries\n",
-			of_node_full_name(np), num_pins);
+			"%pOF: brcm,pull must have 1 or %d entries\n",
+			np, num_pins);
 		return -EINVAL;
 	}

@@ -793,8 +790,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
 		if (err)
 			goto out;
 		if (pin >= ARRAY_SIZE(bcm2835_gpio_pins)) {
-			dev_err(pc->dev, "%s: invalid brcm,pins value %d\n",
-				of_node_full_name(np), pin);
+			dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n",
+				np, pin);
 			err = -EINVAL;
 			goto out;
 		}
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 0e5c9f14a706..0a20afc2210c 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -117,8 +117,8 @@ static int dt_to_map_one_config(struct pinctrl *p,
 	for (;;) {
 		np_pctldev = of_get_next_parent(np_pctldev);
 		if (!np_pctldev || of_node_is_root(np_pctldev)) {
-			dev_info(p->dev, "could not find pctldev for node %s, deferring probe\n",
-				np_config->full_name);
+			dev_info(p->dev, "could not find pctldev for node %pOF, deferring probe\n",
+				np_config);
 			of_node_put(np_pctldev);
 			/* OK let's just assume this will appear later then */
 			return -EPROBE_DEFER;
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 72aca758f4c6..1f0095a69407 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -573,16 +573,14 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
 		list = of_get_property(np, "pins", &size);
 		if (!list) {
 			dev_err(info->dev,
-				"no fsl,pins and pins property in node %s\n",
-				np->full_name);
+				"no fsl,pins and pins property in node %pOF\n", np);
 			return -EINVAL;
 		}
 	}

 	/* we do not check return since it's safe node passed down */
 	if (!size || size % pin_size) {
-		dev_err(info->dev, "Invalid fsl,pins or pins property in node %s\n",
-			np->full_name);
+		dev_err(info->dev, "Invalid fsl,pins or pins property in node %pOF\n", np);
 		return -EINVAL;
 	}

@@ -666,7 +664,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
 	func->name = np->name;
 	func->num_group_names = of_get_child_count(np);
 	if (func->num_group_names == 0) {
-		dev_err(info->dev, "no groups defined in %s\n", np->full_name);
+		dev_err(info->dev, "no groups defined in %pOF\n", np);
 		return -EINVAL;
 	}
 	func->group_names = devm_kcalloc(info->dev, func->num_group_names,
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index fc0c230aa11f..4cf901c78130 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -316,16 +316,15 @@ int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 	if (ret < 0) {
 		/* EINVAL=missing, which is fine since it's optional */
 		if (ret != -EINVAL)
-			dev_err(dev, "%s: could not parse property function\n",
-				of_node_full_name(np));
+			dev_err(dev, "%pOF: could not parse property function\n",
+				np);
 		function = NULL;
 	}

 	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
 					      &num_configs);
 	if (ret < 0) {
-		dev_err(dev, "%s: could not parse node property\n",
-			of_node_full_name(np));
+		dev_err(dev, "%pOF: could not parse node property\n", np);
 		return ret;
 	}

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index dc8591543dee..b1ca838dd80a 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -494,8 +494,8 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
 					      &num_configs);
 	if (ret < 0) {
-		dev_err(pctldev->dev, "%s: could not parse node property\n",
-			of_node_full_name(np));
+		dev_err(pctldev->dev, "%pOF: could not parse node property\n",
+			np);
 		return ret;
 	}

@@ -504,8 +504,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,

 	num_pins = pins->length / sizeof(u32);
 	if (!num_pins) {
-		dev_err(pctldev->dev, "no pins found in node %s\n",
-			of_node_full_name(np));
+		dev_err(pctldev->dev, "no pins found in node %pOF\n", np);
 		ret = -EINVAL;
 		goto exit;
 	}
@@ -584,8 +583,8 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,

 	if (ret < 0) {
 		pinctrl_utils_free_map(pctldev, *map, *num_maps);
-		dev_err(pctldev->dev, "can't create maps for node %s\n",
-			np_config->full_name);
+		dev_err(pctldev->dev, "can't create maps for node %pOF\n",
+			np_config);
 	}

 	return ret;
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 3ae8066bc127..1703977de7cf 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1537,7 +1537,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
 			return err;
 		}
 	} else {
-		dev_info(dev, "No IRQ support for %s bank\n", np->full_name);
+		dev_info(dev, "No IRQ support for %pOF bank\n", np);
 	}

 	return 0;
diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c
index edfba506e958..09d35006acb2 100644
--- a/drivers/pinctrl/pinctrl-tb10x.c
+++ b/drivers/pinctrl/pinctrl-tb10x.c
@@ -557,8 +557,8 @@ static int tb10x_dt_node_to_map(struct pinctrl_dev *pctl,
 	int ret = 0;

 	if (of_property_read_string(np_config, "abilis,function", &string)) {
-		pr_err("%s: No abilis,function property in device tree.\n",
-			np_config->full_name);
+		pr_err("%pOF: No abilis,function property in device tree.\n",
+			np_config);
 		return -EINVAL;
 	}

diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index f542642eed8d..20b59bb02196 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -679,7 +679,7 @@ static int samsung_pinctrl_create_function(struct device *dev,

 	npins = of_property_count_strings(func_np, "samsung,pins");
 	if (npins < 1) {
-		dev_err(dev, "invalid pin list in %s node", func_np->name);
+		dev_err(dev, "invalid pin list in %pOFn node", func_np);
 		return -EINVAL;
 	}

@@ -696,8 +696,8 @@ static int samsung_pinctrl_create_function(struct device *dev,
 							i, &gname);
 		if (ret) {
 			dev_err(dev,
-				"failed to read pin name %d from %s node\n",
-				i, func_np->name);
+				"failed to read pin name %d from %pOFn node\n",
+				i, func_np);
 			return ret;
 		}

diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index a70157f0acf4..e7a92eec06c2 100644
--- a/drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/drivers/pinctrl/sh-pfc/pinctrl.c
@@ -290,7 +290,7 @@ static int sh_pfc_dt_node_to_map(struct pinctrl_dev *pctldev,
 	if (*num_maps)
 		return 0;

-	dev_err(dev, "no mapping found in node %s\n", np->full_name);
+	dev_err(dev, "no mapping found in node %pOF\n", np);
 	ret = -EINVAL;

 done:
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
index 0df72be60704..80bfd4719199 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -810,7 +810,7 @@ static int sirfsoc_gpio_probe(struct device_node *np)
 	sgpio->chip.gc.set = sirfsoc_gpio_set_value;
 	sgpio->chip.gc.base = 0;
 	sgpio->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE * SIRFSOC_GPIO_NO_OF_BANKS;
-	sgpio->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
+	sgpio->chip.gc.label = kasprintf(GFP_KERNEL, "%pOF", np);
 	sgpio->chip.gc.of_node = np;
 	sgpio->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
 	sgpio->chip.gc.of_gpio_n_cells = 2;
@@ -819,8 +819,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)

 	err = gpiochip_add_data(&sgpio->chip.gc, sgpio);
 	if (err) {
-		dev_err(&pdev->dev, "%s: error in probe function with status %d\n",
-			np->full_name, err);
+		dev_err(&pdev->dev, "%pOF: error in probe function with status %d\n",
+			np, err);
 		goto out;
 	}

--
2.11.0



From robh at kernel.org  Tue Jul 18 15:49:25 2017
From: robh at kernel.org (Rob Herring)
Date: Tue, 18 Jul 2017 22:49:25 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
Message-ID: <20170718214339.7774-30-robh@kernel.org>

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh at kernel.org>
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Jason Cooper <jason at lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier at arm.com>
Cc: Lee Jones <lee at kernel.org>
Cc: Eric Anholt <eric at anholt.net>
Cc: Stefan Wahren <stefan.wahren at i2se.com>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Cc: Ray Jui <rjui at broadcom.com>
Cc: Scott Branden <sbranden at broadcom.com>
Cc: bcm-kernel-feedback-list at broadcom.com
Cc: Baruch Siach <baruch at tkos.co.il>
Cc: Vladimir Zapolskiy <vz at mleia.com>
Cc: Sylvain Lemieux <slemieux.tyco at gmail.com>
Cc: Matthias Brugger <matthias.bgg at gmail.com>
Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
Cc: Alexandre Torgue <alexandre.torgue at st.com>
Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
Cc: Chen-Yu Tsai <wens at csie.org>
Cc: Thierry Reding <thierry.reding at gmail.com>
Cc: Jonathan Hunter <jonathanh at nvidia.com>
Cc: Michal Simek <michal.simek at xilinx.com>
Cc: "S?ren Brinkmann" <soren.brinkmann at xilinx.com>
Cc: linux-rpi-kernel at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-tegra at vger.kernel.org
---
 drivers/irqchip/irq-bcm2835.c            |  9 ++++-----
 drivers/irqchip/irq-bcm2836.c            |  5 ++---
 drivers/irqchip/irq-crossbar.c           |  6 +++---
 drivers/irqchip/irq-digicolor.c          |  8 ++++----
 drivers/irqchip/irq-dw-apb-ictl.c        | 12 ++++++------
 drivers/irqchip/irq-gic-v3-its-pci-msi.c |  2 +-
 drivers/irqchip/irq-gic-v3-its.c         |  6 +++---
 drivers/irqchip/irq-gic-v3.c             | 11 ++++-------
 drivers/irqchip/irq-imx-gpcv2.c          |  4 ++--
 drivers/irqchip/irq-lpc32xx.c            |  2 +-
 drivers/irqchip/irq-mtk-sysirq.c         |  3 +--
 drivers/irqchip/irq-mxs.c                |  4 ++--
 drivers/irqchip/irq-stm32-exti.c         |  8 ++++----
 drivers/irqchip/irq-sun4i.c              |  6 +++---
 drivers/irqchip/irq-tegra.c              | 16 ++++++++--------
 drivers/irqchip/irq-xilinx-intc.c        |  4 ++--
 16 files changed, 50 insertions(+), 56 deletions(-)

diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c
index 44d7c38dde47..d2da8a1e6b1b 100644
--- a/drivers/irqchip/irq-bcm2835.c
+++ b/drivers/irqchip/irq-bcm2835.c
@@ -147,13 +147,12 @@ static int __init armctrl_of_init(struct device_node *node,

 	base = of_iomap(node, 0);
 	if (!base)
-		panic("%s: unable to map IC registers\n",
-			node->full_name);
+		panic("%pOF: unable to map IC registers\n", node);

 	intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0),
 			&armctrl_ops, NULL);
 	if (!intc.domain)
-		panic("%s: unable to create IRQ domain\n", node->full_name);
+		panic("%pOF: unable to create IRQ domain\n", node);

 	for (b = 0; b < NR_BANKS; b++) {
 		intc.pending[b] = base + reg_pending[b];
@@ -173,8 +172,8 @@ static int __init armctrl_of_init(struct device_node *node,
 		int parent_irq = irq_of_parse_and_map(node, 0);

 		if (!parent_irq) {
-			panic("%s: unable to get parent interrupt.\n",
-			      node->full_name);
+			panic("%pOF: unable to get parent interrupt.\n",
+			      node);
 		}
 		irq_set_chained_handler(parent_irq, bcm2836_chained_handle_irq);
 	} else {
diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c
index e7463e3c0814..dc8c1e3eafe7 100644
--- a/drivers/irqchip/irq-bcm2836.c
+++ b/drivers/irqchip/irq-bcm2836.c
@@ -282,8 +282,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
 {
 	intc.base = of_iomap(node, 0);
 	if (!intc.base) {
-		panic("%s: unable to map local interrupt registers\n",
-			node->full_name);
+		panic("%pOF: unable to map local interrupt registers\n", node);
 	}

 	bcm2835_init_local_timer_frequency();
@@ -292,7 +291,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
 					    &bcm2836_arm_irqchip_intc_ops,
 					    NULL);
 	if (!intc.domain)
-		panic("%s: unable to create IRQ domain\n", node->full_name);
+		panic("%pOF: unable to create IRQ domain\n", node);

 	bcm2836_arm_irqchip_register_irq(LOCAL_IRQ_CNTPSIRQ,
 					 &bcm2836_arm_irqchip_timer);
diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c
index f96601268f71..99d97d7e3fd7 100644
--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -341,13 +341,13 @@ static int __init irqcrossbar_init(struct device_node *node,
 	int err;

 	if (!parent) {
-		pr_err("%s: no parent, giving up\n", node->full_name);
+		pr_err("%pOF: no parent, giving up\n", node);
 		return -ENODEV;
 	}

 	parent_domain = irq_find_host(parent);
 	if (!parent_domain) {
-		pr_err("%s: unable to obtain parent domain\n", node->full_name);
+		pr_err("%pOF: unable to obtain parent domain\n", node);
 		return -ENXIO;
 	}

@@ -360,7 +360,7 @@ static int __init irqcrossbar_init(struct device_node *node,
 					  node, &crossbar_domain_ops,
 					  NULL);
 	if (!domain) {
-		pr_err("%s: failed to allocated domain\n", node->full_name);
+		pr_err("%pOF: failed to allocated domain\n", node);
 		return -ENOMEM;
 	}

diff --git a/drivers/irqchip/irq-digicolor.c b/drivers/irqchip/irq-digicolor.c
index dad85e74c37c..df5752cfbc09 100644
--- a/drivers/irqchip/irq-digicolor.c
+++ b/drivers/irqchip/irq-digicolor.c
@@ -78,7 +78,7 @@ static int __init digicolor_of_init(struct device_node *node,

 	reg_base = of_iomap(node, 0);
 	if (!reg_base) {
-		pr_err("%s: unable to map IC registers\n", node->full_name);
+		pr_err("%pOF: unable to map IC registers\n", node);
 		return -ENXIO;
 	}

@@ -88,7 +88,7 @@ static int __init digicolor_of_init(struct device_node *node,

 	ucregs = syscon_regmap_lookup_by_phandle(node, "syscon");
 	if (IS_ERR(ucregs)) {
-		pr_err("%s: unable to map UC registers\n", node->full_name);
+		pr_err("%pOF: unable to map UC registers\n", node);
 		return PTR_ERR(ucregs);
 	}
 	/* channel 1, regular IRQs */
@@ -97,7 +97,7 @@ static int __init digicolor_of_init(struct device_node *node,
 	digicolor_irq_domain =
 		irq_domain_add_linear(node, 64, &irq_generic_chip_ops, NULL);
 	if (!digicolor_irq_domain) {
-		pr_err("%s: unable to create IRQ domain\n", node->full_name);
+		pr_err("%pOF: unable to create IRQ domain\n", node);
 		return -ENOMEM;
 	}

@@ -105,7 +105,7 @@ static int __init digicolor_of_init(struct device_node *node,
 					     "digicolor_irq", handle_level_irq,
 					     clr, 0, 0);
 	if (ret) {
-		pr_err("%s: unable to allocate IRQ gc\n", node->full_name);
+		pr_err("%pOF: unable to allocate IRQ gc\n", node);
 		return ret;
 	}

diff --git a/drivers/irqchip/irq-dw-apb-ictl.c b/drivers/irqchip/irq-dw-apb-ictl.c
index 052f266364c0..0a19618ce2c8 100644
--- a/drivers/irqchip/irq-dw-apb-ictl.c
+++ b/drivers/irqchip/irq-dw-apb-ictl.c
@@ -79,24 +79,24 @@ static int __init dw_apb_ictl_init(struct device_node *np,
 	/* Map the parent interrupt for the chained handler */
 	irq = irq_of_parse_and_map(np, 0);
 	if (irq <= 0) {
-		pr_err("%s: unable to parse irq\n", np->full_name);
+		pr_err("%pOF: unable to parse irq\n", np);
 		return -EINVAL;
 	}

 	ret = of_address_to_resource(np, 0, &r);
 	if (ret) {
-		pr_err("%s: unable to get resource\n", np->full_name);
+		pr_err("%pOF: unable to get resource\n", np);
 		return ret;
 	}

 	if (!request_mem_region(r.start, resource_size(&r), np->full_name)) {
-		pr_err("%s: unable to request mem region\n", np->full_name);
+		pr_err("%pOF: unable to request mem region\n", np);
 		return -ENOMEM;
 	}

 	iobase = ioremap(r.start, resource_size(&r));
 	if (!iobase) {
-		pr_err("%s: unable to map resource\n", np->full_name);
+		pr_err("%pOF: unable to map resource\n", np);
 		ret = -ENOMEM;
 		goto err_release;
 	}
@@ -123,7 +123,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
 	domain = irq_domain_add_linear(np, nrirqs,
 				       &irq_generic_chip_ops, NULL);
 	if (!domain) {
-		pr_err("%s: unable to add irq domain\n", np->full_name);
+		pr_err("%pOF: unable to add irq domain\n", np);
 		ret = -ENOMEM;
 		goto err_unmap;
 	}
@@ -132,7 +132,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
 					     handle_level_irq, clr, 0,
 					     IRQ_GC_INIT_MASK_CACHE);
 	if (ret) {
-		pr_err("%s: unable to alloc irq domain gc\n", np->full_name);
+		pr_err("%pOF: unable to alloc irq domain gc\n", np);
 		goto err_unmap;
 	}

diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
index 77931214d954..14a8c0a7e095 100644
--- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
@@ -138,7 +138,7 @@ static int __init its_pci_of_msi_init(void)
 		if (its_pci_msi_init_one(of_node_to_fwnode(np), np->full_name))
 			continue;

-		pr_info("PCI/MSI: %s domain created\n", np->full_name);
+		pr_info("PCI/MSI: %pOF domain created\n", np);
 	}

 	return 0;
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 68932873eebc..62298ee360bc 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1816,13 +1816,13 @@ static int __init its_of_probe(struct device_node *node)
 	for (np = of_find_matching_node(node, its_device_id); np;
 	     np = of_find_matching_node(np, its_device_id)) {
 		if (!of_property_read_bool(np, "msi-controller")) {
-			pr_warn("%s: no msi-controller property, ITS ignored\n",
-				np->full_name);
+			pr_warn("%pOF: no msi-controller property, ITS ignored\n",
+				np);
 			continue;
 		}

 		if (of_address_to_resource(np, 0, &res)) {
-			pr_warn("%s: no regs?\n", np->full_name);
+			pr_warn("%pOF: no regs?\n", np);
 			continue;
 		}

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index dbffb7ab6203..afae0a9d0df9 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1057,7 +1057,7 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node)
 			if (WARN_ON(cpu == -1))
 				continue;

-			pr_cont("%s[%d] ", cpu_node->full_name, cpu);
+			pr_cont("%pOF[%d] ", cpu_node, cpu);

 			cpumask_set_cpu(cpu, &part->mask);
 		}
@@ -1125,15 +1125,13 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare

 	dist_base = of_iomap(node, 0);
 	if (!dist_base) {
-		pr_err("%s: unable to map gic dist registers\n",
-			node->full_name);
+		pr_err("%pOF: unable to map gic dist registers\n", node);
 		return -ENXIO;
 	}

 	err = gic_validate_dist_version(dist_base);
 	if (err) {
-		pr_err("%s: no distributor detected, giving up\n",
-			node->full_name);
+		pr_err("%pOF: no distributor detected, giving up\n", node);
 		goto out_unmap_dist;
 	}

@@ -1153,8 +1151,7 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
 		ret = of_address_to_resource(node, 1 + i, &res);
 		rdist_regs[i].redist_base = of_iomap(node, 1 + i);
 		if (ret || !rdist_regs[i].redist_base) {
-			pr_err("%s: couldn't map region %d\n",
-			       node->full_name, i);
+			pr_err("%pOF: couldn't map region %d\n", node, i);
 			err = -ENODEV;
 			goto out_unmap_rdist;
 		}
diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c
index bb36f572e322..675eda5ff2b8 100644
--- a/drivers/irqchip/irq-imx-gpcv2.c
+++ b/drivers/irqchip/irq-imx-gpcv2.c
@@ -214,13 +214,13 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
 	int i;

 	if (!parent) {
-		pr_err("%s: no parent, giving up\n", node->full_name);
+		pr_err("%pOF: no parent, giving up\n", node);
 		return -ENODEV;
 	}

 	parent_domain = irq_find_host(parent);
 	if (!parent_domain) {
-		pr_err("%s: unable to get parent domain\n", node->full_name);
+		pr_err("%pOF: unable to get parent domain\n", node);
 		return -ENXIO;
 	}

diff --git a/drivers/irqchip/irq-lpc32xx.c b/drivers/irqchip/irq-lpc32xx.c
index 1034aeb2e98a..a48357d369b5 100644
--- a/drivers/irqchip/irq-lpc32xx.c
+++ b/drivers/irqchip/irq-lpc32xx.c
@@ -191,7 +191,7 @@ static int __init lpc32xx_of_ic_init(struct device_node *node,

 	irqc->base = of_iomap(node, 0);
 	if (!irqc->base) {
-		pr_err("%s: unable to map registers\n", node->full_name);
+		pr_err("%pOF: unable to map registers\n", node);
 		kfree(irqc);
 		return -EINVAL;
 	}
diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index eeac512ec5a8..90aaf190157f 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -178,8 +178,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
 		chip_data->intpol_words[i] = size / 4;
 		chip_data->intpol_bases[i] = of_iomap(node, i);
 		if (ret || !chip_data->intpol_bases[i]) {
-			pr_err("%s: couldn't map region %d\n",
-			       node->full_name, i);
+			pr_err("%pOF: couldn't map region %d\n", node, i);
 			ret = -ENODEV;
 			goto out_free_intpol;
 		}
diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
index 05fa9f7af53c..e8b31f52e071 100644
--- a/drivers/irqchip/irq-mxs.c
+++ b/drivers/irqchip/irq-mxs.c
@@ -179,7 +179,7 @@ static void __init icoll_add_domain(struct device_node *np,
 					     &icoll_irq_domain_ops, NULL);

 	if (!icoll_domain)
-		panic("%s: unable to create irq domain", np->full_name);
+		panic("%pOF: unable to create irq domain", np);
 }

 static void __iomem * __init icoll_init_iobase(struct device_node *np)
@@ -188,7 +188,7 @@ static void __iomem * __init icoll_init_iobase(struct device_node *np)

 	icoll_base = of_io_request_and_map(np, 0, np->name);
 	if (IS_ERR(icoll_base))
-		panic("%s: unable to map resource", np->full_name);
+		panic("%pOF: unable to map resource", np);
 	return icoll_base;
 }

diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 491568c95aa5..45363ff8d06f 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -140,7 +140,7 @@ static int __init stm32_exti_init(struct device_node *node,

 	base = of_iomap(node, 0);
 	if (!base) {
-		pr_err("%s: Unable to map registers\n", node->full_name);
+		pr_err("%pOF: Unable to map registers\n", node);
 		return -ENOMEM;
 	}

@@ -149,7 +149,7 @@ static int __init stm32_exti_init(struct device_node *node,
 	nr_exti = fls(readl_relaxed(base + EXTI_RTSR));
 	writel_relaxed(0, base + EXTI_RTSR);

-	pr_info("%s: %d External IRQs detected\n", node->full_name, nr_exti);
+	pr_info("%pOF: %d External IRQs detected\n", node, nr_exti);

 	domain = irq_domain_add_linear(node, nr_exti,
 				       &irq_exti_domain_ops, NULL);
@@ -163,8 +163,8 @@ static int __init stm32_exti_init(struct device_node *node,
 	ret = irq_alloc_domain_generic_chips(domain, nr_exti, 1, "exti",
 					     handle_edge_irq, clr, 0, 0);
 	if (ret) {
-		pr_err("%s: Could not allocate generic interrupt chip.\n",
-			node->full_name);
+		pr_err("%pOF: Could not allocate generic interrupt chip.\n",
+			node);
 		goto out_free_domain;
 	}

diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
index 376b28074e0d..e3e5b9132b75 100644
--- a/drivers/irqchip/irq-sun4i.c
+++ b/drivers/irqchip/irq-sun4i.c
@@ -97,8 +97,8 @@ static int __init sun4i_of_init(struct device_node *node,
 {
 	sun4i_irq_base = of_iomap(node, 0);
 	if (!sun4i_irq_base)
-		panic("%s: unable to map IC registers\n",
-			node->full_name);
+		panic("%pOF: unable to map IC registers\n",
+			node);

 	/* Disable all interrupts */
 	writel(0, sun4i_irq_base + SUN4I_IRQ_ENABLE_REG(0));
@@ -124,7 +124,7 @@ static int __init sun4i_of_init(struct device_node *node,
 	sun4i_irq_domain = irq_domain_add_linear(node, 3 * 32,
 						 &sun4i_irq_ops, NULL);
 	if (!sun4i_irq_domain)
-		panic("%s: unable to create IRQ domain\n", node->full_name);
+		panic("%pOF: unable to create IRQ domain\n", node);

 	set_handle_irq(sun4i_handle_irq);

diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c
index 3973a14bb15b..0abc0cd1c32e 100644
--- a/drivers/irqchip/irq-tegra.c
+++ b/drivers/irqchip/irq-tegra.c
@@ -291,13 +291,13 @@ static int __init tegra_ictlr_init(struct device_node *node,
 	int err;

 	if (!parent) {
-		pr_err("%s: no parent, giving up\n", node->full_name);
+		pr_err("%pOF: no parent, giving up\n", node);
 		return -ENODEV;
 	}

 	parent_domain = irq_find_host(parent);
 	if (!parent_domain) {
-		pr_err("%s: unable to obtain parent domain\n", node->full_name);
+		pr_err("%pOF: unable to obtain parent domain\n", node);
 		return -ENXIO;
 	}

@@ -329,29 +329,29 @@ static int __init tegra_ictlr_init(struct device_node *node,
 	}

 	if (!num_ictlrs) {
-		pr_err("%s: no valid regions, giving up\n", node->full_name);
+		pr_err("%pOF: no valid regions, giving up\n", node);
 		err = -ENOMEM;
 		goto out_free;
 	}

 	WARN(num_ictlrs != soc->num_ictlrs,
-	     "%s: Found %u interrupt controllers in DT; expected %u.\n",
-	     node->full_name, num_ictlrs, soc->num_ictlrs);
+	     "%pOF: Found %u interrupt controllers in DT; expected %u.\n",
+	     node, num_ictlrs, soc->num_ictlrs);


 	domain = irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32,
 					  node, &tegra_ictlr_domain_ops,
 					  lic);
 	if (!domain) {
-		pr_err("%s: failed to allocated domain\n", node->full_name);
+		pr_err("%pOF: failed to allocated domain\n", node);
 		err = -ENOMEM;
 		goto out_unmap;
 	}

 	tegra_ictlr_syscore_init();

-	pr_info("%s: %d interrupts forwarded to %s\n",
-		node->full_name, num_ictlrs * 32, parent->full_name);
+	pr_info("%pOF: %d interrupts forwarded to %pOF\n",
+		node, num_ictlrs * 32, parent);

 	return 0;

diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c
index 3db7ab1c9741..e3043ded8973 100644
--- a/drivers/irqchip/irq-xilinx-intc.c
+++ b/drivers/irqchip/irq-xilinx-intc.c
@@ -186,8 +186,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
 	if (irqc->intr_mask >> nr_irq)
 		pr_warn("irq-xilinx: mismatch in kind-of-intr param\n");

-	pr_info("irq-xilinx: %s: num_irq=%d, edge=0x%x\n",
-		intc->full_name, nr_irq, irqc->intr_mask);
+	pr_info("irq-xilinx: %pOF: num_irq=%d, edge=0x%x\n",
+		intc, nr_irq, irqc->intr_mask);


 	/*
--
2.11.0



From vz at mleia.com  Tue Jul 18 17:29:03 2017
From: vz at mleia.com (Vladimir Zapolskiy)
Date: Wed, 19 Jul 2017 00:29:03 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-30-robh@kernel.org>
References: <20170718214339.7774-30-robh@kernel.org>
Message-ID: <123f1ec8-e1e1-1bf4-c47b-b97bdd8fd8db@mleia.com>

On 07/19/2017 12:43 AM, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Jason Cooper <jason at lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Baruch Siach <baruch at tkos.co.il>
> Cc: Vladimir Zapolskiy <vz at mleia.com>
> Cc: Sylvain Lemieux <slemieux.tyco at gmail.com>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue at st.com>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: Jonathan Hunter <jonathanh at nvidia.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann at xilinx.com>
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-tegra at vger.kernel.org
> ---

For 

>  drivers/irqchip/irq-lpc32xx.c            |  2 +-

Acked-by: Vladimir Zapolskiy <vz at mleia.com>

--
With best wishes,
Vladimir


From krzk at kernel.org  Tue Jul 18 22:55:09 2017
From: krzk at kernel.org (Krzysztof Kozlowski)
Date: Wed, 19 Jul 2017 05:55:09 -0000
Subject: [PATCH] pinctrl: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-43-robh@kernel.org>
References: <20170718214339.7774-43-robh@kernel.org>
Message-ID: <20170719055423.GB6246@kozik-book>

On Tue, Jul 18, 2017 at 04:43:23PM -0500, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Ludovic Desroches <ludovic.desroches at microchip.com>
> Cc: Patrice Chotard <patrice.chotard at st.com>
> Cc: Tomasz Figa <tomasz.figa at gmail.com>
> Cc: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Geert Uytterhoeven <geert+renesas at glider.be>
> Cc: Barry Song <baohua at kernel.org>
> Cc: linux-gpio at vger.kernel.org
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: kernel at stlinux.com
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c     | 25 +++++++++++--------------
>  drivers/pinctrl/devicetree.c              |  4 ++--
>  drivers/pinctrl/freescale/pinctrl-imx.c   |  8 +++-----
>  drivers/pinctrl/pinconf-generic.c         |  7 +++----
>  drivers/pinctrl/pinctrl-at91-pio4.c       | 11 +++++------
>  drivers/pinctrl/pinctrl-st.c              |  2 +-
>  drivers/pinctrl/pinctrl-tb10x.c           |  4 ++--
>  drivers/pinctrl/samsung/pinctrl-samsung.c |  6 +++---
>  drivers/pinctrl/sh-pfc/pinctrl.c          |  2 +-
>  drivers/pinctrl/sirf/pinctrl-sirf.c       |  6 +++---
>  10 files changed, 34 insertions(+), 41 deletions(-)
> 
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 230883168e99..3e71e5d782ee 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -692,8 +692,7 @@ static int bcm2835_pctl_dt_node_to_map_func(struct bcm2835_pinctrl *pc,
>  	struct pinctrl_map *map = *maps;
> 
>  	if (fnum >= ARRAY_SIZE(bcm2835_functions)) {
> -		dev_err(pc->dev, "%s: invalid brcm,function %d\n",
> -			of_node_full_name(np), fnum);
> +		dev_err(pc->dev, "%pOF: invalid brcm,function %d\n", np, fnum);
>  		return -EINVAL;
>  	}
> 
> @@ -713,8 +712,7 @@ static int bcm2835_pctl_dt_node_to_map_pull(struct bcm2835_pinctrl *pc,
>  	unsigned long *configs;
> 
>  	if (pull > 2) {
> -		dev_err(pc->dev, "%s: invalid brcm,pull %d\n",
> -			of_node_full_name(np), pull);
> +		dev_err(pc->dev, "%pOF: invalid brcm,pull %d\n", np, pull);
>  		return -EINVAL;
>  	}
> 
> @@ -745,8 +743,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	pins = of_find_property(np, "brcm,pins", NULL);
>  	if (!pins) {
> -		dev_err(pc->dev, "%s: missing brcm,pins property\n",
> -				of_node_full_name(np));
> +		dev_err(pc->dev, "%pOF: missing brcm,pins property\n", np);
>  		return -EINVAL;
>  	}
> 
> @@ -755,8 +752,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	if (!funcs && !pulls) {
>  		dev_err(pc->dev,
> -			"%s: neither brcm,function nor brcm,pull specified\n",
> -			of_node_full_name(np));
> +			"%pOF: neither brcm,function nor brcm,pull specified\n",
> +			np);
>  		return -EINVAL;
>  	}
> 
> @@ -766,15 +763,15 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	if (num_funcs > 1 && num_funcs != num_pins) {
>  		dev_err(pc->dev,
> -			"%s: brcm,function must have 1 or %d entries\n",
> -			of_node_full_name(np), num_pins);
> +			"%pOF: brcm,function must have 1 or %d entries\n",
> +			np, num_pins);
>  		return -EINVAL;
>  	}
> 
>  	if (num_pulls > 1 && num_pulls != num_pins) {
>  		dev_err(pc->dev,
> -			"%s: brcm,pull must have 1 or %d entries\n",
> -			of_node_full_name(np), num_pins);
> +			"%pOF: brcm,pull must have 1 or %d entries\n",
> +			np, num_pins);
>  		return -EINVAL;
>  	}
> 
> @@ -793,8 +790,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
>  		if (err)
>  			goto out;
>  		if (pin >= ARRAY_SIZE(bcm2835_gpio_pins)) {
> -			dev_err(pc->dev, "%s: invalid brcm,pins value %d\n",
> -				of_node_full_name(np), pin);
> +			dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n",
> +				np, pin);
>  			err = -EINVAL;
>  			goto out;
>  		}
> diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
> index 0e5c9f14a706..0a20afc2210c 100644
> --- a/drivers/pinctrl/devicetree.c
> +++ b/drivers/pinctrl/devicetree.c
> @@ -117,8 +117,8 @@ static int dt_to_map_one_config(struct pinctrl *p,
>  	for (;;) {
>  		np_pctldev = of_get_next_parent(np_pctldev);
>  		if (!np_pctldev || of_node_is_root(np_pctldev)) {
> -			dev_info(p->dev, "could not find pctldev for node %s, deferring probe\n",
> -				np_config->full_name);
> +			dev_info(p->dev, "could not find pctldev for node %pOF, deferring probe\n",
> +				np_config);
>  			of_node_put(np_pctldev);
>  			/* OK let's just assume this will appear later then */
>  			return -EPROBE_DEFER;
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
> index 72aca758f4c6..1f0095a69407 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> @@ -573,16 +573,14 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
>  		list = of_get_property(np, "pins", &size);
>  		if (!list) {
>  			dev_err(info->dev,
> -				"no fsl,pins and pins property in node %s\n",
> -				np->full_name);
> +				"no fsl,pins and pins property in node %pOF\n", np);
>  			return -EINVAL;
>  		}
>  	}
> 
>  	/* we do not check return since it's safe node passed down */
>  	if (!size || size % pin_size) {
> -		dev_err(info->dev, "Invalid fsl,pins or pins property in node %s\n",
> -			np->full_name);
> +		dev_err(info->dev, "Invalid fsl,pins or pins property in node %pOF\n", np);
>  		return -EINVAL;
>  	}
> 
> @@ -666,7 +664,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
>  	func->name = np->name;
>  	func->num_group_names = of_get_child_count(np);
>  	if (func->num_group_names == 0) {
> -		dev_err(info->dev, "no groups defined in %s\n", np->full_name);
> +		dev_err(info->dev, "no groups defined in %pOF\n", np);
>  		return -EINVAL;
>  	}
>  	func->group_names = devm_kcalloc(info->dev, func->num_group_names,
> diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
> index fc0c230aa11f..4cf901c78130 100644
> --- a/drivers/pinctrl/pinconf-generic.c
> +++ b/drivers/pinctrl/pinconf-generic.c
> @@ -316,16 +316,15 @@ int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>  	if (ret < 0) {
>  		/* EINVAL=missing, which is fine since it's optional */
>  		if (ret != -EINVAL)
> -			dev_err(dev, "%s: could not parse property function\n",
> -				of_node_full_name(np));
> +			dev_err(dev, "%pOF: could not parse property function\n",
> +				np);
>  		function = NULL;
>  	}
> 
>  	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>  					      &num_configs);
>  	if (ret < 0) {
> -		dev_err(dev, "%s: could not parse node property\n",
> -			of_node_full_name(np));
> +		dev_err(dev, "%pOF: could not parse node property\n", np);
>  		return ret;
>  	}
> 
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index dc8591543dee..b1ca838dd80a 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -494,8 +494,8 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>  	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>  					      &num_configs);
>  	if (ret < 0) {
> -		dev_err(pctldev->dev, "%s: could not parse node property\n",
> -			of_node_full_name(np));
> +		dev_err(pctldev->dev, "%pOF: could not parse node property\n",
> +			np);
>  		return ret;
>  	}
> 
> @@ -504,8 +504,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
> 
>  	num_pins = pins->length / sizeof(u32);
>  	if (!num_pins) {
> -		dev_err(pctldev->dev, "no pins found in node %s\n",
> -			of_node_full_name(np));
> +		dev_err(pctldev->dev, "no pins found in node %pOF\n", np);
>  		ret = -EINVAL;
>  		goto exit;
>  	}
> @@ -584,8 +583,8 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	if (ret < 0) {
>  		pinctrl_utils_free_map(pctldev, *map, *num_maps);
> -		dev_err(pctldev->dev, "can't create maps for node %s\n",
> -			np_config->full_name);
> +		dev_err(pctldev->dev, "can't create maps for node %pOF\n",
> +			np_config);
>  	}
> 
>  	return ret;
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 3ae8066bc127..1703977de7cf 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1537,7 +1537,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
>  			return err;
>  		}
>  	} else {
> -		dev_info(dev, "No IRQ support for %s bank\n", np->full_name);
> +		dev_info(dev, "No IRQ support for %pOF bank\n", np);
>  	}
> 
>  	return 0;
> diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c
> index edfba506e958..09d35006acb2 100644
> --- a/drivers/pinctrl/pinctrl-tb10x.c
> +++ b/drivers/pinctrl/pinctrl-tb10x.c
> @@ -557,8 +557,8 @@ static int tb10x_dt_node_to_map(struct pinctrl_dev *pctl,
>  	int ret = 0;
> 
>  	if (of_property_read_string(np_config, "abilis,function", &string)) {
> -		pr_err("%s: No abilis,function property in device tree.\n",
> -			np_config->full_name);
> +		pr_err("%pOF: No abilis,function property in device tree.\n",
> +			np_config);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index f542642eed8d..20b59bb02196 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -679,7 +679,7 @@ static int samsung_pinctrl_create_function(struct device *dev,
> 
>  	npins = of_property_count_strings(func_np, "samsung,pins");
>  	if (npins < 1) {
> -		dev_err(dev, "invalid pin list in %s node", func_np->name);
> +		dev_err(dev, "invalid pin list in %pOFn node", func_np);
>  		return -EINVAL;
>  	}
> 
> @@ -696,8 +696,8 @@ static int samsung_pinctrl_create_function(struct device *dev,
>  							i, &gname);
>  		if (ret) {
>  			dev_err(dev,
> -				"failed to read pin name %d from %s node\n",
> -				i, func_np->name);
> +				"failed to read pin name %d from %pOFn node\n",
> +				i, func_np);
>  			return ret;
>  		}
> 

For Samsung pinctrl:
Acked-by: Krzysztof Kozlowski <krzk at kernel.org>

Best regards,
Krzysztof



From ludovic.desroches at microchip.com  Tue Jul 18 22:58:39 2017
From: ludovic.desroches at microchip.com (Ludovic Desroches)
Date: Wed, 19 Jul 2017 05:58:39 -0000
Subject: [PATCH] pinctrl: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-43-robh@kernel.org>
References: <20170718214339.7774-43-robh@kernel.org>
Message-ID: <20170719055743.biy7ulaxdwmr3zud@rfolt0960.corp.atmel.com>

On Tue, Jul 18, 2017 at 04:43:23PM -0500, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Ludovic Desroches <ludovic.desroches at microchip.com>
> Cc: Patrice Chotard <patrice.chotard at st.com>
> Cc: Tomasz Figa <tomasz.figa at gmail.com>
> Cc: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Geert Uytterhoeven <geert+renesas at glider.be>
> Cc: Barry Song <baohua at kernel.org>
> Cc: linux-gpio at vger.kernel.org
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: kernel at stlinux.com
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c     | 25 +++++++++++--------------
>  drivers/pinctrl/devicetree.c              |  4 ++--
>  drivers/pinctrl/freescale/pinctrl-imx.c   |  8 +++-----
>  drivers/pinctrl/pinconf-generic.c         |  7 +++----
>  drivers/pinctrl/pinctrl-at91-pio4.c       | 11 +++++------

Acked-by: Ludovic Desroches <ludovic.desroches at microchip.com>

>  drivers/pinctrl/pinctrl-st.c              |  2 +-
>  drivers/pinctrl/pinctrl-tb10x.c           |  4 ++--
>  drivers/pinctrl/samsung/pinctrl-samsung.c |  6 +++---
>  drivers/pinctrl/sh-pfc/pinctrl.c          |  2 +-
>  drivers/pinctrl/sirf/pinctrl-sirf.c       |  6 +++---
>  10 files changed, 34 insertions(+), 41 deletions(-)
> 
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 230883168e99..3e71e5d782ee 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -692,8 +692,7 @@ static int bcm2835_pctl_dt_node_to_map_func(struct bcm2835_pinctrl *pc,
>  	struct pinctrl_map *map = *maps;
> 
>  	if (fnum >= ARRAY_SIZE(bcm2835_functions)) {
> -		dev_err(pc->dev, "%s: invalid brcm,function %d\n",
> -			of_node_full_name(np), fnum);
> +		dev_err(pc->dev, "%pOF: invalid brcm,function %d\n", np, fnum);
>  		return -EINVAL;
>  	}
> 
> @@ -713,8 +712,7 @@ static int bcm2835_pctl_dt_node_to_map_pull(struct bcm2835_pinctrl *pc,
>  	unsigned long *configs;
> 
>  	if (pull > 2) {
> -		dev_err(pc->dev, "%s: invalid brcm,pull %d\n",
> -			of_node_full_name(np), pull);
> +		dev_err(pc->dev, "%pOF: invalid brcm,pull %d\n", np, pull);
>  		return -EINVAL;
>  	}
> 
> @@ -745,8 +743,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	pins = of_find_property(np, "brcm,pins", NULL);
>  	if (!pins) {
> -		dev_err(pc->dev, "%s: missing brcm,pins property\n",
> -				of_node_full_name(np));
> +		dev_err(pc->dev, "%pOF: missing brcm,pins property\n", np);
>  		return -EINVAL;
>  	}
> 
> @@ -755,8 +752,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	if (!funcs && !pulls) {
>  		dev_err(pc->dev,
> -			"%s: neither brcm,function nor brcm,pull specified\n",
> -			of_node_full_name(np));
> +			"%pOF: neither brcm,function nor brcm,pull specified\n",
> +			np);
>  		return -EINVAL;
>  	}
> 
> @@ -766,15 +763,15 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	if (num_funcs > 1 && num_funcs != num_pins) {
>  		dev_err(pc->dev,
> -			"%s: brcm,function must have 1 or %d entries\n",
> -			of_node_full_name(np), num_pins);
> +			"%pOF: brcm,function must have 1 or %d entries\n",
> +			np, num_pins);
>  		return -EINVAL;
>  	}
> 
>  	if (num_pulls > 1 && num_pulls != num_pins) {
>  		dev_err(pc->dev,
> -			"%s: brcm,pull must have 1 or %d entries\n",
> -			of_node_full_name(np), num_pins);
> +			"%pOF: brcm,pull must have 1 or %d entries\n",
> +			np, num_pins);
>  		return -EINVAL;
>  	}
> 
> @@ -793,8 +790,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
>  		if (err)
>  			goto out;
>  		if (pin >= ARRAY_SIZE(bcm2835_gpio_pins)) {
> -			dev_err(pc->dev, "%s: invalid brcm,pins value %d\n",
> -				of_node_full_name(np), pin);
> +			dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n",
> +				np, pin);
>  			err = -EINVAL;
>  			goto out;
>  		}
> diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
> index 0e5c9f14a706..0a20afc2210c 100644
> --- a/drivers/pinctrl/devicetree.c
> +++ b/drivers/pinctrl/devicetree.c
> @@ -117,8 +117,8 @@ static int dt_to_map_one_config(struct pinctrl *p,
>  	for (;;) {
>  		np_pctldev = of_get_next_parent(np_pctldev);
>  		if (!np_pctldev || of_node_is_root(np_pctldev)) {
> -			dev_info(p->dev, "could not find pctldev for node %s, deferring probe\n",
> -				np_config->full_name);
> +			dev_info(p->dev, "could not find pctldev for node %pOF, deferring probe\n",
> +				np_config);
>  			of_node_put(np_pctldev);
>  			/* OK let's just assume this will appear later then */
>  			return -EPROBE_DEFER;
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
> index 72aca758f4c6..1f0095a69407 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> @@ -573,16 +573,14 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
>  		list = of_get_property(np, "pins", &size);
>  		if (!list) {
>  			dev_err(info->dev,
> -				"no fsl,pins and pins property in node %s\n",
> -				np->full_name);
> +				"no fsl,pins and pins property in node %pOF\n", np);
>  			return -EINVAL;
>  		}
>  	}
> 
>  	/* we do not check return since it's safe node passed down */
>  	if (!size || size % pin_size) {
> -		dev_err(info->dev, "Invalid fsl,pins or pins property in node %s\n",
> -			np->full_name);
> +		dev_err(info->dev, "Invalid fsl,pins or pins property in node %pOF\n", np);
>  		return -EINVAL;
>  	}
> 
> @@ -666,7 +664,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
>  	func->name = np->name;
>  	func->num_group_names = of_get_child_count(np);
>  	if (func->num_group_names == 0) {
> -		dev_err(info->dev, "no groups defined in %s\n", np->full_name);
> +		dev_err(info->dev, "no groups defined in %pOF\n", np);
>  		return -EINVAL;
>  	}
>  	func->group_names = devm_kcalloc(info->dev, func->num_group_names,
> diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
> index fc0c230aa11f..4cf901c78130 100644
> --- a/drivers/pinctrl/pinconf-generic.c
> +++ b/drivers/pinctrl/pinconf-generic.c
> @@ -316,16 +316,15 @@ int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>  	if (ret < 0) {
>  		/* EINVAL=missing, which is fine since it's optional */
>  		if (ret != -EINVAL)
> -			dev_err(dev, "%s: could not parse property function\n",
> -				of_node_full_name(np));
> +			dev_err(dev, "%pOF: could not parse property function\n",
> +				np);
>  		function = NULL;
>  	}
> 
>  	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>  					      &num_configs);
>  	if (ret < 0) {
> -		dev_err(dev, "%s: could not parse node property\n",
> -			of_node_full_name(np));
> +		dev_err(dev, "%pOF: could not parse node property\n", np);
>  		return ret;
>  	}
> 
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index dc8591543dee..b1ca838dd80a 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -494,8 +494,8 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>  	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>  					      &num_configs);
>  	if (ret < 0) {
> -		dev_err(pctldev->dev, "%s: could not parse node property\n",
> -			of_node_full_name(np));
> +		dev_err(pctldev->dev, "%pOF: could not parse node property\n",
> +			np);
>  		return ret;
>  	}
> 
> @@ -504,8 +504,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
> 
>  	num_pins = pins->length / sizeof(u32);
>  	if (!num_pins) {
> -		dev_err(pctldev->dev, "no pins found in node %s\n",
> -			of_node_full_name(np));
> +		dev_err(pctldev->dev, "no pins found in node %pOF\n", np);
>  		ret = -EINVAL;
>  		goto exit;
>  	}
> @@ -584,8 +583,8 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>  	if (ret < 0) {
>  		pinctrl_utils_free_map(pctldev, *map, *num_maps);
> -		dev_err(pctldev->dev, "can't create maps for node %s\n",
> -			np_config->full_name);
> +		dev_err(pctldev->dev, "can't create maps for node %pOF\n",
> +			np_config);
>  	}
> 
>  	return ret;
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 3ae8066bc127..1703977de7cf 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1537,7 +1537,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
>  			return err;
>  		}
>  	} else {
> -		dev_info(dev, "No IRQ support for %s bank\n", np->full_name);
> +		dev_info(dev, "No IRQ support for %pOF bank\n", np);
>  	}
> 
>  	return 0;
> diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c
> index edfba506e958..09d35006acb2 100644
> --- a/drivers/pinctrl/pinctrl-tb10x.c
> +++ b/drivers/pinctrl/pinctrl-tb10x.c
> @@ -557,8 +557,8 @@ static int tb10x_dt_node_to_map(struct pinctrl_dev *pctl,
>  	int ret = 0;
> 
>  	if (of_property_read_string(np_config, "abilis,function", &string)) {
> -		pr_err("%s: No abilis,function property in device tree.\n",
> -			np_config->full_name);
> +		pr_err("%pOF: No abilis,function property in device tree.\n",
> +			np_config);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index f542642eed8d..20b59bb02196 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -679,7 +679,7 @@ static int samsung_pinctrl_create_function(struct device *dev,
> 
>  	npins = of_property_count_strings(func_np, "samsung,pins");
>  	if (npins < 1) {
> -		dev_err(dev, "invalid pin list in %s node", func_np->name);
> +		dev_err(dev, "invalid pin list in %pOFn node", func_np);
>  		return -EINVAL;
>  	}
> 
> @@ -696,8 +696,8 @@ static int samsung_pinctrl_create_function(struct device *dev,
>  							i, &gname);
>  		if (ret) {
>  			dev_err(dev,
> -				"failed to read pin name %d from %s node\n",
> -				i, func_np->name);
> +				"failed to read pin name %d from %pOFn node\n",
> +				i, func_np);
>  			return ret;
>  		}
> 
> diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
> index a70157f0acf4..e7a92eec06c2 100644
> --- a/drivers/pinctrl/sh-pfc/pinctrl.c
> +++ b/drivers/pinctrl/sh-pfc/pinctrl.c
> @@ -290,7 +290,7 @@ static int sh_pfc_dt_node_to_map(struct pinctrl_dev *pctldev,
>  	if (*num_maps)
>  		return 0;
> 
> -	dev_err(dev, "no mapping found in node %s\n", np->full_name);
> +	dev_err(dev, "no mapping found in node %pOF\n", np);
>  	ret = -EINVAL;
> 
>  done:
> diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
> index 0df72be60704..80bfd4719199 100644
> --- a/drivers/pinctrl/sirf/pinctrl-sirf.c
> +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
> @@ -810,7 +810,7 @@ static int sirfsoc_gpio_probe(struct device_node *np)
>  	sgpio->chip.gc.set = sirfsoc_gpio_set_value;
>  	sgpio->chip.gc.base = 0;
>  	sgpio->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE * SIRFSOC_GPIO_NO_OF_BANKS;
> -	sgpio->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
> +	sgpio->chip.gc.label = kasprintf(GFP_KERNEL, "%pOF", np);
>  	sgpio->chip.gc.of_node = np;
>  	sgpio->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
>  	sgpio->chip.gc.of_gpio_n_cells = 2;
> @@ -819,8 +819,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
> 
>  	err = gpiochip_add_data(&sgpio->chip.gc, sgpio);
>  	if (err) {
> -		dev_err(&pdev->dev, "%s: error in probe function with status %d\n",
> -			np->full_name, err);
> +		dev_err(&pdev->dev, "%pOF: error in probe function with status %d\n",
> +			np, err);
>  		goto out;
>  	}
> 
> --
> 2.11.0
> 


From maxime.ripard at free-electrons.com  Tue Jul 18 23:20:34 2017
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Wed, 19 Jul 2017 06:20:34 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-30-robh@kernel.org>
References: <20170718214339.7774-30-robh@kernel.org>
Message-ID: <20170719062006.hivodv3zppq6swdo@flea>

On Tue, Jul 18, 2017 at 04:43:10PM -0500, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Jason Cooper <jason at lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Baruch Siach <baruch at tkos.co.il>
> Cc: Vladimir Zapolskiy <vz at mleia.com>
> Cc: Sylvain Lemieux <slemieux.tyco at gmail.com>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue at st.com>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: Jonathan Hunter <jonathanh at nvidia.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann at xilinx.com>
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-tegra at vger.kernel.org
> ---
>  drivers/irqchip/irq-bcm2835.c            |  9 ++++-----
>  drivers/irqchip/irq-bcm2836.c            |  5 ++---
>  drivers/irqchip/irq-crossbar.c           |  6 +++---
>  drivers/irqchip/irq-digicolor.c          |  8 ++++----
>  drivers/irqchip/irq-dw-apb-ictl.c        | 12 ++++++------
>  drivers/irqchip/irq-gic-v3-its-pci-msi.c |  2 +-
>  drivers/irqchip/irq-gic-v3-its.c         |  6 +++---
>  drivers/irqchip/irq-gic-v3.c             | 11 ++++-------
>  drivers/irqchip/irq-imx-gpcv2.c          |  4 ++--
>  drivers/irqchip/irq-lpc32xx.c            |  2 +-
>  drivers/irqchip/irq-mtk-sysirq.c         |  3 +--
>  drivers/irqchip/irq-mxs.c                |  4 ++--
>  drivers/irqchip/irq-stm32-exti.c         |  8 ++++----
>  drivers/irqchip/irq-sun4i.c              |  6 +++---

for sun4i:
Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20170719/bec97007/attachment.sig>

From patrice.chotard at st.com  Wed Jul 19 00:06:02 2017
From: patrice.chotard at st.com (Patrice CHOTARD)
Date: Wed, 19 Jul 2017 07:06:02 -0000
Subject: [PATCH] pinctrl: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-43-robh@kernel.org>
References: <20170718214339.7774-43-robh@kernel.org>
Message-ID: <a9fa7f8b-49f8-1e76-8504-5a63dd65d3b1@st.com>



On 07/18/2017 11:43 PM, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Ludovic Desroches <ludovic.desroches at microchip.com>
> Cc: Patrice Chotard <patrice.chotard at st.com>
> Cc: Tomasz Figa <tomasz.figa at gmail.com>
> Cc: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Geert Uytterhoeven <geert+renesas at glider.be>
> Cc: Barry Song <baohua at kernel.org>
> Cc: linux-gpio at vger.kernel.org
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: kernel at stlinux.com
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>   drivers/pinctrl/bcm/pinctrl-bcm2835.c     | 25 +++++++++++--------------
>   drivers/pinctrl/devicetree.c              |  4 ++--
>   drivers/pinctrl/freescale/pinctrl-imx.c   |  8 +++-----
>   drivers/pinctrl/pinconf-generic.c         |  7 +++----
>   drivers/pinctrl/pinctrl-at91-pio4.c       | 11 +++++------
>   drivers/pinctrl/pinctrl-st.c              |  2 +-
>   drivers/pinctrl/pinctrl-tb10x.c           |  4 ++--
>   drivers/pinctrl/samsung/pinctrl-samsung.c |  6 +++---
>   drivers/pinctrl/sh-pfc/pinctrl.c          |  2 +-
>   drivers/pinctrl/sirf/pinctrl-sirf.c       |  6 +++---
>   10 files changed, 34 insertions(+), 41 deletions(-)
> 
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 230883168e99..3e71e5d782ee 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -692,8 +692,7 @@ static int bcm2835_pctl_dt_node_to_map_func(struct bcm2835_pinctrl *pc,
>   	struct pinctrl_map *map = *maps;
> 
>   	if (fnum >= ARRAY_SIZE(bcm2835_functions)) {
> -		dev_err(pc->dev, "%s: invalid brcm,function %d\n",
> -			of_node_full_name(np), fnum);
> +		dev_err(pc->dev, "%pOF: invalid brcm,function %d\n", np, fnum);
>   		return -EINVAL;
>   	}
> 
> @@ -713,8 +712,7 @@ static int bcm2835_pctl_dt_node_to_map_pull(struct bcm2835_pinctrl *pc,
>   	unsigned long *configs;
> 
>   	if (pull > 2) {
> -		dev_err(pc->dev, "%s: invalid brcm,pull %d\n",
> -			of_node_full_name(np), pull);
> +		dev_err(pc->dev, "%pOF: invalid brcm,pull %d\n", np, pull);
>   		return -EINVAL;
>   	}
> 
> @@ -745,8 +743,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>   	pins = of_find_property(np, "brcm,pins", NULL);
>   	if (!pins) {
> -		dev_err(pc->dev, "%s: missing brcm,pins property\n",
> -				of_node_full_name(np));
> +		dev_err(pc->dev, "%pOF: missing brcm,pins property\n", np);
>   		return -EINVAL;
>   	}
> 
> @@ -755,8 +752,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>   	if (!funcs && !pulls) {
>   		dev_err(pc->dev,
> -			"%s: neither brcm,function nor brcm,pull specified\n",
> -			of_node_full_name(np));
> +			"%pOF: neither brcm,function nor brcm,pull specified\n",
> +			np);
>   		return -EINVAL;
>   	}
> 
> @@ -766,15 +763,15 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>   	if (num_funcs > 1 && num_funcs != num_pins) {
>   		dev_err(pc->dev,
> -			"%s: brcm,function must have 1 or %d entries\n",
> -			of_node_full_name(np), num_pins);
> +			"%pOF: brcm,function must have 1 or %d entries\n",
> +			np, num_pins);
>   		return -EINVAL;
>   	}
> 
>   	if (num_pulls > 1 && num_pulls != num_pins) {
>   		dev_err(pc->dev,
> -			"%s: brcm,pull must have 1 or %d entries\n",
> -			of_node_full_name(np), num_pins);
> +			"%pOF: brcm,pull must have 1 or %d entries\n",
> +			np, num_pins);
>   		return -EINVAL;
>   	}
> 
> @@ -793,8 +790,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
>   		if (err)
>   			goto out;
>   		if (pin >= ARRAY_SIZE(bcm2835_gpio_pins)) {
> -			dev_err(pc->dev, "%s: invalid brcm,pins value %d\n",
> -				of_node_full_name(np), pin);
> +			dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n",
> +				np, pin);
>   			err = -EINVAL;
>   			goto out;
>   		}
> diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
> index 0e5c9f14a706..0a20afc2210c 100644
> --- a/drivers/pinctrl/devicetree.c
> +++ b/drivers/pinctrl/devicetree.c
> @@ -117,8 +117,8 @@ static int dt_to_map_one_config(struct pinctrl *p,
>   	for (;;) {
>   		np_pctldev = of_get_next_parent(np_pctldev);
>   		if (!np_pctldev || of_node_is_root(np_pctldev)) {
> -			dev_info(p->dev, "could not find pctldev for node %s, deferring probe\n",
> -				np_config->full_name);
> +			dev_info(p->dev, "could not find pctldev for node %pOF, deferring probe\n",
> +				np_config);
>   			of_node_put(np_pctldev);
>   			/* OK let's just assume this will appear later then */
>   			return -EPROBE_DEFER;
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
> index 72aca758f4c6..1f0095a69407 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> @@ -573,16 +573,14 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
>   		list = of_get_property(np, "pins", &size);
>   		if (!list) {
>   			dev_err(info->dev,
> -				"no fsl,pins and pins property in node %s\n",
> -				np->full_name);
> +				"no fsl,pins and pins property in node %pOF\n", np);
>   			return -EINVAL;
>   		}
>   	}
> 
>   	/* we do not check return since it's safe node passed down */
>   	if (!size || size % pin_size) {
> -		dev_err(info->dev, "Invalid fsl,pins or pins property in node %s\n",
> -			np->full_name);
> +		dev_err(info->dev, "Invalid fsl,pins or pins property in node %pOF\n", np);
>   		return -EINVAL;
>   	}
> 
> @@ -666,7 +664,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
>   	func->name = np->name;
>   	func->num_group_names = of_get_child_count(np);
>   	if (func->num_group_names == 0) {
> -		dev_err(info->dev, "no groups defined in %s\n", np->full_name);
> +		dev_err(info->dev, "no groups defined in %pOF\n", np);
>   		return -EINVAL;
>   	}
>   	func->group_names = devm_kcalloc(info->dev, func->num_group_names,
> diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
> index fc0c230aa11f..4cf901c78130 100644
> --- a/drivers/pinctrl/pinconf-generic.c
> +++ b/drivers/pinctrl/pinconf-generic.c
> @@ -316,16 +316,15 @@ int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>   	if (ret < 0) {
>   		/* EINVAL=missing, which is fine since it's optional */
>   		if (ret != -EINVAL)
> -			dev_err(dev, "%s: could not parse property function\n",
> -				of_node_full_name(np));
> +			dev_err(dev, "%pOF: could not parse property function\n",
> +				np);
>   		function = NULL;
>   	}
> 
>   	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>   					      &num_configs);
>   	if (ret < 0) {
> -		dev_err(dev, "%s: could not parse node property\n",
> -			of_node_full_name(np));
> +		dev_err(dev, "%pOF: could not parse node property\n", np);
>   		return ret;
>   	}
> 
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index dc8591543dee..b1ca838dd80a 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -494,8 +494,8 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>   	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>   					      &num_configs);
>   	if (ret < 0) {
> -		dev_err(pctldev->dev, "%s: could not parse node property\n",
> -			of_node_full_name(np));
> +		dev_err(pctldev->dev, "%pOF: could not parse node property\n",
> +			np);
>   		return ret;
>   	}
> 
> @@ -504,8 +504,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
> 
>   	num_pins = pins->length / sizeof(u32);
>   	if (!num_pins) {
> -		dev_err(pctldev->dev, "no pins found in node %s\n",
> -			of_node_full_name(np));
> +		dev_err(pctldev->dev, "no pins found in node %pOF\n", np);
>   		ret = -EINVAL;
>   		goto exit;
>   	}
> @@ -584,8 +583,8 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
> 
>   	if (ret < 0) {
>   		pinctrl_utils_free_map(pctldev, *map, *num_maps);
> -		dev_err(pctldev->dev, "can't create maps for node %s\n",
> -			np_config->full_name);
> +		dev_err(pctldev->dev, "can't create maps for node %pOF\n",
> +			np_config);
>   	}
> 
>   	return ret;
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 3ae8066bc127..1703977de7cf 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1537,7 +1537,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
>   			return err;
>   		}
>   	} else {
> -		dev_info(dev, "No IRQ support for %s bank\n", np->full_name);
> +		dev_info(dev, "No IRQ support for %pOF bank\n", np);
>   	}
> 
>   	return 0;
> diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c
> index edfba506e958..09d35006acb2 100644
> --- a/drivers/pinctrl/pinctrl-tb10x.c
> +++ b/drivers/pinctrl/pinctrl-tb10x.c
> @@ -557,8 +557,8 @@ static int tb10x_dt_node_to_map(struct pinctrl_dev *pctl,
>   	int ret = 0;
> 
>   	if (of_property_read_string(np_config, "abilis,function", &string)) {
> -		pr_err("%s: No abilis,function property in device tree.\n",
> -			np_config->full_name);
> +		pr_err("%pOF: No abilis,function property in device tree.\n",
> +			np_config);
>   		return -EINVAL;
>   	}
> 
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index f542642eed8d..20b59bb02196 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -679,7 +679,7 @@ static int samsung_pinctrl_create_function(struct device *dev,
> 
>   	npins = of_property_count_strings(func_np, "samsung,pins");
>   	if (npins < 1) {
> -		dev_err(dev, "invalid pin list in %s node", func_np->name);
> +		dev_err(dev, "invalid pin list in %pOFn node", func_np);
>   		return -EINVAL;
>   	}
> 
> @@ -696,8 +696,8 @@ static int samsung_pinctrl_create_function(struct device *dev,
>   							i, &gname);
>   		if (ret) {
>   			dev_err(dev,
> -				"failed to read pin name %d from %s node\n",
> -				i, func_np->name);
> +				"failed to read pin name %d from %pOFn node\n",
> +				i, func_np);
>   			return ret;
>   		}
> 
> diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
> index a70157f0acf4..e7a92eec06c2 100644
> --- a/drivers/pinctrl/sh-pfc/pinctrl.c
> +++ b/drivers/pinctrl/sh-pfc/pinctrl.c
> @@ -290,7 +290,7 @@ static int sh_pfc_dt_node_to_map(struct pinctrl_dev *pctldev,
>   	if (*num_maps)
>   		return 0;
> 
> -	dev_err(dev, "no mapping found in node %s\n", np->full_name);
> +	dev_err(dev, "no mapping found in node %pOF\n", np);
>   	ret = -EINVAL;
> 
>   done:
> diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
> index 0df72be60704..80bfd4719199 100644
> --- a/drivers/pinctrl/sirf/pinctrl-sirf.c
> +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
> @@ -810,7 +810,7 @@ static int sirfsoc_gpio_probe(struct device_node *np)
>   	sgpio->chip.gc.set = sirfsoc_gpio_set_value;
>   	sgpio->chip.gc.base = 0;
>   	sgpio->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE * SIRFSOC_GPIO_NO_OF_BANKS;
> -	sgpio->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
> +	sgpio->chip.gc.label = kasprintf(GFP_KERNEL, "%pOF", np);
>   	sgpio->chip.gc.of_node = np;
>   	sgpio->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
>   	sgpio->chip.gc.of_gpio_n_cells = 2;
> @@ -819,8 +819,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
> 
>   	err = gpiochip_add_data(&sgpio->chip.gc, sgpio);
>   	if (err) {
> -		dev_err(&pdev->dev, "%s: error in probe function with status %d\n",
> -			np->full_name, err);
> +		dev_err(&pdev->dev, "%pOF: error in probe function with status %d\n",
> +			np, err);
>   		goto out;
>   	}
> 
> --
> 2.11.0
> 
For ST pinctrl:

Acked-by: Patrice Chotard <patrice.chotard at st.com>

Thanks

From geert at linux-m68k.org  Wed Jul 19 00:38:21 2017
From: geert at linux-m68k.org (Geert Uytterhoeven)
Date: Wed, 19 Jul 2017 07:38:21 -0000
Subject: [PATCH] pinctrl: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-43-robh@kernel.org>
References: <20170718214339.7774-43-robh@kernel.org>
Message-ID: <CAMuHMdXsmcN892-2qxx5W7LX976ARbPH33bWDZ5mTO_PPXL2kg@mail.gmail.com>

On Tue, Jul 18, 2017 at 11:43 PM, Rob Herring <robh at kernel.org> wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
>
> Signed-off-by: Rob Herring <robh at kernel.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas at glider.be>

>  drivers/pinctrl/sh-pfc/pinctrl.c          |  2 +-

For the sh-pfc part:
Acked-by: Geert Uytterhoeven <geert+renesas at glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


From alexandre.torgue at st.com  Wed Jul 19 02:43:29 2017
From: alexandre.torgue at st.com (Alexandre Torgue)
Date: Wed, 19 Jul 2017 09:43:29 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-30-robh@kernel.org>
References: <20170718214339.7774-30-robh@kernel.org>
Message-ID: <d07ba1b0-054e-3c29-4502-f539f9903a5a@st.com>



On 07/18/2017 11:43 PM, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Jason Cooper <jason at lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Baruch Siach <baruch at tkos.co.il>
> Cc: Vladimir Zapolskiy <vz at mleia.com>
> Cc: Sylvain Lemieux <slemieux.tyco at gmail.com>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue at st.com>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: Jonathan Hunter <jonathanh at nvidia.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann at xilinx.com>
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-tegra at vger.kernel.org
> ---
>   drivers/irqchip/irq-bcm2835.c            |  9 ++++-----
>   drivers/irqchip/irq-bcm2836.c            |  5 ++---
>   drivers/irqchip/irq-crossbar.c           |  6 +++---
>   drivers/irqchip/irq-digicolor.c          |  8 ++++----
>   drivers/irqchip/irq-dw-apb-ictl.c        | 12 ++++++------
>   drivers/irqchip/irq-gic-v3-its-pci-msi.c |  2 +-
>   drivers/irqchip/irq-gic-v3-its.c         |  6 +++---
>   drivers/irqchip/irq-gic-v3.c             | 11 ++++-------
>   drivers/irqchip/irq-imx-gpcv2.c          |  4 ++--
>   drivers/irqchip/irq-lpc32xx.c            |  2 +-
>   drivers/irqchip/irq-mtk-sysirq.c         |  3 +--
>   drivers/irqchip/irq-mxs.c                |  4 ++--
>   drivers/irqchip/irq-stm32-exti.c         |  8 ++++----
>   drivers/irqchip/irq-sun4i.c              |  6 +++---
>   drivers/irqchip/irq-tegra.c              | 16 ++++++++--------
>   drivers/irqchip/irq-xilinx-intc.c        |  4 ++--
>   16 files changed, 50 insertions(+), 56 deletions(-)

For irq-stm32-exti.c:

Acked-by: Alexandre TORGUE <alexandre.torgue at st.com>

Regards
Alex

> 
> diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c
> index 44d7c38dde47..d2da8a1e6b1b 100644
> --- a/drivers/irqchip/irq-bcm2835.c
> +++ b/drivers/irqchip/irq-bcm2835.c
> @@ -147,13 +147,12 @@ static int __init armctrl_of_init(struct device_node *node,
> 
>   	base = of_iomap(node, 0);
>   	if (!base)
> -		panic("%s: unable to map IC registers\n",
> -			node->full_name);
> +		panic("%pOF: unable to map IC registers\n", node);
> 
>   	intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0),
>   			&armctrl_ops, NULL);
>   	if (!intc.domain)
> -		panic("%s: unable to create IRQ domain\n", node->full_name);
> +		panic("%pOF: unable to create IRQ domain\n", node);
> 
>   	for (b = 0; b < NR_BANKS; b++) {
>   		intc.pending[b] = base + reg_pending[b];
> @@ -173,8 +172,8 @@ static int __init armctrl_of_init(struct device_node *node,
>   		int parent_irq = irq_of_parse_and_map(node, 0);
> 
>   		if (!parent_irq) {
> -			panic("%s: unable to get parent interrupt.\n",
> -			      node->full_name);
> +			panic("%pOF: unable to get parent interrupt.\n",
> +			      node);
>   		}
>   		irq_set_chained_handler(parent_irq, bcm2836_chained_handle_irq);
>   	} else {
> diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c
> index e7463e3c0814..dc8c1e3eafe7 100644
> --- a/drivers/irqchip/irq-bcm2836.c
> +++ b/drivers/irqchip/irq-bcm2836.c
> @@ -282,8 +282,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
>   {
>   	intc.base = of_iomap(node, 0);
>   	if (!intc.base) {
> -		panic("%s: unable to map local interrupt registers\n",
> -			node->full_name);
> +		panic("%pOF: unable to map local interrupt registers\n", node);
>   	}
> 
>   	bcm2835_init_local_timer_frequency();
> @@ -292,7 +291,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
>   					    &bcm2836_arm_irqchip_intc_ops,
>   					    NULL);
>   	if (!intc.domain)
> -		panic("%s: unable to create IRQ domain\n", node->full_name);
> +		panic("%pOF: unable to create IRQ domain\n", node);
> 
>   	bcm2836_arm_irqchip_register_irq(LOCAL_IRQ_CNTPSIRQ,
>   					 &bcm2836_arm_irqchip_timer);
> diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c
> index f96601268f71..99d97d7e3fd7 100644
> --- a/drivers/irqchip/irq-crossbar.c
> +++ b/drivers/irqchip/irq-crossbar.c
> @@ -341,13 +341,13 @@ static int __init irqcrossbar_init(struct device_node *node,
>   	int err;
> 
>   	if (!parent) {
> -		pr_err("%s: no parent, giving up\n", node->full_name);
> +		pr_err("%pOF: no parent, giving up\n", node);
>   		return -ENODEV;
>   	}
> 
>   	parent_domain = irq_find_host(parent);
>   	if (!parent_domain) {
> -		pr_err("%s: unable to obtain parent domain\n", node->full_name);
> +		pr_err("%pOF: unable to obtain parent domain\n", node);
>   		return -ENXIO;
>   	}
> 
> @@ -360,7 +360,7 @@ static int __init irqcrossbar_init(struct device_node *node,
>   					  node, &crossbar_domain_ops,
>   					  NULL);
>   	if (!domain) {
> -		pr_err("%s: failed to allocated domain\n", node->full_name);
> +		pr_err("%pOF: failed to allocated domain\n", node);
>   		return -ENOMEM;
>   	}
> 
> diff --git a/drivers/irqchip/irq-digicolor.c b/drivers/irqchip/irq-digicolor.c
> index dad85e74c37c..df5752cfbc09 100644
> --- a/drivers/irqchip/irq-digicolor.c
> +++ b/drivers/irqchip/irq-digicolor.c
> @@ -78,7 +78,7 @@ static int __init digicolor_of_init(struct device_node *node,
> 
>   	reg_base = of_iomap(node, 0);
>   	if (!reg_base) {
> -		pr_err("%s: unable to map IC registers\n", node->full_name);
> +		pr_err("%pOF: unable to map IC registers\n", node);
>   		return -ENXIO;
>   	}
> 
> @@ -88,7 +88,7 @@ static int __init digicolor_of_init(struct device_node *node,
> 
>   	ucregs = syscon_regmap_lookup_by_phandle(node, "syscon");
>   	if (IS_ERR(ucregs)) {
> -		pr_err("%s: unable to map UC registers\n", node->full_name);
> +		pr_err("%pOF: unable to map UC registers\n", node);
>   		return PTR_ERR(ucregs);
>   	}
>   	/* channel 1, regular IRQs */
> @@ -97,7 +97,7 @@ static int __init digicolor_of_init(struct device_node *node,
>   	digicolor_irq_domain =
>   		irq_domain_add_linear(node, 64, &irq_generic_chip_ops, NULL);
>   	if (!digicolor_irq_domain) {
> -		pr_err("%s: unable to create IRQ domain\n", node->full_name);
> +		pr_err("%pOF: unable to create IRQ domain\n", node);
>   		return -ENOMEM;
>   	}
> 
> @@ -105,7 +105,7 @@ static int __init digicolor_of_init(struct device_node *node,
>   					     "digicolor_irq", handle_level_irq,
>   					     clr, 0, 0);
>   	if (ret) {
> -		pr_err("%s: unable to allocate IRQ gc\n", node->full_name);
> +		pr_err("%pOF: unable to allocate IRQ gc\n", node);
>   		return ret;
>   	}
> 
> diff --git a/drivers/irqchip/irq-dw-apb-ictl.c b/drivers/irqchip/irq-dw-apb-ictl.c
> index 052f266364c0..0a19618ce2c8 100644
> --- a/drivers/irqchip/irq-dw-apb-ictl.c
> +++ b/drivers/irqchip/irq-dw-apb-ictl.c
> @@ -79,24 +79,24 @@ static int __init dw_apb_ictl_init(struct device_node *np,
>   	/* Map the parent interrupt for the chained handler */
>   	irq = irq_of_parse_and_map(np, 0);
>   	if (irq <= 0) {
> -		pr_err("%s: unable to parse irq\n", np->full_name);
> +		pr_err("%pOF: unable to parse irq\n", np);
>   		return -EINVAL;
>   	}
> 
>   	ret = of_address_to_resource(np, 0, &r);
>   	if (ret) {
> -		pr_err("%s: unable to get resource\n", np->full_name);
> +		pr_err("%pOF: unable to get resource\n", np);
>   		return ret;
>   	}
> 
>   	if (!request_mem_region(r.start, resource_size(&r), np->full_name)) {
> -		pr_err("%s: unable to request mem region\n", np->full_name);
> +		pr_err("%pOF: unable to request mem region\n", np);
>   		return -ENOMEM;
>   	}
> 
>   	iobase = ioremap(r.start, resource_size(&r));
>   	if (!iobase) {
> -		pr_err("%s: unable to map resource\n", np->full_name);
> +		pr_err("%pOF: unable to map resource\n", np);
>   		ret = -ENOMEM;
>   		goto err_release;
>   	}
> @@ -123,7 +123,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
>   	domain = irq_domain_add_linear(np, nrirqs,
>   				       &irq_generic_chip_ops, NULL);
>   	if (!domain) {
> -		pr_err("%s: unable to add irq domain\n", np->full_name);
> +		pr_err("%pOF: unable to add irq domain\n", np);
>   		ret = -ENOMEM;
>   		goto err_unmap;
>   	}
> @@ -132,7 +132,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
>   					     handle_level_irq, clr, 0,
>   					     IRQ_GC_INIT_MASK_CACHE);
>   	if (ret) {
> -		pr_err("%s: unable to alloc irq domain gc\n", np->full_name);
> +		pr_err("%pOF: unable to alloc irq domain gc\n", np);
>   		goto err_unmap;
>   	}
> 
> diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
> index 77931214d954..14a8c0a7e095 100644
> --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
> +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
> @@ -138,7 +138,7 @@ static int __init its_pci_of_msi_init(void)
>   		if (its_pci_msi_init_one(of_node_to_fwnode(np), np->full_name))
>   			continue;
> 
> -		pr_info("PCI/MSI: %s domain created\n", np->full_name);
> +		pr_info("PCI/MSI: %pOF domain created\n", np);
>   	}
> 
>   	return 0;
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 68932873eebc..62298ee360bc 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -1816,13 +1816,13 @@ static int __init its_of_probe(struct device_node *node)
>   	for (np = of_find_matching_node(node, its_device_id); np;
>   	     np = of_find_matching_node(np, its_device_id)) {
>   		if (!of_property_read_bool(np, "msi-controller")) {
> -			pr_warn("%s: no msi-controller property, ITS ignored\n",
> -				np->full_name);
> +			pr_warn("%pOF: no msi-controller property, ITS ignored\n",
> +				np);
>   			continue;
>   		}
> 
>   		if (of_address_to_resource(np, 0, &res)) {
> -			pr_warn("%s: no regs?\n", np->full_name);
> +			pr_warn("%pOF: no regs?\n", np);
>   			continue;
>   		}
> 
> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
> index dbffb7ab6203..afae0a9d0df9 100644
> --- a/drivers/irqchip/irq-gic-v3.c
> +++ b/drivers/irqchip/irq-gic-v3.c
> @@ -1057,7 +1057,7 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node)
>   			if (WARN_ON(cpu == -1))
>   				continue;
> 
> -			pr_cont("%s[%d] ", cpu_node->full_name, cpu);
> +			pr_cont("%pOF[%d] ", cpu_node, cpu);
> 
>   			cpumask_set_cpu(cpu, &part->mask);
>   		}
> @@ -1125,15 +1125,13 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
> 
>   	dist_base = of_iomap(node, 0);
>   	if (!dist_base) {
> -		pr_err("%s: unable to map gic dist registers\n",
> -			node->full_name);
> +		pr_err("%pOF: unable to map gic dist registers\n", node);
>   		return -ENXIO;
>   	}
> 
>   	err = gic_validate_dist_version(dist_base);
>   	if (err) {
> -		pr_err("%s: no distributor detected, giving up\n",
> -			node->full_name);
> +		pr_err("%pOF: no distributor detected, giving up\n", node);
>   		goto out_unmap_dist;
>   	}
> 
> @@ -1153,8 +1151,7 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
>   		ret = of_address_to_resource(node, 1 + i, &res);
>   		rdist_regs[i].redist_base = of_iomap(node, 1 + i);
>   		if (ret || !rdist_regs[i].redist_base) {
> -			pr_err("%s: couldn't map region %d\n",
> -			       node->full_name, i);
> +			pr_err("%pOF: couldn't map region %d\n", node, i);
>   			err = -ENODEV;
>   			goto out_unmap_rdist;
>   		}
> diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c
> index bb36f572e322..675eda5ff2b8 100644
> --- a/drivers/irqchip/irq-imx-gpcv2.c
> +++ b/drivers/irqchip/irq-imx-gpcv2.c
> @@ -214,13 +214,13 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
>   	int i;
> 
>   	if (!parent) {
> -		pr_err("%s: no parent, giving up\n", node->full_name);
> +		pr_err("%pOF: no parent, giving up\n", node);
>   		return -ENODEV;
>   	}
> 
>   	parent_domain = irq_find_host(parent);
>   	if (!parent_domain) {
> -		pr_err("%s: unable to get parent domain\n", node->full_name);
> +		pr_err("%pOF: unable to get parent domain\n", node);
>   		return -ENXIO;
>   	}
> 
> diff --git a/drivers/irqchip/irq-lpc32xx.c b/drivers/irqchip/irq-lpc32xx.c
> index 1034aeb2e98a..a48357d369b5 100644
> --- a/drivers/irqchip/irq-lpc32xx.c
> +++ b/drivers/irqchip/irq-lpc32xx.c
> @@ -191,7 +191,7 @@ static int __init lpc32xx_of_ic_init(struct device_node *node,
> 
>   	irqc->base = of_iomap(node, 0);
>   	if (!irqc->base) {
> -		pr_err("%s: unable to map registers\n", node->full_name);
> +		pr_err("%pOF: unable to map registers\n", node);
>   		kfree(irqc);
>   		return -EINVAL;
>   	}
> diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
> index eeac512ec5a8..90aaf190157f 100644
> --- a/drivers/irqchip/irq-mtk-sysirq.c
> +++ b/drivers/irqchip/irq-mtk-sysirq.c
> @@ -178,8 +178,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
>   		chip_data->intpol_words[i] = size / 4;
>   		chip_data->intpol_bases[i] = of_iomap(node, i);
>   		if (ret || !chip_data->intpol_bases[i]) {
> -			pr_err("%s: couldn't map region %d\n",
> -			       node->full_name, i);
> +			pr_err("%pOF: couldn't map region %d\n", node, i);
>   			ret = -ENODEV;
>   			goto out_free_intpol;
>   		}
> diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
> index 05fa9f7af53c..e8b31f52e071 100644
> --- a/drivers/irqchip/irq-mxs.c
> +++ b/drivers/irqchip/irq-mxs.c
> @@ -179,7 +179,7 @@ static void __init icoll_add_domain(struct device_node *np,
>   					     &icoll_irq_domain_ops, NULL);
> 
>   	if (!icoll_domain)
> -		panic("%s: unable to create irq domain", np->full_name);
> +		panic("%pOF: unable to create irq domain", np);
>   }
> 
>   static void __iomem * __init icoll_init_iobase(struct device_node *np)
> @@ -188,7 +188,7 @@ static void __iomem * __init icoll_init_iobase(struct device_node *np)
> 
>   	icoll_base = of_io_request_and_map(np, 0, np->name);
>   	if (IS_ERR(icoll_base))
> -		panic("%s: unable to map resource", np->full_name);
> +		panic("%pOF: unable to map resource", np);
>   	return icoll_base;
>   }
> 
> diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
> index 491568c95aa5..45363ff8d06f 100644
> --- a/drivers/irqchip/irq-stm32-exti.c
> +++ b/drivers/irqchip/irq-stm32-exti.c
> @@ -140,7 +140,7 @@ static int __init stm32_exti_init(struct device_node *node,
> 
>   	base = of_iomap(node, 0);
>   	if (!base) {
> -		pr_err("%s: Unable to map registers\n", node->full_name);
> +		pr_err("%pOF: Unable to map registers\n", node);
>   		return -ENOMEM;
>   	}
> 
> @@ -149,7 +149,7 @@ static int __init stm32_exti_init(struct device_node *node,
>   	nr_exti = fls(readl_relaxed(base + EXTI_RTSR));
>   	writel_relaxed(0, base + EXTI_RTSR);
> 
> -	pr_info("%s: %d External IRQs detected\n", node->full_name, nr_exti);
> +	pr_info("%pOF: %d External IRQs detected\n", node, nr_exti);
> 
>   	domain = irq_domain_add_linear(node, nr_exti,
>   				       &irq_exti_domain_ops, NULL);
> @@ -163,8 +163,8 @@ static int __init stm32_exti_init(struct device_node *node,
>   	ret = irq_alloc_domain_generic_chips(domain, nr_exti, 1, "exti",
>   					     handle_edge_irq, clr, 0, 0);
>   	if (ret) {
> -		pr_err("%s: Could not allocate generic interrupt chip.\n",
> -			node->full_name);
> +		pr_err("%pOF: Could not allocate generic interrupt chip.\n",
> +			node);
>   		goto out_free_domain;
>   	}
> 
> diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
> index 376b28074e0d..e3e5b9132b75 100644
> --- a/drivers/irqchip/irq-sun4i.c
> +++ b/drivers/irqchip/irq-sun4i.c
> @@ -97,8 +97,8 @@ static int __init sun4i_of_init(struct device_node *node,
>   {
>   	sun4i_irq_base = of_iomap(node, 0);
>   	if (!sun4i_irq_base)
> -		panic("%s: unable to map IC registers\n",
> -			node->full_name);
> +		panic("%pOF: unable to map IC registers\n",
> +			node);
> 
>   	/* Disable all interrupts */
>   	writel(0, sun4i_irq_base + SUN4I_IRQ_ENABLE_REG(0));
> @@ -124,7 +124,7 @@ static int __init sun4i_of_init(struct device_node *node,
>   	sun4i_irq_domain = irq_domain_add_linear(node, 3 * 32,
>   						 &sun4i_irq_ops, NULL);
>   	if (!sun4i_irq_domain)
> -		panic("%s: unable to create IRQ domain\n", node->full_name);
> +		panic("%pOF: unable to create IRQ domain\n", node);
> 
>   	set_handle_irq(sun4i_handle_irq);
> 
> diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c
> index 3973a14bb15b..0abc0cd1c32e 100644
> --- a/drivers/irqchip/irq-tegra.c
> +++ b/drivers/irqchip/irq-tegra.c
> @@ -291,13 +291,13 @@ static int __init tegra_ictlr_init(struct device_node *node,
>   	int err;
> 
>   	if (!parent) {
> -		pr_err("%s: no parent, giving up\n", node->full_name);
> +		pr_err("%pOF: no parent, giving up\n", node);
>   		return -ENODEV;
>   	}
> 
>   	parent_domain = irq_find_host(parent);
>   	if (!parent_domain) {
> -		pr_err("%s: unable to obtain parent domain\n", node->full_name);
> +		pr_err("%pOF: unable to obtain parent domain\n", node);
>   		return -ENXIO;
>   	}
> 
> @@ -329,29 +329,29 @@ static int __init tegra_ictlr_init(struct device_node *node,
>   	}
> 
>   	if (!num_ictlrs) {
> -		pr_err("%s: no valid regions, giving up\n", node->full_name);
> +		pr_err("%pOF: no valid regions, giving up\n", node);
>   		err = -ENOMEM;
>   		goto out_free;
>   	}
> 
>   	WARN(num_ictlrs != soc->num_ictlrs,
> -	     "%s: Found %u interrupt controllers in DT; expected %u.\n",
> -	     node->full_name, num_ictlrs, soc->num_ictlrs);
> +	     "%pOF: Found %u interrupt controllers in DT; expected %u.\n",
> +	     node, num_ictlrs, soc->num_ictlrs);
> 
> 
>   	domain = irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32,
>   					  node, &tegra_ictlr_domain_ops,
>   					  lic);
>   	if (!domain) {
> -		pr_err("%s: failed to allocated domain\n", node->full_name);
> +		pr_err("%pOF: failed to allocated domain\n", node);
>   		err = -ENOMEM;
>   		goto out_unmap;
>   	}
> 
>   	tegra_ictlr_syscore_init();
> 
> -	pr_info("%s: %d interrupts forwarded to %s\n",
> -		node->full_name, num_ictlrs * 32, parent->full_name);
> +	pr_info("%pOF: %d interrupts forwarded to %pOF\n",
> +		node, num_ictlrs * 32, parent);
> 
>   	return 0;
> 
> diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c
> index 3db7ab1c9741..e3043ded8973 100644
> --- a/drivers/irqchip/irq-xilinx-intc.c
> +++ b/drivers/irqchip/irq-xilinx-intc.c
> @@ -186,8 +186,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
>   	if (irqc->intr_mask >> nr_irq)
>   		pr_warn("irq-xilinx: mismatch in kind-of-intr param\n");
> 
> -	pr_info("irq-xilinx: %s: num_irq=%d, edge=0x%x\n",
> -		intc->full_name, nr_irq, irqc->intr_mask);
> +	pr_info("irq-xilinx: %pOF: num_irq=%d, edge=0x%x\n",
> +		intc, nr_irq, irqc->intr_mask);
> 
> 
>   	/*
> --
> 2.11.0
> 


From matthias.bgg at gmail.com  Wed Jul 19 03:28:42 2017
From: matthias.bgg at gmail.com (Matthias Brugger)
Date: Wed, 19 Jul 2017 10:28:42 -0000
Subject: [PATCH] irqchip: Convert to using %pOF instead of full_name
In-Reply-To: <20170718214339.7774-30-robh@kernel.org>
References: <20170718214339.7774-30-robh@kernel.org>
Message-ID: <c9ed8340-2466-edd7-ca3e-2f446d41a946@gmail.com>



On 07/18/2017 11:43 PM, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Jason Cooper <jason at lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Stefan Wahren <stefan.wahren at i2se.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: Ray Jui <rjui at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: Baruch Siach <baruch at tkos.co.il>
> Cc: Vladimir Zapolskiy <vz at mleia.com>
> Cc: Sylvain Lemieux <slemieux.tyco at gmail.com>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue at st.com>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: Jonathan Hunter <jonathanh at nvidia.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann at xilinx.com>
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-tegra at vger.kernel.org
> ---
>   drivers/irqchip/irq-bcm2835.c            |  9 ++++-----
>   drivers/irqchip/irq-bcm2836.c            |  5 ++---
>   drivers/irqchip/irq-crossbar.c           |  6 +++---
>   drivers/irqchip/irq-digicolor.c          |  8 ++++----
>   drivers/irqchip/irq-dw-apb-ictl.c        | 12 ++++++------
>   drivers/irqchip/irq-gic-v3-its-pci-msi.c |  2 +-
>   drivers/irqchip/irq-gic-v3-its.c         |  6 +++---
>   drivers/irqchip/irq-gic-v3.c             | 11 ++++-------
>   drivers/irqchip/irq-imx-gpcv2.c          |  4 ++--
>   drivers/irqchip/irq-lpc32xx.c            |  2 +-
>   drivers/irqchip/irq-mtk-sysirq.c         |  3 +--

For mediatek:

Reviewed-by: Matthias Brugger <matthias.bgg at gmail.com>


From scott.branden at broadcom.com  Wed Jul 19 10:06:32 2017
From: scott.branden at broadcom.com (Scott Branden)
Date: Wed, 19 Jul 2017 17:06:32 -0000
Subject: [PATCH 0/2] arm64: dts: cleanup Broadcom boards per SoC
Message-ID: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>

Separate Broadcom boards per SoC to assist in cleaner management of boards.
This has already been done for Stingray and is done here for RPI and NS2.

If this is problematic for RPI please let me know and RPI patch can be
dropped from patch series.

Scott Branden (2):
  arm64: dts: move ns2 into northstar2 directory
  arm64: dts: move rpi into rpi directory

 arch/arm64/boot/dts/broadcom/Makefile                        | 7 +++----
 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi                | 1 -
 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi       | 1 -
 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi       | 1 -
 arch/arm64/boot/dts/broadcom/bcm283x.dtsi                    | 1 -
 arch/arm64/boot/dts/broadcom/northstar2/Makefile             | 6 ++++++
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-clock.dtsi | 0
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-svk.dts    | 0
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-xmc.dts    | 0
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2.dtsi       | 0
 arch/arm64/boot/dts/broadcom/rpi/Makefile                    | 5 +++++
 arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi            | 1 +
 arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837-rpi-3-b.dts   | 0
 arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837.dtsi          | 0
 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi   | 1 +
 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi   | 1 +
 arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi                | 1 +
 17 files changed, 18 insertions(+), 8 deletions(-)
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi
 create mode 100644 arch/arm64/boot/dts/broadcom/northstar2/Makefile
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-clock.dtsi (100%)
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-svk.dts (100%)
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-xmc.dts (100%)
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2.dtsi (100%)
 create mode 100644 arch/arm64/boot/dts/broadcom/rpi/Makefile
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi
 rename arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837-rpi-3-b.dts (100%)
 rename arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837.dtsi (100%)
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi

-- 
2.5.0



From scott.branden at broadcom.com  Wed Jul 19 10:06:46 2017
From: scott.branden at broadcom.com (Scott Branden)
Date: Wed, 19 Jul 2017 17:06:46 -0000
Subject: [PATCH 1/2] arm64: dts: move ns2 into northstar2 directory
In-Reply-To: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
References: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
Message-ID: <1500483950-9217-2-git-send-email-scott.branden@broadcom.com>

Place northstar2 into its own subdirectory.  This helps as the number
of Broadcom boards grow and we can separate them per SoC.

Signed-off-by: Scott Branden <scott.branden at broadcom.com>
---
 arch/arm64/boot/dts/broadcom/Makefile                        | 4 ++--
 arch/arm64/boot/dts/broadcom/northstar2/Makefile             | 6 ++++++
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-clock.dtsi | 0
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-svk.dts    | 0
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-xmc.dts    | 0
 arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2.dtsi       | 0
 6 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/broadcom/northstar2/Makefile
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-clock.dtsi (100%)
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-svk.dts (100%)
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-xmc.dts (100%)
 rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2.dtsi (100%)

diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index f11bdd6..3eaef38 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,7 +1,7 @@
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
-dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb ns2-xmc.dtb
 
-dts-dirs	:= stingray
+dts-dirs	+= northstar2
+dts-dirs	+= stingray
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
 clean-files	:= *.dtb
diff --git a/arch/arm64/boot/dts/broadcom/northstar2/Makefile b/arch/arm64/boot/dts/broadcom/northstar2/Makefile
new file mode 100644
index 0000000..e01a148
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/northstar2/Makefile
@@ -0,0 +1,6 @@
+dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb
+dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-xmc.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
diff --git a/arch/arm64/boot/dts/broadcom/ns2-clock.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2-clock.dtsi
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/ns2-clock.dtsi
rename to arch/arm64/boot/dts/broadcom/northstar2/ns2-clock.dtsi
diff --git a/arch/arm64/boot/dts/broadcom/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/ns2-svk.dts
rename to arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts
diff --git a/arch/arm64/boot/dts/broadcom/ns2-xmc.dts b/arch/arm64/boot/dts/broadcom/northstar2/ns2-xmc.dts
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/ns2-xmc.dts
rename to arch/arm64/boot/dts/broadcom/northstar2/ns2-xmc.dts
diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/ns2.dtsi
rename to arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
-- 
2.5.0



From scott.branden at broadcom.com  Wed Jul 19 10:06:51 2017
From: scott.branden at broadcom.com (Scott Branden)
Date: Wed, 19 Jul 2017 17:06:51 -0000
Subject: [PATCH 2/2] arm64: dts: move rpi into rpi directory
In-Reply-To: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
References: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
Message-ID: <1500483950-9217-3-git-send-email-scott.branden@broadcom.com>

Place rpi into its own subdirectory.  This helps as the number
of Broadcom boards grow and we can separate them per SoC.

Signed-off-by: Scott Branden <scott.branden at broadcom.com>
---
 arch/arm64/boot/dts/broadcom/Makefile                      | 3 +--
 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi              | 1 -
 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi     | 1 -
 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi     | 1 -
 arch/arm64/boot/dts/broadcom/bcm283x.dtsi                  | 1 -
 arch/arm64/boot/dts/broadcom/rpi/Makefile                  | 5 +++++
 arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi          | 1 +
 arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837-rpi-3-b.dts | 0
 arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837.dtsi        | 0
 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi | 1 +
 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi | 1 +
 arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi              | 1 +
 12 files changed, 10 insertions(+), 6 deletions(-)
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
 delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi
 create mode 100644 arch/arm64/boot/dts/broadcom/rpi/Makefile
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi
 rename arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837-rpi-3-b.dts (100%)
 rename arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837.dtsi (100%)
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi
 create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi

diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index 3eaef38..1708ff5 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,6 +1,5 @@
-dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
-
 dts-dirs	+= northstar2
+dts-dirs	+= rpi
 dts-dirs	+= stingray
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi b/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
deleted file mode 120000
index 3937b77..0000000
--- a/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm2835-rpi.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
deleted file mode 120000
index dca7c05..0000000
--- a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
deleted file mode 120000
index cbeebe3..0000000
--- a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm283x-rpi-usb-host.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm283x.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x.dtsi
deleted file mode 120000
index 5f54e4c..0000000
--- a/arch/arm64/boot/dts/broadcom/bcm283x.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../../../../arm/boot/dts/bcm283x.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/rpi/Makefile b/arch/arm64/boot/dts/broadcom/rpi/Makefile
new file mode 100644
index 0000000..d1a5606
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/rpi/Makefile
@@ -0,0 +1,5 @@
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
diff --git a/arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi b/arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi
new file mode 120000
index 0000000..06e5aa0
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi
@@ -0,0 +1 @@
+../../../../../arm/boot/dts/bcm2835-rpi.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/rpi/bcm2837-rpi-3-b.dts
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
rename to arch/arm64/boot/dts/broadcom/rpi/bcm2837-rpi-3-b.dts
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm64/boot/dts/broadcom/rpi/bcm2837.dtsi
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/bcm2837.dtsi
rename to arch/arm64/boot/dts/broadcom/rpi/bcm2837.dtsi
diff --git a/arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi b/arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi
new file mode 120000
index 0000000..3eff817
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi
@@ -0,0 +1 @@
+../../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi b/arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi
new file mode 120000
index 0000000..2102a8c
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi
@@ -0,0 +1 @@
+../../../../../arm/boot/dts/bcm283x-rpi-usb-host.dtsi
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi b/arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi
new file mode 120000
index 0000000..db7e86c
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi
@@ -0,0 +1 @@
+../../../../../arm/boot/dts/bcm283x.dtsi
\ No newline at end of file
-- 
2.5.0



From scott.branden at broadcom.com  Wed Jul 19 13:26:25 2017
From: scott.branden at broadcom.com (Scott Branden)
Date: Wed, 19 Jul 2017 20:26:25 -0000
Subject: [PATCH 2/2] arm64: dts: move rpi into rpi directory
In-Reply-To: <87mv80dvpo.fsf@eliezer.anholt.net>
References: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
 <1500483950-9217-3-git-send-email-scott.branden@broadcom.com>
 <87mv80dvpo.fsf@eliezer.anholt.net>
Message-ID: <ff694220-b771-4702-c9dc-536a3c87770e@broadcom.com>

Hi Eric,


On 17-07-19 01:21 PM, Eric Anholt wrote:
> Scott Branden <scott.branden at broadcom.com> writes:
>
>> Place rpi into its own subdirectory.  This helps as the number
>> of Broadcom boards grow and we can separate them per SoC.
> It seems like pretty unnecessary churn to me, though I wouldn't
> necessarily block it.  However, it conflicts with the patch I was
> preparing yesterday to try to resolve our DT merging troubles
> (https://lkml.org/lkml/2017/5/16/707), so I'd like to hold off on it for
> now.
I'm quite fine with dropping the rpi dts patch.  I'm going to proceed 
with the northstar2 patch
before more SoC and boards are introduced.
Thanks,
  Scott


From scott.branden at broadcom.com  Wed Jul 19 17:02:16 2017
From: scott.branden at broadcom.com (Scott Branden)
Date: Thu, 20 Jul 2017 00:02:16 -0000
Subject: [PATCH] ARM: dts: bcm283x: Move the BCM2837 DT contents from
 arm64 to arm.
In-Reply-To: <20170719201916.22369-1-eric@anholt.net>
References: <20170719201916.22369-1-eric@anholt.net>
Message-ID: <a2e79c17-f345-e7f2-8438-d4754e4ceb3a@broadcom.com>

Hi Eric,

suggestion inline


On 17-07-19 01:19 PM, Eric Anholt wrote:
> BCM2837 is somewhat unusual in that we build its DT on both arm32 and
> arm64.  Most devices are being run in arm32 mode.
>
> Having the body of the DT for 2837 separate from 2835/6 has been a
> source of pain, as we often need to make changes that span both
> directories simultaneously (for example, the thermal changes for 4.13,
> and pinmuxing changes earlier).  Other changes are made more
> complicated than they need to be, such as the SDHOST enabling, because
> we end up splitting a single change into a 283[56] half and a 2837
> half.
>
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
>
> I had asked about what we could do about our DT merging troubles back
> in https://lkml.org/lkml/2017/5/16/707 with no response.  I'm hoping
> we can take this patch as a resolution to that, and submit (almost
> all) future RPi DT changes through the arm32 dt tree.
>
>
>   arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
>   .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
>   arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
>   3 files changed, 42 insertions(+), 42 deletions(-)
>   rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)
>
> diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> index c72a27d908b6..972f14db28ac 100644
> --- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> @@ -1 +1,41 @@
> -#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
> +/dts-v1/;
> +#include "bcm2837.dtsi"
> +#include "bcm2835-rpi.dtsi"
> +#include "bcm283x-rpi-smsc9514.dtsi"
> +#include "bcm283x-rpi-usb-host.dtsi"
If you're moving this back to the arm directory why not change the 
include path and remove the 4 symlinks in arm64/boot/dts/broadcom?

+#include "arm/bcm2837.dtsi"
+#include "arm/bcm2835-rpi.dtsi"
+#include "arm/bcm283x-rpi-smsc9514.dtsi"
+#include "arm/bcm283x-rpi-usb-host.dtsi"


> +
> +/ {
> +	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
> +	model = "Raspberry Pi 3 Model B";
> +
> +	memory {
> +		reg = <0 0x40000000>;
> +	};
> +
> +	leds {
> +		act {
> +			gpios = <&gpio 47 0>;
> +		};
> +	};
> +};
> +
> +&uart1 {
> +	status = "okay";
> +};
> +
> +/* SDHCI is used to control the SDIO for wireless */
> +&sdhci {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&emmc_gpio34>;
> +	status = "okay";
> +	bus-width = <4>;
> +	non-removable;
> +};
> +
> +/* SDHOST is used to drive the SD card */
> +&sdhost {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdhost_gpio48>;
> +	status = "okay";
> +	bus-width = <4>;
> +};
> diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
> similarity index 100%
> rename from arch/arm64/boot/dts/broadcom/bcm2837.dtsi
> rename to arch/arm/boot/dts/bcm2837.dtsi
> diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> index 972f14db28ac..699d340a3437 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> +++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> @@ -1,41 +1 @@
> -/dts-v1/;
> -#include "bcm2837.dtsi"
> -#include "bcm2835-rpi.dtsi"
> -#include "bcm283x-rpi-smsc9514.dtsi"
> -#include "bcm283x-rpi-usb-host.dtsi"
> -
> -/ {
> -	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
> -	model = "Raspberry Pi 3 Model B";
> -
> -	memory {
> -		reg = <0 0x40000000>;
> -	};
> -
> -	leds {
> -		act {
> -			gpios = <&gpio 47 0>;
> -		};
> -	};
> -};
> -
> -&uart1 {
> -	status = "okay";
> -};
> -
> -/* SDHCI is used to control the SDIO for wireless */
> -&sdhci {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&emmc_gpio34>;
> -	status = "okay";
> -	bus-width = <4>;
> -	non-removable;
> -};
> -
> -/* SDHOST is used to drive the SD card */
> -&sdhost {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&sdhost_gpio48>;
> -	status = "okay";
> -	bus-width = <4>;
> -};
> +#include "arm/bcm2837-rpi-3-b.dts"



From stefan.wahren at i2se.com  Thu Jul 20 12:38:02 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 20 Jul 2017 19:38:02 -0000
Subject: [PATCH 1/3] ARM: bcm283x: Define UART pinmuxing on board level
In-Reply-To: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1500579429-9101-2-git-send-email-stefan.wahren@i2se.com>

Until RPI 3 and Zero W the pl011 (uart0) was always on pin 14/15. So in
order to take care of them and other boards in the future,
we need to define UART pinmuxing on board level.

This work based on Eric Anholt's patch "ARM: bcm2385: Don't force pl011
onto pins 14/15." and Fabian Vogt's patch "ARM64: dts: bcm2837: assign
uart0 to BT and uart1 to pin headers".

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
---
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-a.dts      |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-b.dts      |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-zero.dts   |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi.dtsi       |  2 +-
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts    |  6 ++++++
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts    | 10 ++++++++++
 9 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
index d070454..9f86649 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
@@ -99,3 +99,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts
index 46d078e..4b1af06 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
@@ -94,3 +94,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index 432088e..a846f1e 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -101,3 +101,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
index 4133bc2..e860964 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
@@ -94,3 +94,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 4d56fe3..5d77f3f 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -89,3 +89,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
index 79a20d5..7036240 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -103,3 +103,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index e55b362..e36c392 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -39,7 +39,7 @@
 	};
 
 	alt0: alt0 {
-		brcm,pins = <4 5 7 8 9 10 11 14 15>;
+		brcm,pins = <4 5 7 8 9 10 11>;
 		brcm,function = <BCM2835_FSEL_ALT0>;
 	};
 };
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
index bf19e8c..e8de414 100644
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
@@ -39,3 +39,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index 972f14d..20725ca 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -19,7 +19,17 @@
 	};
 };
 
+/* uart0 communicates with the BT module */
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
+	status = "okay";
+};
+
+/* uart1 is mapped to the pin header */
 &uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_gpio14>;
 	status = "okay";
 };
 
-- 
2.7.4



From stefan.wahren at i2se.com  Thu Jul 20 12:38:04 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 20 Jul 2017 19:38:04 -0000
Subject: [PATCH 2/3] dt-bindings: bcm: Add Raspberry Pi Zero W
In-Reply-To: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1500579429-9101-3-git-send-email-stefan.wahren@i2se.com>

This adds the root properties for the Raspberry Pi Zero W.

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
 Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index 9c97de2..3e3efa0 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -42,6 +42,10 @@ Raspberry Pi Zero
 Required root node properties:
 compatible = "raspberrypi,model-zero", "brcm,bcm2835";
 
+Raspberry Pi Zero W
+Required root node properties:
+compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
+
 Generic BCM2835 board
 Required root node properties:
 compatible = "brcm,bcm2835";
-- 
2.7.4



From stefan.wahren at i2se.com  Thu Jul 20 12:38:04 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 20 Jul 2017 19:38:04 -0000
Subject: [PATCH 3/3] ARM: dts: bcm2835: Add Raspberry Pi Zero W
In-Reply-To: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
References: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1500579429-9101-4-git-send-email-stefan.wahren@i2se.com>

The Raspberry Pi Zero W has the same components like the Zero plus
a Cypress CYW43438 wireless chip (wifi + bl).

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
 arch/arm/boot/dts/Makefile               |  3 +-
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 73 ++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ec60f4f..f3bf9397 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -74,7 +74,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2836-rpi-2-b.dtb \
 	bcm2837-rpi-3-b.dtb \
-	bcm2835-rpi-zero.dtb
+	bcm2835-rpi-zero.dtb \
+	bcm2835-rpi-zero-w.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
new file mode 100644
index 0000000..9c6d714
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2017 Stefan Wahren <stefan.wahren at i2se.com>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
+	model = "Raspberry Pi Zero W";
+
+	aliases {
+		uart0 = "/soc/serial at 7e201000";
+		uart1 = "/soc/serial at 7e215040";
+		serial0 = "/soc/serial at 7e201000";
+		serial1 = "/soc/serial at 7e215040";
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wl_on>;
+		reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0>;
+
+	wl_on: wl-on {
+		brcm,pins = <41>;
+		brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
+
+&sdhci {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	non-removable;
+	status = "okay";
+
+	brcmf: wifi at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
-- 
2.7.4



From stefan.wahren at i2se.com  Thu Jul 20 12:38:04 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Thu, 20 Jul 2017 19:38:04 -0000
Subject: [PATCH 0/3] ARM: bcm283x: Raspberry Pi Zero W support
Message-ID: <1500579429-9101-1-git-send-email-stefan.wahren@i2se.com>

This patch series adds support for the Raspberry Pi Zero W. It depends
on "ARM: bcm283x: Move the BCM2837 DT contents from arm64 to arm."

Currently there is a regression [1] in the brcmfmac driver. This hack [2]
avoids the issue and make wifi probe on RPi Zero W.

[1] - http://marc.info/?l=linux-wireless&m=150029709021719&w=2
[2] - https://github.com/lategoodbye/rpi-zero/commit/95ef5b8fbc05d9ec086970648767cafa10483622

Stefan Wahren (3):
  ARM: bcm283x: Define UART pinmuxing on board level
  dt-bindings: bcm: Add Raspberry Pi Zero W
  ARM: dts: bcm2835: Add Raspberry Pi Zero W

 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |  4 ++
 arch/arm/boot/dts/Makefile                         |  3 +-
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts           |  6 ++
 arch/arm/boot/dts/bcm2835-rpi-a.dts                |  6 ++
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts           |  6 ++
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts           |  6 ++
 arch/arm/boot/dts/bcm2835-rpi-b.dts                |  6 ++
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts           | 73 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm2835-rpi-zero.dts             |  6 ++
 arch/arm/boot/dts/bcm2835-rpi.dtsi                 |  2 +-
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts              |  6 ++
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 10 +++
 12 files changed, 132 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts

-- 
2.7.4



From scott.branden at broadcom.com  Fri Jul 28 07:39:30 2017
From: scott.branden at broadcom.com (Scott Branden)
Date: Fri, 28 Jul 2017 07:39:30 -0700
Subject: [PATCH 0/2] arm64: dts: cleanup Broadcom boards per SoC
In-Reply-To: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
References: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
Message-ID: <4d8c36d0-7422-120b-146b-33e74a7a518e@broadcom.com>

Hi Florian,

Could you please pick up PATCH 1/2 of this series below and drop PATCH 2/2 ?


On 17-07-19 10:05 AM, Scott Branden wrote:
> Separate Broadcom boards per SoC to assist in cleaner management of boards.
> This has already been done for Stingray and is done here for RPI and NS2.
>
> If this is problematic for RPI please let me know and RPI patch can be
> dropped from patch series.
>
> Scott Branden (2):
>    arm64: dts: move ns2 into northstar2 directory
>    arm64: dts: move rpi into rpi directory
>
>   arch/arm64/boot/dts/broadcom/Makefile                        | 7 +++----
>   arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi                | 1 -
>   arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi       | 1 -
>   arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi       | 1 -
>   arch/arm64/boot/dts/broadcom/bcm283x.dtsi                    | 1 -
>   arch/arm64/boot/dts/broadcom/northstar2/Makefile             | 6 ++++++
>   arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-clock.dtsi | 0
>   arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-svk.dts    | 0
>   arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-xmc.dts    | 0
>   arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2.dtsi       | 0
>   arch/arm64/boot/dts/broadcom/rpi/Makefile                    | 5 +++++
>   arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi            | 1 +
>   arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837-rpi-3-b.dts   | 0
>   arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837.dtsi          | 0
>   arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi   | 1 +
>   arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi   | 1 +
>   arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi                | 1 +
>   17 files changed, 18 insertions(+), 8 deletions(-)
>   delete mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
>   delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
>   delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
>   delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi
>   create mode 100644 arch/arm64/boot/dts/broadcom/northstar2/Makefile
>   rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-clock.dtsi (100%)
>   rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-svk.dts (100%)
>   rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2-xmc.dts (100%)
>   rename arch/arm64/boot/dts/broadcom/{ => northstar2}/ns2.dtsi (100%)
>   create mode 100644 arch/arm64/boot/dts/broadcom/rpi/Makefile
>   create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm2835-rpi.dtsi
>   rename arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837-rpi-3-b.dts (100%)
>   rename arch/arm64/boot/dts/broadcom/{ => rpi}/bcm2837.dtsi (100%)
>   create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-smsc9514.dtsi
>   create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x-rpi-usb-host.dtsi
>   create mode 120000 arch/arm64/boot/dts/broadcom/rpi/bcm283x.dtsi
>
Thanks,
  Scott


From f.fainelli at gmail.com  Fri Jul 28 16:31:36 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Fri, 28 Jul 2017 16:31:36 -0700
Subject: [PATCH 1/2] arm64: dts: move ns2 into northstar2 directory
In-Reply-To: <1500483950-9217-2-git-send-email-scott.branden@broadcom.com>
References: <1500483950-9217-1-git-send-email-scott.branden@broadcom.com>
 <1500483950-9217-2-git-send-email-scott.branden@broadcom.com>
Message-ID: <92ccb588-744f-ee91-bfba-ced7e6675335@gmail.com>

On 07/19/2017 10:05 AM, Scott Branden wrote:
> Place northstar2 into its own subdirectory.  This helps as the number
> of Broadcom boards grow and we can separate them per SoC.
> 
> Signed-off-by: Scott Branden <scott.branden at broadcom.com>

Applied, thanks Scott.
-- 
Florian


From f.fainelli at gmail.com  Fri Jul 28 16:55:06 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Fri, 28 Jul 2017 16:55:06 -0700
Subject: [PATCH v2] ARM: dts: bcm283x: Move the BCM2837 DT contents from
 arm64 to arm.
In-Reply-To: <20170726200156.30161-1-eric@anholt.net>
References: <20170726200156.30161-1-eric@anholt.net>
Message-ID: <18c414ac-c58e-bf99-1d04-8fed2c4a0300@gmail.com>

On 07/26/2017 01:01 PM, Eric Anholt wrote:
> BCM2837 is somewhat unusual in that we build its DT on both arm32 and
> arm64.  Most devices are being run in arm32 mode.
> 
> Having the body of the DT for 2837 separate from 2835/6 has been a
> source of pain, as we often need to make changes that span both
> directories simultaneously (for example, the thermal changes for 4.13,
> or anything that changes the name of a node referenced by '&' from
> board files).  Other changes are made more complicated than they need
> to be, such as the SDHOST enabling, because we have to split a single
> logical change into a 283[56] half and a 2837 half.
> 
> To fix this, make the stub board include file live in arm64 instead of
> arm32, and keep all of BCM283x's contents in arm32.  From here on, our
> changes to DT contents can be submitted through a single tree.
> 
> Signed-off-by: Eric Anholt <eric at anholt.net>

Applied to devicetree/next (arm64), thanks Eric!

-- 
Florian


From Julia.Lawall at lip6.fr  Fri Jul 28 22:59:41 2017
From: Julia.Lawall at lip6.fr (Julia Lawall)
Date: Sat, 29 Jul 2017 07:59:41 +0200
Subject: [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
In-Reply-To: <1501307981-29745-1-git-send-email-Julia.Lawall@lip6.fr>
References: <1501307981-29745-1-git-send-email-Julia.Lawall@lip6.fr>
Message-ID: <1501307981-29745-13-git-send-email-Julia.Lawall@lip6.fr>

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i at p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i at p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall at lip6.fr>

---
 drivers/mmc/host/bcm2835.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index abba9a2..229dc18 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1252,7 +1252,7 @@ static void bcm2835_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	mutex_unlock(&host->mutex);
 }
 
-static struct mmc_host_ops bcm2835_ops = {
+static const struct mmc_host_ops bcm2835_ops = {
 	.request = bcm2835_request,
 	.set_ios = bcm2835_set_ios,
 	.hw_reset = bcm2835_reset,



From stefan.wahren at i2se.com  Sun Jul 30 10:10:33 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sun, 30 Jul 2017 19:10:33 +0200
Subject: [PATCH V2 2/3] dt-bindings: bcm: Add Raspberry Pi Zero W
In-Reply-To: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>
References: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1501434634-2325-3-git-send-email-stefan.wahren@i2se.com>

This adds the root properties for the Raspberry Pi Zero W.

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Acked-by: Rob Herring <robh at kernel.org>
---
 Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index 9c97de2..3e3efa0 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -42,6 +42,10 @@ Raspberry Pi Zero
 Required root node properties:
 compatible = "raspberrypi,model-zero", "brcm,bcm2835";
 
+Raspberry Pi Zero W
+Required root node properties:
+compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
+
 Generic BCM2835 board
 Required root node properties:
 compatible = "brcm,bcm2835";
-- 
2.7.4



From stefan.wahren at i2se.com  Sun Jul 30 10:10:34 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sun, 30 Jul 2017 19:10:34 +0200
Subject: [PATCH V2 3/3] ARM: dts: bcm2835: Add Raspberry Pi Zero W
In-Reply-To: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>
References: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1501434634-2325-4-git-send-email-stefan.wahren@i2se.com>

The Raspberry Pi Zero W has the same components like the Zero plus
a Cypress CYW43438 wireless chip (wifi + bl).

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
---
 arch/arm/boot/dts/Makefile               |   3 +-
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 139 +++++++++++++++++++++++++++++++
 2 files changed, 141 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts

I'm not sure that GPIO34 to GPIO39 are really "not connected".
They are listed in dt-blob.dts, but only declared as input.
Still no full schematics available.

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4b17f35..6e632a3 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -73,7 +73,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2836-rpi-2-b.dtb \
 	bcm2837-rpi-3-b.dtb \
-	bcm2835-rpi-zero.dtb
+	bcm2835-rpi-zero.dtb \
+	bcm2835-rpi-zero-w.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
new file mode 100644
index 0000000..82651c3
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2017 Stefan Wahren <stefan.wahren at i2se.com>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
+	model = "Raspberry Pi Zero W";
+
+	/* Needed by firmware to properly init UARTs */
+	aliases {
+		uart0 = "/soc/serial at 7e201000";
+		uart1 = "/soc/serial at 7e215040";
+		serial0 = "/soc/serial at 7e201000";
+		serial1 = "/soc/serial at 7e215040";
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wl_on>;
+		reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&gpio {
+	/*
+	 * This is based on the official GPU firmware DT blob.
+	 *
+	 * Legend:
+	 * "NC" = not connected (no rail from the SoC)
+	 * "FOO" = GPIO line named "FOO" on the schematic
+	 * "FOO_N" = GPIO line named "FOO" on schematic, active low
+	 */
+	gpio-line-names = "GPIO0",
+			  "GPIO1",
+			  "SDA1",
+			  "SCL1",
+			  "GPIO_GCLK",
+			  "GPIO5",
+			  "GPIO6",
+			  "SPI_CE1_N",
+			  "SPI_CE0_N",
+			  "SPI_MISO",
+			  "SPI_MOSI",
+			  "SPI_SCLK",
+			  "GPIO12",
+			  "GPIO13",
+			  /* Serial port */
+			  "TXD0",
+			  "RXD0",
+			  "GPIO16",
+			  "GPIO17",
+			  "GPIO18",
+			  "GPIO19",
+			  "GPIO20",
+			  "GPIO21",
+			  "GPIO22",
+			  "GPIO23",
+			  "GPIO24",
+			  "GPIO25",
+			  "GPIO26",
+			  "GPIO27",
+			  "SDA0",
+			  "SCL0",
+			  "NC", /* GPIO30 */
+			  "NC", /* GPIO31 */
+			  "NC", /* GPIO32 */
+			  "NC", /* GPIO33 */
+			  "NC", /* GPIO34 */
+			  "NC", /* GPIO35 */
+			  "NC", /* GPIO36 */
+			  "NC", /* GPIO37 */
+			  "NC", /* GPIO38 */
+			  "NC", /* GPIO39 */
+			  "CAM_GPIO1", /* GPIO40 */
+			  "WL_ON", /* GPIO41 */
+			  "NC", /* GPIO42 */
+			  "WIFI_CLK", /* GPIO43 */
+			  "CAM_GPIO0", /* GPIO44 */
+			  "BT_ON", /* GPIO45 */
+			  "HDMI_HPD_N",
+			  "STATUS_LED_N",
+			  /* Used by SD Card */
+			  "SD_CLK_R",
+			  "SD_CMD_R",
+			  "SD_DATA0_R",
+			  "SD_DATA1_R",
+			  "SD_DATA2_R",
+			  "SD_DATA3_R";
+
+	pinctrl-0 = <&gpioout &alt0>;
+
+	wl_on: wl-on {
+		brcm,pins = <41>;
+		brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
+
+&sdhci {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	non-removable;
+	status = "okay";
+
+	brcmf: wifi at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
-- 
2.7.4



From stefan.wahren at i2se.com  Sun Jul 30 10:10:31 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sun, 30 Jul 2017 19:10:31 +0200
Subject: [PATCH V2 0/3] ARM: bcm283x: Raspberry Pi Zero W support
Message-ID: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>

This patch series adds support for the Raspberry Pi Zero W. It depends
on "V2 ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64 to arm."

Currently there is a regression [1] in the brcmfmac driver. This hack [2]
avoids the issue and make wifi probe on RPi Zero W.

Changes in V2:
- add aliases comment and gpio-line-names into bcm2835-rpi-zero-w.dts
- rebased on V2 of arm64 to arm patch

[1] - http://marc.info/?l=linux-wireless&m=150029709021719&w=2
[2] - https://github.com/lategoodbye/rpi-zero/commit/95ef5b8fbc05d9ec086970648767cafa10483622

Stefan Wahren (3):
  ARM: bcm283x: Define UART pinmuxing on board level
  dt-bindings: bcm: Add Raspberry Pi Zero W
  ARM: dts: bcm2835: Add Raspberry Pi Zero W

 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |   4 +
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts           |   6 +
 arch/arm/boot/dts/bcm2835-rpi-a.dts                |   6 +
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts           |   6 +
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts           |   6 +
 arch/arm/boot/dts/bcm2835-rpi-b.dts                |   6 +
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts           | 139 +++++++++++++++++++++
 arch/arm/boot/dts/bcm2835-rpi-zero.dts             |   6 +
 arch/arm/boot/dts/bcm2835-rpi.dtsi                 |   2 +-
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts              |   6 +
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              |  10 ++
 12 files changed, 198 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts

-- 
2.7.4



From stefan.wahren at i2se.com  Sun Jul 30 10:10:32 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Sun, 30 Jul 2017 19:10:32 +0200
Subject: [PATCH V2 1/3] ARM: bcm283x: Define UART pinmuxing on board level
In-Reply-To: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>
References: <1501434634-2325-1-git-send-email-stefan.wahren@i2se.com>
Message-ID: <1501434634-2325-2-git-send-email-stefan.wahren@i2se.com>

Until RPI 3 and Zero W the pl011 (uart0) was always on pin 14/15. So in
order to take care of them and other boards in the future,
we need to define UART pinmuxing on board level.

This work based on Eric Anholt's patch "ARM: bcm2385: Don't force pl011
onto pins 14/15." and Fabian Vogt's patch "ARM64: dts: bcm2837: assign
uart0 to BT and uart1 to pin headers".

Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
---
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-a.dts      |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-b.dts      |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi-zero.dts   |  6 ++++++
 arch/arm/boot/dts/bcm2835-rpi.dtsi       |  2 +-
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts    |  6 ++++++
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts    | 10 ++++++++++
 9 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
index d070454..9f86649 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
@@ -99,3 +99,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts
index 46d078e..4b1af06 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
@@ -94,3 +94,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index 432088e..a846f1e 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -101,3 +101,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
index 4133bc2..e860964 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
@@ -94,3 +94,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 4d56fe3..5d77f3f 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -89,3 +89,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
index 79a20d5..7036240 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -103,3 +103,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index e55b362..e36c392 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -39,7 +39,7 @@
 	};
 
 	alt0: alt0 {
-		brcm,pins = <4 5 7 8 9 10 11 14 15>;
+		brcm,pins = <4 5 7 8 9 10 11>;
 		brcm,function = <BCM2835_FSEL_ALT0>;
 	};
 };
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
index bf19e8c..e8de414 100644
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
@@ -39,3 +39,9 @@
 &hdmi {
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio14>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index 972f14d..20725ca 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -19,7 +19,17 @@
 	};
 };
 
+/* uart0 communicates with the BT module */
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
+	status = "okay";
+};
+
+/* uart1 is mapped to the pin header */
 &uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_gpio14>;
 	status = "okay";
 };
 
-- 
2.7.4



From stefan.wahren at i2se.com  Sun Jul 30 22:55:16 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Mon, 31 Jul 2017 07:55:16 +0200
Subject: [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
In-Reply-To: <1501307981-29745-13-git-send-email-Julia.Lawall@lip6.fr>
References: <1501307981-29745-1-git-send-email-Julia.Lawall@lip6.fr>
 <1501307981-29745-13-git-send-email-Julia.Lawall@lip6.fr>
Message-ID: <0beb2ef0-0a2d-5289-2956-af106d092cf6@i2se.com>

Am 29.07.2017 um 07:59 schrieb Julia Lawall:
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct mmc_host_ops i at p = { ... };
>
> @ok1@
> struct mmc_host *mmc;
> identifier r.i;
> position p;
> @@
> mmc->ops = &i at p
>
> @bad@
> position p != {r.p,ok1.p};
> identifier r.i;
> struct mmc_host_ops e;
> @@
> e at i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct mmc_host_ops i = { ... };
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall at lip6.fr>

Acked-by: Stefan Wahren <stefan.wahren at i2se.com>


From jananis37 at gmail.com  Mon Jul 31 00:14:03 2017
From: jananis37 at gmail.com (janani-sankarababu)
Date: Mon, 31 Jul 2017 12:44:03 +0530
Subject: [PATCH] Staging: vc04_services: Fix WARN_ON instead of BUG_ON
Message-ID: <1501485243-11977-1-git-send-email-jananis37@gmail.com>

This patch is to replace the use of BUG_ON macro with WARN_ON
inorder to prevent the crashing of the kernel.

Signed-off-by: Janani Sankara Babu <jananis37 at gmail.com>
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index f484bb0..30bc246 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -91,7 +91,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol,
 	if (mutex_lock_interruptible(&chip->audio_mutex))
 		return -EINTR;
 
-	BUG_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));
+	WARN_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));
 
 	if (kcontrol->private_value == PCM_PLAYBACK_VOLUME)
 		ucontrol->value.integer.value[0] = chip2alsa(chip->volume);
-- 
1.9.1



From stefan.wahren at i2se.com  Mon Jul 31 01:10:41 2017
From: stefan.wahren at i2se.com (Stefan Wahren)
Date: Mon, 31 Jul 2017 10:10:41 +0200
Subject: [PATCH] Staging: vc04_services: Fix WARN_ON instead of BUG_ON
In-Reply-To: <1501485243-11977-1-git-send-email-jananis37@gmail.com>
References: <1501485243-11977-1-git-send-email-jananis37@gmail.com>
Message-ID: <573937bd-6e1e-90f7-3884-c749c2504326@i2se.com>

Am 31.07.2017 um 09:14 schrieb janani-sankarababu:
> This patch is to replace the use of BUG_ON macro with WARN_ON
> inorder to prevent the crashing of the kernel.

Unfortunately it isn't always that simple. checkpatch isn't smart. It's
preferred to handle error cases instead of flooding the kernel log.

>
> Signed-off-by: Janani Sankara Babu <jananis37 at gmail.com>
> ---
>  drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> index f484bb0..30bc246 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> @@ -91,7 +91,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol,
>  	if (mutex_lock_interruptible(&chip->audio_mutex))
>  		return -EINTR;
>  
> -	BUG_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));
> +	WARN_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));

The complete logic seems strange to me and the statement before didn't
even check for chip.

Regards
Stefan

>  
>  	if (kcontrol->private_value == PCM_PLAYBACK_VOLUME)
>  		ucontrol->value.integer.value[0] = chip2alsa(chip->volume);


From dan.carpenter at oracle.com  Mon Jul 31 01:45:19 2017
From: dan.carpenter at oracle.com (Dan Carpenter)
Date: Mon, 31 Jul 2017 11:45:19 +0300
Subject: [PATCH] Staging: vc04_services: Fix WARN_ON instead of BUG_ON
In-Reply-To: <1501485243-11977-1-git-send-email-jananis37@gmail.com>
References: <1501485243-11977-1-git-send-email-jananis37@gmail.com>
Message-ID: <20170731084519.s7zy3cvejtvcqbf2@mwanda>

On Mon, Jul 31, 2017 at 12:44:03PM +0530, janani-sankarababu wrote:
> This patch is to replace the use of BUG_ON macro with WARN_ON
> inorder to prevent the crashing of the kernel.
> 
> Signed-off-by: Janani Sankara Babu <jananis37 at gmail.com>
> ---
>  drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> index f484bb0..30bc246 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
> @@ -91,7 +91,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol,
>  	if (mutex_lock_interruptible(&chip->audio_mutex))
                                      ^^^^^^
We dereference chip here.

>  		return -EINTR;
>  
> -	BUG_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));
> +	WARN_ON(!chip && !(chip->avail_substreams & AVAIL_SUBSTREAMS_MASK));
                ^^^^^
Too late.

regards,
dan carpenter



From gustavo at embeddedor.com  Thu Jul 20 07:18:53 2017
From: gustavo at embeddedor.com (Gustavo A. R. Silva)
Date: Thu, 20 Jul 2017 14:18:53 -0000
Subject: [PATCH] staging: bcm2835-audio: constify snd_pcm_ops structures
Message-ID: <20170720141758.GA9574@embeddedgus>

Check for snd_pcm_ops structures that are only stored in the ops field of
a snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops. The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as
const also.

This issue was detected using Coccinelle and the following semantic patch:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_pcm_ops i at p = { ... };

@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &i at p;

@ok2@
identifier r.i;
expression e1, e2; position p;
@@
snd_pcm_set_ops(e1, e2, &i at p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct snd_pcm_ops i = { ... };

Signed-off-by: Gustavo A. R. Silva <gustavo at embeddedor.com>
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
index 3637ddf..1bf34ce 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
@@ -438,7 +438,7 @@ static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream,
 }
 
 /* operators */
-static struct snd_pcm_ops snd_bcm2835_playback_ops = {
+static const struct snd_pcm_ops snd_bcm2835_playback_ops = {
 	.open = snd_bcm2835_playback_open,
 	.close = snd_bcm2835_playback_close,
 	.ioctl = snd_bcm2835_pcm_lib_ioctl,
@@ -450,7 +450,7 @@ static struct snd_pcm_ops snd_bcm2835_playback_ops = {
 	.ack = snd_bcm2835_pcm_ack,
 };
 
-static struct snd_pcm_ops snd_bcm2835_playback_spdif_ops = {
+static const struct snd_pcm_ops snd_bcm2835_playback_spdif_ops = {
 	.open = snd_bcm2835_playback_spdif_open,
 	.close = snd_bcm2835_playback_close,
 	.ioctl = snd_bcm2835_pcm_lib_ioctl,
-- 
2.5.0



