Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Michael Ellerman
On Thu, 2010-11-25 at 01:03 +1100, Michael Ellerman wrote:
> Hi all,
> 
> There were some murmurings on IRC last week about renaming the of_*()
> routines.
...
> The thinking is that on many platforms that use the of_() routines
> OpenFirmware is not involved at all, this is true even on many powerpc
> platforms. Also for folks who don't know the OpenFirmware connection
> it reads as "of", as in "a can of worms".
...
> So I'm hoping people with either say "YES this is a great idea", or "NO
> this is stupid".

I'm still hoping, but so far it seems most people have got better things
to do, and of those that do have an opinion the balance is slightly
positive.

So here's a first cut of a patch to add the new names. I've not touched
of_platform because that is supposed to go away. That will lead to some
odd looking code in the interim, but I think is the right approach.

Most of these are straight renames, but some have changed more
substantially. The routines for the flat tree have all become fdt_foo().
I'd be inclined to drop "early_init" from them too, because they're
basically all about early init, but Grant said he'd prefer not to I
think. I've also renamed the flat tree tag constants to match libfdt.

I've left for_each_child_of_node(), because I read it as "of", but maybe
it's "OF"?

cheers

#ifndef __DT_H
#define __DT_H

/* include/linux/device.h */
#define dt_match_table  of_match_table
#define dt_node of_node

/* include/linux/mod_devicetable.h */
#define dt_device_idof_device_id

/* include/linux/of.h */
#define dt_node_to_nid  of_node_to_nid
#define dt_chosen   of_chosen
#define dt_node_is_root of_node_is_root
#define dt_node_check_flag  of_node_check_flag
#define dt_node_set_flagof_node_set_flag
#define dt_find_all_nodes   of_find_all_nodes
#define dt_node_get of_node_get
#define dt_node_put of_node_put
#define dt_read_number  of_read_number
#define dt_read_ulong   of_read_ulong
#define dt_find_node_by_nameof_find_node_by_name
#define dt_find_node_by_typeof_find_node_by_type
#define dt_find_compatible_node of_find_compatible_node
#define dt_find_matching_node   of_find_matching_node
#define dt_find_node_by_pathof_find_node_by_path
#define dt_find_node_by_phandle of_find_node_by_phandle
#define dt_get_parent   of_get_parent
#define dt_get_next_parent  of_get_next_parent
#define dt_get_next_child   of_get_next_child
#define dt_find_node_with_property  of_find_node_with_property
#define dt_device_is_compatible of_device_is_compatible
#define dt_device_is_available  of_device_is_available
#define dt_get_property of_get_property
#define dt_n_addr_cells of_n_addr_cells
#define dt_n_size_cells of_n_size_cells
#define dt_match_node   of_match_node
#define dt_modalias_nodeof_modalias_node
#define dt_parse_phandleof_parse_phandle
#define dt_parse_phandles_with_args of_parse_phandles_with_args
#define dt_machine_is_compatibleof_machine_is_compatible
#define dt_attach_node  of_attach_node
#define dt_detach_node  of_detach_node
#define dt_find_propertyof_find_property

/* include/linux/of_fdt.h */
#define fdt_find_string find_flat_dt_string
#define fdt_scanof_scan_flat_dt
#define fdt_get_propof_get_flat_dt_prop
#define fdt_is_compatible   of_flat_dt_is_compatible
#define fdt_get_rootof_get_flat_dt_root
#define fdt_early_init_scan_chosen  early_init_dt_scan_chosen
#define fdt_early_init_check_for_initrd early_init_dt_check_for_initrd
#define fdt_early_init_scan_memory  early_init_dt_scan_memory
#define fdt_early_init_add_memory_arch  early_init_dt_add_memory_arch
#define fdt_early_init_alloc_memory_arch early_init_dt_alloc_memory_arch
#define fdt_early_init_setup_initrd_arch early_init_dt_setup_initrd_arch
#define fdt_early_init_scan_rootearly_init_dt_scan_root
#define fdt_unflatten   unflatten_device_tree
#define fdt_early_init  early_init_devtree
#define FDT_MAGIC   OF_DT_HEADER
#define FDT_BEGIN_NODE  OF_DT_BEGIN_NODE
#define FDT_END_NODEOF_DT_END_NODE
#define FDT_PROPOF_DT_PROP
#define FDT_NOP OF_DT_NOP
#define FDT_END OF_DT_END
#define FDT_VERSION OF_DT_VERSION

/* include/linux/of_address.h */
#define dt_translate_addressof_translate_address
#define dt_address_to_resource  of_address_to_resource
#define dt_iomap 

Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Geert Uytterhoeven
On Thu, Nov 25, 2010 at 14:34, Michael Ellerman  wrote:
> I've left for_each_child_of_node(), because I read it as "of", but maybe
> it's "OF"?

I always read it as "for each child-OF-node", so I would rename it to
"dt_for_each_child_node".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Grant Likely
On Thu, Nov 25, 2010 at 6:34 AM, Michael Ellerman
 wrote:
> On Thu, 2010-11-25 at 01:03 +1100, Michael Ellerman wrote:
>> Hi all,
>>
>> There were some murmurings on IRC last week about renaming the of_*()
>> routines.
> ...
>> The thinking is that on many platforms that use the of_() routines
>> OpenFirmware is not involved at all, this is true even on many powerpc
>> platforms. Also for folks who don't know the OpenFirmware connection
>> it reads as "of", as in "a can of worms".
> ...
>> So I'm hoping people with either say "YES this is a great idea", or "NO
>> this is stupid".
>
> I'm still hoping, but so far it seems most people have got better things
> to do, and of those that do have an opinion the balance is slightly
> positive.

I assume you'll be also publishing the script that you use for
generating the massive patch.  I expect that there will be a few
iterations of running the rename script to convert over all the
stragglers.  It should also be negotiated with Linus about when this
patch should get applied.  I do NOT want to cause massive merge pain
during the merge window.

Andrew/Linus: Before Michael proceeds too far with this rename, are
you okay with a mass rename of the device tree functions from of_* to
dt_*?  Nobody likes the ambiguous 'of_' prefix ("of?  of what?"), but
to fix it means large cross-tree patches and potential merge
conflicts.

> So here's a first cut of a patch to add the new names. I've not touched
> of_platform because that is supposed to go away. That will lead to some
> odd looking code in the interim, but I think is the right approach.

I would split it up into separate dt*.h files, one for each of*.h file
so that the #include lines can be changed in the C code at the same
time.  Each dt*.h file would include it's of*.h counterpart.  Then
after the code is renamed, and a release or two has passed to catch
the majority of users, the old definitions can be moved into the dt*.h
files.

However, it may be better to move and rename the definitions
immediately, and leave "#define of_*  dt_*" macros in the old of*.h
files which can be removed with a simple patch after all the users are
converted.  That would have a smaller impact in the cleanup stage.

> Most of these are straight renames, but some have changed more
> substantially. The routines for the flat tree have all become fdt_foo().
> I'd be inclined to drop "early_init" from them too, because they're
> basically all about early init, but Grant said he'd prefer not to I
> think. I've also renamed the flat tree tag constants to match libfdt.

It is all about early init now in Linus' tree, but Stephen
Neuendorffer has patches that use the fdt code at driver probe time
for parsing device tree fragments that describe an FPGA add-in board.

>
> I've left for_each_child_of_node(), because I read it as "of", but maybe
> it's "OF"?

hahaha!  I never considered that it might be OF, but now I probably
won't be able to help but read it that way!  I like Geert's suggestion
of dt_for_each_child_node

g.

>
> cheers
>
> #ifndef __DT_H
> #define __DT_H
>
> /* include/linux/device.h */
> #define dt_match_table                  of_match_table
> #define dt_node                         of_node

This could be very messy.  I've nervous about using #define to rename
structure members.  You'll need to check that any structure members
that use the same name as a global symbol are handled appropriately.

>
> /* include/linux/mod_devicetable.h */
> #define dt_device_id                    of_device_id
>
> /* include/linux/of.h */
> #define dt_node_to_nid                  of_node_to_nid
> #define dt_chosen                       of_chosen
> #define dt_node_is_root                 of_node_is_root
> #define dt_node_check_flag              of_node_check_flag
> #define dt_node_set_flag                of_node_set_flag
> #define dt_find_all_nodes               of_find_all_nodes
> #define dt_node_get                     of_node_get
> #define dt_node_put                     of_node_put
> #define dt_read_number                  of_read_number
> #define dt_read_ulong                   of_read_ulong
> #define dt_find_node_by_name            of_find_node_by_name
> #define dt_find_node_by_type            of_find_node_by_type
> #define dt_find_compatible_node         of_find_compatible_node
> #define dt_find_matching_node           of_find_matching_node
> #define dt_find_node_by_path            of_find_node_by_path
> #define dt_find_node_by_phandle         of_find_node_by_phandle
> #define dt_get_parent                   of_get_parent
> #define dt_get_next_parent              of_get_next_parent
> #define dt_get_next_child               of_get_next_child
> #define dt_find_node_with_property      of_find_node_with_property
> #define dt_device_is_compatible         of_device_is_compatible
> #define dt_device_is_available          of_device_is_available
> #define dt_get_property                 of_get_property
> #define dt_n_addr_cells                 of_n_addr_c

Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Benjamin Herrenschmidt
On Thu, 2010-11-25 at 15:01 +0100, Geert Uytterhoeven wrote:
> 
> I always read it as "for each child-OF-node", so I would rename it to
> "dt_for_each_child_node".

Well, it was meant to be for_child_of_node not _OF_node :-)

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Michael Ellerman
On Thu, 2010-11-25 at 09:17 -0700, Grant Likely wrote:
> On Thu, Nov 25, 2010 at 6:34 AM, Michael Ellerman
>  wrote:
> > On Thu, 2010-11-25 at 01:03 +1100, Michael Ellerman wrote:
> >> Hi all,
> >>
> >> There were some murmurings on IRC last week about renaming the of_*()
> >> routines.
> > ...
> >> The thinking is that on many platforms that use the of_() routines
> >> OpenFirmware is not involved at all, this is true even on many powerpc
> >> platforms. Also for folks who don't know the OpenFirmware connection
> >> it reads as "of", as in "a can of worms".
> > ...
> >> So I'm hoping people with either say "YES this is a great idea", or "NO
> >> this is stupid".
> >
> > I'm still hoping, but so far it seems most people have got better things
> > to do, and of those that do have an opinion the balance is slightly
> > positive.
> 
> I assume you'll be also publishing the script that you use for
> generating the massive patch.  I expect that there will be a few
> iterations of running the rename script to convert over all the
> stragglers. 

Yep sure, I'll just make it less crap first.

> It should also be negotiated with Linus about when this
> patch should get applied.  I do NOT want to cause massive merge pain
> during the merge window.

Obviously.

> Andrew/Linus: Before Michael proceeds too far with this rename, are
> you okay with a mass rename of the device tree functions from of_* to
> dt_*?  Nobody likes the ambiguous 'of_' prefix ("of?  of what?"), but
> to fix it means large cross-tree patches and potential merge
> conflicts.

It'd also be good to hear from DaveM, sparc is the platform with the
strongest link to real OF AFAIK, so the of_() names make more sense
there.

> > So here's a first cut of a patch to add the new names. I've not touched
> > of_platform because that is supposed to go away. That will lead to some
> > odd looking code in the interim, but I think is the right approach.
> 
> I would split it up into separate dt*.h files, one for each of*.h file
> so that the #include lines can be changed in the C code at the same
> time.  Each dt*.h file would include it's of*.h counterpart.  Then
> after the code is renamed, and a release or two has passed to catch
> the majority of users, the old definitions can be moved into the dt*.h
> files.

Yep that sounds like a plan. I did it as a single header for starters so
I could autogenerate the rename script easily.

> However, it may be better to move and rename the definitions
> immediately, and leave "#define of_*  dt_*" macros in the old of*.h
> files which can be removed with a simple patch after all the users are
> converted.  That would have a smaller impact in the cleanup stage.

True, though a bigger impact to start with. I did that originally but
decided it might be better to start with the minimal patch to add the
new names. That way Linus might accept it this release, meaning we'd
have the new names in place for code in -next.

> > Most of these are straight renames, but some have changed more
> > substantially. The routines for the flat tree have all become fdt_foo().
> > I'd be inclined to drop "early_init" from them too, because they're
> > basically all about early init, but Grant said he'd prefer not to I
> > think. I've also renamed the flat tree tag constants to match libfdt.
> 
> It is all about early init now in Linus' tree, but Stephen
> Neuendorffer has patches that use the fdt code at driver probe time
> for parsing device tree fragments that describe an FPGA add-in board.

OK fair enough.

> > I've left for_each_child_of_node(), because I read it as "of", but maybe
> > it's "OF"?
> 
> hahaha!  I never considered that it might be OF, but now I probably
> won't be able to help but read it that way!  I like Geert's suggestion
> of dt_for_each_child_node

OK, I like it the way it is, but if the consensus is to change it then
we can. There's a bunch actually:

for_each_node_by_name(dn, name) \
for_each_node_by_type(dn, type) \
for_each_compatible_node(dn, type, compatible) \
for_each_matching_node(dn, matches) \
for_each_child_of_node(parent, child) \
for_each_node_with_property(dn, prop_name) \

So either dt_for_each_blah(), or for_each_dt_node_blah() ?

> > /* include/linux/device.h */
> > #define dt_match_table  of_match_table
> > #define dt_node of_node
> 
> This could be very messy.  I've nervous about using #define to rename
> structure members.  You'll need to check that any structure members
> that use the same name as a global symbol are handled appropriately.

I'm not sure what you mean about global symbols.

I think it's fairly safe, in that direction, ie. defining the dt_*
names. Neither of those strings appears anywhere in the tree at the
moment (as a token).

cheers



signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/lin

Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Mitch Bradley

On 11/25/2010 5:15 PM, Michael Ellerman wrote:

On Thu, 2010-11-25 at 09:17 -0700, Grant Likely wrote:

On Thu, Nov 25, 2010 at 6:34 AM, Michael Ellerman
  wrote:

On Thu, 2010-11-25 at 01:03 +1100, Michael Ellerman wrote:

Hi all,

There were some murmurings on IRC last week about renaming the of_*()
routines.

...

The thinking is that on many platforms that use the of_() routines
OpenFirmware is not involved at all, this is true even on many powerpc
platforms. Also for folks who don't know the OpenFirmware connection
it reads as "of", as in "a can of worms".

...

So I'm hoping people with either say "YES this is a great idea", or "NO
this is stupid".


I'm still hoping, but so far it seems most people have got better things
to do, and of those that do have an opinion the balance is slightly
positive.


I assume you'll be also publishing the script that you use for
generating the massive patch.  I expect that there will be a few
iterations of running the rename script to convert over all the
stragglers.


Yep sure, I'll just make it less crap first.


It should also be negotiated with Linus about when this
patch should get applied.  I do NOT want to cause massive merge pain
during the merge window.


Obviously.


Andrew/Linus: Before Michael proceeds too far with this rename, are
you okay with a mass rename of the device tree functions from of_* to
dt_*?  Nobody likes the ambiguous 'of_' prefix ("of?  of what?"), but
to fix it means large cross-tree patches and potential merge
conflicts.


It'd also be good to hear from DaveM, sparc is the platform with the
strongest link to real OF AFAIK, so the of_() names make more sense
there.



One Laptop Per Child ships real Open Firmware on its x86 Linux systems, 
of which approximately 2 million have been shipped or ordered.  An ARM 
version, also with OFW, is in the works.  From the standpoint of "number 
of units in the field actually running Linux", I expect that compares 
favorably with SPARC.


That said, I don't particularly like the abbreviation "of" either; I 
abbreviate Open Firmware as "OFW".


I don't mind using "dt_" to apply to device tree things; I think it's 
clearer than "of_".   Ideally, it would be nice to acknowledge the 
historical connection in some way, but confusing nomenclature probably 
is not the way to go about it.







So here's a first cut of a patch to add the new names. I've not touched
of_platform because that is supposed to go away. That will lead to some
odd looking code in the interim, but I think is the right approach.


I would split it up into separate dt*.h files, one for each of*.h file
so that the #include lines can be changed in the C code at the same
time.  Each dt*.h file would include it's of*.h counterpart.  Then
after the code is renamed, and a release or two has passed to catch
the majority of users, the old definitions can be moved into the dt*.h
files.


Yep that sounds like a plan. I did it as a single header for starters so
I could autogenerate the rename script easily.


However, it may be better to move and rename the definitions
immediately, and leave "#define of_*  dt_*" macros in the old of*.h
files which can be removed with a simple patch after all the users are
converted.  That would have a smaller impact in the cleanup stage.


True, though a bigger impact to start with. I did that originally but
decided it might be better to start with the minimal patch to add the
new names. That way Linus might accept it this release, meaning we'd
have the new names in place for code in -next.


Most of these are straight renames, but some have changed more
substantially. The routines for the flat tree have all become fdt_foo().
I'd be inclined to drop "early_init" from them too, because they're
basically all about early init, but Grant said he'd prefer not to I
think. I've also renamed the flat tree tag constants to match libfdt.


It is all about early init now in Linus' tree, but Stephen
Neuendorffer has patches that use the fdt code at driver probe time
for parsing device tree fragments that describe an FPGA add-in board.


OK fair enough.


I've left for_each_child_of_node(), because I read it as "of", but maybe
it's "OF"?


hahaha!  I never considered that it might be OF, but now I probably
won't be able to help but read it that way!  I like Geert's suggestion
of dt_for_each_child_node


OK, I like it the way it is, but if the consensus is to change it then
we can. There's a bunch actually:

for_each_node_by_name(dn, name) \
for_each_node_by_type(dn, type) \
for_each_compatible_node(dn, type, compatible) \
for_each_matching_node(dn, matches) \
for_each_child_of_node(parent, child) \
for_each_node_with_property(dn, prop_name) \

So either dt_for_each_blah(), or for_each_dt_node_blah() ?


/* include/linux/device.h */
#define dt_match_table  of_match_table
#define dt_node of_node


This could be very messy.  I've nervous about using #define to rename
structure members.  

Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Michael Ellerman
On Thu, 2010-11-25 at 18:42 -1000, Mitch Bradley wrote:
> On 11/25/2010 5:15 PM, Michael Ellerman wrote:
> > On Thu, 2010-11-25 at 09:17 -0700, Grant Likely wrote:
> >> On Thu, Nov 25, 2010 at 6:34 AM, Michael Ellerman
> >>   wrote:
> >>> On Thu, 2010-11-25 at 01:03 +1100, Michael Ellerman wrote:
>  Hi all,
> 
>  There were some murmurings on IRC last week about renaming the of_*()
>  routines.
> >>> ...
>  The thinking is that on many platforms that use the of_() routines
>  OpenFirmware is not involved at all, this is true even on many powerpc
>  platforms. Also for folks who don't know the OpenFirmware connection
>  it reads as "of", as in "a can of worms".
> >>> ...
>  So I'm hoping people with either say "YES this is a great idea", or "NO
>  this is stupid".
> >>>
> >>> I'm still hoping, but so far it seems most people have got better things
> >>> to do, and of those that do have an opinion the balance is slightly
> >>> positive.
> >>
> >> I assume you'll be also publishing the script that you use for
> >> generating the massive patch.  I expect that there will be a few
> >> iterations of running the rename script to convert over all the
> >> stragglers.
> >
> > Yep sure, I'll just make it less crap first.
> >
> >> It should also be negotiated with Linus about when this
> >> patch should get applied.  I do NOT want to cause massive merge pain
> >> during the merge window.
> >
> > Obviously.
> >
> >> Andrew/Linus: Before Michael proceeds too far with this rename, are
> >> you okay with a mass rename of the device tree functions from of_* to
> >> dt_*?  Nobody likes the ambiguous 'of_' prefix ("of?  of what?"), but
> >> to fix it means large cross-tree patches and potential merge
> >> conflicts.
> >
> > It'd also be good to hear from DaveM, sparc is the platform with the
> > strongest link to real OF AFAIK, so the of_() names make more sense
> > there.
> 
> 
> One Laptop Per Child ships real Open Firmware on its x86 Linux systems, 
> of which approximately 2 million have been shipped or ordered.  An ARM 
> version, also with OFW, is in the works.

OK. I don't see any code under arch/x86 or arch/arm that uses of_()
routines though? Or is it under drivers or something?

> That said, I don't particularly like the abbreviation "of" either; I 
> abbreviate Open Firmware as "OFW".
> 
> I don't mind using "dt_" to apply to device tree things; I think it's 
> clearer than "of_".   Ideally, it would be nice to acknowledge the 
> historical connection in some way, but confusing nomenclature probably 
> is not the way to go about it.

Cool. I think there will still be a few things that have OF in the name,
at least for a while, and I'm sure the doco will still mention OF, so I
don't think the connection will be lost.

cheers



signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Grant Likely
On Thu, Nov 25, 2010 at 10:50 PM, Michael Ellerman
 wrote:
> On Thu, 2010-11-25 at 18:42 -1000, Mitch Bradley wrote:
>> On 11/25/2010 5:15 PM, Michael Ellerman wrote:
>> > On Thu, 2010-11-25 at 09:17 -0700, Grant Likely wrote:
>> >> On Thu, Nov 25, 2010 at 6:34 AM, Michael Ellerman
>> >>   wrote:
>> >>> On Thu, 2010-11-25 at 01:03 +1100, Michael Ellerman wrote:
>>  Hi all,
>> 
>>  There were some murmurings on IRC last week about renaming the of_*()
>>  routines.
>> >>> ...
>>  The thinking is that on many platforms that use the of_() routines
>>  OpenFirmware is not involved at all, this is true even on many powerpc
>>  platforms. Also for folks who don't know the OpenFirmware connection
>>  it reads as "of", as in "a can of worms".
>> >>> ...
>>  So I'm hoping people with either say "YES this is a great idea", or "NO
>>  this is stupid".
>> >>>
>> >>> I'm still hoping, but so far it seems most people have got better things
>> >>> to do, and of those that do have an opinion the balance is slightly
>> >>> positive.
>> >>
>> >> I assume you'll be also publishing the script that you use for
>> >> generating the massive patch.  I expect that there will be a few
>> >> iterations of running the rename script to convert over all the
>> >> stragglers.
>> >
>> > Yep sure, I'll just make it less crap first.
>> >
>> >> It should also be negotiated with Linus about when this
>> >> patch should get applied.  I do NOT want to cause massive merge pain
>> >> during the merge window.
>> >
>> > Obviously.
>> >
>> >> Andrew/Linus: Before Michael proceeds too far with this rename, are
>> >> you okay with a mass rename of the device tree functions from of_* to
>> >> dt_*?  Nobody likes the ambiguous 'of_' prefix ("of?  of what?"), but
>> >> to fix it means large cross-tree patches and potential merge
>> >> conflicts.
>> >
>> > It'd also be good to hear from DaveM, sparc is the platform with the
>> > strongest link to real OF AFAIK, so the of_() names make more sense
>> > there.
>>
>>
>> One Laptop Per Child ships real Open Firmware on its x86 Linux systems,
>> of which approximately 2 million have been shipped or ordered.  An ARM
>> version, also with OFW, is in the works.
>
> OK. I don't see any code under arch/x86 or arch/arm that uses of_()
> routines though? Or is it under drivers or something?
>
>> That said, I don't particularly like the abbreviation "of" either; I
>> abbreviate Open Firmware as "OFW".
>>
>> I don't mind using "dt_" to apply to device tree things; I think it's
>> clearer than "of_".   Ideally, it would be nice to acknowledge the
>> historical connection in some way, but confusing nomenclature probably
>> is not the way to go about it.

Yes, I like the ofw_ prefix too, and briefly considered renaming to
that, but decide that dt_ was better due to the number of systems
using the device tree without real openfirmware.

However, the ofw_ prefix would make sense if any of the promtree code
is renamed.

> Cool. I think there will still be a few things that have OF in the name,
> at least for a while, and I'm sure the doco will still mention OF, so I
> don't think the connection will be lost.

Considering that pretty much all the documentation makes some
reference back to the openfirmware origins, I'm pretty sure the ofw
legacy is safe.  :-)

g.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RFC: Mega rename of device tree routines from of_*() to dt_*()

2010-11-25 Thread Mitch Bradley



One Laptop Per Child ships real Open Firmware on its x86 Linux systems,
of which approximately 2 million have been shipped or ordered.  An ARM
version, also with OFW, is in the works.


OK. I don't see any code under arch/x86 or arch/arm that uses of_()
routines though? Or is it under drivers or something?



Andres Salomon has been working for some time to get some Open Firmware 
support for x86 upstream.  As you can probably imagine, it has been slow 
going, but seems to be getting close.


The OLPC ARM work is just beginning, so nothing has been submitted yet. 
 The first hardware prototypes are still being debugged. Lennert 
Buytenhek is the key OS person who will be involved.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev