[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 0/4] bcm2835: add sdhost and gpio controllers

From: Clement Deschamps
Subject: [Qemu-devel] [PATCH v3 0/4] bcm2835: add sdhost and gpio controllers
Date: Fri, 24 Feb 2017 17:40:17 +0100

This patches add the Arasan SDHost controller and the GPIO controller to the 
BCM2835/36 platforms.

This patches have been tested with raspbian 2015-09-24 (which uses the SDHCI 
and raspbian 2017-01-11 (which dynamically switches to the SDHost controller).

I spotted an issue with the raspi2 platform, but it is not related to this 
The CP15 timer frequency is set to 19.20MHz in the raspbian kernel DTB.
There is a constant (GTIMER_SCALE) in target/arm/internals.h which seems to 
tell that the timer is at 62.5MHz.
This causes problems:
- The sleep command entered in guest lasts around 1/3 of the time it is 
supposed to last.
- The cursor is blinking faster that it should
- The systemd timeouts expire too early.          
- ...

Did you already have this issue on another platform ?
Should the frequency in the DTB be dynamically replaced depending on the 
Or should the constant GTIMER_SCALE be platform dependent ?

- implements the GPIO controller for supporting SD controller selection via 
alternate functions of GPIOs 48-53

- removed unneeded alias (sd-bus-2)
- changed license to GPLv2 'or later'
- moved the sdbus_reparent_card() function to hw/sd/core.c
- added 'readonly' state propagation in sdbus_reparent_card()
- the gpio controller is now exposing an sdbus and has 2 references to sdbus of 
sdhci and sdhost controllers

Clement Deschamps (4):
  bcm2835_sdhost: add bcm2835 sdhost controller
  hw/sd: add card-reparenting function
  bcm2835_gpio: add bcm2835 gpio controller
  bcm2835: add sdhost and gpio controllers

 hw/arm/bcm2835_peripherals.c         |  43 +++-
 hw/gpio/Makefile.objs                |   1 +
 hw/gpio/bcm2835_gpio.c               | 353 ++++++++++++++++++++++++++++
 hw/sd/Makefile.objs                  |   1 +
 hw/sd/bcm2835_sdhost.c               | 429 +++++++++++++++++++++++++++++++++++
 hw/sd/core.c                         |  30 +++
 include/hw/arm/bcm2835_peripherals.h |   4 +
 include/hw/gpio/bcm2835_gpio.h       |  39 ++++
 include/hw/sd/bcm2835_sdhost.h       |  48 ++++
 include/hw/sd/sd.h                   |   1 +
 10 files changed, 947 insertions(+), 2 deletions(-)
 create mode 100644 hw/gpio/bcm2835_gpio.c
 create mode 100644 hw/sd/bcm2835_sdhost.c
 create mode 100644 include/hw/gpio/bcm2835_gpio.h
 create mode 100644 include/hw/sd/bcm2835_sdhost.h


reply via email to

[Prev in Thread] Current Thread [Next in Thread]