From: Mike Frysinger Date: Sun, 19 Aug 2012 23:00:22 -0400 Subject: [U-Boot] [PATCH v5] arm: rmobile: Add support Renesas SH73A0 In-Reply-To: <1345387205-12957-1-git-send-email-iwamatsu@nigauri.org> References: <1345387205-12957-1-git-send-email-iwamatsu@nigauri.org> Message-ID: <201208192300.23669.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: