Terid i an Semiconductor Corpor ation makes no warrant y for the use of i ts pr oducts, other than expr essly
contained in the Company’s warranty detailed in the Teridian Semiconduct or C or poration standard Terms
and C onditi ons. The company assumes no r espon sibilit y for any er r or s which m ay appear in this
document, reserves the right to change devices or specifi cations detailed herein at any tim e without
notice and does not make any co mm i tment to update the information contained herein. Accordingly, the
reader is cautioned to veri fy that th i s document is curren t by compari ng it to th e l atest version on
http://w w w. teridian.com or by checking with your sales represen tative .
Terid i an Semiconductor Corp., 6440 Oak Canyon, Suite 100 , Irvine, C A 92618
TEL (714) 508-8800, FAX (714) 508-8877, http://www.teridian.com
2 Rev. 1.1
UG_1x22_054 73M1822/73M1922 Hardware Module for SMDK412 User Guide
4.11 Driver Source and Include Files...................................................................................... 31
4.12 Compile Time Configurable Parameter .......................................................................... 31
5 Related Documentation .......................................................................................................... 31
6 Contact Information ................................................................................................................ 31
Revision History ............................................................................................................................ 32
Figures
Figure 1: Driver Function al B lock Diag ram ............................................................................................... 6
Tables
Table 1: Driver Source Code Fil es ......................................................................................................... 31
4 Rev. 1.1
UG_1x22_054 73M1822/73M1922 Hardware Module for SMDK412 User Guide
1 Introduction
This document describes the capabilities of the 73M1822/73M1922 Hardware Module for the SMDK2412.
This driver software is provided for use and integration by Teridian customers on their individual
platforms.
Throughout this document the 73M1822/73M1922 Hardware Module for the SMDK2412 is simply ref er r ed
to as “driver” or “device driver”. The 73M1822 and 73M1922 is collectively re ferred to as the 73M1x22 or
the device.
1.1 Purpose and Scope
The 73M1822/73M1922 Hardware Module for the SM DK2412 provides the necessary system in terfaces
for the contr ol and management of t he 73M1x22. The driver supports calls from a user space application
or kern el mod ule and translates these to and from the device. The d r iver can be u sed as is, in whol e or i n
part , or cu stomize d to accommodate a custom er ’ s unique environmen t.
The scope of this document includes discussion of driver’ s arch i te ct ur e and de sign a nd interface to th e
user. The 73 M1 822/73M1922 Hardware M odule for the S M DK2412 is intended specific ally for the
Samsung S3C2412 processor on the SMDK2412 devel opment board and for the Linux
version 2.6.19 as customized by Samsung for t he aforementioned system. Layers above the reference
driver add r ess software interfaces wh ich may pre-exist for a gi ven ap plication and the layer below
add r esses hardware r elated interfaces betwe en the processor and the 73M1x22 device.
®
operating system
1.2 Conventions Used in this Guide
This document uses the following conventions:
• Software code, IO CTL names, modem event s, data types, and Linux comm ands are presented in
Couri er font .
1.3 Acronyms
MAFE – Modem Analog Front End
DAA – Data A ccess Arrangement
IOCTL – Linux I/O Control
ISR – Interrupt Service Routine
BSP – Board Support Package
Rev. 1.1 5
73M1822/73M1922 Hardware Module for SMDK412 User Gu ide UG_1x22_054
73M1x22
Device
&
External
Components
SCLK
73M1x22 Hardware Interface Module
Control
Module
System
BSP
Register Read/Write
Control & Status
FS
SDIN
SDOUT
Data
Module
DATA
DATA
DATA
DATA
DATA
CTL
DATA
CTL
DATA
CTL
DATA
CTL
CTL
CTL
CTL
CTL
DATA
DATA
DATA
DATA
CTL
CTL
CTL
CTL
Tx/Rx Data
Control & Status
State Machine
API
INT
MS
TYPE
2 Overview
2.1 Driver Arc hite cture
The driver provides a framework by which applications can leverage the features of the 73M1x22 device.
The mai n interface o f the d r i ver provides an abstraction layer for monitoring and cont r ol of the d evice
status. Figure 1 depi ct s the driver functio nal block diagram .
Figure 1: Driver Functional Block Diagram
2.2 Functio nal Overv ie w
The 73M1x22 driver is built as a Linux loadable module (for Linux) or integ r ated with the operating system
kernel. It is brought into operat ion by a user application or by an op er ating system start up script. For
Linux, the insmod command is used to inser t the d r iver into the ker nel. Th e insmod comm and invokes
the module_init() macro, which in turn runs the one-ti me init ializat i on function of th e driver. Before
exiti ng the initialization the driver enter s its main op er ational state via th e scheduling of one of many
timers that make u p the driver’s main processing.
This descripti on is valid for Linux 2.6. The driver take s the form of a Linux stand ar d character device
driver. It is brought into operation by a user application or by Linux startup script using the
insmod
command. Th i s command inser ts the driver module into the kernel which in turn registers with the kernel
usi ng the default major number of 250
Once instal led, the driver is a sel f-contained module running independent l y along wit h the ker nel
processes. Its main purp ose is to monitor and co ntrol the MAFE interface, transfer M AFE frames t o and
from t he 73M1x22 device and to provide access to the 73M1x22 device for management purpose s, via
standard driver access meth ods such as open, close, select, ioctl, etc. Th e following sections
provide an overview of that functionality.
6 Rev. 1.1
UG_1x22_054 73M1822/73M1922 Hardware Module for SMDK412 User Guide
Const char *
path
int
flags
int
3 Accessing the Driver from the Linux User Space
The dri ver provides the link b etween the modem device and the user application via a standard linux
character d evice. Access to th e driver is done via Linux supplied file descriptors The fol lowing sections
describe how the driver is brought into action based on the operating system environment.
3.1 mknod
The device descrip tors can be cr eated using the mknod command as il lustrated b elo w:
mknod -m 660 /dev/tsc_1x22_mafe_0 c 251 0
mknod -m 660 /de v/tsc_1x22_mafe_1 c 251 1
In this exam ple, one descriptor (tsc_1x22_ctl_mafe_0) is created with major number 251, m i nor
number 0, and one descriptor (tsc_1x22_ctl_mafe_l) is cr eated with maj or number 251, minor
number 1. The minor num ber associated with the fi l e descriptor i s unused by the driver in this
implementation.
3.2 open
Description
Once the dr iver is installed and the device descript or s are cre ated, the driver service can be accessed by
user applications via st andard C library
Prototype
open(), an d subsequently reversed with close()
int open (
const char * path,
int flags);
Parameters
Data T ype Name Description
Path to th e descriptor created b y mkn od.
O_RDWR.
Return Values
Data T ype Description
File descriptor.
Rev. 1.1 7
73M1822/73M1922 Hardware Module for SMDK412 User Gu ide UG_1x22_054
int
fd
int
fd
void *
buf
size_t
buf_size
size_t
3.3 close
Description
A file descriptor obtained with an open() com mand mu st be subsequently released with a correspond i ng
close..
Prototype
int close (in t fd);
Parameters
Data T ype Name Description
File descriptor to close.
Return Values
Data Type Description
int
0 = Success.
-1 = Failure.
3.4 read
Description
A file descriptor obtained with an open() com mand can be cal l ed with the standard Linux read comm and
to obtain MAFE audio samples. The read command reads as many 16 bit samples into the user supplied
bu ffer as possi ble and return the amount of data t hat was copied.
File descriptor.
Bu ffer to read samples into.
Maximum size of dat a that can be copied.
Return Values
Data T ype Description
Amount of data that was actually cop ied.
8 Rev. 1.1
UG_1x22_054 73M1822/73M1922 Hardware Module for SMDK412 User Guide
int
fd
Const void *
buf
size_t
buf_size
size_t
int
fd
int
request
…
args
int
3.5 write
Description
A file descriptor obtained with an open() com mand can be cal l ed with the standard Linux write command
to transmit MAFE audio samples. The write command copy as many 16 bit sam ples from th e user
supplied buffer as possible and r eturn the am ount of d ata that was copied.
Prototype
size_t wri te (in t fd, con st voi d * buf, size_t buf_s ize );
Parameters
Data Type Name Description
File descriptor.
Bu ffer to copy sampl es from.
Maximum size of dat a that can be copied.
Return Values
Data T ype Description
Amount of data that was actually cop ied.
3.6 ioctl
Description
A file descriptor obtained with an open() command can be called with the standard Linux ioctl
command to perform various tasks.
Prototype
int ioctl (in t fd, int reque st, … args);
Parameters
Data T ype Name Description
File descriptor.
Requested service.
Request depend ent arguments.
Return Values
Data T ype Description
Request depend ent return value.
The following section s describe th e detail of each IOCTL command.
Rev. 1.1 9
73M1822/73M1922 Hardware Module for SMDK412 User Gu ide UG_1x22_054
int
fd
int
TSC_1X22_MAFE_GET_RS232
void
NA
unsigned char
int
fd
int
TSC_1X22_MAFE_SET_RS232
unsigned char
RS232
unsigned char
TSC_1X22_MAFE_GET_RS232
3.6.1 TSC_1X22_MAFE_GET_RS232
Description
Retrieves the cur r ent statu s of t he RS232 RTS, DTS, CTR and DTR pins.
Prototype
int ioctl (
int fd,
int TSC_1X22_MAFE_GET_RS232,
void );
Parameters
Data T ype Name Description
Channel descriptor.
I/O control identifier for this operation.
Return Values
Data T ype Description
See RS232 #defines .
3.6.2 TSC_1X22_MAFE_SET_RS232
Description
Sets the current statu s of the RS 232 RTS, DTS, CTR and DTR pins and then returns the resulting status
via call to TSC_1X22_MAFE_GET_RS232.
Prototype
int ioctl (
int fd,
int TSC_1X22_MAFE_SET_RS232,
unsigned char RS232);
Parameters
Data T ype Name Description
Channel descriptor.
I/O control identifier for this operation.
Bit s to set. See RS23 2 #de fines .
Return Values
Data T ype Description
See
.
10 Rev. 1.1
Loading...
+ 21 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.