From patchwork Mon Jan 7 04:30:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1021170 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Y2WS07xdz9sDn for ; Mon, 7 Jan 2019 15:30:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="W9r37w+l"; 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 43Y2WR4yQgzDq7j for ; Mon, 7 Jan 2019 15:30:43 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43Y2W90MfdzDqDs for ; Mon, 7 Jan 2019 15:30:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="W9r37w+l"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (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 ESMTPSA id 43Y2W85S6vz9sDB; Mon, 7 Jan 2019 15:30:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1546835428; bh=Sqlf+sMSUGlrhuZJkCX2BQ1KaEWLh26CLwf9yTJqtVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W9r37w+lxLXxa6aKq3V3VjY4Cev/JzhuRwxl/lmK5vMG0EkEPnWfKYZKKLmv0YGTy AslK2/oBDDVXxoCoR4II77LOiHT56szXMgvfP9cQLfbry90h25+av3K3Qtsd31urgl mIEhvfBynmWQoMYciVF9RhiKw6jjKCPPfg22/P5VKX3eZjM3Z1tvwVO0FLAx7PXbe6 w96eG4UgXuVVWEKMse+/FOvAspdoaxYy+7UYif+durasiUgkrTs1L6zf5jl7f9tkC2 Qn9x+U1bveHMJL7Gr3+HWzZIUart5fJJSocNFBbRf+3nkL0Mr7thHynpq1u75/PyLK 9DwDccOhbcUkw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Mon, 7 Jan 2019 15:30:17 +1100 Message-Id: <20190107043020.145107-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107043020.145107-1-amitay@ozlabs.org> References: <20190107043020.145107-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 2/5] adu: Add read/write methods for adu target 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: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- libpdbg/adu.c | 4 ++++ libpdbg/target.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index b2e80ee..bc01625 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -570,6 +570,8 @@ static struct adu p8_adu = { }, .getmem = p8_adu_getmem, .putmem = p8_adu_putmem, + .read = adu_read, + .write = adu_write, }; DECLARE_HW_UNIT(p8_adu); @@ -581,5 +583,7 @@ static struct adu p9_adu = { }, .getmem = p9_adu_getmem, .putmem = p9_adu_putmem, + .read = adu_read, + .write = adu_write, }; DECLARE_HW_UNIT(p9_adu); diff --git a/libpdbg/target.h b/libpdbg/target.h index 16ae304..eb8d564 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -109,6 +109,8 @@ struct adu { struct pdbg_target target; int (*getmem)(struct adu *, uint64_t, uint64_t *, int, uint8_t); int (*putmem)(struct adu *, uint64_t, uint64_t, int, int, uint8_t); + int (*read)(struct adu *, uint64_t, uint8_t *, uint64_t, uint8_t, bool); + int (*write)(struct adu *, uint64_t, uint8_t *, uint64_t, uint8_t, bool); }; #define target_to_adu(x) container_of(x, struct adu, target)