qemu-e2k/hw/misc
Bin Meng a89b91addf hw/misc: zynq_slcr: Correctly compute output clocks in the reset exit phase
As of today, when booting upstream U-Boot for Xilinx Zynq, the UART
does not receive anything. Debugging shows that the UART input clock
frequency is zero which prevents the UART from receiving anything as
per the logic in uart_receive().

From zynq_slcr_reset_exit() comment, it intends to compute output
clocks according to ps_clk and registers. zynq_slcr_compute_clocks()
is called to accomplish the task, inside which device_is_in_reset()
is called to actually make the attempt in vain.

Rework reset_hold() and reset_exit() so that in the reset exit phase,
the logic can really compute output clocks in reset_exit().

With this change, upstream U-Boot boots properly again with:

$ qemu-system-arm -M xilinx-zynq-a9 -m 1G -display none -serial null -serial stdio \
    -device loader,file=u-boot-dtb.bin,addr=0x4000000,cpu-num=0

Fixes: 38867cb7ec ("hw/misc/zynq_slcr: add clock generation for uarts")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 20210901124521.30599-2-bmeng.cn@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-09-13 16:07:20 +01:00
..
macio docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
Kconfig sensor: Move hardware sensors from misc to a sensor directory 2021-06-17 07:10:32 -05:00
a9scu.c hw/misc/a9scu: Report unimplemented accesses with qemu_log_mask(UNIMP) 2020-09-14 14:23:19 +01:00
allwinner-cpucfg.c hw/arm/allwinner: add CPU Configuration module 2020-03-12 16:27:33 +00:00
allwinner-h3-ccu.c hw/arm/allwinner-h3: add Clock Control Unit 2020-03-12 16:27:33 +00:00
allwinner-h3-dramc.c hw/misc/allwinner-h3-dramc: enforce 64-bit multiply when calculating row mirror address 2020-03-30 13:18:58 +01:00
allwinner-h3-sysctrl.c hw/arm/allwinner-h3: add System Control module 2020-03-12 16:27:33 +00:00
allwinner-sid.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
applesmc.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
arm11scu.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
arm_integrator_debug.c arm: Update infocenter.arm.com URLs 2021-02-11 11:50:14 +00:00
arm_l2x0.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_sysctl.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
armsse-cpu-pwrctrl.c hw/misc/sse-cpu-pwrctrl: Implement SSE-300 CPU<N>_PWRCTRL register block 2021-03-08 17:20:02 +00:00
armsse-cpuid.c hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armsse-mhu.c hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armv7m_ras.c arm: Move M-profile RAS register block into its own device 2021-09-01 11:08:18 +01:00
aspeed_hace.c hw: Model ASPEED's Hash and Crypto Engine 2021-05-01 10:03:51 +02:00
aspeed_lpc.c hw/misc: Model KCS devices in the Aspeed LPC controller 2021-03-09 12:01:28 +01:00
aspeed_scu.c misc: aspeed_scu: Update AST2600 silicon id register 2020-09-18 09:04:36 +02:00
aspeed_sdmc.c aspeed/sdmc: Simplify calculation of RAM bits 2020-09-01 14:21:51 +02:00
aspeed_xdma.c hw/misc/aspeed_xdma: Add AST2600 support 2021-05-01 10:03:52 +02:00
auxbus.c hw/i2c: Introduce i2c_start_recv() and i2c_start_send() 2021-07-08 14:15:01 -05:00
avr_power.c hw/misc: avr: Add limited support for power reduction device 2020-07-11 11:02:05 +02:00
bcm2835_cprman.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
bcm2835_mbox.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
bcm2835_mphi.c raspi: add BCM2835 SOC MPHI emulation 2020-06-05 17:23:09 +01:00
bcm2835_powermgt.c hw/arm: Add basic power management to raspi. 2021-07-02 11:48:36 +01:00
bcm2835_property.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
bcm2835_rng.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
bcm2835_thermal.c hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor 2019-10-25 13:09:27 +01:00
cbus.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
debugexit.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
eccmemctl.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
edu.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
empty_slot.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_clk.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_pmu.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_rng.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
grlib_ahb_apb_pnp.c hw/misc/grlib_ahb_apb_pnp: Add trace events on read accesses 2020-06-09 09:21:10 +02:00
imx6_ccm.c hw/msic: imx6_ccm: Correct register value for silicon type 2021-01-08 15:13:39 +00:00
imx6_src.c i.MX6: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx6ul_ccm.c i.MX6ul: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx7_ccm.c imx7-ccm: add digprog mmio write method 2021-02-08 15:15:32 +01:00
imx7_gpr.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
imx7_snvs.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
imx25_ccm.c i.MX25: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx31_ccm.c i.MX31: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx_ccm.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
imx_rngc.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
iotkit-secctl.c hw/misc/iotkit-secctl.c: Implement SSE-300 PID register values 2021-03-08 17:20:01 +00:00
iotkit-sysctl.c hw/misc/iotkit-sysctl: Implement SSE-200 and SSE-300 PID register values 2021-03-08 17:20:02 +00:00
iotkit-sysinfo.c hw/misc/iotkit-sysinfo.c: Implement SYS_CONFIG1 and IIDR 2021-03-08 17:20:01 +00:00
ivshmem.c softmmu/memory: Pass ram_flags to qemu_ram_alloc_from_fd() 2021-06-15 20:27:38 +02:00
led.c hw: Do not include hw/irq.h if it is not necessary 2021-05-02 17:24:50 +02:00
mac_via.c mac_via: add qdev gpios for nubus slot interrupts to VIA2 2021-09-08 15:37:41 +02:00
mchp_pfsoc_dmc.c hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
mchp_pfsoc_ioscb.c hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
mchp_pfsoc_sysreg.c hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
meson.build arm: Move M-profile RAS register block into its own device 2021-09-01 11:08:18 +01:00
mips_cmgcr.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mips_cpc.c hw/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
mips_itu.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
mos6522.c misc/mos6522: Use timer_free() in the finalize function to avoid memleak 2021-01-18 11:51:26 +01:00
mps2-fpgaio.c hw/misc/mps2-fpgaio: Support AN547 DBGCTRL register 2021-03-08 17:20:03 +00:00
mps2-scc.c hw/misc/mps2-scc: Support using CFG0 bit 0 for remapping 2021-05-10 17:21:54 +01:00
msf2-sysreg.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mst_fpga.c hw/arm: Constify VMStateDescription 2021-05-02 17:24:50 +02:00
npcm7xx_clk.c arm: Consistently use "Cortex-Axx", not "Cortex Axx" 2021-06-03 16:43:25 +01:00
npcm7xx_gcr.c hw/*: Use type casting for SysBusDevice in NPCM7XX 2021-01-12 21:19:02 +00:00
npcm7xx_mft.c hw/misc: Add NPCM7XX MFT Module 2021-03-12 12:48:56 +00:00
npcm7xx_pwm.c hw/misc: Add GPIOs for duty in NPCM7xx PWM 2021-03-12 12:48:56 +00:00
npcm7xx_rng.c hw/*: Use type casting for SysBusDevice in NPCM7XX 2021-01-12 21:19:02 +00:00
nrf51_rng.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
omap_clk.c Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
omap_gpmc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_l4.c misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
omap_sdrc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_tap.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
pc-testdev.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pca9552.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pci-testdev.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pvpanic-isa.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
pvpanic-pci.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
pvpanic.c hw/misc/pvpanic: split-out generic and bus dependent code 2021-01-29 10:47:28 +00:00
sbsa_ec.c Fix SPDX-License-Identifier typos 2021-02-20 12:36:19 +01:00
sga.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sifive_e_prci.c hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
sifive_test.c hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
sifive_u_otp.c hw/misc: sifive_u_otp: Use error_report() when block operation fails 2021-03-04 09:43:29 -05:00
sifive_u_prci.c hw/riscv: Move sifive_u_prci model to hw/misc 2020-09-09 15:54:19 -07:00
slavio_misc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
stm32f2xx_syscfg.c hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ 2020-11-10 11:03:48 +00:00
stm32f4xx_exti.c hw/misc: Add the STM32F4xx EXTI device 2020-01-17 14:09:29 +00:00
stm32f4xx_syscfg.c hw/misc/stm32f4xx_syscfg: Fix copy/paste error 2020-01-23 15:34:04 +00:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
tz-mpc.c memory: Add IOMMUTLBEvent 2020-12-08 13:48:57 -05:00
tz-msc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
tz-ppc.c tz-ppc: add dummy read/write methods 2021-02-08 15:15:32 +01:00
unimp.c hw/misc/unimp: Display the offset with width of the region size 2020-08-28 10:02:46 +01:00
virt_ctrl.c hw: Do not include hw/irq.h if it is not necessary 2021-05-02 17:24:50 +02:00
vmcoreinfo.c hw/misc/vmcoreinfo: Add comment about reset handler 2019-10-15 18:18:08 -03:00
xlnx-versal-xramc.c hw/misc: versal: Add a model of the XRAM controller 2021-03-12 12:40:09 +00:00
zynq_slcr.c hw/misc: zynq_slcr: Correctly compute output clocks in the reset exit phase 2021-09-13 16:07:20 +01:00