Re: Driver for tightly coupled memory

From: Ben Nizette
Date: Tue Sep 16 2008 - 18:27:20 EST



On Tue, 2008-09-16 at 10:39 -0700, Alessio Sangalli wrote:
> Ben Dooks wrote:
> > IIRC, there's no current support for using TCMs.
>
> I think I will write a module that implements a software FIFO. One
> function to allocate a FIFO n words deep, a "push" and a "pop" and
> similar. The calling module will have to setup the FIFO and use it
> probably in ISRs or similar (the policy will totally remain in the
> caller module). Any comments on such approach?

I'd feel uncomfortable about picking an arbitrary function for the TCM
to accomplish. Why don't you just set up a genalloc on that RAM and let
the user use it for what they will?

If a driver needs a quick FIFO it can attempt to get the RAM for said
FIFO from the genalloc and fall back to main memory otherwise. Simple,
flexible, easy :-)

--Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/