lcd_dma.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. /* Hardware registers for LCD DMA */
  25. #define OMAP1510_DMA_LCD_BASE (0xfffedb00)
  26. #define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
  27. #define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
  28. #define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
  29. #define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
  30. #define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
  31. #define OMAP1610_DMA_LCD_BASE (0xfffee300)
  32. #define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
  33. #define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
  34. #define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
  35. #define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
  36. #define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
  37. #define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
  38. #define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
  39. #define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
  40. #define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
  41. #define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
  42. #define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
  43. #define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
  44. #define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
  45. #define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
  46. #define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
  47. #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
  48. #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
  49. /* LCD DMA block numbers */
  50. enum {
  51. OMAP_LCD_DMA_B1_TOP,
  52. OMAP_LCD_DMA_B1_BOTTOM,
  53. OMAP_LCD_DMA_B2_TOP,
  54. OMAP_LCD_DMA_B2_BOTTOM
  55. };
  56. /* LCD DMA functions */
  57. extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
  58. void *data);
  59. extern void omap_free_lcd_dma(void);
  60. extern void omap_setup_lcd_dma(void);
  61. extern void omap_enable_lcd_dma(void);
  62. extern void omap_stop_lcd_dma(void);
  63. extern void omap_set_lcd_dma_ext_controller(int external);
  64. extern void omap_set_lcd_dma_single_transfer(int single);
  65. extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
  66. int data_type);
  67. extern void omap_set_lcd_dma_b1_rotation(int rotate);
  68. extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
  69. extern void omap_set_lcd_dma_b1_mirror(int mirror);
  70. extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
  71. extern int omap_lcd_dma_running(void);
  72. #endif /* __MACH_OMAP1_LCD_DMA_H__ */