[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/33] hw/misc/bcm2835_property: Handle CORE_CLK_ID firmware prope
From: |
Peter Maydell |
Subject: |
[PULL 33/33] hw/misc/bcm2835_property: Handle CORE_CLK_ID firmware property |
Date: |
Mon, 19 Jun 2023 15:29:14 +0100 |
From: Sergey Kambalin <sergey.kambalin@auriga.com>
Signed-off-by: Sergey Kambalin <sergey.kambalin@auriga.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230612223456.33824-5-philmd@linaro.org
Message-Id: <20230531155258.8361-1-sergey.kambalin@auriga.com>
[PMD: Split from bigger patch: 3/4]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[PMM: added a comment about RPI_FIRMWARE_CORE_CLK_RATE
really being SoC-specific]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/arm/raspi_platform.h | 5 +++++
hw/misc/bcm2835_property.c | 3 +++
2 files changed, 8 insertions(+)
diff --git a/include/hw/arm/raspi_platform.h b/include/hw/arm/raspi_platform.h
index 83f2588fc52..ede98e63c33 100644
--- a/include/hw/arm/raspi_platform.h
+++ b/include/hw/arm/raspi_platform.h
@@ -173,6 +173,11 @@
/* Clock rates */
#define RPI_FIRMWARE_EMMC_CLK_RATE 50000000
#define RPI_FIRMWARE_UART_CLK_RATE 3000000
+/*
+ * TODO: this is really SoC-specific; we might want to
+ * set it per-SoC if it turns out any guests care.
+ */
+#define RPI_FIRMWARE_CORE_CLK_RATE 350000000
#define RPI_FIRMWARE_DEFAULT_CLK_RATE 700000000
#endif
diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
index 2e4fe969bf8..4ed9faa54a1 100644
--- a/hw/misc/bcm2835_property.c
+++ b/hw/misc/bcm2835_property.c
@@ -127,6 +127,9 @@ static void bcm2835_property_mbox_push(BCM2835PropertyState
*s, uint32_t value)
case RPI_FIRMWARE_UART_CLK_ID:
stl_le_phys(&s->dma_as, value + 16,
RPI_FIRMWARE_UART_CLK_RATE);
break;
+ case RPI_FIRMWARE_CORE_CLK_ID:
+ stl_le_phys(&s->dma_as, value + 16,
RPI_FIRMWARE_CORE_CLK_RATE);
+ break;
default:
stl_le_phys(&s->dma_as, value + 16,
RPI_FIRMWARE_DEFAULT_CLK_RATE);
--
2.34.1
- [PULL 16/33] target/arm: Convert LDR/STR with 12-bit immediate to decodetree, (continued)
- [PULL 16/33] target/arm: Convert LDR/STR with 12-bit immediate to decodetree, Peter Maydell, 2023/06/19
- [PULL 18/33] target/arm: Convert atomic memory ops to decodetree, Peter Maydell, 2023/06/19
- [PULL 25/33] hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels, Peter Maydell, 2023/06/19
- [PULL 19/33] target/arm: Convert load (pointer auth) insns to decodetree, Peter Maydell, 2023/06/19
- [PULL 31/33] hw/misc/bcm2835_property: Use 'raspberrypi-fw-defs.h' definitions, Peter Maydell, 2023/06/19
- [PULL 22/33] target/arm: Convert load/store single structure to decodetree, Peter Maydell, 2023/06/19
- [PULL 23/33] target/arm: Convert load/store tags insns to decodetree, Peter Maydell, 2023/06/19
- [PULL 30/33] hw/arm/raspi: Import Linux raspi definitions as 'raspberrypi-fw-defs.h', Peter Maydell, 2023/06/19
- [PULL 28/33] imx_serial: set wake bit when we receive a data byte, Peter Maydell, 2023/06/19
- [PULL 29/33] docs: sbsa: document board to firmware interface, Peter Maydell, 2023/06/19
- [PULL 33/33] hw/misc/bcm2835_property: Handle CORE_CLK_ID firmware property,
Peter Maydell <=
- [PULL 17/33] target/arm: Convert LDR/STR reg+reg to decodetree, Peter Maydell, 2023/06/19
- [PULL 24/33] hw/intc/allwinner-a10-pic: Handle IRQ levels other than 0 or 1, Peter Maydell, 2023/06/19
- [PULL 20/33] target/arm: Convert LDAPR/STLR (imm) to decodetree, Peter Maydell, 2023/06/19
- [PULL 21/33] target/arm: Convert load/store (multiple structures) to decodetree, Peter Maydell, 2023/06/19
- [PULL 27/33] hw/arm/Kconfig: sbsa-ref uses Bochs display, Peter Maydell, 2023/06/19
- [PULL 26/33] hw/timer/nrf51_timer: Don't lose time when timer is queried in tight loop, Peter Maydell, 2023/06/19
- [PULL 32/33] hw/misc/bcm2835_property: Replace magic frequency values by definitions, Peter Maydell, 2023/06/19
- Re: [PULL 00/33] target-arm queue, Richard Henderson, 2023/06/19