On Fri, Feb 04, 2011 at 08:39:34AM +0000, Russell King - ARM Linux wrote: > Can't we just hard-configure the virtual/physical address at build > time and be done with it? > > I've given up with the current state of affairs which tries to use the > platform ID to select the UART to use as it never seems to work, and I > have a couple of patches which hard-code the address at compile time - > one for the SDP4430 board and one for the LDP3430 board. > > If it's complicated, then it probably won't work. Keep it simple. > That's especially true for debugging code, otherwise you need extra > debugging code to debug why the debugging code doesn't work. There's another good reason to hard-configure the UART port rather than select it by ID. The common usage scenario: you're bringing up a new board. You know you're going to have your console connected to UART2. So, no matter what you want your debug messages to come out of UART2 even if the machine ID is wrong. By detecting the UART port from the machine number, you immediately lose that ability, and therefore the confidence, that "if I build the kernel for X with LL debug enabled, and monitor port Y, I will get messages out of port Y, and not some other random port Z which I'd to solder wires to to monitor." In other words, no messages on the monitored port changes from "we didn't get into the kernel, or something early in the kernel boot before the C code went wrong" to "... or maybe the debugging code failed to get the right port too." It is invaluable to know that the debugging code will always talk to the same UART which you're monitoring. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html