Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddba6c7f authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAP1: pass LCD config with omapfb_set_lcd_config()



LCD config for old omapfb driver is passed with OMAP_TAG_LCD from board
files or from the bootloader. In an effort to remove OMAP_TAG_LCD, this
patch adds omapfb_set_lcd_config() function that the board files can
call to set the LCD config.

This has the drawback that configuration can no longer come from the
bootloader. Of the boards supported by the kernel, this should only
affect N770 which depends on the data from the bootloader. This patch
adds an LCD config for N770 to its board files, but that is most
probably broken. Fixing this would need information about the HW setup
in N770 boards.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
parent f060f953
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
#include <linux/export.h>
#include <linux/omapfb.h>

#include <media/soc_camera.h>

@@ -169,10 +170,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
	.pins[0]	= 2,
};

static struct omap_board_config_kernel ams_delta_config[] __initdata = {
	{ OMAP_TAG_LCD,		&ams_delta_lcd_config },
};

static struct resource ams_delta_nand_resources[] = {
	[0] = {
		.start	= OMAP1_MPUIO_BASE,
@@ -302,8 +299,6 @@ static void __init ams_delta_init(void)
	omap_cfg_reg(J19_1610_CAM_D6);
	omap_cfg_reg(J18_1610_CAM_D7);

	omap_board_config = ams_delta_config;
	omap_board_config_size = ARRAY_SIZE(ams_delta_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);

@@ -321,6 +316,8 @@ static void __init ams_delta_init(void)
	ams_delta_init_fiq();

	omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);

	omapfb_set_lcd_config(&ams_delta_lcd_config);
}

static struct plat_serial8250_port ams_delta_modem_ports[] = {
+3 −6
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/smc91x.h>
#include <linux/omapfb.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
@@ -290,10 +291,6 @@ static struct omap_lcd_config fsample_lcd_config = {
	.ctrl_name	= "internal",
};

static struct omap_board_config_kernel fsample_config[] __initdata = {
	{ OMAP_TAG_LCD,		&fsample_lcd_config },
};

static void __init omap_fsample_init(void)
{
	/* Early, board-dependent init */
@@ -352,10 +349,10 @@ static void __init omap_fsample_init(void)

	platform_add_devices(devices, ARRAY_SIZE(devices));

	omap_board_config = fsample_config;
	omap_board_config_size = ARRAY_SIZE(fsample_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);

	omapfb_set_lcd_config(&fsample_lcd_config);
}

/* Only FPGA needs to be mapped here. All others are done with ioremap */
+3 −6
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/input.h>
#include <linux/i2c/tps65010.h>
#include <linux/smc91x.h>
#include <linux/omapfb.h>

#include <mach/hardware.h>

@@ -391,10 +392,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = {
	.ctrl_name	= "internal",
};

static struct omap_board_config_kernel h2_config[] __initdata = {
	{ OMAP_TAG_LCD,		&h2_lcd_config },
};

static void __init h2_init(void)
{
	h2_init_smc91x();
@@ -438,13 +435,13 @@ static void __init h2_init(void)
	omap_cfg_reg(N19_1610_KBR5);

	platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
	omap_board_config = h2_config;
	omap_board_config_size = ARRAY_SIZE(h2_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, h2_i2c_board_info,
			      ARRAY_SIZE(h2_i2c_board_info));
	omap1_usb_init(&h2_usb_config);
	h2_mmc_init();

	omapfb_set_lcd_config(&h2_lcd_config);
}

MACHINE_START(OMAP_H2, "TI-H2")
+3 −6
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/spi/spi.h>
#include <linux/i2c/tps65010.h>
#include <linux/smc91x.h>
#include <linux/omapfb.h>

#include <asm/setup.h>
#include <asm/page.h>
@@ -370,10 +371,6 @@ static struct omap_lcd_config h3_lcd_config __initdata = {
	.ctrl_name	= "internal",
};

static struct omap_board_config_kernel h3_config[] __initdata = {
	{ OMAP_TAG_LCD,		&h3_lcd_config },
};

static struct i2c_board_info __initdata h3_i2c_board_info[] = {
       {
		I2C_BOARD_INFO("tps65013", 0x48),
@@ -426,13 +423,13 @@ static void __init h3_init(void)
	platform_add_devices(devices, ARRAY_SIZE(devices));
	spi_register_board_info(h3_spi_board_info,
				ARRAY_SIZE(h3_spi_board_info));
	omap_board_config = h3_config;
	omap_board_config_size = ARRAY_SIZE(h3_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, h3_i2c_board_info,
			      ARRAY_SIZE(h3_i2c_board_info));
	omap1_usb_init(&h3_usb_config);
	h3_mmc_init();

	omapfb_set_lcd_config(&h3_lcd_config);
}

MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
+3 −6
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <linux/leds.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
#include <linux/omapfb.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -398,10 +399,6 @@ static struct omap_lcd_config htcherald_lcd_config __initdata = {
	.ctrl_name	= "internal",
};

static struct omap_board_config_kernel htcherald_config[] __initdata = {
	{ OMAP_TAG_LCD, &htcherald_lcd_config },
};

static struct platform_device lcd_device = {
	.name           = "lcd_htcherald",
	.id             = -1,
@@ -580,8 +577,6 @@ static void __init htcherald_init(void)
	printk(KERN_INFO "HTC Herald init.\n");

	/* Do board initialization before we register all the devices */
	omap_board_config = htcherald_config;
	omap_board_config_size = ARRAY_SIZE(htcherald_config);
	platform_add_devices(devices, ARRAY_SIZE(devices));

	htcherald_disable_watchdog();
@@ -598,6 +593,8 @@ static void __init htcherald_init(void)
	htc_mmc_data[0] = &htc_mmc1_data;
	omap1_init_mmc(htc_mmc_data, 1);
#endif

	omapfb_set_lcd_config(&htcherald_lcd_config);
}

MACHINE_START(HERALD, "HTC Herald")
Loading