[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 19/25] PPC: e500: dt: create pci node dynamically
From: |
Scott Wood |
Subject: |
Re: [Qemu-ppc] [PATCH 19/25] PPC: e500: dt: create pci node dynamically |
Date: |
Thu, 31 May 2012 17:12:54 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
On 05/30/2012 06:00 AM, Alexander Graf wrote:
> Signed-off-by: Alexander Graf <address@hidden>
> ---
> hw/ppce500_mpc8544ds.c | 50
> ++++++++++++++++++++++++++++++++++++++++++++++++
> pc-bios/mpc8544ds.dtb | Bin 1810 -> 72 bytes
> pc-bios/mpc8544ds.dts | 46 --------------------------------------------
> 3 files changed, 50 insertions(+), 46 deletions(-)
>
> diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
> index 3f6c6e3..d9a3d50 100644
> --- a/hw/ppce500_mpc8544ds.c
> +++ b/hw/ppce500_mpc8544ds.c
> @@ -62,6 +62,27 @@ struct boot_info
> uint32_t entry;
> };
>
> +static void pci_map_create(void *fdt, uint32_t *pci_map, uint32_t mpic)
> +{
> + int i;
> + const uint32_t tmp[] = {
> + /* IDSEL 0x11 J17 Slot 1 */
> + 0x8800, 0x0, 0x0, 0x1, mpic, 0x2, 0x1,
> + 0x8800, 0x0, 0x0, 0x2, mpic, 0x3, 0x1,
> + 0x8800, 0x0, 0x0, 0x3, mpic, 0x4, 0x1,
> + 0x8800, 0x0, 0x0, 0x4, mpic, 0x1, 0x1,
> +
> + /* IDSEL 0x12 J16 Slot 2 */
> + 0x9000, 0x0, 0x0, 0x1, mpic, 0x3, 0x1,
> + 0x9000, 0x0, 0x0, 0x2, mpic, 0x4, 0x1,
> + 0x9000, 0x0, 0x0, 0x3, mpic, 0x2, 0x1,
> + 0x9000, 0x0, 0x0, 0x4, mpic, 0x1, 0x1,
> + };
> + for (i = 0; i < (7 * 8); i++) {
> + pci_map[i] = cpu_to_be32(tmp[i]);
> + }
> +}
> +
> static int mpc8544_load_device_tree(CPUPPCState *env,
> target_phys_addr_t addr,
> uint32_t ramsize,
> @@ -86,6 +107,11 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
> char mpic[128];
> uint32_t mpic_ph;
> char gutil[128];
> + char pci[128];
> + uint32_t pci_map[7 * 8];
> + uint32_t pci_ranges[12] = { 0x2000000, 0x0, 0xc0000000, 0xc0000000, 0x0,
> + 0x20000000, 0x1000000, 0x0, 0x0, 0xe1000000,
> + 0x0, 0x10000 };
At least put in a FIXME for dynamically generating this from the actual
data QEMU uses.
-Scott
- [Qemu-ppc] [PATCH 16/25] PPC: e500: dt: create serial nodes dynamically, (continued)
- [Qemu-ppc] [PATCH 06/25] dt: add helper for empty dt creation, Alexander Graf, 2012/05/30
- [Qemu-ppc] [PATCH 21/25] dt: Add -machine dumpdtb option to dump the current dtb, Alexander Graf, 2012/05/30
- [Qemu-ppc] [PATCH 25/25] Revert "dt: temporarily disable subtree creation failure check", Alexander Graf, 2012/05/30
- [Qemu-ppc] [PATCH 19/25] PPC: e500: dt: create pci node dynamically, Alexander Graf, 2012/05/30
- Re: [Qemu-ppc] [PATCH 19/25] PPC: e500: dt: create pci node dynamically,
Scott Wood <=