[Letux-kernel] [PATCH 00/20] A bunch of JZ4730 fixups for letux-kernel
H. Nikolaus Schaller
hns at goldelico.com
Sun Dec 20 19:18:44 CET 2020
> Am 20.12.2020 um 19:11 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
> Now the gpiolib IMHO doesn't either.
>
> So nobody is setting the gpio to output - unless it is different from how
> it works on the OMAP. There we have to explicitly add some pinmux for
> every SoC pad which also tells if they are input or output. I haven't
> looked into the CI20 device tree if this is the same for JZ.
>
> It may of course be different, e.g. that the first call to gpio_set_value()
> should make it an output.
That wasn't precise. When a driver requests a gpio it tells gpiolib
if it wants to read or write. This should make the gpio-controller driver
set the correct bits in the gpio-controller.
OMAP may be a bad example because it has two bits making an input an input.
one is in pinmux to enable the input transistor. The other is the direction
in the gpio controller. Both must be defined as input.
> But all this brings me a new idea.
>
> What do you think about using ioremap to read PAGPDIR, set bit 21 and write
> it back at the end of mmc_probe (where my register dump takes place)?
>
> At least for checking if this is the issue. If it works and we can boot with
> this hack it becomes even easier to debug the kernel from a shell command
> line...
We can then check other gpios what they are doing and if there is a bug
in the gpio driver. And we can add printk to the gpio driver.
BR,
Nikolaus
More information about the Letux-kernel
mailing list