public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/6] PPC 85xx: Add qemu-ppce500 machine
Date: Fri, 31 Jan 2014 10:05:14 -0800	[thread overview]
Message-ID: <52EBE5DA.1060801@freescale.com> (raw)
In-Reply-To: <1391166969-25845-4-git-send-email-agraf@suse.de>

On 01/31/2014 03:16 AM, Alexander Graf wrote:
> For KVM we have a special PV machine type called "ppce500". This machine
> is inspired by the MPC8544DS board, but implements a lot less features
> than that one.
> 
> It also provides more PCI slots and is supposed to be enumerated by
> device tree only.
> 
> This patch adds support for the current generation ppce500 machine as
> it is implemented today.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> 
> ---
> 
> v1 -> v2:
> 
>   - Write device tree offset directly into global variable
>   - use r4 rather than r2 for that
>   - access fdt directly from in-memory copy
>   - remove unneeded header includes
>   - clean up pci enumeration
>   - coding style fixes
>   - populate and only use fdt_addr_r
>   - remove unused exported functions
>   - remove unused TLB0 entries
>   - make TLB1 I/O maps non-executable
>   - remove unused defines in board header
>   - make -kernel boot variables more clear
>   - remove TLB0 invalidation
>   - use tlb1.14 for temporary as=1 map
>   - use CONFIG_SYS_MPC85XX_NO_RESETVEC
>   - store fdt pointer in gd through cpu_init_early_f()
>   - replace fixup_tlb1() with dynamic TLB creation hook
> ---

<snip>

> diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
> index 8748ecd..c899d9e 100644
> --- a/arch/powerpc/cpu/mpc85xx/tlb.c
> +++ b/arch/powerpc/cpu/mpc85xx/tlb.c
> @@ -36,6 +36,10 @@ void init_tlbs(void)
>  			  tlb_table[i].mas7);
>  	}
>  
> +#ifdef CONFIG_USE_DYNAMIC_TLBS
> +	init_tlbs_dynamic();
> +#endif
> +

You are adding a new CONFIG to common files. Please document it.

>  	return ;
>  }
>  

<snip>

> diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h
> new file mode 100644
> index 0000000..1ebaf51
> --- /dev/null
> +++ b/include/configs/qemu-ppce500.h
> @@ -0,0 +1,209 @@
> +/*
> + * Copyright 2011-2014 Freescale Semiconductor, Inc.
> + *
> + * SPDX-License-Identifier:	GPL-2.0+
> + */
> +
> +/*
> + * Corenet DS style board configuration file
> + */
> +#ifndef __QEMU_PPCE500_H
> +#define __QEMU_PPCE500_H
> +
> +#define CONFIG_CMD_REGINFO
> +
> +/* High Level Configuration Options */
> +#define CONFIG_BOOKE
> +#define CONFIG_E500			/* BOOKE e500 family */
> +#define CONFIG_MPC85xx			/* MPC85xx/PQ3 platform */
> +#define CONFIG_QEMU_E500
> +
> +#undef CONFIG_SYS_TEXT_BASE
> +#define CONFIG_SYS_TEXT_BASE	0xf01000 /* 15 MB */
> +
> +#define CONFIG_SYS_MPC85XX_NO_RESETVEC
> +
> +#define CONFIG_SYS_RAMBOOT
> +
> +#define CONFIG_PCI			/* Enable PCI/PCIE */
> +#define CONFIG_PCI1		1	/* PCI controller 1 */
> +#define CONFIG_FSL_PCI_INIT		/* Use common FSL init code */
> +#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
> +
> +#define CONFIG_ENV_OVERWRITE
> +
> +#define CONFIG_ENABLE_36BIT_PHYS
> +
> +#define CONFIG_ADDR_MAP
> +#define CONFIG_SYS_NUM_ADDR_MAP		16	/* number of TLB1 entries */
> +
> +#define CONFIG_USE_DYNAMIC_TLBS
> +
> +#define CONFIG_SYS_MEMTEST_START	0x00200000	/* memtest works on */
> +#define CONFIG_SYS_MEMTEST_END		0x00400000
> +#define CONFIG_SYS_ALT_MEMTEST
> +#define CONFIG_PANIC_HANG	/* do not reset board on panic */
> +
> +#define CONFIG_SYS_CCSRBAR		0xe0000000
> +#define CONFIG_SYS_CCSRBAR_PHYS_LOW	CONFIG_SYS_CCSRBAR
> +
> +/*
> + * DDR Setup
> + */
> +#define CONFIG_VERY_BIG_RAM
> +#define CONFIG_SYS_DDR_SDRAM_BASE	0x00000000
> +#define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_SDRAM_BASE
> +
> +#define CONFIG_CHIP_SELECTS_PER_CTRL	0

I don't know if the qemu has PCI, DDR, etc. Setting the above line to 0 will
actually disable DDR controllers. Is that what you want?

> +
> +/* Get RAM size from device tree */
> +#define CONFIG_DDR_SPD

You enabled SPD but I don't see the I2C address. Did you miss something, or you
don't really use SPD?

York

  reply	other threads:[~2014-01-31 18:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 11:16 [U-Boot] [PATCH v2 0/6] PPC 85xx: Add support for QEMU's ppce500 PV machine Alexander Graf
2014-01-31 11:16 ` [U-Boot] [PATCH v2 1/6] PPC 85xx: Detect e500v2 / e500mc during runtime Alexander Graf
2014-01-31 18:05   ` York Sun
2014-02-04  1:59   ` Scott Wood
2014-02-06 11:40     ` Alexander Graf
2014-02-07  0:51       ` Scott Wood
2014-02-07 11:52         ` Alexander Graf
2014-02-07 16:54           ` Scott Wood
2014-01-31 11:16 ` [U-Boot] [PATCH v2 2/6] PPC 85xx: Add ELF entry point Alexander Graf
2014-01-31 11:16 ` [U-Boot] [PATCH v2 3/6] PPC 85xx: Add qemu-ppce500 machine Alexander Graf
2014-01-31 18:05   ` York Sun [this message]
2014-02-03 23:24     ` Scott Wood
2014-02-04  2:19   ` Scott Wood
2014-02-06 12:48     ` Alexander Graf
2014-02-06 22:55       ` Scott Wood
2014-02-06 23:28         ` Alexander Graf
2014-02-06 23:33           ` Scott Wood
2014-01-31 11:16 ` [U-Boot] [PATCH v2 4/6] PPC 85xx: Find CCSRBAR on ppce500 from device tree Alexander Graf
2014-02-04  2:24   ` Scott Wood
2014-02-06 13:02     ` Alexander Graf
2014-01-31 11:16 ` [U-Boot] [PATCH v2 5/6] PPC 85xx: Find PCI host controllers " Alexander Graf
2014-02-04  2:47   ` Scott Wood
2014-02-06 13:26     ` Alexander Graf
2014-02-06 22:52       ` Scott Wood
2014-02-07 12:25         ` Alexander Graf
2014-02-07 18:43           ` Scott Wood
2014-02-07 14:54         ` Alexander Graf
2014-02-07 15:00           ` [U-Boot] [Qemu-ppc] " Alexander Graf
2014-02-07 18:46             ` Scott Wood
2014-01-31 11:16 ` [U-Boot] [PATCH v2 6/6] PPC 85xx: Find CPU speed " Alexander Graf
2014-02-04  2:52   ` Scott Wood
2014-02-06 11:11     ` Alexander Graf
2014-02-07  1:33       ` Scott Wood
2014-02-07 11:50         ` Alexander Graf
2014-02-07 16:51           ` Scott Wood

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=52EBE5DA.1060801@freescale.com \
    --to=yorksun@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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