From nobody Mon Feb 9 08:18:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1590998098; cv=none; d=zohomail.com; s=zohoarc; b=UGI2r4vpHLWMDsHzjlD4Lg6p4qNTui7vAI6TsteADlXeyxKRlGh05zQlPbLHxWFGFO2rr2E7kwwHGOAGWgoUsazv7pgyjI+T26NlMlq8kAUkC8pPRF7tFPyhytr3hum65txrs6kSKHH1+GrMGP/68U2wtEh4+4MweK8oapmSoDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590998098; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aNsRer/kYC1fawEy8NzmKq+WnkCAU0GUMh/gEOJ18CU=; b=GpnqtIZ7YZ2MLLAGjI74s1zovSm3M0Bz5CwnRG5HBnNzgphJAC9uNjlcI4nsh6ZZN+ZSDrO+HoqYXnekwjsliwPa7ZqH2iIlapRGg5eB/8jsgU4nPmpj1xck5LTJYCiFlKbIo+dfg88raguqe8VDbsUbrIlKmqZS9ZEZ3ruqbHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590998098434536.2930920580486; Mon, 1 Jun 2020 00:54:58 -0700 (PDT) Received: from localhost ([::1]:41314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jffHb-0005NG-4C for importer@patchew.org; Mon, 01 Jun 2020 03:54:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jffGp-0004UW-CM for qemu-devel@nongnu.org; Mon, 01 Jun 2020 03:54:07 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:35574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jffGo-0003mL-Oo for qemu-devel@nongnu.org; Mon, 01 Jun 2020 03:54:07 -0400 Received: by mail-wm1-x343.google.com with SMTP id q25so1429857wmj.0 for ; Mon, 01 Jun 2020 00:54:06 -0700 (PDT) Received: from localhost.localdomain (43.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.43]) by smtp.gmail.com with ESMTPSA id b18sm19294949wrn.88.2020.06.01.00.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 00:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aNsRer/kYC1fawEy8NzmKq+WnkCAU0GUMh/gEOJ18CU=; b=ROrdV0lvUtUAXilbzUC776JGtjGT7a5TIbC01OalC5M0VADAzdr6/TGB3hcUUV7j+0 qJIypGxGVbGd2Sx50vxhMB0V5Bd9VsAC+QxR4qb1tuUxoJQgupgkapQm13A/ddmrlV4E QTyc4BDi3ZZzihVdh9VBcgio+PDEy4J/QvWUeLIXFapIpclxSNpVmdq8xu8GM6nQR4+L XxhjWbT6KrGovfxRruGuJQDcVFeTxZqA2/opHFUPtvhX5xyN/5H4WOZJaGElCo/9/fpE +BHWJjTqLs9HRVMRAmtLMaQIDZMn14umUV31pt5qoM/5H6/7ikS4AgkohhawwGZW1vl5 UKFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=aNsRer/kYC1fawEy8NzmKq+WnkCAU0GUMh/gEOJ18CU=; b=P3ydA4IjvyQ5A6WS/fZQLJ09L4fZDauod3qxEOnkhIL7PBU6Q3enZy2Lb1qBhkeyYu OZm1JCaNT2jQaLbkj90qMz9IJXiAaP4aeEFz4N7zr2pIGEG/JrsVde9q0cmrbjXEadYJ JQjf+F1cwtmHQPQg75BkUagiKG8TPMPSyshCFoOjHtFHU3/vCqPDr2AYg1bQo3JLDuwh FJYEjWfyCgWDHA27E8Bbh20QBGXgG17Cg1UxmO7DQaeWiv6h5HCDUQbkNeub6+jnyvnE 9wBUDXeLQFeObNMqi6W/0EDSRgwGBtxUK/M71B7nh7xjVUZt4iKYuiRMd8XKyDJQotHc HMbQ== X-Gm-Message-State: AOAM533vzcU3VJLTgRJiNWDbEqW1VMHTAqA6U6k7WpdRG9D1vNUrtGRg X8wNH3KfolHwzh6Zszpk4Pi7m/F3 X-Google-Smtp-Source: ABdhPJzGJQlAmkJANopSv3mxMxKHXaW8GTbHp3IJEK4xVBjvoI51rGaA/TtRqKu1CUfo8a/i1W2lWA== X-Received: by 2002:a1c:3dd6:: with SMTP id k205mr19229682wma.87.1590998045049; Mon, 01 Jun 2020 00:54:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/3] exec/memory: Remove unused MemoryRegionMmio type Date: Mon, 1 Jun 2020 09:53:58 +0200 Message-Id: <20200601075400.2043-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200601075400.2043-1-f4bug@amsat.org> References: <20200601075400.2043-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Since commit 62a0db942dec ('memory: Remove old_mmio accessors') this structure is unused. Remove it. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- include/exec/memory.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index e000bd2f97..3cdc171583 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -50,12 +50,6 @@ extern bool global_dirty_log; =20 typedef struct MemoryRegionOps MemoryRegionOps; -typedef struct MemoryRegionMmio MemoryRegionMmio; - -struct MemoryRegionMmio { - CPUReadMemoryFunc *read[3]; - CPUWriteMemoryFunc *write[3]; -}; =20 typedef struct IOMMUTLBEntry IOMMUTLBEntry; =20 --=20 2.21.3 From nobody Mon Feb 9 08:18:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1590998177; cv=none; d=zohomail.com; s=zohoarc; b=kkHicvltlHlO7a/bGrIruyqOK2s9XRR1AgH6r4xE74yRtAo71HCqP+UGC8YTxrbphs3j3Dum3WlBnmPUQGjre2axuydn9VOXY0RA1yGwl1S17H5rOpgXPItWyd7h2XDXrntjg+IadMUgHUbb4IPdZi+PYHLsIt77w8P888eTafo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590998177; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mDZ0iETBYXQfVbBgPLGAWay8LlgGpDy5q0Nf9qu06w4=; b=It6hNYvCXwawrf5kLaBPP/XhHSxMi9GFJH+dbWLuFYLKjqSMWoFWXZ9TwTn9M+TE7LMDO/1WN9bjpgpRFHO9LsNKamP0jVc1gKO7m9DP/pOcW4wajet8oteNfmr2B4+60XUgTY16buIyevhYdasGCRCSaXCTjKLh/41ttdjW5TU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590998177468180.55413397012444; Mon, 1 Jun 2020 00:56:17 -0700 (PDT) Received: from localhost ([::1]:46150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jffIu-0007Uv-8N for importer@patchew.org; Mon, 01 Jun 2020 03:56:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jffGq-0004Vg-RK for qemu-devel@nongnu.org; Mon, 01 Jun 2020 03:54:08 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:36858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jffGq-0003mm-0y for qemu-devel@nongnu.org; Mon, 01 Jun 2020 03:54:08 -0400 Received: by mail-wm1-x343.google.com with SMTP id d128so10374356wmc.1 for ; Mon, 01 Jun 2020 00:54:07 -0700 (PDT) Received: from localhost.localdomain (43.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.43]) by smtp.gmail.com with ESMTPSA id b18sm19294949wrn.88.2020.06.01.00.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 00:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mDZ0iETBYXQfVbBgPLGAWay8LlgGpDy5q0Nf9qu06w4=; b=NvSKw8JpIyw03UQFM1f88VuMO1ro8hw2sN5pqSUa5I6kYKG6YGeqdsuHKsFjAxeiNg dZ/96rZ8xGpt9v2PvuLDOaUHg5ZABeqHQCoJklqgV8urfEaCatKaYN8mRUlP2ir585WC 8Wde3uexd/jb+OUqFuwmfHeJ9n5Ee5cqymdg/pf2cyUhky5cEDc6L+SrdyHvxShUepBq ECennE7OrbwjydiR+O8cvjfSD6i0r7iLuEL0Mzi4BLZ9nLTu7smVZgLfyaJ4W3GnwNMd XVrFaH+TfEo0EkMw8qEn2OUwH/x3pO9HvG7zjm4faEoXyaIR4SQK3FFujvv3ryFAUU6R dhHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=mDZ0iETBYXQfVbBgPLGAWay8LlgGpDy5q0Nf9qu06w4=; b=aT5fcivWsQHLWNQ3mwYco8Bt204Nqhw0fHmdhHwidnIcTBoon0iPa4DSGKn2Rz29Qi IiTXnZIFfE/SuA+Wo8lJf8wXR9HBP6ptYOwMW0e0YHV1de9q8Xkd5VK6hKlD5sHe+fRs HmD2zg+RwUdDwXJfpd9YAFqpfHYXE8z4ptf/7wm+SPfIuwQyMuOz3JL5B8E3k9LBq8IW tK6y2ytV64wxGSvxOYRZjT0xBPeHmYwdW3Em25I3TAYP35mr9NcOEUAHkuKOpYr7nHVx yEVncvm1qrcpxCrzJumPBAkNuzVDOnT1o3MVm5as/AAPa3Q5ROwOkBoObYYivpSuO0AN ivAA== X-Gm-Message-State: AOAM531Qf1T7ycE7Q4huYPwptBkAuHfVSLo/3DJDghUoaRe4sDg7W0wW 0pXaEZx/yfA6F2fGBGFmCbXyet3e X-Google-Smtp-Source: ABdhPJzdIc2nOYs8MBpS2TDm4GGWt5YDVwc8WSa58g0d3CS+DmVUPbxdOyrU6xGdPPFjOIHIoIBlIA== X-Received: by 2002:a05:600c:1146:: with SMTP id z6mr20222204wmz.179.1590998046478; Mon, 01 Jun 2020 00:54:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/3] hw/usb: Move device-specific declarations to new 'musb.h' header Date: Mon, 1 Jun 2020 09:53:59 +0200 Message-Id: <20200601075400.2043-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200601075400.2043-1-f4bug@amsat.org> References: <20200601075400.2043-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Move the declarations for the MUSB-HDRC USB2.0 OTG compliant core into a separate header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- include/hw/usb.h | 30 ---------------------------- include/hw/usb/musb.h | 46 +++++++++++++++++++++++++++++++++++++++++++ hw/usb/hcd-musb.c | 1 + hw/usb/tusb6010.c | 1 + 4 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 include/hw/usb/musb.h diff --git a/include/hw/usb.h b/include/hw/usb.h index 1cf1cd9584..e2128c7c45 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -474,36 +474,6 @@ bool usb_host_dev_is_scsi_storage(USBDevice *usbdev); =20 #define VM_USB_HUB_SIZE 8 =20 -/* hw/usb/hdc-musb.c */ - -enum musb_irq_source_e { - musb_irq_suspend =3D 0, - musb_irq_resume, - musb_irq_rst_babble, - musb_irq_sof, - musb_irq_connect, - musb_irq_disconnect, - musb_irq_vbus_request, - musb_irq_vbus_error, - musb_irq_rx, - musb_irq_tx, - musb_set_vbus, - musb_set_session, - /* Add new interrupts here */ - musb_irq_max, /* total number of interrupts defined */ -}; - -typedef struct MUSBState MUSBState; - -extern CPUReadMemoryFunc * const musb_read[]; -extern CPUWriteMemoryFunc * const musb_write[]; - -MUSBState *musb_init(DeviceState *parent_device, int gpio_base); -void musb_reset(MUSBState *s); -uint32_t musb_core_intr_get(MUSBState *s); -void musb_core_intr_clear(MUSBState *s, uint32_t mask); -void musb_set_size(MUSBState *s, int epnum, int size, int is_tx); - /* usb-bus.c */ =20 #define TYPE_USB_BUS "usb-bus" diff --git a/include/hw/usb/musb.h b/include/hw/usb/musb.h new file mode 100644 index 0000000000..26b50132ff --- /dev/null +++ b/include/hw/usb/musb.h @@ -0,0 +1,46 @@ +/* + * "Inventra" High-speed Dual-Role Controller (MUSB-HDRC), Mentor Graphics, + * USB2.0 OTG compliant core used in various chips. + * + * Only host-mode and non-DMA accesses are currently supported. + * + * Copyright (C) 2008 Nokia Corporation + * Written by Andrzej Zaborowski + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef HW_USB_MUSB_H +#define HW_USB_MUSB_H + +#include "exec/cpu-common.h" + +enum musb_irq_source_e { + musb_irq_suspend =3D 0, + musb_irq_resume, + musb_irq_rst_babble, + musb_irq_sof, + musb_irq_connect, + musb_irq_disconnect, + musb_irq_vbus_request, + musb_irq_vbus_error, + musb_irq_rx, + musb_irq_tx, + musb_set_vbus, + musb_set_session, + /* Add new interrupts here */ + musb_irq_max /* total number of interrupts defined */ +}; + +extern CPUReadMemoryFunc * const musb_read[]; +extern CPUWriteMemoryFunc * const musb_write[]; + +typedef struct MUSBState MUSBState; + +MUSBState *musb_init(DeviceState *parent_device, int gpio_base); +void musb_reset(MUSBState *s); +uint32_t musb_core_intr_get(MUSBState *s); +void musb_core_intr_clear(MUSBState *s, uint32_t mask); +void musb_set_size(MUSBState *s, int epnum, int size, int is_tx); + +#endif diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index c29fbef6fc..ea7a89fd0c 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -23,6 +23,7 @@ #include "qemu/osdep.h" #include "qemu/timer.h" #include "hw/usb.h" +#include "hw/usb/musb.h" #include "hw/irq.h" #include "hw/hw.h" =20 diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 17580876c6..52cf6ec9b8 100644 --- a/hw/usb/tusb6010.c +++ b/hw/usb/tusb6010.c @@ -23,6 +23,7 @@ #include "qemu/module.h" #include "qemu/timer.h" #include "hw/usb.h" +#include "hw/usb/musb.h" #include "hw/arm/omap.h" #include "hw/hw.h" #include "hw/irq.h" --=20 2.21.3 From nobody Mon Feb 9 08:18:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1590998177; cv=none; d=zohomail.com; s=zohoarc; b=P7awtK8Xw121uizHan3Eqr7mBvdH/S0b7ROpPWUuXW2txYBvo7RhwRcL8+k+qcw12up/RnGsLWrHsa2WQFMhjj+ZVC635rbBrTa54EYutin5D95mDLDQuuFKf+BIWRStPYWKvlJ6tc+rnoocDU4k5TJfy97h+wK/Ory80mrqaDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590998177; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qIaVQcM8g4+k990uhebVSTEuTami8Xbb/Exe9m7N3F0=; b=GSFMFAL5iTNna4ONmGOcCJdkF2fxUE6uNxK7lOeY6gGtPp2x7elv24P/DhJ3QaLhfaJtar3mWXeJwEkYMIc6FdhDSPNKcStv4GGsL80QuLvZ7noDfPLSMOCN0WL+3CdWxgf7o0IAs5GJ4iFa6iuEp91Bdt/qoLt8YC2yLEPM748= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159099817729461.30441258746032; Mon, 1 Jun 2020 00:56:17 -0700 (PDT) Received: from localhost ([::1]:46138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jffIu-0007Ui-2w for importer@patchew.org; Mon, 01 Jun 2020 03:56:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jffGr-0004Xs-UP for qemu-devel@nongnu.org; Mon, 01 Jun 2020 03:54:09 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:56037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jffGr-0003nF-5H for qemu-devel@nongnu.org; Mon, 01 Jun 2020 03:54:09 -0400 Received: by mail-wm1-x343.google.com with SMTP id c71so9729395wmd.5 for ; Mon, 01 Jun 2020 00:54:08 -0700 (PDT) Received: from localhost.localdomain (43.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.43]) by smtp.gmail.com with ESMTPSA id b18sm19294949wrn.88.2020.06.01.00.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 00:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qIaVQcM8g4+k990uhebVSTEuTami8Xbb/Exe9m7N3F0=; b=rtglodC+M7ycyijwz/p8HSQw8WBbaZx2/nu27IGJKU3I5BepOGqDjUYxAjV3IYgagn NZmBGRJiieee5DSJsPzi1GJlLawG9NF9mBDtJJaarGzg+kqFRQMOcltVKnk2+rd3+xTo w64zleQ8KB2ktAdqhIIQ4VSTnV5DeXdKqJT75Ge/OJCbtQ3DI1PVkGR7NHfO7qu7A7ei /mpvCPsHBPvMDB8XfNFFQTSIa1+fCn3tBZykfQXRkDUE+4eJ02I7yivpO4KmsCqfBgpP OnnVOlRP8IioOAt6B3qL5GeERGJpQPLE63199DDCWMYz9PnJTVfoNBQFIMH76m9H1yUO FpzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qIaVQcM8g4+k990uhebVSTEuTami8Xbb/Exe9m7N3F0=; b=Ihdr1halRmd7RwAejrOKrAY8EIj3SecNKl3qJOwrQKcj9h/reJooVm+GflrlhMVdDQ gdmkELcPiuE6bu8UmT83yvxFRAY8h2VWxlrsRAuG37syD7a8L+Z1vnxn5RieMuGxKCqk /kqycTUMZ/6OzwTqdfU9FcdWCjXxTuT7Qvb2WrTnE5dY4ALqFcDePZjiFOb1TnCDLYe+ F4iWpdGhSlLIdfZOnye20S7nlzt16XdmxnVy0NWs/EsLnjo5fIyFi8hOvo6fzuLmNfrs O2QMPp9ue+2t4n96S9n1z5w1lkzuoi1Mw9W5J1UDYt92wKNERxp8wahanDGtx2n9s8Kw eeOw== X-Gm-Message-State: AOAM532P8shM8eDeihC2E8irhBdS5u9MzTanFihSw/zWtA4Jwu0LbQQK FHREBq8WshEr7Rhq1b/BRa0IuK/P X-Google-Smtp-Source: ABdhPJxDULYAQrfePoPBFwEyskWhOaczq8BQx/huhaDQGrNnFu38FQK6yaFQfE81+rCjs8u7IAHTeg== X-Received: by 2002:a1c:4302:: with SMTP id q2mr20423265wma.54.1590998047778; Mon, 01 Jun 2020 00:54:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/3] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/musb.h' Date: Mon, 1 Jun 2020 09:54:00 +0200 Message-Id: <20200601075400.2043-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200601075400.2043-1-f4bug@amsat.org> References: <20200601075400.2043-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs are legacy remnant from before the conversion to MemoryRegions. Since they are now only used in tusb6010.c and hcd-musb.c, move them to "hw/usb/musb.h" and rename them appropriately. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- include/exec/cpu-common.h | 3 --- include/hw/usb/musb.h | 9 +++++---- hw/usb/hcd-musb.c | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index b47e5630e7..d5e285d2b5 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -43,9 +43,6 @@ extern ram_addr_t ram_size; =20 /* memory API */ =20 -typedef void CPUWriteMemoryFunc(void *opaque, hwaddr addr, uint32_t value); -typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr); - void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); /* This should not be used by devices. */ ram_addr_t qemu_ram_addr_from_host(void *ptr); diff --git a/include/hw/usb/musb.h b/include/hw/usb/musb.h index 26b50132ff..c874b9f292 100644 --- a/include/hw/usb/musb.h +++ b/include/hw/usb/musb.h @@ -13,8 +13,6 @@ #ifndef HW_USB_MUSB_H #define HW_USB_MUSB_H =20 -#include "exec/cpu-common.h" - enum musb_irq_source_e { musb_irq_suspend =3D 0, musb_irq_resume, @@ -32,8 +30,11 @@ enum musb_irq_source_e { musb_irq_max /* total number of interrupts defined */ }; =20 -extern CPUReadMemoryFunc * const musb_read[]; -extern CPUWriteMemoryFunc * const musb_write[]; +/* TODO convert hcd-musb to QOM/qdev and remove MUSBReadFunc/MUSBWriteFunc= */ +typedef void MUSBWriteFunc(void *opaque, hwaddr addr, uint32_t value); +typedef uint32_t MUSBReadFunc(void *opaque, hwaddr addr); +extern MUSBReadFunc * const musb_read[]; +extern MUSBWriteFunc * const musb_write[]; =20 typedef struct MUSBState MUSBState; =20 diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index ea7a89fd0c..82865abe65 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -1540,13 +1540,13 @@ static void musb_writew(void *opaque, hwaddr addr, = uint32_t value) }; } =20 -CPUReadMemoryFunc * const musb_read[] =3D { +MUSBReadFunc * const musb_read[] =3D { musb_readb, musb_readh, musb_readw, }; =20 -CPUWriteMemoryFunc * const musb_write[] =3D { +MUSBWriteFunc * const musb_write[] =3D { musb_writeb, musb_writeh, musb_writew, --=20 2.21.3