All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
To: qemu-devel@nongnu.org, edgar.iglesias@gmail.com
Cc: agraf@suse.de
Subject: [Qemu-devel] [PATCH microblaze/ppc v2 2/8] ppc/virtex_ml507: Define macros for irq/memory maps
Date: Wed, 12 Feb 2014 15:23:05 -0800	[thread overview]
Message-ID: <abd1b67a408bdda71cef7ee5c6385a91a13d778f.1392247170.git.peter.crosthwaite@xilinx.com> (raw)
In-Reply-To: <cover.1392247170.git.peter.crosthwaite@xilinx.com>

Define macros for the interrupt and memory maps for the sake of self
documentation.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
I haven't converted the xilinx_foo_create usages because they will be
deleted in following patches

 hw/ppc/virtex_ml507.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index bdb057e..88312f8 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -45,6 +45,14 @@
 #define EPAPR_MAGIC    (0x45504150)
 #define FLASH_SIZE     (16 * 1024 * 1024)
 
+#define INTC_BASEADDR       0x81800000
+#define UART16550_BASEADDR  0x83e01003
+#define TIMER_BASEADDR      0x83c00000
+#define PFLASH_BASEADDR     0xfc000000
+
+#define TIMER_IRQ           3
+#define UART16550_IRQ       9
+
 static struct boot_info
 {
     uint32_t bootstrap_pc;
@@ -204,7 +212,7 @@ static void virtex_init(QEMUMachineInitArgs *args)
     memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
 
     dinfo = drive_get(IF_PFLASH, 0, 0);
-    pflash_cfi01_register(0xfc000000, NULL, "virtex.flash", FLASH_SIZE,
+    pflash_cfi01_register(PFLASH_BASEADDR, NULL, "virtex.flash", FLASH_SIZE,
                           dinfo ? dinfo->bdrv : NULL, (64 * 1024),
                           FLASH_SIZE >> 16,
                           1, 0x89, 0x18, 0x0000, 0x0, 1);
@@ -215,8 +223,8 @@ static void virtex_init(QEMUMachineInitArgs *args)
         irq[i] = qdev_get_gpio_in(dev, i);
     }
 
-    serial_mm_init(address_space_mem, 0x83e01003ULL, 2, irq[9], 115200,
-                   serial_hds[0], DEVICE_LITTLE_ENDIAN);
+    serial_mm_init(address_space_mem, UART16550_BASEADDR, 2, irq[UART16550_IRQ],
+                   115200, serial_hds[0], DEVICE_LITTLE_ENDIAN);
 
     /* 2 timers at irq 2 @ 62 Mhz.  */
     xilinx_timer_create(0x83c00000, irq[3], 0, 62 * 1000000);
-- 
1.8.5.4

  parent reply	other threads:[~2014-02-12 23:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 23:21 [Qemu-devel] [PATCH microblaze/ppc v2 0/8] Remove include/hw/xilinx.h Peter Crosthwaite
2014-02-12 23:22 ` [Qemu-devel] [PATCH microblaze/ppc v2 1/8] microblaze/s3adsp_1800: Define macros for irq map Peter Crosthwaite
2014-02-12 23:23 ` Peter Crosthwaite [this message]
2014-02-12 23:24 ` [Qemu-devel] [PATCH microblaze/ppc v2 4/8] xilinx: Inline usages of xilinx_intc_create() Peter Crosthwaite
2014-02-12 23:25 ` [Qemu-devel] [PATCH microblaze/ppc v2 5/8] xilinx: Inline usages of xilinx_timer_create() Peter Crosthwaite
2014-02-12 23:25 ` [Qemu-devel] [PATCH microblaze/ppc v2 6/8] xilinx: Inline usage of xilinx_ethlite_create() Peter Crosthwaite
2014-02-12 23:26 ` [Qemu-devel] [PATCH microblaze/ppc v2 7/8] xilinx: Inline usages of xilinx_axi*_init() Peter Crosthwaite
2014-02-12 23:27 ` [Qemu-devel] [PATCH microblaze/ppc v2 8/8] xilinx: Delete hw/include/xilinx.h Peter Crosthwaite
2014-02-25  8:46 ` [Qemu-devel] [PATCH microblaze/ppc v2 0/8] Remove include/hw/xilinx.h Peter Crosthwaite
2014-02-25 23:24   ` Edgar E. Iglesias

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=abd1b67a408bdda71cef7ee5c6385a91a13d778f.1392247170.git.peter.crosthwaite@xilinx.com \
    --to=peter.crosthwaite@xilinx.com \
    --cc=agraf@suse.de \
    --cc=edgar.iglesias@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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.