]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoENGR00290361-1 IPUv3 IC:Add check for a IDMAC errata
Liu Ying [Thu, 21 Nov 2013 08:39:08 +0000 (16:39 +0800)]
ENGR00290361-1 IPUv3 IC:Add check for a IDMAC errata

The IPUv3 IDMAC has a bug to read 32bpp pixels from a
graphics plane whose alpha component is at the most
significant 8 bits. The bug only impacts on cases in which
the relevant separate alpha channel is enabled.
This patch adds check for the errata so that the bad
cases won't be triggered.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00290337 ipuv3: Setup pixel clock tree after ipu reset
Sandor Yu [Mon, 2 Dec 2013 07:40:46 +0000 (15:40 +0800)]
ENGR00290337 ipuv3: Setup pixel clock tree after ipu reset

When the ipu pixel clocks are initialized, the default pixel clock rate
will be calucated according to the present ipu register setting which
is likely set by a bootloader.
But these registers will be reset by the ipu reset function.
If the default pixel clock rate is the same to what is requested later,
the clk_set_rate function will treat this case as pixel clock unchanged.

Move the pixel clock setup function after the ipu reset function to
resolve this issue

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P
Fancy Fang [Fri, 29 Nov 2013 10:37:45 +0000 (18:37 +0800)]
ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P

When the s0 format is PXP_PIX_FMT_YUV422P, the s0 pitch and U/V
buffer address cannot be set correctly.

Signed-off-by: Fancy Fang <B47543@freescale.com>
9 years agoENGR00289645 usb: chipidea: udc: don't do hardware access if gadget has stopped
Peter Chen [Tue, 26 Nov 2013 05:33:21 +0000 (13:33 +0800)]
ENGR00289645 usb: chipidea: udc: don't do hardware access if gadget has stopped

After _gadget_stop_activity is executed, we can consider the hardware
operation for gadget has finished, and the udc can be stopped and enter
low power mode. So, any later hardware operations (from usb_ep_ops APIs
or usb_gadget_ops APIs) should be considered invalid, any deinitializatons
has been covered at _gadget_stop_activity.

I meet this problem when I plug out usb cable from PC (using g_mass_storage),
my callstack like: vbus interrupt->.vbus_session->composite_disconnect
->pm_runtime_put_sync(&_gadget->dev), the composite_disconnect will
call fsg_disable, but fsg_disable calls usb_ep_disable using async way,
there are register accesses for usb_ep_disable. So sometimes, I get system
hang due to visit register without clock, sometimes not.

The Linux Kernel USB maintainer Alan Stern suggests this kinds of solution.
See: http://marc.info/?l=linux-usb&m=138541769810983&w=2.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit ac760d29366f19eb1a4d4c37899b33019570a447)

9 years agoENGR00289859 PXP: fix that multi users may access PXP hardware simultaneously
Fancy Fang [Wed, 27 Nov 2013 08:41:38 +0000 (16:41 +0800)]
ENGR00289859 PXP: fix that multi users may access PXP hardware simultaneously

After the patch 6320ada11093ef0a4ded9065d6ae284a9129f7d6, there still exists
some cases that more than one user would set PXP hardware registers before the
previous task done. Now use another mutex lock to make sure that registers
settings can only happen when PXP hardware is idle.

Signed-off-by: Fancy Fang <B47543@freescale.com>
9 years agoENGR00289648 mx6sl: v4l2 output: Add UYVY format as input format for v4l2
Robby Cai [Tue, 26 Nov 2013 07:20:28 +0000 (15:20 +0800)]
ENGR00289648 mx6sl: v4l2 output: Add UYVY format as input format for v4l2

This feature is easy for gstreamer to pipeline v4lsrc and v4lsink, since
camera output format can be set as UYVY in v4l2 capture driver, and PxP
will do the CSC from UYVY to RGB565 in v4l2 output driver for LCD display.

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit d8f47ca83385f3e96ce457f35b69c4a7ac733a6e)

9 years agoENGR00289553 IPU dev:correct downsize overflow check in rot case
Liu Ying [Mon, 25 Nov 2013 10:34:40 +0000 (18:34 +0800)]
ENGR00289553 IPU dev:correct downsize overflow check in rot case

In rotation cases, the width and height of IPUv3 IC scaling block's
output should align with the width and height of IPUv3 IC rotation
block. And, users only tell the IPUv3 device driver about the parameters
of scaling block's input and rotation block's output. So, we need to
swap the width and height of rotation block in cache before we do
downsize(a functionality of the scaling block) overflow check.

This patch fixes the issue which can be reproduced by this unit test case:
/unit_tests/mxc_v4l2_output.out -iw 128 -ih 128 -ow 176 -oh 10 -r 90

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00289436 - [V4L2 Capture] Build warning on mxc_v4l2_capture.c
Oliver Brown [Fri, 22 Nov 2013 16:30:15 +0000 (10:30 -0600)]
ENGR00289436 - [V4L2 Capture] Build warning on mxc_v4l2_capture.c

Need to remove the following warning:

warning: array subscript is above array bounds

Summary of changes:
Moved MXC_SENSOR_NUM definition to mxc_v4l2_capture.h.
all_sensors[] now uses MXC_SENSOR_NUM in definition.
MXC_SENSOR_NUM is now used for bounds checking the array.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoENGR00274166 - Split mode has artifacts
Oliver Brown [Mon, 18 Nov 2013 20:52:27 +0000 (14:52 -0600)]
ENGR00274166 - Split mode has artifacts

- Need to use different multiple and index parameters for vertical
and horizontal stripes
- Use correct multiple and index based upon pixel format
- Allow input crop and size to be larger than width by upto 16 pixels

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoENGR00272541 IPUv3 IC: Split Downsizing overflow for size greater than 1024
Oliver Brown [Tue, 19 Nov 2013 15:49:53 +0000 (09:49 -0600)]
ENGR00272541 IPUv3 IC: Split Downsizing overflow for size greater than 1024

For downscaling, it is possible that downscaler output is greater
than 1024. Added a function, calc_split_resize_coeffs, based upon
_calc_resize_coeffs to calculate resizing and downscaling coefficients.

In ipu_ic.c, checks for the range of *_resize_ratio are no longer needed.
 Non split cases will always have  *_resize_ratio of zero.

In ipu_device, additional checks are needed to check for an error from
ipu_calc_stripes_sizes if calc_split_resize_coeffs fails.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoENGR00289406-2 mmc: sdhci-esdhc-imx: add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER
Dong Aisheng [Fri, 22 Nov 2013 12:39:15 +0000 (20:39 +0800)]
ENGR00289406-2 mmc: sdhci-esdhc-imx: add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER

The max timeout counter for uSDHC is SDCLK x (1 << 28), not as standard
controller defined as TMCLK x (1 <<27).
Add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER quirk to handle it.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
9 years agoENGR00258885 flexcan: fix errata ERR005829 that MB may fail to be sent
Dong Aisheng [Fri, 12 Apr 2013 10:49:36 +0000 (18:49 +0800)]
ENGR00258885 flexcan: fix errata ERR005829 that MB may fail to be sent

This is an issue from IC errata ERR005829 which is described as follows:
----------------------------------------------------------
FlexCAN does not transmit a message that is enabled to be transmitted
in a specific moment during the arbitration process. The following
conditions are necessary to have the issue.
- Only one MB is configured to be transmitted
- The write which enables the MB to be transmitted (write on Control status
  word) happens during a specific clock during the arbitration process.

After this arbitration process occurs, the bus goes to Idle state and no
new message is received on bus.

For example:
1) MB13 is deactivated on RxIntermission (write 0x0 on CODE field from Control
Status word) - First write on CODE
2) Reconfigure the ID and data fields
3) Enable the MB13 to be transmitted on BusIdle (write 0xC on Code
field) - Second write on code
4) CAN bus keeps in Idle state
5) No write on Control status from any MB happens.
During the second write on code (step 3), the write must happen one clock
before the current MB13 is to be scanned by arbitration process.
In this case, it does not detect the new code (0xC) and no new arbitration is
scheduled.

The suggested workaround which is implemented in this patch is:
The workaround consists of executing two extra steps:
6. Reserve the first valid mailbox as an inactive mailbox (CODE=0b1000).
If RX FIFO is disabled, this mailbox must be MB0. Otherwise, the first
valid mailbox can be found by using table "RX FIFO filters" on FlexCAN3 chapter.
7. Write twice INACTIVE code (0b1000) into the first valid mailbox.
Note: The first mailbox cannot be used for reception or transmission process.
-------------------------------------------------------------

Note: Although the currently flexcan driver does not have the step 1 to run,
it's also possible to meet this issue in theory because we can not predict
when the arbitration is scheduled.

With a modified can-utils/canfdttest tool simulating Pingpong test, we were
able to reproduce this issue after running a about one day.
After applying this patch, we ran six days and did not see the issue happen
again on two mx6q sabrelite boards.

Note: with a few minors change for new kernel and change errata id from
ERR005641 to ERR005829 which is the open one in freescale website.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 872eb1691afb83a2760052c615ed410a7cfe71e0)

9 years agoENGR00289237 PXP: fix a multiple instances hang issue
Fancy Fang [Thu, 21 Nov 2013 11:44:45 +0000 (19:44 +0800)]
ENGR00289237 PXP: fix a multiple instances hang issue

In pxp_issue_pending(), the wait for pxp done processes will be woken up
together in PXP ISR. So there will be some situations that one process will
set PXP hardware registers after another process's setting but before the
first PXP task done. So the PXP hardware may be corrupted and hang maybe
happen.

Signed-off-by: Fancy Fang <B47543@freescale.com>
9 years agoENGR00288578-8 usb: phy-mxs: do not set PWD.RXPWD1PT1 for low speed connection
Peter Chen [Thu, 21 Nov 2013 08:45:18 +0000 (16:45 +0800)]
ENGR00288578-8 usb: phy-mxs: do not set PWD.RXPWD1PT1 for low speed connection

At very rare cases, the SoF will not send out after resume with
low speed connection. The workaround is do not power down
PWD.RXPWD1PT1 bit during the suspend.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00288578-5 usb: chipidea: change some output message
Peter Chen [Tue, 19 Nov 2013 08:32:52 +0000 (16:32 +0800)]
ENGR00288578-5 usb: chipidea: change some output message

To reduce the message output when unload the module

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00288522 power: imx6-usb-charger: fix build error when build as module
Peter Chen [Tue, 19 Nov 2013 02:38:55 +0000 (10:38 +0800)]
ENGR00288522 power: imx6-usb-charger: fix build error when build as module

It is a library, so it can't be built as a module, besides,
it uses anatop register, it should depends on imx6 soc series.
Below is the build error message it fixes:

CC [M]  drivers/power/imx6_usb_charger.o
/home/b29397/work/projects/linux-2.6-imx/drivers/power/imx6_usb_charger.c:173:5: error: redefinition of 'imx6_usb_vbus_connect'
/home/b29397/work/projects/linux-2.6-imx/include/linux/power/imx6_usb_charger.h:70:5: note: previous definition of 'imx6_usb_vbus_connect' was here
/home/b29397/work/projects/linux-2.6-imx/drivers/power/imx6_usb_charger.c:200:5: error: redefinition of 'imx6_usb_charger_detect_post'
/home/b29397/work/projects/linux-2.6-imx/include/linux/power/imx6_usb_charger.h:74:5: note: previous definition of 'imx6_usb_charger_detect_post' was here
/home/b29397/work/projects/linux-2.6-imx/drivers/power/imx6_usb_charger.c:235:5: error: redefinition of 'imx6_usb_vbus_disconnect'
/home/b29397/work/projects/linux-2.6-imx/include/linux/power/imx6_usb_charger.h:65:5: note: previous definition of 'imx6_usb_vbus_disconnect' was here
/home/b29397/work/projects/linux-2.6-imx/drivers/power/imx6_usb_charger.c:256:5: error: redefinition of 'imx6_usb_create_charger'
/home/b29397/work/projects/linux-2.6-imx/include/linux/power/imx6_usb_charger.h:59:5: note: previous definition of 'imx6_usb_create_charger' was here
/home/b29397/work/projects/linux-2.6-imx/drivers/power/imx6_usb_charger.c:290:6: error: redefinition of 'imx6_usb_remove_charger'
/home/b29397/work/projects/linux-2.6-imx/include/linux/power/imx6_usb_charger.h:54:6: note: previous definition of 'imx6_usb_remove_charger' was here
make[3]: *** [drivers/power/imx6_usb_charger.o] Error 1
make[2]: *** [drivers/power] Error 2

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00277698 net:fec: avoid kernel dump for skb page allocation fail
Fugang Duan [Thu, 21 Nov 2013 04:58:01 +0000 (12:58 +0800)]
ENGR00277698 net:fec: avoid kernel dump for skb page allocation fail

Fast reproduce steps:
1. set kernel parameter mem=500M, after kernel up, run below steps.
1. mount 10.192.225.224:/nfsroot /media/Videos/224nfsroot -t nfs
   -o rw,nolock,addr=10.192.225.224
2. cd /media/Videos/224nfsroot/gst-sanity-test
3. ./linux_recording_sanity_test.sh recording_playback_cmd.txt

kernel dump:
--------------------------------------------------------------
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
kswapd0: page allocation failure: order:0, mode:0x20
CPU: 0 PID: 54 Comm: kswapd0 Tainted: G        W    3.10.17-16884-gc530ac0 #239
[<80013c4c>] (unwind_backtrace+0x0/0xf8) from [<80011704>] (show_stack+0x10/0x14)
[<80011704>] (show_stack+0x10/0x14) from [<8008bb7c>] (warn_alloc_failed+0xd0/0x114)
[<8008bb7c>] (warn_alloc_failed+0xd0/0x114) from [<8008e860>] (__alloc_pages_nodemask+0x5e0/0x8b8)
[<8008e860>] (__alloc_pages_nodemask+0x5e0/0x8b8) from [<804cceb8>] (__netdev_alloc_frag+0x9c/0x138)
[<804cceb8>] (__netdev_alloc_frag+0x9c/0x138) from [<804cddc4>] (__netdev_alloc_skb+0x40/0xe0)
[<804cddc4>] (__netdev_alloc_skb+0x40/0xe0) from [<8037dc8c>] (fec_enet_rx_napi+0x268/0x7e0)
[<8037dc8c>] (fec_enet_rx_napi+0x268/0x7e0) from [<804d7cf8>] (net_rx_action+0x94/0x160)
[<804d7cf8>] (net_rx_action+0x94/0x160) from [<8002c8fc>] (__do_softirq+0xe8/0x1d0)
[<8002c8fc>] (__do_softirq+0xe8/0x1d0) from [<8002ca8c>] (do_softirq+0x4c/0x58)
[<8002ca8c>] (do_softirq+0x4c/0x58) from [<8002ccf4>] (irq_exit+0x90/0xc8)
[<8002ccf4>] (irq_exit+0x90/0xc8) from [<8000ea88>] (handle_IRQ+0x3c/0x94)
[<8000ea88>] (handle_IRQ+0x3c/0x94) from [<8000855c>] (gic_handle_irq+0x28/0x5c)
[<8000855c>] (gic_handle_irq+0x28/0x5c) from [<8000de00>] (__irq_svc+0x40/0x50)
Exception stack(0xac21be08 to 0xac21be50)
be00:                   80ca16f0 00000000 0000bf28 0000bf28 80ca16c8 ac449c00
be20: 000006a4 00000000 00000000 00000000 000003a4 00000000 00000000 ac21be50
be40: 800bf9e4 805fc0d4 600f0013 ffffffff
[<8000de00>] (__irq_svc+0x40/0x50) from [<805fc0d4>] (_raw_spin_lock+0x38/0x3c)
[<805fc0d4>] (_raw_spin_lock+0x38/0x3c) from [<800bf9e4>] (put_super+0x18/0x3c)
[<800bf9e4>] (put_super+0x18/0x3c) from [<800c0968>] (prune_super+0x13c/0x17c)
[<800c0968>] (prune_super+0x13c/0x17c) from [<80093ff8>] (shrink_slab+0x88/0x218)
[<80093ff8>] (shrink_slab+0x88/0x218) from [<8009637c>] (kswapd+0x510/0x80c)
[<8009637c>] (kswapd+0x510/0x80c) from [<80042d64>] (kthread+0xa4/0xb0)
[<80042d64>] (kthread+0xa4/0xb0) from [<8000e258>] (ret_from_fork+0x14/0x3c)
--------------------------------------------------------------

Firstly, alloc_page() try to allocate page from pcp high speed cached page or
free_list by calling get_page_from_freelist(). If failed, and then use low
speed allocation mechanism by calling  __alloc_pages_slowpath(), which may
allocate from reclaimed pages and kernel dump the memory allocate info.

Still don't find the root cause, this patch avoid the kernel dump
in temporarily.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00285283 PXP: make pxp driver compatible for G2D
Fancy Fang [Wed, 20 Nov 2013 02:25:45 +0000 (10:25 +0800)]
ENGR00285283 PXP: make pxp driver compatible for G2D

Use stride to set AS and PS pitch by default, if stride is 0, then use
width to set AS and PS pitch instead. This will make PXP driver both
work for PXP kernel users and G2D applications.

Signed-off-by: Fancy Fang <B47543@freescale.com>
9 years agoENGR00284411-1 PXP: Enhance YUV, alpha blend and rotation
Fancy Fang [Mon, 21 Oct 2013 05:51:21 +0000 (13:51 +0800)]
ENGR00284411-1 PXP: Enhance YUV, alpha blend and rotation

Support YUV formats like: I420, NV12, NV21, UYVY,
YUYV, VYUY, YVYU, NV16, NV61 and YV12.
Support rotation in both stages before and after alpha blending.

Signed-off-by: Fancy Fang <B47543@freescale.com>
9 years agoENGR00288842 mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
Dong Aisheng [Tue, 19 Nov 2013 10:10:27 +0000 (18:10 +0800)]
ENGR00288842 mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix

The uSDHC has an ADMA Length Mismatch errata ERR004536 which may cause ADMA
work abnormally. The errata has already been fixed for i.MX6Q TO1.2
and i.MX6DL TO1.1 by enable the bit 7 in 0x6c register.
Unfortunately this fix is not included in i.MX6SL.
So we disable ADMA for i.MX6SL and use SDMA instead.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
9 years agoof: pci: add registry of MSI chips
Thomas Petazzoni [Fri, 9 Aug 2013 20:27:09 +0000 (22:27 +0200)]
of: pci: add registry of MSI chips

This commit adds a very basic registry of msi_chip structures, so that
an IRQ controller driver can register an msi_chip, and a PCIe host
controller can find it, based on a 'struct device_node'.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoPCI: Introduce new MSI chip infrastructure
Thierry Reding [Fri, 9 Aug 2013 20:27:08 +0000 (22:27 +0200)]
PCI: Introduce new MSI chip infrastructure

The new struct msi_chip is used to associated an MSI controller with a
PCI bus. It is automatically handed down from the root to its children
during bus enumeration.

This patch provides default (weak) implementations for the architecture-
specific MSI functions (arch_setup_msi_irq(), arch_teardown_msi_irq()
and arch_msi_check_device()) which check if a PCI device's bus has an
attached MSI chip and forward the call appropriately.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Daniel Price <daniel.price@gmail.com>
Tested-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoPCI: exynos: Turn off power of phy block when link failed
Jingoo Han [Fri, 6 Sep 2013 08:21:45 +0000 (17:21 +0900)]
PCI: exynos: Turn off power of phy block when link failed

When link failed, there is no need to turn on phy block. Also,
turning on phy block is added, in order to turn on phy block
regardless of the default value of phy registers.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
9 years agoENGR00288421-4 mxc: asrc: keep map/unmap parameters symmetic
Nicolin Chen [Tue, 19 Nov 2013 06:57:00 +0000 (14:57 +0800)]
ENGR00288421-4 mxc: asrc: keep map/unmap parameters symmetic

We are using DEV_TO_MEM for dma_map but MEM_TO_DEV for dma_unmap, thus fix it.
It also adds missing device pointer since assigning it to dma_free_coherent().

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00255359 usb: core: notify disconnection when core detects disconnect
Peter Chen [Thu, 21 Mar 2013 06:56:17 +0000 (14:56 +0800)]
ENGR00255359 usb: core: notify disconnection when core detects disconnect

It is safe to call notify disconnect when the usb core
thinks the device is disconnected.

This commit also fixes one bug found at below situation:
we have not enabled usb wakeup, we do suspend when there
is an usb device at the port, after suspend, we plug out
the usb device, then plug in device again. At that time,
the nofity disconnect was not called at former code, as
the controller doesn't know the usb device was disconnected
during the suspend, but USB core knows, so to fix this problem,
let the usb core call notify disconnect.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 54d314b320e8adee0593d1bed045197f134cd9cc)

9 years agoENGR00287992-7 ARM: imx_v7_defconfig: enable USB charger detection for imx6
Peter Chen [Thu, 14 Nov 2013 08:48:23 +0000 (16:48 +0800)]
ENGR00287992-7 ARM: imx_v7_defconfig: enable USB charger detection for imx6

Enable imx6 USB charger detection

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00287992-5 usb: chipidea: msm: change the return value for msm notify_event
Peter Chen [Thu, 14 Nov 2013 08:24:38 +0000 (16:24 +0800)]
ENGR00287992-5 usb: chipidea: msm: change the return value for msm notify_event

The return value of .notify_event has changed.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00287992-1 power: imx6: add imx6 USB charger detection
Peter Chen [Thu, 14 Nov 2013 05:52:14 +0000 (13:52 +0800)]
ENGR00287992-1 power: imx6: add imx6 USB charger detection

Add imx6 USB charger detection, the vbus supplier will create and
remove struct usb_charger, and notify vbus connect and disconnect
event. The detail USB charger detection flow is at: "i.MX6 RM,
Chapter Universal Serial Bus 2.0 Integrated PHY (USB-PHY),
Charger detection, Charger detection software flow".

Since imx6 only has charger detection function, and no charging
current function is existed. It the user wants the detection abilities
from SoC, it can use this detection method
(add imx6-usb-charger-detection at dts). If the charger IC
already has USB charger detection function, and the user wants
to use the detection method from charger IC, please do not add
imx6-usb-charger-detection property at dts.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00288351 sabresd_battery: fix usb charger detect when resume back on mx6sl
Robin Gong [Fri, 15 Nov 2013 10:29:03 +0000 (18:29 +0800)]
ENGR00288351 sabresd_battery: fix usb charger detect when resume back on mx6sl

Fix  below redundant log after first resume back on mx6slevk:
max8903-charger max8903.12: USB Charger Connected

It's caused by not add enough prepare for uok&dok which are connected, such as
i.MX6SL-EVK. In this case the board only support DC charger detect, so we
didn't need judge the uok pin for USB charger detect, although uok share with
dok pin.

Signed-off-by: Robin Gong <b38343@freescale.com>
9 years agoENGR00279980 ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1
Huang Shijie [Wed, 18 Sep 2013 02:17:39 +0000 (10:17 +0800)]
ENGR00279980 ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1

If the master mtd does not have any slave mtd partitions,
and its numeraseregions is one(only has one erease block), and
we attach the master mtd with : ubiattach -m 0 -d 0

We will meet the error:
-------------------------------------------------------
root@freescale ~$ ubiattach /dev/ubi_ctrl -m 0 -d 0
UBI: attaching mtd0 to ubi0
UBI error: io_init: multiple regions, not implemented
ubiattach: error!: cannot attach mtd0
           error 22 (Invalid argument)
-------------------------------------------------------

In fact, if there is only one "erase block", we should not
prevent the attach.

This patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoENGR00288021 IPUv3 disp:get the integer part of div correctly
Sandor Yu [Thu, 14 Nov 2013 08:48:42 +0000 (16:48 +0800)]
ENGR00288021 IPUv3 disp:get the integer part of div correctly

TV will show 639x480p60 when HDMI output 640x480p60.
The same issue can be found when pixel clock sources from ipu internally.
All video modes whose pixel clocks derive from DI clock work OK.
It is caused by the wrong parent clock rate the driver gets.
Fix the issue by getting the right parent clock(ipu->pixel_clk_sel).

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoENGR00287983-2 imx restart: add another WDOG2 reset support for ldo-bypass
Robin Gong [Thu, 14 Nov 2013 05:58:21 +0000 (13:58 +0800)]
ENGR00287983-2 imx restart: add another WDOG2 reset support for ldo-bypass

For ldo-bypass mode on i.MX6Q/DL sabresd board, we will use another WDOG2 to
reset external pmic to trigger POR event, rather than WDOG1 to trigger WDOG
event in ldo-enable mode. We need to consider it in common mxc_restart().
On i.MX6SL sabresd board we use WDOG1 to trigger WDOG event both ldo-bypass and
ldo-enable mode.

Signed-off-by: Robin Gong <b38343@freescale.com>
9 years agoENGR00287579 mxsfb: i.MX6SL clean master bit before enter suspend
Sandor Yu [Wed, 13 Nov 2013 02:13:14 +0000 (10:13 +0800)]
ENGR00287579 mxsfb: i.MX6SL clean master bit before enter suspend

Clean lcdif bus master bit when lcdif enter low power mode.
Restore the master bit when lcdif back to work mode.

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoENGR00286961-5 ASoC: fsl: set tdm slot number for imx-si476x
Nicolin Chen [Mon, 11 Nov 2013 08:31:22 +0000 (16:31 +0800)]
ENGR00286961-5 ASoC: fsl: set tdm slot number for imx-si476x

When using SSI I2S master mode, we need to decide the time slot number.
Because we use SSI normal mode to trick I2S signal, we here need to set
time slot number to two (left/right).

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00286961-3 ARM: dtsi: imx6qdl: Use non-default value for audmux pinctrl
Nicolin Chen [Fri, 8 Nov 2013 08:26:25 +0000 (16:26 +0800)]
ENGR00286961-3 ARM: dtsi: imx6qdl: Use non-default value for audmux pinctrl

It's better to specify pinctrl value so that we can clearly know what the
exact configuration they are. Also, when we need to set pinctrl state from
another state to default one, it must be given the exact values of pinctrl.

And this patch also sets TXD iomux to PUE keep. This would force TXD pin not
to pull down its signal during an unused state so that it won't distort its
output signal during that state.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoRevert "serial: i.MX: evaluate linux,stdout-path property"
Greg Kroah-Hartman [Tue, 8 Oct 2013 02:06:59 +0000 (19:06 -0700)]
Revert "serial: i.MX: evaluate linux,stdout-path property"

This reverts commit f7d2c0bbdb7b784cc035cacb7d36b379ba1c3bef, as it
causes build errors when the driver is built as a module.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoENGR00174886-2 - EPDC fb: Don't register EPDC unless "epdc" kernel option set
Danny Nold [Wed, 22 Feb 2012 18:59:59 +0000 (12:59 -0600)]
ENGR00174886-2 - EPDC fb: Don't register EPDC unless "epdc" kernel option set

- EPDC firmware build was breaking due to binary build pre-empting
the conversion from .fw.ihex->.fw.  Resolve this by forcing
firmware objects to be built in order.

Signed-off-by: Danny Nold <dannynold@freescale.com>
(cherry picked from commit 7b6cb73b0a86a1d274633830fed5c65c1a0dd7d8)

9 years agoENGR00279944 ath6kl: sdio: fix system panic when doing wifi stress test
Jason Liu [Mon, 11 Nov 2013 06:29:01 +0000 (14:29 +0800)]
ENGR00279944 ath6kl: sdio: fix system panic when doing wifi stress test

When did the wifi test, meet one following kernel panic:

Unable to handle kernel paging request at virtual address 1a480000
pgd = 80004000
[1a480000] *pgd=00000000
Internal error: Oops: 805 [#1] SMP ARM
Modules linked in: ath6kl_sdio ath6kl_core [last unloaded: ath6kl_core]
CPU: 0 PID: 1953 Comm: kworker/u4:0 Not tainted 3.10.9-1.0.0_alpha+dbf364b #1
Workqueue: ath6kl ath6kl_sdio_write_async_work [ath6kl_sdio]
task: dcc9a680 ti: dc9ae000 task.ti: dc9ae000
PC is at v7_dma_clean_range+0x20/0x38
LR is at dma_cache_maint_page+0x50/0x54
pc : [<8001a6f8>]    lr : [<800170fc>]    psr: 20000093
sp : dc9afcf8  ip : 8001a748  fp : 00000004
r10: 00000000  r9 : 00000001  r8 : 00000000
r7 : 00000001  r6 : 00000000  r5 : 80cb7000  r4 : 03f9a480
r3 : 0000001f  r2 : 00000020  r1 : 1a480000  r0 : 1a480000
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 6cc5004a  DAC: 00000015
Process kworker/u4:0 (pid: 1953, stack limit = 0xdc9ae238)
Stack: (0xdc9afcf8 to 0xdc9b0000)
fce0:                                                       80c9b29c 00000000
fd00: 00000000 80017134 8001a748 dc302ac0 00000000 00000000 dc454a00 80c12ed8
fd20: dc115410 80017238 00000000 dc454a10 00000001 80017588 00000001 00000000
fd40: 00000000 dc302ac0 dc9afe38 dc9afe68 00000004 80c12ed8 00000000 dc454a00
fd60: 00000004 80436f88 00000000 00000000 00000600 0000ffff 0000000c 80c113c4
fd80: 80c9b29c 00000001 00000004 dc115470 60000013 dc302ac0 dc46e000 dc302800
fda0: dc9afe10 dc302b78 60000013 dc302ac0 dc46e000 00000035 dc46e5b0 80438c90
fdc0: dc9afe10 dc302800 dc302800 dc9afe68 dc9afe38 80424cb4 00000005 dc9afe10
fde0: dc9afe20 80424de8 dc9afe10 dc302800 dc46e910 80424e90 dc473c00 dc454f00
fe00: 000001b5 7f619d64 dcc7c830 00000000 00000000 dc9afe38 dc9afe68 00000000
fe20: 00000000 00000000 dc9afe28 dc9afe28 80424d80 00000000 00000035 9cac0034
fe40: 00000000 00000000 00000000 00000000 000001b5 00000000 00000000 00000000
fe60: dc9afe68 dc9afe10 3b9aca00 00000000 00000080 00000034 00000000 00000100
fe80: 00000000 00000000 dc9afe10 00000004 dc454a00 00000000 dc46e010 dc46e96c
fea0: dc46e000 dc46e964 00200200 00100100 dc46e910 7f619ec0 00000600 80c0e770
fec0: dc15a900 dcc7c838 00000000 dc46e954 8042d434 dcc44680 dc46e954 dc004400
fee0: dc454500 00000000 00000000 dc9ae038 dc004400 8003c450 dcc44680 dc004414
ff00: dc46e954 dc454500 00000001 dcc44680 dc004414 dcc44698 dc9ae000 dc9ae030
ff20: 00000001 dc9ae000 dc004400 8003d158 8003d020 00000000 00000000 80c53941
ff40: dc9aff64 dcb71ea0 00000000 dcc44680 8003d020 00000000 00000000 00000000
ff60: 00000000 80042480 00000000 00000000 000000f8 dcc44680 00000000 00000000
ff80: dc9aff80 dc9aff80 00000000 00000000 dc9aff90 dc9aff90 dc9affac dcb71ea0
ffa0: 800423cc 00000000 00000000 8000e018 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
...
---[ end trace 0c038f0b8e0b67a3 ]---

The kernel panic is caused by the sg_buf is not set correctly with the
following code when compiled with Yocto GCC 4.8.1:

drivers/net/wireless/ath/ath6kl/hif.h:
struct hif_scatter_req {
        struct list_head list;
        /* address for the read/write operation */
        u32 addr;
...

        /* bounce buffer for upper layers to copy to/from */
        u8 *virt_dma_buf;

        struct hif_scatter_item scat_list[1];

        u32 scat_q_depth;
};

(Note: the scat_req.scat_list[] will dynamiclly grow with run-time)

drivers/net/wireless/ath/ath6kl/sdio.c: ath6kl_sdio_setup_scat_data(...)
/* assemble SG list */
for (i = 0; i < scat_req->scat_entries; i++, sg++) {
ath6kl_dbg(ATH6KL_DBG_SCATTER, "%d: addr:0x%p, len:%d\n",
   i, scat_req->scat_list[i].buf,
   scat_req->scat_list[i].len);

sg_set_buf(sg, scat_req->scat_list[i].buf,
   scat_req->scat_list[i].len);
}

The GCC 4.8.1 compiler will not do the for-loop till scat_entries, instead,
it only run one round loop. This may be caused by that the GCC 4.8.1 thought
that the scat_list only have one item and then no need to do full iteration,
but this is simply wrong by looking at the assebly code. This will cause the
sg buffer not get set when scat_entries > 1 and thus lead to kernel panic.

This patch is a workaround to the GCC 4.8.1 complier issue by passing the
entry address of the scat_req->scat_list to the for-loop and interate it,
then, GCC 4.8.1 will do the full for-loop correctly.
(Note: This issue not observed with GCC 4.7.2, only found on the GCC 4.8.1)

This patch does not change any function logic and no any performance downgrade.

Signed-off-by: Jason Liu <r64343@freescale.com>
9 years agoENGR00286960-2 arm: imx: improve status check of clock gate
Anson Huang [Fri, 8 Nov 2013 19:59:05 +0000 (14:59 -0500)]
ENGR00286960-2 arm: imx: improve status check of clock gate

For ccm clock gate, both 2b'11 and 2b'01 should be treated
as clock enabled, see below description in CCM:

2b'00: clock is off during all modes;
2b'01: clock is on in run mode, but off in wait and stop mode;
2b'10: Not applicable;
2b'11: clock is on during all modes, except stop mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoENGR00287081 [iMX6SL] - Make sure MMDC clocks are enabled at boot
Ranjani Vaidyanathan [Fri, 8 Nov 2013 18:37:10 +0000 (12:37 -0600)]
ENGR00287081 [iMX6SL] - Make sure MMDC clocks are enabled at boot

Need to enable MMDC clocks to maintain the correct usecount, else
PLL2 can get disabled incorrectly thus hanging the system.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
9 years agommc: sdhci-esdhc-imx: add SDHCI_TRANSFER_MODE read function
Dong Aisheng [Fri, 18 Oct 2013 11:38:25 +0000 (19:38 +0800)]
mmc: sdhci-esdhc-imx: add SDHCI_TRANSFER_MODE read function

Used to read out the correct value of SDHCI_TRANSFER_MODE register
for upper layer.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
9 years agoENGR00286724-11 imx_v7_defconfig: add flexcan support
Dong Aisheng [Thu, 7 Nov 2013 08:10:06 +0000 (16:10 +0800)]
ENGR00286724-11 imx_v7_defconfig: add flexcan support

Add flexcan support.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
9 years agoENGR00286724-7 ARM: dts: sabreauto: add flexcan support
Dong Aisheng [Wed, 6 Nov 2013 02:50:09 +0000 (10:50 +0800)]
ENGR00286724-7 ARM: dts: sabreauto: add flexcan support

The flexcan1 is disabled by default since it's conflict with fec.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
9 years agoENGR00286273-3 arm: dtsi: imx6sl: add iram property to support internal SRAM
Nicolin Chen [Tue, 5 Nov 2013 11:46:51 +0000 (19:46 +0800)]
ENGR00286273-3 arm: dtsi: imx6sl: add iram property to support internal SRAM

By doing this, we can allow SDMA driver to allocate its memory from iram
when using i.MX6 SoloLite SoC.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00286273-2 misc: sram: Set default alignment to 4Kbytes
Nicolin Chen [Tue, 5 Nov 2013 11:23:58 +0000 (19:23 +0800)]
ENGR00286273-2 misc: sram: Set default alignment to 4Kbytes

As Kernel 3.0.35 does, we set the default iram alignment to 4Kbytes,
although it would waste few memory space.

We here try to do this as an expediency because currently we couldn't
find a perfect solution for 4Kbytes alignment requirement from SDMA.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00286426-22 usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK
Peter Chen [Fri, 11 Oct 2013 03:04:16 +0000 (11:04 +0800)]
ENGR00286426-22 usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

Enable CI_HDRC_IMX_EHCI_QUIRK for controllers who use mxs-phy.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286426-20 usb: chipidea: host: add quirk for ehci operation
Peter Chen [Sun, 29 Sep 2013 03:07:23 +0000 (11:07 +0800)]
ENGR00286426-20 usb: chipidea: host: add quirk for ehci operation

For chipidea controller, it does not follow ehci spec strictly.
Taking resume signal as an example, it will stop resume signal about
20-21ms later automatically, but standard ehci spec says, the resume
signal is controlled by software (clear portsc.PORT_RESUME).

This operation causes some remote wakeup problems for high speed
devices due to host controller does not send SOF in time since
software can't guarantee set run/stop bit in time (run/stop bit
was cleared at the ehci suspend routine).

When software sets run/stop bit, it needs 1 SoF time to make it effect.
If we close the PHY clock just after setting run/stop bit, it does
not be set in practice, so a software delay is needed.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286426-19 usb: chipidea: imx: Enable runtime pm support for imx6
Peter Chen [Mon, 21 Oct 2013 08:50:35 +0000 (16:50 +0800)]
ENGR00286426-19 usb: chipidea: imx: Enable runtime pm support for imx6

Currently, only imx6 SoC series add wakeup logic, so only enable
runtime pm for imx6.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286426-16 usb: chipidea: usbmisc_imx: remove the controller's clock info
Peter Chen [Tue, 22 Oct 2013 06:17:10 +0000 (14:17 +0800)]
ENGR00286426-16 usb: chipidea: usbmisc_imx: remove the controller's clock info

Currently, the usbmisc is just an API supplier for controller
driver, the controller calls related APIs to handle different
things among the SoCs, before calling it, the clock must
be on. So the clock operation is useless for usbmisc, it also
increases the difficulties to manage the clock, especially at
runtime power management situation.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286426-7 usb: phy: add notify suspend and resume callback
Peter Chen [Mon, 16 Sep 2013 08:31:24 +0000 (16:31 +0800)]
ENGR00286426-7 usb: phy: add notify suspend and resume callback

They are used to notify PHY that the controller enters suspend
or finishes resume.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286181 ARM: i.MX6: add more chip revision support
Jason Liu [Tue, 5 Nov 2013 04:03:18 +0000 (12:03 +0800)]
ENGR00286181 ARM: i.MX6: add more chip revision support

With the new tap-out of i.MX6DQ(TO1.5) and i.MX6DL/SOLO(TO1.2), we need add
more chip revision support in order to report the chip revision correctly.

Signed-off-by: Jason Liu <r64343@freescale.com>
9 years agoENGR00286418 usb: chipidea: host: fix below build error
Peter Chen [Wed, 6 Nov 2013 05:50:52 +0000 (13:50 +0800)]
ENGR00286418 usb: chipidea: host: fix below build error

/drivers/usb/chipidea/host.c: In function 'host_start':
/drivers/usb/chipidea/host.c:67:6: error: 'struct ehci_hcd'
has no member named 'has_tdi_phy_lpm'

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286159-2 usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28
Peter Chen [Wed, 23 Oct 2013 07:51:30 +0000 (15:51 +0800)]
ENGR00286159-2 usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28

Due to imx28 needs ARM swp instruction for writing, we set
CI_HDRC_IMX28_WRITE_FIX for imx28.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agousb: chipidea: imx: remove PHY operations
Peter Chen [Tue, 24 Sep 2013 04:47:54 +0000 (12:47 +0800)]
usb: chipidea: imx: remove PHY operations

Since the PHY operations are moved to core, delete the related
code at glue layer.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: imx: Add usb_phy_shutdown at probe's error path
Peter Chen [Tue, 17 Sep 2013 04:37:23 +0000 (12:37 +0800)]
usb: chipidea: imx: Add usb_phy_shutdown at probe's error path

If not, the PHY will be active even the controller is not in use.
We find this issue due to the PHY's clock refcount is not correct
due to -EPROBE_DEFER return after phy's init.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: fix the oops after rmmod gadget
Peter Chen [Tue, 17 Sep 2013 04:37:20 +0000 (12:37 +0800)]
usb: chipidea: udc: fix the oops after rmmod gadget

When we rmmod gadget, the ci->driver needs to be cleared.
Otherwise, when we plug in usb cable again, the driver will
consider gadget is there, and go to enumeration procedure,
but in fact, it was removed.

ci_hdrc ci_hdrc.0: Connected to host
Unable to handle kernel paging request at virtual address 7f02a42c
pgd = 80004000
[7f02a42c] *pgd=3f13d811, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1] SMP ARM
Modules linked in: usb_f_acm u_serial libcomposite configfs [last unloaded: g_serial]
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0+ #42
task: 807dba88 ti: 807d0000 task.ti: 807d0000
PC is at udc_irq+0x8fc/0xea4
LR is at l2x0_cache_sync+0x5c/0x6c
pc : [<803de7f4>]    lr : [<8001d0f0>]    psr: 20000193
sp : 807d1d98  ip : 807d1d80  fp : 807d1df4
r10: af809900  r9 : 808184d4  r8 : 00080001
r7 : 00082001  r6 : afb711f8  r5 : afb71010  r4 : ffffffea
r3 : 7f02a41c  r2 : afb71010  r1 : 807d1dc0  r0 : afb71068
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 3f01804a  DAC: 00000017
Process swapper/0 (pid: 0, stack limit = 0x807d0238)
Stack: (0x807d1d98 to 0x807d2000)
1d80:                                                       00000000 afb71014
1da0: 000040f6 00000000 00000001 00000000 00007530 00000000 afb71010 001dcd65
1dc0: 01000680 00400000 807d1e2c afb71010 0000004e 00000000 00000000 0000004b
1de0: 808184d4 af809900 807d1e0c 807d1df8 803dbc24 803ddf04 afba75c0 0000004e
1e00: 807d1e44 807d1e10 8007a19c 803dbb9c 8108e7e0 8108e7e0 9ceddce0 af809900
1e20: 0000004e 807d0000 0000004b 00000000 00000010 00000000 807d1e5c 807d1e48
1e40: 8007a334 8007a154 af809900 0000004e 807d1e74 807d1e60 8007d3b4 8007a2f0
1e60: 0000004b 807cce3c 807d1e8c 807d1e78 80079b08 8007d300 00000180 807d8ba0
1e80: 807d1eb4 807d1e90 8000eef4 80079aec 00000000 f400010c 807d8ce4 807d1ed8
1ea0: f4000100 96d5c75d 807d1ed4 807d1eb8 80008600 8000eeac 8042699c 60000013
1ec0: ffffffff 807d1f0c 807d1f54 807d1ed8 8000e180 800085dc 807d1f20 00000046
1ee0: 9cedd275 00000010 8108f080 807de294 00000001 807de248 96d5c75d 00000010
1f00: 00000000 807d1f54 00000000 807d1f20 8005ff54 8042699c 60000013 ffffffff
1f20: 9cedd275 00000010 00000005 8108f080 8108f080 00000001 807de248 8086bd00
1f40: 807d0000 00000001 807d1f7c 807d1f58 80426af0 80426950 807d0000 00000000
1f60: 808184c0 808184c0 807d8954 805b886c 807d1f8c 807d1f80 8000f294 80426a44
1f80: 807d1fac 807d1f90 8005f110 8000f288 807d1fac 807d8908 805b4748 807dc86c
1fa0: 807d1fbc 807d1fb0 805aa58c 8005f068 807d1ff4 807d1fc0 8077c860 805aa530
1fc0: ffffffff ffffffff 8077c330 00000000 00000000 807bef88 00000000 10c53c7d
1fe0: 807d88d0 807bef84 00000000 807d1ff8 10008074 8077c594 00000000 00000000
Backtrace:
[<803ddef8>] (udc_irq+0x0/0xea4) from [<803dbc24>] (ci_irq+0x94/0x14c)
[<803dbb90>] (ci_irq+0x0/0x14c) from [<8007a19c>] (handle_irq_event_percpu+0x54/0x19c)
 r5:0000004e r4:afba75c0
 [<8007a148>] (handle_irq_event_percpu+0x0/0x19c) from [<8007a334>] (handle_irq_event+0x50/0x70)
[<8007a2e4>] (handle_irq_event+0x0/0x70) from [<8007d3b4>] (handle_fasteoi_irq+0xc0/0x16c)
 r5:0000004e r4:af809900
 [<8007d2f4>] (handle_fasteoi_irq+0x0/0x16c) from [<80079b08>] (generic_handle_irq+0x28/0x38)
 r5:807cce3c r4:0000004b
 [<80079ae0>] (generic_handle_irq+0x0/0x38) from [<8000eef4>] (handle_IRQ+0x54/0xb4)
 r4:807d8ba0 r3:00000180
 [<8000eea0>] (handle_IRQ+0x0/0xb4) from [<80008600>] (gic_handle_irq+0x30/0x64)
 r8:96d5c75d r7:f4000100 r6:807d1ed8 r5:807d8ce4 r4:f400010c
 r3:00000000
 [<800085d0>] (gic_handle_irq+0x0/0x64) from [<8000e180>] (__irq_svc+0x40/0x54)
Exception stack(0x807d1ed8 to 0x807d1f20)
1ec0:                                                       807d1f20 00000046
1ee0: 9cedd275 00000010 8108f080 807de294 00000001 807de248 96d5c75d 00000010
1f00: 00000000 807d1f54 00000000 807d1f20 8005ff54 8042699c 60000013 ffffffff
 r7:807d1f0c r6:ffffffff r5:60000013 r4:8042699c
 [<80426944>] (cpuidle_enter_state+0x0/0xf4) from [<80426af0>] (cpuidle_idle_call+0xb8/0x174)
 r9:00000001 r8:807d0000 r7:8086bd00 r6:807de248 r5:00000001
 r4:8108f080
 [<80426a38>] (cpuidle_idle_call+0x0/0x174) from [<8000f294>] (arch_cpu_idle+0x18/0x5c)
[<8000f27c>] (arch_cpu_idle+0x0/0x5c) from [<8005f110>] (cpu_startup_entry+0xb4/0x148)
[<8005f05c>] (cpu_startup_entry+0x0/0x148) from [<805aa58c>] (rest_init+0x68/0x80)
 r7:807dc86c
 [<805aa524>] (rest_init+0x0/0x80) from [<8077c860>] (start_kernel+0x2d8/0x334)
[<8077c588>] (start_kernel+0x0/0x334) from [<10008074>] (0x10008074)
Code: e59031e0 e51b203c e24b1034 e2820058 (e5933010)
---[ end trace f874b2c5533c04bc ]---
Kernel panic - not syncing: Fatal exception in interrupt

Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: Consolidate the call of disconnect
Peter Chen [Tue, 17 Sep 2013 04:37:19 +0000 (12:37 +0800)]
usb: chipidea: udc: Consolidate the call of disconnect

The udc-core will call gadget's driver->disconnect, so we should avoid
calling gadget's disconnect again at ci_udc_stop in case the gadget's
unbind free some structs which is still used at gadget's disconnect.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: host: delete chipidea dependency
Peter Chen [Tue, 17 Sep 2013 04:37:18 +0000 (12:37 +0800)]
usb: host: delete chipidea dependency

Now, chipidea host has already depended on USB_EHCI_HCD

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoENGR00286149-8: Revert "ENGR00277805-1 usb: host: delete chipidea dependency"
Peter Chen [Tue, 5 Nov 2013 05:40:57 +0000 (13:40 +0800)]
ENGR00286149-8: Revert "ENGR00277805-1 usb: host: delete chipidea dependency"

This reverts commit f999d26ec13c1f304333ff49b10a23a19aaa68b2.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286149-7: Revert "ENGR00278097-2"
Peter Chen [Tue, 5 Nov 2013 05:37:47 +0000 (13:37 +0800)]
ENGR00286149-7: Revert "ENGR00278097-2"

This reverts commit 5eb52887fc6f8b12c11aa7d2552829aebc7598ae.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286149-5: Revert "ENGR00277805-6"
Peter Chen [Tue, 5 Nov 2013 05:33:18 +0000 (13:33 +0800)]
ENGR00286149-5: Revert "ENGR00277805-6"

This reverts commit 4e9bcf000f717cd17faef109eb6874f3d6323cea.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286149-2 Revert "ENGR00277805-3"
Peter Chen [Tue, 5 Nov 2013 05:29:11 +0000 (13:29 +0800)]
ENGR00286149-2 Revert "ENGR00277805-3"

This reverts commit 9441b292c46adcf556685a7b20de19db714094c5.
For usb upgrade.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00286149-1 Revert "ENGR00277805-2"
Peter Chen [Tue, 5 Nov 2013 05:27:35 +0000 (13:27 +0800)]
ENGR00286149-1 Revert "ENGR00277805-2"

This reverts commit c0ff2de2b5f57996332e41778ee2e4e82706ba9c.
For upgrade usb driver

Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoENGR00285671 mmc: setup emmc boot partition configure methods
Richard Zhu [Sat, 12 Oct 2013 07:25:58 +0000 (15:25 +0800)]
ENGR00285671 mmc: setup emmc boot partition configure methods

- Configure boot partition
Expose the interfaces that used to enable the configurations
of the boot mode of the eMMC cards.
usage how-to and examples:
Enable the boot partition 1 boot enabled.
"echo 8 > /sys/devices/soc0/soc.1/2100000.aips-bus/
219c000.usdhc/mmc_host/mmc2/mmc2\:0001/boot_config"

In order to make sure that the re-read the ext-csd of card
can be completed successfully, add the method to wait for
the finish of the busy state.

- setup boot_info message output
Output bit means of important esd_csd register

Read esd_csd info each time when cat boot_info
becasue user may change config affect esd_csd
value.

- Boot partition access howto:
About the details, please refer to the guidance of
Documentation/mmc/mmc-dev-parts.txt

To enable write access to /dev/mmcblkXbootY, disable the forced
read-only access with:
echo 0 > /sys/block/mmcblkXbootY/force_ro

To re-enable read-only access:
echo 1 > /sys/block/mmcblkXbootY/force_ro

NOTE:
- The definitions of the EXT_CSD_PART_CONFIG and EXT_CSD_BOOT_BUS_WIDTH
+------------------------------------------------------------+
| Bit7 | Bit6     | Bit5 Bit4 Bit3        | Bit2 Bit1 Bit0   |
|------|----------|-----------------------|------------------|
| X    | BOOT_ACK | BOOT_PARTITION_ENABLE | PARTITION_ACCESS |
+------------------------------------------------------------+
Bit7: Reserved
Bit6: always set to vaule '1' when boot_part is enabled
Bit[5:3]:
0x0 : Device not boot enabled (default)
0x1 : Boot partition 1 enabled for boot
0x2 : Boot partition 2 enabled for boot
0x7 : User area enabled for boot
Bit[2:0]:
0x0 : No access to boot partition (default)
0x1 : R/W boot partition 1
0x2 : R/W boot partition 2

+--------------------------------------------------------------------+
| Bit7 Bit6 Bit5 | Bit4 Bit3 | Bit2                 | Bit1 Bit0      |
|----------------|----------------------------------|----------------|
| X              | BOOT_MODE | RESET_BOOT_BUS_WIDTH | BOOT_BUS_WIDTH |
+--------------------------------------------------------------------+
Bit [4:3] : BOOT_MODE (non-volatile)
0x0 : Use single data rate + backward compatible timings in boot
operation (default)
0x1 : Use single data rate + high speed timings in boot operation mode
0x2 : Use dual data rate in boot operation
0x3 : Reserved
Bit [2]: RESET_BOOT_BUS_WIDTH (non-volatile)
0x0 : Reset bus width to x1, single data rate and backward compatible
timings after boot operation (default)
0x1 : Retain boot bus width and boot mode after boot operation
Bit[1:0] : BOOT_BUS_WIDTH (non-volatile)
0x0 : x1 (sdr) or x4 (ddr) bus width in boot operation mode (default)
0x1 : x4 (sdr/ddr) bus width in boot operation mode
0x2 : x8 (sdr/ddr) bus width in boot operation mode
0x3 : Reserved

- example of the boot_info:
boot_info:0x07;
  ALT_BOOT_MODE:1 - Supports alternate boot method
  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot
  HS_BOOTMODE:1 - Supports high speed timing during boot
boot_size:2048KB
  boot_partition:0x48;
  BOOT_ACK:1 - Boot acknowledge sent during boot operation
  BOOT_PARTITION-ENABLE: 1 - Boot partition 1 enabled
  PARTITION_ACCESS:0 - No access to boot partition
boot_bus:0x00
  BOOT_MODE:0 - Use single data rate + backward compatible timings
  in boot operation
  RESET_BOOT_BUS_WIDTH:0 - Reset bus width to x1, single data rate
  and backwardcompatible timings after boot operation
  BOOT_BUS_WIDTH:0 - x1 (sdr) or x4 (ddr) bus width in boot
  operation mode

Signed-off-by: Richard Zhu <r65037@freescale.com>
9 years agoENGR00274782 fixed gpu crash when baseAddress is not 0 or 2G
Xianzhong [Tue, 13 Aug 2013 15:16:24 +0000 (23:16 +0800)]
ENGR00274782 fixed gpu crash when baseAddress is not 0 or 2G

The baseAddress of contiguousVidMem is the actual physical address
which is not subtracted by gpu baseAddress, but the allocated physical address
has been subtracted by gpu baseAddress in gckVIDMEM_Lock,
so the invalid offset is produced and used to calculate the logical address.

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Shawn Guo
9 years agoENGR00274478 fix gpu memory multi-lock failure
Xianzhong [Fri, 23 Aug 2013 12:36:45 +0000 (20:36 +0800)]
ENGR00274478 fix gpu memory multi-lock failure

this issue cause system boot with multi-user switch on JB4.3,

root cause is gpu memory cannot be multi-locked in same process,
gpu memory lock reference is added to allow multi-lock in kernel driver.

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
9 years agoENGR00277045-1 fix system reboot with video playback
Xianzhong [Wed, 28 Aug 2013 17:33:39 +0000 (01:33 +0800)]
ENGR00277045-1 fix system reboot with video playback

gpu virtual memory cannot be allocated for external use

this issue occurs in ARD board with 2G above memory address

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
9 years agoENGR00285273-3 IPU dev:Remove unnecessary memset before kfree
Liu Ying [Tue, 29 Oct 2013 04:31:36 +0000 (12:31 +0800)]
ENGR00285273-3 IPU dev:Remove unnecessary memset before kfree

This patch removes unnecessary memset() before kfree().
Also, it fixes a potential NULL pointer dereference(writing
to a freed block of memory).

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00285273-2 IPU dev:Remove an unnesessary check
Liu Ying [Tue, 29 Oct 2013 04:28:52 +0000 (12:28 +0800)]
ENGR00285273-2 IPU dev:Remove an unnesessary check

This patch removes an unnesessary check before setting
task ID to simplify the code.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00285273-1 IPU dev:Correct timeout setting from users
Liu Ying [Tue, 29 Oct 2013 03:26:40 +0000 (11:26 +0800)]
ENGR00285273-1 IPU dev:Correct timeout setting from users

This patch corrects the logic to set timeout value specified
by the users.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00284649 ARM: Documentation: Add MLB dts binding doc
Luwei Zhou [Wed, 23 Oct 2013 02:22:33 +0000 (10:22 +0800)]
ENGR00284649 ARM: Documentation: Add MLB dts binding doc

This patch add MLB devicetree binding doc.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
9 years agospi: More sanity checks for transfers
Mark Brown [Wed, 10 Jul 2013 14:05:40 +0000 (15:05 +0100)]
spi: More sanity checks for transfers

Check that transfers are non-empty and that there is a completion for
them.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agommc: sdhci-esdhc-imx: add delay line setting support
Dong Aisheng [Mon, 21 Oct 2013 08:54:40 +0000 (16:54 +0800)]
mmc: sdhci-esdhc-imx: add delay line setting support

The DLL(Delay Line) is newly added to assist in sampling read data.
The DLL provides the ability to programmatically select a quantized
delay (in fractions of the clock period) regardless of on-chip variations
such as process, voltage and temperature (PVT).

This patch adds a user interface to set slave delay line via device tree.
It's usually used in high speed mode like mmc DDR mode when the signal
quality is not good caused by board design, e.g. the signal path is too
long.  User can manually set delay line to find a suitable data sampling
window for card to work properly.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
9 years agoENGR00283508-5 pinctrl: imx: support pin sleep mode in suspend
Anson Huang [Mon, 14 Oct 2013 19:32:48 +0000 (15:32 -0400)]
ENGR00283508-5 pinctrl: imx: support pin sleep mode in suspend

When system suspend, need to switch pwm pin to sleep mode,
this is to save IO power. Using pinctrl mode switch framework
to make it happen.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoENGR00283508-3 keyboard: imx: support pin sleep mode in suspend
Anson Huang [Mon, 14 Oct 2013 19:19:20 +0000 (15:19 -0400)]
ENGR00283508-3 keyboard: imx: support pin sleep mode in suspend

When system suspend, need to switch keyboard pins to sleep mode,
this is to save IO power. Using pinctrl mode switch framework
to make it happen.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoENGR00283508-2 arm: dts: imx6sl: support pwm pin sleep mode
Anson Huang [Mon, 14 Oct 2013 19:07:51 +0000 (15:07 -0400)]
ENGR00283508-2 arm: dts: imx6sl: support pwm pin sleep mode

As i.MX6SL EVK board is very sensitive to DSM power, so we
need to lower IO power of PWM pin:

MX6SL_PAD_PWM1__GPIO3_IO23

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoENGR00283496 ARM: clk: imx6sl: update epdc pixel clock tree
Robby Cai [Mon, 14 Oct 2013 03:32:25 +0000 (11:32 +0800)]
ENGR00283496 ARM: clk: imx6sl: update epdc pixel clock tree

Add CLK_SET_RATE_PARENT flag for epdc pixel clock to allow the rate change
operation to propagate up to the clock's parent in order to get desired rate.

Signed-off-by: Robby Cai <R63905@freescale.com>
9 years agoserial: imx: implement the flush_buffer hook
Huang Shijie [Wed, 9 Oct 2013 07:13:23 +0000 (15:13 +0800)]
serial: imx: implement the flush_buffer hook

The current driver does not implement the flush_buffer hook for
uart_ops. When we enable the DMA for the driver, and test it with Bluetooth,
we may meet the following bug for TX:

    [1] User application may call the flush operation at any time.
        The uart_flush_buffer() calls the uart_circ_clear() to set
        the xmit->head and xmit->tail with 0.

    [2] The TX DMA callback can be called at any time too.
        The dma_tx_call() will update the xmit->tail.

    If [2] occurs just after the [1], we will get the wrong xmit->tail.

This patch implements the flush_buffer hook to fix this issue.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoENGR00283480 imx_v7_defconfig: enable MLB150 module
Luwei Zhou [Sat, 12 Oct 2013 07:53:48 +0000 (15:53 +0800)]
ENGR00283480 imx_v7_defconfig: enable MLB150 module

Add MLB150 module support in imx_v7_defconfig

Signed-off-by: Luwei Zhou <b45643@freescale.com>
9 years agoENGR00281186 dmaengine: pxp: not fetch data from AS buffer if it's not used
Robby Cai [Wed, 25 Sep 2013 05:35:46 +0000 (13:35 +0800)]
ENGR00281186 dmaengine: pxp: not fetch data from AS buffer if it's not used

There's no explicit BIT in PxP register to disable AS buffer.
The right way to disable AS is to set ULC to a higher value than the LRC.
It has been done once in probe time, but not in run time.
This could cause one potential problem because even when ULC, LRC
and buffer address is set to 0 PxP will still fetch one pixel data from addr 0.
This patch fixes it by set ULC higher than LRC for AS if it's not used (i.e.,
no alpha-blending) at run time.

Signed-off-by: Robby Cai <R63905@freescale.com>
9 years agoENGR00283192 Avoid vpu rmmod failure and modprobe warning
Hongzhang Yang [Thu, 10 Oct 2013 03:12:06 +0000 (11:12 +0800)]
ENGR00283192 Avoid vpu rmmod failure and modprobe warning

- Avoid vpu rmmod failure caused by regulator free failure
  Do not call regulator_put because regulators returned from
  devm_regulator_get are automatically regulator_put() on
  driver detach

- Avoid vpu modprobe warning caused by unbalanced pm_runtime_enable
  Add missing call to pm_runtime_disable

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
9 years agoENGR00283037 [gpu]Avoid gpu rmmod failure caused by regulator free failure
Loren HUANG [Wed, 9 Oct 2013 08:33:39 +0000 (16:33 +0800)]
ENGR00283037 [gpu]Avoid gpu rmmod failure caused by regulator free failure

The failure is caused by duplicate regulator resource free.
New devm_xxx API will free the resource automatically after remove()
is called.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Shawn Guo
9 years agoserial: imx: Use NULL as the last argument of add_preferred_console()
Fabio Estevam [Mon, 2 Sep 2013 01:24:35 +0000 (22:24 -0300)]
serial: imx: Use NULL as the last argument of add_preferred_console()

Commit f7d2c0bbd (serial: i.MX: evaluate linux,stdout-path property) introduced
the following sparse warning:

drivers/tty/serial/imx.c:1916:77: warning: Using plain integer as NULL pointer

Pass NULL as the last argument of add_preferred_console() instead of zero.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoENGR00280494-2 Add config for mfgtools
Frank Li [Thu, 3 Oct 2013 19:51:58 +0000 (14:51 -0500)]
ENGR00280494-2 Add config for mfgtools

Build in USB Mass storage
Enable CONFIG_FSL_UTP

Must list all gadgets in config file
otherwise CONFIG_USB_MASS_STORAGE becomes to m

+# CONFIG_USB_ZERO is not set
+# CONFIG_USB_AUDIO is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_G_NCM is not set
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FUNCTIONFS is not set
+CONFIG_USB_MASS_STORAGE=y
+CONFIG_FSL_UTP=y
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+# CONFIG_USB_G_ACM_MS is not set
+# CONFIG_USB_G_MULTI is not set
+# CONFIG_USB_G_HID is not set
+# CONFIG_USB_G_DBGP is not set
+# CONFIG_USB_G_WEBCAM is not set

Signed-off-by: Frank Li <Frank.li@freescale.com>
9 years agoENGR00280852-8 mxc: asrc: Add polling mode working without dma for debugging
Nicolin Chen [Wed, 25 Sep 2013 11:10:58 +0000 (19:10 +0800)]
ENGR00280852-8 mxc: asrc: Add polling mode working without dma for debugging

Add polling mode for data transmitting without dma support for debugging when
sdma may have issue.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00280852-4 mxc: asrc: Use completion instead of counter
Nicolin Chen [Tue, 24 Sep 2013 10:27:34 +0000 (18:27 +0800)]
ENGR00280852-4 mxc: asrc: Use completion instead of counter

Use completion instead of counter to make driver clean and drop
implicit mdelay by using wait_for_completion().

Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00281613 imx_v7_defconfig: enable net VLAN 802.1Q
Fugang Duan [Fri, 27 Sep 2013 07:33:36 +0000 (15:33 +0800)]
ENGR00281613 imx_v7_defconfig: enable net VLAN 802.1Q

Enable net VLAN 8021Q in imx_v7_defconfig.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00279204-2 mxc vout: reconfig overlay fb correctly
Liu Ying [Thu, 26 Sep 2013 06:11:08 +0000 (14:11 +0800)]
ENGR00279204-2 mxc vout: reconfig overlay fb correctly

The overlay framebuffer's position and resolution are
set with two different APIs. They depend on each other to
make sure the overlay framebuffer window will not go out
of the background framebuffer window. Potentially, this
causes the overlay framebuffer's position or resolution
of the current video pipeline be impacted by the settings
of the last time. To setup the overlay fb from scratch
correctly, this patch takes the following steps:
- blank framebuffer
- set framebuffer position to the starting point
- reconfigure framebuffer
- set framebuffer position to a specific point
- unblank framebuffer
This procedure applies to non-overlay framebuffers as well.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00279204-1 mxc vout: reconfig fb when necessary
Liu Ying [Thu, 26 Sep 2013 05:41:17 +0000 (13:41 +0800)]
ENGR00279204-1 mxc vout: reconfig fb when necessary

Users may call VIDIOC_S_CTRL or VIDIOC_S_CROP ioctrls
to update streaming parameters on-the-fly after video
has been streamed on, such as for rotation/output
resolution/overlay output position change. Any
unnecessary frame buffer reconfiguration would cause
a pair of frame buffer blank/unblank events happen and
even makes the background framebuffer show up for a
short period of time if the video is rendered on an
overlay framebuffer. This patch compares the last time
video output pipe line settings with the current ones
to determine whether frame buffer reconfiguration is
necessary or not.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00280140 pxp/v4l2: restore the display content after video playback finishes
Robby Cai [Sun, 22 Sep 2013 09:31:06 +0000 (17:31 +0800)]
ENGR00280140 pxp/v4l2: restore the display content after video playback finishes

After finish video playback, the last frame remains on the display.
It's because the UI display start address (smem_start) has been changed when
do video playback but not changed back again after the playback finishes.
From the function call point of view,

 pxp_set_fbinfo()         // pxp->fb.base tracks right addr for UI framebuffer
 pxp_show_buf(toshow)     // smem_start changed to v4l2 display addr
 pxp_set_fbinfo()         // pxp->fb.base changed to v4l2 display addr
 pxp_show_buf(not toshow) // smem_start still equal to v4l2 display addr
                          // for pan_display

This patch fixes it by calling pxp_set_fbinfo once in open function.

Signed-off-by: Robby Cai <R63905@freescale.com>
9 years agoENGR00280663-3 mxc vout: handle downsize ratio overflow
Liu Ying [Sun, 22 Sep 2013 04:45:29 +0000 (12:45 +0800)]
ENGR00280663-3 mxc vout: handle downsize ratio overflow

This patch handles downsize ratio overflow error by doing
input cropping with 8 pixel step.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00280663-2 IPUv3 device: check downsize ratio overflow
Liu Ying [Sun, 22 Sep 2013 04:37:39 +0000 (12:37 +0800)]
ENGR00280663-2 IPUv3 device: check downsize ratio overflow

IPUv3 IC task downsize scaling ratio cannot exceed or be
equal to 8:1. This patch makes the code return error code
if the ratio overflows.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00280663-1 IPUv3: improve IC scale check logic
Liu Ying [Sun, 22 Sep 2013 02:34:24 +0000 (10:34 +0800)]
ENGR00280663-1 IPUv3: improve IC scale check logic

This patch improves IPU IC task scale check logic
so that we may return with error code if the calculation
for scale coefficients fails.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00280101-3 [iMX6x] Add support for bypass mode rates
Ranjani Vaidyanathan [Tue, 17 Sep 2013 22:14:05 +0000 (17:14 -0500)]
ENGR00280101-3 [iMX6x] Add support for bypass mode rates

Fix the code to report correct PFD and PLL clock rates when
the PLL is in bypass state.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
9 years agoENGR00280115 videobuf-dma-contig: make mmapped video buffer bufferable
Liu Ying [Wed, 18 Sep 2013 02:15:34 +0000 (10:15 +0800)]
ENGR00280115 videobuf-dma-contig: make mmapped video buffer bufferable

This patch makes mmapped video buffers bufferable so that software
decoders may render the video buffers efficiently.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00279413 pxp/v4l2: get the right framebuffer start address at run time
Robby Cai [Thu, 12 Sep 2013 11:11:54 +0000 (19:11 +0800)]
ENGR00279413 pxp/v4l2: get the right framebuffer start address at run time

Previously the driver gets the framebuffer start address at probe time.
But this address might be changed if the framebuffer drivers re-allocate
the frame buffers due to the application changes the yres_virtual.
As a result, some garbage data can be observed on display.
This patch adjusts the way to detect the start address at run time to
fix this problem.

Signed-off-by: Robby Cai <R63905@freescale.com>
9 years agoENGR00279436 input: touchscreen: egalax: enable multitouch
Fugang Duan [Thu, 12 Sep 2013 09:39:27 +0000 (17:39 +0800)]
ENGR00279436 input: touchscreen: egalax: enable multitouch

Disable single-touch support in imx_v7_defconfig to enable
multitouch feature for egalax.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00279368-3 mxc: asrc: Add missing clock control
Nicolin Chen [Thu, 12 Sep 2013 06:56:36 +0000 (14:56 +0800)]
ENGR00279368-3 mxc: asrc: Add missing clock control

* Add missing clock control
* Set ASRC clock to 7.5MHz as 3.0.35 does
* Use the same divisor for ideal ratio mode as 3.0.35 does

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
9 years agoENGR00279401 mxc v4l2 capture: use flush_work instead of flush_work_sync
Liu Ying [Thu, 12 Sep 2013 07:50:13 +0000 (15:50 +0800)]
ENGR00279401 mxc v4l2 capture: use flush_work instead of flush_work_sync

Since commit 43829731d (workqueue: deprecate flush[_delayed]_work_sync()),
flush_work() should be used instead of flush_work_sync().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
9 years agoENGR00279226 media: ov5642: correct io_regulator sanity check
Liu Ying [Wed, 11 Sep 2013 10:25:44 +0000 (18:25 +0800)]
ENGR00279226 media: ov5642: correct io_regulator sanity check

The following commit introduced a wrong sanity check for
the io_regulator which is intended to be got from device tree.
a364635a535705a8c16df49ff9bc7b9362b083ec

This patch corrects the sanity check.

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