<font size=2 face="sans-serif">Hi all,</font>
<br>
<br><font size=2 face="sans-serif">i need to set the pin-mux of the board
init code depending on an ID coming from </font>
<br><font size=2 face="sans-serif">an i2C EEPROM of the board.</font>
<br><font size=2 face="sans-serif">Is it possible to do something like
this:</font>
<br>
<br>
<br><font size=2 face="Sans">...</font>
<br>
<br><font size=2 color=#820040 face="Sans"><b>//Using the e.g. the </b></font><font size=2 face="Sans"><b>postcore_initcall</b></font><font size=2 color=#820040 face="Sans"><b>
phase to init i2C</b></font>
<br><font size=2 color=#820040 face="Sans"><b>static</b></font><font size=2 face="Sans">
</font><font size=2 color=#820040 face="Sans"><b>int</b></font>
<br><font size=2 face="Sans"><b>ecuv6_postcore_init</b>(</font><font size=2 color=#820040 face="Sans"><b>void</b></font><font size=2 face="Sans">)</font>
<br><font size=2 face="Sans">{</font>
<br><font size=2 face="Sans"> </font><font size=2 color=#3f8080 face="Sans">//Set
I2C EEPROM (24C32R) PIN MUX</font>
<br><font size=2 face="Sans"> mxc_iomux_v3_setup_multiple_pads(i2c_eeprom_pads,
ARRAY_SIZE(i2c_eeprom_pads));</font>
<br><font size=2 face="Sans"> imx53_add_i2c2(NULL);</font>
<br><font size=2 face="Sans"> </font><font size=2 color=#820040 face="Sans"><b>return</b></font><font size=2 face="Sans">
0;</font>
<br><font size=2 face="Sans">}</font>
<br><font size=2 face="Sans"><b>postcore_initcall</b>(ecuv6_postcore_init);</font>
<br>
<br><font size=2 color=#820040 face="Sans"><b>//In the </b></font><font size=2 face="Sans"><b>console_initcall</b></font><font size=2 color=#820040 face="Sans"><b>
phase, i2C should be probed to read ID</b></font>
<br><font size=2 color=#820040 face="Sans"><b>static</b></font><font size=2 face="Sans">
</font><font size=2 color=#820040 face="Sans"><b>int</b></font>
<br><font size=2 face="Sans"><b>ecuv6_console_init</b>(</font><font size=2 color=#820040 face="Sans"><b>void</b></font><font size=2 face="Sans">)</font>
<br><font size=2 face="Sans">{</font>
<br><font size=2 face="Sans"> imx53_init_lowlevel(0);</font>
<br><font size=2 face="Sans"> ecuv6_set_system_serial();</font>
<br><font size=2 face="Sans">
</font>
<br><font size=2 face="Sans"> //get_bb_pcb_number
reads data from </font>
<br><font size=2 face="Sans"> </font><font size=2 color=#820040 face="Sans"><b>char</b></font><font size=2 face="Sans">
bb_ID;</font>
<br><font size=2 face="Sans"> bb_ID
= get_i2c_ID();</font>
<br>
<br><font size=2 face="Sans"> //Set
Pinmux depending on i2C result</font>
<br><font size=2 face="Sans"> </font><font size=2 color=#820040 face="Sans"><b>if</b></font><font size=2 face="Sans">(bb_ID
= 0xAB) {</font>
<br><font size=2 face="Sans">
mxc_iomux_v3_setup_multiple_pads(AB_pads,
ARRAY_SIZE(AB_pads));</font>
<br><font size=2 face="Sans"> }</font>
<br><font size=2 face="Sans"> </font><font size=2 color=#820040 face="Sans"><b>else</b></font><font size=2 face="Sans">
</font><font size=2 color=#820040 face="Sans"><b>if</b></font><font size=2 face="Sans">(bb_ID
= 0xCD) {</font>
<br><font size=2 face="Sans">
mxc_iomux_v3_setup_multiple_pads(CD_pads,
ARRAY_SIZE(CD_pads));</font>
<br><font size=2 face="Sans"> }</font>
<br><font size=2 face="Sans"> </font>
<br><font size=2 face="Sans"> imx53_add_uart0();</font>
<br>
<br><font size=2 face="Sans"> </font><font size=2 color=#820040 face="Sans"><b>return</b></font><font size=2 face="Sans">
0;</font>
<br><font size=2 face="Sans">}</font>
<br><font size=2 face="Sans"><b>console_initcall</b>(ecuv6_console_init);</font>
<br>
<br><font size=2 face="Sans">...</font>
<br>
<br>
<br><font size=2 face="sans-serif">Actually this is not working. The i2c_imx:i2c_imx_probe(..)
function gets called later.</font>
<br><font size=2 face="sans-serif">Is there a way or concept to do something
like this?</font>
<br>
<br><font size=2 face="sans-serif">christian</font>