Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
jornada720_ssp.c File Reference
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/jornada720.h>
#include <asm/hardware/ssp.h>

Go to the source code of this file.

Functions

u8 jornada_ssp_reverse (u8 byte)
 
 EXPORT_SYMBOL (jornada_ssp_reverse)
 
int jornada_ssp_byte (u8 byte)
 
 EXPORT_SYMBOL (jornada_ssp_byte)
 
int jornada_ssp_inout (u8 byte)
 
 EXPORT_SYMBOL (jornada_ssp_inout)
 
void jornada_ssp_start (void)
 
 EXPORT_SYMBOL (jornada_ssp_start)
 
void jornada_ssp_end (void)
 
 EXPORT_SYMBOL (jornada_ssp_end)
 
 module_init (jornada_ssp_init)
 

Variables

struct platform_driver jornadassp_driver
 

Function Documentation

EXPORT_SYMBOL ( jornada_ssp_reverse  )
EXPORT_SYMBOL ( jornada_ssp_byte  )
EXPORT_SYMBOL ( jornada_ssp_inout  )
EXPORT_SYMBOL ( jornada_ssp_start  )
EXPORT_SYMBOL ( jornada_ssp_end  )
int jornada_ssp_byte ( u8  byte)

jornada_ssp_byte - waits for ready ssp bus and sends byte

waits for fifo buffer to clear and then transmits, if it doesn't then we will timeout after <timeout> rounds. Needs mcu running before its called.

returns : mcu output on success : %-ETIMEDOUT on timeout

Definition at line 59 of file jornada720_ssp.c.

void jornada_ssp_end ( void  )

jornada_ssp_end - disable mcu and turn off lock

Definition at line 125 of file jornada720_ssp.c.

int jornada_ssp_inout ( u8  byte)

jornada_ssp_inout - decide if input is command or trading byte

returns : (jornada_ssp_byte(byte)) on success : %-ETIMEDOUT on timeout failure

Definition at line 87 of file jornada720_ssp.c.

u8 jornada_ssp_reverse ( u8  byte)
inline

jornada_ssp_reverse - reverses input byte

we need to reverse all data we receive from the mcu due to its physical location returns : 01110111 -> 11101110

Definition at line 36 of file jornada720_ssp.c.

void jornada_ssp_start ( void  )

jornada_ssp_start - enable mcu

Definition at line 112 of file jornada720_ssp.c.

module_init ( jornada_ssp_init  )

Variable Documentation

struct platform_driver jornadassp_driver
Initial value:
= {
.probe = jornada_ssp_probe,
.remove = jornada_ssp_remove,
.driver = {
.name = "jornada_ssp",
},
}

Definition at line 190 of file jornada720_ssp.c.