OXIESEC PANEL
- Current Dir:
/
/
usr
/
src
/
linux-headers-4.15.0-197
/
arch
/
blackfin
/
include
/
asm
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/17/2022 06:42:15 AM
rwxr-xr-x
📄
Kbuild
658 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
asm-offsets.h
35 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
atomic.h
1.55 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
barrier.h
2.55 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin-global.h
2.8 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin-lq035q1.h
868 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin5xx_spi.h
2.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_can.h
36.04 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_dma.h
5.46 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_pfmon.h
1.11 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_ppi.h
9.01 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_sdh.h
7.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_serial.h
17.02 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_simple_timer.h
949 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_sport.h
1.21 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_sport3.h
5.47 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_twi.h
6.25 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfin_watchdog.h
696 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
bfrom.h
3.36 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bitops.h
3.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
blackfin.h
1.55 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bug.h
1.49 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cache.h
1.47 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cacheflush.h
3.79 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cdef_LPBlackfin.h
18.93 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
checksum.h
899 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
clkdev.h
318 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
clocks.h
1.66 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cmpxchg.h
3.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
context.S
5.92 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cplb.h
4.86 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cplbinit.h
1.6 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cpu.h
443 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
def_LPBlackfin.h
28.6 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
delay.h
917 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-mapping.h
1.09 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma.h
9.28 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dpmc.h
18.24 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
early_printk.h
1.09 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
elf.h
4.88 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
entry.h
5.27 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
exec.h
37 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
fixed_code.h
806 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
flat.h
1.41 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ftrace.h
1.37 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
gpio.h
5.91 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
gptimers.h
8.95 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hardirq.h
301 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
io.h
1.52 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ipipe.h
5.81 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ipipe_base.h
2.38 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irq.h
879 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
irq_handler.h
1.93 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags.h
7.13 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kgdb.h
3.23 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
l1layout.h
879 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
linkage.h
205 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mem_init.h
13.1 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mem_map.h
1.73 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmu.h
713 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmu_context.h
5.35 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
module.h
410 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
nand.h
895 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
nmi.h
195 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
page.h
546 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
page_offset.h
192 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pci.h
310 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pda.h
1.86 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
perf_event.h
23 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable.h
3 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pm.h
590 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
portmux.h
16.38 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
processor.h
3.21 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pseudo_instructions.h
391 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
ptrace.h
1.19 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
reboot.h
446 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
rwlock.h
142 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
scb.h
445 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
sections.h
2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
segment.h
226 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp.h
1.34 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock.h
1.87 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock_types.h
495 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
string.h
1.04 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
switch_to.h
997 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
syscall.h
2.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
thread_info.h
2.66 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
time.h
1.33 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
timex.h
477 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlb.h
481 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlbflush.h
88 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
trace.h
2.67 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
traps.h
4.87 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
uaccess.h
5.79 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
unistd.h
523 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
vga.h
29 bytes
01/28/2018 09:20:33 PM
rw-r--r--
Editing: dma.h
Close
/* * dma.h - Blackfin DMA defines/structures/etc... * * Copyright 2004-2008 Analog Devices Inc. * Licensed under the GPL-2 or later. */ #ifndef _BLACKFIN_DMA_H_ #define _BLACKFIN_DMA_H_ #include <linux/interrupt.h> #include <mach/dma.h> #include <linux/atomic.h> #include <asm/blackfin.h> #include <asm/page.h> #include <asm-generic/dma.h> #include <asm/bfin_dma.h> /*------------------------- * config reg bits value *-------------------------*/ #define DATA_SIZE_8 0 #define DATA_SIZE_16 1 #define DATA_SIZE_32 2 #ifdef CONFIG_BF60x #define DATA_SIZE_64 3 #endif #define DMA_FLOW_STOP 0 #define DMA_FLOW_AUTO 1 #ifdef CONFIG_BF60x #define DMA_FLOW_LIST 4 #define DMA_FLOW_ARRAY 5 #define DMA_FLOW_LIST_DEMAND 6 #define DMA_FLOW_ARRAY_DEMAND 7 #else #define DMA_FLOW_ARRAY 4 #define DMA_FLOW_SMALL 6 #define DMA_FLOW_LARGE 7 #endif #define DIMENSION_LINEAR 0 #define DIMENSION_2D 1 #define DIR_READ 0 #define DIR_WRITE 1 #define INTR_DISABLE 0 #ifdef CONFIG_BF60x #define INTR_ON_PERI 1 #endif #define INTR_ON_BUF 2 #define INTR_ON_ROW 3 #define DMA_NOSYNC_KEEP_DMA_BUF 0 #define DMA_SYNC_RESTART 1 #ifdef DMA_MMR_SIZE_32 #define DMA_MMR_SIZE_TYPE long #define DMA_MMR_READ bfin_read32 #define DMA_MMR_WRITE bfin_write32 #else #define DMA_MMR_SIZE_TYPE short #define DMA_MMR_READ bfin_read16 #define DMA_MMR_WRITE bfin_write16 #endif struct dma_desc_array { unsigned long start_addr; unsigned DMA_MMR_SIZE_TYPE cfg; unsigned DMA_MMR_SIZE_TYPE x_count; DMA_MMR_SIZE_TYPE x_modify; } __attribute__((packed)); struct dmasg { void *next_desc_addr; unsigned long start_addr; unsigned DMA_MMR_SIZE_TYPE cfg; unsigned DMA_MMR_SIZE_TYPE x_count; DMA_MMR_SIZE_TYPE x_modify; unsigned DMA_MMR_SIZE_TYPE y_count; DMA_MMR_SIZE_TYPE y_modify; } __attribute__((packed)); struct dma_register { void *next_desc_ptr; /* DMA Next Descriptor Pointer register */ unsigned long start_addr; /* DMA Start address register */ #ifdef CONFIG_BF60x unsigned long cfg; /* DMA Configuration register */ unsigned long x_count; /* DMA x_count register */ long x_modify; /* DMA x_modify register */ unsigned long y_count; /* DMA y_count register */ long y_modify; /* DMA y_modify register */ unsigned long reserved; unsigned long reserved2; void *curr_desc_ptr; /* DMA Current Descriptor Pointer register */ void *prev_desc_ptr; /* DMA previous initial Descriptor Pointer register */ unsigned long curr_addr_ptr; /* DMA Current Address Pointer register */ unsigned long irq_status; /* DMA irq status register */ unsigned long curr_x_count; /* DMA Current x-count register */ unsigned long curr_y_count; /* DMA Current y-count register */ unsigned long reserved3; unsigned long bw_limit_count; /* DMA band width limit count register */ unsigned long curr_bw_limit_count; /* DMA Current band width limit count register */ unsigned long bw_monitor_count; /* DMA band width limit count register */ unsigned long curr_bw_monitor_count; /* DMA Current band width limit count register */ #else unsigned short cfg; /* DMA Configuration register */ unsigned short dummy1; /* DMA Configuration register */ unsigned long reserved; unsigned short x_count; /* DMA x_count register */ unsigned short dummy2; short x_modify; /* DMA x_modify register */ unsigned short dummy3; unsigned short y_count; /* DMA y_count register */ unsigned short dummy4; short y_modify; /* DMA y_modify register */ unsigned short dummy5; void *curr_desc_ptr; /* DMA Current Descriptor Pointer register */ unsigned long curr_addr_ptr; /* DMA Current Address Pointer register */ unsigned short irq_status; /* DMA irq status register */ unsigned short dummy6; unsigned short peripheral_map; /* DMA peripheral map register */ unsigned short dummy7; unsigned short curr_x_count; /* DMA Current x-count register */ unsigned short dummy8; unsigned long reserved2; unsigned short curr_y_count; /* DMA Current y-count register */ unsigned short dummy9; unsigned long reserved3; #endif }; struct dma_channel { const char *device_id; atomic_t chan_status; volatile struct dma_register *regs; struct dmasg *sg; /* large mode descriptor */ unsigned int irq; void *data; #ifdef CONFIG_PM unsigned short saved_peripheral_map; #endif }; #ifdef CONFIG_PM int blackfin_dma_suspend(void); void blackfin_dma_resume(void); #endif /******************************************************************************* * DMA API's *******************************************************************************/ extern struct dma_channel dma_ch[MAX_DMA_CHANNELS]; extern struct dma_register * const dma_io_base_addr[MAX_DMA_CHANNELS]; extern int channel2irq(unsigned int channel); static inline void set_dma_start_addr(unsigned int channel, unsigned long addr) { dma_ch[channel].regs->start_addr = addr; } static inline void set_dma_next_desc_addr(unsigned int channel, void *addr) { dma_ch[channel].regs->next_desc_ptr = addr; } static inline void set_dma_curr_desc_addr(unsigned int channel, void *addr) { dma_ch[channel].regs->curr_desc_ptr = addr; } static inline void set_dma_x_count(unsigned int channel, unsigned DMA_MMR_SIZE_TYPE x_count) { dma_ch[channel].regs->x_count = x_count; } static inline void set_dma_y_count(unsigned int channel, unsigned DMA_MMR_SIZE_TYPE y_count) { dma_ch[channel].regs->y_count = y_count; } static inline void set_dma_x_modify(unsigned int channel, DMA_MMR_SIZE_TYPE x_modify) { dma_ch[channel].regs->x_modify = x_modify; } static inline void set_dma_y_modify(unsigned int channel, DMA_MMR_SIZE_TYPE y_modify) { dma_ch[channel].regs->y_modify = y_modify; } static inline void set_dma_config(unsigned int channel, unsigned DMA_MMR_SIZE_TYPE config) { dma_ch[channel].regs->cfg = config; } static inline void set_dma_curr_addr(unsigned int channel, unsigned long addr) { dma_ch[channel].regs->curr_addr_ptr = addr; } #ifdef CONFIG_BF60x static inline unsigned long set_bfin_dma_config2(char direction, char flow_mode, char intr_mode, char dma_mode, char mem_width, char syncmode, char peri_width) { unsigned long config = 0; switch (intr_mode) { case INTR_ON_BUF: if (dma_mode == DIMENSION_2D) config = DI_EN_Y; else config = DI_EN_X; break; case INTR_ON_ROW: config = DI_EN_X; break; case INTR_ON_PERI: config = DI_EN_P; break; }; return config | (direction << 1) | (mem_width << 8) | (dma_mode << 26) | (flow_mode << 12) | (syncmode << 2) | (peri_width << 4); } #endif static inline unsigned DMA_MMR_SIZE_TYPE set_bfin_dma_config(char direction, char flow_mode, char intr_mode, char dma_mode, char mem_width, char syncmode) { #ifdef CONFIG_BF60x return set_bfin_dma_config2(direction, flow_mode, intr_mode, dma_mode, mem_width, syncmode, mem_width); #else return (direction << 1) | (mem_width << 2) | (dma_mode << 4) | (intr_mode << 6) | (flow_mode << 12) | (syncmode << 5); #endif } static inline unsigned DMA_MMR_SIZE_TYPE get_dma_curr_irqstat(unsigned int channel) { return dma_ch[channel].regs->irq_status; } static inline unsigned DMA_MMR_SIZE_TYPE get_dma_curr_xcount(unsigned int channel) { return dma_ch[channel].regs->curr_x_count; } static inline unsigned DMA_MMR_SIZE_TYPE get_dma_curr_ycount(unsigned int channel) { return dma_ch[channel].regs->curr_y_count; } static inline void *get_dma_next_desc_ptr(unsigned int channel) { return dma_ch[channel].regs->next_desc_ptr; } static inline void *get_dma_curr_desc_ptr(unsigned int channel) { return dma_ch[channel].regs->curr_desc_ptr; } static inline unsigned DMA_MMR_SIZE_TYPE get_dma_config(unsigned int channel) { return dma_ch[channel].regs->cfg; } static inline unsigned long get_dma_curr_addr(unsigned int channel) { return dma_ch[channel].regs->curr_addr_ptr; } static inline void set_dma_sg(unsigned int channel, struct dmasg *sg, int ndsize) { /* Make sure the internal data buffers in the core are drained * so that the DMA descriptors are completely written when the * DMA engine goes to fetch them below. */ SSYNC(); dma_ch[channel].regs->next_desc_ptr = sg; dma_ch[channel].regs->cfg = (dma_ch[channel].regs->cfg & ~NDSIZE) | ((ndsize << NDSIZE_OFFSET) & NDSIZE); } static inline int dma_channel_active(unsigned int channel) { return atomic_read(&dma_ch[channel].chan_status); } static inline void disable_dma(unsigned int channel) { dma_ch[channel].regs->cfg &= ~DMAEN; SSYNC(); } static inline void enable_dma(unsigned int channel) { dma_ch[channel].regs->curr_x_count = 0; dma_ch[channel].regs->curr_y_count = 0; dma_ch[channel].regs->cfg |= DMAEN; } int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data); static inline void dma_disable_irq(unsigned int channel) { disable_irq(dma_ch[channel].irq); } static inline void dma_disable_irq_nosync(unsigned int channel) { disable_irq_nosync(dma_ch[channel].irq); } static inline void dma_enable_irq(unsigned int channel) { enable_irq(dma_ch[channel].irq); } static inline void clear_dma_irqstat(unsigned int channel) { dma_ch[channel].regs->irq_status = DMA_DONE | DMA_ERR | DMA_PIRQ; } void *dma_memcpy(void *dest, const void *src, size_t count); void *dma_memcpy_nocache(void *dest, const void *src, size_t count); void *safe_dma_memcpy(void *dest, const void *src, size_t count); void blackfin_dma_early_init(void); void early_dma_memcpy(void *dest, const void *src, size_t count); void early_dma_memcpy_done(void); #endif