Skip to contentSkip to conversation

rtc.c is requesting more ioports then it really uses

PATCH In review Rusty Lynch 3 participants 3 messages Feb 7, 2003 – Feb 9, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc.c is requesting more ioports then it really uses

I need to enable a device that talks to port 0x79h, but for some reason the rtc is requesting move bytes then it really uses. Here is a patch that makes the rtc only request what it uses.

--rustyl

char/rtc.c renamed from char/rtc.c.orig +1 -1
@@ -47,7 +47,7 @@
 
 #define RTC_VERSION		"1.11"
 
-#define RTC_IO_EXTENT	0x10	/* Only really two ports, but...	*/
+#define RTC_IO_EXTENT	0x2
 
 /*
  *	Note that *all* calls to CMOS_READ and CMOS_WRITE are done with
#1 lore raw

On 7 Feb 2003, Rusty Lynch wrote:

| I need to enable a device that talks to port 0x79h, but for some
| reason the rtc is requesting move bytes then it really uses.  Here
| is a patch that makes the rtc only request what it uses.
|
|     --rustyl
|
| --- drivers/char/rtc.c.orig	2003-02-07 14:35:31.000000000 -0800
| +++ drivers/char/rtc.c	2003-02-07 13:25:45.000000000 -0800
| @@ -47,7 +47,7 @@
|
|  #define RTC_VERSION		"1.11"
|
| -#define RTC_IO_EXTENT	0x10	/* Only really two ports, but...	*/
| +#define RTC_IO_EXTENT	0x2
|
|  /*
|   *	Note that *all* calls to CMOS_READ and CMOS_WRITE are done with
| -

Some Intel chipset specs list RTC as using 0x70 - 0x77, probably with some aliasing in there, so it looks to me like an EXTENT of 8 would be safer and still allow you access to 0x79.

I'm looking at 82801BA-ICH2, 82801-ICH3, and 82801AA-ICH0 specs.

Signature · 1 line
~Randy
#2 lore raw

Seems fine with me. If memory serves correctly the 0x10 came from kernels prior to the rtc driver where the range was requested as part of the generic i386 specific i/o space that was off limits.

Paul.

Quoted 21 lines · --- "Randy.Dunlap

On 7 Feb 2003, Rusty Lynch wrote:

| I need to enable a device that talks to port 0x79h, but for some
| reason the rtc is requesting move bytes then it really uses.  Here
| is a patch that makes the rtc only request what it uses.
|
|     --rustyl
|
| --- drivers/char/rtc.c.orig	2003-02-07 14:35:31.000000000 -0800
| +++ drivers/char/rtc.c	2003-02-07 13:25:45.000000000 -0800
| @@ -47,7 +47,7 @@
|
|  #define RTC_VERSION		"1.11"
|
| -#define RTC_IO_EXTENT	0x10	/* Only really two ports, but...	*/
| +#define RTC_IO_EXTENT	0x2
|
|  /*
|   *	Note that *all* calls to CMOS_READ and CMOS_WRITE are done with
| -
Quoted 9 lines

Some Intel chipset specs list RTC as using 0x70 - 0x77, probably with some aliasing in there, so it looks to me like an EXTENT of 8 would be safer and still allow you access to 0x79.

I'm looking at 82801BA-ICH2, 82801-ICH3, and 82801AA-ICH0 specs.

Signature · 1 line
~Randy

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com