diff options
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r-- | drivers/video/pxafb.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index d6aa07b978ed..ab60537314fb 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <asm/irq.h> | 50 | #include <asm/irq.h> |
51 | #include <asm/div64.h> | 51 | #include <asm/div64.h> |
52 | #include <mach/pxa-regs.h> | 52 | #include <mach/pxa-regs.h> |
53 | #include <mach/pxa2xx-gpio.h> | ||
54 | #include <mach/bitfield.h> | 53 | #include <mach/bitfield.h> |
55 | #include <mach/pxafb.h> | 54 | #include <mach/pxafb.h> |
56 | 55 | ||
@@ -986,57 +985,6 @@ static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) | |||
986 | fbi->lcd_power(on, &fbi->fb.var); | 985 | fbi->lcd_power(on, &fbi->fb.var); |
987 | } | 986 | } |
988 | 987 | ||
989 | static void pxafb_setup_gpio(struct pxafb_info *fbi) | ||
990 | { | ||
991 | int gpio, ldd_bits; | ||
992 | unsigned int lccr0 = fbi->lccr0; | ||
993 | |||
994 | /* | ||
995 | * setup is based on type of panel supported | ||
996 | */ | ||
997 | |||
998 | /* 4 bit interface */ | ||
999 | if ((lccr0 & LCCR0_CMS) == LCCR0_Mono && | ||
1000 | (lccr0 & LCCR0_SDS) == LCCR0_Sngl && | ||
1001 | (lccr0 & LCCR0_DPD) == LCCR0_4PixMono) | ||
1002 | ldd_bits = 4; | ||
1003 | |||
1004 | /* 8 bit interface */ | ||
1005 | else if (((lccr0 & LCCR0_CMS) == LCCR0_Mono && | ||
1006 | ((lccr0 & LCCR0_SDS) == LCCR0_Dual || | ||
1007 | (lccr0 & LCCR0_DPD) == LCCR0_8PixMono)) || | ||
1008 | ((lccr0 & LCCR0_CMS) == LCCR0_Color && | ||
1009 | (lccr0 & LCCR0_PAS) == LCCR0_Pas && | ||
1010 | (lccr0 & LCCR0_SDS) == LCCR0_Sngl)) | ||
1011 | ldd_bits = 8; | ||
1012 | |||
1013 | /* 16 bit interface */ | ||
1014 | else if ((lccr0 & LCCR0_CMS) == LCCR0_Color && | ||
1015 | ((lccr0 & LCCR0_SDS) == LCCR0_Dual || | ||
1016 | (lccr0 & LCCR0_PAS) == LCCR0_Act)) | ||
1017 | ldd_bits = 16; | ||
1018 | |||
1019 | else { | ||
1020 | printk(KERN_ERR "pxafb_setup_gpio: unable to determine " | ||
1021 | "bits per pixel\n"); | ||
1022 | return; | ||
1023 | } | ||
1024 | |||
1025 | for (gpio = 58; ldd_bits; gpio++, ldd_bits--) | ||
1026 | pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT); | ||
1027 | /* 18 bit interface */ | ||
1028 | if (fbi->fb.var.bits_per_pixel > 16) { | ||
1029 | pxa_gpio_mode(86 | GPIO_ALT_FN_2_OUT); | ||
1030 | pxa_gpio_mode(87 | GPIO_ALT_FN_2_OUT); | ||
1031 | } | ||
1032 | pxa_gpio_mode(GPIO74_LCD_FCLK_MD); | ||
1033 | pxa_gpio_mode(GPIO75_LCD_LCLK_MD); | ||
1034 | pxa_gpio_mode(GPIO76_LCD_PCLK_MD); | ||
1035 | |||
1036 | if ((lccr0 & LCCR0_PAS) == 0) | ||
1037 | pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD); | ||
1038 | } | ||
1039 | |||
1040 | static void pxafb_enable_controller(struct pxafb_info *fbi) | 988 | static void pxafb_enable_controller(struct pxafb_info *fbi) |
1041 | { | 989 | { |
1042 | pr_debug("pxafb: Enabling LCD controller\n"); | 990 | pr_debug("pxafb: Enabling LCD controller\n"); |
@@ -1179,7 +1127,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) | |||
1179 | if (old_state == C_ENABLE) { | 1127 | if (old_state == C_ENABLE) { |
1180 | __pxafb_lcd_power(fbi, 0); | 1128 | __pxafb_lcd_power(fbi, 0); |
1181 | pxafb_disable_controller(fbi); | 1129 | pxafb_disable_controller(fbi); |
1182 | pxafb_setup_gpio(fbi); | ||
1183 | pxafb_enable_controller(fbi); | 1130 | pxafb_enable_controller(fbi); |
1184 | __pxafb_lcd_power(fbi, 1); | 1131 | __pxafb_lcd_power(fbi, 1); |
1185 | } | 1132 | } |
@@ -1202,7 +1149,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) | |||
1202 | */ | 1149 | */ |
1203 | if (old_state != C_ENABLE) { | 1150 | if (old_state != C_ENABLE) { |
1204 | fbi->state = C_ENABLE; | 1151 | fbi->state = C_ENABLE; |
1205 | pxafb_setup_gpio(fbi); | ||
1206 | pxafb_enable_controller(fbi); | 1152 | pxafb_enable_controller(fbi); |
1207 | __pxafb_lcd_power(fbi, 1); | 1153 | __pxafb_lcd_power(fbi, 1); |
1208 | __pxafb_backlight_power(fbi, 1); | 1154 | __pxafb_backlight_power(fbi, 1); |