From patchwork Mon Aug 25 16:27:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 122 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139263; bh=4Zx3ZmI4J3OWV69jvQpAJuyPwoVA/nVrc3cWjFPeJvo=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XnkDbOuqsckd1YXHlHgE7OzA/fXc9V4uV26xSWDJU9rZ4WtURuIdCzqcFBE7Lg0qk T/y62PyEqpI8yyr+nHugb4AJfj8tlDf5L270rXiyGuYzIfy8JcdrmQVxMchJYDhgpw QSaudgMO5NXP8nEQRnMiTiVRjZM43x4y3EWDSRUZAbsDjUrlt85GDdHgYg2R21+jrJ qa0fYfwGAiTq2MUEszv5t95fjIbMJn3AsLYaSMSNM75BNA4oV0DNDujpmNaY3Jyyzg nv4ENfvpTJM+wLEcxez1p0hwvHwGL0FXUb4OhoxZ3XMKL6yuEDtSsmW5c1sJAnvfB1 nBMS5GKHWWQKw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 336CE677A5 for ; Mon, 25 Aug 2025 10:27:43 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id hfQ-A8RCHFnP for ; Mon, 25 Aug 2025 10:27:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139262; bh=4Zx3ZmI4J3OWV69jvQpAJuyPwoVA/nVrc3cWjFPeJvo=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=e4P9cPUhdKmHYoahTiwjspyxtKAFcCxjNQ9wIeK6M+Q8jSYb8BI3L3njQ/l7huqxc AXydkijOkBBLoGU8Q9d0X+30hKYtYPgcO9rKLYhrVoY+u9CEEr1lYduttuCo0pWK+M uQ71fVp4C6xLjkyUMANZ+eIoRRyINDbxPsno1kEfeoxTtIQOhkO4R9jcUAviIDZ0ym KW2wmfQbqMW+wPlTWTomWcujQnlPolsORQJQ+twwGgF6ZrGqsUdLXjT2TkbYGoWzCk fzQzyzSxIG0sQTJAWT5GIqHCo7pLKMthTHugkP4JyClt7U0eVp1nSNgvqiEkf0cNf+ NltEFEeWxjnIA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 276C567795 for ; Mon, 25 Aug 2025 10:27:42 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139258; bh=W+bflmlpsd9xkYmKgAi4yfO+Z2QNbEb7nE1ZFOtFPF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtpyqnJ4Aiy1nxw+fQU2cmUrjLa92BOysh2PJ5zEf43ln0RNYaXLLERuVXX3tyF5i RHuncBD10TqqSw7TWy2StmTp7Ngt8M5DImJ5VQpXeS+vQao0WiRyUEz5isat5d+ttv /FnVdffuKwPiSElZ5111qlWydHkTC0xh1vq9eZNXt0wJ9vyJ6eMr5BsD4XN8jQFYaP BO0G03L3k9UyovwOv6M9BshI9gb0fghzj85SZ4tg5wAUrG1F/Ppw0CQ8rTHog3TORD 1+H/T9Ehd14jyexmQKRlMHxJEf65bjQLygWF7QgEZ+vIrPymBIypuhZeF9HHBt5rVB B5KHC8TGPLcFA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D363267706; Mon, 25 Aug 2025 10:27:38 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id zunhUOWH03zJ; Mon, 25 Aug 2025 10:27:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756139258; bh=KHJJZlONr4YE1f3HrskLjzibpZsnqNPA2gXOlHZsv8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HqynWrjV5onrvApMaqwd+0TQhb+6FjB/MbD3M7LviBY/Gb+tSHWSKo973gMka4DJt LYPS/PcgQY/hxNEsgv8LZOdOMPW9PxIlRVeV7mOLQwD1lmFijj7buDNlYNnEAOsmcX OkoyTPDvs/6GetZTdI2HJ6wnSBntTJeW6UvlSnJ5EgFskDwv7+2VFT1SXxW/O1ZVeF IZfTETGfCj541qOAvjMt4bPLpuobicHCB+foaI3jF6F/L85iL/JiV7ZNkqqL5se2yH b6PDFa/MuVFPYt8rQR/vTqlVfsiLriouG2/JwUYQrPXMHsd/S/Vai+BkqKTbtZHnrr SeCacpkK3a79w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 443EC676E8; Mon, 25 Aug 2025 10:27:38 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 25 Aug 2025 10:27:04 -0600 Message-ID: <20250825162727.3185381-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250825162727.3185381-1-sjg@u-boot.org> References: <20250825162727.3185381-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ILL55LUE2M72SNCFNOLBJZUJAYSCKZ6M X-Message-ID-Hash: ILL55LUE2M72SNCFNOLBJZUJAYSCKZ6M X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 01/16] bdinfo: Show the serial device List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Show the name of the serial device with the 'bdinfo' command. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bdinfo.c | 3 ++- test/cmd/bdinfo.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index b0d6663c6df..8208e03a4e2 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -105,7 +105,8 @@ static void print_serial(struct udevice *dev) if (ret) return; - lprint_num_l("serial addr", info.addr); + lprint_str("serial", dev->name); + lprint_num_l(" addr", info.addr); lprint_num_l(" width", info.reg_width); lprint_num_l(" shift", info.reg_shift); lprint_num_l(" offset", info.reg_offset); diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 88115a22203..c59823a2e9e 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -201,7 +201,9 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assertnonnull(gd->cur_serial_dev); ut_assertok(serial_getinfo(gd->cur_serial_dev, &info)); - ut_assertok(test_num_l(uts, "serial addr", info.addr)); + ut_assert_nextline("serial = %s", + gd->cur_serial_dev->name); + ut_assertok(test_num_l(uts, " addr", info.addr)); ut_assertok(test_num_l(uts, " width", info.reg_width)); ut_assertok(test_num_l(uts, " shift", info.reg_shift)); ut_assertok(test_num_l(uts, " offset", info.reg_offset));