This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

problem writing PINCNTLx registers with linux-2.6..37-psp04.01.00.06.patch2



The muxmodes are defined for all of the multiplexed pins in $LINUX/arch/arm/mach-omap2/mux814x.c.  The problem occurs with the two entries in ti814x_muxmodes[] that have NULL in the mode0 position:

223:       _TI814X_MUXENTRY(MLBP_SIG_N, 0,
224:                        NULL, NULL, NULL, NULL,
225:                        NULL, NULL, NULL, "gpio1_08_mux1"),

229:       _TI814X_MUXENTRY(MLBP_DAT_N, 0,
230:                        NULL, NULL, NULL, NULL,
231:                        NULL, NULL, NULL, "gpio1_10_mux1"),

A call to omap_mux_init_signal() to initialize either of these pins fails with a "Could not find signal" error message from _omap_mux_get_by_name().  As far as I can tell, the software uses a <mode0.modeN> naming convention that fails when mode0 is NULL.  To work around this problem, I replaced the first null on line 224 with "pincntl63" and the first nulll on line 230 with "pincntl65".

  • Hi Gary,

    If the mux mode0 is NULL then you have to call simply with mux mode name like

    omap_mux_init_signal("gpio1_08_mux1", <flags>);

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi AnilKumar,

    Your response shows how to duplicate the problem.  Please try it.  The code will build okay.  At runtime, you will get an error message that says _omap_get_by_name() could not find "gpio1_08_mux1". 

    Thanks - Gary

  • Hi Gary,

    I try your work around and it doesn't work. I'm not able to control the GPIO.

    Do you have another option?

    Thank you.

    Kefil

  • Kefil,

    Can you be a little more specific on the failure mode?  The problem I had was a run-time error message "_omap_get_by_name() could not find "gpio1_08_mux1" when the linux kernel booted.  The modification fixed that problem.  I enabled user mode access to gpios and manually toggled the four GPIOs driving LEDs on my target board.  Then wrote a simple driver to toggle a gpio pin and measure the interrupt latency from the rising edge of the gpio output.  The GPIO pins are working on our target board.

    Thanks - Gary