From patchwork Wed May 16 10:43:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 10403593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 56D70601D2 for ; Wed, 16 May 2018 10:50:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4330928881 for ; Wed, 16 May 2018 10:50:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4119728893; Wed, 16 May 2018 10:50:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C035A288CD for ; Wed, 16 May 2018 10:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YiB+TcWfCzIMSTMj2qj9cawxyadMQpsNHPsLlTMPK3k=; b=doyfbuie8vKpSC pKB3PPn/HQtwCCUBn5nENl9Oycdc7YnEMdB5j5ncK/VQYFzHz6zIhQTssmBROsgUbv1WF6Q8Mmed2 DiNQDokYQ+1IgKKhmAtIshTKTy6hxrDbwaqnyP4Xeg7BBpVUfl9U6OoaMqYK5aTMl27TFtFsyrd0C v0Yo9mbysCz+H/VTHFBwPr0EGcJT0D2X/9YLASIE0+YSPftkFWLGox5K++OVyNu5ZY+55kjduidRi 4B66A+giw6dsovpy2qy/bUNOYlllZ3NDUsjA79dlHiBevASDBZV+teX0FrWzymhRryFQVSG/Vmy7U DolM3h6/5O0A47JNcrog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fItuy-00076B-0N; Wed, 16 May 2018 10:44:24 +0000 Received: from lelnx194.ext.ti.com ([198.47.27.80]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fItuu-00074S-62 for linux-arm-kernel@lists.infradead.org; Wed, 16 May 2018 10:44:21 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4GAhFRF023624; Wed, 16 May 2018 05:43:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1526467395; bh=A1uh68CKrHDfxsH3U6R4r3Vk5lyCN69xeH5M5WWHD24=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=NYWKZIRD8b+vwMpb7PphpdXnj2ucmlIkMtMUECogKnz2ntHEA1upJJWS7Xuj48NHK ILoPwnaOpGJ0KHxCocXyXwJyHD8W3ja10j/l2Fwb82Ec2465gnFlfejVTWitH96QBk IbRuPSGTPvYVksX+uza8U6IJJNRlRMDxw62wNCWI= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4GAhFkd003538; Wed, 16 May 2018 05:43:15 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 16 May 2018 05:43:15 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 16 May 2018 05:43:15 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4GAh89i026549; Wed, 16 May 2018 05:43:09 -0500 Subject: =?UTF-8?Q?Re:_[PATCH_v10_00/27]_ARM:_davinci:_convert_to_common_clo?= =?UTF-8?B?Y2sgZnJhbWV3b3Jr4oCL?= To: Bartosz Golaszewski , Adam Ford References: <20180509172606.29387-1-david@lechnology.com> From: Sekhar Nori Message-ID: Date: Wed, 16 May 2018 16:13:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180516_034420_355587_D9F4C0C1 X-CRM114-Status: GOOD ( 34.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree , David Lechner , Kevin Hilman , Bartosz Golaszewski , Stephen Boyd , Linux Kernel Mailing List , linux-clk , Rob Herring , Michael Turquette , arm-soc Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Wednesday 16 May 2018 01:17 PM, Bartosz Golaszewski wrote: > 2018-05-16 0:44 GMT+02:00 Adam Ford : >> On Tue, May 15, 2018 at 4:25 AM, Bartosz Golaszewski wrote: >>> 2018-05-14 2:40 GMT+02:00 Adam Ford : >>>> On Wed, May 9, 2018 at 12:25 PM, David Lechner wrote: >>>>> This series converts mach-davinci to use the common clock framework. >>>>> >>>>> The series works like this, the first 3 patches fix some issues with the clock >>>>> drivers that have already been accepted into the mainline kernel. >>>>> >>>>> Then, starting with "ARM: davinci: pass clock as parameter to >>>>> davinci_timer_init()", we get the mach code ready for the switch by adding the >>>>> code needed for the new clock drivers and adding #ifndef CONFIG_COMMON_CLK >>>>> around the legacy clocks so that we can switch easily between the old and the >>>>> new. >>>>> >>>>> "ARM: davinci: switch to common clock framework" actually flips the switch >>>>> to start using the new clock drivers. Then the next 8 patches remove all >>>>> of the old clock code. >>>>> >>>>> The final four patches add device tree clock support to the one SoC that >>>>> supports it. >>>>> >>>>> This series has been tested on TI OMAP-L138 LCDK (both device tree and legacy >>>>> board file). >>>>> >>>> >>>> I am not sure if I did something wrong, but I attempted to build and I >>>> wasn't able to boot the da850-evm.dtb your repo common-clk-v11, >>>> however the legacy board file boot was OK. >>>> >>>> make davinci_all_defconfig ARCH=arm >>>> make zImage modules da850-evm.dtb ARCH=arm CROSS_COMPILE=arm-linux- -j8 >>>> >>>> 3140416 bytes read in 1464 ms (2 MiB/s) >>>> 20353 bytes read in 15 ms (1.3 MiB/s) >>>> ## Flattened Device Tree blob at c0600000 >>>> Booting using the fdt blob at 0xc0600000 >>>> Loading Device Tree to c7e57000, end c7e5ef80 ... OK >>>> >>>> Starting kernel ... >>>> >>>> Uncompressing Linux... done, booting the kernel. >>>> >>>> (and hang) >>>> >>>> If you have some suggestions, I am try them as I get time. >>>> >>>> adam >>>> >>> >>> Runs fine on da850-lcdk and dm365-evm. I'll test the da850-evm >>> tomorrow when I'll have access to it. >> >> I set the bootargs to: bootargs=console=ttyS2,115200n8 >> clk_ignore_unused root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait >> >> I enabled DEBUG_LL and EARLY_PRINTK, yet when it loads, I only get: With DEBUG_LL, you dont get any prints "automatically". You need add printascii() calls where you need. I use the attached patch which patches printk() calls with printascii()[1] >> >> ## Flattened Device Tree blob at c0600000 >> Booting using the fdt blob at 0xc0600000 >> Loading Device Tree to c7e57000, end c7e5ef35 ... OK >> >> Starting kernel ... >> >> Uncompressing Linux... done, booting the kernel. >> >> >> I am doing this at my home, so I don't have a debugger for the >> DA850-EVM. I am using a SOM that is an AM1808, but I vaguely remember >> something about enabling a DSP clock somewhere, but I cannot seem to >> find the e-mail. I know its counter intuitive that we'd need to >> enable a clock that runs the DSP since it doesn't exist on the AM1808, >> but I would have thought the clk_ignore_unused would have worked >> around that issue. >> >> If someone else has a DA850-EVM or suggestions, I'm willing to try >> them as I have time. >> >> adam > > Hi Adam, > > everything works fine for me both when booting the DTB and in legacy > mode on da850-evm. > > I'm using the following bootargs: > ip=dhcp console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=,v3 > nfsrootdebug > > Regular davinci_all_defconfig on David's common-clk-v11 branch. Adam, if you still cannot get it to work, one problem could be that the DT size has increased and its being overwritten. You could look at where you are loading various binaries. Or append the .dtb to zImage and switch on APPENDED_DTB config in kernel. Thanks, Sekhar [1] diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 5b5a708..c3419c0 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1488,6 +1488,7 @@ static size_t cont_print_text(char *text, size_t size) return textlen; } +void printascii(char *); asmlinkage int vprintk_emit(int facility, int level, const char *dict, size_t dictlen, const char *fmt, va_list args) @@ -1552,6 +1553,7 @@ asmlinkage int vprintk_emit(int facility, int level, text_len--; lflags |= LOG_NEWLINE; } + printascii(text); /* strip kernel syslog prefix and extract log level or control flags */ if (facility == 0) {