linux/arch/arm/mach-omap1/include/mach/lcd_dma.h
<<
>>
Prefs
   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__ */
  79