All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-block@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
	"Bin Meng" <bin.meng@windriver.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Bernhard Beschow" <shentey@gmail.com>
Subject: [PATCH v2 00/13] ppc/e500: Add support for two types of flash, cleanup
Date: Mon,  3 Oct 2022 22:31:29 +0200	[thread overview]
Message-ID: <20221003203142.24355-1-shentey@gmail.com> (raw)

Cover letter:
~~~~~~~~~~~~~

This series adds support for -pflash and direct SD card access to the
PPC e500 boards. The idea is to increase compatibility with "real" firmware
images where only the bare minimum of drivers is compiled in.

The series is structured as follows:

Patches 1-5 perform some general cleanup which paves the way for the rest of
the series.

Patches 6-9 add -pflash handling where memory-mapped flash can be added on
user's behalf. That is, the flash memory region in the eLBC is only added if
the -pflash argument is supplied. Note that the cfi01 device model becomes
stricter in checking the size of the emulated flash space.

Patches 10-13 add a new device model - the Freescale eSDHC - to the e500
boards which was missing so far.

User documentation is also added as the new features become available.

Tesing done:
* `qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel uImage -append
"console=ttyS0 rootwait root=/dev/mtdblock0 nokaslr" -drive
if=pflash,file=rootfs.ext2,format=raw`
* `qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel uImage -append
"console=ttyS0 rootwait root=/dev/mmcblk0" -device sd-card,drive=mydrive -drive
id=mydrive,if=none,file=rootfs.ext2,format=raw`

The load was created using latest Buildroot with `make
qemu_ppc_e500mc_defconfig` where the rootfs was configured to be of ext2 type.
In both cases it was possible to log in and explore the root file system.

v2:
~~~
Bin:
- Add source for MPC8544DS platform bus' memory map in commit message.
- Keep "ESDHC" in comment referring to Linux driver.
- Use "qemu-system-ppc{64|32} in documentation.
- Use g_autofree in device tree code.
- Remove unneeded device tree properties.
- Error out if pflash size doesn't fit into eLBC memory window.
- Remove unused ESDHC defines.
- Define macro ESDHC_WML for register offset with magic constant.
- Fix some whitespace issues when adding eSDHC device to e500.

Phil:
- Fix tense in commit message.

Bernhard Beschow (13):
  hw/ppc/meson: Allow e500 boards to be enabled separately
  hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx
  docs/system/ppc/ppce500: Add heading for networking chapter
  hw/ppc/e500: Reduce usage of sysbus API
  hw/ppc/mpc8544ds: Rename wrongly named method
  hw/ppc/mpc8544ds: Add platform bus
  hw/ppc/e500: Remove if statement which is now always true
  hw/block/pflash_cfi01: Error out if device length isn't a power of two
  hw/ppc/e500: Implement pflash handling
  hw/sd/sdhci-internal: Unexport ESDHC defines
  hw/sd/sdhci: Rename ESDHC_* defines to USDHC_*
  hw/sd/sdhci: Implement Freescale eSDHC device model
  hw/ppc/e500: Add Freescale eSDHC to e500 boards

 configs/devices/ppc-softmmu/default.mak |   3 +-
 docs/system/ppc/ppce500.rst             |  28 ++++
 hw/block/pflash_cfi01.c                 |   8 +-
 hw/gpio/Kconfig                         |   3 +
 hw/gpio/meson.build                     |   2 +-
 hw/ppc/Kconfig                          |  11 ++
 hw/ppc/e500.c                           | 133 +++++++++++++--
 hw/ppc/e500.h                           |   1 -
 hw/ppc/e500plat.c                       |   1 -
 hw/ppc/meson.build                      |   6 +-
 hw/ppc/mpc8544ds.c                      |   9 +-
 hw/sd/sdhci-internal.h                  |  20 ---
 hw/sd/sdhci.c                           | 210 +++++++++++++++++++++---
 include/hw/sd/sdhci.h                   |   3 +
 14 files changed, 368 insertions(+), 70 deletions(-)

-- 
2.37.3



             reply	other threads:[~2022-10-03 21:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 20:31 Bernhard Beschow [this message]
2022-10-03 20:31 ` [PATCH v2 01/13] hw/ppc/meson: Allow e500 boards to be enabled separately Bernhard Beschow
2022-10-03 20:31 ` [PATCH v2 02/13] hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx Bernhard Beschow
2022-10-03 20:31 ` [PATCH v2 03/13] docs/system/ppc/ppce500: Add heading for networking chapter Bernhard Beschow
2022-10-03 20:31 ` [PATCH v2 04/13] hw/ppc/e500: Reduce usage of sysbus API Bernhard Beschow
2022-10-03 21:22   ` Philippe Mathieu-Daudé via
2022-10-09  2:18   ` Bin Meng
2022-10-03 20:31 ` [PATCH v2 05/13] hw/ppc/mpc8544ds: Rename wrongly named method Bernhard Beschow
2022-10-03 20:56   ` Philippe Mathieu-Daudé via
2022-10-09  2:21   ` Bin Meng
2022-10-03 20:31 ` [PATCH v2 06/13] hw/ppc/mpc8544ds: Add platform bus Bernhard Beschow
2022-10-09  3:21   ` Bin Meng
2022-10-03 20:31 ` [PATCH v2 07/13] hw/ppc/e500: Remove if statement which is now always true Bernhard Beschow
2022-10-03 21:36   ` Philippe Mathieu-Daudé via
2022-10-03 20:31 ` [PATCH v2 08/13] hw/block/pflash_cfi01: Error out if device length isn't a power of two Bernhard Beschow
2022-10-03 20:58   ` Philippe Mathieu-Daudé via
2022-10-03 20:31 ` [PATCH v2 09/13] hw/ppc/e500: Implement pflash handling Bernhard Beschow
2022-10-03 21:21   ` Philippe Mathieu-Daudé via
2022-10-04 22:21     ` Bernhard Beschow
2022-10-09  3:39   ` Bin Meng
2022-10-03 20:31 ` [PATCH v2 10/13] hw/sd/sdhci-internal: Unexport ESDHC defines Bernhard Beschow
2022-10-03 20:31 ` [PATCH v2 11/13] hw/sd/sdhci: Rename ESDHC_* defines to USDHC_* Bernhard Beschow
2022-10-03 20:31 ` [PATCH v2 12/13] hw/sd/sdhci: Implement Freescale eSDHC device model Bernhard Beschow
2022-10-03 21:11   ` Philippe Mathieu-Daudé via
2022-10-03 20:31 ` [PATCH v2 13/13] hw/ppc/e500: Add Freescale eSDHC to e500 boards Bernhard Beschow
2022-10-03 21:06   ` Philippe Mathieu-Daudé via
2022-10-04 22:51     ` Bernhard Beschow
2022-10-16 12:04     ` Bernhard Beschow
2022-10-03 21:27 ` [PATCH v2 00/13] ppc/e500: Add support for two types of flash, cleanup Philippe Mathieu-Daudé via
2022-10-04 12:43   ` Daniel Henrique Barboza
2022-10-08 16:11     ` Bernhard Beschow
2022-10-09  3:30       ` Bin Meng
2022-10-09 21:22         ` Daniel Henrique Barboza

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=20221003203142.24355-1-shentey@gmail.com \
    --to=shentey@gmail.com \
    --cc=bin.meng@windriver.com \
    --cc=f4bug@amsat.org \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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.