Hi Dave,

Please clarify my questions/understanding written inline.

Thanks,
-Prabhu


On Wed, Oct 13, 2010 at 7:34 AM, Dave Hylands <[email protected]> wrote:

> Hi Sri,
>
> On Tue, Oct 12, 2010 at 6:29 PM, Sri Ram Vemulpali
> <[email protected]> wrote:
> > Hi Dave,
> >
> >  Thanks for explanation.
> >
> >   So in your explanation you mentioned bus arbiter. So, bus does have
> > controller, which arbitrates between various devices. But CPU is given
> > higher priority than any other device.
> >
> > DMA uses bus only when CPU is not using it, in other words DMA is not
> > given access to bus. UART's are worked through CPU. So they no need to
> > wait for I/O operations.
> >
> > In other words bus is contended for among various devices. Can you
> > please provide more distinct explanation, between UARTs and DMA
> > contention for bus. Thanks in advance.
>
> UARTs don't access the memory bus. Your driver accesses the UART
> registers and puts characters in the FIFO. The UART takes the data
> from the FIFO and puts them on the serial lines. No memory access
> required (by the UART). Of course the CPU had to read the characters
> from memory and put them into the UART, but that was the CPU accessing
> the memory bus, not the UART.
>

I feel memory bus you are referring is system bus. In that case, plz clarify
the following.
CPU sending data to the UART registers/FIFO should be through the system
bus, right?
In that case UART device should be sitting on the system bus.
On the return path, if there is data coming from the serial line, it will
fill or half fill the FIFO based on the configuration, then the CPU has to
read data from the FIFO of UART. This data has to be sent through the system
bus.
If all what I said is right, then UART should be accessing system/memory
bus.


> If you're DMA'ing from a peripheral into memory, then the DMA engine
> needs to access the memory bus. The CPU also accesses the memory bus
> whenever a cache miss occurs, or uncached accesses occur to memory. If
> the DMA and CPU both try to access the memory bus at the same time,
> then the bus arbiter decides who gets to go first.
>
> If you DMA from one peripheral to another peripheral, then no memory
> accesses are required by DMA.
>
> On the other hand, if you DMA from one memory region to another memory
> region, then 2 memory accesses are required by the DMA engine for each
> word transferred.
>
> You can think of DMA as a very specialized type of CPU that can read
> and write blocks of memory, and it executes at the same time as the
> real CPU.
>
> As a more concrete example, let's consider the TI OMAP 3530. Here's a
> datasheet.
> <http://focus.ti.com/lit/ds/symlink/omap3530.pdf>
>
> Take a look at the diagram on page 7 (Figure 1-1).
>
> You can see the processor on the top (labelled MPU Subsystem ARM
> Cortex A8) and you can also see the "External and Stacked Memories" on
> the bottom.
>
> Basically each block on the diagram that has an arrow going from the
> block to the bus can access the memory directly. DMA and the CPU are
> just a couple of the many components which can access memory. In this
> particular chip the UART actually sits on a sub-bus, and can't get
> access to main memory.
>
> Generally speaking, each block on the diagram will have a clock, and
> will execute in parallel with the CPU (which is just one of many
> blocks).
>
> --
> Dave Hylands
> Shuswap, BC, Canada
> http://www.DaveHylands.com/
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

Reply via email to