FB: OMAP: Add LCD support for Amstrad Delta
Subsystems (5)
PATCH 1/2 FB: OMAP: Add LCD support for Amstrad Delta
The patch below adds support for the 12bit 480x320 DSTN panel used in the Amstrad Delta (E3) videophone. It just adds support to the drivers/video/omap/ tree; my next patch will add the appropriate arch/arm/ configuration to make the Delta use the driver.
Patch is against current linux-omap git.
Signed-off-by Jonathan McDowell <[email protected]>
-----
drivers/video/omap/Makefile +1 -0
@@ -14,6 +14,7 @@ objs-$(CONFIG_ARCH_OMAP2)$(CONFIG_FB_OMA objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o +objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o objs-y$(CONFIG_MACH_OMAP_H4) += lcd_h4.o objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o objs-y$(CONFIG_MACH_OMAP_H2) += lcd_h2.o
drivers/video/omap/lcdc.c +2 -0
@@ -844,6 +844,8 @@ static int omap_lcdc_init(struct omapfb_ rate =clk_get_rate (tc_ck);clk_put (tc_ck); +if (machine_is_ams_delta ()) + rate /=4 ;if (machine_is_omap_h3 ()) rate /=3 ; r =clk_set_rate (omap_lcdc.lcd_ck, rate);
drivers/video/omap/lcd_ams_delta.c +157 -0
157 lines not on this page · raw message
-----
J.
Signature · 4 lines
jid: [email protected] noodles is said to have been introduced to europe by marco polo after he returned from china
Re: [PATCH 2/2] ARM: OMAP: Add LCD support for Amstrad Delta
The patch below adds the hooks to the arch/arm/ tree for the Amstrad Delta to use the LCD driver submitted in my previous mail.
Patch is against current linux-omap git.
Signed-off-by Jonathan McDowell <[email protected]>
-----
arch/arm/mach-omap1/board-ams-delta.c +16 -0
@@ -76,6 +76,10 @@ static struct map_desc ams_delta_io_desc } }; +static struct omap_lcd_config ams_delta_lcd_config__initdata = { + .ctrl_name ="internal" , +}; +static struct omap_uart_config ams_delta_uart_config__initdata = { .enabled_uarts =1 , };
@@ -87,10 +91,20 @@ static struct omap_usb_config ams_delta_ };static struct omap_board_config_kernel ams_delta_config[] = { + {OMAP_TAG_LCD , &ams_delta_lcd_config }, {OMAP_TAG_UART , &ams_delta_uart_config }, {OMAP_TAG_USB , &ams_delta_usb_config }, }; +static struct platform_device ams_delta_lcd_device = { + .name ="lcd_ams_delta" , + .id ="-1" , +}; + +static struct platform_device *ams_delta_devices[]__initdata = { + &ams_delta_lcd_device, +}; +static void __init ams_delta_init (void ) {iotable_init (ams_delta_io_desc,ARRAY_SIZE (ams_delta_io_desc));
@@ -101,6 +115,8 @@ static void __init ams_delta_init(void)/* Clear latch2 (NAND, LCD, modem enable) */ ams_delta_latch2_write (~0 ,0 ); + +platform_add_devices (ams_delta_devices,ARRAY_SIZE (ams_delta_devices)); }static void __init ams_delta_map_io (void )
arch/arm/mach-omap1/clock.c +9 -0
@@ -20,6 +20,7 @@ #include <linux/err.h>#include <linux/clk.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/usb.h>
@@ -772,6 +773,14 @@ #if defined(CONFIG_MACH_OMAP_PERSEUS2) |omap_writew (omap_readw (OMAP730_PCC_UPLD_CTRL ) & ~0x1 ,OMAP730_PCC_UPLD_CTRL );#endif +#ifdef CONFIG_MACH_AMS_DELTA +/* Amstrad Delta wants BCLK high when inactive */ +if (machine_is_ams_delta ()) +omap_writel (omap_readl (ULPD_CLOCK_CTRL ) | + (1 <<SDW_MCLK_INV_BIT ), +ULPD_CLOCK_CTRL ); +#endif +/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ /* (on 730, bit 13 must not be cleared) */ if (cpu_is_omap730 ())
arch/arm/mach-omap1/clock.h +1 -0
@@ -89,6 +89,7 @@ #define EN_TC2_CK 4#define EN_DSPTIMCK 5/* Various register defines for clock controls scattered around OMAP chip */ +#define SDW_MCLK_INV_BIT 2/* In ULPD_CLKC_CTRL */ #define USB_MCLK_EN_BIT 4/* In ULPD_CLKC_CTRL */ #define USB_HOST_HHC_UHOST_EN 9/* In MOD_CONF_CTRL_0 */ #define SWD_ULPD_PLL_CLK_REQ 1/* In SWD_CLK_DIV_CTRL_SEL */
-----
J.
Signature · 1 line
I get the feeling that I've been cheated.