qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 07/10] ppc/pnv: Add a PSI bridge model for Power11


From: Aditya Gupta
Subject: Re: [PATCH v2 07/10] ppc/pnv: Add a PSI bridge model for Power11
Date: Fri, 26 Apr 2024 23:09:17 +0530

On Fri, Apr 26, 2024 at 04:33:23PM +0200, Cédric Le Goater wrote:
> On 4/26/24 13:00, Aditya Gupta wrote:
> > Power11 core is same as Power10, reuse PNV10_PSI initialisation, by
> > declaring 'PNV11_PSI' as child class of 'PNV10_PSI'
> > 
> > Cc: Cédric Le Goater <clg@kaod.org>
> > Cc: Frédéric Barrat <fbarrat@linux.ibm.com>
> > Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
> > Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> > Cc: Nicholas Piggin <npiggin@gmail.com>
> > Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> 
> 
> Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks Cédric !

- Aditya Gupta

> 
> Thanks,
> 
> C.
> 
> 
> > ---
> >   hw/ppc/pnv_psi.c         | 24 ++++++++++++++++++++++++
> >   include/hw/ppc/pnv_psi.h |  2 ++
> >   2 files changed, 26 insertions(+)
> > 
> > diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
> > index 26460d210deb..1f708b183a87 100644
> > --- a/hw/ppc/pnv_psi.c
> > +++ b/hw/ppc/pnv_psi.c
> > @@ -939,6 +939,29 @@ static const TypeInfo pnv_psi_power10_info = {
> >       .name          = TYPE_PNV10_PSI,
> >       .parent        = TYPE_PNV9_PSI,
> >       .class_init    = pnv_psi_power10_class_init,
> > +    .class_base_init = pnv_psi_power10_class_init,
> > +};
> > +
> > +static void pnv_psi_power11_class_init(ObjectClass *klass, void *data)
> > +{
> > +    DeviceClass *dc = DEVICE_CLASS(klass);
> > +    PnvPsiClass *ppc = PNV_PSI_CLASS(klass);
> > +    static const char compat[] = "ibm,power11-psihb-x\0ibm,psihb-x";
> > +
> > +    dc->desc    = "PowerNV PSI Controller POWER11";
> > +
> > +    /*
> > +     * ppc->xscom_pbca and ppc->xscom_size will be set up by
> > +     * pnv_psi_power10_class_init
> > +     */
> > +    ppc->compat     = compat;
> > +    ppc->compat_size = sizeof(compat);
> > +}
> > +
> > +static const TypeInfo pnv_psi_power11_info = {
> > +    .name          = TYPE_PNV11_PSI,
> > +    .parent        = TYPE_PNV10_PSI,
> > +    .class_init    = pnv_psi_power11_class_init,
> >   };
> >   static void pnv_psi_class_init(ObjectClass *klass, void *data)
> > @@ -973,6 +996,7 @@ static void pnv_psi_register_types(void)
> >       type_register_static(&pnv_psi_power8_info);
> >       type_register_static(&pnv_psi_power9_info);
> >       type_register_static(&pnv_psi_power10_info);
> > +    type_register_static(&pnv_psi_power11_info);
> >   }
> >   type_init(pnv_psi_register_types);
> > diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h
> > index 2a6f715350b6..9e1d31779204 100644
> > --- a/include/hw/ppc/pnv_psi.h
> > +++ b/include/hw/ppc/pnv_psi.h
> > @@ -70,6 +70,8 @@ struct Pnv9Psi {
> >   #define TYPE_PNV10_PSI TYPE_PNV_PSI "-POWER10"
> > +#define TYPE_PNV11_PSI TYPE_PNV_PSI "-POWER11"
> > +
> >   struct PnvPsiClass {
> >       SysBusDeviceClass parent_class;
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]