[PATCH 07/11] hw/sd/omap_mmc: Remove unused coverswitch qemu_irq

Peter Maydell posted 11 patches 2 months ago
[PATCH 07/11] hw/sd/omap_mmc: Remove unused coverswitch qemu_irq
Posted by Peter Maydell 2 months ago
The coverswitch qemu_irq is never connected to anything, and the only thing
we do with it is set it in omap_mmc_reset(). Remove it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/sd/omap_mmc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
index dacbea13aad..07d47421bc8 100644
--- a/hw/sd/omap_mmc.c
+++ b/hw/sd/omap_mmc.c
@@ -35,7 +35,6 @@ typedef struct OMAPMMCState {
     qemu_irq irq;
     qemu_irq dma_tx_gpio;
     qemu_irq dma_rx_gpio;
-    qemu_irq coverswitch;
     MemoryRegion iomem;
     omap_clk clk;
     uint16_t last_cmd;
@@ -325,7 +324,6 @@ static void omap_mmc_reset(OMAPMMCState *host)
     host->transfer = 0;
     host->cdet_wakeup = 0;
     host->cdet_enable = 0;
-    qemu_set_irq(host->coverswitch, host->cdet_state);
     host->clkdiv = 0;
 
     omap_mmc_pseudo_reset(host);
-- 
2.34.1
Re: [PATCH 07/11] hw/sd/omap_mmc: Remove unused coverswitch qemu_irq
Posted by Philippe Mathieu-Daudé 2 months ago
On 28/1/25 11:45, Peter Maydell wrote:
> The coverswitch qemu_irq is never connected to anything, and the only thing
> we do with it is set it in omap_mmc_reset(). Remove it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/sd/omap_mmc.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
> index dacbea13aad..07d47421bc8 100644
> --- a/hw/sd/omap_mmc.c
> +++ b/hw/sd/omap_mmc.c
> @@ -35,7 +35,6 @@ typedef struct OMAPMMCState {
>       qemu_irq irq;
>       qemu_irq dma_tx_gpio;
>       qemu_irq dma_rx_gpio;
> -    qemu_irq coverswitch;
>       MemoryRegion iomem;
>       omap_clk clk;
>       uint16_t last_cmd;
> @@ -325,7 +324,6 @@ static void omap_mmc_reset(OMAPMMCState *host)
>       host->transfer = 0;
>       host->cdet_wakeup = 0;
>       host->cdet_enable = 0;
> -    qemu_set_irq(host->coverswitch, host->cdet_state);

OMAPMMCState::cdet_state is now unused:

-- >8 --
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
index d31456ad236..031a6f0d333 100644
--- a/hw/sd/omap_mmc.c
+++ b/hw/sd/omap_mmc.c
@@ -71,3 +71,2 @@ typedef struct OMAPMMCState {
      int cdet_enable;
-    int cdet_state;
      qemu_irq cdet;
---

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH 07/11] hw/sd/omap_mmc: Remove unused coverswitch qemu_irq
Posted by Richard Henderson 2 months ago
On 1/28/25 02:45, Peter Maydell wrote:
> The coverswitch qemu_irq is never connected to anything, and the only thing
> we do with it is set it in omap_mmc_reset(). Remove it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/sd/omap_mmc.c | 2 --
>   1 file changed, 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~