public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] arm mach-types.h
@ 2011-11-12 23:58 Michael Walle
  2011-11-13  0:32 ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Walle @ 2011-11-12 23:58 UTC (permalink / raw)
  To: u-boot

Hi,

Does u-boot always follow the mach-types.h from upstream linux? Is there any 
policy?

If thats true, it means, that
 - every supported board in u-boot has to be supported in mainline linux,
   too. because that is the basic requirement for an entry to stay in this
   file.
 - a device with device tree bindings, won't have any mach-type entry at all,
   which means, that a distribution is not able to backport a device support
   from DT form to an old-fashioned setup code (eg. support for a board on
   older linux kernels, which doesn't have ARM device tree support).

IMHO u-boot should have its own mach-types.h (maybe autogenerated, like the 
linux kernel do), just with entries for boards which are supported by u-boot. 
This way, there won't be any problems with new board support patches.

Opinions?

-- 
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] arm mach-types.h
  2011-11-12 23:58 [U-Boot] arm mach-types.h Michael Walle
@ 2011-11-13  0:32 ` Marek Vasut
  2011-11-13 10:10   ` Michael Walle
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2011-11-13  0:32 UTC (permalink / raw)
  To: u-boot

> Hi,
> 
> Does u-boot always follow the mach-types.h from upstream linux? Is there
> any policy?

Yes it does follow it.

> 
> If thats true, it means, that
>  - every supported board in u-boot has to be supported in mainline linux,
>    too. because that is the basic requirement for an entry to stay in this
>    file.

No, you can define CONFIG_MACH_TYPE MACH_TYPE_SOMETHING and MACH_TYPE_SOMETHING 
nnn in your config file.

>  - a device with device tree bindings, won't have any mach-type entry at
> all, which means, that a distribution is not able to backport a device
> support from DT form to an old-fashioned setup code (eg. support for a
> board on older linux kernels, which doesn't have ARM device tree support).

Use new kernel or use the stuff above.
> 
> IMHO u-boot should have its own mach-types.h (maybe autogenerated, like the
> linux kernel do), just with entries for boards which are supported by
> u-boot. This way, there won't be any problems with new board support
> patches.

That would be insane due to colisions in the number assignment. See above how to 
handle such trouble.
> 
> Opinions?

I explained it twice, once in LAKML and once here.

M

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] arm mach-types.h
  2011-11-13  0:32 ` Marek Vasut
@ 2011-11-13 10:10   ` Michael Walle
  2011-11-13 16:18     ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Walle @ 2011-11-13 10:10 UTC (permalink / raw)
  To: u-boot

Am Sonntag 13 November 2011, 01:32:03 schrieb Marek Vasut:
> >  - every supported board in u-boot has to be supported in mainline linux,
> >  
> >    too. because that is the basic requirement for an entry to stay in
> >    this file.
> 
> No, you can define CONFIG_MACH_TYPE MACH_TYPE_SOMETHING and
> MACH_TYPE_SOMETHING nnn in your config file.
well, according to this argumentation, there would be no need for mach-types.h 
at all. because if you rely on a mach-types.h definition and it is removed 
from linux, you have to switch to define it yourself anyway.

> > IMHO u-boot should have its own mach-types.h (maybe autogenerated, like
> > the linux kernel do), just with entries for boards which are supported
> > by u-boot. This way, there won't be any problems with new board support
> > patches.
> 
> That would be insane due to colisions in the number assignment. See above
> how to handle such trouble.
of course with the same ids... (same source as the kernel mach-types, which is 
http://www.arm.linux.org.uk/developer/machines/download.php)

-- 
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] arm mach-types.h
  2011-11-13 10:10   ` Michael Walle
@ 2011-11-13 16:18     ` Marek Vasut
  2011-11-13 16:34       ` Michael Walle
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2011-11-13 16:18 UTC (permalink / raw)
  To: u-boot

> Am Sonntag 13 November 2011, 01:32:03 schrieb Marek Vasut:
> > >  - every supported board in u-boot has to be supported in mainline
> > >  linux,
> > >  
> > >    too. because that is the basic requirement for an entry to stay in
> > >    this file.
> > 
> > No, you can define CONFIG_MACH_TYPE MACH_TYPE_SOMETHING and
> > MACH_TYPE_SOMETHING nnn in your config file.
> 
> well, according to this argumentation, there would be no need for
> mach-types.h at all. because if you rely on a mach-types.h definition and
> it is removed from linux, you have to switch to define it yourself anyway.

Not really, if you don't use it to boot linux, you don't need the mach id. Or if 
you use dtree.
> 
> > > IMHO u-boot should have its own mach-types.h (maybe autogenerated, like
> > > the linux kernel do), just with entries for boards which are supported
> > > by u-boot. This way, there won't be any problems with new board support
> > > patches.
> > 
> > That would be insane due to colisions in the number assignment. See above
> > how to handle such trouble.
> 
> of course with the same ids... (same source as the kernel mach-types, which
> is http://www.arm.linux.org.uk/developer/machines/download.php)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] arm mach-types.h
  2011-11-13 16:18     ` Marek Vasut
@ 2011-11-13 16:34       ` Michael Walle
  2011-11-13 17:14         ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Walle @ 2011-11-13 16:34 UTC (permalink / raw)
  To: u-boot

Am Sonntag 13 November 2011, 17:18:27 schrieb Marek Vasut:
> > Am Sonntag 13 November 2011, 01:32:03 schrieb Marek Vasut:
> > > >  - every supported board in u-boot has to be supported in mainline
> > > >  linux,
> > > >  
> > > >    too. because that is the basic requirement for an entry to stay in
> > > >    this file.
> > > 
> > > No, you can define CONFIG_MACH_TYPE MACH_TYPE_SOMETHING and
> > > MACH_TYPE_SOMETHING nnn in your config file.
> > 
> > well, according to this argumentation, there would be no need for
> > mach-types.h at all. because if you rely on a mach-types.h definition and
> > it is removed from linux, you have to switch to define it yourself
> > anyway.
> 
> Not really, if you don't use it to boot linux, you don't need the mach id.
> Or if you use dtree.
so why should i use the mach-type.h anyway? instead i could just define the id 
in the config.

either there is a database, where the ids come from (and this database must 
not follow the linux policies) or there is no database and every board defines 
the numerical id (of couse they must match the linux mach ids.)

what about boards which switch from mach-ids to DT in linux? Just don't 
support mach-ids for these anymore and not being able to boot older kernels?

-- 
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] arm mach-types.h
  2011-11-13 16:34       ` Michael Walle
@ 2011-11-13 17:14         ` Marek Vasut
  2011-11-13 17:52           ` Michael Walle
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2011-11-13 17:14 UTC (permalink / raw)
  To: u-boot

> Am Sonntag 13 November 2011, 17:18:27 schrieb Marek Vasut:
> > > Am Sonntag 13 November 2011, 01:32:03 schrieb Marek Vasut:
> > > > >  - every supported board in u-boot has to be supported in mainline
> > > > >  linux,
> > > > >  
> > > > >    too. because that is the basic requirement for an entry to stay
> > > > >    in this file.
> > > > 
> > > > No, you can define CONFIG_MACH_TYPE MACH_TYPE_SOMETHING and
> > > > MACH_TYPE_SOMETHING nnn in your config file.
> > > 
> > > well, according to this argumentation, there would be no need for
> > > mach-types.h at all. because if you rely on a mach-types.h definition
> > > and it is removed from linux, you have to switch to define it yourself
> > > anyway.
> > 
> > Not really, if you don't use it to boot linux, you don't need the mach
> > id. Or if you use dtree.
> 
> so why should i use the mach-type.h anyway? instead i could just define the
> id in the config.
> 
> either there is a database, where the ids come from (and this database must
> not follow the linux policies) or there is no database and every board
> defines the numerical id (of couse they must match the linux mach ids.)
> 
> what about boards which switch from mach-ids to DT in linux? Just don't
> support mach-ids for these anymore and not being able to boot older
> kernels?

Why would the machine ID be removed from mach-types.h is the machine switched to 
DT ?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] arm mach-types.h
  2011-11-13 17:14         ` Marek Vasut
@ 2011-11-13 17:52           ` Michael Walle
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Walle @ 2011-11-13 17:52 UTC (permalink / raw)
  To: u-boot

Am Sonntag 13 November 2011, 18:14:16 schrieb Marek Vasut:
> > Am Sonntag 13 November 2011, 17:18:27 schrieb Marek Vasut:
> > > > Am Sonntag 13 November 2011, 01:32:03 schrieb Marek Vasut:
> > > > > >  - every supported board in u-boot has to be supported in
> > > > > >  mainline linux,
> > > > > >  
> > > > > >    too. because that is the basic requirement for an entry to
> > > > > >    stay in this file.
> > > > > 
> > > > > No, you can define CONFIG_MACH_TYPE MACH_TYPE_SOMETHING and
> > > > > MACH_TYPE_SOMETHING nnn in your config file.
> > > > 
> > > > well, according to this argumentation, there would be no need for
> > > > mach-types.h at all. because if you rely on a mach-types.h definition
> > > > and it is removed from linux, you have to switch to define it
> > > > yourself anyway.
> > > 
> > > Not really, if you don't use it to boot linux, you don't need the mach
> > > id. Or if you use dtree.
> > 
> > so why should i use the mach-type.h anyway? instead i could just define
> > the id in the config.
> > 
> > either there is a database, where the ids come from (and this database
> > must not follow the linux policies) or there is no database and every
> > board defines the numerical id (of couse they must match the linux mach
> > ids.)
> > 
> > what about boards which switch from mach-ids to DT in linux? Just don't
> > support mach-ids for these anymore and not being able to boot older
> > kernels?
> 
> Why would the machine ID be removed from mach-types.h is the machine
> switched to DT ?
linux policy

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-13 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-12 23:58 [U-Boot] arm mach-types.h Michael Walle
2011-11-13  0:32 ` Marek Vasut
2011-11-13 10:10   ` Michael Walle
2011-11-13 16:18     ` Marek Vasut
2011-11-13 16:34       ` Michael Walle
2011-11-13 17:14         ` Marek Vasut
2011-11-13 17:52           ` Michael Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox