Received: by 10.223.185.116 with SMTP id b49csp2992294wrg; Mon, 12 Feb 2018 19:01:12 -0800 (PST) X-Google-Smtp-Source: AH8x226fSz0xeoRjtVV5xH2KIXi/wyYGuIZkqHnJdhPkgBkqIz1hHLuN8Ll6ial2vPkT7+dv6UEl X-Received: by 10.98.196.204 with SMTP id h73mr13845345pfk.143.1518490872671; Mon, 12 Feb 2018 19:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518490872; cv=none; d=google.com; s=arc-20160816; b=Z8HxVX7a/5FM6rUKznFA2kxEQWGiqRGNCk1DlHdXzaVfbLo70j9lCvxQUYsXBVt9j4 Lor//gdmXbICJUuHng7If28xbx5LIPsN1bd8N7XL9aozIwZBKfjgMKsm/cAoYN3iTbIm 0zQd+C9ZVIkV9TqUNKdi0SvVmZRDO8+Z6fkvvnuR/mPoN028dDtWT01Riq/sviBERjru 1hpqBCCqe4TULOM0K/AJCcUNmkHkVBtg0nQGpoTbpmCZNbddU1XcFDP0fNXgtTDmkFyC AZBHivySXONW90gwGhVO6kqvsjgqkd93KCz7ammxxxX410GN4P9lapCIA8oWdQWp3EhO kkuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=oCVvhfyxjoEAU3lIDbFVoWpGeorsymAAZbF4FN/NnuI=; b=dD/57Aj840QibfYTeLZyYcW8EvqCRNiZeViO6WE/xORFyyD1cXmTdExgfIBekO/rbQ 2bkcGmL0cIBEWDBzwyQAyVHVBVbXeCoZ5U9sDlZX3Gr7T6cUDamY02NOmfyQRUm5U4J7 D/CFCRKKG1FFBtGM4pBAg8chpT34p7kFZzsk8WRnYnnCy8894HdasGysg2lAnPtEqvts +rNDu8wMj2qEVIeMRiU4IJ4BJEJMZc02RIdg9iNo4GmaHvsayecFEIhXVEXki2LYPpQ5 ZwRIAl/yezc+wP5LURtsTUAADRBPlYRz7r3b1bIFq8deVG3T+2+r4kLzNQUVTg4+eI8a 2YZw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si5920632pgp.414.2018.02.12.19.00.57; Mon, 12 Feb 2018 19:01:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933342AbeBMDAQ (ORCPT + 99 others); Mon, 12 Feb 2018 22:00:16 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:52032 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933254AbeBMDAP (ORCPT ); Mon, 12 Feb 2018 22:00:15 -0500 Received: by mail-wm0-f65.google.com with SMTP id r71so13196709wmd.1; Mon, 12 Feb 2018 19:00:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oCVvhfyxjoEAU3lIDbFVoWpGeorsymAAZbF4FN/NnuI=; b=DM/rZ/qoGwgoSuFeSjGzN2Pq84J/J04bCuC5FjZ8SgOtt62HY6UW2vb4RPYeg1DFQG JSMCVmPZUTzwPraX0dvw0bCs5zwU8BCa7xsq19/gQqPUiWt3ZEPZ8IQz3CS5pwYWgo1Y JA6B4DTryWCZ8ReddEcm/M8V/57nsaG+Cw39kfWqmQbwgg/o4VU4R53vayV7WD0iJVB2 5Q0qsuQZwo3H3wA7bPOytrw4H8jkymhxKam5M27A4YgRLro9KGt75ReGidDZXPuIOzXm vsmJU0bBy0q3ZCwJAqEuLWsp4xkw7CsTiTK+uJHbRi5evzp2tOmnLYw4Wz0tODlIRz95 aOQQ== X-Gm-Message-State: APf1xPAoKXmHiC9xU4dC206ko4UFj9lTHpit2SqON+Pgoa4EjxiN0NB1 okNIhyR0GzT4qlQ5uFVMcAYt4tfc X-Received: by 10.80.209.200 with SMTP id i8mr88934edg.213.1518490812620; Mon, 12 Feb 2018 19:00:12 -0800 (PST) Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com. [209.85.128.180]) by smtp.gmail.com with ESMTPSA id c90sm5441227edd.12.2018.02.12.19.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 19:00:12 -0800 (PST) Received: by mail-wr0-f180.google.com with SMTP id 34so6931303wre.13; Mon, 12 Feb 2018 19:00:12 -0800 (PST) X-Received: by 10.223.147.100 with SMTP id 91mr8328756wro.85.1518490811817; Mon, 12 Feb 2018 19:00:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.208.197 with HTTP; Mon, 12 Feb 2018 18:59:51 -0800 (PST) In-Reply-To: References: From: Chen-Yu Tsai Date: Tue, 13 Feb 2018 10:59:51 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: BUG: A31s Not booting anymore To: Philipp Rossak Cc: linux-sunxi , Maxime Ripard , linux-kernel , linux-arm-kernel , linux-clk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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 > > 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 >