![Freescale Semiconductor i.MX 6DualLite Reference Manual Download Page 244](http://html1.mh-extra.com/html/freescale-semiconductor/i-mx-6duallite/i-mx-6duallite_reference-manual_2330523244.webp)
34.2.2 MLB Driver Architecture
The MLB driver is a common linux character driver and the architecture is shown in
figure below.
Figure 34-2. MLB Driver Architecture Diagram
The MLB driver creates two minor devices, one for control tx/rx channel and the other
for asynchronous. Their device files are /dev/ctrl and /dev/async. Each minor device has
the same interfaces, and handle both Tx and Rx operation. The following description is
for both control and asynchronous device.
The driver uses IRAM as MLB device module Tx/Rx buffer. All the data transmission
and reception between module and IRAM is handled by the MLB module DMA. The
driver is responsible for configuring the buffer start and end pointer for the MLB module.
For reception, the driver uses a ring buffer to buffer the received packet for read. When a
packet arrives, the MLB module puts the received packet into the IRAM Rx buffer, and
notifies the driver by interrupt. The driver then copy the packet from the IRAM to one
ring buffer node indicated by the write position, and updates the write position with the
next empty node. Finally the packet reader application is notified, and it gets one packet
from the node indicated by the read position of ring buffer. After the read completed, it
updates the read position with the next available buffer node. There is no received packet
in the ring buffer when the read and write position is the same.
MLB Driver
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
244
Freescale Semiconductor, Inc.