[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/18] hw/arm/fsl-imx8mp: Add PCIe support
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 08/18] hw/arm/fsl-imx8mp: Add PCIe support |
Date: |
Mon, 17 Feb 2025 13:40:48 +0000 |
On Tue, 4 Feb 2025 at 09:21, Bernhard Beschow <shentey@gmail.com> wrote:
>
> Linux checks for the PLLs in the PHY to be locked, so implement a model
> emulating that.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> +static const VMStateDescription fsl_imx8m_pcie_phy_vmstate = {
> + .name = "fsl-imx8m-pcie-phy",
> + .version_id = 1,
> + .minimum_version_id = 1,
> + .fields = (const VMStateField[]) {
> + VMSTATE_UINT8_ARRAY(data, FslImx8mPciePhyState,
> + ARRAY_SIZE(((FslImx8mPciePhyState
> *)NULL)->data)),
Use a defined constant for the number of array elements, please.
We don't do this thing with ARRAY_SIZE of a cast NULL pointer
anywhere else in the codebase.
> + VMSTATE_END_OF_LIST()
> + }
> +};
> +
> +static void fsl_imx8m_pcie_phy_class_init(ObjectClass *klass, void *data)
> +{
> + DeviceClass *dc = DEVICE_CLASS(klass);
> +
> + dc->realize = fsl_imx8m_pcie_phy_realize;
> + dc->vmsd = &fsl_imx8m_pcie_phy_vmstate;
> +}
This is missing the reset method.
thanks
-- PMM
[PATCH v2 05/18] hw/arm/fsl-imx8mp: Implement clock tree, Bernhard Beschow, 2025/02/04
[PATCH v2 07/18] hw/arm/fsl-imx8mp: Add USDHC storage controllers, Bernhard Beschow, 2025/02/04
[PATCH v2 09/18] hw/arm/fsl-imx8mp: Add GPIO controllers, Bernhard Beschow, 2025/02/04
[PATCH v2 08/18] hw/arm/fsl-imx8mp: Add PCIe support, Bernhard Beschow, 2025/02/04
- Re: [PATCH v2 08/18] hw/arm/fsl-imx8mp: Add PCIe support,
Peter Maydell <=
[PATCH v2 10/18] hw/arm/fsl-imx8mp: Add I2C controllers, Bernhard Beschow, 2025/02/04
[PATCH v2 12/18] hw/arm/fsl-imx8mp: Add watchdog support, Bernhard Beschow, 2025/02/04
[PATCH v2 11/18] hw/arm/fsl-imx8mp: Add SPI controllers, Bernhard Beschow, 2025/02/04
[PATCH v2 13/18] hw/arm/fsl-imx8mp: Implement gneral purpose timers, Bernhard Beschow, 2025/02/04