[PATCH 1/7] device: introduce resource structure to simplify resource declaration
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Jul 19 11:45:22 EDT 2011
On 17:40 Tue 19 Jul , Antony Pavlov wrote:
> On 16/07/2011, Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> wrote:
> > and add multi resource per device support
> >
> > for now we keep the old map_base and size temporary but will switch all of
> > the used step by step to them resource way
> >
> > and mirror the first resource to the map_base and size if available
> >
>
> > +++ b/include/linux/ioport.h
> ...
> > +struct resource {
> > + resource_size_t start;
> > + resource_size_t size;
> > + const char *name;
> > + unsigned long flags;
> > +};
>
> In linux-2.6.39/include/linux/ioport.h:
>
> struct resource {
> resource_size_t start;
> resource_size_t end;
> const char *name;
> unsigned long flags;
> struct resource *parent, *sibling, *child;
> };
>
> So there is incompatability: barebox has 'size' field, but linux has
> 'end' field instead.
>
> Can you comment this, please?
in barebox we use size no end in the resource since the begenning
so I choose to keep it this way
and avoid the calcul end - start
if u use helper resource_size() you will no notice
Best Regards,
J.
More information about the barebox
mailing list