diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-28 19:09:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-28 19:09:57 -0400 |
commit | 2604f6da1afb56fae5930b58349e43a2b0345933 (patch) | |
tree | 1744196a8cf6bf3edfd7ad63c6a10f1609bd206a /include | |
parent | 18c8baff8fe151ea02e00047afc369ee31939e9b (diff) | |
parent | 0f7ad450394560a6b6c72115e04bf7afd6230e70 (diff) |
Automatic merge of master.kernel.org:/home/rmk/linux-2.6-rmk.git
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/hardware/amba_clcd.h | 31 | ||||
-rw-r--r-- | include/asm-arm/hardware/clock.h | 7 |
2 files changed, 24 insertions, 14 deletions
diff --git a/include/asm-arm/hardware/amba_clcd.h b/include/asm-arm/hardware/amba_clcd.h index 2149be7c7023..ce4cf5c1c05d 100644 --- a/include/asm-arm/hardware/amba_clcd.h +++ b/include/asm-arm/hardware/amba_clcd.h | |||
@@ -153,7 +153,7 @@ struct clcd_fb { | |||
153 | 153 | ||
154 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | 154 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) |
155 | { | 155 | { |
156 | u32 val; | 156 | u32 val, cpl; |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * Program the CLCD controller registers and start the CLCD | 159 | * Program the CLCD controller registers and start the CLCD |
@@ -164,7 +164,10 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
164 | val |= (fb->fb.var.left_margin - 1) << 24; | 164 | val |= (fb->fb.var.left_margin - 1) << 24; |
165 | regs->tim0 = val; | 165 | regs->tim0 = val; |
166 | 166 | ||
167 | val = fb->fb.var.yres - 1; | 167 | val = fb->fb.var.yres; |
168 | if (fb->panel->cntl & CNTL_LCDDUAL) | ||
169 | val /= 2; | ||
170 | val -= 1; | ||
168 | val |= (fb->fb.var.vsync_len - 1) << 10; | 171 | val |= (fb->fb.var.vsync_len - 1) << 10; |
169 | val |= fb->fb.var.lower_margin << 16; | 172 | val |= fb->fb.var.lower_margin << 16; |
170 | val |= fb->fb.var.upper_margin << 24; | 173 | val |= fb->fb.var.upper_margin << 24; |
@@ -174,13 +177,17 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
174 | val |= fb->fb.var.sync & FB_SYNC_HOR_HIGH_ACT ? 0 : TIM2_IHS; | 177 | val |= fb->fb.var.sync & FB_SYNC_HOR_HIGH_ACT ? 0 : TIM2_IHS; |
175 | val |= fb->fb.var.sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS; | 178 | val |= fb->fb.var.sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS; |
176 | 179 | ||
177 | if (fb->panel->cntl & CNTL_LCDTFT) | 180 | cpl = fb->fb.var.xres_virtual; |
178 | val |= (fb->fb.var.xres_virtual - 1) << 16; | 181 | if (fb->panel->cntl & CNTL_LCDTFT) /* TFT */ |
179 | else if (fb->panel->cntl & CNTL_LCDBW) | 182 | /* / 1 */; |
180 | printk("what value for CPL for stnmono panels?"); | 183 | else if (!fb->fb.var.grayscale) /* STN color */ |
181 | else | 184 | cpl = cpl * 8 / 3; |
182 | val |= ((fb->fb.var.xres_virtual * 8 / 3) - 1) << 16; | 185 | else if (fb->panel->cntl & CNTL_LCDMONO8) /* STN monochrome, 8bit */ |
183 | regs->tim2 = val; | 186 | cpl /= 8; |
187 | else /* STN monochrome, 4bit */ | ||
188 | cpl /= 4; | ||
189 | |||
190 | regs->tim2 = val | ((cpl - 1) << 16); | ||
184 | 191 | ||
185 | regs->tim3 = fb->panel->tim3; | 192 | regs->tim3 = fb->panel->tim3; |
186 | 193 | ||
@@ -204,7 +211,7 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
204 | case 16: | 211 | case 16: |
205 | val |= CNTL_LCDBPP16; | 212 | val |= CNTL_LCDBPP16; |
206 | break; | 213 | break; |
207 | case 24: | 214 | case 32: |
208 | val |= CNTL_LCDBPP24; | 215 | val |= CNTL_LCDBPP24; |
209 | break; | 216 | break; |
210 | } | 217 | } |
@@ -215,8 +222,8 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
215 | 222 | ||
216 | static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) | 223 | static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) |
217 | { | 224 | { |
218 | var->xres_virtual = var->xres = (var->xres + 7) & ~7; | 225 | var->xres_virtual = var->xres = (var->xres + 15) & ~15; |
219 | var->yres_virtual = var->yres; | 226 | var->yres_virtual = var->yres = (var->yres + 1) & ~1; |
220 | 227 | ||
221 | #define CHECK(e,l,h) (var->e < l || var->e > h) | 228 | #define CHECK(e,l,h) (var->e < l || var->e > h) |
222 | if (CHECK(right_margin, (5+1), 256) || /* back porch */ | 229 | if (CHECK(right_margin, (5+1), 256) || /* back porch */ |
diff --git a/include/asm-arm/hardware/clock.h b/include/asm-arm/hardware/clock.h index 4983449ff2c7..19da861e523d 100644 --- a/include/asm-arm/hardware/clock.h +++ b/include/asm-arm/hardware/clock.h | |||
@@ -26,10 +26,13 @@ struct clk; | |||
26 | /** | 26 | /** |
27 | * clk_get - lookup and obtain a reference to a clock producer. | 27 | * clk_get - lookup and obtain a reference to a clock producer. |
28 | * @dev: device for clock "consumer" | 28 | * @dev: device for clock "consumer" |
29 | * @id: device ID | 29 | * @id: clock comsumer ID |
30 | * | 30 | * |
31 | * Returns a struct clk corresponding to the clock producer, or | 31 | * Returns a struct clk corresponding to the clock producer, or |
32 | * valid IS_ERR() condition containing errno. | 32 | * valid IS_ERR() condition containing errno. The implementation |
33 | * uses @dev and @id to determine the clock consumer, and thereby | ||
34 | * the clock producer. (IOW, @id may be identical strings, but | ||
35 | * clk_get may return different clock producers depending on @dev.) | ||
33 | */ | 36 | */ |
34 | struct clk *clk_get(struct device *dev, const char *id); | 37 | struct clk *clk_get(struct device *dev, const char *id); |
35 | 38 | ||