From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2080C433E0 for ; Fri, 8 Jan 2021 03:01:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59CD223603 for ; Fri, 8 Jan 2021 03:01:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59CD223603 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Few7vDn3tyNVJXhHmFjTfGFz3bMpZsYf5lTxgsGaIL4=; b=xMERcLlKtdeNxqLzyTbfGfJca XoihcnAIpJ6S/PPEx6+sOnxOjFMjPpGnwpgQo46EDsprYEoQA2Y+VFISH4X62VckBIImNtUSsvoef gfKa4Teqh0n7UNe8r9a0qem4eQQJvNxACBIFNcrL7UEpKUisO5KEW55RfXA4lQbcobU3+m3Rx4fyX FD9O5ad9q05rJX5C/jh7rTTPIGFCPWFGLrhL5a7Wbv8wA8Qf8b9JSMoiwjL+3nqDiCi2BJM+kaZa6 LOeaV9PZTjKU6TzcRyum60kEuVbIIq/hvjQxsmQ1n/0jNoiQQs3NPF3R9auB2MKi/fBjlA5blWtmz /3qFmmKAA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxi0A-0000fg-SF; Fri, 08 Jan 2021 02:59:46 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxi08-0000ei-DZ for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 02:59:45 +0000 Received: by mail-qt1-x833.google.com with SMTP id 2so5713648qtt.10 for ; Thu, 07 Jan 2021 18:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m1UOnZQlSUpnf6aKPwE+X4haOuAWzcolUyB8HXclKZk=; b=hXyKJvBWO47USxHNP91v+gMyjfU65MiJCuufIGMJTAK222NvZmZlCtJt1Rzl/mycDM Nf6XnQh73y7OiZqLNySBMgSDSqzmV+j7kIbNHCajVDqQnY13pPqMEIuFKjq67rTQq0xj F5eNNsi3tEDYhNIFGi/ztmmRfOHrQty8CJ3/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m1UOnZQlSUpnf6aKPwE+X4haOuAWzcolUyB8HXclKZk=; b=Avdjx+F8dOnpMEQChZn2d23ObeTLQ38Coo7ok7cvKo+ysEHpzRPU8jXrc4Cl4C9j+K +BgxHMraKzC9/P9GhgZbF9ecjbNjZ3eyIZnBaTbQMRNT9Ji0KRXVM/CZVcOKTiFh7OIQ GkgDuNFgUBn/WSsPA+nO+56YZpChlELkMD3cC2PZ/J4WJ+6cmoKBli5cHJgjrzb8tuZS vuB/+JB9LOJqrDe/EUp37RprWnOtBmuDDBGyRZvFNpuZ6XnXIXYyZp/Jq/LZ2gccgjaR XXeBJUXd+xNaP1A1gn6rEnF3zBSSQGsRXPLjCmOSx/fxpidARQ48Uu3Sh3c1es0gLvR9 5eAQ== X-Gm-Message-State: AOAM531yQBqj2EKHB7GdIgJRDZqGSYxJ6En9p8mC5PPMPxCo+DNJ5by7 BFzH2z+8fNHJrU/ebTDpu+81Mii1Aj4ATJcICQVcNd397rM= X-Google-Smtp-Source: ABdhPJzgwxO1QYsS1AD103dGGMwHdDtcECTAh5zBmhiw0tIxXUY3pxQQ/nGQO979T5rDAeRPM0TxIO3GFuCFkyqwz0M= X-Received: by 2002:aed:2d65:: with SMTP id h92mr1632947qtd.263.1610074779999; Thu, 07 Jan 2021 18:59:39 -0800 (PST) MIME-Version: 1.0 References: <20210106055939.19386-1-chiawei_wang@aspeedtech.com> <20210106055939.19386-6-chiawei_wang@aspeedtech.com> <20210106153202.GA2258036@robh.at.kernel.org> In-Reply-To: From: Joel Stanley Date: Fri, 8 Jan 2021 02:59:28 +0000 Message-ID: Subject: Re: [PATCH 5/6] soc: aspeed: Add eSPI driver To: ChiaWei Wang , Jeremy Kerr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_215944_690365_1403D73C X-CRM114-Status: GOOD ( 21.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-aspeed@lists.ozlabs.org" , "devicetree@vger.kernel.org" , "andrew@aj.id.au" , "maz@kernel.org" , "openbmc@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "p.zabel@pengutronix.de" , BMC-SW , "tglx@linutronix.de" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 7 Jan 2021 at 02:39, ChiaWei Wang wrote: > > Hi Rob, > > > -----Original Message----- > > From: Rob Herring > > Sent: Wednesday, January 6, 2021 11:32 PM > > To: ChiaWei Wang > > Subject: Re: [PATCH 5/6] soc: aspeed: Add eSPI driver > > > > On Wed, Jan 06, 2021 at 01:59:38PM +0800, Chia-Wei, Wang wrote: > > > The Aspeed eSPI controller is slave device to communicate with the > > > master through the Enhanced Serial Peripheral Interface (eSPI). > > > All of the four eSPI channels, namely peripheral, virtual wire, > > > out-of-band, and flash are supported. > > > > > > Signed-off-by: Chia-Wei, Wang > > > --- > > > drivers/soc/aspeed/Kconfig | 49 ++ > > > drivers/soc/aspeed/Makefile | 5 + > > > drivers/soc/aspeed/aspeed-espi-ctrl.c | 197 ++++++ > > > drivers/soc/aspeed/aspeed-espi-flash.c | 490 ++++++++++++++ > > > drivers/soc/aspeed/aspeed-espi-oob.c | 706 > > ++++++++++++++++++++ > > > drivers/soc/aspeed/aspeed-espi-peripheral.c | 613 +++++++++++++++++ > > > drivers/soc/aspeed/aspeed-espi-vw.c | 211 ++++++ > > > include/uapi/linux/aspeed-espi.h | 160 +++++ > > > 8 files changed, 2431 insertions(+) > > > create mode 100644 drivers/soc/aspeed/aspeed-espi-ctrl.c > > > create mode 100644 drivers/soc/aspeed/aspeed-espi-flash.c > > > create mode 100644 drivers/soc/aspeed/aspeed-espi-oob.c > > > create mode 100644 drivers/soc/aspeed/aspeed-espi-peripheral.c > > > create mode 100644 drivers/soc/aspeed/aspeed-espi-vw.c > > > > drivers/spi/ is the correct location for a SPI controller. > > > > > create mode 100644 include/uapi/linux/aspeed-espi.h > > > > This userspace interface is not going to be accepted upstream. > > > > I'd suggest you look at similar SPI flash capable SPI controller drivers upstream > > and model your driver after them. This looks like it needs major reworking. > > > eSPI resues the timing and electrical specification of SPI but runs completely different protocol. > Only the flash channel is related to SPI and the other 3 channels are for EC/BMC/SIO. > Therefore, an eSPI driver might not fit into the SPI model. I agree, the naming is confusing but eSPI doesn't belong in drivers/spi. As it is a bus that is common to more than just the Aspeed BMC, we may want to implement it as a new bus type that has devices hanging off it, similar to FSI. Cheers, Joel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel