linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] BestComm : better late than never heh ;)
@ 2007-05-12 20:31 Sylvain Munaut
  2007-05-12 20:31 ` [PATCH 1/9] powerpc: exports rheap symbol to modules Sylvain Munaut
  0 siblings, 1 reply; 24+ messages in thread
From: Sylvain Munaut @ 2007-05-12 20:31 UTC (permalink / raw)
  To: Linux PPC dev ML

Hi everyone,

Here we go : This series adds support for the BestComm engine
found on the 5200 CPUs. This is _long_ overdue, I admit it ...
but better late than never ;)

For the little story, Freescale does provide an API that is
just ugly. A long time ago, Dale Farnsworth proposed a new API.
It was a lot better but some things were still not right, some
time after that Andrey Volkov & myself did some rework but still
not enough and with the switch to arch/powerpc there was new stuff
to be done ... Finally, I decided to give it a last go and here
we are ...

A few words about theses patches : The first 3 are just preliminary
stuff, then comes the core, followed by 3 tasks and finally two
drivers. The drivers are not ready for upstream, they are just
here so that people can test that it _does_ work.

About the API itself :

 The API divides the work in three layers, trying to keep them as
 separate as possible :

  1) Core : This is the grunt work, setting up tasks and global 
            config. It also provides useful helpers for the other
            layers and debug help.
            
     This is mainly bestcomm.c bestcomm.h bestcomm_priv.h sram.{c,h}

  2) Task support : Each task may have a different way to configure
     it's buffer ring or other details. We hide the details of it
     in theses. The code in this "layer" has knowelge of bestcomm
     internals and can include "bestcomm_priv.h". The microcode
     files are mostly automatically extracted from the dma_image.hex
     image provided by freescale.

     For the ata task: ata.h ata.c bcom_ata_task.c
     For the fec task: fec.h fec.c bcom_fec_rx_task.c bcom_fec_tx_task.c
     For the genbd task: gen_bd.h gen_bd.c bcom_gen_bd_rx_task.c bcom_gen_bd_tx_task.c

  3) Driver: Inside the driver, the knowelge of bestcomm internals
     is minimal. You just need to call the task support code to get
     your 'dma object' and then if the task is buffer descriptor based,
     you cal use the helper function to submit / retrieve bd.

I personnaly like this division because that hides microcode details
from the driver and keeps it separate. It also keeps a lot of code
common, independant of the _precise_ buffer descriptor format. They
all have a status word followed by some address (the exact number depends
of the task ...)

About some details of 'form':

  - 'bcom_' sounded like a good prefix. sdma_ was used else where for
     another dma engine.
  - arch/powerpc/sysdev/bestcomm sounded like a good place to put this.

Final note :

 Is the API perfect ? probably not, but I think it's pretty good.
 And I hope you'll like it because I don't really feel like starting
 from scratch again ... ;)

 The two things that I know I need to find a solution to are :
  - Initiator priority shouldn't be fixed. The user should be able
    to provide it's own in the DT. (if none is found, just fall back
    to the default one)
  - The link from device -> initiator number is ... not easy to make.
    Currently it's fixed (only one FEC so if someone wants the fec
    task that must be the FEC driver ...)


        Sylvain

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-05-15 22:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-12 20:31 [PATCH 0/9] BestComm : better late than never heh ;) Sylvain Munaut
2007-05-12 20:31 ` [PATCH 1/9] powerpc: exports rheap symbol to modules Sylvain Munaut
2007-05-12 20:31   ` [PATCH 2/9] powerpc: Changes the config mechanism for rheap Sylvain Munaut
2007-05-12 20:31     ` [PATCH 3/9] powerpc/ppc32: Update mpc52xx_psc structure with B revision changes Sylvain Munaut
2007-05-12 20:31       ` [PATCH 4/9] powerpc: BestComm core support for Freescale MPC5200 Sylvain Munaut
2007-05-12 20:31         ` [PATCH 5/9] powerpc: BestcComm ATA task support Sylvain Munaut
2007-05-12 20:31           ` [PATCH 6/9] powerpc: BestcComm FEC " Sylvain Munaut
2007-05-12 20:31             ` [PATCH 7/9] powerpc: BestcComm GenBD " Sylvain Munaut
2007-05-12 20:31               ` [PATCH 8/9] drivers/net: Add support for Freescale MPC5200 SoC internal FEC Sylvain Munaut
2007-05-12 20:31                 ` [PATCH 9/9] sound: Add support for Freescale MPC5200 AC97 interface Sylvain Munaut
2007-05-12 23:30           ` [PATCH 5/9] powerpc: BestcComm ATA task support Arnd Bergmann
2007-05-12 23:27         ` [PATCH 4/9] powerpc: BestComm core support for Freescale MPC5200 Arnd Bergmann
2007-05-12 23:49           ` Sylvain Munaut
2007-05-13  0:24             ` Arnd Bergmann
2007-05-13  7:17               ` Sylvain Munaut
2007-05-13 23:29                 ` Matt Sealey
2007-05-14  5:15                   ` Sylvain Munaut
2007-05-13  3:36             ` Dale Farnsworth
2007-05-15 21:37         ` Kumar Gala
2007-05-15 22:27           ` Sylvain Munaut
2007-05-13 23:46       ` [PATCH 3/9] powerpc/ppc32: Update mpc52xx_psc structure with B revision changes Matt Sealey
2007-05-14  5:27         ` Sylvain Munaut
2007-05-15 10:59           ` Raquel Velasco and Bill Buck
2007-05-15 21:20     ` [PATCH 2/9] powerpc: Changes the config mechanism for rheap Kumar Gala

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).