Re: [PATCH 2/3] msm: add minimal board file for HTC Dream device

From: Brian Swetland
Date: Mon Nov 16 2009 - 11:43:33 EST


On Mon, Nov 16, 2009 at 8:36 AM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Mon, Nov 02, 2009 at 11:49:49AM +0100, Pavel Machek wrote:
>> +MACHINE_START(TROUT, "HTC Dream")
>> +#ifdef CONFIG_MSM_DEBUG_UART
>> +   .phys_io    Â= MSM_DEBUG_UART_PHYS,
>> +   .io_pg_offst  Â= ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
>> +#endif
>
> Why is this ifdef'd? ÂTwo reasons why not to do this:
>
> 1. MSM_DEBUG_UART is always defined, so the conditional is pointless

For a default dream build, definitely, but not always on every msm7k
target (some devices may not have a serial port that can safely be
chattered at by the debug code). For this board file, no harm to
require it.

> 2. the low level page table building code does not expect these to be
> Â unset (or even set to an invalid value). ÂLeaving them unset and
> Â having DEBUG_LL enabled is a recipe to prevent booting.

What's the best way to handle a situation where there is no valid
debug uart? Could the arch/platform require DEBUG_LL be unset via
Kconfig directives if it is configured in a way where there is no
valid debug uart?

> To put it another way, these two fields aren't optional.
>

Thanks,

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/