aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/cyber2000fb.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-10-19 02:40:27 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:42 -0400
commit87d0613103aa279f8a39a497af09edbb068ef285 (patch)
treeb19f177cc551b32dc4b03f3ce63a39e95a414b93 /drivers/video/cyber2000fb.c
parent0624517d809b1cf53c977335c9bda4c216cbddee (diff)
cyber2000fb, rename BIT macro
cyber2000fb, rename BIT macro BIT will be global macro for (1 << x) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/cyber2000fb.c')
-rw-r--r--drivers/video/cyber2000fb.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index 9bb2cbfe4a3d..5e3edf475bf4 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -549,7 +549,7 @@ cyber2000fb_decode_crtc(struct par_info *hw, struct cfb_info *cfb,
549{ 549{
550 u_int Htotal, Hblankend, Hsyncend; 550 u_int Htotal, Hblankend, Hsyncend;
551 u_int Vtotal, Vdispend, Vblankstart, Vblankend, Vsyncstart, Vsyncend; 551 u_int Vtotal, Vdispend, Vblankstart, Vblankend, Vsyncstart, Vsyncend;
552#define BIT(v,b1,m,b2) (((v >> b1) & m) << b2) 552#define ENCODE_BIT(v,b1,m,b2) (((v >> b1) & m) << b2)
553 553
554 hw->crtc[13] = hw->pitch; 554 hw->crtc[13] = hw->pitch;
555 hw->crtc[17] = 0xe3; 555 hw->crtc[17] = 0xe3;
@@ -569,13 +569,13 @@ cyber2000fb_decode_crtc(struct par_info *hw, struct cfb_info *cfb,
569 569
570 Hblankend = (Htotal - 4*8) >> 3; 570 Hblankend = (Htotal - 4*8) >> 3;
571 571
572 hw->crtc[3] = BIT(Hblankend, 0, 0x1f, 0) | 572 hw->crtc[3] = ENCODE_BIT(Hblankend, 0, 0x1f, 0) |
573 BIT(1, 0, 0x01, 7); 573 ENCODE_BIT(1, 0, 0x01, 7);
574 574
575 Hsyncend = (var->xres + var->right_margin + var->hsync_len) >> 3; 575 Hsyncend = (var->xres + var->right_margin + var->hsync_len) >> 3;
576 576
577 hw->crtc[5] = BIT(Hsyncend, 0, 0x1f, 0) | 577 hw->crtc[5] = ENCODE_BIT(Hsyncend, 0, 0x1f, 0) |
578 BIT(Hblankend, 5, 0x01, 7); 578 ENCODE_BIT(Hblankend, 5, 0x01, 7);
579 579
580 Vdispend = var->yres - 1; 580 Vdispend = var->yres - 1;
581 Vsyncstart = var->yres + var->lower_margin; 581 Vsyncstart = var->yres + var->lower_margin;
@@ -590,20 +590,20 @@ cyber2000fb_decode_crtc(struct par_info *hw, struct cfb_info *cfb,
590 Vblankend = Vtotal - 10; 590 Vblankend = Vtotal - 10;
591 591
592 hw->crtc[6] = Vtotal; 592 hw->crtc[6] = Vtotal;
593 hw->crtc[7] = BIT(Vtotal, 8, 0x01, 0) | 593 hw->crtc[7] = ENCODE_BIT(Vtotal, 8, 0x01, 0) |
594 BIT(Vdispend, 8, 0x01, 1) | 594 ENCODE_BIT(Vdispend, 8, 0x01, 1) |
595 BIT(Vsyncstart, 8, 0x01, 2) | 595 ENCODE_BIT(Vsyncstart, 8, 0x01, 2) |
596 BIT(Vblankstart,8, 0x01, 3) | 596 ENCODE_BIT(Vblankstart,8, 0x01, 3) |
597 BIT(1, 0, 0x01, 4) | 597 ENCODE_BIT(1, 0, 0x01, 4) |
598 BIT(Vtotal, 9, 0x01, 5) | 598 ENCODE_BIT(Vtotal, 9, 0x01, 5) |
599 BIT(Vdispend, 9, 0x01, 6) | 599 ENCODE_BIT(Vdispend, 9, 0x01, 6) |
600 BIT(Vsyncstart, 9, 0x01, 7); 600 ENCODE_BIT(Vsyncstart, 9, 0x01, 7);
601 hw->crtc[9] = BIT(0, 0, 0x1f, 0) | 601 hw->crtc[9] = ENCODE_BIT(0, 0, 0x1f, 0) |
602 BIT(Vblankstart,9, 0x01, 5) | 602 ENCODE_BIT(Vblankstart,9, 0x01, 5) |
603 BIT(1, 0, 0x01, 6); 603 ENCODE_BIT(1, 0, 0x01, 6);
604 hw->crtc[10] = Vsyncstart; 604 hw->crtc[10] = Vsyncstart;
605 hw->crtc[11] = BIT(Vsyncend, 0, 0x0f, 0) | 605 hw->crtc[11] = ENCODE_BIT(Vsyncend, 0, 0x0f, 0) |
606 BIT(1, 0, 0x01, 7); 606 ENCODE_BIT(1, 0, 0x01, 7);
607 hw->crtc[12] = Vdispend; 607 hw->crtc[12] = Vdispend;
608 hw->crtc[15] = Vblankstart; 608 hw->crtc[15] = Vblankstart;
609 hw->crtc[16] = Vblankend; 609 hw->crtc[16] = Vblankend;
@@ -615,10 +615,10 @@ cyber2000fb_decode_crtc(struct par_info *hw, struct cfb_info *cfb,
615 * 4=LINECOMP:10 5-IVIDEO 6=FIXCNT 615 * 4=LINECOMP:10 5-IVIDEO 6=FIXCNT
616 */ 616 */
617 hw->crtc_ofl = 617 hw->crtc_ofl =
618 BIT(Vtotal, 10, 0x01, 0) | 618 ENCODE_BIT(Vtotal, 10, 0x01, 0) |
619 BIT(Vdispend, 10, 0x01, 1) | 619 ENCODE_BIT(Vdispend, 10, 0x01, 1) |
620 BIT(Vsyncstart, 10, 0x01, 2) | 620 ENCODE_BIT(Vsyncstart, 10, 0x01, 2) |
621 BIT(Vblankstart,10, 0x01, 3) | 621 ENCODE_BIT(Vblankstart,10, 0x01, 3) |
622 EXT_CRT_VRTOFL_LINECOMP10; 622 EXT_CRT_VRTOFL_LINECOMP10;
623 623
624 /* woody: set the interlaced bit... */ 624 /* woody: set the interlaced bit... */