Skip to contentSkip to conversation

Regmap regression in next caused by of_iomap change

DISCUSSION Tony Lindgren 3 participants 4 messages Sep 8, 2016 – Sep 12, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

Looks like commit 39de2c4275a9 ("mfd: syscon: Make use of of_iomap") makes at least MMC PBIAS regulator stop working on omap3.

That's probably because of_syscon_register uses the now unintialized struct resource res to set syscon_config.max_register.

I have a strange deja vu feeling that we've been through this before :) See commit ca668f0edfae ("mfd: syscon: Set regmap max_register in of_syscon_register")

Maybe we should add comments there instead?

Regards,

Tony

#1 lore raw
Quoted 7 lines · CEST Tony Lindgren

Hi,

Looks like commit 39de2c4275a9 ("mfd: syscon: Make use of of_iomap") makes at least MMC PBIAS regulator stop working on omap3.

That's probably because of_syscon_register uses the now unintialized struct resource res to set syscon_config.max_register.

Looks correct. Lee, please send a revert of that patch to Linus along with any other fixes you may have.

Quoted 5 lines

I have a strange deja vu feeling that we've been through this before See commit ca668f0edfae ("mfd: syscon: Set regmap max_register in of_syscon_register")

Maybe we should add comments there instead?

I wonder why gcc didn't detect this case. I usually do my test builds with -Wmaybe-uninitialized that should have caught it but didn't.

Arnd

#3 lore raw
In reply to Lee Jones
Quoted 8 lines · CEST Lee Jones
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · CEST Tony Lindgren

Hi,

Looks like commit 39de2c4275a9 ("mfd: syscon: Make use of of_iomap") makes at least MMC PBIAS regulator stop working on omap3.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

That's probably because of_syscon_register uses the now unintialized struct resource res to set syscon_config.max_register.

Looks correct. Lee, please send a revert of that patch to Linus along with any other fixes you may have.

No need. It's not in Mainline.

Ah, good, I misread the history then.

Arnd

#2 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · CEST Tony Lindgren

Hi,

Looks like commit 39de2c4275a9 ("mfd: syscon: Make use of of_iomap") makes at least MMC PBIAS regulator stop working on omap3.

That's probably because of_syscon_register uses the now unintialized struct resource res to set syscon_config.max_register.

Looks correct. Lee, please send a revert of that patch to Linus along with any other fixes you may have.

No need. It's not in Mainline.

Quoted 9 lines
Quoted 5 lines

I have a strange deja vu feeling that we've been through this before See commit ca668f0edfae ("mfd: syscon: Set regmap max_register in of_syscon_register")

Maybe we should add comments there instead?

I wonder why gcc didn't detect this case. I usually do my test builds with -Wmaybe-uninitialized that should have caught it but didn't.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog