[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-arm
Subject:    Remove extraneous conditional
From:       Rich Neswold <rich.neswold () gmail ! com>
Date:       2015-12-07 16:38:42
Message-ID: CAGT4q5qF8806U4PLymKHEZ=XsUQOmjp5hBVRBZ4yquocaSn1uA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr">Hello,<div><br></div><div>While looking through the Beaglebone code, I \
found this extraneous #elif directive. I don&#39;t think it justifies a GNATs \
submission (but I will make one, if that&#39;s the \
consensus.)</div><div><br></div><div>Earlier in the function, there&#39;s a group of \
&#39;#ifdef&#39;s that I feel ought to be chained &#39;#elif&#39;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&#39;m not qualified enough to know whether these are actual \
concerns or how to fix them, if they are.</div><div><br></div><div>-- <br><div \
class="gmail_signature">Rich<br></div> </div></div>

--089e0149d2ba708c630526517d53--


["src.diff" (text/plain)]

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();



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic