Re: [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Wolfgang Denk
Dear Heiko Schocher, In message <4d00f98b.1010...@denx.de> you wrote: > > >> +static unsigned long sensors_init_done = 0; > > > > What if there are more then 32 sensors? > > Ok, that would not work ... Hmm.. I can get the number of DTTs on a board > with ARRAY_SIZE(CONFIG_DTT_SENSORS) ... shoul

Re: [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Heiko Schocher
Hello Wolfgang, Wolfgang Denk wrote: > In message <1291903238-29071-1-git-send-email...@denx.de> you wrote: >> --- a/common/cmd_dtt.c >> +++ b/common/cmd_dtt.c >> @@ -28,6 +28,8 @@ >> #include >> #include >> >> +static unsigned long sensors_init_done = 0; > > What if there are more then 32

Re: [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Wolfgang Denk
Dear Heiko Schocher, In message <1291903238-29071-1-git-send-email...@denx.de> you wrote: > > --- a/common/cmd_dtt.c > +++ b/common/cmd_dtt.c > @@ -28,6 +28,8 @@ > #include > #include > > +static unsigned long sensors_init_done = 0; What if there are more then 32 sensors? > int do_dtt (cm

[U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Heiko Schocher
The U-Boot Design Principles[1] clearly say: Initialize devices only when they are needed within U-Boot, i.e. don't initialize the Ethernet interface(s) unless U-Boot performs a download over Ethernet; don't initialize any IDE or USB devices unless U-Boot actually tries to load files from