Skip to content

Commit

Permalink
ARM: SAMSUNG: Remove dma-plat.h to allow plat-s3c64xx to be removed
Browse files Browse the repository at this point in the history
dma-plat.h is the last file left in plat-s3c64xx, but to remove it we
must also change the use of dma-plat.h by the core code and the s3c24xx
implementation.

Rename the s3c24xx dma-plat.h in the common plat-samsung directory as it
may be used for other ports. Move the specific dma bits into the
mach-s3c64xx directory and update the build as needed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Ben Dooks committed Feb 21, 2010
1 parent 431fb7d commit 992426b
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 80 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <mach/dma.h>

#include <plat/cpu.h>
#include <plat/dma-plat.h>
#include <plat/dma-s3c24xx.h>

#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2412/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <mach/dma.h>

#include <plat/dma-plat.h>
#include <plat/dma-s3c24xx.h>
#include <plat/cpu.h>

#include <plat/regs-serial.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2440/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <mach/map.h>
#include <mach/dma.h>

#include <plat/dma-plat.h>
#include <plat/dma-s3c24xx.h>
#include <plat/cpu.h>

#include <plat/regs-serial.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2443/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <mach/dma.h>

#include <plat/dma-plat.h>
#include <plat/dma-s3c24xx.h>
#include <plat/cpu.h>

#include <plat/regs-serial.h>
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-s3c64xx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <mach/map.h>
#include <mach/irqs.h>

#include <plat/dma-plat.h>
#include <mach/regs-sys.h>

#include <asm/hardware/pl080.h>
Expand Down
57 changes: 57 additions & 0 deletions arch/arm/mach-s3c64xx/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,61 @@ static __inline__ bool s3c_dma_has_circular(void)

#include <plat/dma.h>

#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */

struct s3c64xx_dma_buff;

/** s3c64xx_dma_buff - S3C64XX DMA buffer descriptor
* @next: Pointer to next buffer in queue or ring.
* @pw: Client provided identifier
* @lli: Pointer to hardware descriptor this buffer is associated with.
* @lli_dma: Hardare address of the descriptor.
*/
struct s3c64xx_dma_buff {
struct s3c64xx_dma_buff *next;

void *pw;
struct pl080s_lli *lli;
dma_addr_t lli_dma;
};

struct s3c64xx_dmac;

struct s3c2410_dma_chan {
unsigned char number; /* number of this dma channel */
unsigned char in_use; /* channel allocated */
unsigned char bit; /* bit for enable/disable/etc */
unsigned char hw_width;
unsigned char peripheral;

unsigned int flags;
enum s3c2410_dmasrc source;


dma_addr_t dev_addr;

struct s3c2410_dma_client *client;
struct s3c64xx_dmac *dmac; /* pointer to controller */

void __iomem *regs;

/* cdriver callbacks */
s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
s3c2410_dma_opfn_t op_fn; /* channel op callback */

/* buffer list and information */
struct s3c64xx_dma_buff *curr; /* current dma buffer */
struct s3c64xx_dma_buff *next; /* next buffer to load */
struct s3c64xx_dma_buff *end; /* end of queue */

/* note, when channel is running in circular mode, curr is the
* first buffer enqueued, end is the last and curr is where the
* last buffer-done event is set-at. The buffers are not freed
* and the last buffer hardware descriptor points back to the
* first.
*/
};

#include <plat/dma-core.h>

#endif /* __ASM_ARCH_IRQ_H */
2 changes: 0 additions & 2 deletions arch/arm/plat-s3c/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ struct s3c2410_dma_buf;
#include <mach/dma.h>
#include <mach/irqs.h>

#include <plat/dma-plat.h>

/* dma channel state information */
struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS];
struct s3c2410_dma_chan *s3c_dma_chan_map[DMACH_MAX];
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c24xx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <mach/dma.h>
#include <mach/map.h>

#include <plat/dma-plat.h>
#include <plat/dma-s3c24xx.h>
#include <plat/regs-dma.h>

/* io map for dma */
Expand Down
70 changes: 0 additions & 70 deletions arch/arm/plat-s3c64xx/include/plat/dma-plat.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* linux/arch/arm/plat-s3c24xx/include/plat/dma-plat.h
/* linux/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h
*
* Copyright (C) 2006 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* Samsung S3C24XX DMA support
* Samsung S3C24XX DMA support - per SoC functions
*
* 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
Expand Down

0 comments on commit 992426b

Please sign in to comment.