diff options
author | Philip Balister <philip@balister.org> | 2008-02-15 13:27:34 +0000 |
---|---|---|
committer | Philip Balister <philip@balister.org> | 2008-02-15 13:27:34 +0000 |
commit | 7192c8cda818dee66ccd54fa42b909a3b740f05c (patch) | |
tree | 1c86d1f26ae4412c093ad5befa636b99bbfc3286 /packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch | |
parent | 9eff3cb5ad3afdcb429a2302e0ec303b07cb5604 (diff) |
gumstix-kernel : Add files to build a kernel for gumstix machines. These are
copied verbatim from the gumstix OE based build system.
Diffstat (limited to 'packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch')
-rw-r--r-- | packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch b/packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch new file mode 100644 index 0000000000..f8d5b1ecb1 --- /dev/null +++ b/packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch @@ -0,0 +1,180 @@ +Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c +=================================================================== +--- linux-2.6.21gum.orig/arch/arm/mach-pxa/gumstix.c ++++ linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c +@@ -25,6 +25,7 @@ + #include <asm/arch/udc.h> + #include <asm/arch/mmc.h> + #include <asm/arch/pxa-regs.h> ++#include <asm/arch/pxafb.h> + #include <asm/arch/gumstix.h> + + #include "generic.h" +@@ -90,6 +91,89 @@ static struct platform_device gum_audio_ + .id = -1, + }; + ++ ++#if defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) || defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C) ++static void gumstix_lcd_backlight(int on_or_off) ++{ ++ if(on_or_off) ++ { ++ pxa_gpio_mode(17 | GPIO_IN); ++ } else { ++ GPCR(17) = GPIO_bit(17); ++ pxa_gpio_mode(17 | GPIO_OUT); ++ GPCR(17) = GPIO_bit(17); ++ } ++} ++#endif ++ ++ ++#ifdef CONFIG_FB_PXA_ALPS_CDOLLAR ++static struct pxafb_mode_info gumstix_fb_mode = { ++ .pixclock = 300000, ++ .xres = 240, ++ .yres = 320, ++ .bpp = 16, ++ .hsync_len = 2, ++ .left_margin = 1, ++ .right_margin = 1, ++ .vsync_len = 3, ++ .upper_margin = 0, ++ .lower_margin = 0, ++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++}; ++ ++static struct pxafb_mach_info gumstix_fb_info = { ++ .modes = &gumstix_fb_mode, ++ .num_modes = 1, ++ .lccr0 = LCCR0_Pas | LCCR0_Sngl | LCCR0_Color, ++ .lccr3 = LCCR3_PixFlEdg, ++}; ++#elif defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) ++static struct pxafb_mode_info gumstix_fb_mode = { ++ .pixclock = 110000, ++ .xres = 480, ++ .yres = 272, ++ .bpp = 16, ++ .hsync_len = 41, ++ .left_margin = 2, ++ .right_margin = 2, ++ .vsync_len = 10, ++ .upper_margin = 2, ++ .lower_margin = 2, ++ .sync = 0, // Hsync and Vsync both active low ++}; ++ ++static struct pxafb_mach_info gumstix_fb_info = { ++ .modes = &gumstix_fb_mode, ++ .num_modes = 1, ++ .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, ++ .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30), ++ .pxafb_backlight_power = &gumstix_lcd_backlight, ++}; ++#elif defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C) ++static struct pxafb_mode_info gumstix_fb_mode = { ++ .pixclock = 108696, // 9.2MHz typical DOTCLK from datasheet ++ .xres = 480, ++ .hsync_len = 41, // HLW from datasheet: 41 typ ++ .left_margin = 4, // HBP - HLW from datasheet: 45 - 41 = 4 ++ .right_margin = 8, // HFP from datasheet: 8 typ ++ .yres = 272, ++ .vsync_len = 10, // VLW from datasheet: 10 typ ++ .upper_margin = 2, // VBP - VLW from datasheet: 12 - 10 = 2 ++ .lower_margin = 4, // VFP from datasheet: 4 typ ++ .bpp = 16, ++ .sync = 0, // Hsync and Vsync both active low ++}; ++ ++static struct pxafb_mach_info gumstix_fb_info = { ++ .modes = &gumstix_fb_mode, ++ .num_modes = 1, ++ .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, ++ .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30), ++ .pxafb_backlight_power = &gumstix_lcd_backlight, ++}; ++#endif ++ + static struct platform_device *devices[] __initdata = { + &gum_audio_device, + }; +@@ -98,6 +182,9 @@ static void __init gumstix_init(void) + { + pxa_set_mci_info(&gumstix_mci_platform_data); + pxa_set_udc_info(&gumstix_udc_info); ++#if defined(CONFIG_FB_PXA_ALPS_CDOLLAR) | defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) | defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C) ++ set_pxa_fb_info(&gumstix_fb_info); ++#endif + (void) platform_add_devices(devices, ARRAY_SIZE(devices)); + } + +Index: linux-2.6.21gum/drivers/video/Kconfig +=================================================================== +--- linux-2.6.21gum.orig/drivers/video/Kconfig ++++ linux-2.6.21gum/drivers/video/Kconfig +@@ -1495,6 +1495,37 @@ config FB_PXA + + If unsure, say N. + ++choice ++ depends on FB_PXA ++ prompt "LCD Panel" ++ default FB_PXA_SAMSUNG_LTE430WQ_F0C ++ ++config FB_PXA_ALPS_CDOLLAR ++ boolean "Chris Dollar's ALPS screen" ++ ---help--- ++ Enable definitions (over-ridable on the kernel command line if ++ "PXA LCD command line parameters" is also selected) for an ALPS ++ screen which Chris Dollar uses ++ ++config FB_PXA_SHARP_LQ043_PSP ++ boolean "SHARP LQ043... series" ++ ---help--- ++ Enable definitions (over-ridable on the kernel command line if ++ "PXA LCD command line parameters" is also selected) for a SHARP ++ LQ043... screen, such as the one used by the PSP. These screens are ++ the ones normally sold by gumstix with its boards. ++ ++config FB_PXA_SAMSUNG_LTE430WQ_F0C ++ boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)" ++ ---help--- ++ Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold ++ by gumstix for use with their "LCD-Ready" boards. ++ ++config FB_PXA_NONEOFTHEABOVE ++ boolean "None of the above" ++ ++endchoice ++ + config FB_PXA_PARAMETERS + bool "PXA LCD command line parameters" + default n +Index: linux-2.6.21gum/drivers/video/pxafb.c +=================================================================== +--- linux-2.6.21gum.orig/drivers/video/pxafb.c ++++ linux-2.6.21gum/drivers/video/pxafb.c +@@ -22,6 +22,7 @@ + * + */ + ++#include <linux/autoconf.h> + #include <linux/module.h> + #include <linux/moduleparam.h> + #include <linux/kernel.h> +@@ -789,7 +790,13 @@ static void pxafb_setup_gpio(struct pxaf + pxa_gpio_mode(GPIO74_LCD_FCLK_MD); + pxa_gpio_mode(GPIO75_LCD_LCLK_MD); + pxa_gpio_mode(GPIO76_LCD_PCLK_MD); ++#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP ++ /* DISP must be always high while screen is on */ ++ pxa_gpio_mode(GPIO77_LCD_ACBIAS | GPIO_OUT); ++ GPSR(GPIO77_LCD_ACBIAS) = GPIO_bit(GPIO77_LCD_ACBIAS); ++#else + pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD); ++#endif + } + + static void pxafb_enable_controller(struct pxafb_info *fbi) |