Commit 40321fd2 authored by Russell King's avatar Russell King Committed by Russell King

Merge branch 'for-rmk' of...

Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel

Conflicts:

	arch/arm/mach-pxa/am200epd.c
	arch/arm/mach-pxa/ezx.c
parents d83a12a4 3b24f30c
...@@ -27,15 +27,26 @@ endmenu ...@@ -27,15 +27,26 @@ endmenu
endif endif
config ARCH_GUMSTIX config ARCH_GUMSTIX
bool "Gumstix XScale boards" bool "Gumstix XScale 255 boards"
select PXA25x
help help
Say Y here if you intend to run this kernel on a Say Y here if you intend to run this kernel on
Gumstix Full Function Minature Computer. Basix, Connex, ws-200ax, ws-400ax systems
config MACH_GUMSTIX_F choice
bool "Basix, Connex, ws-200ax, ws-400ax systems" prompt "Gumstix Carrier/Expansion Board"
depends on ARCH_GUMSTIX depends on ARCH_GUMSTIX
select PXA25x
config GUMSTIX_AM200EPD
bool "Enable AM200EPD board support"
endchoice
config MACH_INTELMOTE2
bool "Intel Mote 2 Platform"
select PXA27x
select IWMMXT
select PXA_HAVE_BOARD_IRQS
config ARCH_LUBBOCK config ARCH_LUBBOCK
bool "Intel DBPXA250 Development Platform" bool "Intel DBPXA250 Development Platform"
...@@ -348,10 +359,6 @@ config PCM990_DISPLAY_NONE ...@@ -348,10 +359,6 @@ config PCM990_DISPLAY_NONE
endchoice endchoice
config MACH_AM200EPD
depends on MACH_GUMSTIX_F
bool "Enable AM200EPD board support"
config PXA_EZX config PXA_EZX
bool "Motorola EZX Platform" bool "Motorola EZX Platform"
select PXA27x select PXA27x
......
...@@ -27,7 +27,7 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o ...@@ -27,7 +27,7 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o
# Specific board support # Specific board support
obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
obj-$(CONFIG_MACH_AM200EPD) += am200epd.o obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o
obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
...@@ -70,6 +70,8 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o ...@@ -70,6 +70,8 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o
obj-$(CONFIG_MACH_CM_X300) += cm-x300.o obj-$(CONFIG_MACH_CM_X300) += cm-x300.o
obj-$(CONFIG_PXA_EZX) += ezx.o obj-$(CONFIG_PXA_EZX) += ezx.o
obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o
# Support for blinky lights # Support for blinky lights
led-y := leds.o led-y := leds.o
led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o
......
...@@ -344,7 +344,7 @@ static unsigned long am200_pin_config[] __initdata = { ...@@ -344,7 +344,7 @@ static unsigned long am200_pin_config[] __initdata = {
GPIO16_GPIO, GPIO16_GPIO,
}; };
static int __init am200_init(void) int __init am200_init(void)
{ {
int ret; int ret;
...@@ -382,8 +382,6 @@ static int __init am200_init(void) ...@@ -382,8 +382,6 @@ static int __init am200_init(void)
module_param(panel_type, uint, 0); module_param(panel_type, uint, 0);
MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97"); MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97");
module_init(am200_init);
MODULE_DESCRIPTION("board driver for am200 metronome epd kit"); MODULE_DESCRIPTION("board driver for am200 metronome epd kit");
MODULE_AUTHOR("Jaya Kumar"); MODULE_AUTHOR("Jaya Kumar");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -210,10 +210,8 @@ static struct pxafb_mode_info generic_stn_320x240_mode = { ...@@ -210,10 +210,8 @@ static struct pxafb_mode_info generic_stn_320x240_mode = {
static struct pxafb_mach_info generic_stn_320x240 = { static struct pxafb_mach_info generic_stn_320x240 = {
.modes = &generic_stn_320x240_mode, .modes = &generic_stn_320x240_mode,
.num_modes = 1, .num_modes = 1,
.lccr0 = 0, .lcd_conn = LCD_COLOR_STN_8BPP | LCD_PCLK_EDGE_FALL |\
.lccr3 = (LCCR3_PixClkDiv(0x03) | LCD_AC_BIAS_FREQ(0xff),
LCCR3_Acb(0xff) |
LCCR3_PCP),
.cmap_inverse = 0, .cmap_inverse = 0,
.cmap_static = 0, .cmap_static = 0,
}; };
...@@ -236,10 +234,8 @@ static struct pxafb_mode_info generic_tft_640x480_mode = { ...@@ -236,10 +234,8 @@ static struct pxafb_mode_info generic_tft_640x480_mode = {
static struct pxafb_mach_info generic_tft_640x480 = { static struct pxafb_mach_info generic_tft_640x480 = {
.modes = &generic_tft_640x480_mode, .modes = &generic_tft_640x480_mode,
.num_modes = 1, .num_modes = 1,
.lccr0 = (LCCR0_PAS), .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_PCLK_EDGE_FALL |\
.lccr3 = (LCCR3_PixClkDiv(0x01) | LCD_AC_BIAS_FREQ(0xff),
LCCR3_Acb(0xff) |
LCCR3_PCP),
.cmap_inverse = 0, .cmap_inverse = 0,
.cmap_static = 0, .cmap_static = 0,
}; };
...@@ -263,9 +259,7 @@ static struct pxafb_mode_info generic_crt_640x480_mode = { ...@@ -263,9 +259,7 @@ static struct pxafb_mode_info generic_crt_640x480_mode = {
static struct pxafb_mach_info generic_crt_640x480 = { static struct pxafb_mach_info generic_crt_640x480 = {
.modes = &generic_crt_640x480_mode, .modes = &generic_crt_640x480_mode,
.num_modes = 1, .num_modes = 1,
.lccr0 = (LCCR0_PAS), .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_AC_BIAS_FREQ(0xff),
.lccr3 = (LCCR3_PixClkDiv(0x01) |
LCCR3_Acb(0xff)),
.cmap_inverse = 0, .cmap_inverse = 0,
.cmap_static = 0, .cmap_static = 0,
}; };
...@@ -289,9 +283,7 @@ static struct pxafb_mode_info generic_crt_800x600_mode = { ...@@ -289,9 +283,7 @@ static struct pxafb_mode_info generic_crt_800x600_mode = {
static struct pxafb_mach_info generic_crt_800x600 = { static struct pxafb_mach_info generic_crt_800x600 = {
.modes = &generic_crt_800x600_mode, .modes = &generic_crt_800x600_mode,
.num_modes = 1, .num_modes = 1,
.lccr0 = (LCCR0_PAS), .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_AC_BIAS_FREQ(0xff),
.lccr3 = (LCCR3_PixClkDiv(0x02) |
LCCR3_Acb(0xff)),
.cmap_inverse = 0, .cmap_inverse = 0,
.cmap_static = 0, .cmap_static = 0,
}; };
...@@ -314,10 +306,7 @@ static struct pxafb_mode_info generic_tft_320x240_mode = { ...@@ -314,10 +306,7 @@ static struct pxafb_mode_info generic_tft_320x240_mode = {
static struct pxafb_mach_info generic_tft_320x240 = { static struct pxafb_mach_info generic_tft_320x240 = {
.modes = &generic_tft_320x240_mode, .modes = &generic_tft_320x240_mode,
.num_modes = 1, .num_modes = 1,
.lccr0 = (LCCR0_PAS), .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_AC_BIAS_FREQ(0xff),
.lccr3 = (LCCR3_PixClkDiv(0x06) |
LCCR3_Acb(0xff) |
LCCR3_PCP),
.cmap_inverse = 0, .cmap_inverse = 0,
.cmap_static = 0, .cmap_static = 0,
}; };
...@@ -341,9 +330,7 @@ static struct pxafb_mode_info generic_stn_640x480_mode = { ...@@ -341,9 +330,7 @@ static struct pxafb_mode_info generic_stn_640x480_mode = {
static struct pxafb_mach_info generic_stn_640x480 = { static struct pxafb_mach_info generic_stn_640x480 = {
.modes = &generic_stn_640x480_mode, .modes = &generic_stn_640x480_mode,
.num_modes = 1, .num_modes = 1,
.lccr0 = 0, .lcd_conn = LCD_COLOR_STN_8BPP | LCD_AC_BIAS_FREQ(0xff),
.lccr3 = (LCCR3_PixClkDiv(0x02) |
LCCR3_Acb(0xff)),
.cmap_inverse = 0, .cmap_inverse = 0,
.cmap_static = 0, .cmap_static = 0,
}; };
......
...@@ -52,7 +52,7 @@ static struct pxafb_mode_info e400_pxafb_mode_info = { ...@@ -52,7 +52,7 @@ static struct pxafb_mode_info e400_pxafb_mode_info = {
static struct pxafb_mach_info e400_pxafb_mach_info = { static struct pxafb_mach_info e400_pxafb_mach_info = {
.modes = &e400_pxafb_mode_info, .modes = &e400_pxafb_mode_info,
.num_modes = 1, .num_modes = 1,
.lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, .lcd_conn = LCD_COLOR_TFT_16BPP,
.lccr3 = 0, .lccr3 = 0,
.pxafb_backlight_power = NULL, .pxafb_backlight_power = NULL,
}; };
......
This diff is collapsed.
...@@ -186,6 +186,20 @@ static unsigned long gumstix_pin_config[] __initdata = { ...@@ -186,6 +186,20 @@ static unsigned long gumstix_pin_config[] __initdata = {
GPIO8_MMC_CS0, GPIO8_MMC_CS0,
}; };
int __attribute__((weak)) am200_init(void)
{
return 0;
}
static void __init carrier_board_init(void)
{
/*
* put carrier/expansion board init here if
* they cannot be detected programatically
*/
am200_init();
}
static void __init gumstix_init(void) static void __init gumstix_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config));
...@@ -194,6 +208,7 @@ static void __init gumstix_init(void) ...@@ -194,6 +208,7 @@ static void __init gumstix_init(void)
gumstix_udc_init(); gumstix_udc_init();
gumstix_mmc_init(); gumstix_mmc_init();
(void) platform_add_devices(devices, ARRAY_SIZE(devices)); (void) platform_add_devices(devices, ARRAY_SIZE(devices));
carrier_board_init();
} }
MACHINE_START(GUMSTIX, "Gumstix") MACHINE_START(GUMSTIX, "Gumstix")
......
This diff is collapsed.
...@@ -94,3 +94,7 @@ has detected a cable insertion; driven low otherwise. */ ...@@ -94,3 +94,7 @@ has detected a cable insertion; driven low otherwise. */
#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
/* for expansion boards that can't be programatically detected */
extern int am200_init(void);
#ifndef __ASM_ARCH_ZYLONITE_H #ifndef __ASM_ARCH_LITTLETON_H
#define __ASM_ARCH_ZYLONITE_H #define __ASM_ARCH_LITTLETON_H
#include <mach/gpio.h>
#define LITTLETON_ETH_PHYS 0x30000000 #define LITTLETON_ETH_PHYS 0x30000000
#define LITTLETON_GPIO_LCD_CS (17) #define LITTLETON_GPIO_LCD_CS (17)
#endif /* __ASM_ARCH_ZYLONITE_H */ #define EXT0_GPIO_BASE (NR_BUILTIN_GPIO)
#define EXT0_GPIO(x) (EXT0_GPIO_BASE + (x))
#endif /* __ASM_ARCH_LITTLETON_H */
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN) #define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN)
#define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN) #define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN)
#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) #define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
#define LCD_COLOR_TFT_8BPP ((8 << 4) | LCD_TYPE_COLOR_TFT)
#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) #define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) #define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
#define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL) #define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL)
...@@ -94,6 +95,10 @@ struct pxafb_mode_info { ...@@ -94,6 +95,10 @@ struct pxafb_mode_info {
* in pxa27x and pxa3xx, initialize them to the same value or * in pxa27x and pxa3xx, initialize them to the same value or
* the larger one will be used * the larger one will be used
* 3. same to {rd,wr}_pulse_width * 3. same to {rd,wr}_pulse_width
*
* 4. LCD_PCLK_EDGE_{RISE,FALL} controls the L_PCLK_WR polarity
* 5. sync & FB_SYNC_HOR_HIGH_ACT controls the L_LCLK_A0
* 6. sync & FB_SYNC_VERT_HIGH_ACT controls the L_LCLK_RD
*/ */
unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */ unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */
unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */ unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
......
...@@ -177,4 +177,11 @@ ...@@ -177,4 +177,11 @@
#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) #define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) #define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
/* SMART_DELAY() is introduced for software controlled delay primitive which
* can be inserted between command sequences, unused command 0x6 is used here
* and delay ranges from 0ms ~ 255ms
*/
#define SMART_CMD_DELAY (0x6 << 9)
#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff))
#endif /* __ASM_ARCH_REGS_LCD_H */ #endif /* __ASM_ARCH_REGS_LCD_H */
...@@ -35,7 +35,7 @@ static inline void flush(void) ...@@ -35,7 +35,7 @@ static inline void flush(void)
static inline void arch_decomp_setup(void) static inline void arch_decomp_setup(void)
{ {
if (machine_is_littleton()) if (machine_is_littleton() || machine_is_intelmote2())
UART = STUART; UART = STUART;
} }
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/smc91x.h> #include <linux/smc91x.h>
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/mfd/da903x.h>
#include <linux/i2c/max732x.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -40,6 +44,7 @@ ...@@ -40,6 +44,7 @@
#include <mach/pxafb.h> #include <mach/pxafb.h>
#include <mach/ssp.h> #include <mach/ssp.h>
#include <mach/pxa2xx_spi.h> #include <mach/pxa2xx_spi.h>
#include <mach/i2c.h>
#include <mach/pxa27x_keypad.h> #include <mach/pxa27x_keypad.h>
#include <mach/pxa3xx_nand.h> #include <mach/pxa3xx_nand.h>
#include <mach/littleton.h> #include <mach/littleton.h>
...@@ -314,6 +319,73 @@ static void __init littleton_init_nand(void) ...@@ -314,6 +319,73 @@ static void __init littleton_init_nand(void)
static inline void littleton_init_nand(void) {} static inline void littleton_init_nand(void) {}
#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
static struct led_info littleton_da9034_leds[] = {
[0] = {
.name = "littleton:keypad1",
.flags = DA9034_LED_RAMP,
},
[1] = {
.name = "littleton:keypad2",
.flags = DA9034_LED_RAMP,
},
[2] = {
.name = "littleton:vibra",
.flags = 0,
},
};
static struct da903x_subdev_info littleton_da9034_subdevs[] = {
{
.name = "da903x-led",
.id = DA9034_ID_LED_1,
.platform_data = &littleton_da9034_leds[0],
}, {
.name = "da903x-led",
.id = DA9034_ID_LED_2,
.platform_data = &littleton_da9034_leds[1],
}, {
.name = "da903x-led",
.id = DA9034_ID_VIBRA,
.platform_data = &littleton_da9034_leds[2],
}, {
.name = "da903x-backlight",
.id = DA9034_ID_WLED,
},
};
static struct da903x_platform_data littleton_da9034_info = {
.num_subdevs = ARRAY_SIZE(littleton_da9034_subdevs),
.subdevs = littleton_da9034_subdevs,
};
static struct max732x_platform_data littleton_max7320_info = {
.gpio_base = EXT0_GPIO_BASE,
};
static struct i2c_board_info littleton_i2c_info[] = {
[0] = {
.type = "da9034",
.addr = 0x34,
.platform_data = &littleton_da9034_info,
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)),
},
[1] = {
.type = "max7320",
.addr = 0x50,
.platform_data = &littleton_max7320_info,
},
};
static void __init littleton_init_i2c(void)
{
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info));
}
#else
static inline void littleton_init_i2c(void) {}
#endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */
static void __init littleton_init(void) static void __init littleton_init(void)
{ {
/* initialize MFP configurations */ /* initialize MFP configurations */
...@@ -326,6 +398,7 @@ static void __init littleton_init(void) ...@@ -326,6 +398,7 @@ static void __init littleton_init(void)
platform_device_register(&smc91x_device); platform_device_register(&smc91x_device);
littleton_init_spi(); littleton_init_spi();
littleton_init_i2c();
littleton_init_lcd(); littleton_init_lcd();
littleton_init_keypad(); littleton_init_keypad();
littleton_init_nand(); littleton_init_nand();
......
...@@ -336,8 +336,7 @@ static struct pxafb_mach_info toppoly_info = { ...@@ -336,8 +336,7 @@ static struct pxafb_mach_info toppoly_info = {
.modes = toppoly_modes, .modes = toppoly_modes,
.num_modes = 1, .num_modes = 1,
.fixed_modes = 1, .fixed_modes = 1,
.lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, .lcd_conn = LCD_COLOR_TFT_16BPP,
.lccr3 = LCCR3_PixRsEdg,
.pxafb_lcd_power = toppoly_lcd_power, .pxafb_lcd_power = toppoly_lcd_power,
}; };
...@@ -345,8 +344,8 @@ static struct pxafb_mach_info samsung_info = { ...@@ -345,8 +344,8 @@ static struct pxafb_mach_info samsung_info = {
.modes = samsung_modes, .modes = samsung_modes,
.num_modes = 1, .num_modes = 1,
.fixed_modes = 1, .fixed_modes = 1,
.lccr0 = LCCR0_LDDALT | LCCR0_Color | LCCR0_Sngl | LCCR0_Act, .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |\
.lccr3 = LCCR3_PixFlEdg, LCD_ALTERNATE_MAPPING,
.pxafb_lcd_power = samsung_lcd_power, .pxafb_lcd_power = samsung_lcd_power,
}; };
......
...@@ -104,8 +104,7 @@ static struct pxafb_mode_info fb_info_sharp_lq084v1dg21 = { ...@@ -104,8 +104,7 @@ static struct pxafb_mode_info fb_info_sharp_lq084v1dg21 = {
static struct pxafb_mach_info pcm990_fbinfo __initdata = { static struct pxafb_mach_info pcm990_fbinfo __initdata = {
.modes = &fb_info_sharp_lq084v1dg21, .modes = &fb_info_sharp_lq084v1dg21,
.num_modes = 1, .num_modes = 1,
.lccr0 = LCCR0_PAS, .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
.lccr3 = LCCR3_PCP,
.pxafb_lcd_power = pcm990_lcd_power, .pxafb_lcd_power = pcm990_lcd_power,
}; };
#elif defined(CONFIG_PCM990_DISPLAY_NEC) #elif defined(CONFIG_PCM990_DISPLAY_NEC)
...@@ -127,8 +126,7 @@ struct pxafb_mode_info fb_info_nec_nl6448bc20_18d = { ...@@ -127,8 +126,7 @@ struct pxafb_mode_info fb_info_nec_nl6448bc20_18d = {
static struct pxafb_mach_info pcm990_fbinfo __initdata = { static struct pxafb_mach_info pcm990_fbinfo __initdata = {
.modes = &fb_info_nec_nl6448bc20_18d, .modes = &fb_info_nec_nl6448bc20_18d,
.num_modes = 1, .num_modes = 1,
.lccr0 = LCCR0_Act, .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
.lccr3 = LCCR3_PixFlEdg,
.pxafb_lcd_power = pcm990_lcd_power, .pxafb_lcd_power = pcm990_lcd_power,
}; };
#endif #endif
......
...@@ -17,19 +17,44 @@ ...@@ -17,19 +17,44 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/i2c.h>
#include <linux/smc91x.h> #include <linux/smc91x.h>
#include <linux/mfd/da903x.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/pxa3xx-regs.h> #include <mach/pxa3xx-regs.h>
#include <mach/mfp-pxa930.h> #include <mach/mfp-pxa930.h>
#include <mach/i2c.h>
#include <mach/regs-lcd.h>
#include <mach/pxafb.h>
#include "devices.h" #include "devices.h"
#include "generic.h" #include "generic.h"
#define GPIO_LCD_RESET (16)
/* SAAR MFP configurations */ /* SAAR MFP configurations */
static mfp_cfg_t saar_mfp_cfg[] __initdata = { static mfp_cfg_t saar_mfp_cfg[] __initdata = {
/* LCD */
GPIO23_LCD_DD0,
GPIO24_LCD_DD1,
GPIO25_LCD_DD2,
GPIO26_LCD_DD3,
GPIO27_LCD_DD4,
GPIO28_LCD_DD5,
GPIO29_LCD_DD6,
GPIO44_LCD_DD7,
GPIO21_LCD_CS,
GPIO22_LCD_VSYNC,
GPIO17_LCD_FCLK_RD,
GPIO18_LCD_LCLK_A0,
GPIO19_LCD_PCLK_WR,
GPIO16_GPIO, /* LCD reset */
/* Ethernet */ /* Ethernet */
DF_nCS1_nCS3, DF_nCS1_nCS3,
GPIO97_GPIO, GPIO97_GPIO,
...@@ -64,12 +89,408 @@ static struct platform_device smc91x_device = { ...@@ -64,12 +89,408 @@ static struct platform_device smc91x_device = {
}, },
}; };
#if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULE)
static uint16_t lcd_power_on[] = {
/* single frame */
SMART_CMD_NOOP,
SMART_CMD(0x00),
SMART_DELAY(0),
SMART_CMD_NOOP,
SMART_CMD(0x00),
SMART_DELAY(0),
SMART_CMD_NOOP,
SMART_CMD(0x00),
SMART_DELAY(0),
SMART_CMD_NOOP,
SMART_CMD(0x00),
SMART_DELAY(10),
/* calibration control */
SMART_CMD(0x00),
SMART_CMD(0xA4),
SMART_DAT(0x80),
SMART_DAT(0x01),
SMART_DELAY(150),
/*Power-On Init sequence*/
SMART_CMD(0x00), /* output ctrl */
SMART_CMD(0x01),
SMART_DAT(0x01),
SMART_DAT(0x00),
SMART_CMD(0x00), /* wave ctrl */
SMART_CMD(0x02),
SMART_DAT(0x07),
SMART_DAT(0x00),
SMART_CMD(0x00),
SMART_CMD(0x03), /* entry mode */
SMART_DAT(0xD0),
SMART_DAT(0x30),
SMART_CMD(0x00),
SMART_CMD(0x08), /* display ctrl 2 */
SMART_DAT(0x08),
SMART_DAT(0x08),
SMART_CMD(0x00),
SMART_CMD(0x09), /* display ctrl 3 */
SMART_DAT(0x04),
SMART_DAT(0x2F),
SMART_CMD(0x00),
SMART_CMD(0x0A), /* display ctrl 4 */
SMART_DAT(0x00),
SMART_DAT(0x08),
SMART_CMD(0x00),
SMART_CMD(0x0D), /* Frame Marker position */
SMART_DAT(0x00),
SMART_DAT(0x08),
SMART_CMD(0x00),
SMART_CMD(0x60), /* Driver output control */
SMART_DAT(0x27),
SMART_DAT(0x00),
SMART_CMD(0x00),
SMART_CMD(0x61), /* Base image display control */
SMART_DAT(0x00),
SMART_DAT(0x01),
SMART_CMD(0x00),
SMART_CMD(0x30), /* Y settings 30h-3Dh */
SMART_DAT(0x07),
SMART_DAT(0x07),
SMART_CMD(0x00),
SMART_CMD(0x31),
SMART_DAT(0x00),
SMART_DAT(0x07),
SMART_CMD(0x00),
SMART_CMD(0x32), /* Timing(3), ASW HOLD=0.5CLK */
SMART_DAT(0x04),
SMART_DAT(0x00),
SMART_CMD(0x00),
SMART_CMD(0x33), /* Timing(4), CKV ST=0CLK, CKV ED=1CLK */
SMART_DAT(0x03),
SMART_DAT(0x03),
SMART_CMD(0x00),
SMART_CMD(0x34),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00),
SMART_CMD(0x35),
SMART_DAT(0x02),
SMART_DAT(0x05),
SMART_CMD(0x00),
SMART_CMD(0x36),
SMART_DAT(0x1F),
SMART_DAT(0x1F),
SMART_CMD(0x00),
SMART_CMD(0x37),
SMART_DAT(0x07),
SMART_DAT(0x07),
SMART_CMD(0x00),
SMART_CMD(0x38),
SMART_DAT(0x00),
SMART_DAT(0x07),
SMART_CMD(0x00),
SMART_CMD(0x39),
SMART_DAT(0x04),
SMART_DAT(0x00),
SMART_CMD(0x00),
SMART_CMD(0x3A),
SMART_DAT(0x03),
SMART_DAT(0x03),
SMART_CMD(0x00),
SMART_CMD(0x3B),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00),
SMART_CMD(0x3C),
SMART_DAT(0x02),
SMART_DAT(0x05),
SMART_CMD(0x00),
SMART_CMD(0x3D),
SMART_DAT(0x1F),
SMART_DAT(0x1F),
SMART_CMD(0x00), /* Display control 1 */
SMART_CMD(0x07),
SMART_DAT(0x00),
SMART_DAT(0x01),
SMART_CMD(0x00), /* Power control 5 */
SMART_CMD(0x17),
SMART_DAT(0x00),
SMART_DAT(0x01),
SMART_CMD(0x00), /* Power control 1 */
SMART_CMD(0x10),
SMART_DAT(0x10),
SMART_DAT(0xB0),
SMART_CMD(0x00), /* Power control 2 */
SMART_CMD(0x11),
SMART_DAT(0x01),
SMART_DAT(0x30),
SMART_CMD(0x00), /* Power control 3 */
SMART_CMD(0x12),
SMART_DAT(0x01),
SMART_DAT(0x9E),
SMART_CMD(0x00), /* Power control 4 */
SMART_CMD(0x13),
SMART_DAT(0x17),
SMART_DAT(0x00),
SMART_CMD(0x00), /* Power control 3 */
SMART_CMD(0x12),
SMART_DAT(0x01),
SMART_DAT(0xBE),
SMART_DELAY(100),
/* display mode : 240*320 */
SMART_CMD(0x00), /* RAM address set(H) 0*/
SMART_CMD(0x20),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* RAM address set(V) 4*/
SMART_CMD(0x21),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* Start of Window RAM address set(H) 8*/
SMART_CMD(0x50),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* End of Window RAM address set(H) 12*/
SMART_CMD(0x51),
SMART_DAT(0x00),
SMART_DAT(0xEF),
SMART_CMD(0x00), /* Start of Window RAM address set(V) 16*/
SMART_CMD(0x52),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* End of Window RAM address set(V) 20*/
SMART_CMD(0x53),
SMART_DAT(0x01),
SMART_DAT(0x3F),
SMART_CMD(0x00), /* Panel interface control 1 */
SMART_CMD(0x90),
SMART_DAT(0x00),
SMART_DAT(0x1A),
SMART_CMD(0x00), /* Panel interface control 2 */
SMART_CMD(0x92),
SMART_DAT(0x04),
SMART_DAT(0x00),
SMART_CMD(0x00), /* Panel interface control 3 */
SMART_CMD(0x93),
SMART_DAT(0x00),
SMART_DAT(0x05),
SMART_DELAY(20),
};
static uint16_t lcd_panel_on[] = {
SMART_CMD(0x00),
SMART_CMD(0x07),
SMART_DAT(0x00),
SMART_DAT(0x21),
SMART_DELAY(1),
SMART_CMD(0x00),
SMART_CMD(0x07),
SMART_DAT(0x00),
SMART_DAT(0x61),
SMART_DELAY(100),
SMART_CMD(0x00),
SMART_CMD(0x07),
SMART_DAT(0x01),
SMART_DAT(0x73),
SMART_DELAY(1),
};
static uint16_t lcd_panel_off[] = {
SMART_CMD(0x00),
SMART_CMD(0x07),
SMART_DAT(0x00),
SMART_DAT(0x72),
SMART_DELAY(40),
SMART_CMD(0x00),
SMART_CMD(0x07),
SMART_DAT(0x00),
SMART_DAT(0x01),
SMART_DELAY(1),
SMART_CMD(0x00),
SMART_CMD(0x07),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_DELAY(1),
};
static uint16_t lcd_power_off[] = {
SMART_CMD(0x00),
SMART_CMD(0x10),
SMART_DAT(0x00),
SMART_DAT(0x80),
SMART_CMD(0x00),
SMART_CMD(0x11),
SMART_DAT(0x01),
SMART_DAT(0x60),
SMART_CMD(0x00),
SMART_CMD(0x12),
SMART_DAT(0x01),
SMART_DAT(0xAE),
SMART_DELAY(40),
SMART_CMD(0x00),
SMART_CMD(0x10),
SMART_DAT(0x00),
SMART_DAT(0x00),
};
static uint16_t update_framedata[] = {
/* set display ram: 240*320 */
SMART_CMD(0x00), /* RAM address set(H) 0*/
SMART_CMD(0x20),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* RAM address set(V) 4*/
SMART_CMD(0x21),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* Start of Window RAM address set(H) 8 */
SMART_CMD(0x50),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* End of Window RAM address set(H) 12 */
SMART_CMD(0x51),
SMART_DAT(0x00),
SMART_DAT(0xEF),
SMART_CMD(0x00), /* Start of Window RAM address set(V) 16 */
SMART_CMD(0x52),
SMART_DAT(0x00),
SMART_DAT(0x00),
SMART_CMD(0x00), /* End of Window RAM address set(V) 20 */
SMART_CMD(0x53),
SMART_DAT(0x01),
SMART_DAT(0x3F),
/* wait for vsync cmd before transferring frame data */
SMART_CMD_WAIT_FOR_VSYNC,
/* write ram */
SMART_CMD(0x00),
SMART_CMD(0x22),
/* write frame data */
SMART_CMD_WRITE_FRAME,
};
static void ltm022a97a_lcd_power(int on, struct fb_var_screeninfo *var)
{
static int pin_requested = 0;
struct fb_info *info = container_of(var, struct fb_info, var);
int err;
if (!pin_requested) {
err = gpio_request(GPIO_LCD_RESET, "lcd reset");
if (err) {
pr_err("failed to request gpio for LCD reset\n");
return;
}
gpio_direction_output(GPIO_LCD_RESET, 0);
pin_requested = 1;
}
if (on) {
gpio_set_value(GPIO_LCD_RESET, 0); msleep(100);
gpio_set_value(GPIO_LCD_RESET, 1); msleep(10);
pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_power_on));
pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_panel_on));
} else {
pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_panel_off));
pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_power_off));
}
err = pxafb_smart_flush(info);
if (err)
pr_err("%s: timed out\n", __func__);
}
static void ltm022a97a_update(struct fb_info *info)
{
pxafb_smart_queue(info, ARRAY_AND_SIZE(update_framedata));
pxafb_smart_flush(info);
}
static struct pxafb_mode_info toshiba_ltm022a97a_modes[] = {
[0] = {
.xres = 240,
.yres = 320,
.bpp = 16,
.a0csrd_set_hld = 30,
.a0cswr_set_hld = 30,
.wr_pulse_width = 30,
.rd_pulse_width = 30,
.op_hold_time = 30,
.cmd_inh_time = 60,
/* L_LCLK_A0 and L_LCLK_RD active low */
.sync = FB_SYNC_HOR_HIGH_ACT |
FB_SYNC_VERT_HIGH_ACT,
},
};
static struct pxafb_mach_info saar_lcd_info = {
.modes = toshiba_ltm022a97a_modes,
.num_modes = 1,
.lcd_conn = LCD_SMART_PANEL_8BPP | LCD_PCLK_EDGE_FALL,
.pxafb_lcd_power = ltm022a97a_lcd_power,
.smart_update = ltm022a97a_update,
};
static void __init saar_init_lcd(void)
{
set_pxa_fb_info(&saar_lcd_info);
}
#else
static inline void saar_init_lcd(void) {}
#endif
#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
static struct da903x_subdev_info saar_da9034_subdevs[] = {
[0] = {
.name = "da903x-backlight",
.id = DA9034_ID_WLED,
},
};
static struct da903x_platform_data saar_da9034_info = {
.num_subdevs = ARRAY_SIZE(saar_da9034_subdevs),
.subdevs = saar_da9034_subdevs,
};
static struct i2c_board_info saar_i2c_info[] = {
[0] = {
.type = "da9034",
.addr = 0x34,
.platform_data = &saar_da9034_info,
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
},
};
static void __init saar_init_i2c(void)
{
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(saar_i2c_info));
}
#else
static inline void saar_init_i2c(void) {}
#endif
static void __init saar_init(void) static void __init saar_init(void)
{ {
/* initialize MFP configurations */ /* initialize MFP configurations */
pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg));
platform_device_register(&smc91x_device); platform_device_register(&smc91x_device);
saar_init_i2c();
saar_init_lcd();
} }
MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)") MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <mach/pxa-regs.h> #include <mach/pxa-regs.h>
#include <mach/pxa2xx-gpio.h>
#include <mach/bitfield.h> #include <mach/bitfield.h>
#include <mach/pxafb.h> #include <mach/pxafb.h>
...@@ -724,12 +723,19 @@ int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds) ...@@ -724,12 +723,19 @@ int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds)
int i; int i;
struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb);
/* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */ for (i = 0; i < n_cmds; i++, cmds++) {
for (i = 0; i < n_cmds; i++) { /* if it is a software delay, flush and delay */
if ((*cmds & 0xff00) == SMART_CMD_DELAY) {
pxafb_smart_flush(info);
mdelay(*cmds & 0xff);
continue;
}
/* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */
if (fbi->n_smart_cmds == CMD_BUFF_SIZE - 8) if (fbi->n_smart_cmds == CMD_BUFF_SIZE - 8)
pxafb_smart_flush(info); pxafb_smart_flush(info);
fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds++; fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds;
} }
return 0; return 0;
...@@ -761,7 +767,9 @@ static void setup_smart_timing(struct pxafb_info *fbi, ...@@ -761,7 +767,9 @@ static void setup_smart_timing(struct pxafb_info *fbi,
LCCR1_HorSnchWdth(__smart_timing(t3, lclk)); LCCR1_HorSnchWdth(__smart_timing(t3, lclk));
fbi->reg_lccr2 = LCCR2_DisHght(var->yres); fbi->reg_lccr2 = LCCR2_DisHght(var->yres);
fbi->reg_lccr3 = LCCR3_PixClkDiv(__smart_timing(t4, lclk)); fbi->reg_lccr3 = fbi->lccr3 | LCCR3_PixClkDiv(__smart_timing(t4, lclk));
fbi->reg_lccr3 |= (var->sync & FB_SYNC_HOR_HIGH_ACT) ? LCCR3_HSP : 0;
fbi->reg_lccr3 |= (var->sync & FB_SYNC_VERT_HIGH_ACT) ? LCCR3_VSP : 0;
/* FIXME: make this configurable */ /* FIXME: make this configurable */
fbi->reg_cmdcr = 1; fbi->reg_cmdcr = 1;
...@@ -786,11 +794,15 @@ static int pxafb_smart_thread(void *arg) ...@@ -786,11 +794,15 @@ static int pxafb_smart_thread(void *arg)
if (try_to_freeze()) if (try_to_freeze())
continue; continue;
mutex_lock(&fbi->ctrlr_lock);
if (fbi->state == C_ENABLE) { if (fbi->state == C_ENABLE) {
inf->smart_update(&fbi->fb); inf->smart_update(&fbi->fb);
complete(&fbi->refresh_done); complete(&fbi->refresh_done);
} }
mutex_unlock(&fbi->ctrlr_lock);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(30 * HZ / 1000); schedule_timeout(30 * HZ / 1000);
} }
...@@ -801,14 +813,19 @@ static int pxafb_smart_thread(void *arg) ...@@ -801,14 +813,19 @@ static int pxafb_smart_thread(void *arg)
static int pxafb_smart_init(struct pxafb_info *fbi) static int pxafb_smart_init(struct pxafb_info *fbi)
{ {
if (!(fbi->lccr0 | LCCR0_LCDT)) if (!(fbi->lccr0 & LCCR0_LCDT))
return 0; return 0;
fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff;
fbi->n_smart_cmds = 0;
init_completion(&fbi->command_done);
init_completion(&fbi->refresh_done);
fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi,
"lcd_refresh"); "lcd_refresh");
if (IS_ERR(fbi->smart_thread)) { if (IS_ERR(fbi->smart_thread)) {
printk(KERN_ERR "%s: unable to create kernel thread\n", pr_err("%s: unable to create kernel thread\n", __func__);
__func__);
return PTR_ERR(fbi->smart_thread); return PTR_ERR(fbi->smart_thread);
} }
...@@ -824,7 +841,9 @@ int pxafb_smart_flush(struct fb_info *info) ...@@ -824,7 +841,9 @@ int pxafb_smart_flush(struct fb_info *info)
{ {
return 0; return 0;
} }
#endif /* CONFIG_FB_SMART_PANEL */
static inline int pxafb_smart_init(struct pxafb_info *fbi) { return 0; }
#endif /* CONFIG_FB_PXA_SMARTPANEL */
static void setup_parallel_timing(struct pxafb_info *fbi, static void setup_parallel_timing(struct pxafb_info *fbi,
struct fb_var_screeninfo *var) struct fb_var_screeninfo *var)
...@@ -986,57 +1005,6 @@ static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) ...@@ -986,57 +1005,6 @@ static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on)
fbi->lcd_power(on, &fbi->fb.var); fbi->lcd_power(on, &fbi->fb.var);
} }
static void pxafb_setup_gpio(struct pxafb_info *fbi)
{
int gpio, ldd_bits;
unsigned int lccr0 = fbi->lccr0;
/*
* setup is based on type of panel supported
*/
/* 4 bit interface */
if ((lccr0 & LCCR0_CMS) == LCCR0_Mono &&
(lccr0 & LCCR0_SDS) == LCCR0_Sngl &&
(lccr0 & LCCR0_DPD) == LCCR0_4PixMono)
ldd_bits = 4;
/* 8 bit interface */
else if (((lccr0 & LCCR0_CMS) == LCCR0_Mono &&
((lccr0 & LCCR0_SDS) == LCCR0_Dual ||
(lccr0 & LCCR0_DPD) == LCCR0_8PixMono)) ||
((lccr0 & LCCR0_CMS) == LCCR0_Color &&
(lccr0 & LCCR0_PAS) == LCCR0_Pas &&
(lccr0 & LCCR0_SDS) == LCCR0_Sngl))
ldd_bits = 8;
/* 16 bit interface */
else if ((lccr0 & LCCR0_CMS) == LCCR0_Color &&
((lccr0 & LCCR0_SDS) == LCCR0_Dual ||
(lccr0 & LCCR0_PAS) == LCCR0_Act))
ldd_bits = 16;
else {
printk(KERN_ERR "pxafb_setup_gpio: unable to determine "
"bits per pixel\n");
return;
}
for (gpio = 58; ldd_bits; gpio++, ldd_bits--)
pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT);
/* 18 bit interface */
if (fbi->fb.var.bits_per_pixel > 16) {
pxa_gpio_mode(86 | GPIO_ALT_FN_2_OUT);
pxa_gpio_mode(87 | GPIO_ALT_FN_2_OUT);
}
pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
pxa_gpio_mode(GPIO76_LCD_PCLK_MD);
if ((lccr0 & LCCR0_PAS) == 0)
pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD);
}
static void pxafb_enable_controller(struct pxafb_info *fbi) static void pxafb_enable_controller(struct pxafb_info *fbi)
{ {
pr_debug("pxafb: Enabling LCD controller\n"); pr_debug("pxafb: Enabling LCD controller\n");
...@@ -1179,7 +1147,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) ...@@ -1179,7 +1147,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state)
if (old_state == C_ENABLE) { if (old_state == C_ENABLE) {
__pxafb_lcd_power(fbi, 0); __pxafb_lcd_power(fbi, 0);
pxafb_disable_controller(fbi); pxafb_disable_controller(fbi);
pxafb_setup_gpio(fbi);
pxafb_enable_controller(fbi); pxafb_enable_controller(fbi);
__pxafb_lcd_power(fbi, 1); __pxafb_lcd_power(fbi, 1);
} }
...@@ -1202,7 +1169,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) ...@@ -1202,7 +1169,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state)
*/ */
if (old_state != C_ENABLE) { if (old_state != C_ENABLE) {
fbi->state = C_ENABLE; fbi->state = C_ENABLE;
pxafb_setup_gpio(fbi);
pxafb_enable_controller(fbi); pxafb_enable_controller(fbi);
__pxafb_lcd_power(fbi, 1); __pxafb_lcd_power(fbi, 1);
__pxafb_backlight_power(fbi, 1); __pxafb_backlight_power(fbi, 1);
...@@ -1340,11 +1306,6 @@ static int __devinit pxafb_map_video_memory(struct pxafb_info *fbi) ...@@ -1340,11 +1306,6 @@ static int __devinit pxafb_map_video_memory(struct pxafb_info *fbi)
fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; fbi->palette_cpu = (u16 *) fbi->dma_buff->palette;
pr_debug("pxafb: palette_mem_size = 0x%08x\n", fbi->palette_size*sizeof(u16)); pr_debug("pxafb: palette_mem_size = 0x%08x\n", fbi->palette_size*sizeof(u16));
#ifdef CONFIG_FB_PXA_SMARTPANEL
fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff;
fbi->n_smart_cmds = 0;
#endif
} }
return fbi->map_cpu ? 0 : -ENOMEM; return fbi->map_cpu ? 0 : -ENOMEM;
...@@ -1466,10 +1427,6 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) ...@@ -1466,10 +1427,6 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev)
INIT_WORK(&fbi->task, pxafb_task); INIT_WORK(&fbi->task, pxafb_task);
mutex_init(&fbi->ctrlr_lock); mutex_init(&fbi->ctrlr_lock);
init_completion(&fbi->disable_done); init_completion(&fbi->disable_done);
#ifdef CONFIG_FB_PXA_SMARTPANEL
init_completion(&fbi->command_done);
init_completion(&fbi->refresh_done);
#endif
return fbi; return fbi;
} }
...@@ -1801,13 +1758,12 @@ static int __devinit pxafb_probe(struct platform_device *dev) ...@@ -1801,13 +1758,12 @@ static int __devinit pxafb_probe(struct platform_device *dev)
goto failed_free_mem; goto failed_free_mem;
} }
#ifdef CONFIG_FB_PXA_SMARTPANEL
ret = pxafb_smart_init(fbi); ret = pxafb_smart_init(fbi);
if (ret) { if (ret) {
dev_err(&dev->dev, "failed to initialize smartpanel\n"); dev_err(&dev->dev, "failed to initialize smartpanel\n");
goto failed_free_irq; goto failed_free_irq;
} }
#endif
/* /*
* This makes sure that our colour bitfield * This makes sure that our colour bitfield
* descriptors are correctly initialised. * descriptors are correctly initialised.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment