aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/include/mach/lcd_dma.h
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2009-12-11 19:16:33 -0500
committerTony Lindgren <tony@atomide.com>2009-12-11 19:16:33 -0500
commitf8e9e98454606e43b728269de21db349f57861c7 (patch)
treecc38265982b60e93f5271ca7578e00161046c30e /arch/arm/mach-omap1/include/mach/lcd_dma.h
parent414f552ad872e19a7471644317a60f3cbba25ced (diff)
omap1: DMA: move LCD related code from plat-omap to mach-omap1
All of the LCD DMA code in plat-omap/dma.c appears to be OMAP1-only (and apparently only is available on a subset of OMAP1 chips). Move this code to mach-omap1/lcd_dma.c. Tested on OMAP1510 Amstrad Delta. Compile-tested with omap_generic_2420_defconfig. Reported-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Reviewed-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/include/mach/lcd_dma.h')
-rw-r--r--arch/arm/mach-omap1/include/mach/lcd_dma.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/include/mach/lcd_dma.h b/arch/arm/mach-omap1/include/mach/lcd_dma.h
new file mode 100644
index 000000000000..d7a457bbcb7f
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/lcd_dma.h
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-omap1/include/mach/lcd_dma.h
3 *
4 * Extracted from arch/arm/plat-omap/include/plat/dma.h
5 * Copyright (C) 2003 Nokia Corporation
6 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __MACH_OMAP1_LCD_DMA_H__
23#define __MACH_OMAP1_LCD_DMA_H__
24
25/* Hardware registers for LCD DMA */
26#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
27#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
28#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
29#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
30#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
31#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
32
33#define OMAP1610_DMA_LCD_BASE (0xfffee300)
34#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
35#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
36#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
37#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
38#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
39#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
40#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
41#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
42#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
43#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
44#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
45#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
46#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
47#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
48#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
49#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
50#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
51
52/* LCD DMA block numbers */
53enum {
54 OMAP_LCD_DMA_B1_TOP,
55 OMAP_LCD_DMA_B1_BOTTOM,
56 OMAP_LCD_DMA_B2_TOP,
57 OMAP_LCD_DMA_B2_BOTTOM
58};
59
60/* LCD DMA functions */
61extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
62 void *data);
63extern void omap_free_lcd_dma(void);
64extern void omap_setup_lcd_dma(void);
65extern void omap_enable_lcd_dma(void);
66extern void omap_stop_lcd_dma(void);
67extern void omap_set_lcd_dma_ext_controller(int external);
68extern void omap_set_lcd_dma_single_transfer(int single);
69extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
70 int data_type);
71extern void omap_set_lcd_dma_b1_rotation(int rotate);
72extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
73extern void omap_set_lcd_dma_b1_mirror(int mirror);
74extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
75
76extern int omap_lcd_dma_running(void);
77
78#endif /* __MACH_OMAP1_LCD_DMA_H__ */