summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorgen Nilsson <jorgen.nilsson@stericsson.com>2012-02-06 17:04:49 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:46 +0200
commit00bd6002117c2bb881cc607f3f56f89bc92280a8 (patch)
tree3db8c62e9441ec50a91f5a780614f51e639de2be
parentfb6608b3a400f72d383d1e22adf02202ddc39799 (diff)
ux500: [ANDROID]: b2r2: Add kernel API to b2r2 and more
Brief: As a preparation for the ICS hardware composer solution a kernel API has been added to the b2r2 driver. Some minor stability fixes are also part of this release. The full support for dual b2r2 configuration should be in place, but has yet to be verified with the apropriate hardware. The change should have minor impact on the single core solution. Details: A new logical device for handling the blitter requests has been added. This is roughly the same device as the old blitter the interfaces are therefore the same. From now there is at least two devices - one blitter device and then for each core one additional device (dual configuration is the current target). As a consequence the maximum number of allowed cores has been raised from 1 to 2. When a dual configuration is active the b2r2 driver seamlessly splits requests over available b2r2 cores. Each request is assigned a core_mask defining which cores are doing part of the job. This helps keep track when waiting for the reports. Also, rectangles are now recalculated (based on intersection of destination rectangle and destination image etc.) before splitting the job in order to maximize throughput. Clock and power source can now be configured from devices-dbxxxx.c or equivalent. Minor bug fixes: - Check the return value from clk_enable - Check if the core is valid before serving a IRQ. - Check if the core is enabled (domain_enabled) before adding a new job. - Return actual job_id used for a request (previously always 0) ST-Ericsson ID: 404691 Original Change-Id: Ic3357c4c1e792a84077c1be4ba4c5acdb19da266 Signed-off-by: Jorgen Nilsson <jorgen.nilsson@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-mop500.c2
-rw-r--r--arch/arm/mach-ux500/board-u5500.c1
-rw-r--r--arch/arm/mach-ux500/devices-db5500.c15
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c18
-rw-r--r--arch/arm/mach-ux500/include/mach/devices.h2
5 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index d3b016d92c6..a0efc82eb34 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -951,6 +951,7 @@ static struct platform_device *mop500_platform_devs[] __initdata = {
&u8500_mcde_device,
#endif
&u8500_b2r2_device,
+ &u8500_b2r2_blt_device,
&u8500_thsens_device,
#ifdef CONFIG_LEDS_PWM
&ux500_leds_device,
@@ -1192,6 +1193,7 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
&u8500_mcde_device,
#endif
&u8500_b2r2_device,
+ &u8500_b2r2_blt_device,
};
static void fixup_ab8505_gpio(void)
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index 8429363531d..c3bae368bd7 100644
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -587,6 +587,7 @@ static struct platform_device *u5500_platform_devices[] __initdata = {
#endif
&ux500_hwmem_device,
&u5500_b2r2_device,
+ &u5500_b2r2_blt_device,
&u5500_mloader_device,
#ifdef CONFIG_U5500_MMIO
&u5500_mmio_device,
diff --git a/arch/arm/mach-ux500/devices-db5500.c b/arch/arm/mach-ux500/devices-db5500.c
index 73300e06281..ec7c6378d0e 100644
--- a/arch/arm/mach-ux500/devices-db5500.c
+++ b/arch/arm/mach-ux500/devices-db5500.c
@@ -233,6 +233,20 @@ struct platform_device u5500_mcde_device = {
};
#endif
+struct platform_device u5500_b2r2_blt_device = {
+ .name = "b2r2_blt",
+ .id = 0,
+ .dev = {
+ .init_name = "b2r2_blt_init",
+ .coherent_dma_mask = ~0,
+ },
+};
+
+static struct b2r2_platform_data b2r2_platform_data = {
+ .regulator_id = "vsupply",
+ .clock_id = "b2r2",
+};
+
static struct resource b2r2_resources[] = {
[0] = {
.start = U5500_B2R2_BASE,
@@ -253,6 +267,7 @@ struct platform_device u5500_b2r2_device = {
.id = 0,
.dev = {
.init_name = "b2r2_bus",
+ .platform_data = &b2r2_platform_data,
.coherent_dma_mask = ~0,
},
.num_resources = ARRAY_SIZE(b2r2_resources),
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index e002d04c836..ee376a504b8 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -29,6 +29,7 @@
#include <mach/hsi.h>
#endif
#include <mach/ste-dma40-db8500.h>
+#include <video/b2r2_blt.h>
#include "pins-db8500.h"
@@ -250,6 +251,20 @@ struct platform_device u8500_mcde_device = {
};
#endif /* CONFIG_FB_MCDE */
+struct platform_device u8500_b2r2_blt_device = {
+ .name = "b2r2_blt",
+ .id = 0,
+ .dev = {
+ .init_name = "b2r2_blt_init",
+ .coherent_dma_mask = ~0,
+ },
+};
+
+static struct b2r2_platform_data b2r2_platform_data = {
+ .regulator_id = "vsupply",
+ .clock_id = "b2r2",
+};
+
static struct resource b2r2_resources[] = {
[0] = {
.start = U8500_B2R2_BASE,
@@ -269,7 +284,8 @@ struct platform_device u8500_b2r2_device = {
.name = "b2r2",
.id = 0,
.dev = {
- .init_name = "b2r2_bus",
+ .init_name = "b2r2_core",
+ .platform_data = &b2r2_platform_data,
.coherent_dma_mask = ~0,
},
.num_resources = ARRAY_SIZE(b2r2_resources),
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h
index 2392b06f91f..6d176e93653 100644
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/include/mach/devices.h
@@ -16,6 +16,8 @@ extern struct platform_device u8500_gpio_devs[];
extern struct platform_device u8500_mcde_device;
extern struct platform_device u5500_mcde_device;
extern struct platform_device u8500_shrm_device;
+extern struct platform_device u8500_b2r2_blt_device;
+extern struct platform_device u5500_b2r2_blt_device;
extern struct platform_device u8500_b2r2_device;
extern struct platform_device u5500_b2r2_device;
extern struct platform_device u8500_trace_modem;