
20 Aug
2012
20 Aug
'12
5 a.m.
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