cregit-Linux how code gets into the kernel

Release 4.14 arch/mn10300/include/asm/dma.h

/* MN10300 ISA DMA handlers and definitions
 *
 * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public Licence
 * as published by the Free Software Foundation; either version
 * 2 of the Licence, or (at your option) any later version.
 */
#ifndef _ASM_DMA_H

#define _ASM_DMA_H

#include <linux/spinlock.h>
#include <asm/io.h>
#include <linux/delay.h>


#undef MAX_DMA_CHANNELS		
/* switch off linux/kernel/dma.c */

#define MAX_DMA_ADDRESS		0xbfffffff

extern spinlock_t dma_spin_lock;


static inline unsigned long claim_dma_lock(void) { unsigned long flags; spin_lock_irqsave(&dma_spin_lock, flags); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells25100.00%1100.00%
Total25100.00%1100.00%


static inline void release_dma_lock(unsigned long flags) { spin_unlock_irqrestore(&dma_spin_lock, flags); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells19100.00%1100.00%
Total19100.00%1100.00%

/* enable/disable a specific DMA channel */
static inline void enable_dma(unsigned int dmanr) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells10100.00%1100.00%
Total10100.00%1100.00%


static inline void disable_dma(unsigned int dmanr) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells10100.00%1100.00%
Total10100.00%1100.00%

/* Clear the 'DMA Pointer Flip Flop'. * Write 0 for LSB/MSB, 1 for MSB/LSB access. * Use this once to initialize the FF to a known state. * After that, keep track of it. :-) * --- In order to do that, the DMA routines below should --- * --- only be used while holding the DMA lock ! --- */
static inline void clear_dma_ff(unsigned int dmanr) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells10100.00%1100.00%
Total10100.00%1100.00%

/* set mode (above) for a specific DMA channel */
static inline void set_dma_mode(unsigned int dmanr, char mode) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells13100.00%1100.00%
Total13100.00%1100.00%

/* Set only the page register bits of the transfer address. * This is used for successive transfers when we know the contents of * the lower 16 bits of the DMA current address register, but a 64k boundary * may have been crossed. */
static inline void set_dma_page(unsigned int dmanr, char pagenr) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells13100.00%1100.00%
Total13100.00%1100.00%

/* Set transfer address & page bits for specific DMA channel. * Assumes dma flipflop is clear. */
static inline void set_dma_addr(unsigned int dmanr, unsigned int a) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells14100.00%1100.00%
Total14100.00%1100.00%

/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for * a specific DMA channel. * You must ensure the parameters are valid. * NOTE: from a manual: "the number of transfers is one more * than the initial word count"! This is taken into account. * Assumes dma flip-flop is clear. * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7. */
static inline void set_dma_count(unsigned int dmanr, unsigned int count) { }

Contributors

PersonTokensPropCommitsCommitProp
David Howells14100.00%1100.00%
Total14100.00%1100.00%

/* Get DMA residue count. After a DMA transfer, this * should return zero. Reading this while a DMA transfer is * still in progress will return unpredictable results. * If called before the channel has been used, it may return 1. * Otherwise, it returns the number of _bytes_ left to transfer. * * Assumes DMA flip-flop is clear. */
static inline int get_dma_residue(unsigned int dmanr) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells14100.00%1100.00%
Total14100.00%1100.00%

/* These are in kernel/dma.c: */ extern int request_dma(unsigned int dmanr, const char *device_id); extern void free_dma(unsigned int dmanr); /* From PCI */ #ifdef CONFIG_PCI extern int isa_dma_bridge_buggy; #else #define isa_dma_bridge_buggy (0) #endif #endif /* _ASM_DMA_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Howells220100.00%1100.00%
Total220100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.