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

Commit 7a992d3e authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

Merge branch '3.8/vrfb-conversion'

Merge omap vrfb code to remove direct omap platform dependencies from the
driver.
parents 9253d2d8 a89d1a87
Loading
Loading
Loading
Loading
+0 −16
Original line number Original line Diff line number Diff line
@@ -160,19 +160,3 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
	sdrc_write_reg(l, SDRC_POWER);
	sdrc_write_reg(l, SDRC_POWER);
	omap2_sms_save_context();
	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 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,67 @@
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <asm/mach/map.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)
#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)


static bool omapfb_lcd_configured;
static bool omapfb_lcd_configured;
+0 −7
Original line number Original line Diff line number Diff line
@@ -94,9 +94,6 @@
/* SMS register offsets - read/write with sms_{read,write}_reg() */
/* SMS register offsets - read/write with sms_{read,write}_reg() */


#define SMS_SYSCONFIG			0x010
#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 */
/* REVISIT: fill in other SMS registers here */




@@ -137,10 +134,6 @@ int omap2_sdrc_get_params(unsigned long r,
void omap2_sms_save_context(void);
void omap2_sms_save_context(void);
void omap2_sms_restore_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
#ifdef CONFIG_ARCH_OMAP2


struct memory_timings {
struct memory_timings {
+1 −1
Original line number Original line Diff line number Diff line
@@ -46,7 +46,7 @@


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


#include "omap_voutlib.h"
#include "omap_voutlib.h"
+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
#include <media/v4l2-device.h>
#include <media/v4l2-device.h>


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


#include "omap_voutdef.h"
#include "omap_voutdef.h"
#include "omap_voutlib.h"
#include "omap_voutlib.h"
Loading