| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2012 Russell King |
|---|
| 3 | 4 | * Rewritten from the dovefb driver, and Armada510 manuals. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | 5 | */ |
|---|
| 9 | 6 | #ifndef ARMADA_HW_H |
|---|
| 10 | 7 | #define ARMADA_HW_H |
|---|
| .. | .. |
|---|
| 88 | 85 | ADV_VSYNC_H_OFF = 0xfff << 0, |
|---|
| 89 | 86 | }; |
|---|
| 90 | 87 | |
|---|
| 88 | +/* LCD_CFG_RDREG4F - Armada 510 only */ |
|---|
| 89 | +enum { |
|---|
| 90 | + CFG_SRAM_WAIT = BIT(11), |
|---|
| 91 | + CFG_SMPN_FASTTX = BIT(10), |
|---|
| 92 | + CFG_DMA_ARB = BIT(9), |
|---|
| 93 | + CFG_DMA_WM_EN = BIT(8), |
|---|
| 94 | + CFG_DMA_WM_MASK = 0xff, |
|---|
| 95 | +#define CFG_DMA_WM(x) ((x) & CFG_DMA_WM_MASK) |
|---|
| 96 | +}; |
|---|
| 97 | + |
|---|
| 91 | 98 | enum { |
|---|
| 92 | 99 | CFG_565 = 0, |
|---|
| 93 | 100 | CFG_1555 = 1, |
|---|
| .. | .. |
|---|
| 169 | 176 | SRAM_READ = 0 << 14, |
|---|
| 170 | 177 | SRAM_WRITE = 2 << 14, |
|---|
| 171 | 178 | SRAM_INIT = 3 << 14, |
|---|
| 179 | + SRAM_GAMMA_YR = 0x0 << 8, |
|---|
| 180 | + SRAM_GAMMA_UG = 0x1 << 8, |
|---|
| 181 | + SRAM_GAMMA_VB = 0x2 << 8, |
|---|
| 182 | + SRAM_PALETTE = 0x3 << 8, |
|---|
| 172 | 183 | SRAM_HWC32_RAM1 = 0xc << 8, |
|---|
| 173 | 184 | SRAM_HWC32_RAM2 = 0xd << 8, |
|---|
| 174 | 185 | SRAM_HWC32_RAMR = SRAM_HWC32_RAM1, |
|---|
| .. | .. |
|---|
| 315 | 326 | GRA_FF_ALLEMPTY = 1 << 1, |
|---|
| 316 | 327 | PWRDN_IRQ_LEVEL = 1 << 0, |
|---|
| 317 | 328 | }; |
|---|
| 318 | | - |
|---|
| 319 | | -static inline u32 armada_rect_hw_fp(struct drm_rect *r) |
|---|
| 320 | | -{ |
|---|
| 321 | | - return (drm_rect_height(r) & 0xffff0000) | drm_rect_width(r) >> 16; |
|---|
| 322 | | -} |
|---|
| 323 | | - |
|---|
| 324 | | -static inline u32 armada_rect_hw(struct drm_rect *r) |
|---|
| 325 | | -{ |
|---|
| 326 | | - return drm_rect_height(r) << 16 | (drm_rect_width(r) & 0x0000ffff); |
|---|
| 327 | | -} |
|---|
| 328 | | - |
|---|
| 329 | | -static inline u32 armada_rect_yx(struct drm_rect *r) |
|---|
| 330 | | -{ |
|---|
| 331 | | - return (r)->y1 << 16 | ((r)->x1 & 0x0000ffff); |
|---|
| 332 | | -} |
|---|
| 333 | 329 | |
|---|
| 334 | 330 | #endif |
|---|