* 8600 serial support
@ 2008-10-08 19:51 Kevin Diggs
2008-10-08 20:45 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Diggs @ 2008-10-08 19:51 UTC (permalink / raw)
To: linuxppc-dev
Hi,
I thought I might take a whack at fixing the 2.6 serial driver
for my 8600. At the top of pmac_zilog.c (2.6.26) there is a todo for DMA.
A quick glance at macserial.c (2.4.31) suggests it has dbdma support for
receive. Anyone know of any pitfalls for adding dbdma support for
pmac_zilog.c?
kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 8600 serial support
2008-10-08 19:51 8600 serial support Kevin Diggs
@ 2008-10-08 20:45 ` Benjamin Herrenschmidt
2008-10-08 23:50 ` Brad Boyer
2008-10-09 1:40 ` Kevin Diggs
0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2008-10-08 20:45 UTC (permalink / raw)
To: Kevin Diggs; +Cc: linuxppc-dev
On Wed, 2008-10-08 at 12:51 -0700, Kevin Diggs wrote:
> Hi,
>
> I thought I might take a whack at fixing the 2.6 serial driver
> for my 8600. At the top of pmac_zilog.c (2.6.26) there is a todo for DMA.
> A quick glance at macserial.c (2.4.31) suggests it has dbdma support for
> receive. Anyone know of any pitfalls for adding dbdma support for
> pmac_zilog.c?
Yes, it's not totally trivial and I wouldn't recommend using the weirdo
code in macserial (it does things that I don't understand how they work
with the dbdma engine).
The best way I see is to start from scratch with two different
mechanisms:
- For Tx, that's the easiest, the fire off DMA's for outgoing chars,
maybe queue up a few descriptors to let data accumulate.
- For Rx, one descriptor per byte. That sucks but I think that's also
what Apple does. No need to have a huge Rx buffer anyway. That gives you
precise Rx status to the byte.
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 8600 serial support
2008-10-08 20:45 ` Benjamin Herrenschmidt
@ 2008-10-08 23:50 ` Brad Boyer
2008-10-09 1:40 ` Kevin Diggs
1 sibling, 0 replies; 4+ messages in thread
From: Brad Boyer @ 2008-10-08 23:50 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Kevin Diggs
On Thu, Oct 09, 2008 at 07:45:11AM +1100, Benjamin Herrenschmidt wrote:
> Yes, it's not totally trivial and I wouldn't recommend using the weirdo
> code in macserial (it does things that I don't understand how they work
> with the dbdma engine).
>
> The best way I see is to start from scratch with two different
> mechanisms:
>
> - For Tx, that's the easiest, the fire off DMA's for outgoing chars,
> maybe queue up a few descriptors to let data accumulate.
>
> - For Rx, one descriptor per byte. That sucks but I think that's also
> what Apple does. No need to have a huge Rx buffer anyway. That gives you
> precise Rx status to the byte.
I know it's not really in the scope of the discussion, but do you have
any suggestions for how we might support this with AMIC or PSC DMA where
we can't have an arbitrary number of in-flight commands? There hasn't
been a lot of traction on getting the non-PCI macs working again, but
that is something that may happen eventually. It would be nice to have
similar designs for both the descriptor based and register driven DMA
engines, but I definitely understand if you think that's not realistic.
It seems to me that an interrupt per-byte (which this design would
imply on the older DMA engines) would make the DMA less useful.
Brad Boyer
flar@allandria.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 8600 serial support
2008-10-08 20:45 ` Benjamin Herrenschmidt
2008-10-08 23:50 ` Brad Boyer
@ 2008-10-09 1:40 ` Kevin Diggs
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Diggs @ 2008-10-09 1:40 UTC (permalink / raw)
Cc: linuxppc-dev
Benjamin Herrenschmidt wrote:
> On Wed, 2008-10-08 at 12:51 -0700, Kevin Diggs wrote:
>
>>Hi,
>>
>> I thought I might take a whack at fixing the 2.6 serial driver
>>for my 8600. At the top of pmac_zilog.c (2.6.26) there is a todo for DMA.
>>A quick glance at macserial.c (2.4.31) suggests it has dbdma support for
>>receive. Anyone know of any pitfalls for adding dbdma support for
>>pmac_zilog.c?
>
>
> Yes, it's not totally trivial and I wouldn't recommend using the weirdo
> code in macserial (it does things that I don't understand how they work
> with the dbdma engine).
>
> The best way I see is to start from scratch with two different
> mechanisms:
>
> - For Tx, that's the easiest, the fire off DMA's for outgoing chars,
> maybe queue up a few descriptors to let data accumulate.
>
> - For Rx, one descriptor per byte. That sucks but I think that's also
> what Apple does. No need to have a huge Rx buffer anyway. That gives you
> precise Rx status to the byte.
>
> Ben.
>
>
Does the 8530 (as implemented in the PowerMac ASICs) have a receive
buffer like the 16550? Any pointers to some "good" dbdma example code?
Anyone know where one might find some 8530 docs?
This driver "should" work for ppp without receive dma, right?
One descriptor per byte???
kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-09 1:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08 19:51 8600 serial support Kevin Diggs
2008-10-08 20:45 ` Benjamin Herrenschmidt
2008-10-08 23:50 ` Brad Boyer
2008-10-09 1:40 ` Kevin Diggs
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).