]> git.baikalelectronics.ru Git - kernel.git/commit
x86: fix cmos read and write to not use inb_p and outb_p
authorDavid P. Reed <dpreed@reed.com>
Sun, 17 Feb 2008 21:56:39 +0000 (16:56 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:47 +0000 (17:40 +0200)
commitcf0c78c2bf966ed29157b4f99e977440a04583f5
tree154940ae375efc082f7a52116963e24d42b423f6
parentc9c3ad5ab75b7d8b95394b1676d7aa6db40999a0
x86: fix cmos read and write to not use inb_p and outb_p

fix code to access CMOS rtc registers so that it does not use inb_p and
outb_p routines, which are deprecated.  Extensive research on all known
CMOS RTC chipset timing shows that there is no need for a delay in
accessing the registers of these chips even on old machines. These chipa
are never on an expansion bus, but have always been "motherboard"
resources, either in the processor chipset or explicitly on the
motherboard, and they are not part of the ISA/LPC or PCI buses, so
delays should not be based on bus timing. The reason to fix it:

 1) port 80 writes often hang some laptops that use ENE EC chipsets,
    esp. those designed and manufactured by Quanta for HP;

 2) RTC accesses are timing sensitive, and extra microseconds may matter;

 3) the new "io_delay" function is calibrated by expansion bus timing needs,
    thus is not appropriate for access to CMOS rtc registers.

Signed-off-by: David P. Reed <dpreed@reed.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/rtc.c