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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18E48C433EF for ; Thu, 7 Oct 2021 02:48:22 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D3CF86113E for ; Thu, 7 Oct 2021 02:48:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D3CF86113E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NqOUT1GA9AxaG4rSPkVP8u48Y2sXuly66PHpsm2hL5A=; b=MEzAymBLn+7KUa 717LeQ0qVKfSed5y2PrfAirhB2nq/2bAk27iyr8b2Z5wRiLFRfkAmcbSsCqUrW/oypIhC6enRk3rd 1ct86/5e0hPyZsdlvsRjJ6YToFwm6WCfcD6JddFdWo4lIF+DAF7Fe2BEtocX0ZjNLsgOL+fwpb2p8 vQLkemrfkplvDywJbbPTOOG5ncFjPEs6OKU5a8k3Xb8ThhJzwaaaUusAmFS8LF+FoKA5TGyB3u73h M6qHWBuJalZgfkWUegnw7/UKWdYOHmXY7XgE1jVXOrjjBPRncaU0YPh0lQnI0TWAu1j6TFjGe/9wo /SbO/nkpjT1CvO3oSFsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYJQQ-00G1LV-Gh; Thu, 07 Oct 2021 02:46:26 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYJQM-00G1L4-St for linux-arm-kernel@lists.infradead.org; Thu, 07 Oct 2021 02:46:24 +0000 Received: by mail-pf1-x42e.google.com with SMTP id 145so4027485pfz.11 for ; Wed, 06 Oct 2021 19:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=IpVh1IYfpzKfR6GkSU+3lboEb+0mbcf/l+spamR+b4w=; b=qUqtdUagXGAHjJ02iK3EMfeQQVQwbLTfNID8omD0ZiAPu6CSf3U3Hub+uP53ewURUY HShMwL8OiIp1x1Z/xPUraEDuIWFQi4OIqZi6hXbo6pbXXrlpohC3u2r/tM1f7h2wavk4 tj33wD82910933jV6FPkEiv0xW8psa2+sKnso4MtRvBFTvOqx7eDFLxDAKasxS025rQC UNZt5jEiU/XUnLiIkebPOE7rLHZK3BOogYPCBEUrB5yxk5K+8u8ArXY72L9+y8H3vgRI SjxdRwBT5ON7qIvRxaFOUfbpeoiXaI8aMH3qUGUCSPYrqZRDDWLN5vhxzgW3/lm2odmA CgRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=IpVh1IYfpzKfR6GkSU+3lboEb+0mbcf/l+spamR+b4w=; b=K9BpG3ksOnDJ6OS12ep4AGnEXlwm6vPtNW6BZqnpz3QDRaiM46UdtPMjkdQ3t8phiT E13oM9iWGmSYR8Nx/A1Wgj607SmhLZVIDB3gd8FKEpK4f3QYAssZO4nbsB3toKoaKwHq L4xYCP1nIW9bwkF8NzLBCp09A+qCYqy0WmsF2v/ydgC5cU6884fFSdF8FmHSawtsOAK9 qh+bADDYJQ3FbQ6bKSpaP7gk20yDN8cMzqzp9AAIbhYSzSacCxV9WP5PyEPgHzeZ4zJd 2eg96qjS3OIeJn232wGO52KqCm528gytJd+/n4CAlLTCTnIilH4A6KB/hSg0N9K2xa3E jszQ== X-Gm-Message-State: AOAM530vEdM15eptPUZgu9BYuZ5CQWl5HZgMa+Li2vn9JlxBZ5bgGEPs F7jsxY3VEOgNYnfSJ3dXt4U= X-Google-Smtp-Source: ABdhPJwl5RGXpQauISnEDl9qOpBhvRuE7gS6xNbt6Ro1NKjU7GGs7xBeC94oFMrkiB25zWuCItbO/A== X-Received: by 2002:aa7:8439:0:b0:44c:80da:fc39 with SMTP id q25-20020aa78439000000b0044c80dafc39mr1806612pfn.47.1633574781962; Wed, 06 Oct 2021 19:46:21 -0700 (PDT) Received: from [192.168.1.121] (99-44-17-11.lightspeed.irvnca.sbcglobal.net. [99.44.17.11]) by smtp.gmail.com with ESMTPSA id t6sm22435915pfh.63.2021.10.06.19.46.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 19:46:21 -0700 (PDT) Message-ID: <99b43bbf-b63e-d684-dd61-3087e9f22dc4@gmail.com> Date: Wed, 6 Oct 2021 19:46:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH 0/9] Dynamic DT device nodes Content-Language: en-US To: Zev Weiss , openbmc@lists.ozlabs.org Cc: Greg Kroah-Hartman , Jeremy Kerr , Joel Stanley , Rob Herring , devicetree@vger.kernel.org, Andrew Jeffery , Frank Rowand , "Rafael J. Wysocki" , Andy Shevchenko , Andrew Morton , Francis Laniel , Kees Cook , Andrey Konovalov , Jonathan Cameron , Daniel Axtens , Alexey Dobriyan , Dan Williams , Daniel Vetter , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Heiner Kallweit , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org References: <20211007000954.30621-1-zev@bewilderbeest.net> From: Florian Fainelli In-Reply-To: <20211007000954.30621-1-zev@bewilderbeest.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_194622_988662_80B28B00 X-CRM114-Status: GOOD ( 25.24 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/6/2021 5:09 PM, Zev Weiss wrote: > Hello, > > This patch series is in some ways kind of a v2 for the "Dynamic > aspeed-smc flash chips via 'reserved' DT status" series I posted > previously [0], but takes a fairly different approach suggested by Rob > Herring [1] and doesn't actually touch the aspeed-smc driver or > anything in the MTD subsystem, so I haven't marked it as such. > > To recap a bit of the context from that series, in OpenBMC there's a > need for certain devices (described by device-tree nodes) to be able > to be attached and detached at runtime (for example the SPI flash for > the host's firmware, which is shared between the BMC and the host but > can only be accessed by one or the other at a time). To provide that > ability, this series adds support for a new common device-tree > property, a boolean "dynamic" that indicates that the device may come > and go at runtime. When present on a node, the sysfs file for that > node's "status" property is made writable, allowing userspace to do > things like: > > $ echo okay > /sys/firmware/devicetree/.../status > $ echo reserved > /sys/firmware/devicetree/.../status > > to activate and deactivate a dynamic device. This is a completely drive by comment here, but cannot you already achieve what you want today by making the SPI-NOR to be loaded as a module, probe it when you need it from the BMC, and unbind or rmmod the drive when you need it on the server/host attached to the BMC? Looking at [0] there appears to be enough signaling visible by the BMC's user-space that it ought to be possible? Assuming that there may be multiple flash chips and you somehow need to access one in order to complete the BMC device boot, but not the other one(s), you could imagine unbinding the spi-nor driver from the ones you don't want to drive and wait until you have appropriate signaling made available to your or is there a risk of racing with the host in doing so? -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel