AnsweredAssumed Answered

U-Boot

Question asked by Ashish on Mar 13, 2012
Latest reply on Mar 26, 2012 by Aaronwu

Hi,

While porting U-Boot for TLL6527M (which uses UART1 Port G for console), I found that the UART port for console telemetry seems to be hardwired to use only UART1 portF and no option to use UART1 portG is apparent, as can be seen from the following code snippet from serial.h: -

 

http://blackfin.uclinux.org/git/?p=u-boot;a=blob;f=arch/blackfin/cpu/serial.h;h=8a076ddc924d7348a1c9062df658eb88c0151a01;hb=77cd82ac8e23fd743914fe97c94b535cdfe14ca8

 

136 #elif defined(__ADSPBF52x__)

137 # define DO_MUX(port, mux, tx, rx) \

138         bfin_write_PORT##port##_MUX((bfin_read_PORT##port##_MUX() & ~PORT_x_MUX_##mux##_MASK) |              PORT_x_MUX_##mux##_FUNC_3); \

139         bfin_write_PORT##port##_FER(bfin_read_PORT##port##_FER() | P##port##tx | P##port##rx);

140         switch (CONFIG_UART_CONSOLE) {

141         case 0: DO_MUX(G, 2, 7, 8);   break;    /* Port G; mux 2; PG2 and PG8 */

142         case 1: DO_MUX(F, 5, 14, 15); break;    /* Port F; mux 5; PF14 and PF15 */

143         }

 

Ideally P_UART1_TX & P_UART1_RX should be used here since the following file already correctly defines which UART1 to use based on the macro   "CONFIG_BF527_UART1_PORTG"

http://blackfin.uclinux.org/git/?p=u-boot;a=blob;f=arch/blackfin/include/asm/mach-bf527/portmux.h;h=aa165581d8c08f284dcad5cc408ad123b4cefcdc;hb=77cd82ac8e23fd743914fe97c94b535cdfe14ca8

 

Please confirm if my observation is correct or am I missing some macro.

 

Best regards,

Ashish

Outcomes