From patchwork Tue Sep 20 02:03:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiaWei Wang X-Patchwork-Id: 12981352 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EEC0ECAAD8 for ; Tue, 20 Sep 2022 05:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3nFcJdPM2rGLIiRsHQ+b7EtuxLzAiMET2qx9jFNBsh0=; b=vV1nWPlrqt8U50 qwKNb/GRG+Dqzlhm8AfA7BhEw13W/WC+aYwrJoiVQ3fGnyOx1OEV9ZhEyOpOFGTZ77XCpjKOm98/X /msEUet8TncQyLcnix9cP50hrpAO6s+0MrNalKq39ZGpvvP0wHw3ZFwsXP6N5lYbOus2ZMmyplX1T nsmmjr/dWRFUBIi6bt/8vVvzQAESgn4SOrugYPoj2RsJ3fyWqVZdVp0DH8QWxgmgbEA9jrwVGRSCS HjjKxgJL5yeYEDhpD3TJpwQ0agTNTHx6vKZox2VNihdpPjBwG5QnVTw6KNnJHGfThxstZymgXU+8J Sfo1NUpTuR7OhsODhpsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaVPk-000aWr-Nm; Tue, 20 Sep 2022 05:03:20 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaVPi-000aVl-9h for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Sep 2022 05:03:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:In-Reply-To:References; bh=D7ycuOQVW8Q9yTDRfZo8iWPpsNNaYFC/+pHr+qHftSY=; b=rYvKSzvpEWvi0ubJsdduqFokmP HwPJtvlCwSjiwhlx+HFWuDOIykIlxmsZCgNnXU3mkgefbEwqvCXtddvLdeVkPIAYbHFEXXy4MlwXl ivWhJhCol7Gj2msJoq571jp49lL39hYc8J3dOZ4vsuQlS5iqEfJEfMgX914DU0mM+012ncKy8Qhxf +WUDz/JwXqEV91VR7KFngOGhh2Nmh/yr59KlKi6wQdckYwgr0Z8WA7i81Fw4T0XaKsyiUD6/ABVsS BgUnWaZx7wUXfN1qB8NO9tun9wXHirCU8EualX3yS4rnpaYMvIYMbJX6ajd6/Z9w2sh2r/J4arM/q dJsQlZEg==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaScR-00EEmc-47 for linux-arm-kernel@lists.infradead.org; Tue, 20 Sep 2022 02:04:18 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 28K1gpFj087853; Tue, 20 Sep 2022 09:42:51 +0800 (GMT-8) (envelope-from chiawei_wang@aspeedtech.com) Received: from Chiawei-PC03.aspeed.com (192.168.2.66) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 20 Sep 2022 10:03:36 +0800 From: Chia-Wei Wang To: , , , , , , , Subject: [PATCH] ipmi: kcs: aspeed: Update port address comments Date: Tue, 20 Sep 2022 10:03:33 +0800 Message-ID: <20220920020333.601-1-chiawei_wang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [192.168.2.66] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 28K1gpFj087853 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220920_030416_054779_E4882C3E X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove AST_usrGuide_KCS.pdf as it is no longer maintained. Add more descriptions as the driver now supports the I/O address configurations for both the KCS Data and Cmd/Status interface registers. Signed-off-by: Chia-Wei Wang --- drivers/char/ipmi/kcs_bmc_aspeed.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c index cdc88cde1e9a..19c32bf50e0e 100644 --- a/drivers/char/ipmi/kcs_bmc_aspeed.c +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c @@ -207,17 +207,24 @@ static void aspeed_kcs_updateb(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 mask, } /* - * AST_usrGuide_KCS.pdf - * 2. Background: - * we note D for Data, and C for Cmd/Status, default rules are - * A. KCS1 / KCS2 ( D / C:X / X+4 ) - * D / C : CA0h / CA4h - * D / C : CA8h / CACh - * B. KCS3 ( D / C:XX2h / XX3h ) - * D / C : CA2h / CA3h - * D / C : CB2h / CB3h - * C. KCS4 - * D / C : CA4h / CA5h + * We note D for Data, and C for Cmd/Status, default rules are + * + * 1. Only the D address is given: + * A. KCS1/KCS2 (D/C: X/X+4) + * D/C: CA0h/CA4h + * D/C: CA8h/CACh + * B. KCS3 (D/C: XX2/XX3h) + * D/C: CA2h/CA3h + * C. KCS4 (D/C: X/X+1) + * D/C: CA4h/CA5h + * + * 2. Both the D/C addresses are given: + * A. KCS1/KCS2/KCS4 (D/C: X/Y) + * D/C: CA0h/CA1h + * D/C: CA8h/CA9h + * D/C: CA4h/CA5h + * B. KCS3 (D/C: XX2/XX3h) + * D/C: CA2h/CA3h */ static int aspeed_kcs_set_address(struct kcs_bmc_device *kcs_bmc, u32 addrs[2], int nr_addrs) {