From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Support for W83627DHG
Date: Wed, 31 Mar 2010 08:38:51 +0000 [thread overview]
Message-ID: <20100331103851.1b4daa6b@hyperion.delvare> (raw)
In-Reply-To: <4BB0BE38.2090502@kaskonetworks.it>
Hi Fabio,
On Wed, 31 Mar 2010 10:07:56 +0200, fabio.antonini@kaskonetworks.it wrote:
> Hi Jean
> I have realized that the BIOS doesn't set the SIO_REG_ADDR as it should.
> So I have added a new parameter (force_addr) to let the user to write
> the LPC base address to the register.
> Now the modified section is
>
> /* initialize SIO_REG_ADDR if BIOS doesn't set it */
> if (force_addr) {
> printk(KERN_WARNING DRVNAME ": Writing SIO_REG_ADDR 0x%x.\n",
> force_addr);
> superio_outb(sioaddr, SIO_REG_ADDR, force_addr >> 8);
> superio_outb(sioaddr, SIO_REG_ADDR + 1, force_addr & 0x00FF);
> /* Activate logical device if needed */
> val = superio_inb(sioaddr, SIO_REG_ENABLE);
> if (!(val & 0x01)) {
> printk(KERN_WARNING DRVNAME ": Enabling Super-I/O.\n");
> superio_outb(sioaddr, SIO_REG_ENABLE, val | 0x01);
> }
> }
>
> /* We have a known chip, find the HWM I/O address */
> superio_select(sioaddr, W83627EHF_LD_HWM);
> val = (superio_inb(sioaddr, SIO_REG_ADDR) << 8)
> | superio_inb(sioaddr, SIO_REG_ADDR + 1);
> printk(KERN_ERR DRVNAME ": val = 0x%x\n", val);
> *addr = val & IOREGION_ALIGNMENT;
> if (*addr = 0) {
> printk(KERN_ERR DRVNAME ": Refusing to enable a Super-I/O "
> "device with a base I/O port 0.\n");
> superio_exit(sioaddr);
> return -ENODEV;
> }
>
> I'm not sure that this approach is correct. In your opinion is this
> reasonable or not?
I would like to avoid this. If the BIOS is broken, let's have the BIOS
fixed by the manufacturer. But I don't think this is your care, see
below.
> Now i can load the driver by the following command:
>
> # modprobe w83627ehf force_addr=0x290
>
> I have attached a text file with the sensors-detect and sensors output
> message.
> Now the driver is properly loaded. The tempeature and voltage detected
> are meaningless because the board I'm working on doesn't use the
> W83627EHF for temperature and voltage monitoring.
Indeed. Which is why they don't initialize the base I/O for the
hardware monitoring block: they don't use this feature.
> I need to use it for its GPIOs and parallel port. Do you know if anyone
> else has already worked on the GPIO or parallel section of the
> W83627ehf. At the moment my feeling is that both are not supported in
> the current driver.
The w83627ehf driver only cares about the hardware monitoring block.
The parallel port should already work fine, being handled by more
generic code (PC parallel port is fully standardized.) For GPIOs, I am
not aware of any driver for this chip or anyone working on it, but
again setting the I/O address of the hardware monitoring block isn't
needed at all to get GPIOs to work. So the change you proposed isn't
going to help you with that.
--
Jean Delvare
http://khali.linux-fr.org/wishlist.html
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2010-03-31 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 14:50 [lm-sensors] Support for W83627DHG fabio.antonini
2010-03-29 15:08 ` Jean Delvare
2010-03-31 8:07 ` fabio.antonini
2010-03-31 8:38 ` Jean Delvare [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100331103851.1b4daa6b@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.