lcd_dma.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * arch/arm/mach-omap1/include/mach/lcd_dma.h
  4. *
  5. * Extracted from arch/arm/plat-omap/include/plat/dma.h
  6. * Copyright (C) 2003 Nokia Corporation
  7. * Author: Juha Yrjölä <[email protected]>
  8. */
  9. #ifndef __MACH_OMAP1_LCD_DMA_H__
  10. #define __MACH_OMAP1_LCD_DMA_H__
  11. /* Hardware registers for LCD DMA */
  12. #define OMAP1510_DMA_LCD_BASE (0xfffedb00)
  13. #define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
  14. #define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
  15. #define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
  16. #define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
  17. #define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
  18. #define OMAP1610_DMA_LCD_BASE (0xfffee300)
  19. #define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
  20. #define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
  21. #define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
  22. #define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
  23. #define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
  24. #define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
  25. #define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
  26. #define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
  27. #define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
  28. #define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
  29. #define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
  30. #define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
  31. #define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
  32. #define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
  33. #define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
  34. #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
  35. #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
  36. /* LCD DMA block numbers */
  37. enum {
  38. OMAP_LCD_DMA_B1_TOP,
  39. OMAP_LCD_DMA_B1_BOTTOM,
  40. OMAP_LCD_DMA_B2_TOP,
  41. OMAP_LCD_DMA_B2_BOTTOM
  42. };
  43. /* LCD DMA functions */
  44. extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
  45. void *data);
  46. extern void omap_free_lcd_dma(void);
  47. extern void omap_setup_lcd_dma(void);
  48. extern void omap_enable_lcd_dma(void);
  49. extern void omap_stop_lcd_dma(void);
  50. extern void omap_set_lcd_dma_ext_controller(int external);
  51. extern void omap_set_lcd_dma_single_transfer(int single);
  52. extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
  53. int data_type);
  54. extern void omap_set_lcd_dma_b1_rotation(int rotate);
  55. extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
  56. extern void omap_set_lcd_dma_b1_mirror(int mirror);
  57. extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
  58. #endif /* __MACH_OMAP1_LCD_DMA_H__ */