[U-Boot] [PATCH v5] arm: rmobile: Add support Renesas SH73A0

Mike Frysinger vapier at gentoo.org
Mon Aug 20 05:00:22 CEST 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120819/64b3aae3/attachment.pgp>


More information about the U-Boot mailing list