On Mon, 8 Jun 2026 15:32:46 +0200
Boris Brezillon <[email protected]> wrote:

> On Thu, 28 May 2026 16:05:33 +0100
> Karunika Choo <[email protected]> wrote:
> 
> >  /**
> >   * struct panthor_hw - GPU specific register mapping and functions
> >   */
> >  struct panthor_hw {
> > -   /** @features: Bitmap containing panthor_hw_feature */
> > -
> >     /** @ops: Panthor HW specific operations */
> >     struct panthor_hw_ops ops;
> > +
> > +   /** @map: Panthor HW-specific register base addresses */
> > +   struct panthor_hw_regmap map;  
> 
> map is a bit too vague. Can we rename this regbank_offsets or something
> along those lines? If we do that, we can drop the _base in the field
> names, because it'd be obvious that these are offsets when the field is
> used:
> 
>       void __iomem *gpu_iomem = ptdev->iomem + 
> ptdev->hw->regbank_offsets.gpu_control;

Actually, MMU ranges need a stride, so I'd go for:

        struct panthor_regbank {
                u32 offset;
                u32 stride;
        };

        struct panthor_regs_layout {
                struct panthor_regbank gpu_control;
                struct panthor_regbank pwr_control;
                ..
        };


        struct panthor_hw {
                struct panthor_regs_layout regs_layout;
        };

> 
> >  };
> >    

Reply via email to