linux.git
10 years agoENGR00307014-06 vadc: Enable vadc function
Sandor Yu [Fri, 11 Apr 2014 05:39:24 +0000 (13:39 +0800)]
ENGR00307014-06 vadc: Enable vadc function

Enable vadc function.
That can work at PAL 720x576 and NTSC 720x480 mode.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00307014-05 Add imx6sx vadc gpr register define
Sandor Yu [Wed, 16 Apr 2014 07:11:36 +0000 (15:11 +0800)]
ENGR00307014-05 Add imx6sx vadc gpr register define

Add imx6sx vadc gpr register define.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00307014-04 ARM: imx6x: Set vadc clock source from Pll3
Sandor Yu [Fri, 11 Apr 2014 05:36:25 +0000 (13:36 +0800)]
ENGR00307014-04 ARM: imx6x: Set vadc clock source from Pll3

Set vadc clock parent to PLL3 USB OTG.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00307014-03 v4l2 capture: support for vadc
Sandor Yu [Fri, 11 Apr 2014 05:37:54 +0000 (13:37 +0800)]
ENGR00307014-03 v4l2 capture: support for vadc

-Add v4l2 capture ioctl VIDIOC_S_INPUT, VIDIOC_G_INPUT,VIDIOC_ENUMINPUT,
VIDIOC_S_STD,VIDIOC_G_STD support.
-Add NTSC, PAL format define.
-Add parameter cam_input_fmt to save camera sensor format.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00307014-02 csi: update csi driver to support vadc
Sandor Yu [Fri, 4 Apr 2014 05:37:32 +0000 (13:37 +0800)]
ENGR00307014-02 csi: update csi driver to support vadc

-Add csi control register 18 define.
-Add csi_tvdec_enable and csi_deinterlace_mode for vadc.
-Add csi_set_32bit_imagpara function to support YUV444 format.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00307014-01 dma: pxp: Add YUV444 csc support
Sandor Yu [Fri, 4 Apr 2014 05:28:17 +0000 (13:28 +0800)]
ENGR00307014-01 dma: pxp: Add YUV444 csc support

Add YUV444 csc support in pxp driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00309070 [#1136] fixed GPU kernel random crash in 5.x driver
Xianzhong [Thu, 17 Apr 2014 15:41:18 +0000 (23:41 +0800)]
ENGR00309070 [#1136] fixed GPU kernel random crash in 5.x driver

database list corruption is caused by the extensive surface type(>=0x100)
some random kernel crash issues will be introduced by data corruption

this fix is to clear the extensive surface type with 0xFF mask, referring to

    gcvSURF_NUM_TYPES, /* Make sure this is the last one! */

    /* Combinations. */
    gcvSURF_NO_TILE_STATUS = 0x100,
    gcvSURF_NO_VIDMEM      = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
                                       In Android, vidmem node is allocated by another process. */
    gcvSURF_CACHEABLE      = 0x400, /* Used to allocate a cacheable surface */

Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 0f79bbd805402a8dcdf22bb119f99f05d8b9e4c3)

10 years agoENGR00309031-2 dts: imx6sx-sdb-emmc: add emmc support on uSDHC4
Dong Aisheng [Wed, 16 Apr 2014 08:37:36 +0000 (16:37 +0800)]
ENGR00309031-2 dts: imx6sx-sdb-emmc: add emmc support on uSDHC4

The eMMC interface is shared with uSDHC4 BOOT card slot and the eMMC chip is
DNP by default. User needs burn the eMMC chip onto the board manually and
do hw rework to enable eMMC signals.
We create a new dts imx6sx-sdb-emmc.dts for easy eMMC test after doing hw rework.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00309031-1 dts: imx6sx-sdb: move usdhc4 gpios pins out of hog group
Dong Aisheng [Wed, 16 Apr 2014 08:29:45 +0000 (16:29 +0800)]
ENGR00309031-1 dts: imx6sx-sdb: move usdhc4 gpios pins out of hog group

For imx6sx sdb board, the eMMC interface and uSDHC4 BOOT card slot are shared
and the eMMC chip is DNP by default.
If burn the eMMC chip onto the board and do hw rework to enable eMMC signals,
the cd-gpio and wp-gpios will be reused as eMMC DATA signals.
So we'd better move this two gpio pin out of hog group for easy disable
this gpio setting in another dts.

It's required for the next patch which adds the eMMC support in another
dts file.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00308899 [#1087] enhanced GPU database protection
Xianzhong [Wed, 19 Mar 2014 18:45:18 +0000 (02:45 +0800)]
ENGR00308899 [#1087] enhanced GPU database protection

the potential risk is found in special case when application exit,
deleting record will cause the unexpected issue when process database is destoryed without atom protection

the enhanced database patch should be applied to avoid the unexpected kernel issue

Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 00ef75b4f50933749a2fd569488510ab760de4a9)

10 years agoENGR00292154-12 gpu:Correct freescale memory allocation function
Loren Huang [Thu, 17 Apr 2014 02:32:14 +0000 (10:32 +0800)]
ENGR00292154-12 gpu:Correct freescale memory allocation function

-Fix a issue during cma 5.0.11 integration.
 With this issue cma allocation will not return error when allocation failed.

Date: Apr 17, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00307558-13 usb: chipidea: otg-fsm: enable low power mode for otg fsm mode.
Li Jun [Tue, 8 Apr 2014 14:21:13 +0000 (22:21 +0800)]
ENGR00307558-13 usb: chipidea: otg-fsm: enable low power mode for otg fsm mode.

This patch enables runtime pm support for otg fsm mode.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-12 usb: chipidea: udc: usb charger handling when otg fsm mode
Li Jun [Tue, 8 Apr 2014 14:04:35 +0000 (22:04 +0800)]
ENGR00307558-12 usb: chipidea: udc: usb charger handling when otg fsm mode

This patch adds usb charger notify condition when usb otg fsm
is enabled, do not do charger notify when doing role switch.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-11 Documentation: usb: add chipidea.txt for how to demo usb OTG HNP...
Li Jun [Wed, 19 Mar 2014 07:55:50 +0000 (15:55 +0800)]
ENGR00307558-11 Documentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP

This patch adds a file chipidea.txt for how to demo chipidea usb OTG HNP and SRP
functions via sysfs input files, any other possible information should be
documented for chipidea usb driver in future can be added into this file.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-10 Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP...
Li Jun [Tue, 18 Mar 2014 07:10:32 +0000 (15:10 +0800)]
ENGR00307558-10 Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP

This patch adds sysfs interface description for chipidea USB OTG HNP and SRP.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-9 usb: chipidea: debug: add debug file for OTG variables
Li Jun [Tue, 18 Mar 2014 06:14:47 +0000 (14:14 +0800)]
ENGR00307558-9 usb: chipidea: debug: add debug file for OTG variables

This patch adds a debug file for OTG vairables show.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-8 usb: chipidea: add sys inputs for OTG fsm input.
Li Jun [Tue, 18 Mar 2014 03:09:49 +0000 (11:09 +0800)]
ENGR00307558-8 usb: chipidea: add sys inputs for OTG fsm input.

This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-7 usb: chipidea: OTG HNP and SRP fsm implementation.
Li Jun [Mon, 17 Mar 2014 13:12:24 +0000 (21:12 +0800)]
ENGR00307558-7 usb: chipidea: OTG HNP and SRP fsm implementation.

USB OTG interrupt handling and fsm transitions according to USB OTG
and EH 2.0.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-6 usb: chipidea: OTG fsm timers initialization.
Li Jun [Mon, 17 Mar 2014 08:33:19 +0000 (16:33 +0800)]
ENGR00307558-6 usb: chipidea: OTG fsm timers initialization.

This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as timeout counter, also adds some local timers which are not
in otg_fsm_timer list.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-5 usb: chipidea: add OTG fsm operation functions implemenation.
Li Jun [Wed, 1 Jan 2014 05:35:34 +0000 (13:35 +0800)]
ENGR00307558-5 usb: chipidea: add OTG fsm operation functions implemenation.

Add OTG HNP and SRP operation functions implementation:
- charge vbus
- drive vbus
- connection signaling
- drive sof
- start data pulse
- add fsm timer
- delete fsm timer
- start host
- start gadget

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-4 usb: chipidea: udc: driver update for OTG HNP.
Li Jun [Tue, 1 Apr 2014 00:09:34 +0000 (08:09 +0800)]
ENGR00307558-4 usb: chipidea: udc: driver update for OTG HNP.

Add b_hnp_enable request handling and enable gadget->is_otg

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-3 usb: chipidea: host: init otg port number.
Li Jun [Tue, 1 Apr 2014 00:04:50 +0000 (08:04 +0800)]
ENGR00307558-3 usb: chipidea: host: init otg port number.

Init otg_port number of otg capable host to be 1 at host start.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-2 usb: chipidea: host: vbus control change for OTG
Li Jun [Tue, 1 Apr 2014 00:00:42 +0000 (08:00 +0800)]
ENGR00307558-2 usb: chipidea: host: vbus control change for OTG

Leave vbus on/off hanlded by OTG fsm if in OTG mode.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00307558-1 usb: chipidea: usb OTG fsm initialization.
Li Jun [Tue, 31 Dec 2013 13:36:51 +0000 (21:36 +0800)]
ENGR00307558-1 usb: chipidea: usb OTG fsm initialization.

This patch adds OTG fsm related initialization when do otg init,
add a seperate file for OTG fsm related utilities.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00308442-2 usb: chipidea: otg: wait devices disconnected before stop host
Li Jun [Mon, 14 Apr 2014 11:39:09 +0000 (19:39 +0800)]
ENGR00308442-2 usb: chipidea: otg: wait devices disconnected before stop host

This patch adds device connection check before stop host for id change to be 0,
wait until there is no any devices connected, then do host stop to avoid
deadlock.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00308442-1 usb: chipidea: otg: revert thread solution to restore work queue
Li Jun [Mon, 14 Apr 2014 06:35:20 +0000 (14:35 +0800)]
ENGR00308442-1 usb: chipidea: otg: revert thread solution to restore work queue

Revert "ENGR00286962-2 usb: chipidea: fix the system will be deadlock with ID
wakeup" since dedicated thread solution is some expensive, and for otg fsm
extension, work queue is requred.

This reverts commit 7d6fa1243c29562461752c2115a25cb54dc49217.

Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00308436-3 usb: chipidea: debug: add debug file for controller registers dump.
Li Jun [Tue, 18 Mar 2014 04:59:08 +0000 (12:59 +0800)]
ENGR00308436-3 usb: chipidea: debug: add debug file for controller registers dump.

This patch adds below registers dump for debug:
- USBINTR
- USBSTS
- USBMODE
- USBCMD
- PORTSC
- OTGSC

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00308436-2 usb: chipidea: export interrupt enable and status register read functions.
Li Jun [Mon, 31 Mar 2014 10:56:35 +0000 (18:56 +0800)]
ENGR00308436-2 usb: chipidea: export interrupt enable and status register read functions.

This patch moves usb interrupt enable and status register read functions
from udc driver to core driver to use them in all ci drivers.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00308436-1 usb: chipidea: operate on otgsc register in a general way
Li Jun [Mon, 31 Mar 2014 10:49:13 +0000 (18:49 +0800)]
ENGR00308436-1 usb: chipidea: operate on otgsc register in a general way

Use a more general way to read and write otgsc register.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
10 years agousb: phy: fsm: update OTG HNP state transition conditions according to OTG and EH...
Li Jun [Wed, 26 Feb 2014 23:38:19 +0000 (07:38 +0800)]
usb: phy: fsm: update OTG HNP state transition conditions according to OTG and EH 2.0 spec.

According to:"On-The-Go and Embedded Host Supplement to the USB Revision 2.0
Specification July 27, 2012 Revision 2.0 version 1.1a"
- From a_host to a_wait_bcon if !b_conn
- Add transition from a_host to a_wait_vfall if id state is high or a_bus_drop
- From a_wait_vfall to a_idle if a_wait_vfall_tmout

Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 8bebbe8dc6145303db05964fb09657aac2a7e909)

10 years agousb: phy: Fix double lock in OTG FSM
Anton Tikhomirov [Fri, 20 Dec 2013 10:06:24 +0000 (19:06 +0900)]
usb: phy: Fix double lock in OTG FSM

Mutex obtained at the beginning of the function should
be released at the end to avoid double locking.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 16da4b174b08c42076cd3384c420f352c909d467)

10 years agousb: phy: Add OTG FSM configuration option
Anton Tikhomirov [Tue, 26 Nov 2013 02:47:53 +0000 (11:47 +0900)]
usb: phy: Add OTG FSM configuration option

This patch removes dependency on Freescale USB UTG Transceiver
driver and makes OTG FSM implementation selectable.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit e1d2e31975e1e3a31ac592d5b1c5cb5d655b3f4e)

10 years agousb: phy: make PHY driver selection possible by controller drivers
Roger Quadros [Fri, 14 Jun 2013 09:51:41 +0000 (12:51 +0300)]
usb: phy: make PHY driver selection possible by controller drivers

Convert PHY Drivers from menuconfig to menu so that the PHY drivers
can be explicitely selected by the controller drivers.

USB_PHY is no longer a user visible option. It is upto to the PHY
drivers to select it if needed. This patch does so for the existing
PHY drivers that use the USB_PHY library.

Doing so moves the USB_PHY and PHY driver selection problem from the
end user to the PHY and controller driver developer.

e.g.

Earlier, a controller driver (e.g. EHCI_OMAP) that needs to select
a PHY driver (e.g. NOP_PHY) couldn't do so because the PHY driver
depended on USB_PHY. Making the controller driver depend on USB_PHY
has a negative effect i.e. it becomes invisible to the user till
USB_PHY is enabled. Most end users will not familiar with this.

With this patch, the end user just needs to select the controller driver
needed for his/her platform without worrying about which PHY driver to
select.

Also update USB_EHCI_MSM, USB_LPC32XX and USB_OMAP to not depend
on USB_PHY any more. They can safely select the necessary PHY drivers.

[ balbi@ti.com : refreshed on top of my next branch. Changed bool
followed by default n into def_bool n ]

CC: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 052a11d13bdecb77ee4cdbdccfce5434a12209af)

10 years agousb: phy: move OTG FSM header
Anton Tikhomirov [Tue, 26 Nov 2013 02:47:02 +0000 (11:47 +0900)]
usb: phy: move OTG FSM header

Other USB drivers may want to use OTG final state machine
implementation, so make this header available for them.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 5653668c9585441926dd2575791f6b5bb84bb254)

10 years agousb: phy: replace spinlock with mutex in OTG FSM
Anton Tikhomirov [Tue, 26 Nov 2013 02:46:05 +0000 (11:46 +0900)]
usb: phy: replace spinlock with mutex in OTG FSM

OTG Final State Machine calls functions which may sleep.

For example, start_gadget callback implementation can use
usb_gadget_vbus_connect(), whose context: can sleep.

If so, mutex should be used instead of spinlock.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 16e569e9661ea2b964b8abb607a51e5285254021)

10 years agousb: phy: fsm: protect against multiple inclusions
Anton Tikhomirov [Tue, 26 Nov 2013 16:08:58 +0000 (10:08 -0600)]
usb: phy: fsm: protect against multiple inclusions

if this header is included twice, we would have
redefinition build errors. Fix this.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit d49dd788840ff802421ed7412e967b659fe9ca58)

10 years agousb: phy: fsm: don't depend on indirect includes
Felipe Balbi [Tue, 26 Nov 2013 16:06:00 +0000 (10:06 -0600)]
usb: phy: fsm: don't depend on indirect includes

this header uses spinlocks and errno values, so
we must include <linux/spinlock.h> and <linux/errno.h>
to avoid build errors.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit cc9d9ccf2a1e8c9f36a436805317180003ba9719)

10 years agousb: phy: Reordering of OTG FSM variables
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Reordering of OTG FSM variables

Reorder variables in struct otg_fsm as they appear in OTG and EH
supplement to USB2.0.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 4662e5ef54f01ff5333474a825f90ab74f95bc3d)

10 years agousb: phy: Add and use missed OTG FSM inputs/outputs
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Add and use missed OTG FSM inputs/outputs

Several input/output variables missed in current FSM implementation.
This patch adds and makes use of them as specified in OTG and EH
supplement to USB2.0.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit ec04996a080d825f8acdf0f8fbb2f3ebd5963cf3)

10 years agousb: phy: Rename "B-device session end SRP" OTG FSM input
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Rename "B-device session end SRP" OTG FSM input

In accordance with OTG and EH supplement, the correct name
of the FSM input is b_ssend_srp.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 68041785d0c69884c4adb3bcab48f92ac3e75629)

10 years agousb: phy: Rename OTG FSM informative variables
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Rename OTG FSM informative variables

Mark informative variables with suffix '_inf' to distinguish
them from other non-informative variables with the same name.
If such non-informative varialbes were missed, they are created.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit cff4dab4cb95d394e9fd73f668326dac06e57b10)

10 years agousb: phy: Add and use missed OTG FSM timers
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Add and use missed OTG FSM timers

a_bidl_adis_tmr and a_wait_vfall_tmr OTG timers missed in
current FSM implementation. This patch adds and makes use
of the timers as speicfied in OTG and EH supplement to USB2.0.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 3294908bc0f178bfd67971fdb4432f3d4e50921e)

10 years agousb: phy: Fix OTG FSM timer handling
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Fix OTG FSM timer handling

Get rid of using OTG driver specific timers by passing timer
type to corresponding callbacks.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit f6de27eed372f41646b7bd95d6903923f5308517)

10 years agousb: phy: Add and use missed helper functions
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Add and use missed helper functions

This patch implements missed helper functions for start_gadget() and
start_host() OTG FSM callbacks.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 425d710172cee47ed5e18eefd3308d88643de76d)

10 years agousb: phy: Check OTG FSM callback existance in helper functions
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Check OTG FSM callback existance in helper functions

Existence of callback must be checked to avoid NULL pointer
dereferncing.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit 737cc66eac350d674c72a3f903541644098ec47e)

10 years agousb: phy: Pass OTG FSM pointer to callback functions
Anton Tikhomirov [Thu, 3 Oct 2013 03:42:04 +0000 (12:42 +0900)]
usb: phy: Pass OTG FSM pointer to callback functions

struct otg_fsm may be embedded to device's context structure.
The callbacks may require pointer to struct otg_fsm to obtain
necessary data for its operation (example: regulator reference
for drv_vbus()).

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry-picked from commit da8cc16724da2965c94ca15e1377cb9939776dda)

10 years agoUSB: phy: remove custom DBG macro
Greg Kroah-Hartman [Fri, 28 Jun 2013 18:32:55 +0000 (11:32 -0700)]
USB: phy: remove custom DBG macro

Use the in-kernel pr_debug() calls instead of trying to roll your own
DBG macro.  This means the dynamic debugging calls now work here, and
there is no dependency on CONFIG_USB_DEBUG for the phy code anymore.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry-picked from commit 523e531ea694eadf2957ee207bb4e0681e837057)

10 years agoARM: dts: imx6sl-evk: Keep VGEN1 regulator always enabled
Fabio Estevam [Wed, 19 Feb 2014 11:13:48 +0000 (08:13 -0300)]
ARM: dts: imx6sl-evk: Keep VGEN1 regulator always enabled

On imx6sl-evk board the VGEN1 regulator powers up the NVCC_1P2V domain of the
imx6sl SoC, so we need to keep it always powered.

According to imx6sl datasheet the GPIO block has three supplies:
NVCC33_IO, NVCC18_IO and NVCC_1P2V and it states that:
"All digital I/O supplies (NVCC_xxxx) must be powered under normal conditions
whether the associated I/O pins are in use or not"

This problem has been observed by the fact that a GPIO connected to an LED could
not work when the PMIC driver was enabled.

Keeping VGEN1 regulator always enabled fixes the problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
(cherry picked from commit d2c3936ebe88ce3cc188d01be0c684884e396293)

10 years agoENGR00308637 net: fec: fix NULL pointer causing kernel hang
Fugang Duan [Tue, 15 Apr 2014 09:12:17 +0000 (17:12 +0800)]
ENGR00308637 net: fec: fix NULL pointer causing kernel hang

Do video mmVector test with below script, kernel will hang after
run about 50 cases.

Script:
mount -o nolock,tcp -t nfs 10.192.224.45:/streams /mnt/streams/
./auto_test.sh -l video_h264_d1.list -AV -n my

Log:
Unable to handle kernel NULL pointer dereference at virtual address 000000a4
pgd = a9c84000
[000000a4] *pgd=a9555831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in: ov5642_camera ov5640_camera evbug
CPU: 0 PID: 16119 Comm: gplay-1.0 Not tainted 3.10.17-internal+g15a353d #1
task: a96183c0 ti: a9de4000 task.ti: a9de4000
PC is at fec_new_rxbdp.isra.28+0x8/0xd8
LR is at fec_enet_rx_napi+0x4b8/0x9a8
pc : [<8039fdf0>]    lr : [<803a0378>]    psr: 60060113
sp : a9de5d30  ip : 00000030  fp : 00000000
r10: a82aa800  r9 : 00000002  r8 : 000001fc
r7 : a82ab000  r6 : 00000000  r5 : ac060fe4  r4 : ac060fe0
r3 : a82ab1fc  r2 : 00000000  r1 : ac060fe4  r0 : a82aa800
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c53c7d  Table: a9c8404a  DAC: 00000015
Process gplay-1.0 (pid: 16119, stack limit = 0xa9de4238)
Stack: (0xa9de5d30 to 0xa9de6000)
5d20:                                     ac060fe0 00000800 00000000 803a0378
5d40: 00000000 a8009240 a8009290 80c6f440 c0802100 a82aa800 a94b1c00 000005ee
5d60: 00000040 00000000 a8ccf480 ac060fe0 a82aacc0 80c95654 80c6edf0 a82aad08
5d80: 00000000 00000001 a82aae14 a82aad98 a9de5dec 8000dca0 a9de4000 a9510240
5da0: a9de5db4 00000001 a82aad98 00000040 0000012c 81537200 0002a165 81537208
5dc0: 80c640c0 8050e878 00000000 80cb5fe5 0002a163 00000001 0000000c 80c64090
5de0: 80c64080 a9de4000 00000003 0000000c 00000100 8002d538 00000096 a800e240
5e00: 80cb5f0e 80c5e7a0 00000000 0000000a 80cf8940 80c640c0 0002a164 a9de4038
5e20: 80c72324 00404000 7eb2b72c 60060193 00000096 00000000 c0802100 a9510240
5e40: a96183c0 00000000 7eb2b72c 8002d6ac a9de4018 8002d948 80c5eef0 8000e94c
5e60: c080210c 80c6a904 a9de5e88 80008558 8008af14 800bfc4c 00060013 ffffffff
5e80: a9de5ebc 8000dc80 00000000 00000000 0000009a 00000000 0000009a 00000000
5ea0: 00080000 a9de5f80 a9510240 a96183c0 00000000 7eb2b72c 00000002 a9de5ed0
5ec0: 8008af14 800bfc4c 00060013 ffffffff 0000009a 00000000 6c41b000 00080000
5ee0: 00000001 a9510240 00000000 00000000 00000000 a96183c0 00000000 00000000
5f00: 0000009a 00000000 00000000 00000000 00080000 00000000 00080000 00000000
5f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5f40: 0002a164 a9510240 6c41b000 a9de5f80 6c41b000 00000001 00080000 800c0290
5f60: 00000002 800d874c 0000009a 00000000 a9510240 6c41b000 00000001 800c08f0
5f80: 0000009a 00000000 c080210c 76eccca8 00000073 76eccca8 00000003 8000e204
5fa0: a9de4000 8000e080 76eccca8 00000073 00000000 6c41b000 00080000 00000010
5fc0: 76eccca8 00000073 76eccca8 00000003 00000000 76eccca8 00000000 7eb2b72c
5fe0: 00000000 7eb2b500 76e59684 76e59694 80060010 00000000 00000000 00000000
[<8039fdf0>] (fec_new_rxbdp.isra.28+0x8/0xd8) from [<a8009240>] (0xa8009240)
Code: eb05b6e9 eafffff1 e92d4070 e1a05001 (e59230a4)
---[ end trace 4362657744775d24 ]---
Kernel panic - not syncing: Fatal exception in interrupt

The issue is caused potential NULL pointer operation in some cases like late
collisions and memory allocate fail by __netdev_alloc_skb_ip_align(). The patch
is to avoid potential NULL pointer operation.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00308382-2 mcc: enable mcc a9 linux demo
Richard Zhu [Tue, 15 Apr 2014 06:33:47 +0000 (14:33 +0800)]
ENGR00308382-2 mcc: enable mcc a9 linux demo

enable mcc a9 linux demo on imx6sx.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00308382-1 mcc: add a9 linux mcc_demo driver
Richard Zhu [Fri, 11 Apr 2014 07:13:58 +0000 (15:13 +0800)]
ENGR00308382-1 mcc: add a9 linux mcc_demo driver

- based on sema4 driver, mcc stack, add the mcc_demo driver
by sysfs.
  - mcc pingpong demo
  - mcc can demo
NOTE:
- rdc should be disabled in m4 mqx side, otherwise, a9 linux would
fail to mount rootfs.
- add the m4 related clks at linux side, because that the m4's clks
would be turned off/on during linux boot up if they are not added
at linux clk definitions.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00308060-4 arm: add the mcc support
Richard Zhu [Fri, 11 Apr 2014 07:22:44 +0000 (15:22 +0800)]
ENGR00308060-4 arm: add the mcc support

enable imx6sx mcc support.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00308060-3 mcc: add sema4 driver required by mcc
Richard Zhu [Fri, 11 Apr 2014 07:11:14 +0000 (15:11 +0800)]
ENGR00308060-3 mcc: add sema4 driver required by mcc

- add linux sema4 driver, that mandatory required by mcc.
  - use volatile types in sema4 structure
  - align the port definiton a9 is 1, m4 is 2.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00308060-2 mcc: implementation mcc on imx6sx
Richard Zhu [Tue, 15 Apr 2014 06:23:42 +0000 (14:23 +0800)]
ENGR00308060-2 mcc: implementation mcc on imx6sx

- inherited mcc ver 001.002 from vibryd mqx release.
- use mu general int4 as the cpu2cpu int (num is 122 at a9 side).
- add linux wait_event/wake_up mechanism on the buffer management
of share memory
- replace wait_event_interruptible### by wait_event###, so the sleep
task wouldn't be waken up by reboot or CTRL+C signals.
- use the offset address to do the MQX_TO_VIRT and VIRT_TO_MQX
exchanges.
- regmap_bits_updat can't write 1 to clear the bit-set asr, use
regmap_read/write
- fix mu irq clear hang issue
only do the regmap once in the isr register func, and
replace the multi-regmap operations in the kinds of mx6sx mcc related
apis by one global imx_mu_reg.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00308060-1 mcc: implementation mcc common on imx6sx
Richard Zhu [Tue, 15 Apr 2014 06:21:48 +0000 (14:21 +0800)]
ENGR00308060-1 mcc: implementation mcc common on imx6sx

- inherited mcc ver 001.002 from vibryd mqx release.
- let lwevent related codes mqx specified.
- use the offset address to do the MQX_TO_VIRT and VIRT_TO_MQX
exchanges.
- add some modification in mcc common codes, since all the shm
access should be protected by sema4.
- double check the list head, and make the recv more robust.

Acked-by: Shawn Guo
Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00308478 ARM: dts: imx6sx-sdb: Add camera support via the camera adapter
Robby Cai [Tue, 15 Apr 2014 08:11:37 +0000 (16:11 +0800)]
ENGR00308478 ARM: dts: imx6sx-sdb: Add camera support via the camera adapter

Previously we support camera features via mx51 expansion board due to footprint
mirror issue on imx6sx sdb board. Now we switch to the adapter board
(sch700-28342) to support same features. And the support via mx51 expansion
board is deprecated.

The changes include
- Change the PINs setting for power and reset signal.
- Add status flag to avoid the conflict use of LCD1_RESET pin by LCDIF1/CSI.
  For LCDIF1, it's used as LCD_PWR_EN, for CSI/camera, as RESET pin.

Signed-off-by: Robby Cai <r63905@freescale.com>
10 years agoENGR00308456-1 gpu:viante 5.0.11 kernel part integration
Loren Huang [Tue, 15 Apr 2014 08:49:16 +0000 (16:49 +0800)]
ENGR00308456-1 gpu:viante 5.0.11 kernel part integration

Integrated 5.0.11 kernel part change.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00308399 mtd: fsl-quadspi: quit if the M4 is using the quadspi
Huang Shijie [Tue, 15 Apr 2014 05:35:59 +0000 (13:35 +0800)]
ENGR00308399 mtd: fsl-quadspi: quit if the M4 is using the quadspi

Detect if the quadspi is used by the M4.
If the M4 does use it, we quit.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00308394 pwm: i.MX: Avoid sample fifo overflow for i.MX pwm version2
Liu Ying [Tue, 15 Apr 2014 05:45:31 +0000 (13:45 +0800)]
ENGR00308394 pwm: i.MX: Avoid sample fifo overflow for i.MX pwm version2

The i.MX pwm version2 is embedded in several i.MX SoCs, such
as i.MX27, i.MX51 and i.MX6SL.  There are four 16bit sample
fifos in this IP, each of which determines the duty period
of a PWM waveform in one full cycle.  The IP spec mentions
that we should not write a fourth sample because the fifo
will become full and trigger a fifo write error(FWE) which
will prevent the PWM from starting once it is enabled.  In
order to avoid any sample fifo overflow issue, this patch
does software reset to clear all the sample fifos in the
very beginning of the pwm configuration function.

The fifo overflow issue can be reproduced by the following
commands on the i.MX6SL evk platform, assuming we use pwm2
for the debug LED which is driven by the pin HSIC_STROBE
and the maximal brightness is 255.
echo 0   > /sys/class/leds/user/brightness
echo 0   > /sys/class/leds/user/brightness
echo 0   > /sys/class/leds/user/brightness
echo 0   > /sys/class/leds/user/brightness
echo 255 > /sys/class/leds/user/brightness
Here, FWE happens(PWMSR register reads 0x58) and the LED
can not be lighten.

Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoASoC: fsl_sai: Use FSL_SAI_xXR() and regmap_update_bits() to simplify code
Nicolin Chen [Fri, 11 Apr 2014 10:30:09 +0000 (18:30 +0800)]
ASoC: fsl_sai: Use FSL_SAI_xXR() and regmap_update_bits() to simplify code

By doing this, the driver can drop around 50 lines and become neater.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 2a266f8b2ae790454edb79cb8c707c9305e0307a)

10 years agoASoC: fsl_sai: Fix incorrect condition check in trigger()
Nicolin Chen [Fri, 11 Apr 2014 14:10:00 +0000 (22:10 +0800)]
ASoC: fsl_sai: Fix incorrect condition check in trigger()

Patch ASoC: fsl_sai: Fix buggy configurations in trigger() doesn't entirely
fix the condition: FRDE of the current substream direction is being cleared
while the code is still using the non-updated one.

Thus this patch fixes this issue by checking the opposite one's FRDE alone
since the current one's is absolutely disabled.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit f84526cfae46672308a361333c76b724384b61ee)

10 years agoENGR00308001 dma: imx-sdma: add support for sdma memory copy
Robin Gong [Fri, 23 Nov 2012 06:36:04 +0000 (14:36 +0800)]
ENGR00308001 dma: imx-sdma: add support for sdma memory copy

This patch use more common dma interface , including "device_prep_dma_memcpy" and
"device_prep_dma_sg". The way in v3.0.35 reuse "device_prep_slave_sg" and need call
twice to tell dest dma address in one memory copy(ENGR00233569). It looks tricky
something, so give up the original patch. In this patch,"device_prep_dma_memcpy"
support memory copy by buffer and "device_prep_dma_sg" support memory copy by scatter-list.
You can  get the example code from 'linux-test/module_test/mxc_sdma_memcopy_test.'

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00301095 gpu:gpu hang when dma memory is used up
Loren Huang [Thu, 27 Feb 2014 07:44:49 +0000 (15:44 +0800)]
ENGR00301095 gpu:gpu hang when dma memory is used up

When dma zone memory used up, gckOS_AllocateCMAMemoryFSL() will try to
free non paged memory cache and allocate again. Such operation will cause
 twice memory mutex request and cause gpu driver hang.

The solution is free the memory mutex at first before trying to free non
paged memory cache.

Date: Feb 27, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 79ed8edd23f990f6c1429154c2ee773c83bfd72e)

10 years agoENGR00307835-4 ASoC: fsl: implement ASRC P2P xrun handler
Shengjiu Wang [Thu, 10 Apr 2014 02:11:00 +0000 (10:11 +0800)]
ENGR00307835-4 ASoC: fsl: implement ASRC P2P xrun handler

When ASRC P2P is working, it will check the xrun status of cpu dai
in the back end bistream. then will do Whole route stop and restart.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00307835-3 ASoC: fsl: implement the ESAI xrun handler.
Shengjiu Wang [Mon, 14 Apr 2014 07:19:54 +0000 (15:19 +0800)]
ENGR00307835-3 ASoC: fsl: implement the ESAI xrun handler.

When esai xrun happened, there is possibility of channel swap. So ESAI
need to be reset.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00307835-2 ASoC: dmaengine: Add two function for dmaengine_pcm
Shengjiu Wang [Mon, 14 Apr 2014 06:58:05 +0000 (14:58 +0800)]
ENGR00307835-2 ASoC: dmaengine: Add two function for dmaengine_pcm

Add check_xrun and device_reset for dmaengine_pcm

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00307835-1 ASoC: fsl: refine esai driver for sync mode
Shengjiu Wang [Thu, 10 Apr 2014 06:50:15 +0000 (14:50 +0800)]
ENGR00307835-1 ASoC: fsl: refine esai driver for sync mode

1. PCRC and PRRC should be set after the setting of control register
according the RM. Then no need init TCCR and RCCR in init function.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00308066 [#1091]Use spinlock_irqsave instead of spinlock in gpu
Loren Huang [Fri, 11 Apr 2014 09:14:21 +0000 (17:14 +0800)]
ENGR00308066 [#1091]Use spinlock_irqsave instead of spinlock in gpu

Gpu kernel driver used spinlock in inerrupt context for debug
purpose. So when enabled debug mode in gpu kernel driver, it may
 cause gpu kernel driver deadlock.
Changed spinlock to spinlock_irqsave to resolve this issue.
Patch from vivante.

Date: Apr 11, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
10 years agoENGR00306783 video: mxsfb: Add a new 32bit RGB fb pix fmt for 18bit display
Liu Ying [Thu, 27 Mar 2014 09:20:56 +0000 (17:20 +0800)]
ENGR00306783 video: mxsfb: Add a new 32bit RGB fb pix fmt for 18bit display

This patch adds a new 32bit RGB framebuffer pixel format support for
18bit display.  The pixel format's components can be described by the
following table:
 -----------------------------
|        |  length  |  offset |
 -----------------------------
|  red   |   8bit   |  16bit  |
 -----------------------------
| green  |   8bit   |  8bit   |
 -----------------------------
|  blue  |   8bit   |    0    |
 -----------------------------
| transp |    0     |   N/A   |
 -----------------------------

Userland should specify each component's length and offset to use
this pixel format, otherwise the default 32bit pixel format which
can be described by the following table will be active:
 -----------------------------
|        |  length  |  offset |
 -----------------------------
|  red   |   6bit   |  16bit  |
 -----------------------------
| green  |   6bit   |  8bit   |
 -----------------------------
|  blue  |   6bit   |    0    |
 -----------------------------
| transp |    0     |   N/A   |
 -----------------------------

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305366-04 net: fec: optimize imx6sx enet performance
Fugang Duan [Tue, 1 Apr 2014 05:55:09 +0000 (13:55 +0800)]
ENGR00305366-04 net: fec: optimize imx6sx enet performance

The patch do below changes for the enet performance improvement:
- Enable GRO in default. The feature can be accessed by ethtool.
- In enet napi callback, check interrupt to call tx/rx clean ring
  function.
- For high rate register access, use __raw_writel/__raw_readl instead
  of writel/readl. When write trigger register for tx/rx, add dmb()
  to make sure the order.

After the optimizition, and below condition:
- cpu frequency is 996Mhz, cpufreq goverment is performance.
- Connect to FPGA board.

The imx6sx enet tcp performance result:
TX: 867Mbps, cpu loading near to 100%.
RX: 940Mbps, cpu loading near to 92%.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00305366-03 net: fec: remove memory copy for rx path
Fugang Duan [Mon, 31 Mar 2014 02:30:12 +0000 (10:30 +0800)]
ENGR00305366-03 net: fec: remove memory copy for rx path

Re-allocate skb instead of memory copy skb in rx path to improve
imx6sx enet rx performance. After the patch, rx performance can
reach at 940Mbps (cpu loading is near to 100%) with below interrupt
coalescing setting and cpu frequency is 996Mhz.
enet reg 0x021880F0=C4000B00
enet reg 0x02188100=C5000900

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00305366-02 net: fec: disable txf interrupt in napi
Fugang Duan [Wed, 26 Mar 2014 09:40:12 +0000 (17:40 +0800)]
ENGR00305366-02 net: fec: disable txf interrupt in napi

Disable txf interrupt in napi, which can take about 20Mbps
improvement for imx6sx enet tx bandwidth.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00305366-01 net: fec: disable netfilter in default
Fugang Duan [Mon, 31 Mar 2014 05:46:23 +0000 (13:46 +0800)]
ENGR00305366-01 net: fec: disable netfilter in default

Disable netfilter feature for enet can increase 30Mbps bandwidth
for imx6sx enet tx path.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00307848 MXC IPUv3 fb: Fix MXCFB_CSC_UPDATE ioctl()
Julien Olivain [Thu, 10 Apr 2014 09:18:50 +0000 (11:18 +0200)]
ENGR00307848 MXC IPUv3 fb: Fix MXCFB_CSC_UPDATE ioctl()

Add a missing 'break' in the MXCFB_CSC_UPDATE case in mxcfb_ioctl(),
to prevent it to always return EINVAL (Invalid argument).

Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Julien Olivain <julien.olivain@freescale.com>
10 years agoENGR00307635-8 ARM: imx6sx: Add SAI support to each board level dts
Nicolin Chen [Tue, 8 Apr 2014 11:14:14 +0000 (19:14 +0800)]
ENGR00307635-8 ARM: imx6sx: Add SAI support to each board level dts

SAI has pin conflicts with other moudles on all current boards of Solo X
and two sdma event conflicts with UART5.

Thus this patch adds new dtbs for SAI cases that occupy the pins and the
event IDs of SDMA.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-7 ARM: imx6sx: Update SAI DT bindings and its pinctrl groups
Nicolin Chen [Tue, 8 Apr 2014 11:09:29 +0000 (19:09 +0800)]
ENGR00307635-7 ARM: imx6sx: Update SAI DT bindings and its pinctrl groups

Since we adds clock controls to SAI driver, we should also update its DTB
to support it.

This patch also appends two essential pinctrl groups to the DTB.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-6 ASoC: fsl: Enable SAI for imx-sgtl5000 and imx-wm8962
Nicolin Chen [Wed, 9 Apr 2014 09:12:12 +0000 (17:12 +0800)]
ENGR00307635-6 ASoC: fsl: Enable SAI for imx-sgtl5000 and imx-wm8962

Since we are able to link SAI and sgtl5000 and wm8962, we should update
the Kconfig to make it build-in if enabling their machine drivers.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-5 ASoC: imx-wm8962: Add non-SSI cpu dai support
Nicolin Chen [Tue, 8 Apr 2014 11:13:15 +0000 (19:13 +0800)]
ENGR00307635-5 ASoC: imx-wm8962: Add non-SSI cpu dai support

The current imx-wm8962 machine driver is designed for SSI as CPU DAI only
while as its name we should make the driver more generic to any other CPU
DAI on i.MX serires -- ESAI, SAI for example.

So this patch makes the driver more general so as to support those non-SSI
cases.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-4 ARM: imx6sx: Use 24.576MHz for both SSI and SAI clocks
Nicolin Chen [Tue, 8 Apr 2014 11:10:25 +0000 (19:10 +0800)]
ENGR00307635-4 ARM: imx6sx: Use 24.576MHz for both SSI and SAI clocks

SAI derives its mclk from SSI_CLK, so this patch sets a default value for them.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-3 ARM: imx6sx: Update sdma DT binding
Nicolin Chen [Tue, 8 Apr 2014 10:39:52 +0000 (18:39 +0800)]
ENGR00307635-3 ARM: imx6sx: Update sdma DT binding

Since we've created a new compatible for imx6sx-sdma, we here update its dtsi
accordingly.

Acked-by: Robin Gong <b38343@freescale.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-2 dmaengine: imx-sdma: Add imx6sx platform support
Nicolin Chen [Tue, 8 Apr 2014 10:34:56 +0000 (18:34 +0800)]
ENGR00307635-2 dmaengine: imx-sdma: Add imx6sx platform support

The new Solo X has more requirements for SDMA events. So it creates a event mux
to remap most of event numbers in GPR (General Purpose Register). If we want to
use SDMA support for those module who do not get the even number as default, we
need to configure GPR first.

Thus this patch adds this support of GPR event remapping configuration to the
SDMA driver.

Acked-by: Robin Gong <b38343@freescale.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00307635-1 ASoC: fsl_sai: Specify buffer size for SAI
Nicolin Chen [Tue, 8 Apr 2014 10:46:10 +0000 (18:46 +0800)]
ENGR00307635-1 ASoC: fsl_sai: Specify buffer size for SAI

Add a new micro for SAI so as to make further define flexible.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoASoC: fsl_sai: Add clock controls for SAI
Nicolin Chen [Thu, 10 Apr 2014 15:26:15 +0000 (23:26 +0800)]
ASoC: fsl_sai: Add clock controls for SAI

The SAI mainly has the following clocks:
  bus clock
    control and configure registers and to generate synchronous
    interrupts and DMA requests.

  mclk1, mclk2, mclk3
    to generate the bit clock when the receiver or transmitter is
    configured for an internally generated bit clock.

So this patch adds these clocks and their clock controls to the driver.

[ To concern the old DTB cases, I've added a bit of extra code to make
  the driver compatible with them. And by marking clock NULL if failed
  to get, the clk_prepare() or clk_get_rate() would easily return 0
  so no further path should be broken. -- by Nicolin ]

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 17d1eb6628e70488c44c46003dcfe583696bb7b7)

10 years agopwm-backlight: Fix brightness adjustment
Thierry Reding [Fri, 18 Oct 2013 08:46:24 +0000 (10:46 +0200)]
pwm-backlight: Fix brightness adjustment

Split adjustment of the brightness (by changing the PWM duty cycle) from
the power on sequence. This fixes an issue where the brightness can no
longer be updated once the backlight has been enabled.

Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit e4bfeda96872bfe6015cd360008b77cd3b981b2b)

Conflicts:

drivers/video/backlight/pwm_bl.c

10 years agopwm-backlight: Allow for non-increasing brightness levels
Mike Dunn [Sun, 22 Sep 2013 16:59:56 +0000 (09:59 -0700)]
pwm-backlight: Allow for non-increasing brightness levels

Currently the driver assumes that the values specified in the
brightness-levels device tree property increase as they are parsed from
left to right.  But boards that invert the signal between the PWM output
and the backlight will need to specify decreasing brightness-levels.
This patch removes the assumption that the last element of the array is
the maximum value, and instead searches the array for the maximum value
and uses that in the duty cycle calculation.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 8f43e18e2769b3b28383903d501b4da29e388aad)

Conflicts:

drivers/video/backlight/pwm_bl.c

10 years agopwm-backlight: Use new enable_gpio field
Thierry Reding [Fri, 30 Aug 2013 10:32:18 +0000 (12:32 +0200)]
pwm-backlight: Use new enable_gpio field

Make use of the new enable_gpio field and allow it to be set from DT as
well. Now that all legacy users of platform data have been converted to
initialize this field to an invalid value, it is safe to use the field
from the driver.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 8265b2e4e62632b01f998095d1bbda4d281629fe)

10 years agopwm-backlight: Add optional enable GPIO
Thierry Reding [Fri, 30 Aug 2013 09:51:22 +0000 (11:51 +0200)]
pwm-backlight: Add optional enable GPIO

To support a wider variety of backlight setups, introduce an optional
enable GPIO. Legacy users of the platform data already have a means of
supporting GPIOs by using the .init(), .exit() and .notify() hooks. DT
users however cannot use those, so an alternative method is required.

In order to ease the introduction of the optional enable GPIO, make it
available in the platform data first, so that existing users can be
converted. Once that has happened a second patch will add code to make
use of it in the driver.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 2b9b1620349e325f184c68cddf3b484499c163c0)

10 years agopwm-backlight: Track enable state
Thierry Reding [Wed, 2 Oct 2013 16:01:02 +0000 (18:01 +0200)]
pwm-backlight: Track enable state

Follow up patches will add support for more complex means of powering
the backlight on and off such as using a regulator. To prevent calls to
the regulator API from becoming unbalanced, keep track of the enabled
state internally.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 97c38437115aa0c3fb2d50c488814b503ba529e0)

10 years agopwm-backlight: Refactor backlight power on/off
Thierry Reding [Mon, 7 Oct 2013 09:32:02 +0000 (11:32 +0200)]
pwm-backlight: Refactor backlight power on/off

In preparation for adding an optional regulator and enable GPIO to the
driver, split the power on and power off sequences into separate
functions to reduce code duplication at the multiple call sites.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 62b744a87c1170b339f993aa3cfb22465974816a)

10 years agopwm-backlight: Improve readability
Thierry Reding [Mon, 7 Oct 2013 09:30:50 +0000 (11:30 +0200)]
pwm-backlight: Improve readability

Add more blank lines to increase readability. While at it, remove a
trailing blank line at the end of the file.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 668e63c6701d486c68b49ffffc0e5b7de1a2e95c)

10 years agoENGR00307592 ASoC: fsl_asrc: Add delay after enabling ASRC p2p
Nicolin Chen [Wed, 9 Apr 2014 03:24:51 +0000 (11:24 +0800)]
ENGR00307592 ASoC: fsl_asrc: Add delay after enabling ASRC p2p

When using ASRC p2p as a for-end with other back-end modules like ESAI,
it'd be safer to add 1ms delay, less might be futile for extreme cases,
after enabling ASRC so as to keep ASRC output FIFO with enough data to
content the DMA burstsize of back-ends and accordingly prevent underrun
that might happen to them.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoASoC: fsl_sai: Fix Bit Clock Polarity configurations
Nicolin Chen [Fri, 4 Apr 2014 07:09:47 +0000 (15:09 +0800)]
ASoC: fsl_sai: Fix Bit Clock Polarity configurations

The BCP bit in TCR4/RCR4 register rules as followings:
  0 Bit clock is active high with drive outputs on rising edge
    and sample inputs on falling edge.
  1 Bit clock is active low with drive outputs on falling edge
    and sample inputs on rising edge.

For all formats currently supported in the fsl_sai driver, they're exactly
sending data on the falling edge and sampling on the rising edge.

However, the driver clears this BCP bit for all of them which results click
noise when working with SGTL5000 and big noise with WM8962.

Thus this patch corrects the BCP settings for all the formats here to fix
the nosie issue.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit ef33bc3217c7aa9868f497c4f797cc50ad3ce357)

10 years agoENGR00306955-2 ARM:dts:im6x: Add device tree for IRAM used by low power code.
Ranjani Vaidyanathan [Thu, 3 Apr 2014 19:14:10 +0000 (14:14 -0500)]
ENGR00306955-2 ARM:dts:im6x: Add device tree for IRAM used by low power code.

Ensure that fsl,lpm-sram is only set for the memory that is
used by low power code in the dts files.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00306955-1 ARM:imx6x Ensure that both IRAM and OCRAM_S can be mapped in the IRAM...
Ranjani Vaidyanathan [Thu, 3 Apr 2014 19:02:21 +0000 (14:02 -0500)]
ENGR00306955-1 ARM:imx6x Ensure that both IRAM and OCRAM_S can be mapped in the IRAM page table

To prevent a page table walk in the DDR, its required that the low
power code use a minimal set of page tables that are stored in IRAM.
This IRAM page table needs to have a known virtual address so the
mapping needs to be created at the beginning of boot using iotable_init().
This patch fixes the following issues:
1. Ensure that OCRAM_S, IRAM, AIPS1 and AIPS2 can all be mapped by the
IMX_IO_P2V macro.
2. Ensure Section mapping is used for the required addresses in the IRAM
page table.
3. Obtain the address of the IRAM/OCRAM_S to be used by low power code
from the device tree. Since the device tree is not setup early in the boot,
use the flat device tree apis to get the address.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00306857 pulseaudio5.0 mute Headphone volume when Headphone plugged
Shengjiu Wang [Thu, 3 Apr 2014 08:05:40 +0000 (16:05 +0800)]
ENGR00306857 pulseaudio5.0 mute Headphone volume when Headphone plugged

Pulseaudio will detect the Headphone Jack, then swith to Headphone.
So register new Jack for Headphone, the iface=CARD.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00307017: input: keyboard: snvs_pwrkey: fix system crash sometimes during boot
Robin Gong [Thu, 3 Apr 2014 09:10:24 +0000 (17:10 +0800)]
ENGR00307017: input: keyboard: snvs_pwrkey: fix system crash sometimes during boot

If there is one ONOFF power key interrupt pending before RESET key pushed. system will
crash as below in the next boot cycle, because the pending interrupt will be serviced
after devm_request_irq while the driver probe has not finished and the drvdata is NULL.
So clear the meaningless irq status in the probe.

ousedev: PS/2 mouse device common for all mice
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.17-01631-g6b7b681-dirty #343
task: a806c000 ti: a806e000 task.ti: a806e000
PC is at imx_snvs_pwrkey_interrupt+0x10/0x4c
LR is at imx_snvs_pwrkey_interrupt+0xc/0x4c
pc : [<803f0594>]    lr : [<803f0590>]    psr: a0000193
sp : a806fd10  ip : fffffffa  fp : 00000001
r10: 80cb630e  r9 : a8006b40  r8 : 00000024
r7 : 00000000  r6 : 00000000  r5 : a8006b90  r4 : a83b5340
r3 : 803f0584  r2 : a806fd48  r1 : a80ad000  r0 : 00000000
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 8000404a  DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xa806e238)
Stack: (0xa806fd10 to 0xa8070000)
fd00:                                     a83b5340 a8006b90 00000000 8007363c
fd20: 80cb6000 80090604 00000001 a8006b40 a8006b90 a83b5340 c0802100 60000113
fd40: a8006b70 00000000 00000000 800737a0 a8006b40 a8006b90 00000000 8007646c
fd60: 800763e8 00000024 00000024 80072e04 80c5fef0 8000e948 c080210c 80c6a904
fd80: a806fda0 80008558 80074b94 8063c75c 60000113 ffffffff a806fdd4 8000dc80
fda0: a8006b90 60000113 a806fdb8 00000007 a8006b40 a83b5340 a8006b90 00000024
fdc0: 60000113 a8006b70 00000000 00000000 000000ff a806fde8 80074b94 8063c75c
fde0: 60000113 ffffffff 00000000 80074b94 80c6f688 020cc000 00000000 00000001
fe00: a83b5340 a8006b40 803f0584 00000004 00000024 a80ad000 00000000 80074f50
fe20: a83b5310 a80ad000 00000024 803f0584 00000000 a80ad010 80c53804 80076a40
fe40: a80ab880 a80ad000 a836e990 a836e990 a80ad010 8152696c a80ad000 80cb6480
fe60: 80c44f90 803f0774 00000004 a80ab880 a80ad000 00000000 80d0ba0c a80ad010
fe80: 00000000 80c9a1f0 80cb6480 803099c0 803099a8 8030876c 00000000 a80ad010
fea0: 80c9a1f0 a80ad044 00000000 80308958 00000000 80c9a1f0 803088cc 80306c88
fec0: a804055c a80ac1b4 80c9a1f0 a836e680 80c89a30 80307f30 80b82af4 80c9a1f0
fee0: 00000006 80c9a1f0 00000006 80cb6480 80cb6480 80308f34 80c5e688 00000006
ff00: 80cb6480 80cb6480 80cb6480 80008704 000000f2 80041d60 80c537dc a806e010
ff20: 80b81e6c 80be5e54 00000006 00000006 800415cc 80041624 00000000 80c5e688
ff40: 00000006 80cb6480 80cb6480 80c194dc 000000f2 80c53804 80c537f8 80c19be0
ff60: 00000006 00000006 80c194dc 900ff07c ab86ff79 08012008 a806ff9c 00000000
ff80: 80631050 00000000 00000000 00000000 00000000 00000000 00000000 80631058
ffa0: 00000000 00000000 80631050 8000e118 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 fdfe5bba dbfe26ba
[<803f0594>] (imx_snvs_pwrkey_interrupt+0x10/0x4c) from [<8007363c>] (handle_irq_event_percpu+0x54/0x17c)
[<8007363c>] (handle_irq_event_percpu+0x54/0x17c) from [<800737a0>] (handle_irq_event+0x3c/0x5c)
[<800737a0>] (handle_irq_event+0x3c/0x5c) from [<8007646c>] (handle_fasteoi_irq+0x84/0x14c)
[<8007646c>] (handle_fasteoi_irq+0x84/0x14c) from [<80072e04>] (generic_handle_irq+0x2c/0x3c)
[<80072e04>] (generic_handle_irq+0x2c/0x3c) from [<8000e948>] (handle_IRQ+0x40/0x90)
[<8000e948>] (handle_IRQ+0x40/0x90) from [<80008558>] (gic_handle_irq+0x2c/0x5c)
[<80008558>] (gic_handle_irq+0x2c/0x5c) from [<8000dc80>] (__irq_svc+0x40/0x70)
Exception stack(0xa806fda0 to 0xa806fde8)
fda0: a8006b90 60000113 a806fdb8 00000007 a8006b40 a83b5340 a8006b90 00000024
fdc0: 60000113 a8006b70 00000000 00000000 000000ff a806fde8 80074b94 8063c75c
fde0: 60000113 ffffffff
[<8000dc80>] (__irq_svc+0x40/0x70) from [<8063c75c>] (_raw_spin_unlock_irqrestore+0x20/0x48)
[<8063c75c>] (_raw_spin_unlock_irqrestore+0x20/0x48) from [<80074b94>] (__setup_irq+0x1b4/0x440)
[<80074b94>] (__setup_irq+0x1b4/0x440) from [<80074f50>] (request_threaded_irq+0xa8/0x128)
[<80074f50>] (request_threaded_irq+0xa8/0x128) from [<80076a40>] (devm_request_threaded_irq+0x58/0x9c)
[<80076a40>] (devm_request_threaded_irq+0x58/0x9c) from [<803f0774>] (imx_snvs_pwrkey_probe+0x118/0x250)
[<803f0774>] (imx_snvs_pwrkey_probe+0x118/0x250) from [<803099c0>] (platform_drv_probe+0x18/0x1c)
[<803099c0>] (platform_drv_probe+0x18/0x1c) from [<8030876c>] (driver_probe_device+0x10c/0x228)
[<8030876c>] (driver_probe_device+0x10c/0x228) from [<80308958>] (__driver_attach+0x8c/0x90)
[<80308958>] (__driver_attach+0x8c/0x90) from [<80306c88>] (bus_for_each_dev+0x60/0x94)
[<80306c88>] (bus_for_each_dev+0x60/0x94) from [<80307f30>] (bus_add_driver+0x1c0/0x24c)
[<80307f30>] (bus_add_driver+0x1c0/0x24c) from [<80308f34>] (driver_register+0x78/0x140)
[<80308f34>] (driver_register+0x78/0x140) from [<80008704>] (do_one_initcall+0x108/0x158)
[<80008704>] (do_one_initcall+0x108/0x158) from [<80c19be0>] (kernel_init_freeable+0x138/0x1d8)
[<80c19be0>] (kernel_init_freeable+0x138/0x1d8) from [<80631058>] (kernel_init+0x8/0x158)
[<80631058>] (kernel_init+0x8/0x158) from [<8000e118>] (ret_from_fork+0x14/0x3c)
Code: e92d4070 e2810010 ebfc5ebe e1a06000 (e5904000)
---[ end trace bd5e3234432334c1 ]---
Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00306832 mxsfb: xres_virtual should not larger than xres
Sandor Yu [Thu, 3 Apr 2014 07:46:59 +0000 (15:46 +0800)]
ENGR00306832 mxsfb: xres_virtual should not larger than xres

eLCDIF did not support stride buffer, check the xres_virtual
in function mxfb_check_var, return false
if the value larger than xres.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00306875-2 video: mxc_hdmi: Set hdmi cable state a bit earilier
Nicolin Chen [Thu, 3 Apr 2014 12:36:55 +0000 (20:36 +0800)]
ENGR00306875-2 video: mxc_hdmi: Set hdmi cable state a bit earilier

During hdmi hotplug test, there's a possibility that X-server unblanks
the frame buffer while HDMI-audio just gets the signal to start playback.
Then audio would get an unblanked state right before the playback and
bypassed the DMA enabling code. So this issue is caused by the race
between unblank and set_cable_state().

This patch sets the hdmi cable state a bit earilier so as to let audio
play first. If unblank happens later, the hdmi core and hdmi audio would
be robust enough to handle that case as long as it's not racing with the
other parts.

Acked-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 2917061c498a97e3c3b99ac616b6f3202f8a0499)

10 years agoENGR00306875-1 Revert "ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer"
Nicolin Chen [Thu, 3 Apr 2014 07:52:14 +0000 (15:52 +0800)]
ENGR00306875-1 Revert "ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer"

After change the pointer, ALSA lib would re-copy the initial data to
DMA buffer because the pointer is pointing the zero position at the
beginning, which results an audiable duplicated playback at the first
eight periods.

Even though dropping this patch would cause pointer being incorrectly
estimated. But to maintain the sanity of basic playback, we revert
the previous patch.

This reverts commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit cb6cd68b00fbb52852101ca2f3bc93ae45310b66)

10 years agoENGR00306653-3: ARM: imx_v7_defconfig enable snvs_pwrkey driver by default
Robin Gong [Wed, 2 Apr 2014 09:00:17 +0000 (17:00 +0800)]
ENGR00306653-3: ARM: imx_v7_defconfig enable snvs_pwrkey driver by default

enable snvs_pwrkey driver by default

Signed-off-by: Robin Gong <b38343@freescale.com>