From 326ccfe240ca9ef4f659a241b39390fa956e999b Mon Sep 17 00:00:00 2001 From: Havard Skinnemoen Date: Fri, 23 Oct 2020 14:06:35 -0700 Subject: hw/misc: Add npcm7xx random number generator The RNG module returns a byte of randomness when the Data Valid bit is set. This implementation ignores the prescaler setting, and loads a new value into RNGD every time RNGCS is read while the RNG is enabled and random data is available. A qtest featuring some simple randomness tests is included. Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Signed-off-by: Havard Skinnemoen Signed-off-by: Peter Maydell --- hw/misc/trace-events | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hw/misc/trace-events') diff --git a/hw/misc/trace-events b/hw/misc/trace-events index 6054f9a..b2f060a 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -118,6 +118,10 @@ npcm7xx_clk_write(uint64_t offset, uint32_t value) "offset: 0x%04" PRIx64 " valu npcm7xx_gcr_read(uint64_t offset, uint32_t value) " offset: 0x%04" PRIx64 " value: 0x%08" PRIx32 npcm7xx_gcr_write(uint64_t offset, uint32_t value) "offset: 0x%04" PRIx64 " value: 0x%08" PRIx32 +# npcm7xx_rng.c +npcm7xx_rng_read(uint64_t offset, uint64_t value, unsigned size) "offset: 0x%04" PRIx64 " value: 0x%02" PRIx64 " size: %u" +npcm7xx_rng_write(uint64_t offset, uint64_t value, unsigned size) "offset: 0x%04" PRIx64 " value: 0x%02" PRIx64 " size: %u" + # stm32f4xx_syscfg.c stm32f4xx_syscfg_set_irq(int gpio, int line, int level) "Interupt: GPIO: %d, Line: %d; Level: %d" stm32f4xx_pulse_exti(int irq) "Pulse EXTI: %d" -- cgit v1.1 From fc14176ba23de1386d8172d86a8006d9f8a555fc Mon Sep 17 00:00:00 2001 From: Luc Michel Date: Sat, 10 Oct 2020 15:57:49 +0200 Subject: hw/arm/raspi: add a skeleton implementation of the CPRMAN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The BCM2835 CPRMAN is the clock manager of the SoC. It is composed of a main oscillator, and several sub-components (PLLs, multiplexers, ...) to generate the BCM2835 clock tree. This commit adds a skeleton of the CPRMAN, with a dummy register read/write implementation. It embeds the main oscillator (xosc) from which all the clocks will be derived. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Luc Michel Tested-by: Guenter Roeck Signed-off-by: Peter Maydell --- hw/misc/trace-events | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/misc/trace-events') diff --git a/hw/misc/trace-events b/hw/misc/trace-events index b2f060a..cf447be 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -230,3 +230,8 @@ grlib_apb_pnp_read(uint64_t addr, uint32_t value) "APB PnP read addr:0x%03"PRIx6 # pca9552.c pca955x_gpio_status(const char *description, const char *buf) "%s GPIOs 0-15 [%s]" pca955x_gpio_change(const char *description, unsigned id, unsigned prev_state, unsigned current_state) "%s GPIO id:%u status: %u -> %u" + +# bcm2835_cprman.c +bcm2835_cprman_read(uint64_t offset, uint64_t value) "offset:0x%" PRIx64 " value:0x%" PRIx64 +bcm2835_cprman_write(uint64_t offset, uint64_t value) "offset:0x%" PRIx64 " value:0x%" PRIx64 +bcm2835_cprman_write_invalid_magic(uint64_t offset, uint64_t value) "offset:0x%" PRIx64 " value:0x%" PRIx64 -- cgit v1.1