]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00230920-3 HDMI AUIDO: export symbol in HDMI core driver
Chen Liangjun [Wed, 24 Oct 2012 04:46:53 +0000 (12:46 +0800)]
ENGR00230920-3 HDMI AUIDO: export symbol in HDMI core driver

Export symbol in HDMI core driver to support HDMI AUDIO codec driver's
loadable module build.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00230920-2 HDMI AUDIO: export gloable variable in platform driver
Chen Liangjun [Wed, 24 Oct 2012 04:45:16 +0000 (12:45 +0800)]
ENGR00230920-2 HDMI AUDIO: export gloable variable in platform driver

Export gloable variable in HDMI AUDIO platform driver to support HDMI
AUDIO codec driver's loadable build.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00230920-1 HDMI AUDIO: add support for HDMI audio module build
Chen Liangjun [Wed, 24 Oct 2012 04:31:59 +0000 (12:31 +0800)]
ENGR00230920-1 HDMI AUDIO: add support for HDMI audio module build

HDMI driver can be divided into 3 parts: machine driver, platform
driver, codec driver.To support HDMI AUDIO loadable module build, HDMI
machine driver should be built as loadable.

In this patch, adjust HDMI audio driver's struct: move HDMI audio platform
 driver to snd-soc-imx-objs(snd-soc-imx-objs would always be
build-in).In this case, user need only build HDMI AUDIO machine driver
as loadable.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00229938 pxp/v4l2: check return value of kmalloc against NULL
Robby Cai [Wed, 17 Oct 2012 01:01:35 +0000 (09:01 +0800)]
ENGR00229938 pxp/v4l2: check return value of kmalloc against NULL

This is needed sanity check, because on Ubuntu it's likely that low memory
will happen. This patch also makes this memory allocated from dma zone.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00229665 pxp: correct crop setting
Robby Cai [Mon, 15 Oct 2012 13:36:44 +0000 (21:36 +0800)]
ENGR00229665 pxp: correct crop setting

The settings in the PXP_PS_BUF, PXP_OUT_PS_ULC, and PXP_OUT_PS_LRC will
determine the subset of the PS buffer, or clipped PS source buffer, that
will be used in the output buffer.

HW_PXP_OUT_PS_LRC should set the scaled output size rather than the origin
size when scaling.

Please refer to the "Clipping source images" section in RM for how it works.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227965 EPDC: Init sequence leaves EDPC clocks on
Michael Minnick [Tue, 16 Oct 2012 23:07:20 +0000 (18:07 -0500)]
ENGR00227965 EPDC: Init sequence leaves EDPC clocks on

A small logic bug prevents the init sequence from properly turning
off the clocks. This leads to the clocks being always on
if the first update does not complete due to the screen being blanked.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
11 years agoENGR00229785 pgc: disable display power gating when FB_MXC_ELCDIF_FB configured
Robby Cai [Tue, 16 Oct 2012 07:53:29 +0000 (15:53 +0800)]
ENGR00229785 pgc: disable display power gating when FB_MXC_ELCDIF_FB configured

Only enable power gating for PXP and EPDC. The feature for ELCDIF still need to
be verified.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00229803-2 sii902x: add dependency on CONFIG_FB_MXC_ELCDIF_FB
Robby Cai [Tue, 16 Oct 2012 08:21:28 +0000 (16:21 +0800)]
ENGR00229803-2 sii902x: add dependency on CONFIG_FB_MXC_ELCDIF_FB

Add dependency on CONFIG_FB_MXC_ELCDIF_FB, to avoid build error if as module.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00229803-1 lcdif: export mxcfb_elcdif_register_mode needed by sii902x driver
Robby Cai [Tue, 16 Oct 2012 08:08:29 +0000 (16:08 +0800)]
ENGR00229803-1 lcdif: export mxcfb_elcdif_register_mode needed by sii902x driver

This is needed when build sii902x hdmi driver as module

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00229473 elcdif fb: fix lcd framebuffer potential recursive locking
Robby Cai [Sun, 14 Oct 2012 13:33:21 +0000 (21:33 +0800)]
ENGR00229473 elcdif fb: fix lcd framebuffer potential recursive locking

This can be detected by enabling CONFIG_LOCKDEP and CONFIG_PROVE_LOCKING
The dump log:

=============================================
[ INFO: possible recursive locking detected ]
3.0.35-02140-gb4181ce-dirty #959
---------------------------------------------
swapper/1 is trying to acquire lock:
 ((fb_notifier_list).rwsem){.+.+.+}, at: [<80088758>] __blocking_notifier_call_chain+0x44/0x88

 but task is already holding lock:
  ((fb_notifier_list).rwsem){.+.+.+}, at: [<80088758>] __blocking_notifier_call_chain+0x44/0x88

  other info that might help us debug this:
   Possible unsafe locking scenario:

CPU0
----
 lock((fb_notifier_list).rwsem);
 lock((fb_notifier_list).rwsem);

*** DEADLOCK ***

May be due to missing lock nesting notation

5 locks held by swapper/1:
 #0:  (&__lockdep_no_validate__){+.+.+.}, at: [<8027f244>] __driver_attach+0x48/0x98
 #1:  (&__lockdep_no_validate__){+.+.+.}, at: [<8027f254>] __driver_attach+0x58/0x98
 #2:  (registration_lock){+.+.+.}, at: [<8023a17c>] register_framebuffer+0x18/0x24c
 #3:  (&fb_info->lock){+.+.+.}, at: [<80238dc8>] lock_fb_info+0x18/0x3c
 #4:  ((fb_notifier_list).rwsem){.+.+.+}, at: [<80088758>] __blocking_notifier_call_chain+0x44/0x88

stack backtrace:
[<800405c4>] (unwind_backtrace+0x0/0xf8) from [<80097c78>] (__lock_acquire+0x1644/0x1c18)
[<80097c78>] (__lock_acquire+0x1644/0x1c18) from [<80098748>] (lock_acquire+0x84/0x98)
[<80098748>] (lock_acquire+0x84/0x98) from [<804d0aa8>] (down_read+0x34/0x44)
[<804d0aa8>] (down_read+0x34/0x44) from [<80088758>] (__blocking_notifier_call_chain+0x44/0x88)
[<80088758>] (__blocking_notifier_call_chain+0x44/0x88) from [<800887b4>] (blocking_notifier_call_chain+0x18/0x20)
[<800887b4>] (blocking_notifier_call_chain+0x18/0x20) from [<802397e0>] (fb_set_var+0x264/0x290)
[<802397e0>] (fb_set_var+0x264/0x290) from [<8024a320>] (lcd_init_fb+0x54/0x70)
[<8024a320>] (lcd_init_fb+0x54/0x70) from [<8024a3f0>] (lcd_fb_event+0x44/0xb4)
[<8024a3f0>] (lcd_fb_event+0x44/0xb4) from [<80088514>] (notifier_call_chain.isra.1+0x74/0xd0)
[<80088514>] (notifier_call_chain.isra.1+0x74/0xd0) from [<80088774>] (__blocking_notifier_call_chain+0x60/0x88)
[<80088774>] (__blocking_notifier_call_chain+0x60/0x88) from [<800887b4>] (blocking_notifier_call_chain+0x18/0x20)
[<800887b4>] (blocking_notifier_call_chain+0x18/0x20) from [<8023a2d4>] (register_framebuffer+0x170/0x24c)
[<8023a2d4>] (register_framebuffer+0x170/0x24c) from [<8024fe8c>] (mxc_elcdif_fb_probe+0x464/0x564)
[<8024fe8c>] (mxc_elcdif_fb_probe+0x464/0x564) from [<8028031c>] (platform_drv_probe+0x18/0x1c)
[<8028031c>] (platform_drv_probe+0x18/0x1c) from [<8027f0f0>] (driver_probe_device+0x90/0x19c)
[<8027f0f0>] (driver_probe_device+0x90/0x19c) from [<8027f290>] (__driver_attach+0x94/0x98)
[<8027f290>] (__driver_attach+0x94/0x98) from [<8027e2e4>] (bus_for_each_dev+0x5c/0x88)
[<8027e2e4>] (bus_for_each_dev+0x5c/0x88) from [<8027eabc>] (bus_add_driver+0x188/0x250)
[<8027eabc>] (bus_add_driver+0x188/0x250) from [<8027f750>] (driver_register+0x78/0x13c)
[<8027f750>] (driver_register+0x78/0x13c) from [<8001c838>] (mxc_elcdif_fb_init+0x38/0x48)
[<8001c838>] (mxc_elcdif_fb_init+0x38/0x48) from [<80035334>] (do_one_initcall+0x34/0x178)
[<80035334>] (do_one_initcall+0x34/0x178) from [<80008968>] (kernel_init+0x84/0x124)
[<80008968>] (kernel_init+0x84/0x124) from [<8003b614>] (kernel_thread_exit+0x0/0x8)

In fact, we don't need support dynamically switch the framebuffer.
so, we only need do once registeration in probe function.

Signed-off-by: Robby Cai <R63905@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00227728 csi/v4l: add V4L2_CAP_VIDEO_CAPTURE & V4L2_CAP_STREAMING capability
Robby Cai [Fri, 12 Oct 2012 13:48:40 +0000 (21:48 +0800)]
ENGR00227728 csi/v4l: add V4L2_CAP_VIDEO_CAPTURE & V4L2_CAP_STREAMING capability

add V4L2_CAP_VIDEO_CAPTURE & V4L2_CAP_STREAMING capability for QUERYCAP ioctl.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227873-2 mx6sl: enable pxp v4l2 option in defconfig
Robby Cai [Thu, 11 Oct 2012 07:10:13 +0000 (15:10 +0800)]
ENGR00227873-2 mx6sl: enable pxp v4l2 option in defconfig

Enable CONFIG_VIDEO_MXC_PXP_V4L2 option.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227873-1 pxp/v4l2: make the v4l2 output device index auto assigned
Robby Cai [Wed, 10 Oct 2012 07:17:27 +0000 (15:17 +0800)]
ENGR00227873-1 pxp/v4l2: make the v4l2 output device index auto assigned

It used the hard-coded '0' for historical reason.
This patch changes it to -1 to make video device minor to
be automatically assigned.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227726 csi: Disable csi clock when it's inactive
Robby Cai [Thu, 11 Oct 2012 06:50:34 +0000 (14:50 +0800)]
ENGR00227726 csi: Disable csi clock when it's inactive

Disable csi clock when inactive, otherwise this prevents system from
entering low power mode.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00229222 mmc: esdhc: allow MMC and SDIO cards switched to 1.8V signalling
Robby Cai [Thu, 11 Oct 2012 11:43:49 +0000 (19:43 +0800)]
ENGR00229222 mmc: esdhc: allow MMC and SDIO cards switched to 1.8V signalling

The current driver only allows SD cards to run at 1.8V.
This patch allows MMC and SDIO cards to be switched to 1.8V signalling

Acked-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227890 ts: fix elan touch screen gets no response upon suspend/resume
Robby Cai [Thu, 11 Oct 2012 09:18:15 +0000 (17:18 +0800)]
ENGR00227890 ts: fix elan touch screen gets no response upon suspend/resume

To reproduce:
1. let system enter suspend mode
2. touch the screen
3. after the system resumes, touch screen does not respond again.

The cause:
The touch screen interrupt is triggered by falling edge. During suspend stage,
once the screen has ever been touched, then the interrupt line will be always
pulled low. Since elan ts chip is always powered on and the interrupt gets no
chance to be handled during suspend stage, the interrupt line can not recover
to high to detect a new one.

Workaround:
Read out the pending data to make the touch screen come back alive.

Signed-off-by: LiGang <b41990@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00229905-2: board-mx6q_sabreauto add i2c ad7280 device
Adrian Alonso [Thu, 27 Sep 2012 19:32:31 +0000 (14:32 -0500)]
ENGR00229905-2: board-mx6q_sabreauto add i2c ad7280 device

* Add ad7280 I2C device support

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Signed-off-by: Oscar Luna <r01160@freescale.com>
11 years agoENGR00229905-1: adv7280 mipi csi2 tvin decoder support
Adrian Alonso [Mon, 15 Oct 2012 20:28:05 +0000 (15:28 -0500)]
ENGR00229905-1: adv7280 mipi csi2 tvin decoder support

* Add ADV728x mipi csi2 tvin decoder support
* Perform a hardware reset via i2c command
* Load recommended initial config settings
* Kconfig selection options
* Makefile build rules

Signed-off-by: Oscar Luna <r01160@freescale.com>
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00230377 Sabreauto: Add eCompass support
Alejandro Sierra [Fri, 19 Oct 2012 03:01:39 +0000 (22:01 -0500)]
ENGR00230377 Sabreauto: Add eCompass support

Add eCompass support on Sabreauto platform

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
11 years agoENGR00229725 Sabreauto: Support NAND SPINOR NOR SD on same config
Alejandro Sierra [Mon, 15 Oct 2012 23:13:47 +0000 (18:13 -0500)]
ENGR00229725 Sabreauto: Support NAND SPINOR NOR SD on same config

Configuration file modified to support NAND flash, SPI-NOR,
WEIM NOR and SD card on the same image.
Bootloader arguments will be used to choose between them.
Arguments on uboot are:
spi-nor
weim-nor
By default NAND is configured if neither spi-nor or weim-nor are used

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
11 years agoENGR00225520 SDMA:fix kernel dump occasionally during I2C stress test
Nicolin Chen [Tue, 16 Oct 2012 08:20:03 +0000 (16:20 +0800)]
ENGR00225520 SDMA:fix kernel dump occasionally during I2C stress test

 Stress test with I2C devices occasionally caused kernel dump and panic:
==========================dump=start==========================
v4l_capture_testapp    0  TINFO  :
  Color space conversion YUV420->RGB565X success!
v4l_capture_testapp    0  TINFO  :
  Color space conversion YUV420->RGB565X success!
clean up environment...VPU interrupt received.

Unable to handle kernel paging request at virtual address ffdf401a
pgd = ba2a4000
[ffdf401a] *pgd=4fe1a811, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1] PREEMPT SMP
Modules linked in: mxc_v4l2_capture ipu_still ipu_bg_overlay_sdc
 ipu_prp_enc ipu_fg_overlay_sdc ipu_csi_enc ov5642_camera
  camera_sensor_clock [last unloaded: ipu_csi_enc]
CPU: 0    Not tainted  (3.0.35-2039-g267e004 #1)
PC is at sdma_int_handler+0x144/0x1a4
LR is at sdma_int_handler+0x70/0x1a4
pc : [<802663f4>]    lr : [<80266320>]    psr: 60000193
sp : ba3e7ca8  ip : bfee2100  fp : 00000001
r10: 80a67200  r9 : 80acbcf0  r8 : 00000003
r7 : 00000001  r6 : 00000001  r5 : 00000002  r4 : bfee20e0
r3 : ffdf4000  r2 : 00010104  r1 : ffdf4018  r0 : bfee2104
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c53c7d  Table: 4a2a404a  DAC: 00000015
Process mxc_vpu_test.ou (pid: 3277, stack limit = 0xba3e62f0)
Stack: (0xba3e7ca8 to 0xba3e8000)
7ca0:                   80038f40 bfee2000 002977e3 bf9cda80
 80a6724c 00000000
7cc0: 00000000 00000022 80acbcf0 80a67200 00000001 800a5cb8
 0000f08f 00000000
[<802663f4>] (sdma_int_handler+0x144/0x1a4)
 from [<800a5cb8>] (handle_irq_event_percpu+0x50/0x180)
[<800a5cb8>] (handle_irq_event_percpu+0x50/0x180)
 from [<800a5e24>] (handle_irq_event+0x3c/0x5c)
[<800a5e24>] (handle_irq_event+0x3c/0x5c)
 from [<800a81a8>] (handle_fasteoi_irq+0xbc/0x154)
[<800a81a8>] (handle_fasteoi_irq+0xbc/0x154)
 from [<800a5620>] (generic_handle_irq+0x28/0x3c)
[<800a5620>] (generic_handle_irq+0x28/0x3c)
 from [<80040830>] (handle_IRQ+0x4c/0xac)
[<80040830>] (handle_IRQ+0x4c/0xac)
 from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
[<8003f9cc>] (__irq_svc+0x4c/0xe8)
 from [<800764f4>] (__do_softirq+0x4c/0x140)
[<800764f4>] (__do_softirq+0x4c/0x140)
 from [<80076a90>] (irq_exit+0x94/0x9c)
[<80076a90>] (irq_exit+0x94/0x9c)
 from [<8003a1b4>] (do_local_timer+0x70/0x90)
[<8003a1b4>] (do_local_timer+0x70/0x90)
 from [<8003f9cc>] (__irq_svc+0x4c/0xe8)
Exception stack(0xba3e7de8 to 0xba3e7e30)
[<8003f9cc>] (__irq_svc+0x4c/0xe8)
 from [<80071a88>] (vprintk+0x328/0x4a8)
[<80071a88>] (vprintk+0x328/0x4a8)
 from [<804ddb28>] (printk+0x1c/0x2c)
[<804ddb28>] (printk+0x1c/0x2c)
 from [<80390de0>] (vpu_ioctl+0x2cc/0x864)
[<80390de0>] (vpu_ioctl+0x2cc/0x864)
 from [<800fc314>] (do_vfs_ioctl+0x80/0x54c)
[<800fc314>] (do_vfs_ioctl+0x80/0x54c)
 from [<800fc818>] (sys_ioctl+0x38/0x5c)
[<800fc818>] (sys_ioctl+0x38/0x5c)
 from [<8003ff80>] (ret_fast_syscall+0x0/0x30)
Code: e594101c e5943038 e0811081 e0831101 (e5d13002)
---[ end trace 82daf36a5a07d470 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Rebooting in 60 seconds..
==========================dump=end==========================
 This kernel dump only happened after one period of stress-test's done.

 From the dump info above, we just located the issue happened in SDMA driver.
 Regularly, it'd not be any problem when sdma_int_handler()'s called. But after
tracing, we found that in those occasional times, the last one irq of a channel
hadn't been responded while sdma_free_chan_resources() was already done.
 sdma_free_chan_resources() should be called in the end of the procedure. Any
irq wouldn't occur after its resources're freed.
 But considering about stress test, the test scripts uses "kill" cmd to close
aplay, which means pcm_free() might be called before last buffer's transmission
was finished. Plus, many modules're working in the same time during the test.
So CPU0, the only core can handle irq, would be busy with irq-handlings, while
the other CPU cores(i.e. CPU1~3) might be idle and deal with free() much faster
than CPU0's irq-handling. Then kernel panic.

 Since we know, in some extreme circumstances, the irq would not be handled in
time, we can manually handle the irq ONLY IF we could still detect one irq to
the channel in the beginning of free(), right before its resources's gonna be
freed.
 This Patch added checking code in the beginning of sdma_free_chan_resources()
to detect when the channel's gonna be freed if there's still one irq pended.
If so, just handle the irq manually before we free it.
 Again, considering about sdma_int_handler() might be running at the same time,
and if it already cleared the value of reg but hadn't handled the irq yet, also
added code to pend free() until irq to the channel was handled.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00229902: mx6q sabreauto tvin use io_init callback function
Adrian Alonso [Fri, 5 Oct 2012 15:22:52 +0000 (10:22 -0500)]
ENGR00229902: mx6q sabreauto tvin use io_init callback function

* Adv7180 use tvin io_init callback to configure csi0/ipu
  mux settings mx6q_csi0_io_init.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00229952 mxc_v4l2_capture: csi ic mem uses hard coded initial DMA base addr
Sheng Nan [Wed, 17 Oct 2012 06:14:06 +0000 (14:14 +0800)]
ENGR00229952 mxc_v4l2_capture: csi ic mem uses hard coded initial DMA base addr

When setup csi ic mem on the fly channel, the capture output buffer is
initialized with hard coded dummy address 0xdeadbeaf

This also causes IPU warning when use this channel:
imx-ipuv3 imx-ipuv3.0: IDMAC20's EBA0 is not 8-byte aligned

- use the pre-allocated dummy_frame.vaddress instead of 0xdeadbeaf

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229962 Capture: ov5642/ov5640: update sensor params even if s_parm failed
Sheng Nan [Wed, 17 Oct 2012 06:55:10 +0000 (14:55 +0800)]
ENGR00229962 Capture: ov5642/ov5640: update sensor params even if s_parm failed

ioctl_s_parm for ov5642 and ov5640, it didn't check if sensor changed mode
successfully.
So it updates the sensor parameters with new framerate and new mode even
if the sensor failed to change mode.

The original framerate and mode is useful for the exposure calculation.
It should keep consistent with sensor actual work mode.

- This patch checks the return value of function which changes sensor mode
  If it succeed, update sensor parameters.

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229924 MX6SL-Fix MMDC FIFO reset code.
Ranjani Vaidyanathan [Tue, 16 Oct 2012 13:15:03 +0000 (08:15 -0500)]
ENGR00229924 MX6SL-Fix MMDC FIFO reset code.

Write to the MMDC registers when resetting the MMDC after the
DDR I/Os have been floated.

This fixes the bug introduced by the commit:
"2a2f65bd07ad0f947794c2e5f2f825121805d663
MX6SL-Reset MMDC read FIFO in low power IDLE"

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00229695 MX6x-Set RBC counters correctly in STOP mode.
Ranjani Vaidyanathan [Mon, 15 Oct 2012 10:36:02 +0000 (05:36 -0500)]
ENGR00229695 MX6x-Set RBC counters correctly in STOP mode.

The REG_BYPASS_COUNTER(RBC) holds off interrupts when the PGC
block is sending signals to power gate the core. This is apart
from the RBC counter's basic functionality to act as counter to
power down the analog portions of the chip.
But the counter needs to be set/cleared only when no interrupts
are pending. And also for correct hold off the interrupts, enable the
counter as close to WFI as possible.
The RBC counts CKIL cycles (32KHz)
So follow the following steps to set the counter
in suspend/resume in mx6_suspend.S:
1. Mask all the GPC interrupts.
2. Write the counter value to the RBC
3. Enable the RBC
4. Unmask all the interrupts.
5. Busy wait for a few usecs to wait for RBC to start counting
in case an interrupt is pending.
4. Execute WFI
Reset the counter after resume in pm.c:
1. Mask all the GPC interrupts.
2. Disable the counter.
3. Set the RBC counter to 0.
4. Wait for 80usec for the write to get accepted.
5. Unmask all the interrupts.

With the above steps, we can minimize the PDNSCR and PUPSCR counters
in the GPC. The basic condition for the RBC counter:
RBC count >= 25 * IPG_CLK + PDNSCR_SW2ISO.
PDNSCR_SW2ISO = PDNSCR_ISO = 1 (counts in IPG_CLK)
PUPSCR_SW2ISO = PUPSCR_ISO = 2 (counts in 32K)

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00229321 Integrate GPU 4.6.9p8 kernel part driver
Loren Huang [Fri, 12 Oct 2012 06:31:36 +0000 (14:31 +0800)]
ENGR00229321 Integrate GPU 4.6.9p8 kernel part driver

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00224964-4 mxc_v4l2_capture: change capture stream off sequence
Sheng Nan [Mon, 15 Oct 2012 12:01:32 +0000 (20:01 +0800)]
ENGR00224964-4 mxc_v4l2_capture: change capture stream off sequence

Change v4l2 capture stream off sequence.
Both CSI MEM and CSI IC MEM channel wait for idmac eof and
disable csi firstly.

The disable sequence is:
- wait for idmac channel EOF, disable csi
- disable idmac channel
- disable smfc (CSI-->MEM channel)

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00224964-3 IPU: Capture: add csi wait4eof support of CSI-IC channel
Sheng Nan [Mon, 15 Oct 2012 12:00:25 +0000 (20:00 +0800)]
ENGR00224964-3 IPU: Capture: add csi wait4eof support of CSI-IC channel

current _ipu_csi_wait4eof only support CSI-->MEM channel

- add support of CSI_PRP_ENC_MEM
- add support of CSI_PRP_VF_MEM

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00224964-2 IPU: Capture: change csi disable sequence
Sheng Nan [Mon, 15 Oct 2012 10:00:10 +0000 (18:00 +0800)]
ENGR00224964-2 IPU: Capture: change csi disable sequence

The recommended sequence for disable csi is,
disable csi as soon as we get IDMAC eof interrupt.

- add wait for eof when disable csi.
- don't wait for eof when disable CSI-->MEM channel.

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00224964-1 Capture: ov5642: 5M mode works at low frame rate
Sheng Nan [Mon, 15 Oct 2012 09:49:27 +0000 (17:49 +0800)]
ENGR00224964-1 Capture: ov5642: 5M mode works at low frame rate

current setting of 5M (QSXGA) mode, sensor works at 2.5fps.
the expected frame rate is 7.5fps.

- use new ov5642 QSXGA firmware get from ov
  change sensor PLL settings 0x3010/0x3012
  QSXGA frame rate changes from 2.5 -- 7.5fps
- change mode between QSXGA@15fps and VGA@15fps go through quick change path.
  modify QSXGA_VGA quick change firmware due to the QSXGA PLL setting changes.
  keep value of 0x3010/0x3012 the same as VGA@15fps original value.

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229708 [MX6SL] Fix all build warnings.
Nancy Chen [Mon, 15 Oct 2012 15:52:08 +0000 (10:52 -0500)]
ENGR00229708 [MX6SL] Fix all build warnings.

Fix all build warnings in files:
arch/arm/mach-mx6/board-mx6sl_common.h
arch/arm/mach-mx6/board-mx6sl_evk.c
arch/arm/mach-mx6/clock_mx6sl.c
arch/arm/mach-mx6/cpu_regulator-mx6.c
arch/arm/mach-mx6/pm.c
arch/arm/mach-mx6/system.c
arch/arm/plat-mxc/dvfs_core.c

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
11 years agoENGR00229630 vpu: need to manage pu regulator in suspend/resume
Anson Huang [Mon, 15 Oct 2012 23:01:17 +0000 (19:01 -0400)]
ENGR00229630 vpu: need to manage pu regulator in suspend/resume

If VPU is working before suspend, we need to disable its regulator
to make sure regulator can be off before suspend, then enable
its regulator before resume to work, we check vpu's open_count
to determine whether to disable/enable its regulator.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00229291 EPDC: MX6: Treat fully-collided VOID update as a collision
Michael Minnick [Fri, 12 Oct 2012 18:52:36 +0000 (13:52 -0500)]
ENGR00229291 EPDC: MX6: Treat fully-collided VOID update as a collision

The EPDC set the UPD_VOID (i.e. cancelled) bit in two cases:
1. No pixels needed updating
2. All pixels collided (COL bit also set)
The driver was miss-handling case 2. This fix causes case 2
to be treated as a collision and the update to be resubmitted.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
11 years agoENGR00229441 MX6SL-Reset MMDC read FIFO in low power IDLE
Ranjani Vaidyanathan [Fri, 12 Oct 2012 10:40:03 +0000 (05:40 -0500)]
ENGR00229441 MX6SL-Reset MMDC read FIFO in low power IDLE

MMDC can clock in bad data due to the glitches caused by
changing the setting of various DDR IO pads in low power
IDLE to save power. Solution is to reset the MMDC read FIFO
before the DDR exits self-refresh.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00223348 EPDC: Unable to enable DISPLAY regulator
Jack Lee [Wed, 3 Oct 2012 05:31:47 +0000 (13:31 +0800)]
ENGR00223348 EPDC: Unable to enable DISPLAY regulator

In the maxim 17135 driver, the power good is confirmed by the
power good GPIO polarity change when comparing the status at
the beginning of driver probe and display regulator enabled.
However, it is not reliable since the initial value of the GPIO
is not constant. Normally, it is 1 but it can be 0 after system reset
unexpectedly. Now, it is changed to POK bit checking in FAULT register.

Signed-off-by: Jack Lee <jack.lee@freescale.com>
11 years agoENGR00229470-2 MX6SL-Add support for debug UART to be sourced from 24MHz.
Ranjani Vaidyanathan [Sun, 14 Oct 2012 12:41:05 +0000 (07:41 -0500)]
ENGR00229470-2 MX6SL-Add support for debug UART to be sourced from 24MHz.

If "debug_uart" is specified in the command line, uart will
be sourced from 24MHz XTAL. This is required for getting the
correct power measurements on MX6SL.
Certain analog power optimizations are done only if ALL PLLs
are bypassed on MX6SL. To verify this path, we need to ensure
that UART is not sourced from PLL3.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00229470-1 MX6SL-Add support for debug UART to be sourced from 24MHz.
Ranjani Vaidyanathan [Sun, 14 Oct 2012 12:40:10 +0000 (07:40 -0500)]
ENGR00229470-1 MX6SL-Add support for debug UART to be sourced from 24MHz.

If "debug_uart" is specified in the command line, uart will
be sourced from 24MHz XTAL. This is required for getting the
correct power measurements on MX6SL.
Certain analog power optimizations are done only if ALL PLLs
are bypassed on MX6SL. To verify this path, we need to ensure
that UART is not sourced from PLL3.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00211376 Capture: ov5640_mipi: the QVGA is brighter
Sheng Nan [Sat, 13 Oct 2012 06:33:13 +0000 (14:33 +0800)]
ENGR00211376 Capture: ov5640_mipi: the QVGA is brighter

change ov5640_init_mode sequence according to ov's suggestion

ov5640 support two method of size switching, scaling and subsampling
exposure calculation when change size between scaling and subsampling
- scaling: image size bigger than 1280*960
- subsampling: image size smaller than 1280*960

This patch changes the sequence of ov5640_init_mode()
1. setting mipi csi2 (no change).
2. check mode
- if it is in INIT_MODE, go throught initial procedure
- if sensor changes between scaling and subsampling,
  go through exposure calcualtion
- otherwise, configure mode directly.
3. other procedures keep the same.

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229464 MX6SL-Update the SOC voltages based on datasheet
Ranjani Vaidyanathan [Sat, 13 Oct 2012 23:38:25 +0000 (18:38 -0500)]
ENGR00229464 MX6SL-Update the SOC voltages based on datasheet

Update the VDDARM and VDDSOC voltages based on IMX6SLCEC_Rev0
datasheet.
As the voltages for ARM @ 198MHz and ARM @ 396MHz are the same
remove the 198MHz working point.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00229353 Capture: ov5640 mipi: XVLK rename and value change
Sheng Nan [Fri, 12 Oct 2012 09:21:17 +0000 (17:21 +0800)]
ENGR00229353 Capture: ov5640 mipi: XVLK rename and value change

- XVCLK equals MCLK/10000, currently XVCLK is hard set as 2200
- rename it in lower case

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229350 Capture: ov5640 mipi: duplicated define of static variable
Sheng Nan [Fri, 12 Oct 2012 08:47:28 +0000 (16:47 +0800)]
ENGR00229350 Capture: ov5640 mipi: duplicated define of static variable

remove duplicated definition of prev_sysclk

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229323 Capture: ov5640 mipi: code type warning generated by script
Sheng Nan [Fri, 12 Oct 2012 08:21:05 +0000 (16:21 +0800)]
ENGR00229323 Capture: ov5640 mipi: code type warning generated by script

clear code type warning generated by script

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00229437 [MX6SL] Fix AHB clock not changed to 3MHz in IDLE mode
Nancy Chen [Fri, 12 Oct 2012 15:15:30 +0000 (10:15 -0500)]
ENGR00229437 [MX6SL] Fix AHB clock not changed to 3MHz in IDLE mode

1. Fix AHB clock not changed to 3MHz in IDLE mode
2. Fix system hangs in IDLE mode due to changes made for LOCKDEP

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
11 years agoENGR00229299 [MX6SL] Kernel cannot boot if enable LOCKDEP
Nancy Chen [Thu, 11 Oct 2012 15:18:24 +0000 (10:18 -0500)]
ENGR00229299 [MX6SL] Kernel cannot boot if enable LOCKDEP

1. Fix mutex_lock nested issue in idle mode
2. Fix mutex_lock nested issue in suspend mode
3. Fix spin_lock nested issue in busfreq

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
11 years agoENGR00229290 EPDC: MX6: Adjust number of LUTs for 5-bit waveform
Michael Minnick [Tue, 9 Oct 2012 23:06:31 +0000 (18:06 -0500)]
ENGR00229290 EPDC: MX6: Adjust number of LUTs for 5-bit waveform

When a 5-bit waveform is loaded, the maximum number of available
LUTs is 16. The LUT allocator must account for this.

Note that 5-bit waveform loading is currently not supported in the
driver. However, this fix makes sure the LUT allocator is correct
when 5-bit support is added.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
11 years agoENGR00227420 mmc: sdhci: shorten the delay on disabling clk
Ryan QIAN [Mon, 8 Oct 2012 23:44:34 +0000 (07:44 +0800)]
ENGR00227420 mmc: sdhci: shorten the delay on disabling clk

- change the delay from 10 * HZ to 1 * HZ, though (1 * HZ) might not be the
best, just as a base.
1. Since the request has been moved out of interrupt context, there will be no
more calling enable_clk in interrupt context. So it's not necessary to keep
such a long delay on disabling clock in order to save power.
2. Still keeping the 1*HZ of delay is to avoid frequently enabling/disabling
clock.

eMMC card performance test result with bonnie++:
(512M RAM, 1GB data, 1K buffer)
------------------------------------------------------------------------------
|             |           1*HZ               |            10 * HZ            |
------------------------------------------------------------------------------
|    Read     |          ~24.1MB/s           |            ~23.9MB/s          |
------------------------------------------------------------------------------
|    Write    |          ~10.5MB/s           |            ~10.5MB/s          |
------------------------------------------------------------------------------

WiFi card performance test result with iperf is quite same: ~21Mbps
(AR6003@2.4G, TCP, TCP window size option 1MB both for server and client)

Acked-by: Robby CAI <r63905@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00229354 Mx6 USB device: fix wrong handle for invalid USB_FEATURE requests
make shi [Fri, 12 Oct 2012 09:01:33 +0000 (17:01 +0800)]
ENGR00229354 Mx6 USB device: fix wrong handle for invalid USB_FEATURE requests

There is a bug udc driver handle invalid USB_FEATURE requests in current bsp.
The invalid USB_FEATURE request will be handled as a valid USB_FEATURE request.
We should set protocol stall on ep0 to handle invalid USB_FEATURE requests.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00229338: usb: fix using lock before initialization problem
Peter Chen [Fri, 12 Oct 2012 07:23:49 +0000 (15:23 +0800)]
ENGR00229338: usb: fix using lock before initialization problem

It will cause below problem if spin_lock debug is on:

BUG: spinlock lockup on CPU#0, swapper/1, 9a0292a0

The reason is the lock is used before initialization.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00229327: otp: driver causes warning when enable CONFIG_LOCKDEP
Terry Lv [Fri, 12 Oct 2012 06:39:34 +0000 (14:39 +0800)]
ENGR00229327: otp: driver causes warning when enable CONFIG_LOCKDEP

When CONFIG_LOCKDEP is enabled, it will cause warings:

------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2885 sysfs_add_file_mode+0x54/0xc0()
     Modules linked in:
     [<80046364>] (unwind_backtrace+0x0/0xfc) from [<800758c0>]
     (warn_slowpath_common+0x4c/0x64)
     [<800758c0>] (warn_slowpath_common+0x4c/0x64) from [<800758f4>]
     (warn_slowpath_null+0x1c/0x24)
     [<800758f4>] (warn_slowpath_null+0x1c/0x24) from [<801536c4>]
     (sysfs_add_file_mode+0x54/0xc0)
     [<801536c4>] (sysfs_add_file_mode+0x54/0xc0) from [<8015616c>]
     (internal_create_group+0xdc/0x1d8)
     [<8015616c>] (internal_create_group+0xdc/0x1d8) from [<80524110>]
     (fsl_otp_probe+0x168/0x1d4)
     [<80524110>] (fsl_otp_probe+0x168/0x1d4) from [<802b42e8>]
     (platform_drv_probe+0x18/0x1c)
     [<802b42e8>] (platform_drv_probe+0x18/0x1c) from [<802b2fe4>]
     (driver_probe_device+0x98/0x1a4)
     [<802b2fe4>] (driver_probe_device+0x98/0x1a4) from [<802b3184>]
     (__driver_attach+0x94/0x98)
     [<802b3184>] (__driver_attach+0x94/0x98) from [<802b280c>]
     (bus_for_each_dev+0x60/0x8c)
     [<802b280c>] (bus_for_each_dev+0x60/0x8c) from [<802b2180>]
     (bus_add_driver+0x190/0x268)
     [<802b2180>] (bus_add_driver+0x190/0x268) from [<802b3788>]
     (driver_register+0x78/0x13c)
     [<802b3788>] (driver_register+0x78/0x13c) from [<800394ac>]
     (do_one_initcall+0x30/0x170)
     [<800394ac>] (do_one_initcall+0x30/0x170) from [<800083cc>]
     (kernel_init+0x98/0x144)
     [<800083cc>] (kernel_init+0x98/0x144) from [<8004003c>]
     (kernel_thread_exit+0x0/0x8)
     ---[ end trace 877415a10b5d9cb1 ]---

also, on imx6sl, it will cause below issue:
BUG: key bffea2e4 not in .data!
BUG: key bffea300 not in .data!
BUG: key bffea31c not in .data!
BUG: key bffea338 not in .data!
BUG: key bffea354 not in .data!
BUG: key bffea370 not in .data!
BUG: key bffea38c not in .data!
BUG: key bffea3a8 not in .data!
BUG: key bffea3c4 not in .data!
BUG: key bffea3e0 not in .data!
BUG: key bffea3fc not in .data!
BUG: key bffea418 not in .data!
BUG: key bffea434 not in .data!
BUG: key bffea450 not in .data!
BUG: key bffea46c not in .data!
BUG: key bffea488 not in .data!
BUG: key bffea4a4 not in .data!
BUG: key bffea4c0 not in .data!
BUG: key bffea4dc not in .data!

We need to call sysfs_attr_init to initlize sysfs attr.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00227835 imx6q: gpmi: fix the warning when no NAND chip exits
Huang Shijie [Thu, 11 Oct 2012 01:50:13 +0000 (09:50 +0800)]
ENGR00227835 imx6q: gpmi: fix the warning when no NAND chip exits

If there is no nand chip in the board, the kernel will prints out the
following warning message:

------------[ cut here ]------------
WARNING: at arch/arm/plat-mxc/clock.c:63 clk_disable+0x48/0x90()
clock enable/disable mismatch! clk  apbh_dma_clk
Modules linked in:
[<80044f48>] (unwind_backtrace+0x0/0xfc) from
[<80070ac0>] (warn_slowpath_common+0x4c/0x64)
[<80070ac0>] (warn_slowpath_common+0x4c/0x64) from
[<80070b6c>] (warn_slowpath_fmt+0x30/0x40)
[<80070b6c>] (warn_slowpath_fmt+0x30/0x40) from
[<8005ee60>] (clk_disable+0x48/0x90)
[<8005ee60>] (clk_disable+0x48/0x90) from
[<80255e48>] (dma_chan_put+0x4c/0x50)
[<80255e48>] (dma_chan_put+0x4c/0x50) from
[<80255f18>] (dma_release_channel+0x24/0x94)
[<80255f18>] (dma_release_channel+0x24/0x94) from
[<802ad8ec>] (release_resources+0x58/0x6c)
[<802ad8ec>] (release_resources+0x58/0x6c) from
[<80445964>] (gpmi_nand_probe+0x44c/0x4ec)
[<80445964>] (gpmi_nand_probe+0x44c/0x4ec) from
[<80281868>] (platform_drv_probe+0x18/0x1c)
[<80281868>] (platform_drv_probe+0x18/0x1c) from
[<80280590>] (driver_probe_device+0x98/0x1a4)
[<80280590>] (driver_probe_device+0x98/0x1a4) from
[<80280728>] (__driver_attach+0x8c/0x90)
[<80280728>] (__driver_attach+0x8c/0x90) from
[<8027fdd0>] (bus_for_each_dev+0x60/0x8c)
[<8027fdd0>] (bus_for_each_dev+0x60/0x8c) from
[<8027f75c>] (bus_add_driver+0x184/0x25c)
[<8027f75c>] (bus_add_driver+0x184/0x25c) from
[<80280d1c>] (driver_register+0x78/0x13c)
[<80280d1c>] (driver_register+0x78/0x13c) from
[<80022d80>] (gpmi_nand_init+0xc/0x3c)
[<80022d80>] (gpmi_nand_init+0xc/0x3c) from
[<80039478>] (do_one_initcall+0x30/0x16c)
[<80039478>] (do_one_initcall+0x30/0x16c) from
[<80008410>] (kernel_init+0x98/0x144)
[<80008410>] (kernel_init+0x98/0x144) from
[<8003ffb4>] (kernel_thread_exit+0x0/0x8)
---[ end trace c28d32057fe33a29 ]---

This mxs_dma_clk's usecount is not correctly changed which causes the kernel
shows this warning.

This patch adds proper clk_disable_unprepare/clk_prepare_enable in
the mxs-dma driver to balance the mxs_dma_clk's usecount.
Also put the mxs_dma_clk when the gpmi exits.

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00227681 IPUv3:Use spinlock to protect buf ready reg
Liu Ying [Wed, 10 Oct 2012 07:13:30 +0000 (15:13 +0800)]
ENGR00227681 IPUv3:Use spinlock to protect buf ready reg

There are several channels' buffer ready bits controlled
by a single 32bit register-IPU_CHA_BUFx_RDY. These buffer
ready can be write-one-to-set or write-one-to-clear, which
is controlled by IPU_GPR register. v4l2 capture driver will
touch the buffer ready registers in interrupt context, so,
currently, ipu->mutex_lock is bypassed with the context.
Then, a race condition is that v4l2 capture driver interrupt
context tries to set a channel buffer ready, while, another
context tries to disable another channel(clear buffer ready
bit), which may cause v4l2 capture driver fails to set buffer
ready(SMFC0_FRM_LOST error may happen). This patch uses ipu->
rdy_reg_spin_lock to protect buffer ready registers to fix
the race condition issue and rename ipu->spin_lock to ipu->
int_reg_spin_lock.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit d3515529a4be205809356961e58afa660781547b)

11 years agoENGR00227472 MXC V4L2 capture:Improve resource lock
Liu Ying [Mon, 8 Oct 2012 07:55:04 +0000 (15:55 +0800)]
ENGR00227472 MXC V4L2 capture:Improve resource lock

1) We get busy_lock semaphore before we get a dqueue event, so, when user
is blocked at DQBUF ioctrl, the user will also be blocked at QBUF ioctrl,
then the video performance will drop. This patch changes to get busy_lock
semaphore to protect DQBUF ioctrl until we successfully get a dqueue event.
2) Use queue_int_lock and dqueue_int_lock spinlocks to protect working_q/
ready_q/done_q in the end of frame interrupt handler camera_callback(), in
case, the handler and VIDIOC_QBUF/VIDIOC_DQBUF ioctrls are called on diff-
erent cores at the same time.
3) Protect ready_q with queue_int_lock spinlock in mxc_streamon(), in case,
VIDIOC_STREAMON and VIDIOC_QBUF ioctrls are called on different cores at
the same time.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit e92c2307ebcf66badc5db8d4449218e3489a9e78)

11 years agoENGR00224912 mxc v4l2 capture:Correct mclk enable/disable
Liu Ying [Mon, 8 Oct 2012 05:53:46 +0000 (13:53 +0800)]
ENGR00224912 mxc v4l2 capture:Correct mclk enable/disable

1) Change to enable/disable mclk only in open, release,
suspend and resume functions, since we may simply think that
sensor or mclk will be used soon after cam->open_count is non-zero.
2) Fix a bug when calling ipu_csi_enable_mclk_if() with wrong
parameter(cam->csi should be cam->mclk_source) in mxc_v4l2_close()
and in mxc_v4l2_s_ctrl() with V4L2_CID_MXC_SWITCH_CAM control id.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit be689b81ac24c0a4373a989664ec51ad77db0ced)

11 years agoENGR00225608 Camera: ov5642: improve VGA/XGA@15fps poor quality
Sheng Nan [Mon, 8 Oct 2012 07:34:04 +0000 (15:34 +0800)]
ENGR00225608 Camera: ov5642: improve VGA/XGA@15fps poor quality

- original VGA/XGA@15fps image has many noise.
- new ov5642 firmware can get fine quality

Signed-off-by: Sheng Nan <b38800@freescale.com>
11 years agoENGR00227568 elcdif: fix fb wait for vsync timeout when suspend and resume
Robby Cai [Tue, 9 Oct 2012 11:59:25 +0000 (19:59 +0800)]
ENGR00227568 elcdif: fix fb wait for vsync timeout when suspend and resume

When suspend, the lcdif and panel will be stopped. When resume, fb_set_par()
will be called, in which the lcdif and the panel will be re-initialized.
However, fb_set_par() also checks the parameters via mxc_elcdif_fb_par_equal(),
which will probably make fb_set_par() just return with them un-initialized.
And thus, the interrupt will not come. This patch added a varible to check
whether they're running along with mxc_elcdif_fb_par_equal() checking to
fix the issue. If not running, re-initialization will be forcely done.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227502-2 mx6sl: add csi v4l2 platform device
Robby Cai [Tue, 9 Oct 2012 08:49:29 +0000 (16:49 +0800)]
ENGR00227502-2 mx6sl: add csi v4l2 platform device

Add csi v4l2 platform device only when 'csi' is assigned in cmdline.
Because there's pin conflicts between csi and epdc.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227502-1 csi/v4l2: Implement probe and remove function for csi v4l2 driver
Robby Cai [Tue, 9 Oct 2012 08:36:41 +0000 (16:36 +0800)]
ENGR00227502-1 csi/v4l2: Implement probe and remove function for csi v4l2 driver

Because csi_v4l2 driver will only be loaded when needed(by assign 'csi' in
kernel cmdline), we use standard driver framework to easily bind the device and
driver. Otherwise, we will meet the problem like the crash as below when do
suspend/resume due to the resource of csi not assigned at all if 'csi' not
passed in cmdline.

root@freescale ~$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 9a8ac000
[00000000] *pgd=9a783831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT
Modules linked in:
CPU: 0    Not tainted  (3.0.35-02115-g08f4436 #233)
PC is at csi_enable_mclk+0x40/0x68
LR is at camera_power+0x1c/0x5c
pc : [<80357f08>]    lr : [<80358154>]    psr: 60000013
sp : 9a8ebe30  ip : 00000009  fp : 00000006
r10: 1c6bddf7  r9 : 00000000  r8 : 00000000
r7 : 00000002  r6 : 804fd0ac  r5 : 9a013000  r4 : 00000000
r3 : 80aa8bbc  r2 : 00000000  r1 : 00000000  r0 : 00000008
...

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00227477 mx6qdl: system resume fail due to DDR not accessable
Anson Huang [Tue, 9 Oct 2012 19:30:20 +0000 (15:30 -0400)]
ENGR00227477 mx6qdl: system resume fail due to DDR not accessable

For DQ and DL, we must make sure DDR can be accessed after resume,
our code did NOT get a valid base address for MMDC to exit from
DVFS mode, need to fix it.

According to ARM, we only need to save r0-r3 and r12 before calling
C function.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00227241 mx6sl: clk: sdhc can not work at lp idle mode
Ryan QIAN [Mon, 8 Oct 2012 01:50:23 +0000 (09:50 +0800)]
ENGR00227241 mx6sl: clk: sdhc can not work at lp idle mode

issue:
Once entering low power idle mode, pll2_400 will be bypass which will change
the clk rate of sdhc root clk. so far, there's no mechanism to inform sdhc
for changing of root clk in current driver structure.

fix:
Revert "ENGR00226096 mx6sl: remove high set point for usdhc"

This reverts commit 97aee96a34ca63da0d1d602a19b3a444352e5803.

Acked-by: Robby CAI <r63905@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00220469 mmc: sdio: claim host on suspend and release on resuming
Ryan QIAN [Tue, 9 Oct 2012 00:58:41 +0000 (08:58 +0800)]
ENGR00220469 mmc: sdio: claim host on suspend and release on resuming

issue:
Since there's no sync mechanism between sdio bus suspending and sdio_irq_thread,
it will cause that sdio_irq_thread still makes sdhc request even after sdio bus
suspends.

fix:
On suspending sdio bus, claim host, so that:
1. mmc_sdio_suspend will wait for finishing of sdio_irq_thread.
2. sdio_irq_thread will be blocked even being scheduled.
And release host on resuming.

Acked-by: Aisheng DONG <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00226392 MX6SL Bluetooth: Setup uart2 to enable bluetooth
Lionel Xu [Sat, 29 Sep 2012 08:56:04 +0000 (16:56 +0800)]
ENGR00226392 MX6SL Bluetooth: Setup uart2 to enable bluetooth

Setup uart2 to enable bluetooth basic functionality on mx6sl evk board.
DMA mode was not enabled for uart2 operation.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00225700: ARM: mx6sl: Fix suspend/resume lockup
Robert Lee [Mon, 8 Oct 2012 21:19:13 +0000 (16:19 -0500)]
ENGR00225700: ARM: mx6sl: Fix suspend/resume lockup

Currently, the sequence and functionality we use to enter and exit
suspend causes us to hang upon resuming.  It appears that this is being
caused by two things.  The first is the powering off of the 2p5 rail
which powers the IO pullups and  pulldowns.  The DQS pins were
configured as pull downs.  The second is switching the DQS pins from
differential to CMOS mode (and back).  This second problem only
occurs on a few EVK boards.

It is believed that these changes are causing glitches on the mmdc DQS
pins which is putting garbage in the FIFO (or causing some other FIFO
problem).  This patch adds two mmdc0 FIFO resets after exiting the
suspend.  Two are thought to be needed per previous FIFO reset
experience by Mike Kjar.

Since the MMDC0 FIFO will be cleaned each time, we can now remove
the code that configured the DQS lines as pull downs as we no
longer care if they float.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
11 years agoENGR00227422: ARM: imx6sl: Adjust ARM and SOC stby voltages
Robert Lee [Mon, 8 Oct 2012 21:15:27 +0000 (16:15 -0500)]
ENGR00227422: ARM: imx6sl: Adjust ARM and SOC stby voltages

According to the latest specification data, these rails should
go no lower than 900mV in standby mode.  This patch modifies
the existing mx6sl board files and sets the pmic standby voltage
for these rails to be 925mV (extra 25mV to account for pmic accuracy).

Signed-off-by: Robert Lee <robert.lee@freescale.com>
11 years agoENGR00227426 MX6SL-Fix bugs in low power IDLE mode
Ranjani Vaidyanathan [Mon, 8 Oct 2012 15:08:16 +0000 (10:08 -0500)]
ENGR00227426 MX6SL-Fix bugs in low power IDLE mode

Need to ensure that DDR IO pads are not floated when
a peripheral that needs DDR is active, for ex SDMA.
Also need to keep IPMUX clock enabled even when ARM
is in WFI, so set the CCGR bits accordingly.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00227425 mx6sl: Need to save all registers before calling C function
Anson Huang [Tue, 9 Oct 2012 15:04:42 +0000 (11:04 -0400)]
ENGR00227425 mx6sl: Need to save all registers before calling C function

Different linker may use r12, we should save/restore all
registers(r0-r12) before calling C function to prevent
these registers from corruption in C code.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00227245 mx6q: Remove 400M setpoint for bus freq
Anson Huang [Fri, 28 Sep 2012 18:42:52 +0000 (14:42 -0400)]
ENGR00227245 mx6q: Remove 400M setpoint for bus freq

Although 400M bus setpoint can save some SOC domain power,
but it will also bring some additional power consumption
to DDR3, and the DDR performace's drop could also lead to
more heat generated by COREs which will spent more time
waiting for DDR data ready, also, there is not many usecases
that need this setpoint, all in all, we should remove 400M
setpoint.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00227249 MX6SL-Add support for low latency STANDBY mode.
Ranjani Vaidyanathan [Sun, 7 Oct 2012 20:16:22 +0000 (15:16 -0500)]
ENGR00227249 MX6SL-Add support for low latency STANDBY mode.

Change STANDBY mode to support the following for MX6SL:
1. assert VSTBY
2. ARM is power gated.
3. XTAL is ON
4. LDO 2P5 is disabled, weak 2P5 is enabled.
5. LDO 1p1 is enabled.

Implement this for a higher power but lower latency on resume
from STANDBY mode.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00227020: devices-common imx_dma_data duplicate struct definition
Adrian Alonso [Thu, 4 Oct 2012 15:38:48 +0000 (10:38 -0500)]
ENGR00227020: devices-common imx_dma_data duplicate struct definition

* Fix imx_dma_data duplicate struct definition
* Rename struct as name conflicts with imx_dma_data
  struct defined at arch/arm/plat-mxc/include/mach/dma.h
* Update copyrigth year.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00227250 MX6SL/MX6DL-Fix IRAM size
Ranjani Vaidyanathan [Sun, 7 Oct 2012 21:25:28 +0000 (16:25 -0500)]
ENGR00227250 MX6SL/MX6DL-Fix IRAM size

MX6SL and MX6DL have only 128KB of IRAM. Fix the
code so the right size is passed to iram_init()

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00180348 EPDC: invalid data when width is 2048 or greater
Michael Minnick [Wed, 26 Sep 2012 21:33:21 +0000 (16:33 -0500)]
ENGR00180348 EPDC: invalid data when width is 2048 or greater

This patch works around the 6DLS and 6SL chip errata:
ERR005313 EPDC: Incorrect data fetched when the buffer update width is
2048 pixels or greater

This patch breaks large updates into multiple updates, which works
around the problem on both 6DSL and 6SL. This patch does not use the
Group Update feature, which may improve things further on 6SL.

This patch does not include for support for any particular large panel.
It was tested on ED09705 (2400x1650). Support for ED09705 is
available in a separate patch.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
11 years agoENGR00225981-8 csi/imx6sl: add the platform-related setting
Robby Cai [Thu, 27 Sep 2012 15:50:08 +0000 (23:50 +0800)]
ENGR00225981-8 csi/imx6sl: add the platform-related setting

- add platform data for csi driver
- change the regulator name to reflect the voltage really used
- select OSC as csi parent clock to get 24MHz
- add an boot option to use csi feature while filter out the EPDC/SPDC, since
  there are pin conflicts with xPDC.
- both ov5640 and ov5642 are verified okay, ov5640 is used by default.
- remove IPU from update_defconfig

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-7 csi: Unify the api set_mclk_rate
Robby Cai [Thu, 27 Sep 2012 14:47:20 +0000 (22:47 +0800)]
ENGR00225981-7 csi: Unify the api set_mclk_rate

For CSI on MX6SL, there's only 1 CSI and hence no need to change csi souce.
We add this parameter just for compatibility.

Adjust the called api in related camera drivers.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-6 csi: Add PxP post-processing for CSC
Robby Cai [Thu, 27 Sep 2012 13:50:59 +0000 (21:50 +0800)]
ENGR00225981-6 csi: Add PxP post-processing for CSC

The default output format from camera is UYVY. For preview purpose, need
convert the format to RGB565. Use PxP CSC as post processing.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-5 imx6sl: update the defconfig
Robby Cai [Fri, 28 Sep 2012 10:41:47 +0000 (18:41 +0800)]
ENGR00225981-5 imx6sl: update the defconfig

- remove IPU define
- add csi camera define

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-4 IPU: Remove IPU fb build for MX6SL
Robby Cai [Thu, 27 Sep 2012 13:02:01 +0000 (21:02 +0800)]
ENGR00225981-4 IPU: Remove IPU fb build for MX6SL

Filter out IPU framebuffer for MX6SL by adding conditional control.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-3 csi: Add csi driver support on MX6SL
Robby Cai [Thu, 27 Sep 2012 13:02:01 +0000 (21:02 +0800)]
ENGR00225981-3 csi: Add csi driver support on MX6SL

- re-use csi driver from mx25
- set csi irq/baseaddr as platform resource

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-2 pxp: fix the coefficient for the YCbCr-RGB CSC
Robby Cai [Fri, 28 Sep 2012 09:25:25 +0000 (17:25 +0800)]
ENGR00225981-2 pxp: fix the coefficient for the YCbCr-RGB CSC

Fix the coefficient for the YCbCr-RGB Color space conversion.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225981-1 pxp: add UYVY input pixel format
Robby Cai [Thu, 27 Sep 2012 08:29:07 +0000 (16:29 +0800)]
ENGR00225981-1 pxp: add UYVY input pixel format

The default camera output format is UYVY, PxP is used to convert UYVY to RGB565
for displaying on LCD.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00225960-04 mx6sl evk: Add sii902x GPIO/IOMux setting
Sandor Yu [Fri, 28 Sep 2012 05:16:19 +0000 (13:16 +0800)]
ENGR00225960-04 mx6sl evk: Add sii902x GPIO/IOMux setting

Add sii902x GPIO and IOMUX setting to mx6sl evk board.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00225960-03 sii902x: Added sii902x HDMI driver with ELCDIF FB
Sandor Yu [Fri, 28 Sep 2012 05:15:27 +0000 (13:15 +0800)]
ENGR00225960-03 sii902x: Added sii902x HDMI driver with ELCDIF FB

Enable sii902x HDMI driver with ELCDIF framebuffer interface.
HDMI cable Hotplug support.
Video mode switch support.
Blank/Unblank HDMI display support.
Added config variable CONFIG_FB_MXC_SII902X_ELCDIF for sii902x_elcdif module

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00225960-02 FB: Support sii902x HDMI driver in ELCDIF FB
Sandor Yu [Fri, 28 Sep 2012 05:12:52 +0000 (13:12 +0800)]
ENGR00225960-02 FB: Support sii902x HDMI driver in ELCDIF FB

- Added mxcfb_elcdif_register_mode function.
- Create video mode list, and check default video mode
with video mode list before setting.
- Adjust elcdif pixel clock setting, reconfig elcdif pixel
parent clock video pll, get more accurate pixel clock
according video mode.
- Added video mode dump function for debug

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00225960-01 Sii902x HDMI: added SII902x Config variable
Sandor Yu [Fri, 28 Sep 2012 03:17:18 +0000 (11:17 +0800)]
ENGR00225960-01 Sii902x HDMI: added SII902x Config variable

-Add CONFIG_FB_MXC_SII902x_ELCDIF variable to mx6s config files.
-Default enable CONFIG_FB_MXC_ELCDIF_FB,
CONFIG_FB_MXC_SEIKO_WVGA_SYNC_PANEL
and CONFIG_FB_MXC_SII902x_ELCDIF.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00225735-3 GPU: add gpu regulator disable/enable in gpu driver
Robin Gong [Tue, 25 Sep 2012 08:47:48 +0000 (16:47 +0800)]
ENGR00225735-3 GPU: add gpu regulator disable/enable in gpu driver

add gpu regulator management in gpu driver
Signed-off-by: Robin Gong <b38343@freescale.com>
Acked-by: Lily Zhang
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00225735-2 VPU: add vpu regulator enable/disable in driver
Robin Gong [Tue, 25 Sep 2012 08:43:57 +0000 (16:43 +0800)]
ENGR00225735-2 VPU: add vpu regulator enable/disable in driver

add vpu regulator management including enable/disable in vpu driver. Mainly
in open/release and suspend/resume.
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00225735-1 PU anatop: PU regulator can be disabled/enabled by drivers
Robin Gong [Tue, 25 Sep 2012 08:33:37 +0000 (16:33 +0800)]
ENGR00225735-1 PU anatop: PU regulator can be disabled/enabled by drivers

Before, PU regulator only be turned off in DSM, which means it kept on in
system normal mode even GPU/VPU driver didn't run. To decrease power number,
PU regulator can be disabled/enabled by GPU/VPU driver, and the voltage value
is tracked by VDDARM which change in cpufreq driver.The patch including:
1.implement PU regulator enable/disable interface in anatop regulator driver
2.remove gpu_power_down and gpu_power_up in system suspend/resume flow.
3.skip change pu regulator set if it has been disabled.

Note: There is three power supply on  VDDPU:
a).Use internal anatop PU regulator, VDDDPU_IN is fixed. In this case,VDDPU_CAP
can be turned off or dynamic change by internal anatop(track with VDDSOCi_CAP).
In other words, it use "cpu_vddvpu" regulator as PU regulator,not only in GPU/
VPU driver, but also in cpufreq driver.Sabresd,Sololite EVK is in this case if
disable CONFIG_MX6_INTER_LDO_BYPASS.

b).Use external pmic regulator as PU regulator, it means in LDO bypass way
(CONFIG_MX6_INTER_LDO_BYPASS).But VDDPU_IN is connected with VDDSOC_IN. Because
VDDSOC can't be turned off for ever, and VDDPU track with VDDSOC always, we
remove  "pu_id", so that cpufreq driver will never touch it.But GPU/VPU driver
will turn off/on VDDPU_CAP by disabling/enabling "cpu_vddvpu".In this case,
although VDDPU_IN is supplied by external pmic in hardware level, but we can't
turn off external pmic directly, because it connect with VDDSOC_IN.So only we
can do is turn off VDDPU_CAP by internal anatop regulator("cpu_vddvpu").Sabresd
,Sololite EVK is in this case if enable CONFIG_MX6_INTER_LDO_BYPASS.

c).Use external pmic regulator as PU regulator, it means in LDO bypass way
(CONFIG_MX6_INTER_LDO_BYPASS). And VDDPU_IN is in dependent with VDDSOC_IN(
whether short in VDDPU_IN with VDDPU_CAP directly or not).In this case,the only
thing we need to do is that add the right external vddpu regulator name to
"pu_id" in their boad file, and nothing else.
Just like below (arch/arm/mach-mx6/board-mx6sl_evk.c):

static struct mxc_dvfs_platform_data mx6sl_evk_dvfscore_data = {
.reg_id = "VDDCORE",
.soc_id = "VDDSOC",
*******************************************************************
.pu_id = "what you used VDDPU_IN regulator name from external pmic"
*******************************************************************
.reg_id = "cpu_vddgp",
.soc_id = "cpu_vddsoc",
.pu_id = "cpu_vddvpu",
......

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00225894 MX6SL-Improve system IDLE power numbers
Ranjani Vaidyanathan [Mon, 17 Sep 2012 09:16:51 +0000 (04:16 -0500)]
ENGR00225894 MX6SL-Improve system IDLE power numbers

Add the following power optimizations when all PLLs
are either disabled or in bypass:
1. Disable 2P5 in system IDLE mode and enable weak 2P5.
2. Set OSC bias current to -37.5% just before the WFI instruction
and set it back to 0% after WFI.
3. Enable the low power bandgap and power down the regular
bandgap.

Also lower AHB and AXI to 3MHz in this mode.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00226095-2 SPDIF: add HDMI AUDIO in device name in mx6_sl evk
Gary Zhang [Thu, 27 Sep 2012 07:49:08 +0000 (15:49 +0800)]
ENGR00226095-2 SPDIF: add HDMI AUDIO in device name in mx6_sl evk

because HDMI AUDIO in mx6sl evk comes from SPDIF TX, change to
HDMI AUDIO in device name.

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00226095-1 MX6 SL: add SPDIF support in EVK
Gary Zhang [Thu, 27 Sep 2012 07:45:41 +0000 (15:45 +0800)]
ENGR00226095-1 MX6 SL: add SPDIF support in EVK

HDMI AUDIO in evk comes from SPDIF TX, and add SPDIF TX support
to implement HDMI AUDIO feature

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00226080 Update GC2000/GC320 AXI bus cache attribute
Loren Huang [Thu, 27 Sep 2012 08:43:10 +0000 (16:43 +0800)]
ENGR00226080 Update GC2000/GC320 AXI bus cache attribute

This patch changed the GPU AXI bus cache attribute
to improve the performance of fillrate bound case.

Here is some test result: BEFORE:AFTER (larger better)
mm06 samruai fps:    117.74:137.64
mm06 proxycon fps:   117.90:135.00
Fillrate with 1 tex: 251.3M:331.1M
Fillrate with 2 tex: 402.6M:475.4M

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00226096 mx6sl: remove high set point for usdhc
Ryan QIAN [Thu, 27 Sep 2012 08:12:56 +0000 (16:12 +0800)]
ENGR00226096 mx6sl: remove high set point for usdhc

- Due to usdhc ADMA mode has issue working with low bus freq, in
driver usdhc has been configured to SDMA mode already. So it is
not necessary to keep high set point flag any more.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
Acked-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Robby CAI <r63905@freescale.com>
11 years agoENGR00223797-10 ARM:MX6 Kconfig:Support MX6_CLK_FOR_BOOTUI_TRANS
Liu Ying [Thu, 13 Sep 2012 09:30:10 +0000 (17:30 +0800)]
ENGR00223797-10 ARM:MX6 Kconfig:Support MX6_CLK_FOR_BOOTUI_TRANS

This patch adds CONFIG_MX6_CLK_FOR_BOOTUI_TRANS support. Setting
this Kconfig may keep enable IPU related clocks and PWM clocks
and avoid setting IPU related clocks' parents when initializing
clock tree so that bootloader splashimage can transition to
kernel smoothly.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 21b5e4d436666967585313948a03421da1f8f68b)

11 years agoENGR00223797-7 MX6 SabreSD:Fix ipuv3 fb platform driver register
Liu Ying [Tue, 11 Sep 2012 04:49:49 +0000 (12:49 +0800)]
ENGR00223797-7 MX6 SabreSD:Fix ipuv3 fb platform driver register

As there is only one IPU embedded in MX6DL and two IPUs embedded
in MX6DQ. The max ipuv3 fb platform driver number is two for
MX6DL and four for MX6DQ.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00223797-6 MX6 SabreSD:Initialize late init for IPUv3 fb pdata
Liu Ying [Wed, 12 Sep 2012 01:43:12 +0000 (09:43 +0800)]
ENGR00223797-6 MX6 SabreSD:Initialize late init for IPUv3 fb pdata

This patch initializes late init field to false for IPUv3 fb pdata,
so we don't support late init by default unless we change them to
true in other places specificly.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit cc9baf8aa84f4dd0120aa85960d254646a3aa523)

11 years agoENGR00223797-5 MX6 SabreSD:Initialize bypass reset for IPUv3 pdata
Liu Ying [Wed, 12 Sep 2012 01:36:12 +0000 (09:36 +0800)]
ENGR00223797-5 MX6 SabreSD:Initialize bypass reset for IPUv3 pdata

This patch initializes bypass reset field to false for IPUv3 pdata,
so we don't support bypass reset by default unless we change them
to true in other places specificly.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 6c294588a1987810ed4d45bcb5e1d3416d66d0be)

11 years agoENGR00223797-4 IPUv3 fb:Support framebuffer late init
Liu Ying [Tue, 11 Sep 2012 10:10:11 +0000 (18:10 +0800)]
ENGR00223797-4 IPUv3 fb:Support framebuffer late init

This patch adds late init support in IPUv3 fb driver
to avoid IPUv3 fb being re-initialized during probe if
a platform supports smooth transition from bootloader
splashimage to system UI. The re-initialization will
be delayed to the first time the user triggers
mxcfb_set_par() and unblank the framebuffer.
The following items are done to support this:
1) Move global alpha and color key setting in probe
   after framebuffer is registered(before registering
   we enable IPU hsp clock), because the 2 APIs enable
   and disable IPU hsp clock which may cause IPU stops
   running in ipuv3 fb probe function.
2) Do not clear framebuffer content in probe function
   if late init is set. This is to avoid bootloader
   splashimage content is cleared.
3) If late init is set, do not re-initialize and
   unblank framebuffer in probe function, but initialize
   and enable ipu display channel instead to enable
   the ipu hsp clock. Refer to the code comment for
   detail.
4) Delay register IPU interrupts used by framebuffer
   until IPU hsp clock is enabled by 3). As the APIs
   to register IPU interrupts may enable and disable
   IPU hsp clock as well.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 926a6187d89afb5a37dc3b1f3c7bc5225742d09b)

11 years agoENGR00223797-3 ARM:IPUv3 fb:Add late init in pdata
Liu Ying [Tue, 11 Sep 2012 10:20:39 +0000 (18:20 +0800)]
ENGR00223797-3 ARM:IPUv3 fb:Add late init in pdata

This patch adds late init field support in ipuv3 fb
platform data, so that a platform may choose to not
to initialize framebuffer until the user triggers
set_par(), which may support smooth transition from
bootloader splashimage to system UI.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 3a2547ac167fb2c06d9f63c7a925b9ebdc896d96)

11 years agoENGR00223797-2 IPUv3:Support bypass reset for probe
Liu Ying [Tue, 11 Sep 2012 10:18:39 +0000 (18:18 +0800)]
ENGR00223797-2 IPUv3:Support bypass reset for probe

This patch adds bypass reset support in IPUv3 driver
probe function to avoid IPUv3 being reset if a plat-
form supports smooth transition from bootloader
splashimage to system UI.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit d8c12ced755491d8337fb7456fa78004701d5408)

11 years agoENGR00223797-1 ARM:IPUv3:Add bypass reset in pdata
Liu Ying [Tue, 11 Sep 2012 10:16:12 +0000 (18:16 +0800)]
ENGR00223797-1 ARM:IPUv3:Add bypass reset in pdata

This patch adds bypass reset field support in ipuv3
platform data, so that a platform may choose not to
reset ipuv3 when doing probe, which may support
smooth transition from bootloader splashimage to
system UI.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit e558b2b6877a2b230c564a1c621bbba3d546f5f7)

11 years agoENGR00220747 V4L2 out: Fix mosaic and flash issue if use VDOA input crop mode
Wayne Zou [Thu, 30 Aug 2012 09:20:06 +0000 (17:20 +0800)]
ENGR00220747 V4L2 out: Fix mosaic and flash issue if use VDOA input crop mode

Fix bug:
A lot of mosaic and flash issue if use VDOA mode when doing video playback
on stream H264_BP13_fc_320x136_29.97_444_AAC_48_130_2_vbr.mp4.

For this special stream, the frame size is 320x144 and the stream includes
input cropping information:320x136. It needs to use 320x144 frame size to
do tiled format conversion instead of 320x128 after alignment.

Signed-off-by: Wayne Zou <b36644@freescale.com>