From nobody Fri May 17 03:12:43 2024 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=1591021009; cv=none; d=zohomail.com; s=zohoarc; b=BRZZy5r1P9Amsr4CWYG82kkJOeolfiPzg9SfMge8Uu+pvCwrvGuoDzp9LdLlxayMKh5uDOHeZH8hLP0PFUlXtMxwn6ff0ZPrfoPb8ISwUL9bW5F6ahbjm6RsLhamOfXkpqvP6uAufwRWA1nMhFN27515W50J3bQ11nq8NyuQMao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591021009; 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=Ks98JFnorqslz3pudbIM/w6sYSe24kUiwz6PGkfW0g8=; b=amphhOfVTEraQ5j/GUEyXX1h83kjGTYghDJMK/kHH8yC/YmnMULRjXX6HZNsUEENoaVDzskyUkQ1uEmImE8Nj6bv+YP6TzuEx3hsQ5oLmvHjGd3SrgYCvSppW9LVdfq1Bld6F/eOJKPHl7AcDokphfGP/mhRzHUEb7AhDFVH460= 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 159102100972658.92729338336119; Mon, 1 Jun 2020 07:16:49 -0700 (PDT) Received: from localhost ([::1]:57500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jflFA-0004Os-8D for importer@patchew.org; Mon, 01 Jun 2020 10:16:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jflE8-0002x8-Ee; Mon, 01 Jun 2020 10:15:44 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:35067) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jflE7-0007y2-L0; Mon, 01 Jun 2020 10:15:44 -0400 Received: by mail-wm1-x32a.google.com with SMTP id q25so2627213wmj.0; Mon, 01 Jun 2020 07:15:41 -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 a124sm12864182wmh.4.2020.06.01.07.15.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 07:15:40 -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=Ks98JFnorqslz3pudbIM/w6sYSe24kUiwz6PGkfW0g8=; b=HC0+WZMPT1uqb+hp7P5vAinAsviLAIk0Xtms1FRVnzsNwd4bWzgcPV6v5GLLqkUfVc dReDrZ/4r9cJzA29roWv1V8QvEA/WDSuQhx0hhyLVZZ3y0NsBNJhHCpXW5Mivi2e68S0 r+dp0tW7apoNmf9hQgCn29dmZI7JsLvPypPsZ9cqXzNF8UjUAv2bVmCTYsigVk/tldY9 kUuo4aNREf14rpSJ8uQFjE3OV9LWYTKdi092jzVPBYjYuurS8kOCkbpAVa9Q7j/LGPpX kYrvlP06aOE/kvMsfC+IJ5YFDeFuLstPKMnTH3Fcn4Mktgd7NCUNiUlJ/1QCyfKtbyMh aDgg== 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=Ks98JFnorqslz3pudbIM/w6sYSe24kUiwz6PGkfW0g8=; b=rhqSawQTZLsV5NF5qGL/U7COL6c7dagtWdGShpWrXrpif21Om0c/J3hg5YO+MXVjQV AAiH1290a/k51kWybY2VYGGPa9BvAKhtmrWw85h0s0O6vCYhqivEaDXLrQp193UkTiBk gakEXmIjezNWvjKPoU9fz1q7HQf5Ed86tBdWU9CwZt/dsb7wW+hfvw6yjqwKK9Dco6bh SRJCIiT3bfGYHPfgz7ZoY1mC9RpIwDDWN3PM+a1/PXhin/aGL/tvKd1gWR6XjYRhiNPL SYQXRxiFTRXHpq0KyjwNIhWma8yHeCZov4EJa1d3NbblBGKoLW+f5U9hLYZDQTeZx/xI cwTA== X-Gm-Message-State: AOAM530YrzNEAf52tAxUm10hNsXH7lsZLHMB6PP8ZThudNpl8r++Pynq A5c7dgorPk4Wj6pLzjQJ/1QDynsE X-Google-Smtp-Source: ABdhPJz90XqotrmA5ojwauHyYaH3FXGh2yAGULmYyHXgdm0frqBw8BeqXsqkBJ6NjFqqcq0eFQf05Q== X-Received: by 2002:a1c:b654:: with SMTP id g81mr21399129wmf.128.1591020940747; Mon, 01 Jun 2020 07:15:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 1/3] exec/memory: Remove unused MemoryRegionMmio type Date: Mon, 1 Jun 2020 16:15:34 +0200 Message-Id: <20200601141536.15192-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200601141536.15192-1-f4bug@amsat.org> References: <20200601141536.15192-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::32a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32a.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 , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Paolo Bonzini , Richard Henderson 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 Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- 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 Fri May 17 03:12:43 2024 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=1591021042; cv=none; d=zohomail.com; s=zohoarc; b=QVK4/sG46VMr1KtwbDkuQ4b+nZb/Bb5xBCX9kGzS9szoDJucUQ/scpJvAVvkXsSOYN9zYPGcQqKR8q24CB2FCy76nXeF5so+cv5gv8oTreQQnXUmjvojTmGOXn0Dmhx1tM/9dhb71Bn8/J+q0omkGRR82tjDipUPUfMr2N9f20I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591021042; 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=W1QfjnoxgOl1dLnHFXbO/n4gzPKJ9EZXLUkU+m3W2Dk=; b=R6sCGESWRudQ7ni7Dc+2HHG+UXfzaF+OmQyInG6M2SvM9PbfLY65zoOAGJ6hLD6DxWh5opRrrzSZ0elz8ZgQD4JvD6RMJT40T6olP3uVmqCUpp72IRRYJ9pXgJLkupJcy6H19NAvpYPaRMX7EfTH+2cbEFoKlVtqeN2tOA18Ulw= 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 1591021042875801.2458222458906; Mon, 1 Jun 2020 07:17:22 -0700 (PDT) Received: from localhost ([::1]:58278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jflFh-0004iE-I8 for importer@patchew.org; Mon, 01 Jun 2020 10:17:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jflE9-0002xI-CV; Mon, 01 Jun 2020 10:15:45 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:39809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jflE7-0007y9-RT; Mon, 01 Jun 2020 10:15:45 -0400 Received: by mail-wm1-x344.google.com with SMTP id k26so11542055wmi.4; Mon, 01 Jun 2020 07:15:43 -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 a124sm12864182wmh.4.2020.06.01.07.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 07:15:41 -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=W1QfjnoxgOl1dLnHFXbO/n4gzPKJ9EZXLUkU+m3W2Dk=; b=m7KgInLWpq8xaaOgriflsimDe2GR6UhauuP6MsGZtUdinXY4Vpg7QvQa96AMu2iKBX acEFhFXNj7Rxow0aSEwpL4Xu6x9sdOdlnV7IFOoRIGLKqnJqkLhAnVK2sctCe6+H4G6E aC++B0/GxT8O6nEqH4D0VllsiLk1tnKPjCuIxTHVEXLOngxV+z2NPpDIFYAP/hKyUctX 4jUYWFVsWO9saKGIs7GZHKjFd//3WP9sDAl2NArcCiB9NeQ3ami9cimx6nX4Ka1A4r/Z kP84Ad+9Z6ON/QU506mN+g13+ML++Ows+NwQ8yYo7P1KsI+GZ3s24m0fFimIuf97CSYy 1S6g== 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=W1QfjnoxgOl1dLnHFXbO/n4gzPKJ9EZXLUkU+m3W2Dk=; b=BQmvn8q/eNv7j2xCqpfOZXWrSLzDZDY51Ot3vn9bz8ZxvHtYIxIvcaZ5NJnR7Ce9hx WjojBmzCSs5Xmck0nOywnNOw6OeHtVdymcUBl9aHxIhQkKNwlOcRpApnyw7dKAeb3Qsv 260irJm36Hih307vJdXSTOAVadJEOxDEkGky4PEI0nlcie9aEFm7ohWLEfKzfIX5KvHT ynSHew8Nv5oyb9EYUn1Z8ZvkbfiuublwPVtRuWpUDnBfnSMMpv5lFPatwov+Tz2t9yRN gmQoyFw17MK0kbKqwbV9cyDWPN7Infq8Jmz6JVkvVlVSQhatuAK/ErYYEdsE/13NRuyW xCEQ== X-Gm-Message-State: AOAM531Hni+5ITdz887N0xoI34sul+0f1WYjUmJt/OXwdckU/34tI7y3 C48x+Fjsy22kAwov5roKF6THPrnm X-Google-Smtp-Source: ABdhPJz8TmPwL4zTqTOiZI3hrQSYxJHcxwjQKmJjBNep+TD8EU/GTQD9oeE/GtxgCVzHiunwljbfQQ== X-Received: by 2002:a05:600c:21c2:: with SMTP id x2mr22018833wmj.33.1591020941824; Mon, 01 Jun 2020 07:15:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 2/3] hw/usb: Move device-specific declarations to new 'hcd-musb.h' header Date: Mon, 1 Jun 2020 16:15:35 +0200 Message-Id: <20200601141536.15192-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200601141536.15192-1-f4bug@amsat.org> References: <20200601141536.15192-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::344; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x344.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 , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Paolo Bonzini , Richard Henderson 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. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/usb.h | 30 ------------------------- include/hw/usb/hcd-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/hcd-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/hcd-musb.h b/include/hw/usb/hcd-musb.h new file mode 100644 index 0000000000..26b50132ff --- /dev/null +++ b/include/hw/usb/hcd-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..5ab13feb3a 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/hcd-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..27eb28d3e4 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/hcd-musb.h" #include "hw/arm/omap.h" #include "hw/hw.h" #include "hw/irq.h" --=20 2.21.3 From nobody Fri May 17 03:12:43 2024 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=1591021142; cv=none; d=zohomail.com; s=zohoarc; b=j838ZGTy0Vnh35T1a0/0FgLeFkNsWbGgg1PDy8tBY9ExMSjSk+n+iG0NqJqaiyLaMCVEjmTSg8I8cFMYiDSMiIbbchPyTDiJwWhWYqIBArWyZhYRx6cOyv66AvkhfyXbMIOaB3LG18n0NUIQltqd6tjSQrADVv+s7ZDpiGImrEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591021142; 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=LuboXwwmJJxrw629GERS8oE+/5r5G4adyReMjUbvFag=; b=cYrWUOZwt2IvbKhp6z4VJXJFVo21uG7HAu4wmKUMtWwoakMwcBAgucVJoAD9PD5RyY5WFXj+pP3uqF7AbSdNZvpW4247SwMCAxy8ySudEOE5TFpiK5zlS5YvE8cTnipR2O291/8L8ji/NQZdUYeOKrfU/p3hEnU6JR6K4MRxx1A= 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 1591021142545989.733010812921; Mon, 1 Jun 2020 07:19:02 -0700 (PDT) Received: from localhost ([::1]:35278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jflHJ-0006ua-Bc for importer@patchew.org; Mon, 01 Jun 2020 10:19:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jflEA-0002yT-3I; Mon, 01 Jun 2020 10:15:46 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:38233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jflE9-0007yS-68; Mon, 01 Jun 2020 10:15:45 -0400 Received: by mail-wm1-x343.google.com with SMTP id f185so11544461wmf.3; Mon, 01 Jun 2020 07:15:44 -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 a124sm12864182wmh.4.2020.06.01.07.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 07:15:42 -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=LuboXwwmJJxrw629GERS8oE+/5r5G4adyReMjUbvFag=; b=p4A8VmVcuXbkLUA5Zc/oR0QKb9jeU5O51ZWt5ZJc2OrHlSxbKryuybH/Re4cALq8QU Rdj9zAehC+MTLMK1WZo7mT/g5melGgB3ATMEQ1aIeqe7OcmnayVAVdBUT2d1ffwfmuTL km07qG4uvV2UwtiXim6SU1Lq9krw7IZXfawg8yN3PEmimJShTsDLyTPoW0Kewfex7kvE BTnZkv8hqNSVkWHffRynMRR+nG3vik2Rxwr3A6mRIuEQH/y51rybWJUoA63YksGjZzZP 0b3npJwI58cqqH73arloMj9rL4zxwzYZdLEcea/2hR3468Pz1OMozU1Xruxql3WMau/d K5eA== 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=LuboXwwmJJxrw629GERS8oE+/5r5G4adyReMjUbvFag=; b=esuqNOMm+anDhqnFpVswKKWORvNmI24umpqgd3l0QhlnPvi5EMXA7wZsQvVjZRQr+v KaIofnnYxiJOnPmNRnU87SEyD9p8+B7OJE/fU/r04uf4FIxXbTcwab/mdOYZCIVFDQNN sBe7ssMF0BA90o7I2KyN6fo+u4cbFrbwmavzujJONF1/ZEHi4w4ykicowKIUnD3km+KF tt+G+HHA/Au31yI85WmS6wt8g1+D9O4HF4WCgmQK02smS8g0uSrayfmNgoXhdIqOGUeb BSdoRsj0psngdspBnxL2aVJCli44cGiMBdPaP2oUuzAeRMxsMos+2b7kDD0vusTzT1CZ MDQg== X-Gm-Message-State: AOAM532thS9xWFP/OOKRvIcwcBlxhrbZfU7Brj29zjDBNhLaSQMpDNXM 4lhgPaLHXSugXfZSwLNz641RSkAO X-Google-Smtp-Source: ABdhPJzZPsdO8FhxN00Ui3RnrFeQ6J9OABs8d51B8WZwrFT0Yh9TW5By7W1MLh+07ObVzVWNr2eaNQ== X-Received: by 2002:a05:600c:2215:: with SMTP id z21mr22238380wml.48.1591020942958; Mon, 01 Jun 2020 07:15:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 3/3] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h' Date: Mon, 1 Jun 2020 16:15:36 +0200 Message-Id: <20200601141536.15192-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200601141536.15192-1-f4bug@amsat.org> References: <20200601141536.15192-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 , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Paolo Bonzini , Richard Henderson 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 Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/exec/cpu-common.h | 3 --- include/hw/usb/hcd-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/hcd-musb.h b/include/hw/usb/hcd-musb.h index 26b50132ff..c874b9f292 100644 --- a/include/hw/usb/hcd-musb.h +++ b/include/hw/usb/hcd-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 5ab13feb3a..85f5ff5bd4 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