Commit e037a4c272018b86df4729c9f13ccbeec073b4a6
Exists in
master
and in
54 other branches
Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master
Showing 5 changed files Side-by-side Diff
post/board/lwmon/Makefile
... | ... | @@ -20,11 +20,11 @@ |
20 | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | 21 | # MA 02111-1307 USA |
22 | 22 | # |
23 | +include $(OBJTREE)/include/autoconf.mk | |
23 | 24 | |
24 | - | |
25 | 25 | LIB = libpostlwmon.a |
26 | 26 | |
27 | -COBJS = sysmon.o | |
27 | +COBJS-$(CONFIG_HAS_POST) += sysmon.o | |
28 | 28 | |
29 | 29 | include $(TOPDIR)/post/rules.mk |
post/board/lwmon5/sysmon.c
... | ... | @@ -32,9 +32,9 @@ |
32 | 32 | * The test passes when all the following voltages and temperatures |
33 | 33 | * are within allowed ranges: |
34 | 34 | * |
35 | - * Temperature -40 .. +85 C | |
36 | - * +5V +4.75 .. +5.25 V | |
37 | - * +5V standby +4.75 .. +5.25 V | |
35 | + * Temperature -40 .. +90 C | |
36 | + * +5V +4.50 .. +5.50 V | |
37 | + * +5V standby +3.50 .. +5.50 V | |
38 | 38 | * |
39 | 39 | * LCD backlight is not enabled if temperature values are not within |
40 | 40 | * allowed ranges (-30 .. + 80). The brightness of backlite can be |
... | ... | @@ -60,6 +60,21 @@ |
60 | 60 | |
61 | 61 | #define RELOC(x) if (x != NULL) x = (void *) ((ulong) (x) + gd->reloc_off) |
62 | 62 | |
63 | +#define REG_TEMPERATURE 0x12BC | |
64 | +#define REG_VOLTAGE_5V 0x12CA | |
65 | +#define REG_VOLTAGE_5V_STANDBY 0x12C6 | |
66 | + | |
67 | +#define TEMPERATURE_MIN (-40) /* degr. C */ | |
68 | +#define TEMPERATURE_MAX (+90) /* degr. C */ | |
69 | +#define TEMPERATURE_DISPLAY_MIN (-35) /* degr. C */ | |
70 | +#define TEMPERATURE_DISPLAY_MAX (+85) /* degr. C */ | |
71 | + | |
72 | +#define VOLTAGE_5V_MIN (+4500) /* mV */ | |
73 | +#define VOLTAGE_5V_MAX (+5500) /* mV */ | |
74 | + | |
75 | +#define VOLTAGE_5V_STANDBY_MIN (+3500) /* mV */ | |
76 | +#define VOLTAGE_5V_STANDBY_MAX (+5500) /* mV */ | |
77 | + | |
63 | 78 | typedef struct sysmon_s sysmon_t; |
64 | 79 | typedef struct sysmon_table_s sysmon_table_t; |
65 | 80 | |
66 | 81 | |
67 | 82 | |
... | ... | @@ -107,17 +122,31 @@ |
107 | 122 | |
108 | 123 | static sysmon_table_t sysmon_table[] = |
109 | 124 | { |
110 | - {"Temperature", " C", &sysmon_dspic, NULL, sysmon_backlight_disable, | |
111 | - 1, 1, -32768, 32767, 0xFFFF, 0x8000-40, 0x8000+85, 0, | |
112 | - 0x8000-30, 0x8000+80, 0, 0x12BC}, | |
125 | + { | |
126 | + "Temperature", " C", &sysmon_dspic, NULL, sysmon_backlight_disable, | |
127 | + 1, 1, -32768, 32767, 0xFFFF, | |
128 | + 0x8000 + TEMPERATURE_MIN, 0x8000 + TEMPERATURE_MAX, 0, | |
129 | + 0x8000 + TEMPERATURE_DISPLAY_MIN, 0x8000 + TEMPERATURE_DISPLAY_MAX, 0, | |
130 | + REG_TEMPERATURE | |
131 | + }, | |
113 | 132 | |
114 | - {"+ 5 V", "V", &sysmon_dspic, NULL, NULL, | |
115 | - 100, 1000, -0x8000, 0x7FFF, 0xFFFF, 0x8000+4750, 0x8000+5250, 0, | |
116 | - 0x8000+4750, 0x8000+5250, 0, 0x12CA}, | |
133 | + { | |
134 | + "+ 5 V", "V", &sysmon_dspic, NULL, NULL, | |
135 | + 100, 1000, -0x8000, 0x7FFF, 0xFFFF, | |
136 | + 100, 1000, 0, 0xFFFF, 0xFFFF, | |
137 | + VOLTAGE_5V_MIN, VOLTAGE_5V_MAX, 0, | |
138 | + VOLTAGE_5V_MIN, VOLTAGE_5V_MAX, 0, | |
139 | + REG_VOLTAGE_5V | |
140 | + }, | |
117 | 141 | |
118 | - {"+ 5 V standby", "V", &sysmon_dspic, NULL, NULL, | |
119 | - 100, 1000, -0x8000, 0x7FFF, 0xFFFF, 0x8000+4750, 0x8000+5250, 0, | |
120 | - 0x8000+4750, 0x8000+5250, 0, 0x12C6}, | |
142 | + { | |
143 | + "+ 5 V standby", "V", &sysmon_dspic, NULL, NULL, | |
144 | + 100, 1000, -0x8000, 0x7FFF, 0xFFFF, | |
145 | + 100, 1000, 0, 0xFFFF, 0xFFFF, | |
146 | + VOLTAGE_5V_STANDBY_MIN, VOLTAGE_5V_STANDBY_MAX, 0, | |
147 | + VOLTAGE_5V_STANDBY_MIN, VOLTAGE_5V_STANDBY_MAX, 0, | |
148 | + REG_VOLTAGE_5V_STANDBY | |
149 | + }, | |
121 | 150 | }; |
122 | 151 | static int sysmon_table_size = sizeof(sysmon_table) / sizeof(sysmon_table[0]); |
123 | 152 |
post/board/lwmon5/watchdog.c
... | ... | @@ -52,8 +52,9 @@ |
52 | 52 | |
53 | 53 | int sysmon1_post_test(int flags) |
54 | 54 | { |
55 | - if (gpio_read_in_bit(CFG_GPIO_SYSMON_STATUS)) { | |
56 | - /* 3.1. GPIO62 is low | |
55 | + if (gpio_read_in_bit(CFG_GPIO_SYSMON_STATUS) == 0) { | |
56 | + /* | |
57 | + * 3.1. GPIO62 is low | |
57 | 58 | * Assuming system voltage failure. |
58 | 59 | */ |
59 | 60 | post_log("Abnormal voltage detected (GPIO62)\n"); |
post/board/netta/Makefile
... | ... | @@ -20,11 +20,11 @@ |
20 | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | 21 | # MA 02111-1307 USA |
22 | 22 | # |
23 | +include $(OBJTREE)/include/autoconf.mk | |
23 | 24 | |
24 | - | |
25 | 25 | LIB = libpostnetta.a |
26 | 26 | |
27 | -COBJS = codec.o dsp.o | |
27 | +COBJS-$(CONFIG_HAS_POST) += codec.o dsp.o | |
28 | 28 | |
29 | 29 | include $(TOPDIR)/post/rules.mk |
post/cpu/mpc8xx/Makefile
... | ... | @@ -20,11 +20,12 @@ |
20 | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | 21 | # MA 02111-1307 USA |
22 | 22 | # |
23 | +include $(OBJTREE)/include/autoconf.mk | |
23 | 24 | |
24 | 25 | LIB = libpostmpc8xx.a |
25 | 26 | |
26 | -AOBJS = cache_8xx.o | |
27 | -COBJS = cache.o ether.o spr.o uart.o usb.o watchdog.o | |
27 | +AOBJS-$(CONFIG_HAS_POST) += cache_8xx.o | |
28 | +COBJS-$(CONFIG_HAS_POST) += cache.o ether.o spr.o uart.o usb.o watchdog.o | |
28 | 29 | |
29 | 30 | include $(TOPDIR)/post/rules.mk |