
Dear Heiko Schocher,
In message 1312207303-25153-1-git-send-email-hs@denx.de you wrote:
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 these, etc. (and don't forget to shut down these devices after using them - otherwise nasty things may happen when you try to boot your OS).
So, do not initialize and read the sensors on startup.
Signed-off-by: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de cc: Holger Brunck holger.brunck@keymile.com
changes since v1 add comments from Wolfgang Denk use BUILD_BUG_ON to create a compileerror if there are defined more than 32 sensors.
changes since v2 don;t include genutils.h, as macro is now in common.h
changes since v3 do not initialize static sensor_initialized with 0
changes since v4 revert change for v4. Just drop the initialization of sensor_initialized with 0.
arch/powerpc/lib/board.c | 3 --- common/cmd_dtt.c | 16 ++++++++++++++-- drivers/hwmon/adm1021.c | 27 +++------------------------ drivers/hwmon/adt7460.c | 2 +- drivers/hwmon/ds1621.c | 19 +------------------ drivers/hwmon/ds1775.c | 19 +------------------ drivers/hwmon/lm63.c | 19 +------------------ drivers/hwmon/lm73.c | 20 ++------------------ drivers/hwmon/lm75.c | 29 ++--------------------------- drivers/hwmon/lm81.c | 21 ++------------------- include/dtt.h | 2 +- 11 files changed, 28 insertions(+), 149 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk