Chapter 8.  Serial Drivers

Table of Contents

Introduction
Principles of Operation
SPI Serial Driver
qcaspi_spi_thread
qcaspi_qca7k_sync
Register Functions
qcaspi_read_register
qcaspi_write_register
qcaspi_tx_cmd
Interrupt Functions
disable_spi_interrupts
enable_spi_interrupts
qcaspi_intr_handler
Transmit Functions
qcaspi_transmit
qcaspi_tx_frame
qcaspi_flush_txq
Receive Functions
qcaspi_receive
DMA Functions
qcaspi_dma_read_burst
qcaspi_dma_read_legacy
qcaspi_dma_write_burst
qcaspi_dma_write_legacy
Support Functions
QcaFrmCreateHeader
QcaFrmCreateFooter
QcaFrmFsmInit
QcaFrmFsmDecode
Kernel Functions
qcaspi_netdev_xmit
qcaspi_netdev_tx_timeout
qcaspi_netdev_uninit
qcaspi_netdev_get_stats
qcaspi_netdev_change_mtu
qcaspi_netdev_set_mac_address
qcaspi_netdev_close
qcaspi_mod_exit

Introduction

Most Qualcomm Atheros PLC chipsets are Ethernet-to-Powerline bridges but the QCA7000 is a Serial-to-Powerline bridge, ... with a big difference. The QCA7000 expects the host serial stream to be segmented into Ethernet frames where each frame is encapsulated by a distinct serial header and trailer. This means the host can format and transmit, or receive and decode, standard Ethernet 802.3 frames over an ordinary SPI or UART interface thereby enabling full Ethernet or Internet protocol communications over powerline at low cost and low speed. The enabling component here is an Ethernet-to-Serial driver that supports the SPI or UART interface connected to the QCA7000. This section covers such a driver.

The example driver described here was written for the Freescale iMX28 board support package running a custom Freescale Linux distribution. As such, we believe that this driver is suitable for the iMX28 processor out of the box but it could be adapted to other processors.