From patchwork Tue Feb 9 01:55:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 12077007 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 73973C433E0 for ; Tue, 9 Feb 2021 01:56:46 +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 EABAA64E24 for ; Tue, 9 Feb 2021 01:56:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EABAA64E24 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]:34848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9IGi-0007wk-RO for qemu-devel@archiver.kernel.org; Mon, 08 Feb 2021 20:56:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3oeshYAMKCgglrmowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--dje.bounces.google.com>) id 1l9IFp-0007CD-Sc for qemu-devel@nongnu.org; Mon, 08 Feb 2021 20:55:49 -0500 Received: from mail-pl1-x64a.google.com ([2607:f8b0:4864:20::64a]:33703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3oeshYAMKCgglrmowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--dje.bounces.google.com>) id 1l9IFo-0006WN-8v for qemu-devel@nongnu.org; Mon, 08 Feb 2021 20:55:49 -0500 Received: by mail-pl1-x64a.google.com with SMTP id h8so8450360pls.0 for ; Mon, 08 Feb 2021 17:55:46 -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=Fwyqm+uYuhAgy2x5gAGgnngLDXvwocxH657NO5bc9Hw=; b=RZjIOpOzhlq1A00zwYHTdvYzhNnjur2yA8xicnBYUg678OrCOtNColWfil/bAvNjxW 4ucjPX3Yd25r7PMyAQgMVryw0mIgj6xp7BWqR3O7FqV+4Km6DfiGXo3u2c29LOk/eSbn nKt2O34d5dceekyuGfRXk4pVcviNI85BtEuAlwZhUWs0Q29Ch4YSOiiySEzsWlAdFUec e8viaOSdt6WFFsXqwhzKT112nYvk8jeGGsSRQs0dzalsGCggEQLfyvhLM3SX6d24oFah Ufh2XR+U36q2ggGUylZVehzG4nnXVDKco9AI64u6Dzcv+PqQ7oBvZ2JKoFIk/QIzsO6W be6w== 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=Fwyqm+uYuhAgy2x5gAGgnngLDXvwocxH657NO5bc9Hw=; b=Z4dopGWNy7mJ2latlwrIJ4E7rQNIwpmKVrmWpaMVhD7XTzNdSEkEJS4Oy4Xn9KRGNq hAmDEjLPqULtnP+kUvfLgf3q4sw2cWkoEru7MaDBHV+wi2N+16/udv5GfycrG9wKEEB+ 2MzRmbBYShJ9qB9C5k5a0huC5Ot6xMlz/w6jCCngCN1qCb9oMgaf7ylyGUlc3pJos/Jd 6MHZ9Mk0Jh+3UG4SCngLTLbvodRzTiA1F4cuXKsZGUriQ148iPZFXX+WQ2U0af4IWjnG va0qeBaYDuOl5dCaMMmmCtHtj66WxdTH85tzgRpxBQfYUnjOoE62NyN64EpfuUNml+2n 2kww== X-Gm-Message-State: AOAM532rWuB7sUAlixhIKWkU27NWPfP0xqInu8t48eGafW+T7MbIHNB4 uSTC6Z5W3l6AdwAvjK9Tr5WedXjcvkR+zefaLdLqP4HDZ2YbPSCKaJ/RojlqMAy2+oZXucrbQCC s/NL4xcg2XfYpZ3tvXphvr4hyE9cmxIm4aGdGSg10pPxf8YYlEFGP X-Google-Smtp-Source: ABdhPJyscDSaTuPQuMD3hAtKq7DLoWYfpLCbNwiflRG0LwkvES1DqXVA0mE7awVV0bz643gU+QVg2o0= X-Received: from ruffy.mtv.corp.google.com ([2620:0:1000:1412:e459:49a8:64d6:2427]) (user=dje job=sendgmr) by 2002:a63:4346:: with SMTP id q67mr19754280pga.223.1612835745668; Mon, 08 Feb 2021 17:55:45 -0800 (PST) Date: Mon, 8 Feb 2021 17:55:38 -0800 Message-Id: <20210209015541.778833-1-dje@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH v3 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::64a; envelope-from=3oeshYAMKCgglrmowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--dje.bounces.google.com; helo=mail-pl1-x64a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 | 812 +++++++++++++++++++++++++++++++ 9 files changed, 2026 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