From mboxrd@z Thu Jan 1 00:00:00 1970 From: tony@atomide.com (Tony Lindgren) Date: Mon, 16 Apr 2012 18:41:03 -0700 Subject: [PATCH 2/2] OMAP2+: UART: Add mechanism to probe uart pins and configure rx wakeup In-Reply-To: References: <1334065246-21294-1-git-send-email-govindraj.raja@ti.com> <1334065246-21294-3-git-send-email-govindraj.raja@ti.com> <20120410161136.GF6487@atomide.com> Message-ID: <20120417014103.GA21106@atomide.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, Few more comments below. * Raja, Govindraj [120411 04:53]: ... > +static int __init omap_serial_fill_default_pads(struct omap_board_data *bdata, > + struct omap_uart_state *uart) > +{ > + struct omap_mux_partition *tx_partition = NULL, *rx_partition = NULL; > + struct omap_mux *rx_mux = NULL, *tx_mux = NULL; > + char *rx_fmt, *tx_fmt; > + int uart_nr = bdata->id + 1; > + > + if (bdata->id != 2) { > + rx_fmt = "uart%d_rx.uart%d_rx"; > + tx_fmt = "uart%d_tx.uart%d_tx"; > + } else { > + rx_fmt = "uart%d_rx_irrx.uart%d_rx_irrx"; > + tx_fmt = "uart%d_tx_irtx.uart%d_tx_irtx"; > + } > + > + snprintf(rx_pad_name, OMAP_UART_DEFAULT_PAD_NAME_LEN, rx_fmt, > + uart_nr, uart_nr); > + snprintf(tx_pad_name, OMAP_UART_DEFAULT_PAD_NAME_LEN, tx_fmt, > + uart_nr, uart_nr); This naming won't work for the fourth port on 3630 as there are no "uart4_rx" or "uart4_tx" mux entries, they are "gpmc_wait2.uart4_tx" and "gpmc_wait3.uart4_tx". > @@ -289,8 +354,8 @@ void __init omap_serial_board_init(struct > omap_uart_port_info *info) > bdata.pads = NULL; > bdata.pads_cnt = 0; > > - if (cpu_is_omap44xx() || cpu_is_omap34xx()) > - omap_serial_fill_default_pads(&bdata); > + if (omap_serial_fill_default_pads(&bdata, uart)) > + continue; > > if (!info) > omap_serial_init_port(&bdata, NULL); Can't the omap_serial_board_init() now be just be omap_serial_init(void) as it's not used anywhere else? Anyways, this is getting too complex for the -rc series as at least 2430sdp is using alternative pins for the first uart. Let's patch to remove just the uart4 entry for 3630 for the -rc and then we can properly fix this for the next merge window. Regards, Tony