Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Remove extraneous conditional



Hello,

While looking through the Beaglebone code, I found this extraneous #elif directive. I don't think it justifies a GNATs submission (but I will make one, if that's the consensus.)

Earlier in the function, there's a group of '#ifdef's that I feel ought to be chained '#elif's to prevent the clock from being initialized multiple ways (if the wrong set of #defines is used.) Also, it seems that am335x_cpu_clk() is called twice, if VERBOSE_INIT_ARM is defined. However, I'm not qualified enough to know whether these are actual concerns or how to fix them, if they are.

--
Rich
Index: sys/arch/evbarm/beagle/beagle_machdep.c
==================================================================
--- sys/arch/evbarm/beagle/beagle_machdep.c
+++ sys/arch/evbarm/beagle/beagle_machdep.c
@@ -695,11 +696,10 @@
 {
 #if defined(OMAP_4XXX)
 	*(volatile uint32_t *)(OMAP_L4_CORE_VBASE + (OMAP_L4_WAKEUP_BASE - OMAP_L4_CORE_BASE) + OMAP4_PRM_RSTCTRL) = OMAP4_PRM_RSTCTRL_WARM;
 #elif defined(OMAP_5XXX)
 	*(volatile uint32_t *)(OMAP_L4_CORE_VBASE + (OMAP_L4_WAKEUP_BASE - OMAP_L4_CORE_BASE) + OMAP5_PRM_RSTCTRL) = OMAP4_PRM_RSTCTRL_COLD;
-#elif defined(OMAP_5XXX)
 #elif defined(TI_AM335X)
 	*(volatile uint32_t *)(OMAP_L4_CORE_VBASE + (OMAP2_CM_BASE - OMAP_L4_CORE_BASE) + AM335X_PRCM_PRM_DEVICE + PRM_RSTCTRL) = RST_GLOBAL_WARM_SW;
 #else
 #if NPRCM > 0
 	prcm_cold_reset();



Home | Main Index | Thread Index | Old Index