Commit 57bcdafc authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM] 3765/1: S3C24XX: cleanup include/asm-arm/arch-s3c2410/dma.h

Patch from Ben Dooks

Cleanup for include/asm-arma/arch-s3c2410/dma.h,
by using tab characters to indent items, remove the
now un-necessary changelog, and update the copyright
information.
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent f105a7df
/* linux/include/asm-arm/arch-bast/dma.h /* linux/include/asm-arm/arch-s3c2410/dma.h
* *
* Copyright (C) 2003,2004 Simtec Electronics * Copyright (C) 2003,2004,2006 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk> * Ben Dooks <ben@simtec.co.uk>
* *
* Samsung S3C2410X DMA support * Samsung S3C241XX DMA support
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*
* Changelog:
* ??-May-2003 BJD Created file
* ??-Jun-2003 BJD Added more dma functionality to go with arch
* 10-Nov-2004 BJD Added sys_device support
*/ */
#ifndef __ASM_ARCH_DMA_H #ifndef __ASM_ARCH_DMA_H
...@@ -21,15 +16,13 @@ ...@@ -21,15 +16,13 @@
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include "hardware.h" #include "hardware.h"
/* /*
* This is the maximum DMA address(physical address) that can be DMAd to. * This is the maximum DMA address(physical address) that can be DMAd to.
* *
*/ */
#define MAX_DMA_ADDRESS 0x20000000 #define MAX_DMA_ADDRESS 0x40000000
#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
/* we have 4 dma channels */ /* we have 4 dma channels */
#define S3C2410_DMA_CHANNELS (4) #define S3C2410_DMA_CHANNELS (4)
...@@ -83,10 +76,9 @@ enum s3c2410_dma_buffresult { ...@@ -83,10 +76,9 @@ enum s3c2410_dma_buffresult {
S3C2410_RES_ABORT S3C2410_RES_ABORT
}; };
enum s3c2410_dmasrc { enum s3c2410_dmasrc {
S3C2410_DMASRC_HW, /* source is memory */ S3C2410_DMASRC_HW, /* source is memory */
S3C2410_DMASRC_MEM /* source is hardware */ S3C2410_DMASRC_MEM /* source is hardware */
}; };
/* enum s3c2410_chan_op /* enum s3c2410_chan_op
...@@ -101,7 +93,7 @@ enum s3c2410_chan_op { ...@@ -101,7 +93,7 @@ enum s3c2410_chan_op {
S3C2410_DMAOP_PAUSE, S3C2410_DMAOP_PAUSE,
S3C2410_DMAOP_RESUME, S3C2410_DMAOP_RESUME,
S3C2410_DMAOP_FLUSH, S3C2410_DMAOP_FLUSH,
S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */
S3C2410_DMAOP_STARTED, /* indicate channel started */ S3C2410_DMAOP_STARTED, /* indicate channel started */
}; };
...@@ -125,12 +117,12 @@ struct s3c2410_dma_client { ...@@ -125,12 +117,12 @@ struct s3c2410_dma_client {
struct s3c2410_dma_buf; struct s3c2410_dma_buf;
struct s3c2410_dma_buf { struct s3c2410_dma_buf {
struct s3c2410_dma_buf *next; struct s3c2410_dma_buf *next;
int magic; /* magic */ int magic; /* magic */
int size; /* buffer size in bytes */ int size; /* buffer size in bytes */
dma_addr_t data; /* start of DMA data */ dma_addr_t data; /* start of DMA data */
dma_addr_t ptr; /* where the DMA got to [1] */ dma_addr_t ptr; /* where the DMA got to [1] */
void *id; /* client's id */ void *id; /* client's id */
}; };
/* [1] is this updated for both recv/send modes? */ /* [1] is this updated for both recv/send modes? */
...@@ -150,11 +142,11 @@ typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *, ...@@ -150,11 +142,11 @@ typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
enum s3c2410_chan_op ); enum s3c2410_chan_op );
struct s3c2410_dma_stats { struct s3c2410_dma_stats {
unsigned long loads; unsigned long loads;
unsigned long timeout_longest; unsigned long timeout_longest;
unsigned long timeout_shortest; unsigned long timeout_shortest;
unsigned long timeout_avg; unsigned long timeout_avg;
unsigned long timeout_failed; unsigned long timeout_failed;
}; };
/* struct s3c2410_dma_chan /* struct s3c2410_dma_chan
...@@ -164,42 +156,42 @@ struct s3c2410_dma_stats { ...@@ -164,42 +156,42 @@ struct s3c2410_dma_stats {
struct s3c2410_dma_chan { struct s3c2410_dma_chan {
/* channel state flags and information */ /* channel state flags and information */
unsigned char number; /* number of this dma channel */ unsigned char number; /* number of this dma channel */
unsigned char in_use; /* channel allocated */ unsigned char in_use; /* channel allocated */
unsigned char irq_claimed; /* irq claimed for channel */ unsigned char irq_claimed; /* irq claimed for channel */
unsigned char irq_enabled; /* irq enabled for channel */ unsigned char irq_enabled; /* irq enabled for channel */
unsigned char xfer_unit; /* size of an transfer */ unsigned char xfer_unit; /* size of an transfer */
/* channel state */ /* channel state */
enum s3c2410_dma_state state; enum s3c2410_dma_state state;
enum s3c2410_dma_loadst load_state; enum s3c2410_dma_loadst load_state;
struct s3c2410_dma_client *client; struct s3c2410_dma_client *client;
/* channel configuration */ /* channel configuration */
enum s3c2410_dmasrc source; enum s3c2410_dmasrc source;
unsigned long dev_addr; unsigned long dev_addr;
unsigned long load_timeout; unsigned long load_timeout;
unsigned int flags; /* channel flags */ unsigned int flags; /* channel flags */
/* channel's hardware position and configuration */ /* channel's hardware position and configuration */
void __iomem *regs; /* channels registers */ void __iomem *regs; /* channels registers */
void __iomem *addr_reg; /* data address register */ void __iomem *addr_reg; /* data address register */
unsigned int irq; /* channel irq */ unsigned int irq; /* channel irq */
unsigned long dcon; /* default value of DCON */ unsigned long dcon; /* default value of DCON */
/* driver handles */ /* driver handles */
s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
s3c2410_dma_opfn_t op_fn; /* channel operation callback */ s3c2410_dma_opfn_t op_fn; /* channel op callback */
/* stats gathering */ /* stats gathering */
struct s3c2410_dma_stats *stats; struct s3c2410_dma_stats *stats;
struct s3c2410_dma_stats stats_store; struct s3c2410_dma_stats stats_store;
/* buffer list and information */ /* buffer list and information */
struct s3c2410_dma_buf *curr; /* current dma buffer */ struct s3c2410_dma_buf *curr; /* current dma buffer */
struct s3c2410_dma_buf *next; /* next buffer to load */ struct s3c2410_dma_buf *next; /* next buffer to load */
struct s3c2410_dma_buf *end; /* end of queue */ struct s3c2410_dma_buf *end; /* end of queue */
/* system device */ /* system device */
struct sys_device dev; struct sys_device dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment