From patchwork Sat Feb 13 00:25:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 12086421 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 81478C433DB for ; Sat, 13 Feb 2021 00:28:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 2929764E9A for ; Sat, 13 Feb 2021 00:28:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2929764E9A Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=nongnu.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAinZ-0002Oa-9U for qemu-devel@archiver.kernel.org; Fri, 12 Feb 2021 19:28:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3dhwnYAMKClMy4z19916z.x97Bz7F-yzGz689818F.9C1@flex--dje.bounces.google.com>) id 1lAikq-0000GM-Lz for qemu-devel@nongnu.org; Fri, 12 Feb 2021 19:25:44 -0500 Received: from mail-ua1-x94a.google.com ([2607:f8b0:4864:20::94a]:48610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3dhwnYAMKClMy4z19916z.x97Bz7F-yzGz689818F.9C1@flex--dje.bounces.google.com>) id 1lAikb-0007pK-4e for qemu-devel@nongnu.org; Fri, 12 Feb 2021 19:25:44 -0500 Received: by mail-ua1-x94a.google.com with SMTP id x14so414979uac.15 for ; Fri, 12 Feb 2021 16:25:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=VBsGwUpGyUsrBAIRgfriyqklE61q7c+OkwCbO/KoJbQ=; b=PZIMdCYygaciXsnS7YyAJ58MO/BIJGFmXKzuJHkKoqnpym/Cxkib+afoBjyKaHJ+2F nxk84w5tuaKSnHYy2wqbzwzgij8/xxiHS0OQtXfMe93UnDotyu71PdSozAI5SN/Pm7h6 HtmK4oC0UdJgd8xkqxGEWySOPBpr1U9exMn9Ewv9l1d5UGtmrc2x+6Up0rjEK8gxLQuc IBtl8UX+W7Y2kngj9NIwhZi9UEAkyqSAWhoTIoCnB+o0AUYLe44lgf/vhil7oeb0/01j DMfqwgzHrPHTx/K1jPLFGTtqoGVtffRm9JKhgyn7f9SjNwjWUBnP5bFQOOlIJpfJD6tH H39A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=VBsGwUpGyUsrBAIRgfriyqklE61q7c+OkwCbO/KoJbQ=; b=tDyCCYIQOn6ng6pZE8hQQnw+MSHDYYra+WM6QcIb6npj5n0n42bnKJFWVO7ygXBLlo qHBCcweE3PJL0y1BXytEK/eXWYAymHXiwKrv9wF7nX87JGdNHzgpOnam+unJtBVLaR3c +5ZEf7XKFuXzy0Kzweeb9Q1/yacJWIdUxc2Pp1J+hgXFHq6zc4G1PoutDxrUha44FIhd 2tlzWQuQKkRJEgXlZIBTAg84FpQOZ+l+VeSsEneobARdhhtVa/F9ZXEPgGyOmIiHdSCo /VphimRdDfycwz0HiyTbU9x3xOBwqihyuOn4/pFloRbISvgSnmdob+D5zspcH7FmaxeC cC/Q== X-Gm-Message-State: AOAM531BBHL7P51l3Q7xjIC+tvb52rg3Ocaj6OjsRulZijv0JqRyPoLA LY5VFBeElMEJsaWfUY0MVYitcns6qzXc6PAAF68r2sVKE8uICa0fi1Cr+BpU5mSBDngk46JxJTa NjW0ZK8JqPmcGK/2il7nGdB7kbLN1DbYzx4bSfMMn2R5TNa5l+93U X-Google-Smtp-Source: ABdhPJxMAPgdrVVY8ps9zaV3KC3ThLwLXkzQWQ1uER33RXnEja3s7qu2uizHZCcMqxROTRvJSg7Sqeo= X-Received: from ruffy.mtv.corp.google.com ([2620:0:1000:1412:3518:3ae4:e236:7aa4]) (user=dje job=sendgmr) by 2002:a67:8d01:: with SMTP id p1mr3831485vsd.1.1613175926037; Fri, 12 Feb 2021 16:25:26 -0800 (PST) Date: Fri, 12 Feb 2021 16:25:17 -0800 Message-Id: <20210213002520.1374134-1-dje@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH v4 0/3] Add npcm7xx emc model To: qemu-devel@nongnu.org Cc: Jason Wang , Peter Maydell , Hao Wu , Avi Fishman , Doug Evans Received-SPF: pass client-ip=2607:f8b0:4864:20::94a; envelope-from=3dhwnYAMKClMy4z19916z.x97Bz7F-yzGz689818F.9C1@flex--dje.bounces.google.com; helo=mail-ua1-x94a.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: Doug Evans X-Patchwork-Original-From: Doug Evans via From: Doug Evans This is a 10/100 ethernet device that has several features. Only the ones needed by the Linux driver have been implemented. See npcm7xx_emc.c for a list of unimplemented features. Doug Evans (3): hw/net: Add npcm7xx emc model hw/arm: Add npcm7xx emc model tests/qtests: Add npcm7xx emc model test docs/system/arm/nuvoton.rst | 3 +- hw/arm/npcm7xx.c | 50 +- hw/net/meson.build | 1 + hw/net/npcm7xx_emc.c | 857 ++++++++++++++++++++++++++++++++ hw/net/trace-events | 17 + include/hw/arm/npcm7xx.h | 2 + include/hw/net/npcm7xx_emc.h | 286 +++++++++++ tests/qtest/meson.build | 1 + tests/qtest/npcm7xx_emc-test.c | 862 +++++++++++++++++++++++++++++++++ 9 files changed, 2076 insertions(+), 3 deletions(-) create mode 100644 hw/net/npcm7xx_emc.c create mode 100644 include/hw/net/npcm7xx_emc.h create mode 100644 tests/qtest/npcm7xx_emc-test.c