Received: by 10.223.185.116 with SMTP id b49csp3511842wrg; Tue, 13 Feb 2018 03:34:58 -0800 (PST) X-Google-Smtp-Source: AH8x224as1THNi7SSHHqz5uQ4wE5yiZaVOS6j2OBDbKnSzWI8JYApWysOFOWLKBId2B1lxQnDT/K X-Received: by 2002:a17:902:4283:: with SMTP id h3-v6mr862615pld.175.1518521698517; Tue, 13 Feb 2018 03:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518521698; cv=none; d=google.com; s=arc-20160816; b=lbzgH00o4pLvT3d3jf03Sjqutt6zw0wZSnlsSBzG1UaEobRHDW3ogfJKVLXFeNVV7O DAAPnNBLT6XzCNkdsXudkemmEhwxG3k8khAKrpxHg3//Eht0LtzJdIr3x4qlZOxrLBJz YwY2X+JNi9TB8khlEfy/dirWw+1/grcZx+BqnioIdDIcwQOiInH2XYC2o3+DHUTEll+Z s5rPd4AhtzfHMjno3JuSoWuQChbGaTEkrUf/+oCJfChDLKC4CgavSe0bFEmRPQBYQVsL 8TEB3CBgCNSsY/YW45sAfW2rqqfm4wvEjHhPvqqZzoS2icKANNui+WwZuRK1Ll9bKtaP Yzgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ZIUculc2ij4Izhp+9wpqC/QSHv+TI5wNEDHGVhlivfE=; b=Kv6pO9C7fGYPS1JVoVTIMgnFGncP6gGTmI33CZt1ebnpHF8ppkaYLZ3sIPQHebLLCe fV42krez6KyVQBW4cimyGzVZ/qk0B1rkDVjdO7+QtN1AFM0fVmgi3jvd25/raPO/Sofe OwUwLOXnT7LwuB8aqW0+6T/bmWLkTAWRZwuFcuuYtMC+YdlyturvFyJvOu6pr40sSkMy /llFGIW2PwPUbXfeJ95ozBtfMn+unknfQIOAhUhpdELyNr3hR75raBsSNPr1kt7MFvEr PHl6HkwMpPh1AKcAERGzw9rsLvzcO5Aw3CvPApKq5sl+9SqJvVkKxvam3/E3+SIkMgJi Lv3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tflB5gbu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si2633568pfb.268.2018.02.13.03.34.43; Tue, 13 Feb 2018 03:34:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tflB5gbu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934926AbeBMLcb (ORCPT + 99 others); Tue, 13 Feb 2018 06:32:31 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54530 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934443AbeBMLc1 (ORCPT ); Tue, 13 Feb 2018 06:32:27 -0500 Received: by mail-wm0-f66.google.com with SMTP id i186so15354145wmi.4; Tue, 13 Feb 2018 03:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZIUculc2ij4Izhp+9wpqC/QSHv+TI5wNEDHGVhlivfE=; b=tflB5gbuB/D8XPpg6n1GQs2Ars+ut0LBh2zh036HaYgdRHRonQ25EVgw615PbjFSNZ gD3zYbWFmSuK6SE++DxJAyRv8T8cc2V4kZ6iCz+3XYR7fTDJqR5tTlZi9fx3bP064NRJ yVB/hpJiPjIsy2n4RwOS9Y7jT7iFZN+yr/1QZGnO7Ry+3/P+xBzyILDPJnWu3amWb14n 8ypwLhQ+X+cRaOZ4dOUf61BQuvFqhSQPUOr8BrnseFYIiPPXmQV+UUCBIUomdbbu/Gx0 /RFWKMMG2NF3O7jCtxSbAUYfqz6l10ujoICex8cNs96/qz36J6VPUNX0wwUtnaiHsNBT gtrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZIUculc2ij4Izhp+9wpqC/QSHv+TI5wNEDHGVhlivfE=; b=cKaH2rLnWele3EsD34uu9YQgNgeuiMg9cupQD9cHSmbwFWEF/zeBPgSAJ4Rvl+rcY7 rOARXMevkRRwuOJO9nxbD0swiQf5IPY13jb3X7H2IT0szJr9gtPSe1xwxYLBbGEmeEmC 3cfOj58WwaE20n6rAMPilj0RMDnibkxmsZ8QbU/4mrpjzW8VnlU1lRe0brCXcjypsLVT gYAdmJ1vm1BEDRnRzMX4suZeaxOZLwecE318YFFF5yiTe1wTFWjdoe/o9swK0ilG7lC3 3IDYQiUMqiS0Xdhb76LnrMSN5SUCollns/lFXXT2EPkV0uq7G3sp3jsPK/KLu+7Cldq1 GeiA== X-Gm-Message-State: APf1xPCf2JKAdzUsXlNSbO+x92Ht9j1B2G2d2XRQQ/b8m2BFOAN8i34P brKNPufVdkw2KmCGamG+ADWFxVcb X-Received: by 10.28.170.71 with SMTP id t68mr1111502wme.31.1518521545285; Tue, 13 Feb 2018 03:32:25 -0800 (PST) Received: from [192.168.2.73] (p578F04D2.dip0.t-ipconnect.de. [87.143.4.210]) by smtp.gmail.com with ESMTPSA id 72sm8790616wmh.44.2018.02.13.03.32.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 03:32:24 -0800 (PST) Subject: Re: BUG: A31s Not booting anymore To: Chen-Yu Tsai Cc: linux-sunxi , Maxime Ripard , linux-kernel , linux-arm-kernel , linux-clk References: From: Philipp Rossak Message-ID: <9f7123d1-a14b-c51a-d7a8-63c58a3f83dd@gmail.com> Date: Tue, 13 Feb 2018 12:32:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.02.2018 03:59, Chen-Yu Tsai wrote: > On Tue, Feb 13, 2018 at 9:25 AM, Philipp Rossak wrote: >> >> >> On 12.02.2018 19:21, Philipp Rossak wrote: >>> >>> Hey, >>> >>> When I try to boot my A31s (Bananapi M2) u-boot is showing only Starting >>> kernel ... . After enabling the earlyprintk I could capture this log: [1]. >>> >>> After reverting those 5 commits from Chen-Yu I was able to boot again: >>> >>> >>> clk: sunxi-ng: Support fixed post-dividers on NM style clocks >>> 7d333ef1cc1b8c8951f3a2c41f6406e2295d8be9 >>> >>> clk: sunxi-ng: sun8i: a83t: Add /2 fixed post divider to audio PLL >>> 10e6eb4f2c5b35ae71c9bc0db83d74238719b453 >>> >>> clk: sunxi-ng: sun8i: a83t: Use sigma-delta modulation for audio PLL >>> e952ca3c6b2ffdfbf9618e4bd3e9aad1ff3f5eb4 >>> >>> clk: sunxi-ng: Support fixed post-dividers on MP style clocks >>> 946797aa3f08e2f6f5992f3ec2be44791e9b9260 >>> >>> clk: sunxi-ng: sun50i: a64: Add 2x fixed post-divider to MMC module clocks >>> 83fe3be4d1974f5f50c5e2039a1609f4960e8579 >>> >>> >>> I allready tried to fix it with making them save against zero: >>> >>> if (cmp->common.features & CCU_FEATURE_FIXED_POSTDIV && \ >>> cmp->fixed_post_div with) >>> rate *= cmp->fixed_post_div; >>> >>> But that didn't help. >>> >>> Any ideas? >>> >>> Regards, >>> Philipp >>> >>> [1]: https://pastebin.com/64Fzzqvg >> >> >> It took me some time, but I have now a few more infos: >> >> Right now the code breaks at this point here [1], with this clock [2]. >> If we have a look now at the clock config [3], we see here a table which is >> an u8 array and also a fixed_predivs struct. > > The u8 array is for mapping the parents from the index in the parents > array to the actual register value you listed below. > > How are you figuring out which clock is triggering this? Because that > is not even the right type of clock. The backtrace you posted shows > the error occurring in a DIV or M type clock, not the MP type you > are pointing to. > > Could you add some noisy printk calls to the sunxi_ccu_probe() > function in drivers/clk/sunxi-ng/ccu_common.c so it's much clearer > which clock is failing? Thats what I basically did to find out which clock is failing. This here are the changes I'm doing [1] and thats the dirty log [2]. It fails at clock NR 155 which is this one [3] mentioned before. > > >> >> If we have a look at the function call where it breaks [4], shouldn't the >> table be a clk_div_table struct instead of an u8? > > The table argument is an option. Did you go through how the sunxi-ng driver > calls this function? As mentioned above, you are looking at the wrong thing. > > Thanks > ChenYu I followed the failing call to this function (through the clock driver). As you can see I added an additional printk statement to see where it fails. Regards, Philipp > >> >> The a31s is the only board where we have this combination of a fixed_predivs >> and a table. >> >> Philipp >> >> >> Related Clock source register A31s: >> >> 0000: OSC24MHz/750=32KHz >> 0001: LOSC >> 0010: OSC24MHz >> 0011: / >> 0100: / >> 0101: / >> 0110: / >> 0111: / >> 1000: / >> 1001: / >> 1010: / >> 1011: AXICLK/4 >> 1100: / >> 1101: AHB1CLK/4 >> 1110: / >> 1111: / >> >> >> [1]: >> http://lxr.bootlin.com/linux/v4.16-rc1/source/drivers/clk/clk-divider.c#L89 >> >> [2]: >> http://lxr.bootlin.com/linux/v4.16-rc1/source/drivers/clk/sunxi-ng/ccu-sun6i-a31.c#L1137 >> >> [3]: >> http://lxr.bootlin.com/linux/v4.16-rc1/source/drivers/clk/sunxi-ng/ccu-sun6i-a31.c#L749 >> >> [4]: >> http://lxr.bootlin.com/linux/v4.16-rc1/source/drivers/clk/clk-divider.c#L93 >> [1]: https://pastebin.com/tvDunAWq [2]: https://pastebin.com/SBn2VQLu [3]: http://lxr.bootlin.com/linux/v4.16-rc1/source/include/dt-bindings/clock/sun6i-a31-ccu.h#L187