2004-04-06 11:35:07

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] QD65xx I/O ports


I/O port numbers can be larger than 8-bit on many platforms (this caused a
warning when {out,in}b() cast reg to a pointer on platforms with memory mapped
I/O)

--- linux-2.6.5/drivers/ide/legacy/qd65xx.c.orig 2003-10-09 10:02:47.000000000 +0200
+++ linux-2.6.5/drivers/ide/legacy/qd65xx.c 2004-04-01 13:31:54.000000000 +0200
@@ -92,7 +92,7 @@

static int timings[4]={-1,-1,-1,-1}; /* stores current timing for each timer */

-static void qd_write_reg (u8 content, u8 reg)
+static void qd_write_reg (u8 content, unsigned long reg)
{
unsigned long flags;

@@ -101,7 +101,7 @@
spin_unlock_irqrestore(&ide_lock, flags);
}

-u8 __init qd_read_reg (u8 reg)
+u8 __init qd_read_reg (unsigned long reg)
{
unsigned long flags;
u8 read;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Subject: Re: [PATCH] QD65xx I/O ports

On Tuesday 06 of April 2004 13:31, Geert Uytterhoeven wrote:
> I/O port numbers can be larger than 8-bit on many platforms (this caused a
> warning when {out,in}b() cast reg to a pointer on platforms with memory
> mapped I/O)

Was VESA Local Bus ever used on something else than 486?
I think it's better to just add "depends on X86" to drivers/ide/Kconfig.

Cheers,
Bartlomiej

2004-04-13 13:47:39

by Erik Mouw

[permalink] [raw]
Subject: Re: [PATCH] QD65xx I/O ports

On Fri, Apr 09, 2004 at 12:50:24AM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 06 of April 2004 13:31, Geert Uytterhoeven wrote:
> > I/O port numbers can be larger than 8-bit on many platforms (this caused a
> > warning when {out,in}b() cast reg to a pointer on platforms with memory
> > mapped I/O)
>
> Was VESA Local Bus ever used on something else than 486?

IIRC there were early Pentium boards with VESA Local Bus (VLB), but my
memory is vague about that.

> I think it's better to just add "depends on X86" to drivers/ide/Kconfig.

VLB is nothing more than ISA with a 32 bit address and data bus. That
is exactly how many busses on embedded CPUs work, but with the
difference that they map the ISA 16bit memory and IO space somewhere in
their 4GB memory space.

For example: the Digital/Intel StrongARM SA-11x0 has a 32 bit bus,
which (with the help of some glue logic) works like a 32 bit ISA bus.
Quite some embedded hardware emulates a 16 bit ISA bus by mapping the
ISA memory and IO space in a special memory area which can live
anywhere in the 4GB space, and that's why Geert wants an unsigned long
address in {out,in}b().


Erik

--
+-- Erik Mouw -- http://www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands

2004-04-14 01:40:14

by Stuart Young

[permalink] [raw]
Subject: Re: [PATCH] QD65xx I/O ports

On Tue, 13 Apr 2004 11:47 pm, Erik Mouw wrote:
> On Fri, Apr 09, 2004 at 12:50:24AM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Tuesday 06 of April 2004 13:31, Geert Uytterhoeven wrote:
> > > I/O port numbers can be larger than 8-bit on many platforms (this
> > > caused a warning when {out,in}b() cast reg to a pointer on platforms
> > > with memory mapped I/O)
> >
> > Was VESA Local Bus ever used on something else than 486?
>
> IIRC there were early Pentium boards with VESA Local Bus (VLB), but my
> memory is vague about that.

I can confirm that. I used to own one of those beasts. PCI, VLB & ISA all on
the one board. First generation Pentium's (+5v core) only as far as I
remember.

Subject: Re: [PATCH] QD65xx I/O ports

On Wednesday 14 of April 2004 03:40, Cef (LKML) wrote:
> On Tue, 13 Apr 2004 11:47 pm, Erik Mouw wrote:
> > On Fri, Apr 09, 2004 at 12:50:24AM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > On Tuesday 06 of April 2004 13:31, Geert Uytterhoeven wrote:
> > > > I/O port numbers can be larger than 8-bit on many platforms (this
> > > > caused a warning when {out,in}b() cast reg to a pointer on platforms
> > > > with memory mapped I/O)
> > >
> > > Was VESA Local Bus ever used on something else than 486?
> >
> > IIRC there were early Pentium boards with VESA Local Bus (VLB), but my
> > memory is vague about that.
>
> I can confirm that. I used to own one of those beasts. PCI, VLB & ISA all
> on the one board. First generation Pentium's (+5v core) only as far as I
> remember.

Yes, you are right. I also remember them. :-)