Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
fifo.c File Reference
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/scatterlist.h>
#include "common.h"
#include "pipe.h"

Go to the source code of this file.

Macros

#define usbhsf_get_cfifo(p)   (&((p)->fifo_info.cfifo))
 
#define usbhsf_get_d0fifo(p)   (&((p)->fifo_info.d0fifo))
 
#define usbhsf_get_d1fifo(p)   (&((p)->fifo_info.d1fifo))
 
#define usbhsf_is_cfifo(p, f)   (usbhsf_get_cfifo(p) == f)
 
#define usbhsf_fifo_is_busy(f)   ((f)->pipe) /* see usbhs_pipe_select_fifo */
 
#define usbhsf_irq_empty_ctrl(p, e)   usbhsf_irq_callback_ctrl(p, bempsts, e)
 
#define usbhsf_irq_ready_ctrl(p, e)   usbhsf_irq_callback_ctrl(p, brdysts, e)
 
#define usbhsf_irq_callback_ctrl(pipe, status, enable)
 
#define usbhsf_dma_start(p, f)   __usbhsf_dma_ctrl(p, f, DREQE)
 
#define usbhsf_dma_stop(p, f)   __usbhsf_dma_ctrl(p, f, 0)
 
#define usbhsf_dma_map(p)   __usbhsf_dma_map_ctrl(p, 1)
 
#define usbhsf_dma_unmap(p)   __usbhsf_dma_map_ctrl(p, 0)
 

Enumerations

enum  { USBHSF_PKT_PREPARE, USBHSF_PKT_TRY_RUN, USBHSF_PKT_DMA_DONE }
 

Functions

void usbhs_pkt_init (struct usbhs_pkt *pkt)
 
void usbhs_pkt_push (struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, void(*done)(struct usbhs_priv *priv, struct usbhs_pkt *pkt), void *buf, int len, int zero, int sequence)
 
struct usbhs_pktusbhs_pkt_pop (struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)
 
void usbhs_pkt_start (struct usbhs_pipe *pipe)
 
void usbhs_fifo_init (struct usbhs_priv *priv)
 
void usbhs_fifo_quit (struct usbhs_priv *priv)
 
int usbhs_fifo_probe (struct usbhs_priv *priv)
 
void usbhs_fifo_remove (struct usbhs_priv *priv)
 

Variables

struct usbhs_pkt_handle usbhs_dcp_status_stage_in_handler
 
struct usbhs_pkt_handle usbhs_dcp_status_stage_out_handler
 
struct usbhs_pkt_handle usbhs_dcp_data_stage_out_handler
 
struct usbhs_pkt_handle usbhs_dcp_data_stage_in_handler
 
struct usbhs_pkt_handle usbhs_fifo_pio_push_handler
 
struct usbhs_pkt_handle usbhs_fifo_pio_pop_handler
 
struct usbhs_pkt_handle usbhs_ctrl_stage_end_handler
 
struct usbhs_pkt_handle usbhs_fifo_dma_push_handler
 
struct usbhs_pkt_handle usbhs_fifo_dma_pop_handler
 

Macro Definition Documentation

#define usbhsf_dma_map (   p)    __usbhsf_dma_map_ctrl(p, 1)

Definition at line 756 of file fifo.c.

#define usbhsf_dma_start (   p,
  f 
)    __usbhsf_dma_ctrl(p, f, DREQE)

Definition at line 745 of file fifo.c.

#define usbhsf_dma_stop (   p,
  f 
)    __usbhsf_dma_ctrl(p, f, 0)

Definition at line 746 of file fifo.c.

#define usbhsf_dma_unmap (   p)    __usbhsf_dma_map_ctrl(p, 0)

Definition at line 757 of file fifo.c.

#define usbhsf_fifo_is_busy (   f)    ((f)->pipe) /* see usbhs_pipe_select_fifo */

Definition at line 28 of file fifo.c.

#define usbhsf_get_cfifo (   p)    (&((p)->fifo_info.cfifo))

Definition at line 23 of file fifo.c.

#define usbhsf_get_d0fifo (   p)    (&((p)->fifo_info.d0fifo))

Definition at line 24 of file fifo.c.

#define usbhsf_get_d1fifo (   p)    (&((p)->fifo_info.d1fifo))

Definition at line 25 of file fifo.c.

#define usbhsf_irq_callback_ctrl (   pipe,
  status,
  enable 
)
Value:
({ \
if (!mod) \
return; \
if (enable) \
mod->irq_##status |= status; \
else \
mod->irq_##status &= ~status; \
usbhs_irq_callback_update(priv, mod); \
})

Definition at line 197 of file fifo.c.

#define usbhsf_irq_empty_ctrl (   p,
  e 
)    usbhsf_irq_callback_ctrl(p, bempsts, e)

Definition at line 195 of file fifo.c.

#define usbhsf_irq_ready_ctrl (   p,
  e 
)    usbhsf_irq_callback_ctrl(p, brdysts, e)

Definition at line 196 of file fifo.c.

#define usbhsf_is_cfifo (   p,
  f 
)    (usbhsf_get_cfifo(p) == f)

Definition at line 26 of file fifo.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
USBHSF_PKT_PREPARE 
USBHSF_PKT_TRY_RUN 
USBHSF_PKT_DMA_DONE 

Definition at line 132 of file fifo.c.

Function Documentation

void usbhs_fifo_init ( struct usbhs_priv priv)

Definition at line 1111 of file fifo.c.

int usbhs_fifo_probe ( struct usbhs_priv priv)

Definition at line 1152 of file fifo.c.

void usbhs_fifo_quit ( struct usbhs_priv priv)

Definition at line 1139 of file fifo.c.

void usbhs_fifo_remove ( struct usbhs_priv priv)

Definition at line 1184 of file fifo.c.

void usbhs_pkt_init ( struct usbhs_pkt pkt)

Definition at line 33 of file fifo.c.

struct usbhs_pkt* usbhs_pkt_pop ( struct usbhs_pipe pipe,
struct usbhs_pkt pkt 
)
read

Definition at line 112 of file fifo.c.

void usbhs_pkt_push ( struct usbhs_pipe pipe,
struct usbhs_pkt pkt,
void(*)(struct usbhs_priv *priv, struct usbhs_pkt *pkt)  done,
void buf,
int  len,
int  zero,
int  sequence 
)

Definition at line 57 of file fifo.c.

void usbhs_pkt_start ( struct usbhs_pipe pipe)

Definition at line 187 of file fifo.c.

Variable Documentation

struct usbhs_pkt_handle usbhs_ctrl_stage_end_handler
Initial value:
= {
.prepare = usbhsf_ctrl_stage_end,
.try_run = usbhsf_ctrl_stage_end,
}

Definition at line 705 of file fifo.c.

struct usbhs_pkt_handle usbhs_dcp_data_stage_in_handler
Initial value:
= {
.prepare = usbhsf_dcp_data_stage_prepare_pop,
}

Definition at line 468 of file fifo.c.

struct usbhs_pkt_handle usbhs_dcp_data_stage_out_handler
Initial value:
= {
.prepare = usbhsf_dcp_data_stage_try_push,
}

Definition at line 429 of file fifo.c.

struct usbhs_pkt_handle usbhs_dcp_status_stage_in_handler
Initial value:
= {
.prepare = usbhs_dcp_dir_switch_to_write,
.try_run = usbhs_dcp_dir_switch_done,
}

Definition at line 402 of file fifo.c.

struct usbhs_pkt_handle usbhs_dcp_status_stage_out_handler
Initial value:
= {
.prepare = usbhs_dcp_dir_switch_to_read,
.try_run = usbhs_dcp_dir_switch_done,
}

Definition at line 407 of file fifo.c.

struct usbhs_pkt_handle usbhs_fifo_dma_pop_handler
Initial value:
= {
.prepare = usbhsf_prepare_pop,
.try_run = usbhsf_dma_try_pop,
.dma_done = usbhsf_dma_pop_done
}

Definition at line 972 of file fifo.c.

struct usbhs_pkt_handle usbhs_fifo_dma_push_handler
Initial value:
= {
.prepare = usbhsf_dma_prepare_push,
.dma_done = usbhsf_dma_push_done,
}

Definition at line 873 of file fifo.c.

struct usbhs_pkt_handle usbhs_fifo_pio_pop_handler
Initial value:
= {
.prepare = usbhsf_prepare_pop,
.try_run = usbhsf_pio_try_pop,
}

Definition at line 688 of file fifo.c.

struct usbhs_pkt_handle usbhs_fifo_pio_push_handler
Initial value:
= {
.prepare = usbhsf_pio_try_push,
.try_run = usbhsf_pio_try_push,
}

Definition at line 576 of file fifo.c.