* i8259.c in big endian
@ 2001-11-08 6:47 Atsushi Nemoto
2001-11-08 17:45 ` James Simmons
2001-11-09 17:41 ` Ralf Baechle
0 siblings, 2 replies; 17+ messages in thread
From: Atsushi Nemoto @ 2001-11-08 6:47 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
arch/mips/kernel/i8259.c seems not working in big endian.
Here is a patch to fix this.
--- linux-sgi-cvs/arch/mips/kernel/i8259.c Mon Sep 10 02:43:01 2001
+++ linux.new/arch/mips/kernel/i8259.c Thu Nov 8 15:40:03 2001
@@ -70,8 +70,13 @@
static unsigned int cached_irq_mask = 0xffff;
#define __byte(x,y) (((unsigned char *)&(y))[x])
+#ifdef __BIG_ENDIAN
+#define cached_21 (__byte(1,cached_irq_mask))
+#define cached_A1 (__byte(0,cached_irq_mask))
+#else
#define cached_21 (__byte(0,cached_irq_mask))
#define cached_A1 (__byte(1,cached_irq_mask))
+#endif
void disable_8259A_irq(unsigned int irq)
{
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: i8259.c in big endian
2001-11-08 6:47 i8259.c in big endian Atsushi Nemoto
@ 2001-11-08 17:45 ` James Simmons
2001-11-08 20:13 ` Ralf Baechle
2001-11-09 17:41 ` Ralf Baechle
1 sibling, 1 reply; 17+ messages in thread
From: James Simmons @ 2001-11-08 17:45 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips, ralf, linux-mips-kernel
Also I like to see away to pass in a base offset. I have a mips device
which has a i8259 chip but its io is offseted by 0xb0000000.
On Thu, 8 Nov 2001, Atsushi Nemoto wrote:
> arch/mips/kernel/i8259.c seems not working in big endian.
>
> Here is a patch to fix this.
>
> --- linux-sgi-cvs/arch/mips/kernel/i8259.c Mon Sep 10 02:43:01 2001
> +++ linux.new/arch/mips/kernel/i8259.c Thu Nov 8 15:40:03 2001
> @@ -70,8 +70,13 @@
> static unsigned int cached_irq_mask = 0xffff;
>
> #define __byte(x,y) (((unsigned char *)&(y))[x])
> +#ifdef __BIG_ENDIAN
> +#define cached_21 (__byte(1,cached_irq_mask))
> +#define cached_A1 (__byte(0,cached_irq_mask))
> +#else
> #define cached_21 (__byte(0,cached_irq_mask))
> #define cached_A1 (__byte(1,cached_irq_mask))
> +#endif
>
> void disable_8259A_irq(unsigned int irq)
> {
> ---
> Atsushi Nemoto
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: i8259.c in big endian
2001-11-08 17:45 ` James Simmons
@ 2001-11-08 20:13 ` Ralf Baechle
2001-11-08 20:20 ` James Simmons
0 siblings, 1 reply; 17+ messages in thread
From: Ralf Baechle @ 2001-11-08 20:13 UTC (permalink / raw)
To: James Simmons; +Cc: Atsushi Nemoto, linux-mips, linux-mips-kernel
On Thu, Nov 08, 2001 at 09:45:02AM -0800, James Simmons wrote:
> Also I like to see away to pass in a base offset. I have a mips device
> which has a i8259 chip but its io is offseted by 0xb0000000.
Then it's almost certainly an legacy ISA device with it's ports in ISA space,
so set mips_io_port_base to an apropriate value or does that not work for
you?
Ralf
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: i8259.c in big endian
2001-11-08 20:13 ` Ralf Baechle
@ 2001-11-08 20:20 ` James Simmons
2001-11-08 20:41 ` Ralf Baechle
0 siblings, 1 reply; 17+ messages in thread
From: James Simmons @ 2001-11-08 20:20 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Atsushi Nemoto, linux-mips, linux-mips-kernel
> > Also I like to see away to pass in a base offset. I have a mips device
> > which has a i8259 chip but its io is offseted by 0xb0000000.
>
> Then it's almost certainly an legacy ISA device with it's ports in ISA space,
> so set mips_io_port_base to an apropriate value or does that not work for
> you?
The mips_io_port_base is 0xa0000000. Whereas the i8259 chip is at
0xb0000000. The 0xa000000 value could be wrong. I will give it a try.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: i8259.c in big endian
2001-11-08 20:20 ` James Simmons
@ 2001-11-08 20:41 ` Ralf Baechle
2001-11-08 21:37 ` James Simmons
0 siblings, 1 reply; 17+ messages in thread
From: Ralf Baechle @ 2001-11-08 20:41 UTC (permalink / raw)
To: James Simmons; +Cc: Atsushi Nemoto, linux-mips, linux-mips-kernel
On Thu, Nov 08, 2001 at 12:20:20PM -0800, James Simmons wrote:
> > > which has a i8259 chip but its io is offseted by 0xb0000000.
> >
> > Then it's almost certainly an legacy ISA device with it's ports in ISA space,
> > so set mips_io_port_base to an apropriate value or does that not work for
> > you?
>
> The mips_io_port_base is 0xa0000000. Whereas the i8259 chip is at
> 0xb0000000. The 0xa000000 value could be wrong. I will give it a try.
As your board must have RAM at physical address zero 0xa0000000 is almost
certainly a wrong value.
Ralf
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: i8259.c in big endian
2001-11-08 20:41 ` Ralf Baechle
@ 2001-11-08 21:37 ` James Simmons
2001-11-08 21:53 ` [Linux-mips-kernel]Re: " James Simmons
0 siblings, 1 reply; 17+ messages in thread
From: James Simmons @ 2001-11-08 21:37 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Atsushi Nemoto, linux-mips, linux-mips-kernel
> > The mips_io_port_base is 0xa0000000. Whereas the i8259 chip is at
> > 0xb0000000. The 0xa000000 value could be wrong. I will give it a try.
>
> As your board must have RAM at physical address zero 0xa0000000 is almost
> certainly a wrong value.
Your right. The address of 0xb000000 is bogus. This is the value from the
old code. I will migrate the code over to the i8259.c stuff now. Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-08 21:37 ` James Simmons
@ 2001-11-08 21:53 ` James Simmons
2001-11-09 18:30 ` Jun Sun
0 siblings, 1 reply; 17+ messages in thread
From: James Simmons @ 2001-11-08 21:53 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Atsushi Nemoto, linux-mips, linux-mips-kernel
> > > The mips_io_port_base is 0xa0000000. Whereas the i8259 chip is at
> > > 0xb0000000. The 0xa000000 value could be wrong. I will give it a try.
> >
> > As your board must have RAM at physical address zero 0xa0000000 is almost
> > certainly a wrong value.
>
> Your right. The address of 0xb000000 is bogus. This is the value from the
> old code. I will migrate the code over to the i8259.c stuff now. Thanks.
Actually looking threw other mips branches now I see what the 0xb000000
is. It is the isa_port_base.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-08 21:53 ` [Linux-mips-kernel]Re: " James Simmons
@ 2001-11-09 18:30 ` Jun Sun
2001-11-09 18:44 ` James Simmons
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Jun Sun @ 2001-11-09 18:30 UTC (permalink / raw)
To: James Simmons; +Cc: Ralf Baechle, Atsushi Nemoto, linux-mips, linux-mips-kernel
James Simmons wrote:
>
> > > > The mips_io_port_base is 0xa0000000. Whereas the i8259 chip is at
> > > > 0xb0000000. The 0xa000000 value could be wrong. I will give it a try.
> > >
> > > As your board must have RAM at physical address zero 0xa0000000 is almost
> > > certainly a wrong value.
> >
> > Your right. The address of 0xb000000 is bogus. This is the value from the
> > old code. I will migrate the code over to the i8259.c stuff now. Thanks.
>
> Actually looking threw other mips branches now I see what the 0xb000000
> is. It is the isa_port_base.
>
You are probably referring to isa_slot_offset?
isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
send him a patch to get rid of it (as if he can't do it himself :-0) ?
Jun
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-09 18:30 ` Jun Sun
@ 2001-11-09 18:44 ` James Simmons
2001-11-09 19:44 ` Jim Paris
2001-11-12 12:15 ` Ralf Baechle
2 siblings, 0 replies; 17+ messages in thread
From: James Simmons @ 2001-11-09 18:44 UTC (permalink / raw)
To: Jun Sun; +Cc: Ralf Baechle, Atsushi Nemoto, linux-mips, linux-mips-kernel
> You are probably referring to isa_slot_offset?
Yes. I meant isa_slot_offset.
> isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> send him a patch to get rid of it (as if he can't do it himself :-0) ?
Oh.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-09 18:30 ` Jun Sun
2001-11-09 18:44 ` James Simmons
@ 2001-11-09 19:44 ` Jim Paris
2001-11-09 20:50 ` Jun Sun
2001-11-12 12:15 ` Ralf Baechle
2 siblings, 1 reply; 17+ messages in thread
From: Jim Paris @ 2001-11-09 19:44 UTC (permalink / raw)
To: Jun Sun
Cc: James Simmons, Ralf Baechle, Atsushi Nemoto, linux-mips,
linux-mips-kernel
> You are probably referring to isa_slot_offset?
>
> isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> send him a patch to get rid of it (as if he can't do it himself :-0) ?
How should it be properly done?
-jim
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-09 19:44 ` Jim Paris
@ 2001-11-09 20:50 ` Jun Sun
0 siblings, 0 replies; 17+ messages in thread
From: Jun Sun @ 2001-11-09 20:50 UTC (permalink / raw)
To: jim
Cc: James Simmons, Ralf Baechle, Atsushi Nemoto, linux-mips,
linux-mips-kernel
Jim Paris wrote:
>
> > You are probably referring to isa_slot_offset?
> >
> > isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> > send him a patch to get rid of it (as if he can't do it himself :-0) ?
>
> How should it be properly done?
>
Use an ax!
Jun
P.S., I meant "just delete it wherever it appears."
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-09 18:30 ` Jun Sun
2001-11-09 18:44 ` James Simmons
2001-11-09 19:44 ` Jim Paris
@ 2001-11-12 12:15 ` Ralf Baechle
2001-11-12 18:31 ` Jun Sun
2001-11-12 21:49 ` James Simmons
2 siblings, 2 replies; 17+ messages in thread
From: Ralf Baechle @ 2001-11-12 12:15 UTC (permalink / raw)
To: Jun Sun; +Cc: James Simmons, Atsushi Nemoto, linux-mips, linux-mips-kernel
On Fri, Nov 09, 2001 at 10:30:45AM -0800, Jun Sun wrote:
> isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> send him a patch to get rid of it (as if he can't do it himself :-0) ?
Nope. Somebody could fix isa_{read,write}[bwl] to use isa_slot_offset.
Right now all the ISA functions are broken. So in case you're ISA drivers
seem to work that's the proof that they're broken *evil grin* :-)
Ralf
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-12 12:15 ` Ralf Baechle
@ 2001-11-12 18:31 ` Jun Sun
2001-11-12 19:56 ` Florian Laws
2001-11-12 23:56 ` Ralf Baechle
2001-11-12 21:49 ` James Simmons
1 sibling, 2 replies; 17+ messages in thread
From: Jun Sun @ 2001-11-12 18:31 UTC (permalink / raw)
To: Ralf Baechle; +Cc: James Simmons, Atsushi Nemoto, linux-mips, linux-mips-kernel
Ralf Baechle wrote:
>
> On Fri, Nov 09, 2001 at 10:30:45AM -0800, Jun Sun wrote:
>
> > isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> > send him a patch to get rid of it (as if he can't do it himself :-0) ?
>
> Nope. Somebody could fix isa_{read,write}[bwl] to use isa_slot_offset.
> Right now all the ISA functions are broken. So in case you're ISA drivers
> seem to work that's the proof that they're broken *evil grin* :-)
I doubt if there is any MIPS machine using standard PC ISA bus that is *not*
on a PCI bus ...
Jun
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-12 18:31 ` Jun Sun
@ 2001-11-12 19:56 ` Florian Laws
2001-11-12 23:56 ` Ralf Baechle
1 sibling, 0 replies; 17+ messages in thread
From: Florian Laws @ 2001-11-12 19:56 UTC (permalink / raw)
To: Jun Sun; +Cc: linux-mips, linux-mips-kernel
On Mon, Nov 12, 2001 at 10:31:54AM -0800, Jun Sun wrote:
> Ralf Baechle wrote:
> >
> > On Fri, Nov 09, 2001 at 10:30:45AM -0800, Jun Sun wrote:
> >
> > > isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> > > send him a patch to get rid of it (as if he can't do it himself :-0) ?
> >
> > Nope. Somebody could fix isa_{read,write}[bwl] to use isa_slot_offset.
> > Right now all the ISA functions are broken. So in case you're ISA drivers
> > seem to work that's the proof that they're broken *evil grin* :-)
>
> I doubt if there is any MIPS machine using standard PC ISA bus that is *not*
> on a PCI bus ...
FWIW, there is.
There are some old Siemens RM400 models (1989 vintage) with R3000 CPU and ISA
bus.
Pretty unlikely that they'll be supportet any time, though... :-(
Florian
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-12 18:31 ` Jun Sun
2001-11-12 19:56 ` Florian Laws
@ 2001-11-12 23:56 ` Ralf Baechle
1 sibling, 0 replies; 17+ messages in thread
From: Ralf Baechle @ 2001-11-12 23:56 UTC (permalink / raw)
To: Jun Sun; +Cc: James Simmons, Atsushi Nemoto, linux-mips, linux-mips-kernel
On Mon, Nov 12, 2001 at 10:31:54AM -0800, Jun Sun wrote:
> > > isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> > > send him a patch to get rid of it (as if he can't do it himself :-0) ?
> >
> > Nope. Somebody could fix isa_{read,write}[bwl] to use isa_slot_offset.
> > Right now all the ISA functions are broken. So in case you're ISA drivers
> > seem to work that's the proof that they're broken *evil grin* :-)
>
> I doubt if there is any MIPS machine using standard PC ISA bus that is *not*
> on a PCI bus ...
Many more than you'd ever want to support :-( And yes, EISA and VLB bus
also. I even heared the rumour about SBUS in MIPS machines.
Ralf
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Linux-mips-kernel]Re: i8259.c in big endian
2001-11-12 12:15 ` Ralf Baechle
2001-11-12 18:31 ` Jun Sun
@ 2001-11-12 21:49 ` James Simmons
1 sibling, 0 replies; 17+ messages in thread
From: James Simmons @ 2001-11-12 21:49 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Jun Sun, Atsushi Nemoto, linux-mips, linux-mips-kernel
> > isa_slot_offset is an obselete garbage. Can someone do Ralf's a favor and
> > send him a patch to get rid of it (as if he can't do it himself :-0) ?
>
> Nope. Somebody could fix isa_{read,write}[bwl] to use isa_slot_offset.
> Right now all the ISA functions are broken. So in case you're ISA drivers
> seem to work that's the proof that they're broken *evil grin* :-)
I see you fixed this. Thank you :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: i8259.c in big endian
2001-11-08 6:47 i8259.c in big endian Atsushi Nemoto
2001-11-08 17:45 ` James Simmons
@ 2001-11-09 17:41 ` Ralf Baechle
1 sibling, 0 replies; 17+ messages in thread
From: Ralf Baechle @ 2001-11-09 17:41 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Thu, Nov 08, 2001 at 03:47:02PM +0900, Atsushi Nemoto wrote:
> Date: Thu, 08 Nov 2001 15:47:02 +0900 (JST)
> To: linux-mips@oss.sgi.com
> Cc: ralf@oss.sgi.com
> Subject: i8259.c in big endian
> From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
>
> arch/mips/kernel/i8259.c seems not working in big endian.
Below the fix I'm going to checkin. Highly untested as I'm sitting in a
plase 800km northeast of New Zealand :-)
Ralf
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2001-11-13 5:18 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-08 6:47 i8259.c in big endian Atsushi Nemoto
2001-11-08 17:45 ` James Simmons
2001-11-08 20:13 ` Ralf Baechle
2001-11-08 20:20 ` James Simmons
2001-11-08 20:41 ` Ralf Baechle
2001-11-08 21:37 ` James Simmons
2001-11-08 21:53 ` [Linux-mips-kernel]Re: " James Simmons
2001-11-09 18:30 ` Jun Sun
2001-11-09 18:44 ` James Simmons
2001-11-09 19:44 ` Jim Paris
2001-11-09 20:50 ` Jun Sun
2001-11-12 12:15 ` Ralf Baechle
2001-11-12 18:31 ` Jun Sun
2001-11-12 19:56 ` Florian Laws
2001-11-12 23:56 ` Ralf Baechle
2001-11-12 21:49 ` James Simmons
2001-11-09 17:41 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox