Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1724096pxj; Wed, 19 May 2021 12:22:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFBjn3ZnfQxZfy4GmZalaVrhDmstfNvQkzpvBj38XotvHEnlTdT9BeJem6rjEeMV907Hqo X-Received: by 2002:a17:907:20a8:: with SMTP id pw8mr760969ejb.256.1621452147966; Wed, 19 May 2021 12:22:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1621452147; cv=pass; d=google.com; s=arc-20160816; b=bUclwCS5Bst2Io1AUfrx+TB35wB/vsOrBi7+kNOmSP6QJwoHgvMiST02nmKBrQeUtY pwCKO7yzEimp8xRrBN6BAqoUt7ZyULc5LHoC2ejbp+tFboTdoCsev3SaQowEqzDN7A08 A3gVqop62W+Gx5wCkQkvq0it3sdj+fGwImU3qo0ViuvAwiNHAi9jg6DvrkIXw7VigzP+ JvZ97djjc7ylqR5IWZKbcuNlf5XoJff/TgUVgf+x3IDDjDFI4PrjhO3xs2FQlznfhdsQ FNUo+WWX3x297YfZv+Cb9JoWZAUDllkLjk1UsTMmU1s45vJ+ZUN7ScPfL0+ON12qiqdD Xd2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=xMzGIKuhioI5dKKj4UXaGOHki/qKge3G2HGDlIHJmJM=; b=PeyFI+kUygshBa5t/qQJuXsimHJO1avqFPxIxzImiilCHho63e3CdzYDND0h4Av+nS dBU5+BMlaAh5TgMyv31bKQWfn+L1owbP8vEnERE2OcKdP6G5LZFgOY+xzG++SkMIwoEP DYaJ8TdVx3GCck2e2e72GSUksansDl0ai4N6XdbtfnpLS8055EfotQfRN6mRksg7ubH1 lNkDBqvxQYoFjsEHyi3ja1hGjWIMcyh6DrBhVIeEpf0GB9oeJgVerKVJBc1uT+0wlLwz /iLaa7JoS+v+luYsHheUo053Vy/dDK0b1FJuA/fnJhCeZCqaGQEAC9VxK03KsAGw4upD Lmxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=ZcagqrcP; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si99427edy.382.2021.05.19.12.22.02; Wed, 19 May 2021 12:22:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=ZcagqrcP; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237910AbhESHvm (ORCPT + 99 others); Wed, 19 May 2021 03:51:42 -0400 Received: from mail-bn8nam11on2130.outbound.protection.outlook.com ([40.107.236.130]:40833 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236360AbhESHvl (ORCPT ); Wed, 19 May 2021 03:51:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C5Ofs9DiV3HM7R4zcK9DP4Taw4TgDOeJAxW0/iQriSMa8KG3VkOtWOmQ5H/t+wFWZ3hbF9E5vkwSoJZo7hGVUyGnMdwpup7ZZ5ILGgdo1RhuS6X5wq80NCgYEmYWGgdvZVi5DqcI2B/joP3ZCDf50/z2DB3+ey/R2U+kVpiQbSzED/iZz3vKp9wRI2oee0tIbCB/Op7GLjHjrKKVgKAZ8tgowujsR2++/Vlnm/NBoQEk+SmsiRaYZoOXoeb+OEx+4OTZ5yIqdlTO6A02dbbPFmM2CQXz9m6Ls7GuI0gUVaNAP6Huahk4zl+nbEHlnvXPxBGPepxkL+ThTVccDsWrzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xMzGIKuhioI5dKKj4UXaGOHki/qKge3G2HGDlIHJmJM=; b=FNL/PtlVQLZETLcqiXV3vjKM+TUo0lHim9yotoMsR9MDVOaIEHPalwq5kb+rE3thg9NKxkTs1FBmyZoa1PWKuiMzxdV6W58o/PSZGafZy+WdYjt5/0KGHxO8c5y9wQzahOg0RIwBbwiqZTDhas0/EkLAbPeJKb584/Co+lJdI2QghKwFCJjwijzWTclbU8YNiHnRpP400Dw6WRM0TQVzIoJqyqBsAnEWXb0cB+3SOcooKBNvjdZn8FZ92A0aJGDKtncWkFu850bYhgMT4HGsmadgcwArGheWHi3cuCMwrZhJqlQhv3Gwce4dyzDqfmWdjJo5zDqpqaBm+R6HYg25YA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xMzGIKuhioI5dKKj4UXaGOHki/qKge3G2HGDlIHJmJM=; b=ZcagqrcP7E/DGZkcVZyXhWAfBp9yaUlYYkrHbVydvpDz0kmecJz9ZwCuFw3baxlqjhkQPeStuxjKYk0cXFpeT8EBRf0tcQmEodZR4AB4shDXeZNYg/Q9ScM2Rd5u3zsOAi10fSwRoAVQ2pQD87nvSY0ZXKaeGAfC6aLM/Hl5XLM= Authentication-Results: acm.org; dkim=none (message not signed) header.d=none;acm.org; dmarc=none action=none header.from=os.amperecomputing.com; Received: from MW2PR0102MB3482.prod.exchangelabs.com (2603:10b6:302:c::32) by MW2PR0102MB3451.prod.exchangelabs.com (2603:10b6:302:10::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Wed, 19 May 2021 07:50:16 +0000 Received: from MW2PR0102MB3482.prod.exchangelabs.com ([fe80::d840:7aa7:58d4:b503]) by MW2PR0102MB3482.prod.exchangelabs.com ([fe80::d840:7aa7:58d4:b503%5]) with mapi id 15.20.4129.032; Wed, 19 May 2021 07:50:15 +0000 From: Quan Nguyen To: Corey Minyard , Rob Herring , Joel Stanley , Andrew Jeffery , Brendan Higgins , Benjamin Herrenschmidt , Wolfram Sang , Philipp Zabel , openipmi-developer@lists.sourceforge.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org Cc: Open Source Submission , Phong Vo , "Thang Q . Nguyen" , openbmc@lists.ozlabs.org Subject: [PATCH v3 0/7] Add Aspeed SSIF BMC driver Date: Wed, 19 May 2021 14:49:27 +0700 Message-Id: <20210519074934.20712-1-quan@os.amperecomputing.com> X-Mailer: git-send-email 2.28.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [118.69.219.201] X-ClientProxiedBy: HK2PR04CA0081.apcprd04.prod.outlook.com (2603:1096:202:15::25) To MW2PR0102MB3482.prod.exchangelabs.com (2603:10b6:302:c::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from hcm-sw-17.amperecomputing.com (118.69.219.201) by HK2PR04CA0081.apcprd04.prod.outlook.com (2603:1096:202:15::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 19 May 2021 07:50:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b64fa7f-f974-4f92-1693-08d91a9abd15 X-MS-TrafficTypeDiagnostic: MW2PR0102MB3451: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ksnt2QQ8Y3z1deR/dYJGCaIpFivW2U6uwYxH1H+5nPCOVcdgbVFRYMv0TQg1luhylipfMcD3wUY0PF67agnlhGIouFEB65OvCPI32eGfk70Yd3iknzLQiSTmVeBtbYDNORIPpVUeMEoaDo/1LJuIQWMTUqSjBCsUKAZiFIZ7IiQZCNDa7yH5cWUX1sEIR32EFYyoCT+shHZAukQ7jh44qs23Wh+EZW8+ZI+dS2dOKz8WqJWNw+61PEgXfooKYgkYj2wWSQsYaprvKT/RRe4QqExOrMdBheH08SuHPIVEy5fz+vC2gGE8Vjo8WuGT2yoeu5BmRK4GU5YOTpKx/bJzFELmTT2Tx62eOIA2v3OotAITei70ACYeitEUBfeIqxAi6Av9i4F+bZflBetT4mAoLLC+ib5f8Abe09kZ4+DpAsZpiQpoLO/ezWWYK1WXBaSihJSkVm0B4Vx1LIikqzlPAO9luXDAzS9V10tQkn/efHlEAnzzvArFCsjadtpVUhlbAi9miYVEZKvMm8VgWpK9ygf+lEu2A6k9/fkR3l3mH8ZjKA4ET1o2/KboH0s4aE/TlkbNxHTC0KOqHME9gDxeBobZfA3ua+hflYsQMxl/ID5hPvzpn+7/dKy4Opb18uli/0IXk+SwFuI20LOAOzzIGEv5xnwxt7btp8tLW749kGQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW2PR0102MB3482.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(39850400004)(376002)(366004)(396003)(346002)(83380400001)(7416002)(8676002)(2906002)(921005)(6512007)(478600001)(38100700002)(8936002)(186003)(16526019)(38350700002)(52116002)(5660300002)(956004)(2616005)(4326008)(110136005)(54906003)(316002)(66556008)(66476007)(66946007)(6486002)(6506007)(1076003)(26005)(86362001)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?Vliqi79pWnJuaAvUsAEf2F90MxOAy0oGVEof5NIjm0bQ+UzcmffP8KqNNiN4?= =?us-ascii?Q?yD4kq6IIy0HHcVFn3er0Gpnxsg9cZ1JqERAPgAvYKMx3fRkNNaxrNZpY0lIU?= =?us-ascii?Q?d6C3b0Qjc+UJsB7E+5KDhGsc7aE+cZ4D8Rg6u7AlJs5zbklNTVR3LRlchljJ?= =?us-ascii?Q?mJO2xht4w6C+4rHXtpxfKDSsnMjWva5W96oVJKv43jDIV+138EqnLq021xN0?= =?us-ascii?Q?wQArxOWONyLtmNCfKYUs9BTNt44vlW8nK3fIi2Jno5NeiBIrbhXWWLh468i0?= =?us-ascii?Q?ccwfYbyQ/SSBre66SC09hz6GI60H51dmprXFm7gJ5/g6dEII241uFTDx5mPl?= =?us-ascii?Q?u9/cOgeAXJ2b+Ftu75CecAqUdJfJKh2v2iDOJM9KB3lh0gEb48D4kGIc8Q23?= =?us-ascii?Q?MQDzmT+vCPyKru8OshuMjujMtACA2baTQMNNI5dNSq9UYuaBTHpYn9Dt26tv?= =?us-ascii?Q?vbvaqEzYFBlXMNA7bXXN4NO5CknCx8q00sv39kZFnt4fitrdFbhXur7g9EH0?= =?us-ascii?Q?oSin8wcCPSqKO9/Kj4BmfA64CSJpl3IURYmgGyuxaeU/YaGQziiFZyEJMOtc?= =?us-ascii?Q?UnuFCR+7E2hmX6O4lkT/6rCeiN9Qjt0eND5yY2QfOl7kR6LYMowTa9Y6jlBQ?= =?us-ascii?Q?ZEDW+Djtp9+3NwCDQCFVJcol1YxL0wv/+LR1956ALndA6zNxtIYO76p1weBA?= =?us-ascii?Q?5y/OI3IaoJs1X+3HFPftZ2EU7twxiFH2pZPeb5PTmrbqzVa+bbaqBsPkvyDK?= =?us-ascii?Q?2K/HQE3JXm27STUuNrQKgQztu640vIHdzO7jS7UWPH/jkCm5hUsA5J4o4XQ7?= =?us-ascii?Q?f143ebgBltqtUJvzVeIL1WoPm4x+EqcbyayccViajyYGvfcsIQWrQ7ZuuDk5?= =?us-ascii?Q?3c1Pcrh8WuBZXGYYfEuh+bXnn7SMxIyvcsoThcjn6/hBZmDKsWa7pb8WWB8f?= =?us-ascii?Q?iUWnQT590e4GZ/AsSMR6P0Fmlics+6A3Lr17aAKw3PYa/c7nHU4mfffFK1Mt?= =?us-ascii?Q?zJNpKR83m4Lm98LUA9T7aypx02jOE0B1FXdISS+x3jL/TYHGEqq7BmPvYsWi?= =?us-ascii?Q?nruFxgjovG+ji6qpgCgcqhKjTzMUC8DIs/TmkGwCaKipLh1Lt6SDWZe9YW3I?= =?us-ascii?Q?sP1tsscotMxzwgNGQwUPEy1s8sIvx/0/dqC+3JLDuQcoIbmYOCeJxne4Q/Oj?= =?us-ascii?Q?Zr3/+3ZloIBLUrqOJUCLSRkTHl7+DaT6nWp5lZnnHdZQUUU91knv1R6ng0NO?= =?us-ascii?Q?Ko5/XmRg8J3YXvw+3Vfjz/Z/XEYfHIY8HGCWeaTffYlqQ2d7F4XW3NphHL/0?= =?us-ascii?Q?DRLD8L2WyRsHJYOGzynllYIi?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b64fa7f-f974-4f92-1693-08d91a9abd15 X-MS-Exchange-CrossTenant-AuthSource: MW2PR0102MB3482.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 07:50:15.4354 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L2Tce9SYQ5hlRUHkEIcbAmbxXV0HMeRnJX9xIRioTlO4ScCgiHGj8EwTmSnPSK5ahlafF/HRAbZ0o+t1IHzq+NziCeUDUmvwDFO2ylmfBRY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR0102MB3451 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series add support for the Aspeed specific SSIF BMC driver which is to perform in-band IPMI communication with the host in management (BMC) side. v3: + Switched binding doc to use DT schema format [Rob] + Splited into generic ssif_bmc and aspeed-specific [Corey, Joel] + Removed redundant license info [Joel] + Switched to use traditional if-else [Joel] + Removed unused ssif_bmc_ioctl() [Joel] + Made handle_request()/complete_response() to return void [Joel] + Refactored send_ssif_bmc_response()/receive_ssif_bmc_request() [Corey] + Remove mutex [Corey] + Use spin_lock/unlock_irqsave/restore in callback [Corey] + Removed the unnecessary memset [Corey] + Switch to use dev_err() [Corey] + Combine mask/unmask two interrupts together [Corey] + Fixed unhandled Tx done with NAK [Quan] + Late ack'ed Tx done w/wo Ack irq [Quan] + Use aspeed-specific exported aspeed_set_slave_busy() when slave busy to fix the deadlock [Graeme, Philipp, Quan] + Clean buffer for last multipart read [Quan] + Handle unknown incoming command [Quan] v2: + Fixed compiling error with COMPILE_TEST for arc Quan Nguyen (7): i2c: i2c-core-smbus: Expose PEC calculate function for generic use ipmi: ssif_bmc: Add SSIF BMC driver i2c: aspeed: Fix unhandled Tx done with NAK i2c: aspeed: Acknowledge Tx done w/wo ACK irq late i2c: aspeed: Add aspeed_set_slave_busy() ipmi: ssif_bmc: Add Aspeed SSIF BMC driver bindings: ipmi: Add binding for Aspeed SSIF BMC driver .../bindings/ipmi/aspeed-ssif-bmc.yaml | 33 + drivers/char/ipmi/Kconfig | 22 + drivers/char/ipmi/Makefile | 2 + drivers/char/ipmi/ssif_bmc.c | 605 ++++++++++++++++++ drivers/char/ipmi/ssif_bmc.h | 93 +++ drivers/char/ipmi/ssif_bmc_aspeed.c | 75 +++ drivers/i2c/busses/i2c-aspeed.c | 51 +- drivers/i2c/i2c-core-smbus.c | 12 +- include/linux/i2c.h | 1 + 9 files changed, 884 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/ipmi/aspeed-ssif-bmc.yaml create mode 100644 drivers/char/ipmi/ssif_bmc.c create mode 100644 drivers/char/ipmi/ssif_bmc.h create mode 100644 drivers/char/ipmi/ssif_bmc_aspeed.c -- 2.28.0