From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Wahren Date: Wed, 13 May 2015 10:14:19 +0200 Subject: [U-Boot] mxs: Possible in bug in mxs_enable_4p2_dcdc_input In-Reply-To: <201505130913.25250.marex@denx.de> References: <978811302.20941.1431496941951.JavaMail.open-xchange@oxbsltgw06.schlund.de> <201505130913.25250.marex@denx.de> Message-ID: <555307DB.3090704@i2se.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, Am 13.05.2015 um 09:13 schrieb Marek Vasut: > On Wednesday, May 13, 2015 at 08:02:21 AM, Stefan Wahren wrote: >> Hi, > Hi, > >> during the study of DC-DC handling in u-boot i noticed a possible bug. >> >> In case the DC-DC is already enabled the function returns without >> reenabling brown out detection. I don't think that's okay. >> A possible fix would be to do the check if DC-DC is already enabled before >> disabling brown out detection. This idea is >> attached as a draft. If it's acceptable i will send a proper patch. > What exactly would happen if you enable DCDC converter while BO detection > is already enabled ? It is possible, that enabling the DCDC would cause a > dip on the power rail and cause in turn a BO, no ? IIRC, that is the reason > why BO detection is disabled when enabling DCDC. i think we're talking about different things. The patch won't touch this necessary behaviour. No, i think it's faulty to leave the function with BO detection disabled in the case the DC-DC is already enabled: if (xfer && (readl(&power_regs->hw_power_5vctrl) & POWER_5VCTRL_ENABLE_DCDC)) { return; } > > Best regards, > Marek Vasut Stefan