MPC85XX LBC UPM
Marcel Moolenaar
xcllnt at mac.com
Mon Mar 9 10:09:38 PDT 2009
On Mar 9, 2009, at 9:07 AM, Aleksey V Fedorov wrote:
>
> Hi!
>
> Could somebody describe main idea of different LBC machines
> initialization? I see that only GPCM implemented and used now.
> I need UPM for CF ata disk. I can program UPM in particular
> device driver, but how to deal with LBC code in lbc.c? Which
> part of UPM programming and initialization must be done in LBC
> code and which part in particular driver code? What is the main
> concept?
Given that the GPCM, UPM and SDRAM modes cannot operate
concurrently (they share the same external pins), you
probably want the UPM programming to be done in the LBC
driver. There you can also deal with serialization.
With 8 possible devices, you can treat the LBC state
machines as a resource that you can allocate and
release. This can be done by adding a resource type:
SYS_RES_LBCSM /* LBC state machine. */
After you allocate a state machine you need to activate
it before you can use it. After use you deactivate the
resource. This facilitates serialization. It also helps
the LBC driver to setup whatever needs to be setup for
use by the corresponding state machine (i.e. for SDRAM
you want a particular I/O memory region to be enabled
and mapped so that you have direct-access to the SDRAM).
In order to do reads or writes, you may need to add a
special LBC interface (alongside the driver interface
or the bus interface) so that the driver can handshake
with the LBC about the transaction. This is to setup
DMA engines.
In any case: consider configurations that can actually
be tested and implement for that. Even if it's limited
in certain respects.
FYI,
--
Marcel Moolenaar
xcllnt at mac.com
More information about the freebsd-ppc
mailing list