[PATCH 2/2] drivers: core: Remove glue dirs from sysfs earlier

2018-06-28 Thread Benjamin Herrenschmidt
ty, by keeping track of the number of child devices of the gluedir. This is made easy by the fact that all glue dir operations are done with a global mutex, and there's already a function (cleanup_glue_dir) called in all the right places taking that mutex that can be enhanced for this. Sig

[PATCH 2/2] drivers: core: Remove glue dirs from sysfs earlier

2018-06-28 Thread Benjamin Herrenschmidt
ty, by keeping track of the number of child devices of the gluedir. This is made easy by the fact that all glue dir operations are done with a global mutex, and there's already a function (cleanup_glue_dir) called in all the right places taking that mutex that can be enhanced for this. Sig

[PATCH 1/2] drivers: core: Don't try to use a dead glue_dir

2018-06-28 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- (Adding lkml, I just realized I completely forgot to CC it in the first place on this whole conversation, blame the 1am debugging session) drivers/base/core.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/base/core.c

[PATCH 1/2] drivers: core: Don't try to use a dead glue_dir

2018-06-28 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- (Adding lkml, I just realized I completely forgot to CC it in the first place on this whole conversation, blame the 1am debugging session) drivers/base/core.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/base/core.c

[PATCH 14/14] arm: dts: OpenPower Palmetto system can use coprocessor for FSI

2018-06-26 Thread Benjamin Herrenschmidt
This switches away from userspace bitbanging to kernel FSI using the coprocessor. Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 31 ++- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp

[PATCH 14/14] arm: dts: OpenPower Palmetto system can use coprocessor for FSI

2018-06-26 Thread Benjamin Herrenschmidt
This switches away from userspace bitbanging to kernel FSI using the coprocessor. Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 31 ++- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp

[PATCH 09/14] fsi: master-gpio: Add missing release function

2018-06-26 Thread Benjamin Herrenschmidt
-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index 91d89597784a..bad7951a2677 100644 --- a/drivers/fsi/fsi-master-gpio.c

[PATCH 09/14] fsi: master-gpio: Add missing release function

2018-06-26 Thread Benjamin Herrenschmidt
-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index 91d89597784a..bad7951a2677 100644 --- a/drivers/fsi/fsi-master-gpio.c

[PATCH 05/14] fsi: master-gpio: Add support for link_config

2018-06-26 Thread Benjamin Herrenschmidt
To configure the send and echo delays Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index 836587701ceb

[PATCH 11/14] dt-bindings: fsi: Document binding for the fsi-master-ast-cf "device"

2018-06-26 Thread Benjamin Herrenschmidt
on systems for which a corresponding firmware file exists. It has most of the same properties, plus some more needed to operate the coprocessor. Signed-off-by: Benjamin Herrenschmidt --- .../bindings/fsi/fsi-master-ast-cf.txt| 36 +++ 1 file changed, 36 insertions(+) create mode

[PATCH 05/14] fsi: master-gpio: Add support for link_config

2018-06-26 Thread Benjamin Herrenschmidt
To configure the send and echo delays Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index 836587701ceb

[PATCH 11/14] dt-bindings: fsi: Document binding for the fsi-master-ast-cf "device"

2018-06-26 Thread Benjamin Herrenschmidt
on systems for which a corresponding firmware file exists. It has most of the same properties, plus some more needed to operate the coprocessor. Signed-off-by: Benjamin Herrenschmidt --- .../bindings/fsi/fsi-master-ast-cf.txt| 36 +++ 1 file changed, 36 insertions(+) create mode

[PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values

2018-06-26 Thread Benjamin Herrenschmidt
d supports the new link_config() callback to configure the generation of those delays. Signed-off-by: Benjamin Herrenschmidt --- --- drivers/fsi/fsi-core.c | 109 --- drivers/fsi/fsi-master.h | 2 + 2 files changed, 93 insertions(+), 18 deletions(-)

[PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values

2018-06-26 Thread Benjamin Herrenschmidt
d supports the new link_config() callback to configure the generation of those delays. Signed-off-by: Benjamin Herrenschmidt --- --- drivers/fsi/fsi-core.c | 109 --- drivers/fsi/fsi-master.h | 2 + 2 files changed, 93 insertions(+), 18 deletions(-)

[PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values

2018-06-26 Thread Benjamin Herrenschmidt
d supports the new link_config() callback to configure the generation of those delays. Signed-off-by: Benjamin Herrenschmidt --- --- drivers/fsi/fsi-core.c | 109 --- drivers/fsi/fsi-master.h | 2 + 2 files changed, 93 insertions(+), 18 deletions(-)

[PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values

2018-06-26 Thread Benjamin Herrenschmidt
d supports the new link_config() callback to configure the generation of those delays. Signed-off-by: Benjamin Herrenschmidt --- --- drivers/fsi/fsi-core.c | 109 --- drivers/fsi/fsi-master.h | 2 + 2 files changed, 93 insertions(+), 18 deletions(-)

[PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-26 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

[PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-26 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

[PATCH 01/14] devres: Add devm_of_iomap()

2018-06-26 Thread Benjamin Herrenschmidt
) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4 lib/devres.c | 36 +++

[PATCH 07/14] fsi: master-gpio: Remove unused definitions

2018-06-26 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index a00a85aa6d56..2bc85514bb0c 100644 --- a/drivers/fsi/fsi-master-gpio.c +++ b/drivers/fsi/fsi-master

[PATCH 07/14] fsi: master-gpio: Remove unused definitions

2018-06-26 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index a00a85aa6d56..2bc85514bb0c 100644 --- a/drivers/fsi/fsi-master-gpio.c +++ b/drivers/fsi/fsi-master

[PATCH 01/14] devres: Add devm_of_iomap()

2018-06-26 Thread Benjamin Herrenschmidt
) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4 lib/devres.c | 36 +++

[PATCH 13/14] arm: dts: OpenPower Romulus system can use coprocessor for FSI

2018-06-26 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts index 347938673c83

[PATCH 13/14] arm: dts: OpenPower Romulus system can use coprocessor for FSI

2018-06-26 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts index 347938673c83

[PATCH 04/14] fsi: master-gpio: Rename and adjust send delay

2018-06-26 Thread Benjamin Herrenschmidt
What the driver called "FSI_GPIO_PRIME_SLAVE_CLOCKS" is what the FSI spec calls tSendDelay and should be 16 clocks by default. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 04/14] fsi: master-gpio: Rename and adjust send delay

2018-06-26 Thread Benjamin Herrenschmidt
What the driver called "FSI_GPIO_PRIME_SLAVE_CLOCKS" is what the FSI spec calls tSendDelay and should be 16 clocks by default. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 04/14] fsi: master-gpio: Rename and adjust send delay

2018-06-26 Thread Benjamin Herrenschmidt
What the driver called "FSI_GPIO_PRIME_SLAVE_CLOCKS" is what the FSI spec calls tSendDelay and should be 16 clocks by default. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 04/14] fsi: master-gpio: Rename and adjust send delay

2018-06-26 Thread Benjamin Herrenschmidt
What the driver called "FSI_GPIO_PRIME_SLAVE_CLOCKS" is what the FSI spec calls tSendDelay and should be 16 clocks by default. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-26 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

[PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-26 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

[PATCH 06/14] fsi: master-gpio: Add more tracepoints

2018-06-26 Thread Benjamin Herrenschmidt
This adds a few more tracepoints that have proven useful when debugging issues with the FSI bus. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 16 --- include/trace/events/fsi_master_gpio.h | 59 ++ 2 files changed, 69 insertions

[PATCH 08/14] fsi: master-gpio: Remove "GPIO" prefix on some definitions

2018-06-26 Thread Benjamin Herrenschmidt
Some definitions are generic to the FSI protocol or any give master implementation. Rename them to remove the "GPIO" prefix in preparation for moving them to a common header. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 70 ++---

[PATCH 06/14] fsi: master-gpio: Add more tracepoints

2018-06-26 Thread Benjamin Herrenschmidt
This adds a few more tracepoints that have proven useful when debugging issues with the FSI bus. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 16 --- include/trace/events/fsi_master_gpio.h | 59 ++ 2 files changed, 69 insertions

[PATCH 08/14] fsi: master-gpio: Remove "GPIO" prefix on some definitions

2018-06-26 Thread Benjamin Herrenschmidt
Some definitions are generic to the FSI protocol or any give master implementation. Rename them to remove the "GPIO" prefix in preparation for moving them to a common header. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c | 70 ++---

[PATCH 10/14] fsi: Move various master definitions to a common header

2018-06-26 Thread Benjamin Herrenschmidt
This moves the definitions for various protocol details (message & response codes, delays etc...) out of fsi-master-gpio.c to fsi-master.h in order to share them with other master implementations. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c

[PATCH 10/14] fsi: Move various master definitions to a common header

2018-06-26 Thread Benjamin Herrenschmidt
This moves the definitions for various protocol details (message & response codes, delays etc...) out of fsi-master-gpio.c to fsi-master.h in order to share them with other master implementations. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-master-gpio.c

[PATCH 12/14] fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire

2018-06-26 Thread Benjamin Herrenschmidt
for the coprocessor and its source code can be found at https://github.com/ozbenh/cf-fsi and is system specific. Currently tested on Romulus and Palmetto systems. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/Kconfig |9 + drivers/fsi/Makefile |1

[PATCH 12/14] fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire

2018-06-26 Thread Benjamin Herrenschmidt
for the coprocessor and its source code can be found at https://github.com/ozbenh/cf-fsi and is system specific. Currently tested on Romulus and Palmetto systems. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/Kconfig |9 + drivers/fsi/Makefile |1

[PATCH 01/14] devres: Add devm_of_iomap()

2018-06-26 Thread Benjamin Herrenschmidt
) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4 lib/devres.c | 36 +++

[PATCH 01/14] devres: Add devm_of_iomap()

2018-06-26 Thread Benjamin Herrenschmidt
) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4 lib/devres.c | 36 +++

[PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-26 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

[PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-26 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

[PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-26 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

[PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-26 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

[RFC PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-21 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

[RFC PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-21 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

[RFC PATCH 01/14] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4 lib/devres.c | 36 +++

[RFC PATCH 01/14] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4 lib/devres.c | 36 +++

[RFC PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-21 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

[RFC PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-21 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

Re: [PATCH] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
On Thu, 2018-06-14 at 13:31 +1000, Benjamin Herrenschmidt wrote: > There are still quite a few cases where a device might want > to get to a different node of the device-tree, obtain the > resources and map them. > > This is generally open coded in drivers which is quite error pro

Re: [PATCH] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
On Thu, 2018-06-14 at 13:31 +1000, Benjamin Herrenschmidt wrote: > There are still quite a few cases where a device might want > to get to a different node of the device-tree, obtain the > resources and map them. > > This is generally open coded in drivers which is quite error pro

linux-next: Please add the fsi tree

2018-06-21 Thread Benjamin Herrenschmidt
Hi Stephen ! Please add the fsi tree at https://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi.git (master) To linux-next. It contains the changes that I will send to Greg KH to the FSI subsystem used by the service processor to communicate with IBM Power chips (and eventually S390 as

linux-next: Please add the fsi tree

2018-06-21 Thread Benjamin Herrenschmidt
Hi Stephen ! Please add the fsi tree at https://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi.git (master) To linux-next. It contains the changes that I will send to Greg KH to the FSI subsystem used by the service processor to communicate with IBM Power chips (and eventually S390 as

Re: [PATCH v10 3/7] i2c: fsi: Add port structures

2018-06-19 Thread Benjamin Herrenschmidt
;From f9d9092160897e7308f6990067a03e937339537f Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 20 Jun 2018 13:27:32 +1000 Subject: [PATCH] i2c: fsi: Fix use after free Signed-off-by: Benjamin Herrenschmidt --- drivers/i2c/busses/i2c-fsi.c | 5 +++-- 1 file changed, 3 insertions(+

Re: [PATCH v10 3/7] i2c: fsi: Add port structures

2018-06-19 Thread Benjamin Herrenschmidt
;From f9d9092160897e7308f6990067a03e937339537f Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 20 Jun 2018 13:27:32 +1000 Subject: [PATCH] i2c: fsi: Fix use after free Signed-off-by: Benjamin Herrenschmidt --- drivers/i2c/busses/i2c-fsi.c | 5 +++-- 1 file changed, 3 insertions(+

Re: [git pull] Please pull powerpc.git next branch

2018-06-19 Thread Benjamin Herrenschmidt
On Wed, 2018-06-20 at 07:58 +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 5:23 AM Benjamin Herrenschmidt > wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge > > I love the alleged line removal, but there's nothing in that 'me

Re: [git pull] Please pull powerpc.git next branch

2018-06-19 Thread Benjamin Herrenschmidt
On Wed, 2018-06-20 at 07:58 +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 5:23 AM Benjamin Herrenschmidt > wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge > > I love the alleged line removal, but there's nothing in that 'me

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-17 Thread Benjamin Herrenschmidt
On Mon, 2018-06-18 at 14:09 +1000, Alistair Popple wrote: > On Sunday, 17 June 2018 11:22:11 AM AEST Benjamin Herrenschmidt wrote: > > On Sun, 2018-06-17 at 11:17 +1000, Benjamin Herrenschmidt wrote: > > > > > > We have everything that cronus needs and more than pdbg ne

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-17 Thread Benjamin Herrenschmidt
On Mon, 2018-06-18 at 14:09 +1000, Alistair Popple wrote: > On Sunday, 17 June 2018 11:22:11 AM AEST Benjamin Herrenschmidt wrote: > > On Sun, 2018-06-17 at 11:17 +1000, Benjamin Herrenschmidt wrote: > > > > > > We have everything that cronus needs and more than pdbg ne

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-16 Thread Benjamin Herrenschmidt
On Sun, 2018-06-17 at 11:17 +1000, Benjamin Herrenschmidt wrote: > > We have everything that cronus needs and more than pdbg needs afaik :-) > > That said, cronus does a bunch of other stupid things that I'm still > trying to figure out how to fix. > > We might need to crea

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-16 Thread Benjamin Herrenschmidt
On Sun, 2018-06-17 at 11:17 +1000, Benjamin Herrenschmidt wrote: > > We have everything that cronus needs and more than pdbg needs afaik :-) > > That said, cronus does a bunch of other stupid things that I'm still > trying to figure out how to fix. > > We might need to crea

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-16 Thread Benjamin Herrenschmidt
On Sat, 2018-06-16 at 14:34 +0930, Joel Stanley wrote: > On 12 June 2018 at 14:49, Benjamin Herrenschmidt > wrote: > > This was too hard to split ... this adds a number of features > > to the SCOM user interface: > > > > - Support for indirect SCOMs > >

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-16 Thread Benjamin Herrenschmidt
On Sat, 2018-06-16 at 14:34 +0930, Joel Stanley wrote: > On 12 June 2018 at 14:49, Benjamin Herrenschmidt > wrote: > > This was too hard to split ... this adds a number of features > > to the SCOM user interface: > > > > - Support for indirect SCOMs > >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-15 Thread Benjamin Herrenschmidt
On Fri, 2018-06-15 at 08:16 +0200, Geert Uytterhoeven wrote: > Hi Ben, > > On Fri, Jun 15, 2018 at 1:51 AM Benjamin Herrenschmidt > wrote: > > On Thu, 2018-06-14 at 10:27 +0200, Geert Uytterhoeven wrote: > > > > --- a/include/linux/of_address.h > >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-15 Thread Benjamin Herrenschmidt
On Fri, 2018-06-15 at 08:16 +0200, Geert Uytterhoeven wrote: > Hi Ben, > > On Fri, Jun 15, 2018 at 1:51 AM Benjamin Herrenschmidt > wrote: > > On Thu, 2018-06-14 at 10:27 +0200, Geert Uytterhoeven wrote: > > > > --- a/include/linux/of_address.h > >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-14 Thread Benjamin Herrenschmidt
On Thu, 2018-06-14 at 10:27 +0200, Geert Uytterhoeven wrote: > > --- a/include/linux/of_address.h > > +++ b/include/linux/of_address.h > > @@ -40,6 +40,11 @@ extern void __iomem *of_iomap(struct device_node > > *device, int index); > > void __iomem *of_io_request_and_map(struct device_node

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-14 Thread Benjamin Herrenschmidt
On Thu, 2018-06-14 at 10:27 +0200, Geert Uytterhoeven wrote: > > --- a/include/linux/of_address.h > > +++ b/include/linux/of_address.h > > @@ -40,6 +40,11 @@ extern void __iomem *of_iomap(struct device_node > > *device, int index); > > void __iomem *of_io_request_and_map(struct device_node

[PATCH] devres: Add devm_of_iomap()

2018-06-13 Thread Benjamin Herrenschmidt
, such as not returning the size of the resource found (which can be useful) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4

[PATCH] devres: Add devm_of_iomap()

2018-06-13 Thread Benjamin Herrenschmidt
, such as not returning the size of the resource found (which can be useful) and not being "managed". This adds a devm_of_iomap() that provides all of these and should probably replace uses of the above in most drivers. Signed-off-by: Benjamin Herrenschmidt --- include/linux/device.h | 4

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-13 Thread Benjamin Herrenschmidt
On Wed, 2018-06-13 at 09:00 -0600, Rob Herring wrote: > > > My thinking was to then replace most of_iomap users with this. > > > > As for the specific case of the driver I'm cooking, it's a case where > > the SoC contains a little coprocessor (a ColdFire even !) alongside the > > Wow. Must be

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-13 Thread Benjamin Herrenschmidt
On Wed, 2018-06-13 at 09:00 -0600, Rob Herring wrote: > > > My thinking was to then replace most of_iomap users with this. > > > > As for the specific case of the driver I'm cooking, it's a case where > > the SoC contains a little coprocessor (a ColdFire even !) alongside the > > Wow. Must be

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-13 Thread Benjamin Herrenschmidt
On Wed, 2018-06-13 at 09:57 -0500, Eddie James wrote: > > On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: > > This was too hard to split ... this adds a number of features > > to the SCOM user interface: > > > > - Support for indirect SCOMs > >

Re: [RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-13 Thread Benjamin Herrenschmidt
On Wed, 2018-06-13 at 09:57 -0500, Eddie James wrote: > > On 06/12/2018 12:19 AM, Benjamin Herrenschmidt wrote: > > This was too hard to split ... this adds a number of features > > to the SCOM user interface: > > > > - Support for indirect SCOMs > >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Wed, 2018-06-13 at 02:16 +0300, Andy Shevchenko wrote: > On Wed, Jun 13, 2018 at 1:58 AM, Benjamin Herrenschmidt > wrote: > > On Tue, 2018-06-12 at 19:53 +0300, Andy Shevchenko wrote: > > > > > > > > It feels like a wrong approach. > > > > >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Wed, 2018-06-13 at 02:16 +0300, Andy Shevchenko wrote: > On Wed, Jun 13, 2018 at 1:58 AM, Benjamin Herrenschmidt > wrote: > > On Tue, 2018-06-12 at 19:53 +0300, Andy Shevchenko wrote: > > > > > > > > It feels like a wrong approach. > > > > >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 19:53 +0300, Andy Shevchenko wrote: > > > > It feels like a wrong approach. > > > Can OF graph help here? Would it be better approach? > > > > I don't quite understand what your objection is nor what "OF graph" > > is... > > There is no objection per se, just a doubt that

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 19:53 +0300, Andy Shevchenko wrote: > > > > It feels like a wrong approach. > > > Can OF graph help here? Would it be better approach? > > > > I don't quite understand what your objection is nor what "OF graph" > > is... > > There is no objection per se, just a doubt that

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 11:42 -0600, Rob Herring wrote: > On Mon, Jun 11, 2018 at 6:01 PM, Benjamin Herrenschmidt > wrote: > > There are still quite a few cases where a device might want to get to a > > different node of the device-tree, obtain the resources and map them. >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 11:42 -0600, Rob Herring wrote: > On Mon, Jun 11, 2018 at 6:01 PM, Benjamin Herrenschmidt > wrote: > > There are still quite a few cases where a device might want to get to a > > different node of the device-tree, obtain the resources and map them. >

Re: [PATCH] drivers/of: Make of_io_request_and_map() "name" argument optional

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 16:18 -0600, Rob Herring wrote: > On Tue, Jun 12, 2018 at 10:01:07AM +1000, Benjamin Herrenschmidt wrote: > > These days of_address_to_resource() puts a reasonable name > > in the resource struct, thus make the "name" argument an > > optiona

Re: [PATCH] drivers/of: Make of_io_request_and_map() "name" argument optional

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 16:18 -0600, Rob Herring wrote: > On Tue, Jun 12, 2018 at 10:01:07AM +1000, Benjamin Herrenschmidt wrote: > > These days of_address_to_resource() puts a reasonable name > > in the resource struct, thus make the "name" argument an > > optiona

Re: [GIT PULL v2] FSI updates for 4.17

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 13:44 +0200, Greg Kroah-Hartman wrote: > > > We are in regression only mode even before -rc1 these days ? including > > for code that is basically completely unused upstream (which is what > > this is trying to fix) ? :-) That's rather full-on ... > > For code that goes

Re: [GIT PULL v2] FSI updates for 4.17

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 13:44 +0200, Greg Kroah-Hartman wrote: > > > We are in regression only mode even before -rc1 these days ? including > > for code that is basically completely unused upstream (which is what > > this is trying to fix) ? :-) That's rather full-on ... > > For code that goes

Re: [GIT PULL v2] FSI updates for 4.17

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 13:18 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 12, 2018 at 08:54:39PM +1000, Benjamin Herrenschmidt wrote: > > Hi Greg ! > > > > There are a first round of updates of the FSI stack, aiming at > > reducing/removing > > he gap with

Re: [GIT PULL v2] FSI updates for 4.17

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 13:18 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 12, 2018 at 08:54:39PM +1000, Benjamin Herrenschmidt wrote: > > Hi Greg ! > > > > There are a first round of updates of the FSI stack, aiming at > > reducing/removing > > he gap with

[GIT PULL v2] FSI updates for 4.17

2018-06-12 Thread Benjamin Herrenschmidt
SI updates and sbefifo driver Andrew Jeffery (2): fsi: gpio: Trace busy count fsi: gpio: Remove unused 'id' variable Benjamin Herrenschmidt (8): fsi/fsi-master-gpio: Sample input data on different clock phase fsi/fsi-m

[GIT PULL v2] FSI updates for 4.17

2018-06-12 Thread Benjamin Herrenschmidt
SI updates and sbefifo driver Andrew Jeffery (2): fsi: gpio: Trace busy count fsi: gpio: Remove unused 'id' variable Benjamin Herrenschmidt (8): fsi/fsi-master-gpio: Sample input data on different clock phase fsi/fsi-m

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 11:35 +0300, Andy Shevchenko wrote: > On Tue, Jun 12, 2018 at 3:01 AM, Benjamin Herrenschmidt > wrote: > > There are still quite a few cases where a device might want to get to a > > different node of the device-tree, obtain the resources and map them. >

Re: [PATCH] drivers/of: Add devm_of_iomap()

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 11:35 +0300, Andy Shevchenko wrote: > On Tue, Jun 12, 2018 at 3:01 AM, Benjamin Herrenschmidt > wrote: > > There are still quite a few cases where a device might want to get to a > > different node of the device-tree, obtain the resources and map them. >

Re: [GIT PULL] FSI updates

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 08:20 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 12, 2018 at 02:14:25PM +1000, Benjamin Herrenschmidt wrote: > > Hi Greg ! > > > > There are a first round of updates of the FSI stack, aiming at > > reducing/removing > > the gap with

Re: [GIT PULL] FSI updates

2018-06-12 Thread Benjamin Herrenschmidt
On Tue, 2018-06-12 at 08:20 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 12, 2018 at 02:14:25PM +1000, Benjamin Herrenschmidt wrote: > > Hi Greg ! > > > > There are a first round of updates of the FSI stack, aiming at > > reducing/removing > > the gap with

[RFC PATCH 2/5] fsi/scom: Whitespace fixes

2018-06-11 Thread Benjamin Herrenschmidt
No functional changes Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-scom.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index 3cba0eb645e1..8a608db0aa07 100644 --- a/drivers/fsi/fsi-scom.c +++ b/drivers

[RFC PATCH 2/5] fsi/scom: Whitespace fixes

2018-06-11 Thread Benjamin Herrenschmidt
No functional changes Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-scom.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index 3cba0eb645e1..8a608db0aa07 100644 --- a/drivers/fsi/fsi-scom.c +++ b/drivers

[RFC PATCH 3/5] fsi/scom: Fixup endian annotations

2018-06-11 Thread Benjamin Herrenschmidt
Use the proper annotated type __be32 and fixup the accessor used for get_scom() Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-scom.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index 8a608db0aa07

[RFC PATCH 3/5] fsi/scom: Fixup endian annotations

2018-06-11 Thread Benjamin Herrenschmidt
Use the proper annotated type __be32 and fixup the accessor used for get_scom() Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-scom.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index 8a608db0aa07

[RFC PATCH 4/5] fsi/scom: Add register definitions

2018-06-11 Thread Benjamin Herrenschmidt
Add a few more register and bit definitions, also define and use SCOM_READ_CMD (which is 0 but it makes the code clearer) Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-scom.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/fsi/fsi

[RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-11 Thread Benjamin Herrenschmidt
This was too hard to split ... this adds a number of features to the SCOM user interface: - Support for indirect SCOMs - read()/write() interface now handle errors and retries - New ioctl() "raw" interface for use by debuggers Signed-off-by: Benjamin Herrenschmidt --- drive

[RFC PATCH 4/5] fsi/scom: Add register definitions

2018-06-11 Thread Benjamin Herrenschmidt
Add a few more register and bit definitions, also define and use SCOM_READ_CMD (which is 0 but it makes the code clearer) Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-scom.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/fsi/fsi

[RFC PATCH 5/5] fsi/scom: Major overhaul

2018-06-11 Thread Benjamin Herrenschmidt
This was too hard to split ... this adds a number of features to the SCOM user interface: - Support for indirect SCOMs - read()/write() interface now handle errors and retries - New ioctl() "raw" interface for use by debuggers Signed-off-by: Benjamin Herrenschmidt --- drive

<    1   2   3   4   5   6   7   8   9   10   >