On Sunday 19 August 2012 10:40:05 Nobuhiro Iwamatsu wrote:
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/rmobile/board.c
>
> +#ifdef CONFIG_DISPLAY_BOARDINFO
> +int checkboard(void)
> +{
> + printf("Board: %s\n", sysinfo.board_string);
> + return 0;
> +}
> +#endif /* CONFIG_DISPLAY_BOARDINFO */
seems like you could have the makefile do:
COBJS-$(CONFIG_DISPLAY_BOARDINFO) += board.o
then you wouldn't need these ifdefs in this file
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
>
> +#ifdef CONFIG_DISPLAY_CPUINFO
> +u32 rmobile_get_cpu_type(void)
> +{
> + u32 id;
> + u32 type;
> + struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
> +
> + id = readl(hpb->cccr);
> + type = (id >> 8) & 0xFF;
> +
> + return type;
> +}
> +
> +u32 get_cpu_rev(void)
> +{
> + u32 id;
> + u32 rev;
> + struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
> +
> + id = readl(hpb->cccr);
> + rev = (id >> 4) & 0xF;
> +
> + return rev;
> +}
> +#endif /* CONFIG_DISPLAY_CPUINFO */
seems like you could have the makefile do:
COBJS-$(CONFIG_DISPLAY_CPUINFO) += board.o
then you wouldn't need these ifdefs in this file
-mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

