Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1233031yba; Thu, 18 Apr 2019 18:07:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhiZDE8dGXYFtYG8g62j9vfOkLVi3BhMRNCRtt6EhqhmGkmZlgKIEDJSapmP+R8inL4muD X-Received: by 2002:a63:e004:: with SMTP id e4mr1102046pgh.344.1555636062414; Thu, 18 Apr 2019 18:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555636062; cv=none; d=google.com; s=arc-20160816; b=vGebXvCWVhtvYCAdrMALUMNBd29FGYMnAI6hhAb3x8ivc2CdjQL6fRvsZsu11CHD/v 7jQHLfgPLS7ULZu/PYD/iSPCr7LA3DJFSF+0j1RRMqyuuJf+bhX5HuvZ2oHkAuUdJWNR o0XgdI7lRsVDJO0BOjM6PwSs2Ikca6wCnWC/dC8S64uMA3H2LdDl3Vh/7iqYgrrOhqNJ 5HyZXoJwHnVU399i4nXfq+dmQb0ps9tKkdqw9NPQ9+N4AHZ6oxrIIAXf1SmCPECl1u/3 SziwhjKOK4aoPuP6hk+aB2xP8juDDDfCKGr6uSt4xkuLyNIaEzyL5sVED6nt0v1N6Ff8 ALGA== 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:to:subject:ironport-sdr:ironport-sdr :dkim-signature; bh=hw3R5NxohIxr7w9EhZXmIP4nQdqBhG2byT/y0pI6Ob0=; b=zYLDjlRRa6zxFiFmRsWwMnm01tth12+swITEay+LO2mE7iIpYrwob2RWbY5UjCjIQZ 7+fX0EjXTE27Br+92wJUjR9nbyCJzWRk7e0F9pfa/DF9UEMJxoyYrKFHoUGgGTnhmkn6 1DKirCVwy5VKp8egEvKSqBZU9xoLafdO6dfNleAEhoks0uggYUwiFFCoxBIx1xNV3xnK FHTMB8v7ckoGMD48wgTHaT2XNkxw7K0yENNph/AG4mIYjF9cLqNfivtsYFS11J7LaMJO Dud+dtGCZVjsDHEytFwmIhPEjIA0EjeGHv3WD1ydPknr9/sxK6z+yHL0E02EioDHmtm1 lsIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=ZvPzltre; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a82si3768727pfj.255.2019.04.18.18.07.25; Thu, 18 Apr 2019 18:07:42 -0700 (PDT) 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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=ZvPzltre; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbfDSBE4 (ORCPT + 99 others); Thu, 18 Apr 2019 21:04:56 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:22988 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfDSBE4 (ORCPT ); Thu, 18 Apr 2019 21:04:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1555635896; x=1587171896; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=JNCt4ralk0VadV9rI8zNMEe1OWC5/ViM+mry1FGDxlM=; b=ZvPzltre0G/L7sLTSotNiafGmZre0dCG2tG7hcxBvXtmJNN9qOTbdNN0 yv6fc8a3AGODjQCNR2vt2nlLzbbPCSJSJTHaRuPLDh/5PYRjNeCsCycgD HogVqq1XaGRldbSmjE+nU2GhpTL0RVe5FrsUxd8GhFmNgpDNyTUjk3Tnr INW+Ba6ocR1pH+AyUVpAb1xTPmRtu6zAIFKZQwLUCda7pPIiFflbkkm4N xx9Vkj3aEhUo48fPnbLwj+e8ieXYKhc9M5zZa7niak9J/f9gU3y85Pwh0 +1lwHPqy/LeEF8o8qFql8BGYt5MG8Dz/AyP5zLi/19rIoTSyGMteAIIfF Q==; X-IronPort-AV: E=Sophos;i="5.60,368,1549900800"; d="scan'208";a="212085422" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 19 Apr 2019 09:04:36 +0800 IronPort-SDR: +vxX5KAOsYkY9Pjub9Q8F9Bu3pUt93VBp2Hpy+UZOnom9i8ahrPR72k82HNOa4FyuP1bHC1oFG BvO5H9lKuMq9BSRNe1KCgGJv/bvCeIvbAb4WgAAZlxsPazj5DQy0rYkbSsA7JKZpHGhWsNnQpN IlEgbMOQ/ugseyKL4WBIhlVSr6HvDyswE2aUpqWJH0X0pZ0Pk9ckc9PRAzNNsaEw7ZXQVSSohg DRlfhs5e4mIIfQYJpvhK5mbZAYRzNrcG0WLzSzfeWaiT1R6O0z0VrG64AbTmiKtEuD4FwsC7Wo XoECFlZ1M/AR68wuHb6gKNLC Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 18 Apr 2019 17:43:25 -0700 IronPort-SDR: PQR7nOItCqyBJzQYvRhU0UFx1nEetSzlPMBSxEpDHPcrR/bWebKsjXtP4/6ZOR9NjIxVlo15VQ CF4wNaEv3BDEJmG3ShBB7joswaPwzgIvA7mHYOEFQGGJfeO8ZjCMrbgUpp2UP4HW7cEPMjQibG Vs2mRJCPcV3BtuM48t/1J9KJOyVeOjG+I2gMivURKmXU9g0y8Soj9kYhGgCDZpFcqHaBlScf14 CTcRrgbN4djH750Tr12ON6tuwzNoyKc9kPld8Q0HpRougXQOeHZATi2BW2HBDOgEm6Bo3G3OzL 0Ro= Received: from usa003981.ad.shared (HELO [10.86.53.90]) ([10.86.53.90]) by uls-op-cesaip02.wdc.com with ESMTP; 18 Apr 2019 18:04:36 -0700 Subject: Re: [PATCH v5 0/2] tty: serial: add DT bindings and serial driver for the SiFive FU540 UART To: Kevin Hilman , Paul Walmsley , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "gregkh@linuxfoundation.org" References: <20190413020111.23400-1-paul.walmsley@sifive.com> <7hmukmew5j.fsf@baylibre.com> From: Atish Patra Message-ID: <883f3d5f-9b04-1435-30d3-2b48ab7eb76d@wdc.com> Date: Thu, 18 Apr 2019 18:04:34 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <7hmukmew5j.fsf@baylibre.com> 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 4/18/19 4:22 PM, Kevin Hilman wrote: > Hi Paul, > > Paul Walmsley writes: > >> This series adds a serial driver, with console support, for the >> UART IP block present on the SiFive FU540 SoC. The programming >> model is straightforward, but unique. >> >> Boot-tested on a SiFive FU540 HiFive-U board, using BBL and the >> open-source FSBL (with appropriate patches to the DT data). >> >> This fifth version fixes a bug in the set_termios handler, >> found by Andreas Schwab . >> >> The patches in this series can also be found, with the PRCI patches, >> DT patches, and DT prerequisite patch, at: >> >> https://github.com/sifive/riscv-linux/tree/dev/paulw/serial-v5.1-rc4 > > I tried this branch, and it doesn't boot on my unleashed board. > > Here's the boot log when I pass the DT built from your branch via > u-boot: https://termbin.com/rfp3. > Unfortunately, that won't work. The current DT modifications by OpenSBI. 1. Change hart status to "masked" from "okay". 2. M-mode interrupt masking in PLIC node. 3. Add a chosen node for serial access in U-Boot. You can ignore 3 for your use case. However, if you pass a dtb built from source code, that will have hart0 enabled and M-mode interrupts enabled in DT. Not sure if we should do these DT modifications in U-Boot as well. I also noticed that your kernel is booting only 1 hart. Just FYI: RISC-V SMP for U-Boot patches are merged in master. So you should be able to boot all cpus. You can ingore FU540_ENABLED_HART_MASK in OpenSBI build as well. Regards, Atish > I also tried the same thing, but using the DT that's hard-coded into > SBI/u-boot. That doesn't boot fully either[1], but one thing I noted is > that with the DT from the kernel tree, the printk timestamps aren't > moving. Maybe I'm still missing some kconfig options to enable the > right clock and/or IRQ controllers? I'm using this fragment[2] on top of > the default defconfig (arch/riscv/configs/defconfig). > > Could you share the defconfig you're using when testing your branch? > > Also for reference, I'm able to successfully build/boot the > 5.1-rc1-unleashed branch from Atish's tree[3] using that kconfig > fragment[2] (and the hard-coded DT from u-boot/SBI). Full log here[4]. > > Thanks, > > Kevin > > [1] https://termbin.com/wuc9 > [2] > CONFIG_CLK_SIFIVE=y > CONFIG_CLK_SIFIVE_FU540_PRCI=y > > CONFIG_SERIAL_SIFIVE=y > CONFIG_SERIAL_SIFIVE_CONSOLE=y > > CONFIG_SIFIVE_PLIC=y > CONFIG_SPI=y > CONFIG_SPI_SIFIVE=y > CONFIG_GPIOLIB=y > CONFIG_GPIO_SIFIVE=y > CONFIG_PWM_SIFIVE=y > > CONFIG_CLK_U54_PRCI=y > CONFIG_CLK_GEMGXL_MGMT=y > > [3] https://github.com/atishp04/linux/tree/5.1-rc1-unleashed > [4] https://termbin.com/12bg > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >