<div class="gmail_quote">Carl-Daniel pointed out some whitespace issues with the patch. I ran it thru the "indent -kr -i8" filter and fixed up the register table entries, so the attached patch should address concerns about whitespace.</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Jul 22, 2010 at 1:30 PM, David Hendricks <span dir="ltr"><<a href="mailto:dhendrix@google.com">dhendrix@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Thanks for sending the patch out, Amit!<div><br></div><div>Since I wrote this particular patch, I'll go ahead and do the sign-off on it:</div><div>Signed-off by: David Hendricks (<a href="mailto:dhendrix@google.com" target="_blank">dhendrix@google.com</a>) </div>

</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jul 21, 2010 at 12:00 AM,  <span dir="ltr"><<a href="mailto:Amit.Maoz@nuvoton.com" target="_blank">Amit.Maoz@nuvoton.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">







<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">This is the same patch as before (<span><span style="font-size:9.0pt;color:#888888">2010/07/14</span></span>) just with an updated copyright notice.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:navy">Amit Maoz<br>
Advanced PC Division<br>
Nuvoton Israel, P.O.Box 3007, Hertzlia B, 46130 Israel<br>
Phone : +972-9-9702266       <br>
Fax   : +972-9-9702001<br>
Email : <a href="mailto:Amit.Maoz@nuvoton.com" target="_blank"><span style="color:blue">Amit.Maoz@nuvoton.com</span></a></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Index: nuvoton.c</p>
<p class="MsoNormal">===================================================================</p>
<p class="MsoNormal">--- nuvoton.c      (revision 0)</p>
<p class="MsoNormal">+++ nuvoton.c    (revision 0)</p>
<p class="MsoNormal">@@ -0,0 +1,106 @@</p>
<p class="MsoNormal">+/*</p>
<p class="MsoNormal">+ * This file is part of the superiotool project.</p>
<p class="MsoNormal">+ *</p>
<p class="MsoNormal">+ * Copyright (C) 2010 Google Inc.</p>
<p class="MsoNormal">+ * Written by David Hendricks <<a href="mailto:dhendrix@google.com" target="_blank">dhendrix@google.com</a>> for Nuvoton Technology Corp.</p>
<p class="MsoNormal">+ *</p>
<p class="MsoNormal">+ * This program is free software; you can redistribute it and/or modify</p>
<p class="MsoNormal">+ * it under the terms of the GNU General Public License as published by</p>
<p class="MsoNormal">+ * the Free Software Foundation; either version 2 of the License, or</p>
<p class="MsoNormal">+ * (at your option) any later version.</p>
<p class="MsoNormal">+ *</p>
<p class="MsoNormal">+ * This program is distributed in the hope that it will be useful,</p>
<p class="MsoNormal">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</p>
<p class="MsoNormal">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</p>
<p class="MsoNormal">+ * GNU General Public License for more details.</p>
<p class="MsoNormal">+ *</p>
<p class="MsoNormal">+ * You should have received a copy of the GNU General Public License</p>
<p class="MsoNormal">+ * along with this program; if not, write to the Free Software</p>
<p class="MsoNormal">+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA</p>
<p class="MsoNormal">+ */</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+#include "superiotool.h"</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+#define DEVICE_ID_REG                         0x20      /* Super I/O ID (SID) / family */</p>
<p class="MsoNormal">+#define DEVICE_REV_REG                      0x27      /* Super I/O revision ID (SRID) */</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+static const struct superio_registers reg_table[] = {</p>
<p class="MsoNormal">+           {0xfc, "WPCE775x / NPCE781x", {</p>
<p class="MsoNormal">+                         {NOLDN, NULL,</p>
<p class="MsoNormal">+                                      {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,</p>
<p class="MsoNormal">+                                      0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},</p>
<p class="MsoNormal">+                                      {0xFC,0x11,RSVD,RSVD,RSVD,0x00,0x00,MISC,0x00,</p>
<p class="MsoNormal">+                                      0x04,RSVD,RSVD,RSVD,0x00,RSVD,RSVD,EOT}},</p>
<p class="MsoNormal">+                         {0x03, "CIR Port (CIRP)", /* where supported */</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},</p>
<p class="MsoNormal">+                         {0x04, "Mobile System Wake-Up Control Config (MSWC)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x05, "Mouse config (KBC)",</p>
<p class="MsoNormal">+                                      {0x30,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x0c,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x06, "Keyboard config (KBC)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x60,0x00,0x64,0x01,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x0f, "Shared memory (SHM)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,</p>
<p class="MsoNormal">+                                      0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x00,0x00,0x00,0x04,0x04,MISC,0x07,RSVD,</p>
<p class="MsoNormal">+                                      RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},</p>
<p class="MsoNormal">+                         {0x11, "Power management I/F Channel 1 (PM1)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x62,0x00,0x66,0x01,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x12, "Power management I/F Channel 2 (PM2)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x15, "Enhanced Wake On CIR (EWOC)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x17, "Power Management I/F Channel 3 (PM3)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x00,0x6a,0x00,0x6e,0x01,0x03,0x04,0x04,EOT}},</p>
<p class="MsoNormal">+                         {0x1a, "Serial Port with Fast Infrared Port (FIR)",</p>
<p class="MsoNormal">+                                      {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},</p>
<p class="MsoNormal">+                                      {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},</p>
<p class="MsoNormal">+                         {EOT}}},</p>
<p class="MsoNormal">+           {EOT}</p>
<p class="MsoNormal">+};</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+void probe_idregs_nuvoton(uint16_t port)</p>
<p class="MsoNormal">+{</p>
<p class="MsoNormal">+           uint8_t sid, srid;</p>
<p class="MsoNormal">+           uint8_t chip_id = 0, chip_rev = 0;</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+           probing_for("Nuvoton", "(sid=0xfc) ", port);</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+           sid = regval(port, DEVICE_ID_REG);</p>
<p class="MsoNormal">+           srid = regval(port, DEVICE_REV_REG);</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+           if (sid == 0xfc) { /* WPCE775xL family */</p>
<p class="MsoNormal">+                         /*</p>
<p class="MsoNormal">+                         * bits 7-5: Chip ID</p>
<p class="MsoNormal">+                         * bits 4-0: Chip revision</p>
<p class="MsoNormal">+                         */</p>
<p class="MsoNormal">+                         chip_id = srid >> 5;</p>
<p class="MsoNormal">+                         chip_rev = srid & 0x1f;</p>
<p class="MsoNormal">+           }</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+           if (superio_unknown(reg_table, sid)) {</p>
<p class="MsoNormal">+                         if (verbose)</p>
<p class="MsoNormal">+                                      printf(NOTFOUND "sid=0x%02x, id=0x%02x, rev=0x%02x\n",</p>
<p class="MsoNormal">+                                             sid, chip_id, chip_rev);</p>
<p class="MsoNormal">+                         return;</p>
<p class="MsoNormal">+           }</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+           printf("Found Nuvoton %s (id=0x%02x, rev=0x%02x) at 0x%x\n",</p>
<p class="MsoNormal">+                                get_superio_name(reg_table, sid), chip_id, chip_rev, port);</p>
<p class="MsoNormal">+           chip_found = 1;</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+           dump_superio("Nuvoton", reg_table, port, sid, LDN_SEL);</p>
<p class="MsoNormal">+}</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+void print_nuvoton_chips(void)</p>
<p class="MsoNormal">+{</p>
<p class="MsoNormal">+           print_vendor_chips("Nuvoton", reg_table);</p>
<p class="MsoNormal">+}</p>
<p class="MsoNormal">Index: superiotool.h</p>
<p class="MsoNormal">===================================================================</p>
<p class="MsoNormal">--- superiotool.h (revision 4892)</p>
<p class="MsoNormal">+++ superiotool.h            (working copy)</p>
<p class="MsoNormal">@@ -133,6 +133,10 @@</p>
<p class="MsoNormal"> void probe_idregs_nsc(uint16_t port);</p>
<p class="MsoNormal"> void print_nsc_chips(void);</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">+/* nuvoton.c */</p>
<p class="MsoNormal">+void probe_idregs_nuvoton(uint16_t port);</p>
<p class="MsoNormal">+void print_nuvoton_chips(void);</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal"> /* smsc.c */</p>
<p class="MsoNormal"> void probe_idregs_smsc(uint16_t port);</p>
<p class="MsoNormal"> void print_smsc_chips(void);</p>
<p class="MsoNormal">@@ -151,6 +155,9 @@</p>
<p class="MsoNormal">             /* Only use 0x370 for ITE, but 0x3f0 or 0x3bd would also be valid. */</p>
<p class="MsoNormal">             {probe_idregs_ite,          {0x2e, 0x4e, 0x370, EOT}},</p>
<p class="MsoNormal">             {probe_idregs_nsc,         {0x2e, 0x4e, 0x15c, EOT}},</p>
<p class="MsoNormal">+           /* I/O pairs on Nuvoton EC chips can be configured by firmware in</p>
<p class="MsoNormal">+           * addition to the following hardware strapping options. */</p>
<p class="MsoNormal">+           {probe_idregs_nuvoton, {0x164e, 0x2e, EOT}},</p>
<p class="MsoNormal">             {probe_idregs_smsc,      {0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}},</p>
<p class="MsoNormal">             {probe_idregs_winbond,              {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}},</p>
<p class="MsoNormal"> };</p>
<p class="MsoNormal">@@ -163,6 +170,7 @@</p>
<p class="MsoNormal">             {print_fintek_chips},</p>
<p class="MsoNormal">             {print_ite_chips},</p>
<p class="MsoNormal">             {print_nsc_chips},</p>
<p class="MsoNormal">+           {print_nuvoton_chips},</p>
<p class="MsoNormal">             {print_smsc_chips},</p>
<p class="MsoNormal">             {print_winbond_chips},</p>
<p class="MsoNormal"> };</p>
<p class="MsoNormal">Index: Makefile</p>
<p class="MsoNormal">===================================================================</p>
<p class="MsoNormal">--- Makefile       (revision 4892)</p>
<p class="MsoNormal">+++ Makefile     (working copy)</p>
<p class="MsoNormal">@@ -32,7 +32,7 @@</p>
<p class="MsoNormal"> CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \</p>
<p class="MsoNormal">          -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">-OBJS = superiotool.o ali.o fintek.o ite.o nsc.o smsc.o winbond.o</p>
<p class="MsoNormal">+OBJS = superiotool.o ali.o fintek.o ite.o nsc.o nuvoton.o smsc.o winbond.o</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> OS_ARCH = $(shell uname)</p>
<p class="MsoNormal"> ifeq ($(OS_ARCH), Darwin)</p>
</div>
<br>
<font face="Arial" color="Black" size="3">===========================================================================================<br>
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email
 to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information
 of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.<br>
</font><br>
<font face="Arial" color="Black" size="3">===========================================================================================<br>
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email
 to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information
 of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.<br>
</font>
</div>

<br></div></div>--<div class="im"><br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org" target="_blank">coreboot@coreboot.org</a><br>
<a href="http://www.coreboot.org/mailman/listinfo/coreboot" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br></div></blockquote></div><br><br clear="all"><br>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>




</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>