Subject: ppcgpio/gpio_opb driver not probing/crashing
To: None <>
From: Peter Seebach <>
List: port-powerpc
Date: 03/19/2006 07:49:10
Phase 1:  The gpio_opb driver is coming back "not configured".  A bit of
checking reveals that the driver is checking to see whether the
opb_attach_args name is "ppcgpio", but the name in the table is "gpio".
Okay, fixed that.

Phase 2:

panic: kernel diagnostic assertion "!ifattr || cfdriver_get_iattr(parent->dv_cfdriver, ifattr)" failed: file "../../../../kern/subr_autoconf.c", line 703

ifattr is the string "gpio".

The offending line is:
        (void) config_search_ia(gpio_search, self, "gpio", NULL);

The man page for the various config_* functions doesn't mention
config_search_ia, but it appears to be sanity-checking that the gpio driver
actually offers the gpio attribute.  Which it doesn't.  After that, it's
supposed to find child devices which match that attribute, and attach
them.  Now, on my system, I don't care; there are no child devices, I want
the gpio device so I can communicate with it directly.  On some systems,
there appear to be devices which attach to this, but it hardly matters,
because they don't use the interface anyway:

files.obs405:device obsled
files.obs405:attach  obsled at ppcgpio
files.obs405:file       arch/evbppc/obs405/dev/obsled.c         obsled

So this code strikes me as wrong, but I would hesitate to change anything
in a routine that apparently worked in the past on a system I don't have
access to to test on.

Does anyone still have obs405 systems to poke at, or some recollection of
what this driver is trying to do?  Simply changing "gpio" to NULL makes
the driver probe alright, but calling this ugly is an insult to ugly hacks