GPIO offsets used by userspace

Andrew Jeffery andrew at aj.id.au
Tue Feb 7 12:41:57 AEDT 2017


On Mon, 2017-01-30 at 12:04 +1030, Andrew Jeffery wrote:
> Hi all,
> 
> Just a heads up that when the linked patch is pulled into the OpenBMC
> kernel it will break our userspace. We will need to synchronise the
> kernel bump with the fixes for the machine configs to update the magic
> GPIO offset number.
> 
> https://lkml.org/lkml/2017/1/26/786
> 
> The magic offset is essentially 512-(ngpios) (I don't know why, but
> that's the behaviour), and this now varies between AST2400 and AST2500
> systems due to the AST2500 having an extra bank, and also because the
> AST2400 has a "hole" at the end of its GPIO number space.
> 

For those interested I've pushed a patch to skeleton that generalises
assignment of the GPIO_BASE value (i.e. it now dynamically detects the
chip base and so is also backwards compatible):

https://gerrit.openbmc-project.xyz/#/c/2261/

If you have any better ideas for an interim solution please speak up.

The rough plan is to apply that and then pull in the new kernel. Joel
has a testing commit here:

https://gerrit.openbmc-project.xyz/#/c/2257/

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170207/c03d0cfd/attachment.sig>


More information about the openbmc mailing list