lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] dt-bindings: firmware: Add Open Profile for DICE
On Thu, Dec 16, 2021 at 09:21:00AM -0600, Rob Herring wrote:
> On Wed, Dec 15, 2021 at 3:08 PM David Brazdil <dbrazdil@google.com> wrote:
> >
> > Hi Rob,
> >
> > > > + dice_reserved: dice@12340000 {
> > > > + reg = <0x00 0x12340000 0x2000>;
> > > > + no-map;
> > > > + };
> > > > + };
> > > > +
> > > > + dice {
> > > > + compatible = "google,open-dice";
> > > > + memory-region = <&dice_reserved>;
> > >
> > > There's no need for this indirection. Just add the compatible to the
> > > dice@12340000 node. You can bind drivers to /reserved-memory nodes.
> >
> > I have not found a way to make that work for kernel modules. Built-in
> > drivers can bind with RESERVEDMEM_OF_DECLARE, which puts an entry in
> > __reservedmem_of_table and __reserved_mem_init_node() iterates find it
> > there. A good case study might be CONFIG_TEGRA210_EMC, where the driver
> > itself can be a module but the rmem parsing is always built-in under
> > CONFIG_TEGRA210_EMC_TABLE. I don't think that's worth the trouble with
> > this driver.
>
> I forgot you have to add the compatible to reserved_mem_matches in
> drivers/of/platform.c.

Oh nice! Exactly what I was looking for, thanks. I'll respin shortly.

David

\
 
 \ /
  Last update: 2021-12-21 18:44    [W:0.704 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site