From patchwork Tue Sep 10 19:05:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 11140703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 953F51395 for ; Wed, 11 Sep 2019 09:05:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7225B20CC7 for ; Wed, 11 Sep 2019 09:05:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7225B20CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7yYf-0002Lv-UM for patchwork-qemu-devel@patchwork.kernel.org; Wed, 11 Sep 2019 05:05:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7xwP-0008Sc-Vh for qemu-devel@nongnu.org; Wed, 11 Sep 2019 04:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7xwO-0006t6-Mq for qemu-devel@nongnu.org; Wed, 11 Sep 2019 04:25:29 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46411) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7xwO-0006sT-Cr for qemu-devel@nongnu.org; Wed, 11 Sep 2019 04:25:28 -0400 Received: by mail-wr1-f67.google.com with SMTP id d17so10679720wrq.13 for ; Wed, 11 Sep 2019 01:25:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:cc:from:to; bh=og+q1n3yOAmcc+5fUot4+K3025KfQ+1ohpk/ac261lM=; b=Yozpq54VP/F4rOPWWfK/XAt/SiH/5s2X+3TsxVdBfmdqfNzt68lS1xxVuV1hd32Sgj SK+gxiy56jLvl4jcc5Q+Ncm0+J4N//zU75E4FD0j7I8y0juUtqMnSiL9PaIWvnmNhysF GNsG5sHAC0NQb4hUL9GE4INuy4/nKL0JnrxT/+I1Cl9W/Oovjs372ilA6JIHFBMe/K0m l0AVW8aIjAihAalHNqEdfFPmyUv/kRToHaVbjSpWO7TT+faym+zR0E3zU5aShcqWXlvh TEG/YwxFWb1yVshrqL/JBXtKRFuGK5dKoYDVai10OjW6sJE4rlKIjNNg6EaF7+Wk+rr6 pPNQ== X-Gm-Message-State: APjAAAU/u63uc2nL1/Fuo/cVN+2SPQ047NlHC2V6F8Caic9rBPzm0ikN QPsEFhO6gF1yi4daAaCnuQtd4w== X-Google-Smtp-Source: APXvYqzA5uuON1yW9070r+5K145tuNakY8E0qF03EU/UPbeC2fY0QQT8XRQp6u6EYfnXBJYNQXtU8A== X-Received: by 2002:adf:f0c7:: with SMTP id x7mr28134122wro.2.1568190327160; Wed, 11 Sep 2019 01:25:27 -0700 (PDT) Received: from localhost ([148.69.85.38]) by smtp.gmail.com with ESMTPSA id y186sm3504784wmd.26.2019.09.11.01.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2019 01:25:26 -0700 (PDT) Date: Tue, 10 Sep 2019 12:05:04 -0700 Message-Id: <20190910190513.21160-39-palmer@sifive.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190910190513.21160-1-palmer@sifive.com> References: <20190910190513.21160-1-palmer@sifive.com> MIME-Version: 1.0 From: Palmer Dabbelt To: Peter Maydell X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.67 Subject: [Qemu-devel] [PULL 38/47] riscv: sifive_u: Change UART node name in device tree X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , Bin Meng , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Palmer Dabbelt Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng OpenSBI for fu540 does DT fix up (see fu540_modify_dt()) by updating chosen "stdout-path" to point to "/soc/serial@...", and U-Boot will use this information to locate the serial node and probe its driver. However currently we generate the UART node name as "/soc/uart@...", causing U-Boot fail to find the serial node in DT. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index a3ee1ec0a9..5ca3793d35 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -286,7 +286,7 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, uartclk_phandle = qemu_fdt_get_phandle(fdt, nodename); g_free(nodename); - nodename = g_strdup_printf("/soc/uart@%lx", + nodename = g_strdup_printf("/soc/serial@%lx", (long)memmap[SIFIVE_U_UART0].base); qemu_fdt_add_subnode(fdt, nodename); qemu_fdt_setprop_string(fdt, nodename, "compatible", "sifive,uart0");