* sound runs double speed on rs6k
@ 2001-07-24 8:51 Sven Dickert
2001-07-25 19:42 ` 601 BAT's Hollis Blanchard
0 siblings, 1 reply; 3+ messages in thread
From: Sven Dickert @ 2001-07-24 8:51 UTC (permalink / raw)
To: linuxppc-dev
Hi,
I try to set up a working kernel on the following machine:
IBM RS/6000 7020-001 also named 40P, seems to be compatible to
IBM PowerSeries 6015 also named PPS400. The machine is one-on-one
completely PreP as mentioned in
ftp://ftp.austin.ibm.com/pub/technology/spec/srp1_10?.ps.Z
I think the 40P was some sort of reference implentation of the
PreP standard. The machine boots 2.4.6. with some modifications:
http://www.remote.org/sven/ppc/40p.patch
At the moment I'm working on sound support. I changed
-#define CAROLINA_IRQ_EDGE_MASK_HI 0xA4 /* IRQ's 8-15 [10,13,15] */
+#define CAROLINA_IRQ_EDGE_MASK_HI 0xA0 /* IRQ's 8-15 [10,13,15] */
in arch/ppc/kernel/prep_pci.c
I found this 'patch' at http://penguinppc.org/dev/prep/tp850.diff
Now the system is not longer 'hanging' in userspace when I cat a .au file
to /dev/audio, instead sound is played at external speakers. But it is
played at _double_ speed. I've never listened to U2 as fast as
Michael Schuhmacher drives cars :)
I can patch ad1848_set_speed in drivers/sound/ad1848.c to set
22050 instead of 44100 when speed of audio-device is choosen, but this
seems to be a poor hack, not solving the real problem.
There is strange thing, that cat /proc/pci shows me a second device
at irq 10, same irq cs4231 uses.
Have you any idea, knowledge about timers, bus speed or something that
I can change to get a slower sound?
Thank you for your attention, Sven
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 601 BAT's
2001-07-24 8:51 sound runs double speed on rs6k Sven Dickert
@ 2001-07-25 19:42 ` Hollis Blanchard
2001-07-26 8:18 ` CAROLINA_IRQ_EDGE_MASK_HI, Segment Register 8 instead of BATs on 601 Sven Dickert
0 siblings, 1 reply; 3+ messages in thread
From: Hollis Blanchard @ 2001-07-25 19:42 UTC (permalink / raw)
To: Sven Dickert; +Cc: linuxppc-dev
On Tue, Jul 24, 2001 at 10:51:14AM +0200, Sven Dickert wrote:
>
> At the moment I'm working on sound support. I changed
> -#define CAROLINA_IRQ_EDGE_MASK_HI 0xA4 /* IRQ's 8-15 [10,13,15] */
> +#define CAROLINA_IRQ_EDGE_MASK_HI 0xA0 /* IRQ's 8-15 [10,13,15] */
> in arch/ppc/kernel/prep_pci.c
> I found this 'patch' at http://penguinppc.org/dev/prep/tp850.diff
Neither the 40P nor the Thinkpad 850 are Carolina systems, so those constants
should remain how they are and new ones for other systems introduced. That
will mean slight changes to the IBM section of prep_route_pci_interrupts(),
but nothing major.
In your patch you're using a segment register because 601 BAT's are only 8MB
(and we need more for IO space). Someone suggested using ioremap in the driver
(the one causing the page fault), but I suspect the whole reason those BAT
regions are there is to support legacy IO and not have to get everything to
ioremap? Is there an equivalent to ioremap that allows the virtual address to
be specified (want to map 0x80000000 physical to 0x80000000 virtual [NOT
n+io_base] for IO ports)?
-Hollis
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* CAROLINA_IRQ_EDGE_MASK_HI, Segment Register 8 instead of BATs on 601
2001-07-25 19:42 ` 601 BAT's Hollis Blanchard
@ 2001-07-26 8:18 ` Sven Dickert
0 siblings, 0 replies; 3+ messages in thread
From: Sven Dickert @ 2001-07-26 8:18 UTC (permalink / raw)
To: linuxppc-dev
Hello,
> > At the moment I'm working on sound support. I changed
> > -#define CAROLINA_IRQ_EDGE_MASK_HI 0xA4 /* IRQ's 8-15 [10,13,15] */
> > +#define CAROLINA_IRQ_EDGE_MASK_HI 0xA0 /* IRQ's 8-15 [10,13,15] */
> > in arch/ppc/kernel/prep_pci.c
> > I found this 'patch' at http://penguinppc.org/dev/prep/tp850.diff
>
> Neither the 40P nor the Thinkpad 850 are Carolina systems, so those constants
> should remain how they are and new ones for other systems introduced. That
> will mean slight changes to the IBM section of prep_route_pci_interrupts(),
> but nothing major.
O.k. it's better done this way:
-------------------------------------------------- 8< ------------------------
diff -rwu linux-2.4.7/arch/ppc/kernel/prep_pci.c linux-2.4.7.40p/arch/ppc/kernel/prep_pci.c
--- linux-2.4.7/arch/ppc/kernel/prep_pci.c Wed Jul 4 18:11:52 2001
+++ linux-2.4.7.40p/arch/ppc/kernel/prep_pci.c Thu Jul 26 10:01:51 2001
@@ -564,6 +565,10 @@
*/
#define CAROLINA_IRQ_EDGE_MASK_LO 0x00 /* IRQ's 0-7 */
#define CAROLINA_IRQ_EDGE_MASK_HI 0xA4 /* IRQ's 8-15 [10,13,15] */
+#define IBM6015_IRQ_EDGE_MASK_LO 0x00 /* IRQ's 0-7 */
+#define IBM6015_IRQ_EDGE_MASK_HI 0xA0 /* IRQ's 8-15 [13,15] */
+#define NOBIS_IRQ_EDGE_MASK_LO 0x00 /* IRQ's 0-7 */
+#define NOBIS_IRQ_EDGE_MASK_HI 0xA0 /* IRQ's 8-15 [13,15] */
/*
* 8259 edge/level control definitions
@@ -839,6 +845,7 @@
} else if ( _prep_type == _PREP_IBM )
{
unsigned char pl_id;
+ unsigned char irq_edge_mask_lo,irq_edge_mask_hi;
/*
* my carolina is 0xf0
* 6015 has 0xfc
@@ -851,27 +858,33 @@
Motherboard_map_name = "IBM 850/860 Portable\n";
Motherboard_map = Nobis_pci_IRQ_map;
Motherboard_routes = Nobis_pci_IRQ_routes;
+ irq_edge_mask_lo=NOBIS_IRQ_EDGE_MASK_LO;
+ irq_edge_mask_hi=NOBIS_IRQ_EDGE_MASK_HI;
break;
case 0xfc:
- Motherboard_map_name = "IBM 6015";
+ Motherboard_map_name = "IBM 6015/7020 (Sandalfoot/Sandalbow)";
Motherboard_map = ibm6015_pci_IRQ_map;
Motherboard_routes = ibm6015_pci_IRQ_routes;
+ irq_edge_mask_lo=IBM6015_IRQ_EDGE_MASK_LO;
+ irq_edge_mask_hi=IBM6015_IRQ_EDGE_MASK_HI;
break;
default:
Motherboard_map_name = "IBM 8xx (Carolina)";
Motherboard_map = ibm8xx_pci_IRQ_map;
Motherboard_routes = ibm8xx_pci_IRQ_routes;
+ irq_edge_mask_lo=CAROLINA_IRQ_EDGE_MASK_LO;
+ irq_edge_mask_hi=CAROLINA_IRQ_EDGE_MASK_HI;
break;
}
/*printk("Changing IRQ mode\n");*/
pl_id=inb(0x04d0);
/*printk("Low mask is %#0x\n", pl_id);*/
- outb(pl_id|CAROLINA_IRQ_EDGE_MASK_LO, 0x04d0);
+ outb(pl_id|irq_edge_mask_lo, 0x04d0);
pl_id=inb(0x04d1);
/*printk("Hi mask is %#0x\n", pl_id);*/
- outb(pl_id|CAROLINA_IRQ_EDGE_MASK_HI, 0x04d1);
+ outb(pl_id|irq_edge_mask_hi, 0x04d1);
pl_id=inb(0x04d1);
/*printk("Hi mask now %#0x\n", pl_id);*/
}
-------------------------------------------------- 8< ------------------------
> In your patch you're using a segment register because 601 BAT's are only 8MB
> (and we need more for IO space). Someone suggested using ioremap in the driver
> (the one causing the page fault), but I suspect the whole reason those BAT
> regions are there is to support legacy IO and not have to get everything to
> ioremap?
I think so, too. It's not just one driver that makes problems. Kernel
shows bad memory access even at "PCI: Probing PCI hardware"
> Is there an equivalent to ioremap that allows the virtual address to
> be specified (want to map 0x80000000 physical to 0x80000000 virtual [NOT
> n+io_base] for IO ports)?
When I get to know about this, I would no longer use SR8 :)
Bye, Sven
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-07-26 8:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-24 8:51 sound runs double speed on rs6k Sven Dickert
2001-07-25 19:42 ` 601 BAT's Hollis Blanchard
2001-07-26 8:18 ` CAROLINA_IRQ_EDGE_MASK_HI, Segment Register 8 instead of BATs on 601 Sven Dickert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).