Re: [PATCH 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-10 Thread Jonathan Neuschäfer
o Kconfig and Makefile in alphabetical order. Thanks, Jonathan Neuschäfer signature.asc Description: PGP signature

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-03 Thread Jonathan Neuschäfer
obably not. (And in case you're wondering about the 22 in the version string: Those are mostly patches that give me a serial console.) I'm not sure what is going on, because I haven't looked closely at the patches or tried to debug the problem. If you have some debugging ti

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-16 Thread Jonathan Neuschäfer
ook3s/32/hash.h, - 0x591 = _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | _PAGE_PRESENT - 0x311 = _PAGE_EXEC | _PAGE_ACCESSED | _PAGE_COHERENT | _PAGE_PRESENT - 0x791 = _PAGE_RW | _PAGE_EXEC | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | _PAGE_PRESENT Changing the flags back to 0x59

[REGRESSION] Boot failure with DEBUG_PAGEALLOC on Wii, after PPC32 KASAN patches

2019-08-13 Thread Jonathan Neuschäfer
Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman I can revert this commit, and then 5.3-rc2 (plus a patchset adding a serial driver) boot again. Christophe, is there anything I should test in order to figure out how to fix this properly? Thanks, Jonathan Neuschäfer sign

Re: [PATCH] powerpc/32s: fix boot failure with DEBUG_PAGEALLOC without KASAN.

2019-08-14 Thread Jonathan Neuschäfer
On Wed, Aug 14, 2019 at 05:28:35AM +, Christophe Leroy wrote: > When KASAN is selected, the definitive hash table has to be > set up later, but there is already an early temporary one. > > When KASAN is not selected, there is no early hash table, > so the setup of the definitive hash table can

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-17 Thread Jonathan Neuschäfer
On Mon, Dec 17, 2018 at 10:29:18AM +0100, Christophe Leroy wrote: > > With patches 1-3: > > [0.00] setbat(0, c000, , 0100, 311) > > [0.00] setbat(2, c100, 0100, 0080, 311) > > [0.00] setbat(4, d000, 1000, 0200, 791) > > What we see is

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Jonathan Neuschäfer
On Tue, Dec 18, 2018 at 09:18:42AM +, Christophe Leroy wrote: > The only difference I see then are the flags. Everything else is seems > identical. > > I know you tried already, but would you mind trying once more with the > following change ? > [...] > - setbat(idx, PAGE_OFFSET +

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Jonathan Neuschäfer
On Tue, Dec 18, 2018 at 04:04:42PM +0100, Christophe Leroy wrote: > Stupid of me. In fact at the time being, BATS cover both RO and RW data > areas, so it can definitly not be mapped with PAGE_KERNEL_ROX. > > In fact, as I have CONFIG_BDI_SWITCH in my setup, PAGE_KERNEL_TEXT is > PAGE_KERNEL_X on

[PATCH 1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node

2019-01-12 Thread Jonathan Neuschäfer
The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1) at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access by the PPC, 11 for GPIO lines that are configured for access by the ARM926. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts

[PATCH 2/2] powerpc: wii.dts: Add GPIO keys

2019-01-12 Thread Jonathan Neuschäfer
The Wii has POWER and EJECT buttons, which are connected through normalization logic to the GPIO controller (the length of an assertion of these signals is always the same, regardless of how long the user pressed the buttons). Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts

[PATCH 0/2] powerpc: wii.dts: GPIO interrupt and button support

2019-01-12 Thread Jonathan Neuschäfer
This patchset adds the necessary bits to wii.dts to enable interrupt support in the GPIO controller, and defines two GPIO-based buttons, the POWER button and the EJECT button. I will send another patchset which will implement interrupt support in the GPIO driver (gpio-hlwd.c). Jonathan

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-13 Thread Jonathan Neuschäfer
On Thu, Jan 10, 2019 at 03:11:38PM +, Christophe Leroy wrote: > The purpose of this serie is to: > - use BATs with STRICT_KERNEL_RWX on book3s (See patch 12 for details.) > - use LTLBs with STRICT_KERNEL_RWX on 8xx (See patch 14 for a few details.) Hi, I just tested the whole series on my Wii

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-13 Thread Jonathan Neuschäfer
On Sun, Jan 13, 2019 at 08:43:07PM +0100, Christophe Leroy wrote: > Le 13/01/2019 à 19:16, Jonathan Neuschäfer a écrit : > > I just tested the whole series on my Wii (I didn't test any intermediate > > steps). Without CONFIG_STRICT_KERNEL_RWX, it seems to work fine, but &g

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-14 Thread Jonathan Neuschäfer
On Mon, Jan 14, 2019 at 07:23:07PM +0100, Christophe Leroy wrote: > > > Le 13/01/2019 à 22:02, Jonathan Neuschäfer a écrit : > > On Sun, Jan 13, 2019 at 08:43:07PM +0100, Christophe Leroy wrote: > > > Le 13/01/2019 à 19:16, Jonathan Neuschäfer a écrit : > > > &g

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-15 Thread Jonathan Neuschäfer
On Tue, Jan 15, 2019 at 07:51:01AM +0100, Christophe Leroy wrote: > Le 15/01/2019 à 01:33, Jonathan Neuschäfer a écrit : [...] > > I've checked it patch-by-patch now (with STRICT_KERNEL_RWX): > > > > - patches 1 and 2 build and boot fine > > - patches 3 to 6 b

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-16 Thread Jonathan Neuschäfer
On Wed, Jan 16, 2019 at 07:55:29AM +0100, Christophe Leroy wrote: > Le 16/01/2019 à 01:35, Jonathan Neuschäfer a écrit : > > Thinning the kernel down a bit actually makes it boot again. Ooops...! > > Maybe enabling CONFIG_STRICT_KERNEL_RWX has made it just large enough to > >

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-16 Thread Jonathan Neuschäfer
On Wed, Jan 16, 2019 at 02:34:53PM +0100, Christophe Leroy wrote: > Le 16/01/2019 à 14:16, Jonathan Neuschäfer a écrit : > > On Wed, Jan 16, 2019 at 07:55:29AM +0100, Christophe Leroy wrote: > > > Le 16/01/2019 à 01:35, Jonathan Neuschäfer a écrit : > > > > Thinning

Re: [RESENDING PATCH] powerpc/wii: properly disable use of BATs when requested.

2019-01-16 Thread Jonathan Neuschäfer
code slightly more readable because the delta and size calculations stay in one visual block. It doesn't need to happen after delta is calculated. tentatively, Reviewed-by: Jonathan Neuschäfer Thanks, Jonathan signature.asc Description: PGP signature

Re: [RESENDING PATCH] powerpc/wii: properly disable use of BATs when requested.

2019-01-17 Thread Jonathan Neuschäfer
On Thu, Jan 17, 2019 at 11:29:06AM +0100, Christophe Leroy wrote: [...] > > > /* MEM2 64MB@0x1000 */ > > > delta = wii_hole_start + wii_hole_size; > > > + if (__map_without_bats) > > > + return delta; > > > + > > > > Nothing is visibly broken without this patch, eve

[PATCH] powerpc: wii: Remove outdated comment about memory fixups

2018-06-17 Thread Jonathan Neuschäfer
The workaround has been removed. What stays is just code to find the memory hole so the BATs can be configured properly in the function below. Fixes: 57deb8fea01f ("powerpc/wii: Don't rely on the reserved memory hack") Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/platfo

PPC32: Boot regression on Nintendo Wii, after create_branch rework in 5.8

2021-04-25 Thread Jonathan Neuschäfer
+--- arch/powerpc/lib/code-patching.c | 134 ++- arch/powerpc/lib/feature-fixups.c| 5 +- 6 files changed, 119 insertions(+), 84 deletions(-) Do you have any hints on how to debug and/or fix this issue? Best regards, Jonathan Neuschäfer sig

Re: PPC32: Boot regression on Nintendo Wii, after create_branch rework in 5.8

2021-04-28 Thread Jonathan Neuschäfer
Hi, On Wed, Apr 28, 2021 at 11:33:24AM +1000, Jordan Niethe wrote: > On Mon, Apr 26, 2021 at 1:40 AM Jonathan Neuschäfer > wrote: > > > > Hi, > > > > I recently booted my Wii again, and I noticed a regression at boot time. > > Output stops after the &qu

Re: [PATCH] powerpc/32: Fix boot failure with CONFIG_STACKPROTECTOR

2021-04-29 Thread Jonathan Neuschäfer
On Thu, Apr 29, 2021 at 04:52:09PM +, Christophe Leroy wrote: > Commit 7c95d8893fb5 ("powerpc: Change calling convention for > create_branch() et. al.") complexified the frame of function > do_feature_fixups(), leading to GCC setting up a stack > guard when CONFIG_STACKPROTECTOR is selected. >

Re: [PATCH v2 27/45] mfd: ntxec: Use devm_register_power_handler()

2021-11-06 Thread Jonathan Neuschäfer
*/ WARN_ON(!atomic_notifier_has_unique_priority(&restart_handler_list, nb)); As the NTXEC driver doesn't specify a priority, I think this is an issue to be fixed elsewhere. Other than that, it works and looks good, as far as I can tell. For this patch: Reviewed-by: Jonathan Neuschäfer Tes

Re: [PATCH v2 27/45] mfd: ntxec: Use devm_register_power_handler()

2021-11-08 Thread Jonathan Neuschäfer
On Sun, Nov 07, 2021 at 08:42:33PM +0300, Dmitry Osipenko wrote: [...] > EC drivers tend to use higher priority in general. Jonathan, could you > please confirm that NTXEC driver is a more preferable restart method > than the watchdog? Yes. The original firmware uses the NTXEC to restart, and it w

Re: [PATCH v2 27/45] mfd: ntxec: Use devm_register_power_handler()

2021-11-10 Thread Jonathan Neuschäfer
On Mon, Nov 08, 2021 at 02:36:42PM +0300, Dmitry Osipenko wrote: > 08.11.2021 14:22, Jonathan Neuschäfer пишет: > > On Sun, Nov 07, 2021 at 08:42:33PM +0300, Dmitry Osipenko wrote: > > [...] > >> EC drivers tend to use higher priority in general. Jonathan, could you > &

Re: [PATCH v2 2/4] dt-bindings: nintendo-otp: Document the Wii and Wii U OTP support

2021-06-26 Thread Jonathan Neuschäfer
ompatible strings. > > Signed-off-by: Emmanuel Gil Peyrot A link to the (third-party) documentation for the OTP device would be nice. Best regards, Jonathan Neuschäfer > --- > .../devicetree/bindings/nvmem/nintendo-otp.txt | 14 ++ > 1 file changed, 14 insertions(

Re: [PATCH v2 1/4] nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP

2021-06-26 Thread Jonathan Neuschäfer
atic struct platform_driver nintendo_otp_driver = { > + .probe = nintendo_otp_probe, > + .driver = { > + .name = "nintendo-otp", > + .of_match_table = nintendo_otp_of_table, > + }, > +}; > +module_platform_driver(nintendo_otp_driver); > +MODULE_AUTHOR("Emmanuel Gil Peyrot "); > +MODULE_DESCRIPTION("Nintendo Wii and Wii U OTP driver"); > +MODULE_LICENSE("GPL v2"); > -- > 2.31.1 > Tested-by: Jonathan Neuschäfer # on Wii Thanks, Jonathan Neuschäfer signature.asc Description: PGP signature

Re: [PATCH v2 3/4] powerpc: wii.dts: Expose the OTP on this platform

2021-06-26 Thread Jonathan Neuschäfer
ranges; otp@d8001ec { compatible = "nintendo,hollywood-otp"; reg = <0x0d8001ec 0x8>; }; }; Thanks, Jonathan Neuschäfer signature.asc Description: PGP signature

Re: [PATCH v2 4/4] powerpc: wii_defconfig: Enable OTP by default

2021-06-26 Thread Jonathan Neuschäfer
On Wed, May 19, 2021 at 11:50:44AM +0200, Emmanuel Gil Peyrot wrote: > This selects the nintendo-otp module when building for this platform, if > CONFIG_NVMEM is also selected. The 'if' is a bit confusing. CONFIG_NVRAM=y has indeed been in wii_defconfig since 2009. Thanks, Jon

Re: [PATCH v2 3/4] powerpc: wii.dts: Expose the OTP on this platform

2021-07-02 Thread Jonathan Neuschäfer
On Thu, Jul 01, 2021 at 09:56:55PM +0200, Emmanuel Gil Peyrot wrote: > On Sat, Jun 26, 2021 at 11:34:01PM +0000, Jonathan Neuschäfer wrote: > > On Wed, May 19, 2021 at 11:50:43AM +0200, Emmanuel Gil Peyrot wrote: [...] > > > + otp@d8001ec { > > > +

[PATCH 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-01-14 Thread Jonathan Neuschäfer
edded6xx/hlwd-gpio.c \ drivers/gpio/gpio-hlwd.c Cc: Albert Herranz Cc: Segher Boessenkool Signed-off-by: Jonathan Neuschäfer --- This driver currently uses __raw_readl and __raw_writel to access the GPIO controller's MMIO registers. I wonder if readl/writel plus explicit byte-swapp

[PATCH 6/6] powerpc: wii.dts: Add GPIO line names

2018-01-14 Thread Jonathan Neuschäfer
These are the GPIO line names on a Nintendo Wii, as documented in: https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot

[PATCH 5/6] powerpc: wii.dts: Add ngpios property

2018-01-14 Thread Jonathan Neuschäfer
The Hollywood GPIO controller supports 32 GPIOs, but on the Wii, only 24 are used. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts index 40b324b6391e

[PATCH 2/6] powerpc: wii: Explicitly configure GPIO owner for poweroff pin

2018-01-14 Thread Jonathan Neuschäfer
river. I think the Wii can be switched to the generic gpio-poweroff driver, after the GPIO driver is merged. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/platforms/embedded6xx/wii.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b

[PATCH 4/6] dt-bindings: gpio: Add binding for Wii GPIO controller

2018-01-14 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- .../bindings/gpio/nintendo,hollywood-gpio.txt | 27 ++ .../devicetree/bindings/powerpc/nintendo/wii.txt | 9 +--- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio

[PATCH 0/6] Nintendo Wii GPIO driver

2018-01-14 Thread Jonathan Neuschäfer
erent subsystems (GPIO, DT, core resource management), I guess it should be picked up patch-by-patch by the different maintainers. Jonathan Neuschäfer (6): resource: Extend the PPC32 reserved memory hack powerpc: wii: Explicitly configure GPIO owner for poweroff pin gpio: Add GPIO driver for Nin

[PATCH 1/6] resource: Extend the PPC32 reserved memory hack

2018-01-14 Thread Jonathan Neuschäfer
ed memory. This hack, however, doesn't account for the "resource"-based API in kernel/resource.c, because __request_region performs its own checks. Extend the hack to kernel/resource.c, to allow more drivers to allocate their MMIO regions on the Wii. Signed-off-by: Jon

Re: [PATCH 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-01-16 Thread Jonathan Neuschäfer
On Tue, Jan 16, 2018 at 10:42:54AM +0100, Linus Walleij wrote: > On Mon, Jan 15, 2018 at 4:13 AM, Jonathan Neuschäfer > wrote: > > > This patch is based on code developed by Albert Herranz and the GameCube > > Linux Team, file arch/powerpc/platforms/embedded6xx/hlwd-gpi

Re: [PATCH 4/6] dt-bindings: gpio: Add binding for Wii GPIO controller

2018-01-19 Thread Jonathan Neuschäfer
On Fri, Jan 19, 2018 at 05:05:21PM -0600, Rob Herring wrote: > On Mon, Jan 15, 2018 at 04:13:59AM +0100, Jonathan Neuschäfer wrote: > > Signed-off-by: Jonathan Neuschäfer > > --- > > .../bindings/gpio/nintendo,hollywood-gpio.txt | 27 > > ++ &

[PATCH v2 0/6] Nintendo Wii GPIO driver

2018-01-21 Thread Jonathan Neuschäfer
erent subsystems (GPIO, DT, core resource management), I guess it should be picked up patch-by-patch by the different maintainers. The main difference between v2 and the previous version is that I rewrote the driver on top of the GPIO_GENERIC library, saving 60 lines of code. Jonathan Neuschäf

[PATCH v2 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-01-21 Thread Jonathan Neuschäfer
aResero/GC-Wii-Linux-Kernels, but has grown quite dissimilar. Signed-off-by: Jonathan Neuschäfer Cc: Albert Herranz Cc: Segher Boessenkool --- v2: - Change hlwd_gpio_driver.driver.name to "gpio-hlwd" to match the filename (was "hlwd_gpio") - Remove unnecessary include o

[PATCH v2 6/6] powerpc: wii.dts: Add GPIO line names

2018-01-21 Thread Jonathan Neuschäfer
These are the GPIO line names on a Nintendo Wii, as documented in: https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs Signed-off-by: Jonathan Neuschäfer --- v2: - no change --- arch/powerpc/boot/dts/wii.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/boot/dts

[PATCH v2 1/6] resource: Extend the PPC32 reserved memory hack

2018-01-21 Thread Jonathan Neuschäfer
ed memory. This hack, however, doesn't account for the "resource"-based API in kernel/resource.c, because __request_region performs its own checks. Extend the hack to kernel/resource.c, to allow more drivers to allocate their MMIO regions on the Wii. Signed-off-by: Jonathan Neuschä

[PATCH v2 2/6] powerpc: wii: Explicitly configure GPIO owner for poweroff pin

2018-01-21 Thread Jonathan Neuschäfer
river. I think the Wii can be switched to the generic gpio-poweroff driver, after the GPIO driver is merged. Signed-off-by: Jonathan Neuschäfer --- v2: - no change --- arch/powerpc/platforms/embedded6xx/wii.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/platforms/embedd

[PATCH v2 4/6] dt-bindings: gpio: Add binding for Wii GPIO controller

2018-01-21 Thread Jonathan Neuschäfer
The Nintendo Wii game console has a GPIO controller, which is used for the optical disk slot LED, buttons, poweroff, etc. This patch adds a binding for this GPIO controller. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring --- v2: - Drop the leading zero in the example, as suggested

[PATCH v2 5/6] powerpc: wii.dts: Add ngpios property

2018-01-21 Thread Jonathan Neuschäfer
The Hollywood GPIO controller supports 32 GPIOs, but on the Wii, only 24 are used. Signed-off-by: Jonathan Neuschäfer --- v2: - no change --- arch/powerpc/boot/dts/wii.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts index

Re: [PATCH v2 1/6] resource: Extend the PPC32 reserved memory hack

2018-01-23 Thread Jonathan Neuschäfer
On Tue, Jan 23, 2018 at 11:58:06PM +1100, Michael Ellerman wrote: > Jonathan Neuschäfer writes: > > > On the Nintendo Wii, there are two ranges of physical memory, and MMIO > > in between, but Linux on ppc32 doesn't support discontiguous memory. > > Therefore a

Re: [PATCH v2 1/6] resource: Extend the PPC32 reserved memory hack

2018-01-27 Thread Jonathan Neuschäfer
On Wed, Jan 24, 2018 at 12:23:05PM +1100, Michael Ellerman wrote: > Jonathan Neuschäfer writes: [...] > > Do you have any pointer on how to implement discontiguous memory > > support? CONFIG_ARCH_SPARSEMEM_ENABLE seems relevant. > > I'm not really sure what the key i

Re: [PATCH v2 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-01-31 Thread Jonathan Neuschäfer
Hi, On Sun, Jan 28, 2018 at 07:31:58PM +0200, Andy Shevchenko wrote: > On Mon, Jan 22, 2018 at 7:04 AM, Jonathan Neuschäfer > wrote: > > Style issues below. > > > +#define HW_GPIO_OWNER 0x3c > > + > > + > > +struct hlwd_gpio { >

[PATCH] powerpc: wii: Probe the whole devicetree

2018-02-06 Thread Jonathan Neuschäfer
. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/platforms/embedded6xx/wii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index f598d5fe1d72..4de26c3c4f6d 100644 --- a/arch/powerpc/platforms

Re: [PATCH v2 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-02-07 Thread Jonathan Neuschäfer
On Wed, Feb 07, 2018 at 01:29:45PM +0100, Linus Walleij wrote: > On Mon, Jan 22, 2018 at 6:04 AM, Jonathan Neuschäfer > wrote: > > > The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller > > that supports a configurable number of pins (up to 3

[PATCH v3 0/4] Nintendo Wii GPIO driver

2018-02-09 Thread Jonathan Neuschäfer
k around a resource allocation problem on PPC32. In this version, I dropped this patch, because the problem will be solved differently and in a separate patchset. I also dropped the dt-bindings patch, because Linus Walleij has already applied it. Jonathan Neuschäfer (4): powerpc: wii: Explicitly conf

[PATCH v3 1/4] powerpc: wii: Explicitly configure GPIO owner for poweroff pin

2018-02-09 Thread Jonathan Neuschäfer
river. I think the Wii can be switched to the generic gpio-poweroff driver, after the GPIO driver is merged. Signed-off-by: Jonathan Neuschäfer --- v2, v3: - no change --- arch/powerpc/platforms/embedded6xx/wii.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/plat

[PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii

2018-02-09 Thread Jonathan Neuschäfer
aResero/GC-Wii-Linux-Kernels, but has grown quite dissimilar. Signed-off-by: Jonathan Neuschäfer Cc: Albert Herranz Cc: Segher Boessenkool <--- v3: - Do some style cleanups, as suggest by Andy Shevchenko v2: - Change hlwd_gpio_driver.driver.name to "gpio-hlwd" to match the fi

[PATCH v3 3/4] powerpc: wii.dts: Add ngpios property

2018-02-09 Thread Jonathan Neuschäfer
The Hollywood GPIO controller supports 32 GPIOs, but on the Wii, only 24 are used. Signed-off-by: Jonathan Neuschäfer --- v2, v3: - no change --- arch/powerpc/boot/dts/wii.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts

[PATCH v3 4/4] powerpc: wii.dts: Add GPIO line names

2018-02-09 Thread Jonathan Neuschäfer
These are the GPIO line names on a Nintendo Wii, as documented in: https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs Signed-off-by: Jonathan Neuschäfer --- v2, v3: - no change --- arch/powerpc/boot/dts/wii.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/boot/dts

Re: [PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii

2018-02-09 Thread Jonathan Neuschäfer
On Fri, Feb 09, 2018 at 01:07:29PM +0100, Jonathan Neuschäfer wrote: > The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller > that supports a configurable number of pins (up to 32), interrupts, and > some special mechanisms to share the controller between

Re: [PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii

2018-02-09 Thread Jonathan Neuschäfer
On Fri, Feb 09, 2018 at 05:30:55PM +0200, Andy Shevchenko wrote: > On Fri, Feb 9, 2018 at 2:07 PM, Jonathan Neuschäfer > wrote: > > The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller > > that supports a configurable number of pins (up to 32),

[PATCH 6/6] powerpc: wii: Don't rely on reserved memory hack if DISCONTIGMEM is set

2018-02-20 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/platforms/embedded6xx/wii.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 4682327f76a9..589ac87a3ce0 100644 --- a/arch

[PATCH 4/6] powerpc: numa: Restrict fake NUMA enulation to CONFIG_NUMA systems

2018-02-20 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/numa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index df03a65b658f..dfe279529463 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -738,7 +738,8

[PATCH 5/6] powerpc: Implement DISCONTIGMEM and allow selection on PPC32

2018-02-20 Thread Jonathan Neuschäfer
The implementation of pfn_to_nid and pfn_valid in mmzone.h is based on arch/metag's implementation. Signed-off-by: Jonathan Neuschäfer --- NOTE: Checking NODE_DATA(nid) in pfn_to_nid appears to be uncommon. Running up to MAX_NUMNODES instead of checking NODE_DATA(nid) would requir

[PATCH 3/6] powerpc: numa: Use the right #ifdef guards around functions

2018-02-20 Thread Jonathan Neuschäfer
, but CONFIG_NEED_MULTIPLE_NODES.) Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/numa.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 0570bc2a0b13..df03a65b658f 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -254,6 +254,7 @@ s

[PATCH 2/6] powerpc: numa: Fix overshift on PPC32

2018-02-20 Thread Jonathan Neuschäfer
When read_n_cells is compiled for PPC32, "result << 32" causes an overshift, which GCC doesn't like. Fix this by using u64 instead of unsigned long. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-20 Thread Jonathan Neuschäfer
). This patch is the first step towards proper support for discontiguous memory on PPC32 by using pfn_valid to check if a pointer points into RAM, rather than open-coding the check. It should result in no functional difference. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/pgtable_32.c | 2

[PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-20 Thread Jonathan Neuschäfer
aviour, or CONFIG_DISCONTIGMEM to get the new behaviour. Some parts of this patchset are probably not ideal (I'm thinking of my implementation of pfn_to_nid here), and will require some discussion/ changes. [1]: https://www.spinics.net/lists/devicetree/msg213956.html Jonathan Neuschäfer (6): powerpc/mm/32

Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-21 Thread Jonathan Neuschäfer
for the RAM check in __ioremap_caller, except that there's this code, which apparently trashes memblock 0 completely on non-CONFIG_NEED_MULTIPLE_NODES: https://elixir.bootlin.com/linux/v4.16-rc2/source/arch/powerpc/mm/mem.c#L223 Thanks, Jonathan Neuschäfer signature.asc Description: PGP signature

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Jonathan Neuschäfer
Hi, On Wed, Feb 21, 2018 at 08:06:10AM +0100, Christophe LEROY wrote: > > > Le 20/02/2018 à 17:14, Jonathan Neuschäfer a écrit : > > This patchset adds support for DISCONTIGMEM on 32-bit PowerPC. This is > > required to properly support the Nintendo Wii's memory layo

Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 02:51:19PM +0100, Jonathan Neuschäfer wrote: [...] > While looking through arch/powerpc/mm, I noticed that there's a > page_is_ram function, which simply uses the memblocks directly, on > PPC32. Oops, I misread the code here. memblock is used on PPC64. >

Re: [PATCH 5/6] powerpc: Implement DISCONTIGMEM and allow selection on PPC32

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 07:46:28AM +0800, kbuild test robot wrote: [...] > >> include/linux/mmzone.h:1239:19: error: conflicting types for 'pfn_valid' > static inline int pfn_valid(unsigned long pfn) > ^ >In file included from include/linux/mmzone.h:912:0, >

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Jonathan Neuschäfer
PPC64 on PPC32 *should* work, but I think due to > > the following line in initmem_init, it won't: > > > > memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0); > > Can't we just fix that ? I'll give it a try. Thanks, Jonathan Neuschäfer signature.asc Description: PGP signature

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Jonathan Neuschäfer
k_set_node as called above only assigns all memory to node 0 and merges *adjacent* memblocks. It doesn't merge the memblocks on the Wii, which are far apart. So now I actually have a working patchset (coming soon), that's a good deal shorter than this patchset, and hopefully won't break CONFIG_HIGHMEM in the same way. Thanks for your input! :) Jonathan Neuschäfer signature.asc Description: PGP signature

[PATCH 0/5] PPC32/ioremap: Use memblock API to check for RAM

2018-02-22 Thread Jonathan Neuschäfer
tophe Leroy for reviewing the previous patchset. [1]: https://www.spinics.net/lists/kernel/msg2726786.html Jonathan Neuschäfer (5): powerpc: mm: Simplify page_is_ram by using memblock_is_memory powerpc: mm: Use memblock API for PPC32 page_is_ram powerpc/mm/32: Use page_is_ram to check for RAM

[PATCH 1/5] powerpc: mm: Simplify page_is_ram by using memblock_is_memory

2018-02-22 Thread Jonathan Neuschäfer
Instead of open-coding the search in page_is_ram, call memblock_is_memory. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/mem.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index fe8c61149fb8..da4e1555d61d

[PATCH 4/5] powerpc: wii: Don't rely on the reserved memory hack

2018-02-22 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/platforms/embedded6xx/wii.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 4682327f76a9..fc00d82691e1 100644 --- a

[PATCH 2/5] powerpc: mm: Use memblock API for PPC32 page_is_ram

2018-02-22 Thread Jonathan Neuschäfer
To support accurate checking for different blocks of memory on PPC32, use the same memblock-based approach that's already used on PPC64 also on PPC32. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/mem.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/mm/mem.c b

[PATCH 3/5] powerpc/mm/32: Use page_is_ram to check for RAM

2018-02-22 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/pgtable_32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index d35d9ad3c1cd..d54e1a9c1c99 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm

[PATCH 5/5] powerpc/mm/32: Remove the reserved memory hack

2018-02-22 Thread Jonathan Neuschäfer
This hack, introduced in commit c5df7f775148 ("powerpc: allow ioremap within reserved memory regions") is now unnecessary. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/init_32.c| 5 - arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtable_32.c | 3 +-- 3 files

Re: [PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii

2018-02-22 Thread Jonathan Neuschäfer
On Thu, Feb 22, 2018 at 01:57:07PM +0100, Linus Walleij wrote: > On Fri, Feb 9, 2018 at 1:07 PM, Jonathan Neuschäfer > wrote: > > > The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller > > that supports a configurable number of pins (up to 3

Re: [PATCH 0/5] PPC32/ioremap: Use memblock API to check for RAM

2018-02-24 Thread Jonathan Neuschäfer
On Fri, Feb 23, 2018 at 09:01:17AM +0100, Christophe LEROY wrote: > > > Le 22/02/2018 à 13:15, Jonathan Neuschäfer a écrit : > > This patchset solves the same problem as my previous one[1] but follows > > a rather different approach. Instead of implementing DISCONTIGMEM

[PATCH] powerpc: wii.dts: Add drive slot LED

2018-03-17 Thread Jonathan Neuschäfer
The Wii has a blue LED in the disk drive slot, which is controlled via a GPIO line. Add this LED to wii.dts, and mark it as a panic-indicator. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/boot

Re: [PATCH 3/5] powerpc/mm/32: Use page_is_ram to check for RAM

2018-03-27 Thread Jonathan Neuschäfer
Hi, On Mon, Mar 19, 2018 at 10:19:32PM +1100, Michael Ellerman wrote: > Michael Ellerman writes: > > Jonathan Neuschäfer writes: [...] > >> - if (slab_is_available() && (p < virt_to_phys(high_memory)) && > >> + if (page_is_ram(__phys_to_pfn

[PATCH v2 0/5] PPC32/ioremap: Use memblock API to check for RAM

2018-03-27 Thread Jonathan Neuschäfer
added back the p < virt_to_phys(high_memory) check in __ioremap_caller because high memory should be allocatable through ioremap - I expanded the commit messages a bit Jonathan Neuschäfer (5): powerpc: mm: Simplify page_is_ram by using memblock_is_memory powerpc: mm: Use memblock API for PP

[PATCH v2 1/5] powerpc: mm: Simplify page_is_ram by using memblock_is_memory

2018-03-27 Thread Jonathan Neuschäfer
Instead of open-coding the search in page_is_ram, call memblock_is_memory. Signed-off-by: Jonathan Neuschäfer --- v2: no changes --- arch/powerpc/mm/mem.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index fe8c61149fb8

[PATCH v2 4/5] powerpc: wii: Don't rely on the reserved memory hack

2018-03-27 Thread Jonathan Neuschäfer
__ioremap_caller in arch/powerpc/mm/pgtable_32.c ensures that multiple memblocks are properly considered in ioremap; this makes it unnecessary to set __allow_ioremap_reserved. Signed-off-by: Jonathan Neuschäfer --- v2: Add some text to the commit message. --- arch/powerpc/platforms/embedded6xx

[PATCH v2 2/5] powerpc: mm: Use memblock API for PPC32 page_is_ram

2018-03-27 Thread Jonathan Neuschäfer
To support accurate checking for different blocks of memory on PPC32, use the same memblock-based approach that's already used on PPC64 also on PPC32. Signed-off-by: Jonathan Neuschäfer --- v2: no changes --- arch/powerpc/mm/mem.c | 4 1 file changed, 4 deletions(-) diff --git a

[PATCH v2 5/5] powerpc/mm/32: Remove the reserved memory hack

2018-03-27 Thread Jonathan Neuschäfer
This hack, introduced in commit c5df7f775148 ("powerpc: allow ioremap within reserved memory regions") is now unnecessary. Signed-off-by: Jonathan Neuschäfer --- v2: no changes --- arch/powerpc/mm/init_32.c| 5 - arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtabl

[PATCH v2 3/5] powerpc/mm/32: Use page_is_ram to check for RAM

2018-03-27 Thread Jonathan Neuschäfer
hat only ioremap requests for low RAM will be denied. Reported by Michael Ellerman. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/mm/pgtable_32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index d35d9ad3c1cd..6668ecc04

[PATCH 2/2] powerpc: wii_defconfig: Enable GPIO-related options

2018-04-30 Thread Jonathan Neuschäfer
Now that there's a GPIO driver for the Wii, let's enable the following drivers: - the GPIO driver itself - gpio-keys - gpio-poweroff - gpio-leds and a few LED triggers Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/configs/wii_defconfig | 8 1 file changed, 8 insertion

[PATCH 1/2] powerpc: wii_defconfig: Disable Ethernet driver support code

2018-04-30 Thread Jonathan Neuschäfer
delta kernel_config_data 13691 13324-367 Total: Before=8341718, After=8341351, chg -0.00% Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/configs/wii_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/co

Re: [PATCH 2/2] powerpc: wii_defconfig: Enable GPIO-related options

2018-05-07 Thread Jonathan Neuschäfer
On Mon, Apr 30, 2018 at 03:42:47PM +0200, Jonathan Neuschäfer wrote: > Now that there's a GPIO driver for the Wii, let's enable the following > drivers: > > - the GPIO driver itself > - gpio-keys > - gpio-poweroff > - gpio-leds and a few LED triggers > &g

[PATCH v2 0/4] powerpc: wii_defconfig updates

2018-05-07 Thread Jonathan Neuschäfer
onfig dependencies. This is now fixed. I took the opportunity of a v2 to add two more patches that I wanted to send anyway. The SDHCIs in the Wii are currently unusable due to bugs/ problems in the flipper-pic/hlwd-pic drivers, but I know how to fix those, and will send patches. Jonathan Neuschäf

[PATCH v2 1/4] powerpc: wii_defconfig: Disable Ethernet driver support code

2018-05-07 Thread Jonathan Neuschäfer
The Wii doesn't have built-in Ethernet and USB Ethernet adapters are in a different menu. Disable CONFIG_ETHERNET to save some space in support code for Ethernet drivers. Note that this patch doesn't disable any Ethernet drivers, because they are not enabled by default. Signed-off-by

[PATCH v2 2/4] powerpc: wii_defconfig: Enable GPIO-related options

2018-05-07 Thread Jonathan Neuschäfer
Now that there's a GPIO driver for the Wii, let's enable the following drivers: - the GPIO driver itself - gpio-keys - gpio-poweroff - gpio-leds and a few LED triggers Signed-off-by: Jonathan Neuschäfer --- v2: - Set CONFIG_NEW_LEDS=y and CONFIG_LEDS_TRIGGERS=y, without which som

[PATCH v2 4/4] powerpc: wii_defconfig: Disable BCMA support

2018-05-07 Thread Jonathan Neuschäfer
The B43 driver only needs CONFIG_SSB to support the WLAN card found in the Wii. Configure it accordingly, and disable BCMA bus support to save a bit of space. Signed-off-by: Jonathan Neuschäfer --- v2: - Patch added to the series --- arch/powerpc/configs/wii_defconfig | 1 + 1 file changed, 1

[PATCH v2 3/4] powerpc: wii_defconfig: Enable Wii SDHCI driver

2018-05-07 Thread Jonathan Neuschäfer
This allows access to the SD card and the BCM4318 Wifi module. Signed-off-by: Jonathan Neuschäfer --- Note that until some fixes in the interrupt controller drivers used on the Wii, the SDHCI controllers will not be usable. v2: - Patch added to the series --- arch/powerpc/configs

Re: [PATCH v2 0/4] powerpc: wii_defconfig updates

2018-05-07 Thread Jonathan Neuschäfer
I forgot to CC the right set of people/mailing lists on the cover letter. Sorry. Here it is: On Mon, May 07, 2018 at 04:20:15PM +0200, Jonathan Neuschäfer wrote: > v1: https://www.spinics.net/lists/kernel/msg2790389.html > https://www.spinics.net/lists/kernel/msg2790385.html >

[PATCH 0/2] powerpc: Wii IRQ fixes

2018-05-10 Thread Jonathan Neuschäfer
ution for the problem at hand, but it works and should only cause problems when both processors in the system (PPC and ARM) try to use the same interrupt, if at all. Jonathan Neuschäfer (2): powerpc: flipper-pic: Don't match all IRQ domains powerpc: hlwd-pic: Prevent interrupts from being

[PATCH 1/2] powerpc: flipper-pic: Don't match all IRQ domains

2018-05-10 Thread Jonathan Neuschäfer
On the Wii, there is a secondary IRQ controller (hlwd-pic), so flipper-pic's match operation should not be hardcoded to return 1. In fact, the default matching logic is sufficient, and we can completely omit flipper_pic_match. Signed-off-by: Jonathan Neuschäfer --- Note: This shouldn&#x

[PATCH 2/2] powerpc: hlwd-pic: Prevent interrupts from being handled by Starlet

2018-05-10 Thread Jonathan Neuschäfer
side; this will also make sure that Linux can properly talk to the SD card controller (and potentially other devices). If access to a device through IPC is desired in the future, interrupts from that device should not be handled by Linux directly. [1]: https://github.com/lewurm/mini Signed-off

  1   2   >