* orion5x mpp/gpio issue
@ 2012-01-03 22:45 Ash Hughes
0 siblings, 0 replies; only message in thread
From: Ash Hughes @ 2012-01-03 22:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I recently tried to build a new kernel and ran into an error with GPIOs
on my device. The MPP setup code has changed since I last compiled and
it now seems that some of the information in the mpp_list is being
ignored.
I've traced this back to arch/arm/plat-orion/mpp.c. In function:
void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int
variant_mask,
unsigned int mpp_max, unsigned int dev_bus)
there is the following:
if (sel != 0)
gpio_mode = 0;
sel is the value to be written to the MPP config registers and this is
not 0 for some pins (>16 and perhaps a few others, see
arch/arm/plat-orion/mpp.h). This means these pins will not be recorded
in the orion_gpio_chip valid_input and valid_output vars, which makes
them unavailable for drivers, despite the mpp_list defined for the
device (and the device registers being set correctly!).
What is the reason for this limitation? I've seen that some devices
(e.g. arch/arm/mach-orion5x/d2net-setup.c) use orion_gpio_set_valid to
manually enable higher GPIOs, along with the comment "/* Configure GPIO
over MPP max number. */" Is this the correct workaround to enable higher
GPIOs or should the code above not be included?
Apologies if there has already been a discussion on this, I couldn't
find one with a quick search!
Many thanks
Ash
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-03 22:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 22:45 orion5x mpp/gpio issue Ash Hughes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).