Hello Jacob Garber,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/33406
to review the following change.
Change subject: util/superiotool/nuvoton.c: added NCT5539D chip registers Change-Id: I28446e6744fe58d954971fbff8b73413e64f5468 Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/33181 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com ......................................................................
util/superiotool/nuvoton.c: added NCT5539D chip registers Change-Id: I28446e6744fe58d954971fbff8b73413e64f5468 Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/33181 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com
Change-Id: I9dbcc1c5514b96ddf63a5ab2cb263f5f17002389 --- M src/console/printk.c M src/include/console/console.h M util/superiotool/nuvoton.c 3 files changed, 57 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/33406/1
diff --git a/src/console/printk.c b/src/console/printk.c index 0952215..8606bbb 100644 --- a/src/console/printk.c +++ b/src/console/printk.c @@ -45,7 +45,7 @@ __cbmemc_tx_byte(byte); }
-int vprintk(int msg_level, const char *fmt, va_list args) +int do_vprintk(int msg_level, const char *fmt, va_list args) { int i, log_this;
@@ -91,7 +91,7 @@ int i;
va_start(args, fmt); - i = vprintk(msg_level, fmt, args); + i = do_vprintk(msg_level, fmt, args); va_end(args);
return i; diff --git a/src/include/console/console.h b/src/include/console/console.h index 369ce5b..e5b753e 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -63,8 +63,8 @@ int console_log_level(int msg_level); void do_putchar(unsigned char byte);
-#define printk(LEVEL, fmt, args...) \ - do { do_printk(LEVEL, fmt, ##args); } while (0) +#define printk(LEVEL, fmt, args...) do_printk(LEVEL, fmt, ##args) +#define vprintk(LEVEL, fmt, args) do_vprintk(LEVEL, fmt, args)
enum { CONSOLE_LOG_NONE = 0, CONSOLE_LOG_FAST, CONSOLE_LOG_ALL };
@@ -84,14 +84,15 @@ static inline void console_init(void) {} static inline int console_log_level(int msg_level) { return 0; } static inline void printk(int LEVEL, const char *fmt, ...) {} +static inline void vprintk(int LEVEL, const char *fmt, va_list args) {} static inline void do_putchar(unsigned char byte) {} #endif
-int vprintk(int msg_level, const char *fmt, va_list args); - int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+int do_vprintk(int msg_level, const char *fmt, va_list args); + #endif /* !__ROMCC__ */
#endif /* CONSOLE_CONSOLE_H_ */ diff --git a/util/superiotool/nuvoton.c b/util/superiotool/nuvoton.c index 82772e7..01d195c 100644 --- a/util/superiotool/nuvoton.c +++ b/util/superiotool/nuvoton.c @@ -582,6 +582,56 @@ {0x30,0xe0,0xe1,0xe2,0xe3,EOT}, {0x20,0x20,0x04,0x05,0x01,EOT}}, {EOT}}}, + {0xd121, "NCT5539D (not all LDNs supported)", { + {NOLDN, NULL, + {0x07,0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x20,0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,0x2f,EOT}, + {0x00,0xff,0xff,0x00,0x00,0x30,0x50,0x10,0x00,0xd1,0x21,0xff,0x04,0x00,MISC,0x03,0x00,0xc0,0x00,0x01,MISC,MISC,EOT}}, + {0x02, "UART A", + {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT}, + {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}}, + {0x05, "Keyboard Controller", + {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}}, + {0x06, "CIR", + {0x30,0x60,0x61,0x70,EOT}, + {0x00,0x00,0x00,0x00,EOT}}, + {0x07, "GPIO 7, GPIO 8", + {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xec,0xed,EOT}, + {0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,EOT}}, + {0x08, "WDT1, WDT3, WDT3, GPIO 0, KBC P20", + {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfe,0xff,EOT}, + {0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, + {0x09, "GPIO 2, GPIO 3, GPIO 4, GPIO 5", + {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,0xf7,EOT}, + {0x00,0xff,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,EOT}}, + {0x0a, "ACPI", + {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf6,0xf7,0xfc,EOT}, + {0x01,0x00,0x00,0x00,0x00,0x02,0x1a,0x00,0x00,0x00,0x01,0x00,0x10,0x48,0x5c,0x00,0x00,0xc0,0x80,EOT}}, + {0x0b, "Hardware Monitor, Front Panel LED", + {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xec,0xed,0xf0,0xf1,0xf2,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,EOT}, + {0x00,0x00,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x7f,0xa8,0x08,0x7f,0x00,0x81,0x00,0x00,0x00,0x00,0x87,0x47,0x00,0x00,0x00,0x02,EOT}}, + {0x0d, "BCLK, WDT2", + {0xe7,0xe8,0xeb,0xed,0xf0,0xf3,EOT}, + {0x10,0x32,0x14,0x00,0x00,0x00,EOT}}, + {0x0e, "CIR Wake-Up", + {0x30,0x60,0x61,0x70,EOT}, + {0x00,0x00,0x00,0x00,EOT}}, + {0x0f, "GPIO Push-Pull or Open-Drain selection", + {0xe1,0xe2,0xe3,0xe4,0xe6,0xe7,0xe9,EOT}, + {0xff,0x7f,0xff,0xff,0xff,0xff,0xff,EOT}}, + {0x11, "GPIO, RI PSOUT Wake-Up Status Register", + {0xe1,0xe2,0xe9,EOT}, + {0x00,0x00,0x00,EOT}}, + {0x12, "SW Error Control Register", + {0xe1,0xe7,0xea,0xeb,0xec,EOT}, + {0x00,0x00,0x10,0x00,0x00,EOT}}, + {0x15, "Fading Led Maximun Duty Cycle Value Register", + {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT}, + {0xff,0x7f,0x00,0x56,0x56,0x17,0x00,0x0f,0x10,EOT}}, + {0x16, "Deep Sleep", + {0x30,0xe0,0xe1,0xe2,0xe3,EOT}, + {0xa0,0x20,0x04,0x05,0x01,EOT}}, + {EOT}}}, {EOT} };