Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344646
b: refs/heads/master
c: dcca5cf
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed Nov 16, 2012
1 parent a4edca1 commit 09166cd
Show file tree
Hide file tree
Showing 44 changed files with 1,210 additions and 1,171 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 966458f89d84ef5792893a01e2b7a5218c7b311d
refs/heads/master: dcca5cf07bcd355e4e1bd51609efe7b7d5d0a7b8
53 changes: 48 additions & 5 deletions trunk/arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,20 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
{ "dss_hdmi", "omapdss_hdmi", -1 },
};

static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
static void __init omap4_tpd12s015_mux_pads(void)
{
u32 reg;
u16 control_i2c_1;

omap_mux_init_signal("hdmi_cec",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hdmi_ddc_scl",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hdmi_ddc_sda",
OMAP_PIN_INPUT_PULLUP);
}

static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
{
u32 reg;
u16 control_i2c_1;

/*
* CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and
Expand Down Expand Up @@ -161,8 +164,10 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)

int __init omap_hdmi_init(enum omap_hdmi_flags flags)
{
if (cpu_is_omap44xx())
if (cpu_is_omap44xx()) {
omap4_hdmi_mux_pads(flags);
omap4_tpd12s015_mux_pads();
}

return 0;
}
Expand Down Expand Up @@ -284,16 +289,54 @@ static struct platform_device *create_simple_dss_pdev(const char *pdev_name,
return ERR_PTR(r);
}

static enum omapdss_version __init omap_display_get_version(void)
{
if (cpu_is_omap24xx())
return OMAPDSS_VER_OMAP24xx;
else if (cpu_is_omap3630())
return OMAPDSS_VER_OMAP3630;
else if (cpu_is_omap34xx()) {
if (soc_is_am35xx()) {
return OMAPDSS_VER_AM35xx;
} else {
if (omap_rev() < OMAP3430_REV_ES3_0)
return OMAPDSS_VER_OMAP34xx_ES1;
else
return OMAPDSS_VER_OMAP34xx_ES3;
}
} else if (omap_rev() == OMAP4430_REV_ES1_0)
return OMAPDSS_VER_OMAP4430_ES1;
else if (omap_rev() == OMAP4430_REV_ES2_0 ||
omap_rev() == OMAP4430_REV_ES2_1 ||
omap_rev() == OMAP4430_REV_ES2_2)
return OMAPDSS_VER_OMAP4430_ES2;
else if (cpu_is_omap44xx())
return OMAPDSS_VER_OMAP4;
else if (soc_is_omap54xx())
return OMAPDSS_VER_OMAP5;
else
return OMAPDSS_VER_UNKNOWN;
}

int __init omap_display_init(struct omap_dss_board_info *board_data)
{
int r = 0;
struct platform_device *pdev;
int i, oh_count;
const struct omap_dss_hwmod_data *curr_dss_hwmod;
struct platform_device *dss_pdev;
enum omapdss_version ver;

/* create omapdss device */

ver = omap_display_get_version();

if (ver == OMAPDSS_VER_UNKNOWN) {
pr_err("DSS not supported on this SoC\n");
return -ENODEV;
}

board_data->version = ver;
board_data->dsi_enable_pads = omap_dsi_enable_pads;
board_data->dsi_disable_pads = omap_dsi_disable_pads;
board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count;
Expand Down
16 changes: 0 additions & 16 deletions trunk/arch/arm/mach-omap2/sdrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,3 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
sdrc_write_reg(l, SDRC_POWER);
omap2_sms_save_context();
}

void omap2_sms_write_rot_control(u32 val, unsigned ctx)
{
sms_write_reg(val, SMS_ROT_CONTROL(ctx));
}

void omap2_sms_write_rot_size(u32 val, unsigned ctx)
{
sms_write_reg(val, SMS_ROT_SIZE(ctx));
}

void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx)
{
sms_write_reg(val, SMS_ROT_PHYSICAL_BA(ctx));
}

61 changes: 61 additions & 0 deletions trunk/arch/arm/plat-omap/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,67 @@
#include <mach/hardware.h>
#include <asm/mach/map.h>

#include <plat/cpu.h>

#ifdef CONFIG_OMAP2_VRFB

/*
* The first memory resource is the register region for VRFB,
* the rest are VRFB virtual memory areas for each VRFB context.
*/

static const struct resource omap2_vrfb_resources[] = {
DEFINE_RES_MEM_NAMED(0x68008000u, 0x40, "vrfb-regs"),
DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
};

static const struct resource omap3_vrfb_resources[] = {
DEFINE_RES_MEM_NAMED(0x6C000180u, 0xc0, "vrfb-regs"),
DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
DEFINE_RES_MEM_NAMED(0xe0000000u, 0x4000000, "vrfb-area-4"),
DEFINE_RES_MEM_NAMED(0xe4000000u, 0x4000000, "vrfb-area-5"),
DEFINE_RES_MEM_NAMED(0xe8000000u, 0x4000000, "vrfb-area-6"),
DEFINE_RES_MEM_NAMED(0xec000000u, 0x4000000, "vrfb-area-7"),
DEFINE_RES_MEM_NAMED(0xf0000000u, 0x4000000, "vrfb-area-8"),
DEFINE_RES_MEM_NAMED(0xf4000000u, 0x4000000, "vrfb-area-9"),
DEFINE_RES_MEM_NAMED(0xf8000000u, 0x4000000, "vrfb-area-10"),
DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"),
};

static int __init omap_init_vrfb(void)
{
struct platform_device *pdev;
const struct resource *res;
unsigned int num_res;

if (cpu_is_omap24xx()) {
res = omap2_vrfb_resources;
num_res = ARRAY_SIZE(omap2_vrfb_resources);
} else if (cpu_is_omap34xx()) {
res = omap3_vrfb_resources;
num_res = ARRAY_SIZE(omap3_vrfb_resources);
} else {
return 0;
}

pdev = platform_device_register_resndata(NULL, "omapvrfb", -1,
res, num_res, NULL, 0);

if (IS_ERR(pdev))
return PTR_ERR(pdev);
else
return 0;
}

arch_initcall(omap_init_vrfb);
#endif

#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)

static bool omapfb_lcd_configured;
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/arm/plat-omap/include/plat/sdrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@
/* SMS register offsets - read/write with sms_{read,write}_reg() */

#define SMS_SYSCONFIG 0x010
#define SMS_ROT_CONTROL(context) (0x180 + 0x10 * context)
#define SMS_ROT_SIZE(context) (0x184 + 0x10 * context)
#define SMS_ROT_PHYSICAL_BA(context) (0x188 + 0x10 * context)
/* REVISIT: fill in other SMS registers here */


Expand Down Expand Up @@ -137,10 +134,6 @@ int omap2_sdrc_get_params(unsigned long r,
void omap2_sms_save_context(void);
void omap2_sms_restore_context(void);

void omap2_sms_write_rot_control(u32 val, unsigned ctx);
void omap2_sms_write_rot_size(u32 val, unsigned ctx);
void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx);

#ifdef CONFIG_ARCH_OMAP2

struct memory_timings {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/omap/omap_vout.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include <plat/cpu.h>
#include <plat/dma.h>
#include <plat/vrfb.h>
#include <video/omapvrfb.h>
#include <video/omapdss.h>

#include "omap_voutlib.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/omap/omap_vout_vrfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <media/v4l2-device.h>

#include <plat/dma.h>
#include <plat/vrfb.h>
#include <video/omapvrfb.h>

#include "omap_voutdef.h"
#include "omap_voutlib.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/omap/omap_voutdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define OMAP_VOUTDEF_H

#include <video/omapdss.h>
#include <plat/vrfb.h>
#include <video/omapvrfb.h>

#define YUYV_BPP 2
#define RGB565_BPP 2
Expand Down
23 changes: 0 additions & 23 deletions trunk/drivers/video/omap2/displays/panel-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,27 +710,6 @@ static void acx_panel_disable(struct omap_dss_device *dssdev)
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static int acx_panel_suspend(struct omap_dss_device *dssdev)
{
dev_dbg(&dssdev->dev, "%s\n", __func__);
acx_panel_power_off(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
return 0;
}

static int acx_panel_resume(struct omap_dss_device *dssdev)
{
int r;

dev_dbg(&dssdev->dev, "%s\n", __func__);
r = acx_panel_power_on(dssdev);
if (r)
return r;

dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
return 0;
}

static void acx_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
Expand All @@ -752,8 +731,6 @@ static struct omap_dss_driver acx_panel_driver = {

.enable = acx_panel_enable,
.disable = acx_panel_disable,
.suspend = acx_panel_suspend,
.resume = acx_panel_resume,

.set_timings = acx_panel_set_timings,
.check_timings = acx_panel_check_timings,
Expand Down
36 changes: 0 additions & 36 deletions trunk/drivers/video/omap2/displays/panel-generic-dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,40 +688,6 @@ static void generic_dpi_panel_disable(struct omap_dss_device *dssdev)
mutex_unlock(&drv_data->lock);
}

static int generic_dpi_panel_suspend(struct omap_dss_device *dssdev)
{
struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);

mutex_lock(&drv_data->lock);

generic_dpi_panel_power_off(dssdev);

dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

mutex_unlock(&drv_data->lock);

return 0;
}

static int generic_dpi_panel_resume(struct omap_dss_device *dssdev)
{
struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);
int r;

mutex_lock(&drv_data->lock);

r = generic_dpi_panel_power_on(dssdev);
if (r)
goto err;

dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

err:
mutex_unlock(&drv_data->lock);

return r;
}

static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
Expand Down Expand Up @@ -769,8 +735,6 @@ static struct omap_dss_driver dpi_driver = {

.enable = generic_dpi_panel_enable,
.disable = generic_dpi_panel_disable,
.suspend = generic_dpi_panel_suspend,
.resume = generic_dpi_panel_resume,

.set_timings = generic_dpi_panel_set_timings,
.get_timings = generic_dpi_panel_get_timings,
Expand Down
34 changes: 0 additions & 34 deletions trunk/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,46 +143,12 @@ static void lb035q02_panel_disable(struct omap_dss_device *dssdev)
mutex_unlock(&ld->lock);
}

static int lb035q02_panel_suspend(struct omap_dss_device *dssdev)
{
struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev);

mutex_lock(&ld->lock);

lb035q02_panel_power_off(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

mutex_unlock(&ld->lock);
return 0;
}

static int lb035q02_panel_resume(struct omap_dss_device *dssdev)
{
struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev);
int r;

mutex_lock(&ld->lock);

r = lb035q02_panel_power_on(dssdev);
if (r)
goto err;
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

mutex_unlock(&ld->lock);
return 0;
err:
mutex_unlock(&ld->lock);
return r;
}

static struct omap_dss_driver lb035q02_driver = {
.probe = lb035q02_panel_probe,
.remove = lb035q02_panel_remove,

.enable = lb035q02_panel_enable,
.disable = lb035q02_panel_disable,
.suspend = lb035q02_panel_suspend,
.resume = lb035q02_panel_resume,

.driver = {
.name = "lgphilips_lb035q02_panel",
Expand Down
Loading

0 comments on commit 09166cd

Please sign in to comment.