Received: by 2002:a17:907:c68a:b0:84d:2074:29bb with SMTP id ue10csp1839263ejc; Mon, 16 Jan 2023 15:56:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXuj/t1YuJQxn+I8cOUZbgx/orNRvipGJWp9+MjTKHFpZMJ0Ho3V8i0O64TeXf22uAD0kHXQ X-Received: by 2002:a05:622a:5a8c:b0:3b6:2c20:478c with SMTP id fz12-20020a05622a5a8c00b003b62c20478cmr1561386qtb.1.1673913409210; Mon, 16 Jan 2023 15:56:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673913409; cv=none; d=google.com; s=arc-20160816; b=0MRZIn+NwJ5udi+6PaUziQCYBwAvyOWGz0xmQzW0LB4Rtk3xO2mLaAhLpJA18YMgOk b1IYsYV5MDFIr2xuu+HQeDCQNn7UiWnKX4pCGaPEkcuDhhjhpUVENsFNtEs0hRqHpH0s C3VvYn2gZfqWZz2V2GhpA466KJG0vfx5YOUsR8VpRTJoNC6NO+x0W6rl9nH6pMkPxWsx etnLVutohCHHm1kR01CEGyB973SVdW0f9H2vDt9lqgcouuWuy2L6lY0cwmPW4/7LEWz9 G45OPdWFxQx7IURgJ0ec8NrOzEdLjFR/xseiSgwmn5GIpqZ0GmqLscqkEbhKdq+hHl4j +a9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:feedback-id :dkim-signature:dkim-signature; bh=Jii2hJ17+ePC9VmEpWyVDzJkALIO73Z8vhcvzz4IT7Q=; b=zuu/9LsBVxcvh4Yb0pvVoOKki9M8I4Hn9QuIbreCh4jBV4SFntWxBywC5TqMMtkt8l lPJ+esBtZaLE722t6zE4Snnfz+QjIYP9FhgiGDmYo2yW8H+uvAuHsrCpLjPzutBzyFjT S05waVqrOwwShxchsVPY1AMFS2JZJ3Klm/S5N3Y44xayV3llBv1N9UIwSsqRANYKhVJe I8XMXsIKQ8rEOh+J9L9z8AM3BI76ge+UpqQLouNOaMWzMhpVW/2Uha3K49ICPe7T6uED rq4CPVObFFzTd6LWsPHRI/H4lx6WtR7KjDccviHdZmeRjArmx5ZU3fW1ymsht4xS9AYa gMeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pjd.dev header.s=fm1 header.b=wISAom4j; dkim=fail header.i=@messagingengine.com header.s=fm3 header.b=dhjVNvGc; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d194-20020ae9efcb000000b0070648cf78b9si3569521qkg.258.2023.01.16.15.56.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jan 2023 15:56:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@pjd.dev header.s=fm1 header.b=wISAom4j; dkim=fail header.i=@messagingengine.com header.s=fm3 header.b=dhjVNvGc; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHZKo-0002lY-CE; Mon, 16 Jan 2023 18:56:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHZKn-0002lK-7U; Mon, 16 Jan 2023 18:56:13 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHZKk-0003mj-UB; Mon, 16 Jan 2023 18:56:12 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 3DBC132001BB; Mon, 16 Jan 2023 18:56:08 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 16 Jan 2023 18:56:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pjd.dev; h=cc:cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1673913367; x=1673999767; bh=Jii2hJ17+e PC9VmEpWyVDzJkALIO73Z8vhcvzz4IT7Q=; b=wISAom4jfCAstEVHUNJe7Kiylt 7F+/ew3vo1NuMobg3rdJg0zjggNKhL/LcTjTUmKmI44Hjy+uqJCI0J/s4Nuc2EWN cqXDckzlrvekZCCBCALmkaIaol0r3Za/W/OeS1FwRp0oxOPbEvLAfqwL41Cb1mUC 82lWildmrKScnriG1fMqHzxB8XM4UUvh8FkW3iYqhAT7v5RhQet6YvACeEunQDjt /spYRhcWgpgCd2Hb+VtgcLD9HpzsiYqzKoyhNdg4uhQLZry23ovIICtA8e1C7X9c tu1x/kTNGqoLafYPkqlSsMg3nm9a+v1IAjkrAVDprowPb0uJDaQ9LN5v/qeg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1673913367; x=1673999767; bh=Jii2hJ17+ePC9 VmEpWyVDzJkALIO73Z8vhcvzz4IT7Q=; b=dhjVNvGcj1OoqTpYK2/UPhu9jd6Qk rX533RHqfDroYLzzw5B98Rl5/MtpqJEgur3ShmnxeISbr6BGq0GLXuVZ+NXjyczH JHCe99lj6cXkJYXGZV40glGFbpSoTq0XEEeJa2M07uTOqAqTZ21eTzg3+Biq3YiV b9zlhli9VwbbuTsqf3dFzeO7DKQlirzHTOZrykXWRzWYlc7lnHKGxIQvpa7RqjGf bkSCjYMKrvJO/boWaZ/so+qPJeZ91Brzk8K+SuFk8IQfoQnN9F/81+xcoj2NxnfJ oMUxAn0vEVxaflOzl+qt28ukFZPkS8OFLpzTuRsTHuZv2KW1rr81i51Ng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddthedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenuchmihhsshhinhhgucfvqfcufhhivghlugculdeftd dmnegoteeftdduqddtudculdduhedmnecujfgurhephffvvefufffkofggtgfgsehtkeer tdertdejnecuhfhrohhmpefrvghtvghrucffvghlvghvohhrhigrshcuoehpvghtvghrse hpjhgurdguvghvqeenucggtffrrghtthgvrhhnpeetffejteejgefgffdvuefhgeeludfg feduueeltdefgfduhfetudetueeujeeukeenucffohhmrghinhepkhgvrhhnvghlrdhorh hgnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepphgv thgvrhesphhjugdruggvvh X-ME-Proxy: Feedback-ID: i9e814621:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Jan 2023 18:56:05 -0500 (EST) From: Peter Delevoryas To: Cc: peter@pjd.dev, clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au, joel@jms.id.au, hskinnemoen@google.com, kfting@nuvoton.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v2 0/5] hw/nvram/eeprom_at24c: Cleanup + FRUID EEPROM init example Date: Mon, 16 Jan 2023 15:55:59 -0800 Message-Id: <20230116235604.55099-1-peter@pjd.dev> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.147.123.25; envelope-from=peter@pjd.dev; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: 7f76yPU7VM1M v1: https://lore.kernel.org/qemu-devel/20230114170151.87833-1-peter@pjd.dev/ v2: - Squashed 3 commits from original series into extract helper commit - Dropped last 2 commits from original series - Changed at24c_eeprom_init to return the I2CSlave object - Added commit to introduce at24c-eeprom "init_rom" attribute - Added aspeed_eeprom.c and fby35-bmc BMC FRUID EEPROM initialization - Added commit to change reset behavior for at24c-eeprom (optional) The reset behavior one might be controversial, I put it last, you can drop it if you like. Thanks, Peter Peter Delevoryas (5): hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_init hw/nvram/eeprom_at24c: Add init_rom field and at24c_eeprom_init_rom helper hw/arm/aspeed: Add aspeed_eeprom.c hw/nvram/eeprom_at24c: Make reset behavior more like hardware hw/arm/aspeed.c | 107 ++++++++++++++------------------ hw/arm/aspeed_eeprom.c | 51 +++++++++++++++ hw/arm/aspeed_eeprom.h | 11 ++++ hw/arm/meson.build | 1 + hw/arm/npcm7xx_boards.c | 20 ++---- hw/nvram/eeprom_at24c.c | 59 ++++++++++++++---- include/hw/nvram/eeprom_at24c.h | 12 ++++ 7 files changed, 174 insertions(+), 87 deletions(-) create mode 100644 hw/arm/aspeed_eeprom.c create mode 100644 hw/arm/aspeed_eeprom.h create mode 100644 include/hw/nvram/eeprom_at24c.h -- 2.39.0