qemu-e2k/include/hw/misc
Peter Delevoryas 55c57023b7 hw/misc/aspeed: Add PECI controller
This introduces a really basic PECI controller that responses to
commands by always setting the response code to success and then raising
an interrupt to indicate the command is done. This helps avoid getting
hit with constant errors if the driver continuously attempts to send a
command and keeps timing out.

The AST2400 and AST2500 only included registers up to 0x5C, not 0xFC.
They supported PECI 1.1, 2.0, and 3.0. The AST2600 and AST1030 support
PECI 4.0, which includes more read/write buffer registers from 0x80 to
0xFC to support 64-byte mode.

This patch doesn't attempt to handle that, or to create a different
version of the controller for the different generations, since it's only
implementing functionality that is common to all generations.

The basic sequence of events is that the firmware will read and write to
various registers and then trigger a command by setting the FIRE bit in
the command register (similar to the I2C controller).

Then the firmware waits for an interrupt from the PECI controller,
expecting the interrupt status register to be filled in with info on
what happened. If the command was transmitted and received successfully,
then response codes from the host CPU will be found in the data buffer
registers.

Signed-off-by: Peter Delevoryas <pdel@fb.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220630045133.32251-12-me@pjd.dev>
[ clg: s/sysbus_mmio_map/aspeed_mmio_map/ ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-06-30 09:21:14 +02:00
..
macio macio/pmu.c: remove redundant code 2022-03-09 09:28:28 +00:00
a9scu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-cpucfg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-ccu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-dramc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-sysctrl.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-sid.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm11scu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_integrator_debug.h arm: Update infocenter.arm.com URLs 2021-02-11 11:50:14 +00:00
armsse-cpu-pwrctrl.h hw/misc/sse-cpu-pwrctrl: Implement SSE-300 CPU<N>_PWRCTRL register block 2021-03-08 17:20:02 +00:00
armsse-cpuid.h hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armsse-mhu.h hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armv7m_ras.h arm: Move M-profile RAS register block into its own device 2021-09-01 11:08:18 +01:00
aspeed_hace.h Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
aspeed_i3c.h hw/misc/aspeed_i3c.c: Introduce a dummy AST2600 I3C model. 2022-01-20 11:47:53 +00:00
aspeed_lpc.h Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
aspeed_peci.h hw/misc/aspeed: Add PECI controller 2022-06-30 09:21:14 +02:00
aspeed_sbc.h Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
aspeed_scu.h aspeed/scu: Add AST1030 support 2022-05-02 17:03:03 +02:00
aspeed_sdmc.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
aspeed_xdma.h hw/misc/aspeed_xdma: Add AST2600 support 2021-05-01 10:03:52 +02:00
auxbus.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
avr_power.h hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
bcm2835_cprman.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
bcm2835_cprman_internals.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
bcm2835_mbox.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_mbox_defs.h hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2835_mphi.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_powermgt.h hw/arm: Add basic power management to raspi. 2021-07-02 11:48:36 +01:00
bcm2835_property.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_rng.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_thermal.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cbus.h Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
empty_slot.h hw/misc/empty_slot: Name the slots when created 2020-06-09 06:59:44 +02:00
grlib_ahb_apb_pnp.h hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
imx6_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6_src.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6ul_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_gpr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_snvs.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx25_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx31_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_ccm.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_rngc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
iotkit-secctl.h hw/misc/iotkit-secctl.c: Implement SSE-300 PID register values 2021-03-08 17:20:01 +00:00
iotkit-sysctl.h hw/misc/iotkit-sysctl: Handle SSE-300 changes to PDCM_PD_*_SENSE registers 2021-03-08 17:20:02 +00:00
iotkit-sysinfo.h hw/misc/iotkit-sysinfo.c: Implement SYS_CONFIG1 and IIDR 2021-03-08 17:20:01 +00:00
ivshmem.h ivshmem: add check on protocol version in QEMU 2015-10-24 18:03:18 +02:00
lasi.h lasi: move from hw/hppa to hw/misc 2022-05-08 18:52:37 +01:00
led.h hw/misc/led: Add yellow LED 2021-03-15 00:39:30 +01:00
mac_via.h mos6522: switch over to use qdev gpios for IRQs 2022-03-09 09:28:28 +00:00
mchp_pfsoc_dmc.h hw/misc: Add Microchip PolarFire SoC DDR Memory Controller support 2020-11-03 07:17:23 -08:00
mchp_pfsoc_ioscb.h hw/misc: Add Microchip PolarFire SoC IOSCB module support 2020-11-03 07:17:23 -08:00
mchp_pfsoc_sysreg.h hw/misc: Add Microchip PolarFire SoC SYSREG module support 2020-11-03 07:17:23 -08:00
mips_cmgcr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mips_cpc.h hw/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
mips_itu.h hw/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
mos6522.h mos6522: implement edge-triggering for CA1/2 and CB1/2 control line IRQs 2022-03-09 09:28:28 +00:00
mps2-fpgaio.h hw/misc/mps2-fpgaio: Support AN547 DBGCTRL register 2021-03-08 17:20:03 +00:00
mps2-scc.h hw/misc/mps2-scc: Support using CFG0 bit 0 for remapping 2021-05-10 17:21:54 +01:00
msf2-sysreg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_clk.h hw/timer: Refactor NPCM7XX Timer to use CLK clock 2021-01-12 21:19:02 +00:00
npcm7xx_gcr.h hw/misc: Add PWRON STRAP bit fields in GCR module 2022-04-21 11:37:05 +01:00
npcm7xx_mft.h hw/misc: Add NPCM7XX MFT Module 2021-03-12 12:48:56 +00:00
npcm7xx_pwm.h hw/misc: Add GPIOs for duty in NPCM7xx PWM 2021-03-12 12:48:56 +00:00
npcm7xx_rng.h hw/misc: Add npcm7xx random number generator 2020-10-27 11:10:10 +00:00
nrf51_rng.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pca9552.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pca9552_regs.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
pvpanic.h acpi: pvpanic-isa: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML 2022-06-09 19:32:49 -04:00
sifive_e_prci.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
sifive_test.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
sifive_u_otp.h hw/misc/sifive_u_otp: Add backend drive support 2020-10-22 12:00:50 -07:00
sifive_u_prci.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
stm32f2xx_syscfg.h hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ 2020-11-10 11:03:48 +00:00
stm32f4xx_exti.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
stm32f4xx_syscfg.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tz-mpc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tz-msc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tz-ppc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
unimp.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
virt_ctrl.h hw/m68k: Fix typo in SPDX tag 2021-11-09 10:11:27 +01:00
vmcoreinfo.h qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
xlnx-versal-crl.h hw/misc: Add a model of the Xilinx Versal CRL 2022-04-21 11:37:03 +01:00
xlnx-versal-pmc-iou-slcr.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
xlnx-versal-xramc.h hw/misc: versal: Add a model of the XRAM controller 2021-03-12 12:40:09 +00:00
xlnx-zynqmp-apu-ctrl.h hw/misc: Add a model of the Xilinx ZynqMP APU Control 2022-03-18 11:31:20 +00:00
xlnx-zynqmp-crf.h hw/misc: Add a model of the Xilinx ZynqMP CRF 2022-03-18 11:31:20 +00:00