Message ID | 20190531061351.22973-51-stewart@linux.ibm.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45FZK93JYMz9s00 for <incoming@patchwork.ozlabs.org>; Fri, 31 May 2019 16:28:45 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45FZK92NTvzDqcJ for <incoming@patchwork.ozlabs.org>; Fri, 31 May 2019 16:28:45 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45FZ0N2Wq2zDqYb for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 16:14:12 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4V6421H133914 for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 02:14:08 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2stwdwjr2b-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 02:14:08 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <skiboot@lists.ozlabs.org> from <stewart@linux.ibm.com>; Fri, 31 May 2019 07:14:07 +0100 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 31 May 2019 07:14:05 +0100 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4V6E4HK32702804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 06:14:04 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0194A6A058 for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 06:14:04 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BEF356A051 for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 06:14:03 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.91]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP for <skiboot@lists.ozlabs.org>; Fri, 31 May 2019 06:14:03 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 4CBE6503F94; Fri, 31 May 2019 16:13:57 +1000 (AEST) From: Stewart Smith <stewart@linux.ibm.com> To: skiboot@lists.ozlabs.org Date: Fri, 31 May 2019 16:12:51 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190531061351.22973-1-stewart@linux.ibm.com> References: <20190531061351.22973-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19053106-0016-0000-0000-000009BC52A4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011189; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01211088; UDB=6.00636341; IPR=6.00992124; MB=3.00027126; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-31 06:14:05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19053106-0017-0000-0000-0000436E2D0C Message-Id: <20190531061351.22973-51-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-31_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905310040 Subject: [Skiboot] [PATCH 050/110] doc: Add OPAL_I2C_REQUEST documentation X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
Big documentation cleanup/expansion
|
expand
|
diff --git a/doc/opal-api/opal-i2c-request-109.rst b/doc/opal-api/opal-i2c-request-109.rst new file mode 100644 index 000000000000..edcde4bcb094 --- /dev/null +++ b/doc/opal-api/opal-i2c-request-109.rst @@ -0,0 +1,64 @@ +.. _OPAL_I2C_REQUEST: + +OPAL_I2C_REQUEST +================ + +.. code-block:: c + + #define OPAL_I2C_REQUEST 109 + + /* OPAL I2C request */ + struct opal_i2c_request { + uint8_t type; + #define OPAL_I2C_RAW_READ 0 + #define OPAL_I2C_RAW_WRITE 1 + #define OPAL_I2C_SM_READ 2 + #define OPAL_I2C_SM_WRITE 3 + uint8_t flags; + #define OPAL_I2C_ADDR_10 0x01 /* Not supported yet */ + uint8_t subaddr_sz; /* Max 4 */ + uint8_t reserved; + __be16 addr; /* 7 or 10 bit address */ + __be16 reserved2; + __be32 subaddr; /* Sub-address if any */ + __be32 size; /* Data size */ + __be64 buffer_ra; /* Buffer real address */ + }; + + int opal_i2c_request(uint64_t async_token, uint32_t bus_id, + struct opal_i2c_request *oreq); + +Initiate I2C request using i2c master that OPAL controls. + +Return Codes +------------ + +Most return codes will come through as part of async completion. + +:ref:`OPAL_PARAMETER` + Invalid request pointer, or bus ID. +:ref:`OPAL_UNSUPPORTED` + Unsupported operation. e.g. 10 bit addresses not yet supported. +:ref:`OPAL_NO_MEM` + Not enough free memory in OPAL to initiate request. +:ref:`OPAL_ASYNC_COMPLETION` + Operation will complete asynchronously. +:ref:`OPAL_I2C_TIMEOUT` + I2C operation initiated successfully, but timed out. +:ref:`OPAL_I2C_INVALID_CMD` + Invalid i2c Command. +:ref:`OPAL_I2C_LBUS_PARITY` + I2C LBUS Parity error +:ref:`OPAL_I2C_BKEND_OVERRUN` + I2C Backend overrun. +:ref:`OPAL_I2C_BKEND_ACCESS` + I2C Backend Access error. +:ref:`OPAL_I2C_ARBT_LOST` + I2C Bus Arbitration lost. +:ref:`OPAL_I2C_NACK_RCVD` + I2C NACK received. +:ref:`OPAL_I2C_STOP_ERR` + I2C STOP error. +:ref:`OPAL_SUCCESS` + I2C operation completed successfully. Typically only as part of + async completion.
Fixes: https://github.com/open-power/skiboot/issues/132 Signed-off-by: Stewart Smith <stewart@linux.ibm.com> --- doc/opal-api/opal-i2c-request-109.rst | 64 +++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 doc/opal-api/opal-i2c-request-109.rst