From patchwork Mon Feb 4 09:20:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Senichev X-Patchwork-Id: 1035751 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tMgC3PKpz9sDL for ; Mon, 4 Feb 2019 20:22:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sau9LZZx"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43tMgB5v6TzDqH5 for ; Mon, 4 Feb 2019 20:22:30 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::241; helo=mail-lj1-x241.google.com; envelope-from=artemsen@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sau9LZZx"; dkim-atps=neutral Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43tMg605kXzDqD1 for ; Mon, 4 Feb 2019 20:22:25 +1100 (AEDT) Received: by mail-lj1-x241.google.com with SMTP id k15-v6so10925282ljc.8 for ; Mon, 04 Feb 2019 01:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jfVLcAfUhyh+8JkNdyjDg7+mDrsKXQQ8jwkHofxojA0=; b=sau9LZZxHfQvOf4C+NV9QK/0mNorsfYlXBRz2wY9vLMmAY7G0udPpVHJR1OLvlBqIk DmzVwnYpUS5PJVMe5uQgcCF7aZU2Dgdsb3QppsS/Q++uQZ1k98e6JAhulge9QKr98xUv icI1QRETMsH0K5QvYBC7MgGBRa/m7afugs2fODEkxnSdLUf6Dodml2WG9S2e7VIPfVOy 9DlHF5V2cqi/BvNzyvB4n05PipEWkJkJWUUjeg4zo4JwSQ8P1LavXm1Bpizm3yQ0il37 SIxV8ioG1pUVHNnxouDzu/WVnX5xloXRcMraWmEe5SWbLhpPr3FaKXU22vKM7HWVraqV Aygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jfVLcAfUhyh+8JkNdyjDg7+mDrsKXQQ8jwkHofxojA0=; b=j4+fz/WZKB23zcEgFbgH+uNVjGSjEwGYer85qw1AJEagavPtMGFxmO0wk2tUk9oVYV nBUJT7ldO6kQcb42tLp7zpzQa5mhp+0BAxPvHIAvIMQLuk/FtcZOA+CKcUcd+NsuOY5n ymaGnjtLq5vzY3tGxeVZ9JfBJfwsSnqB6WveGYMiV/OTg+Zq1tVHW2jwkqVJE71KEPtw tSAvBjATHBqyUkO6ZhgA+29gBlxMg20Te8aF/+8Vx3puk+tDEs+xu203bmpmuYhICSLB ho8fT4QZwlGCS3rHTgJLglXRBFbVRbfJbNynEA10UIcBJvNPh3FAoU2TtxtGsK22/Nsm vsXg== X-Gm-Message-State: AJcUuke+lR6uLB9aupPecV2pX4C33O/01/OAXKRwidqwR5IovHtCumlZ 7vizIgv8aPnVJHONdM51pIA= X-Google-Smtp-Source: ALg8bN4bmQ75/I9pyVF4wIq7cKJmOqMflJi+ZVYxeP5kJTyN8HOVDZkD2h967RmjqwsRQB4hlrQL4A== X-Received: by 2002:a2e:9256:: with SMTP id v22-v6mr35451513ljg.178.1549272142578; Mon, 04 Feb 2019 01:22:22 -0800 (PST) Received: from gmail.com ([89.207.88.249]) by smtp.gmail.com with ESMTPSA id 184sm2845lfz.10.2019.02.04.01.22.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 01:22:21 -0800 (PST) From: Artem Senichev X-Google-Original-From: Artem Senichev Date: Mon, 4 Feb 2019 12:20:10 +0300 To: Amitay Isaacs Message-ID: <20190204092010.j5dldqf2c7wtpj6b@gmail.com> References: <20190121134935.hfnr2n274whtl6is@gmail.com> <9722f70a5f74efc5ac2164a4db2225bacf591dba.camel@ozlabs.org> <20190130071906.wf76z2gyl77tylu7@gmail.com> <45c9a63d80ec22e8d2a432facb2f7d7825f1130e.camel@ozlabs.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <45c9a63d80ec22e8d2a432facb2f7d7825f1130e.camel@ozlabs.org> User-Agent: NeoMutt/20180716 Subject: [Pdbg] [PATCH v2] main: Set I2C backend device specified in arguments X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pdbg@lists.ozlabs.org Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Restores the functionality that allows to set I2C backend device through command line arguments, it was broken by commit dacc9b57e4615f125eb1f56d842a64c40abb1408 Signed-off-by: Artem Senichev Reviewed-by: Amitay Isaacs --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index 22e74a5..d5f9385 100644 --- a/src/main.c +++ b/src/main.c @@ -532,6 +532,14 @@ static bool target_selection(void) #ifdef TARGET_ARM case I2C: pdbg_targets_init(&_binary_p8_i2c_dtb_o_start); + /* Set device for I2C backend */ + if (device_node) { + struct pdbg_target *pib; + const size_t len = strlen(device_node) + 1 /* include last null */; + pdbg_for_each_class_target("pib", pib) { + pdbg_target_set_property(pib, "bus", device_node, len); + } + } break; case FSI: