summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2012-08-01 10:03:09 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-08-01 10:03:09 +0800
commitd81dac54ea06a1f8a74acf91499d5946d94d9e6a (patch)
treea137a6698343f3dfb880456cc4d89872f2a9b877 /drivers
parentc72eec4afb9215391f06c1a1ce14a63e17ed64e2 (diff)
parent091604c85f017199cae9d437545a96157ab063e0 (diff)
Merge remote branch 'fsl-linux-sdk/imx_3.0.35' into imx_3.0.35_android
Conflicts: drivers/mxc/vpu/mxc_vpu.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/imx-sdma.c131
-rw-r--r--drivers/media/video/mxc/output/mxc_vout.c4
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c1
-rw-r--r--drivers/mxc/asrc/mxc_asrc.c13
-rw-r--r--drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c38
-rw-r--r--drivers/mxc/ipu3/ipu_calc_stripes_sizes.c4
-rw-r--r--drivers/mxc/ipu3/ipu_common.c1
-rw-r--r--drivers/mxc/ipu3/ipu_device.c7
-rw-r--r--drivers/mxc/ipu3/ipu_disp.c16
-rw-r--r--drivers/mxc/ipu3/ipu_param_mem.h26
-rw-r--r--drivers/mxc/vpu/mxc_vpu.c2
-rwxr-xr-xdrivers/usb/host/ehci-arc.c11
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c2
13 files changed, 208 insertions, 48 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index a4ed05342168..5e24facd12de 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -256,11 +256,13 @@ struct sdma_channel {
unsigned int pc_from_device;
unsigned int pc_to_device;
unsigned int device_to_device;
+ unsigned int other_script;
unsigned long flags;
dma_addr_t per_address, per_address2;
u32 event_mask0, event_mask1;
u32 watermark_level;
u32 shp_addr, per_addr;
+ u32 data_addr1, data_addr2;
struct dma_chan chan;
spinlock_t lock;
struct dma_async_tx_descriptor desc;
@@ -270,7 +272,9 @@ struct sdma_channel {
unsigned int chn_real_count;
};
-#define IMX_DMA_SG_LOOP (1 << 0)
+#define IMX_DMA_SG_LOOP (1 << 0)
+#define IMX_DMA_INT_OTHER (1 << 1)
+#define IMX_DMA_INT_P2P (1 << 2)
#define MAX_DMA_CHANNELS 32
#define MXC_SDMA_DEFAULT_PRIORITY 1
@@ -493,6 +497,15 @@ static void mxc_sdma_handle_channel_normal(struct sdma_channel *sdmac)
sdmac->desc.callback(sdmac->desc.callback_param);
}
+
+static void sdma_handle_other_intr(struct sdma_channel *sdmac)
+{
+ sdmac->last_completed = sdmac->desc.cookie;
+
+ if (sdmac->desc.callback)
+ sdmac->desc.callback(sdmac->desc.callback_param);
+}
+
static void mxc_sdma_handle_channel(struct sdma_channel *sdmac)
{
complete(&sdmac->done);
@@ -503,6 +516,8 @@ static void mxc_sdma_handle_channel(struct sdma_channel *sdmac)
if (sdmac->flags & IMX_DMA_SG_LOOP)
sdma_handle_channel_loop(sdmac);
+ else if (sdmac->flags & IMX_DMA_INT_OTHER)
+ sdma_handle_other_intr(sdmac);
else
mxc_sdma_handle_channel_normal(sdmac);
}
@@ -540,10 +555,12 @@ static void sdma_get_pc(struct sdma_channel *sdmac,
* two peripherals or memory-to-memory transfers
*/
int per_2_per = 0, emi_2_emi = 0;
+ int other = 0;
sdmac->pc_from_device = 0;
sdmac->pc_to_device = 0;
sdmac->device_to_device = 0;
+ sdmac->other_script = 0;
switch (peripheral_type) {
case IMX_DMATYPE_MEMORY:
@@ -606,6 +623,8 @@ static void sdma_get_pc(struct sdma_channel *sdmac,
case IMX_DMATYPE_IPU_MEMORY:
emi_2_per = sdma->script_addrs->ext_mem_2_ipu_addr;
break;
+ case IMX_DMATYPE_HDMI:
+ other = sdma->script_addrs->hdmi_dma_addr;
default:
break;
}
@@ -613,6 +632,27 @@ static void sdma_get_pc(struct sdma_channel *sdmac,
sdmac->pc_from_device = per_2_emi;
sdmac->pc_to_device = emi_2_per;
sdmac->device_to_device = per_2_per;
+ sdmac->other_script = other;
+}
+
+static int sdma_set_context_reg(struct sdma_channel *sdmac,
+ struct sdma_context_data *context)
+{
+ switch (sdmac->peripheral_type) {
+ case IMX_DMATYPE_HDMI:
+ context->gReg[4] = sdmac->data_addr1;
+ context->gReg[6] = sdmac->data_addr2;
+ break;
+ default:
+ context->gReg[0] = sdmac->event_mask1;
+ context->gReg[1] = sdmac->event_mask0;
+ context->gReg[2] = sdmac->per_addr;
+ context->gReg[6] = sdmac->shp_addr;
+ context->gReg[7] = sdmac->watermark_level;
+ break;
+ }
+
+ return 0;
}
static int sdma_load_context(struct sdma_channel *sdmac)
@@ -632,7 +672,7 @@ static int sdma_load_context(struct sdma_channel *sdmac)
else if (sdmac->direction == DMA_MEM_TO_DEV)
load_address = sdmac->pc_to_device;
else
- load_address = sdmac->pc_to_device;
+ load_address = sdmac->other_script;
if (load_address < 0)
@@ -651,11 +691,7 @@ static int sdma_load_context(struct sdma_channel *sdmac)
/* Send by context the event mask,base address for peripheral
* and watermark level
*/
- context->gReg[0] = sdmac->event_mask1;
- context->gReg[1] = sdmac->event_mask0;
- context->gReg[2] = sdmac->per_addr;
- context->gReg[6] = sdmac->shp_addr;
- context->gReg[7] = sdmac->watermark_level;
+ sdma_set_context_reg(sdmac, context);
bd0->mode.command = C0_SETDM;
bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
@@ -677,16 +713,47 @@ static void sdma_disable_channel(struct sdma_channel *sdmac)
sdmac->status = DMA_ERROR;
}
+static int sdma_set_chan_private_data(struct sdma_channel *sdmac)
+{
+ struct sdma_engine *sdma = sdmac->sdma;
+ struct imx_dma_data *data = sdmac->chan.private;
+
+ sdmac->shp_addr = 0;
+ sdmac->per_addr = 0;
+ sdmac->data_addr1 = 0;
+ sdmac->data_addr2 = 0;
+
+
+ if (sdmac->direction == DMA_DEV_TO_DEV) {
+ sdmac->per_addr = sdmac->per_address;
+ sdmac->shp_addr = sdmac->per_address2;
+ } else if (sdmac->direction == DMA_TRANS_NONE) {
+ switch (sdmac->peripheral_type) {
+ case IMX_DMATYPE_HDMI:
+ sdmac->data_addr1 = *(u32 *)data->private;;
+ sdmac->data_addr2 = *((u32 *)data->private + 1);
+ break;
+ default:
+ dev_dbg(sdma->dev,
+ "periphal type not support for DMA_TRANS_NONE!\n");
+ break;
+ }
+ } else {
+ sdmac->shp_addr = sdmac->per_address;
+ }
+
+ return 0;
+}
+
static int sdma_config_channel(struct sdma_channel *sdmac)
{
int ret;
+ struct imx_dma_data *data = sdmac->chan.private;
sdma_disable_channel(sdmac);
sdmac->event_mask0 = 0;
sdmac->event_mask1 = 0;
- sdmac->shp_addr = 0;
- sdmac->per_addr = 0;
if (sdmac->event_id0)
sdma_event_enable(sdmac, sdmac->event_id0);
@@ -709,7 +776,8 @@ static int sdma_config_channel(struct sdma_channel *sdmac)
sdma_get_pc(sdmac, sdmac->peripheral_type);
if ((sdmac->peripheral_type != IMX_DMATYPE_MEMORY) &&
- (sdmac->peripheral_type != IMX_DMATYPE_DSP)) {
+ (sdmac->peripheral_type != IMX_DMATYPE_DSP) &&
+ (sdmac->peripheral_type != IMX_DMATYPE_HDMI)) {
/* Handle multiple event channels differently */
if (sdmac->event_id1) {
if (sdmac->event_id0 > 31) {
@@ -748,19 +816,10 @@ static int sdma_config_channel(struct sdma_channel *sdmac)
}
/* Watermark Level */
sdmac->watermark_level |= sdmac->watermark_level;
- /* Address */
- switch (sdmac->direction) {
- case DMA_DEV_TO_DEV:
- sdmac->per_addr = sdmac->per_address;
- sdmac->shp_addr = sdmac->per_address2;
- break;
- default:
- sdmac->shp_addr = sdmac->per_address;
- break;
- }
} else {
sdmac->watermark_level = 0; /* FIXME: M3_BASE_ADDRESS */
}
+ sdma_set_chan_private_data(sdmac);
ret = sdma_load_context(sdmac);
@@ -1027,7 +1086,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
{
struct sdma_channel *sdmac = to_sdma_chan(chan);
struct sdma_engine *sdma = sdmac->sdma;
- int num_periods = buf_len / period_len;
+ int num_periods;
int channel = sdmac->channel;
int ret, i = 0, buf = 0;
@@ -1037,13 +1096,33 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
return NULL;
sdmac->status = DMA_IN_PROGRESS;
-
- sdmac->flags |= IMX_DMA_SG_LOOP;
sdmac->direction = direction;
+
+ switch (sdmac->direction) {
+ case DMA_DEV_TO_DEV:
+ sdmac->flags |= IMX_DMA_INT_P2P;
+ break;
+ case DMA_TRANS_NONE:
+ sdmac->flags |= IMX_DMA_INT_OTHER;
+ break;
+ case DMA_MEM_TO_DEV:
+ case DMA_DEV_TO_MEM:
+ sdmac->flags |= IMX_DMA_SG_LOOP;
+ break;
+ default:
+ pr_err("SDMA direction is not support!");
+ return NULL;
+ }
+
ret = sdma_load_context(sdmac);
if (ret)
goto err_out;
+ if (period_len)
+ num_periods = buf_len / period_len;
+ else
+ return &sdmac->desc;
+
if (num_periods > NUM_BD) {
dev_err(sdma->dev, "SDMA channel %d: maximum number of sg exceeded: %d > %d\n",
channel, num_periods, NUM_BD);
@@ -1108,8 +1187,6 @@ static int sdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
sdma_disable_channel(sdmac);
return 0;
case DMA_SLAVE_CONFIG:
-
- sdmac->direction = dmaengine_cfg->direction;
if (dmaengine_cfg->direction == DMA_DEV_TO_DEV) {
sdmac->per_address = dmaengine_cfg->src_addr;
sdmac->per_address2 = dmaengine_cfg->dst_addr;
@@ -1123,7 +1200,7 @@ static int sdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
sdmac->per_address = dmaengine_cfg->src_addr;
sdmac->watermark_level = dmaengine_cfg->src_maxburst;
sdmac->word_size = dmaengine_cfg->src_addr_width;
- } else {
+ } else if (dmaengine_cfg->direction == DMA_MEM_TO_DEV) {
sdmac->per_address = dmaengine_cfg->dst_addr;
sdmac->watermark_level = dmaengine_cfg->dst_maxburst;
sdmac->word_size = dmaengine_cfg->dst_addr_width;
@@ -1159,7 +1236,7 @@ static void sdma_issue_pending(struct dma_chan *chan)
*/
}
-#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 37
+#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 38
static void sdma_add_scripts(struct sdma_engine *sdma,
const struct sdma_script_start_addrs *addr)
diff --git a/drivers/media/video/mxc/output/mxc_vout.c b/drivers/media/video/mxc/output/mxc_vout.c
index f1f376db98ce..4b3617f89b08 100644
--- a/drivers/media/video/mxc/output/mxc_vout.c
+++ b/drivers/media/video/mxc/output/mxc_vout.c
@@ -196,6 +196,10 @@ const static struct v4l2_fmtdesc mxc_formats[] = {
.description = "TILED NV12F",
.pixelformat = IPU_PIX_FMT_TILED_NV12F,
},
+ {
+ .description = "YUV444 planar",
+ .pixelformat = IPU_PIX_FMT_YUV444P,
+ },
};
#define NUM_MXC_VOUT_FORMATS (ARRAY_SIZE(mxc_formats))
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 53b422e916b9..f726354c4235 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -955,6 +955,7 @@ struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC
| SDHCI_QUIRK_BROKEN_CARD_DETECTION
+ | SDHCI_QUIRK_BROKEN_ADMA
| SDHCI_QUIRK_NO_HISPD_BIT,
/* ADMA has issues. Might be fixable */
.ops = &sdhci_esdhc_ops,
diff --git a/drivers/mxc/asrc/mxc_asrc.c b/drivers/mxc/asrc/mxc_asrc.c
index 4ef31c8fd6db..cf41f2994226 100644
--- a/drivers/mxc/asrc/mxc_asrc.c
+++ b/drivers/mxc/asrc/mxc_asrc.c
@@ -586,21 +586,14 @@ int asrc_config_pair(struct asrc_config *config)
if ((config->inclk == INCLK_ASRCK1_CLK) &&
(config->outclk == OUTCLK_ESAI_TX)) {
reg = __raw_readl(g_asrc->vaddr + ASRC_ASRCTR_REG);
- reg &= ~(1 << (20 + config->pair));
- reg |= (0x03 << (13 + (config->pair << 1)));
+ reg |= (1 << (20 + config->pair));
+ reg |= (0x02 << (13 + (config->pair << 1)));
__raw_writel(reg, g_asrc->vaddr + ASRC_ASRCTR_REG);
err = asrc_set_clock_ratio(config->pair,
config->input_sample_rate,
config->output_sample_rate);
if (err < 0)
return err;
-
- err = asrc_set_process_configuration(config->pair,
- config->input_sample_rate,
- config->
- output_sample_rate);
- if (err < 0)
- return err;
}
/* Config input and output wordwidth */
@@ -952,7 +945,7 @@ static bool filter(struct dma_chan *chan, void *param)
static struct dma_chan *imx_asrc_dma_alloc(u32 dma_req)
{
dma_cap_mask_t mask;
- struct imx_dma_data dma_data;
+ struct imx_dma_data dma_data = {0};
dma_data.peripheral_type = IMX_DMATYPE_ASRC;
dma_data.priority = DMA_PRIO_MEDIUM;
diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
index df15ef422b04..07c549e8f784 100644
--- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
+++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
@@ -3499,7 +3499,7 @@ _GetClock(
gcmkHEADER();
- gcmkVERIFY_ARGUMENT(State >= gcvPOWER_ON && State <= gcvPOWER_OFF);
+ gcmkVERIFY_ARGUMENT(State >= gcvPOWER_ON && State <= gcvPOWER_SUSPEND);
clock = clocks[State];
@@ -4289,6 +4289,33 @@ gckHARDWARE_SetFscaleValue(
if (Hardware->chipPowerState == gcvPOWER_ON)
{
+ gctUINT32 data;
+
+ gcmkONERROR(
+ gckOS_ReadRegisterEx(Hardware->os,
+ Hardware->core,
+ Hardware->powerBaseAddress
+ + 0x00104,
+ &data));
+
+ /* Disable all clock gating. */
+ gcmkONERROR(
+ gckOS_WriteRegisterEx(Hardware->os,
+ Hardware->core,
+ Hardware->powerBaseAddress
+ + 0x00104,
+ ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 0:0) - (0 ? 0:0) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 0:0) - (0 ? 0:0) + 1))))))) << (0 ? 0:0))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 0:0) - (0 ? 0:0) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 0:0) - (0 ? 0:0) + 1))))))) << (0 ? 0:0)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 1:1) - (0 ? 1:1) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 1:1) - (0 ? 1:1) + 1))))))) << (0 ? 1:1))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 1:1) - (0 ? 1:1) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 1:1) - (0 ? 1:1) + 1))))))) << (0 ? 1:1)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 2:2) - (0 ? 2:2) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 2:2) - (0 ? 2:2) + 1))))))) << (0 ? 2:2))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 2:2) - (0 ? 2:2) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 2:2) - (0 ? 2:2) + 1))))))) << (0 ? 2:2)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 3:3) - (0 ? 3:3) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 3:3) - (0 ? 3:3) + 1))))))) << (0 ? 3:3))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 3:3) - (0 ? 3:3) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 3:3) - (0 ? 3:3) + 1))))))) << (0 ? 3:3)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 4:4) - (0 ? 4:4) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 4:4) - (0 ? 4:4) + 1))))))) << (0 ? 4:4))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 4:4) - (0 ? 4:4) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 4:4) - (0 ? 4:4) + 1))))))) << (0 ? 4:4)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 5:5) - (0 ? 5:5) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 5:5) - (0 ? 5:5) + 1))))))) << (0 ? 5:5))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 5:5) - (0 ? 5:5) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 5:5) - (0 ? 5:5) + 1))))))) << (0 ? 5:5)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 6:6) - (0 ? 6:6) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 6:6) - (0 ? 6:6) + 1))))))) << (0 ? 6:6))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 6:6) - (0 ? 6:6) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 6:6) - (0 ? 6:6) + 1))))))) << (0 ? 6:6)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 7:7) - (0 ? 7:7) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 7:7) - (0 ? 7:7) + 1))))))) << (0 ? 7:7))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 7:7) - (0 ? 7:7) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 7:7) - (0 ? 7:7) + 1))))))) << (0 ? 7:7)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 8:8) - (0 ? 8:8) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 8:8) - (0 ? 8:8) + 1))))))) << (0 ? 8:8))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 8:8) - (0 ? 8:8) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 8:8) - (0 ? 8:8) + 1))))))) << (0 ? 8:8)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 9:9) - (0 ? 9:9) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 9:9) - (0 ? 9:9) + 1))))))) << (0 ? 9:9))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 9:9) - (0 ? 9:9) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 9:9) - (0 ? 9:9) + 1))))))) << (0 ? 9:9)))
+ | ((((gctUINT32) (0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 11:11) - (0 ? 11:11) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 11:11) - (0 ? 11:11) + 1))))))) << (0 ? 11:11))) | (((gctUINT32) ((gctUINT32) (1) & ((gctUINT32) ((((1 ? 11:11) - (0 ? 11:11) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 11:11) - (0 ? 11:11) + 1))))))) << (0 ? 11:11)))));
+
gcmkONERROR(_GetClock(Hardware, gcvPOWER_ON, &clock));
gcmkONERROR(gckOS_WriteRegisterEx(Hardware->os,
@@ -4301,6 +4328,15 @@ gckHARDWARE_SetFscaleValue(
Hardware->core,
0x00000,
((((gctUINT32) (clock)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 9:9) - (0 ? 9:9) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 9:9) - (0 ? 9:9) + 1))))))) << (0 ? 9:9))) | (((gctUINT32) ((gctUINT32) (0) & ((gctUINT32) ((((1 ? 9:9) - (0 ? 9:9) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 9:9) - (0 ? 9:9) + 1))))))) << (0 ? 9:9)))));
+
+ /* Restore all clock gating. */
+ gcmkONERROR(
+ gckOS_WriteRegisterEx(Hardware->os,
+ Hardware->core,
+ Hardware->powerBaseAddress
+ + 0x00104,
+ data));
+
}
gcmkVERIFY(gckOS_ReleaseMutex(Hardware->os, Hardware->powerMutex));
diff --git a/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c b/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c
index aa9fdaf27cdc..4cee1df5cbf8 100644
--- a/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c
+++ b/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2009-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -61,6 +61,7 @@ static unsigned int f_calc(unsigned int pfs, unsigned int bpp, unsigned int *wri
case IPU_PIX_FMT_YUV420P2:
case IPU_PIX_FMT_YUV420P:
case IPU_PIX_FMT_YVU420P:
+ case IPU_PIX_FMT_YUV444P:
f_calculated = 16;
break;
@@ -114,6 +115,7 @@ static unsigned int m_calc(unsigned int pfs)
case IPU_PIX_FMT_YVU422P:
case IPU_PIX_FMT_YUV422P:
case IPU_PIX_FMT_YVU420P:
+ case IPU_PIX_FMT_YUV444P:
case IPU_PIX_FMT_NV12:
m_calculated = 8;
break;
diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c
index 561433ff7747..4e3526c81839 100644
--- a/drivers/mxc/ipu3/ipu_common.c
+++ b/drivers/mxc/ipu3/ipu_common.c
@@ -2943,6 +2943,7 @@ uint32_t bytes_per_pixel(uint32_t fmt)
case IPU_PIX_FMT_YUV420P:
case IPU_PIX_FMT_YVU420P:
case IPU_PIX_FMT_YUV422P:
+ case IPU_PIX_FMT_YUV444P:
return 1;
break;
case IPU_PIX_FMT_RGB565:
diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c
index 8c5aef0a8408..215fc706407f 100644
--- a/drivers/mxc/ipu3/ipu_device.c
+++ b/drivers/mxc/ipu3/ipu_device.c
@@ -420,6 +420,7 @@ unsigned int fmt_to_bpp(unsigned int pixelformat)
case IPU_PIX_FMT_BGR24:
case IPU_PIX_FMT_RGB24:
case IPU_PIX_FMT_YUV444:
+ case IPU_PIX_FMT_YUV444P:
bpp = 24;
break;
case IPU_PIX_FMT_BGR32:
@@ -465,6 +466,7 @@ cs_t colorspaceofpixel(int fmt)
case IPU_PIX_FMT_YVU422P:
case IPU_PIX_FMT_YUV422P:
case IPU_PIX_FMT_YUV444:
+ case IPU_PIX_FMT_YUV444P:
case IPU_PIX_FMT_NV12:
case IPU_PIX_FMT_TILED_NV12:
case IPU_PIX_FMT_TILED_NV12F:
@@ -750,6 +752,11 @@ static void update_offset(unsigned int fmt,
+ (width * pos_y)/2 + pos_x/2;
*voff = *uoff + (width * height)/2;
break;
+ case IPU_PIX_FMT_YUV444P:
+ *off = pos_y * width + pos_x;
+ *uoff = width * height;
+ *voff = width * height * 2;
+ break;
case IPU_PIX_FMT_NV12:
*off = pos_y * width + pos_x;
*uoff = (width * (height - pos_y) - pos_x)
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index 680361898e8f..0c09256b4322 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -39,6 +39,7 @@ struct dp_csc_param_t {
};
#define SYNC_WAVE 0
+#define NULL_WAVE (-1)
#define ASYNC_SER_WAVE 6
/* DC display ID assignments */
@@ -793,7 +794,7 @@ void _ipu_dc_init(struct ipu_soc *ipu, int dc_chan, int di, bool interlaced, uin
if (di) {
_ipu_dc_link_event(ipu, dc_chan, DC_EVT_NL, 2, 3);
_ipu_dc_link_event(ipu, dc_chan, DC_EVT_EOL, 3, 2);
- _ipu_dc_link_event(ipu, dc_chan, DC_EVT_NEW_DATA, 4, 1);
+ _ipu_dc_link_event(ipu, dc_chan, DC_EVT_NEW_DATA, 1, 1);
if ((pixel_fmt == IPU_PIX_FMT_YUYV) ||
(pixel_fmt == IPU_PIX_FMT_UYVY) ||
(pixel_fmt == IPU_PIX_FMT_YVYU) ||
@@ -804,7 +805,7 @@ void _ipu_dc_init(struct ipu_soc *ipu, int dc_chan, int di, bool interlaced, uin
} else {
_ipu_dc_link_event(ipu, dc_chan, DC_EVT_NL, 5, 3);
_ipu_dc_link_event(ipu, dc_chan, DC_EVT_EOL, 6, 2);
- _ipu_dc_link_event(ipu, dc_chan, DC_EVT_NEW_DATA, 7, 1);
+ _ipu_dc_link_event(ipu, dc_chan, DC_EVT_NEW_DATA, 12, 1);
if ((pixel_fmt == IPU_PIX_FMT_YUYV) ||
(pixel_fmt == IPU_PIX_FMT_UYVY) ||
(pixel_fmt == IPU_PIX_FMT_YVYU) ||
@@ -1637,8 +1638,10 @@ int32_t ipu_init_sync_panel(struct ipu_soc *ipu, int disp, uint32_t pixel_clk,
ipu_dc_write(ipu, (width - 1), DC_UGDE_3(disp));
}
_ipu_dc_write_tmpl(ipu, 2, WROD(0), 0, map, SYNC_WAVE, 8, 5, 1);
- _ipu_dc_write_tmpl(ipu, 3, WRG, 0, map, SYNC_WAVE, 4, 5, 1);
- _ipu_dc_write_tmpl(ipu, 4, WROD(0), 0, map, SYNC_WAVE, 0, 5, 1);
+ _ipu_dc_write_tmpl(ipu, 3, WROD(0), 0, map, SYNC_WAVE, 4, 5, 0);
+ _ipu_dc_write_tmpl(ipu, 4, WRG, 0, map, NULL_WAVE, 0, 0, 1);
+ _ipu_dc_write_tmpl(ipu, 1, WROD(0), 0, map, SYNC_WAVE, 0, 5, 1);
+
} else {
if ((pixel_fmt == IPU_PIX_FMT_YUYV) ||
(pixel_fmt == IPU_PIX_FMT_UYVY) ||
@@ -1650,8 +1653,9 @@ int32_t ipu_init_sync_panel(struct ipu_soc *ipu, int disp, uint32_t pixel_clk,
ipu_dc_write(ipu, width - 1, DC_UGDE_3(disp));
}
_ipu_dc_write_tmpl(ipu, 5, WROD(0), 0, map, SYNC_WAVE, 8, 5, 1);
- _ipu_dc_write_tmpl(ipu, 6, WRG, 0, map, SYNC_WAVE, 4, 5, 1);
- _ipu_dc_write_tmpl(ipu, 7, WROD(0), 0, map, SYNC_WAVE, 0, 5, 1);
+ _ipu_dc_write_tmpl(ipu, 6, WROD(0), 0, map, SYNC_WAVE, 4, 5, 0);
+ _ipu_dc_write_tmpl(ipu, 7, WRG, 0, map, NULL_WAVE, 0, 0, 1);
+ _ipu_dc_write_tmpl(ipu, 12, WROD(0), 0, map, SYNC_WAVE, 0, 5, 1);
}
if (sig.Hsync_pol) {
diff --git a/drivers/mxc/ipu3/ipu_param_mem.h b/drivers/mxc/ipu3/ipu_param_mem.h
index 8ae0a5edd269..68c6654b25ed 100644
--- a/drivers/mxc/ipu3/ipu_param_mem.h
+++ b/drivers/mxc/ipu3/ipu_param_mem.h
@@ -415,6 +415,14 @@ static inline void _ipu_ch_param_init(struct ipu_soc *ipu, int ch,
u_offset = (u == 0) ? stride * height : u;
v_offset = (v == 0) ? u_offset + u_offset / 2 : v;
break;
+ case IPU_PIX_FMT_YUV444P:
+ /* BPP & pixel format */
+ ipu_ch_param_set_field(&params, 1, 85, 4, 0); /* pix format */
+ ipu_ch_param_set_field(&params, 1, 78, 7, 31); /* burst size */
+ uv_stride = stride;
+ u_offset = (u == 0) ? stride * height : u;
+ v_offset = (v == 0) ? u_offset * 2 : v;
+ break;
case IPU_PIX_FMT_NV12:
/* BPP & pixel format */
ipu_ch_param_set_field(&params, 1, 85, 4, 4); /* pix format */
@@ -773,6 +781,24 @@ static inline void _ipu_ch_offset_update(struct ipu_soc *ipu,
v_offset;
break;
+ case IPU_PIX_FMT_YUV444P:
+ uv_stride = stride;
+ u_offset = stride * (height - vertical_offset - 1) +
+ (stride - horizontal_offset) +
+ (uv_stride * vertical_offset) +
+ horizontal_offset;
+ v_offset = u_offset + uv_stride * height;
+ u_fix = u ? (u + (uv_stride * vertical_offset) +
+ horizontal_offset -
+ (stride * vertical_offset) -
+ (horizontal_offset)) :
+ u_offset;
+ v_fix = v ? (v + (uv_stride * vertical_offset) +
+ horizontal_offset -
+ (stride * vertical_offset) -
+ (horizontal_offset)) :
+ v_offset;
+ break;
case IPU_PIX_FMT_NV12:
uv_stride = stride;
u_offset = stride * (height - vertical_offset - 1) +
diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c
index 3c4cc436ac39..26fc95a69574 100644
--- a/drivers/mxc/vpu/mxc_vpu.c
+++ b/drivers/mxc/vpu/mxc_vpu.c
@@ -39,7 +39,6 @@
#include <linux/workqueue.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>
-#include <linux/regulator/consumer.h>
#include <linux/page-flags.h>
#include <linux/mm_types.h>
#include <linux/types.h>
@@ -530,6 +529,7 @@ static long vpu_ioctl(struct file *filp, u_int cmd,
*/
static int vpu_release(struct inode *inode, struct file *filp)
{
+
mutex_lock(&vpu_data.lock);
if (open_count > 0 && !(--open_count)) {
vpu_free_buffers();
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index 471998ac2566..787374ab138d 100755
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -337,6 +337,7 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
u32 tmp;
+ unsigned long flags;
if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
/* Need open clock for register access */
@@ -363,13 +364,19 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
} else {
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
}
-
+ /*disable the host wakeup and put phy to low power mode */
+ usb_host_set_wakeup(hcd->self.controller, false);
+ spin_lock_irqsave(&ehci->lock, flags);
+ fsl_usb_lowpower_mode(pdata, true);
+ spin_unlock_irqrestore(&ehci->lock, flags);
+ /*free the ehci_fsl_pre_irq */
+ free_irq(hcd->irq, (void *)pdev);
usb_remove_hcd(hcd);
usb_put_hcd(hcd);
/*
* do platform specific un-initialization:
- * release iomux pins, etc.
+ * release iomux pins clocks, etc.
*/
if (pdata->exit)
pdata->exit(pdata->pdev);
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index abfdbd9619c0..681b18d9472c 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -234,6 +234,7 @@ static int _setup_disp_channel2(struct fb_info *fbi)
case IPU_PIX_FMT_YUV422P:
case IPU_PIX_FMT_YVU422P:
case IPU_PIX_FMT_YUV420P:
+ case IPU_PIX_FMT_YUV444P:
fb_stride = fbi->var.xres_virtual;
break;
default:
@@ -1358,6 +1359,7 @@ mxcfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
case IPU_PIX_FMT_YUV422P:
case IPU_PIX_FMT_YVU422P:
case IPU_PIX_FMT_YUV420P:
+ case IPU_PIX_FMT_YUV444P:
fb_stride = info->var.xres_virtual;
break;
default: