aboutsummaryrefslogtreecommitdiff
path: root/include/hw/net/dp8393x.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-06-22 10:18:32 +0200
committerRichard Henderson <richard.henderson@linaro.org>2023-06-22 10:18:32 +0200
commitb455ce4c2f300c8ba47cba7232dd03261368a4cb (patch)
treed1510991b4974fda58fd534ee2d4c42b41126d07 /include/hw/net/dp8393x.h
parent67fe6ae41da64368bc4936b196fee2bf61f8c720 (diff)
parent532009054b45d75a3cf7ba9c31921add669d290d (diff)
Merge tag 'q800-for-8.1-pull-request' of https://github.com/vivier/qemu-m68k into staging
Q800 branch pull request 20230622 Cleanup to introduce support of MacOS Classic # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmST/loSHGxhdXJlbnRA # dml2aWVyLmV1AAoJEPMMOL0/L748dQcQAKjU2vMketVOc5jXCtF7Jej/F6j21kpk # Wmt/XuR8FDeohHVyWvQ1quxcewn6DfA+aPx1xqnn0nRBcnuqT/g4IHdXFzwMUxMo # R3CSUHhMbT/tv8gkbn0q+vg1DffGRr65tc+UUOSkyIttF0Lw6ZgZSoUIcUN4zCvk # zx+Z8T7UEJl/EMGGe6awS2cuCZcFB4pdLzkKUKOrAtaJ35eBnBPTClfijHwW7c+5 # tsiH/O/AenRP4oxYu/r4Z2tsYTSIkU8a5MAFQNxEIuupbrLDYixoV3yS7NuR9Ylg # KurOLqdNIlW4vhH2080JijMm1JeX9oXboPc5XMe69v+jFEcdBbpKLvd8ryIhG9SA # RItGkTJDOBp9ALho9rdQDH/W3JxSDX3ohsDVdn8e3nCR9UBRIlO/OFrLS73siHcD # mOatC1mMjZwo+6/liTQwhKvCjSkQp+vh7bw/+zhyprmHkkZXs9FASr8EGLrryq4G # 5wV0qIyNmRrpRXBGcMKGlnmXZ4CZ1XqcGL9xvG5VYVImcjJMEJBBs2aNYLrW1d4Q # 8FkuqeFunRIf5LcG2EMBgBnIBA28Rgm5AtUMAeu6N8kM5oLYG8mFPOevvN4Da8Mp # Fluyjtl4vT6xwqV4l0dGcxYtHnV98j7oXXuKx7g2L5ko7l7ZpfrNbkgF9bD4VnWv # 7HTL0KK8nLEs # =f/mF # -----END PGP SIGNATURE----- # gpg: Signature made Thu 22 Jun 2023 09:55:06 AM CEST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [undefined] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * tag 'q800-for-8.1-pull-request' of https://github.com/vivier/qemu-m68k: (24 commits) mac_via: fix rtc command decoding for the PRAM seconds registers mac_via: fix rtc command decoding from PRAM addresses 0x0 to 0xf q800: move macfb device to Q800MachineState q800: don't access Nubus bus directly from the mac-nubus-bridge device q800: move mac-nubus-bridge device to Q800MachineState q800: move SWIM device to Q800MachineState q800: move ESP device to Q800MachineState q800: move escc_orgate device to Q800MachineState q800: move ESCC device to Q800MachineState q800: move dp8393x device to Q800MachineState hw/net/dp8393x.c: move TYPE_DP8393X and dp8393xState into dp8393x.h q800: move VIA2 device to Q800MachineState q800: move VIA1 device to Q800MachineState q800: reimplement mac-io region aliasing using IO memory region q800: introduce mac-io container memory region q800: move GLUE device to Q800MachineState q800-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro q800: move GLUE device into separate q800-glue.c file q800: move ROM memory region to Q800MachineState q800: move CPU object into Q800MachineState ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/net/dp8393x.h')
-rw-r--r--include/hw/net/dp8393x.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/include/hw/net/dp8393x.h b/include/hw/net/dp8393x.h
new file mode 100644
index 0000000000..4a3f7478be
--- /dev/null
+++ b/include/hw/net/dp8393x.h
@@ -0,0 +1,60 @@
+/*
+ * QEMU NS SONIC DP8393x netcard
+ *
+ * Copyright (c) 2008-2009 Herve Poussineau
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef HW_NET_DP8393X_H
+#define HW_NET_DP8393X_H
+
+#include "hw/sysbus.h"
+#include "net/net.h"
+#include "exec/memory.h"
+
+#define SONIC_REG_COUNT 0x40
+
+#define TYPE_DP8393X "dp8393x"
+OBJECT_DECLARE_SIMPLE_TYPE(dp8393xState, DP8393X)
+
+struct dp8393xState {
+ SysBusDevice parent_obj;
+
+ /* Hardware */
+ uint8_t it_shift;
+ bool big_endian;
+ bool last_rba_is_full;
+ qemu_irq irq;
+ int irq_level;
+ QEMUTimer *watchdog;
+ int64_t wt_last_update;
+ NICConf conf;
+ NICState *nic;
+ MemoryRegion mmio;
+
+ /* Registers */
+ uint16_t cam[16][3];
+ uint16_t regs[SONIC_REG_COUNT];
+
+ /* Temporaries */
+ uint8_t tx_buffer[0x10000];
+ int loopback_packet;
+
+ /* Memory access */
+ MemoryRegion *dma_mr;
+ AddressSpace as;
+};
+
+#endif