diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/include/mach/regs-fb.h')
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/regs-fb.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h new file mode 100644 index 000000000000..f56611526c63 --- /dev/null +++ b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Copyright 2009 Samsung Electronics Co. | ||
5 | * | ||
6 | * Pawel Osciak <p.osciak@samsung.com> | ||
7 | * Based on plat-s3c/include/plat/regs-fb.h by Ben Dooks <ben@simtec.co.uk> | ||
8 | * | ||
9 | * Framebuffer register definitions for Samsung S3C64xx. | ||
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 | |||
16 | #ifndef __ASM_ARCH_MACH_REGS_FB_H | ||
17 | #define __ASM_ARCH_MACH_REGS_FB_H __FILE__ | ||
18 | |||
19 | #include <plat/regs-fb-v4.h> | ||
20 | |||
21 | /* Palette registers */ | ||
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 | |||
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 | |||
41 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ | ||