All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Bharat Bhushan <r65777@freescale.com>
Cc: Bharat Bhushan <bharat.bhushan@freescale.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH 2/2] Adding BAR0 for e500 PCI controller
Date: Thu, 04 Oct 2012 17:54:09 +0200	[thread overview]
Message-ID: <506DB121.1040606@suse.de> (raw)
In-Reply-To: <1349265000-23834-3-git-send-email-Bharat.Bhushan@freescale.com>

Am 03.10.2012 13:50, schrieb Bharat Bhushan:
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 197411d..c7ae2b6 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -518,6 +518,7 @@ void ppce500_init(PPCE500Params *params)
>  
>      /* PCI */
>      dev = qdev_create(NULL, "e500-pcihost");
> +    qdev_prop_set_ptr(dev, "bar0_region", ccsr);
>      qdev_init_nofail(dev);
>      s = sysbus_from_qdev(dev);
>      sysbus_connect_irq(s, 0, mpic[pci_irq_nrs[0]]);

Please...

> diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c
> index 92b1dc0..16e4af2 100644
> --- a/hw/ppce500_pci.c
> +++ b/hw/ppce500_pci.c
> @@ -87,6 +87,7 @@ struct PPCE500PCIState {
>      /* mmio maps */
>      MemoryRegion container;
>      MemoryRegion iomem;
> +    void *bar0;
>  };
>  
>  typedef struct PPCE500PCIState PPCE500PCIState;

...do not do this. qdev_prop_set_ptr() is considered deprecated and we
had long discussions how to solve this differently.

Was there anything wrong with using a SysBusDevice for the CCSR to
encapsulate the MemoryRegion?

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  parent reply	other threads:[~2012-10-04 15:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-03 11:49 [Qemu-devel] [PATCH 0/2] e500: creating CCSR region and registering bar0 Bharat Bhushan
2012-10-03 11:49 ` [Qemu-devel] [PATCH 1/2] e500: Adding CCSR memory region Bharat Bhushan
2012-10-03 12:08   ` Alexander Graf
2012-10-03 12:16     ` Bhushan Bharat-R65777
2012-10-03 12:18       ` Alexander Graf
2012-10-03 11:50 ` [Qemu-devel] [PATCH 2/2] Adding BAR0 for e500 PCI controller Bharat Bhushan
2012-10-03 12:11   ` Alexander Graf
2012-10-03 12:23     ` Bhushan Bharat-R65777
2012-10-04 12:31   ` Avi Kivity
2012-10-04 13:46     ` Bhushan Bharat-R65777
2012-10-04 14:58       ` Avi Kivity
2012-10-04 16:03         ` Bhushan Bharat-R65777
2012-10-04 16:07           ` Alexander Graf
2012-10-04 16:48             ` Bhushan Bharat-R65777
2012-10-04 16:50               ` Alexander Graf
2012-10-04 17:02                 ` Avi Kivity
2012-10-05  7:11             ` Bhushan Bharat-R65777
2012-10-05 11:59               ` Alexander Graf
2012-10-07  9:48                 ` Avi Kivity
2012-10-07 11:57                   ` Alexander Graf
2012-10-07 12:41                     ` Avi Kivity
2012-10-08  8:23                 ` Bhushan Bharat-R65777
2012-10-08  8:50                   ` Alexander Graf
2012-10-08 13:57                     ` Andreas Färber
2012-10-04 15:54   ` Andreas Färber [this message]
2012-10-04 16:01     ` Alexander Graf

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=506DB121.1040606@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=bharat.bhushan@freescale.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=r65777@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.