Dear Tech,

As you may know I am activating the watchdog function of a chip in my mainboard.
I encouter a little problem as the current is using a undersize 8bit ID.

Meanwhile i read about LM as it is the next logical step.

In <lm_wbsio_match> in lm78_isa.c device are 'probed' again, but the function
received the <struct isa_attach_args> as an argument thus having a way
to identfy the chip (in my case)

Given the comment i really wonder why the ia_aux field is not used here.

Index: dev/ic/lm78var.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/lm78var.h,v
retrieving revision 1.17
diff -u -p -r1.17 lm78var.h
--- dev/ic/lm78var.h    6 Dec 2011 16:06:07 -0000       1.17
+++ dev/ic/lm78var.h    7 Jan 2015 18:56:14 -0000
@@ -97,6 +97,7 @@
 /* Vendor IDs */
 #define WB_VENDID_WINBOND      0x5ca3  /* Winbond */
+#define WB_VENDID_NUVOTON 0x1414  /* Nuvoton NCT */
 #define WB_VENDID_ASUS         0x12c3  /* ASUS */
 /* Chip IDs */
Index: dev/isa/lm78_isa.c
===================================================================
RCS file: /cvs/src/sys/dev/isa/lm78_isa.c,v
retrieving revision 1.7
diff -u -p -r1.7 lm78_isa.c
--- dev/isa/lm78_isa.c  6 Dec 2011 16:06:07 -0000       1.7
+++ dev/isa/lm78_isa.c  7 Jan 2015 18:56:14 -0000
@@ -99,8 +99,14 @@ lm_wbsio_match(struct device *parent, vo
        bus_space_unmap(iot, ioh, 8);
-       if (vendid != WB_VENDID_WINBOND)
+       printf("%s: Probe for Winbond chips %p\n", __func__, ia->ia_aux);
+
+       //WHY not using ia_aux ?
+       if (vendid != WB_VENDID_WINBOND && vendid != WB_VENDID_NUVOTON) {
+               DPRINTF(("%s: WB_VENDID_WINBOND %08X\n", __func__,vendid));
                return (0);
+  }
        ia->ipa_nio = 1;
        ia->ipa_io[0].length = 8;


-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\

Reply via email to