Commit | Line | Data |
---|---|---|
d7ab33a0 | 1 | /* |
8f995cc3 BD |
2 | * Copyright 2008 Openmoko, Inc. |
3 | * Copyright 2008 Simtec Electronics | |
d7ab33a0 | 4 | * Copyright 2009 Samsung Electronics Co. |
8f995cc3 | 5 | * |
d7ab33a0 PO |
6 | * Pawel Osciak <p.osciak@samsung.com> |
7 | * Based on plat-s3c/include/plat/regs-fb.h by Ben Dooks <ben@simtec.co.uk> | |
8f995cc3 | 8 | * |
d7ab33a0 | 9 | * Framebuffer register definitions for Samsung S3C64xx. |
8f995cc3 BD |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify | |
12 | * it under the terms of the GNU General Public License version 2 as | |
13 | * published by the Free Software Foundation. | |
14 | */ | |
15 | ||
d7ab33a0 PO |
16 | #ifndef __ASM_ARCH_MACH_REGS_FB_H |
17 | #define __ASM_ARCH_MACH_REGS_FB_H __FILE__ | |
8f995cc3 | 18 | |
d7ab33a0 | 19 | #include <plat/regs-fb-v4.h> |
8f995cc3 BD |
20 | |
21 | /* Palette registers */ | |
8f995cc3 BD |
22 | #define WIN2_PAL(_entry) (0x300 + ((_entry) * 2)) |
23 | #define WIN3_PAL(_entry) (0x320 + ((_entry) * 2)) | |
24 | #define WIN4_PAL(_entry) (0x340 + ((_entry) * 2)) | |
25 | #define WIN0_PAL(_entry) (0x400 + ((_entry) * 4)) | |
26 | #define WIN1_PAL(_entry) (0x800 + ((_entry) * 4)) | |
27 | ||
8f995cc3 BD |
28 | static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) |
29 | { | |
30 | switch (window) { | |
31 | case 0: return WIN0_PAL(reg); | |
32 | case 1: return WIN1_PAL(reg); | |
33 | case 2: return WIN2_PAL(reg); | |
34 | case 3: return WIN3_PAL(reg); | |
35 | case 4: return WIN4_PAL(reg); | |
36 | } | |
37 | ||
38 | BUG(); | |
39 | } | |
40 | ||
d7ab33a0 | 41 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ |