qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Eduardo Otubo" <otubo@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Alexander Graf" <agraf@suse.de>,
	"Michael Tokarev" <mjt@tls.msk.ru>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Nageswara Sastry" <nasastry@in.ibm.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Yongbok Kim" <yongbok.kim@mips.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH for-2.13 5/5] hw/dma/i8257: Rename i8257_dma_init(false) -> i8257_dma_init_pc_at()
Date: Mon, 26 Mar 2018 18:43:28 +0300	[thread overview]
Message-ID: <3a91b73a-5484-bb57-00f4-dfeab1387ea9@redhat.com> (raw)
In-Reply-To: <20180326153441.32641-6-f4bug@amsat.org>

On 26/03/2018 18:34, Philippe Mathieu-Daudé wrote:
> Reflect that the PC/AT implementation is used.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  include/hw/dma/i8257.h  | 17 +++++++++++++++--
>  hw/i386/pc.c            |  2 +-
>  hw/mips/mips_fulong2e.c |  2 +-
>  hw/mips/mips_jazz.c     |  2 +-
>  hw/mips/mips_malta.c    |  2 +-
>  5 files changed, 19 insertions(+), 6 deletions(-)
> 
> diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h
> index 986319e4e3..15db8b4d29 100644
> --- a/include/hw/dma/i8257.h
> +++ b/include/hw/dma/i8257.h
> @@ -47,9 +47,22 @@ typedef struct I8257State {
>  } I8257State;
>  
>  void i8257_dma_init_cascaded(ISABus *bus, bool high_page_enable);
> -static inline void i8257_dma_init(ISABus *bus, bool high_page_enable)
> +
> +/**
> + * i8257_dma_init_pc_at: Install 8 DMA channels on the ISA bus.
> + *
> + * This is the PC/AT DMA implementation:
> + *
> + * Two i8257 controllers are created.
> + * The primary controller register channels [0..3] on the bus,
> + * the secondary controller (slave) is cascaded on the primary (master),
> + * registering channels [4..7].
> + *
> + * @bus: the #ISABus against which these are created.
> + */
> +static inline void i8257_dma_init_pc_at(ISABus *bus)
>  {
> -    i8257_dma_init_cascaded(bus, high_page_enable);
> +    i8257_dma_init_cascaded(bus, false);
>  }
>  
>  #endif
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index d36bac8c89..baba079d7f 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1624,7 +1624,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
>          pcspk_init(isa_bus, pit);
>      }
>  
> -    i8257_dma_init(isa_bus, 0);
> +    i8257_dma_init_pc_at(isa_bus);
>  
>      /* Super I/O */
>      pc_superio_init(isa_bus, create_fdctrl, no_vmport);
> diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
> index 02fb2fdcc4..8168e6cf16 100644
> --- a/hw/mips/mips_fulong2e.c
> +++ b/hw/mips/mips_fulong2e.c
> @@ -243,7 +243,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
>      isa_bus_irqs(isa_bus, i8259);
>      /* init other devices */
>      i8254_pit_init(isa_bus, 0x40, 0, NULL);
> -    i8257_dma_init(isa_bus, 0);
> +    i8257_dma_init_pc_at(isa_bus);
>      /* Super I/O */
>      isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
>  
> diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
> index 7223085547..2577e8383d 100644
> --- a/hw/mips/mips_jazz.c
> +++ b/hw/mips/mips_jazz.c
> @@ -222,7 +222,7 @@ static void mips_jazz_init(MachineState *machine,
>      /* ISA devices */
>      i8259 = i8259_init(isa_bus, env->irq[4]);
>      isa_bus_irqs(isa_bus, i8259);
> -    i8257_dma_init(isa_bus, 0);
> +    i8257_dma_init_pc_at(isa_bus);
>      pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
>      pcspk_init(isa_bus, pit);
>  
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index f6513a4fd5..9d0409bc36 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -1198,7 +1198,7 @@ void mips_malta_init(MachineState *machine)
>      smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100,
>                            isa_get_irq(NULL, 9), NULL, 0, NULL);
>      pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
> -    i8257_dma_init(isa_bus, 0);
> +    i8257_dma_init_pc_at(isa_bus);
>      mc146818_rtc_init(isa_bus, 2000, NULL);
>  
>      /* generate SPD EEPROM data */
> 

Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Thanks,
Marcel

  reply	other threads:[~2018-03-26 15:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 15:34 [Qemu-devel] [PATCH 0/5] dma/i82374: avoid double creation of i82374 device Philippe Mathieu-Daudé
2018-03-26 15:34 ` [Qemu-devel] [PATCH for-2.12 1/5] hw/dma/i82374: Avoid double creation of the 82374 controller Philippe Mathieu-Daudé
2018-03-27  9:43   ` Thomas Huth
2018-03-26 15:34 ` [Qemu-devel] [PATCH for-2.13 2/5] hw/dma/i8257: Define I8257_CHANNEL_COUNT Philippe Mathieu-Daudé
2018-03-26 15:34 ` [Qemu-devel] [PATCH for-2.13 3/5] hw/dma/i8257: Split i8257_dma_init() by master/slave Philippe Mathieu-Daudé
2018-03-26 15:34 ` [Qemu-devel] [PATCH for-2.13 /5] hw/dma/i8257: Rename i8257_dma_init() -> i8257_dma_init_cascaded() Philippe Mathieu-Daudé
2018-03-26 15:34 ` [Qemu-devel] [PATCH for-2.13 5/5] hw/dma/i8257: Rename i8257_dma_init(false) -> i8257_dma_init_pc_at() Philippe Mathieu-Daudé
2018-03-26 15:43   ` Marcel Apfelbaum [this message]
2018-03-26 16:02 ` [Qemu-devel] [PATCH for-2.13 4/5] hw/dma/i8257: Rename i8257_dma_init() -> i8257_dma_init_cascaded() Philippe Mathieu-Daudé
2018-03-27  8:24 ` [Qemu-devel] [PATCH 0/5] dma/i82374: avoid double creation of i82374 device Eduardo Otubo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a91b73a-5484-bb57-00f4-dfeab1387ea9@redhat.com \
    --to=marcel@redhat.com \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=hpoussin@reactos.org \
    --cc=mjt@tls.msk.ru \
    --cc=mst@redhat.com \
    --cc=nasastry@in.ibm.com \
    --cc=otubo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    --cc=yongbok.kim@mips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).