]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agousb: chipidea: msm: Add device tree support
Ivan T. Ivanov [Sun, 4 May 2014 01:24:41 +0000 (09:24 +0800)]
usb: chipidea: msm: Add device tree support

Allows controller to be specified via device tree.
Pass PHY phandle specified in DT to core driver.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agochipidea: usbmisc_imx: Allow USB OTG to work on mx51
Fabio Estevam [Sun, 4 May 2014 01:24:39 +0000 (09:24 +0800)]
chipidea: usbmisc_imx: Allow USB OTG to work on mx51

The field PLLDIVVALUE of register PHY_CTRL_1 selects the reference clock source
for the PHY:
00 = sysclock uses 19.2 MHz
01 = sysclock uses 24 MHz
10 = sysclock uses 26 MHz
11 = sysclock uses 27 MHz

The reset value for this field is 10 according to the reference manual, and
even though this reset value works for mx53, it does not work for mx51.

So instead of relying on the reset value for the PLLDIVVALUE field, explicitly
set it to 01 so that a 24MHz clock can be selected for the PHY and allowing both
mx51 and mx53 to have USB OTG port functional.

Succesfully tested 'g_ether' on a imx51-babbage and on a imx53-qsb boards.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: common: rename phy-fsm-usb.c to usb-otg-fsm.c
Peter Chen [Tue, 29 Apr 2014 00:35:59 +0000 (08:35 +0800)]
usb: common: rename phy-fsm-usb.c to usb-otg-fsm.c

Since usb otg fsm implementation is not related to usb phy.
We move it from usb/phy/ to usb/common/, and rename it to
reflect its real meaning.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: move usb/usb-common.c to usb/common/usb-common.c
Peter Chen [Tue, 29 Apr 2014 00:35:58 +0000 (08:35 +0800)]
usb: move usb/usb-common.c to usb/common/usb-common.c

Since we will have more usb-common things, and it will let
usb-common.c be larger and larger, we create a folder named usb/common
for all usb common things.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: update gadget states according to ch9
Peter Chen [Sun, 4 May 2014 01:24:44 +0000 (09:24 +0800)]
usb: chipidea: udc: update gadget states according to ch9

Update device states according to ch9 in USB 2.0 specification

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDoc: usb: chipidea: need to build both kernel Image and modules
Peter Chen [Sun, 4 May 2014 01:24:43 +0000 (09:24 +0800)]
Doc: usb: chipidea: need to build both kernel Image and modules

When tried to enable OTG FSM, we need to rebuild both kernel Image
and modules, since there are some codes at gadget modules which are
controlled by related configurations.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: using one inline function to cover queue work operations
Peter Chen [Fri, 23 May 2014 00:12:49 +0000 (08:12 +0800)]
usb: chipidea: using one inline function to cover queue work operations

The otg queue work include operations: one is disable interrupt,
another one is call kernel queue work API. Many codes do this
operation, using one inline function to instead of them.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: delete useless code
Peter Chen [Fri, 23 May 2014 00:12:48 +0000 (08:12 +0800)]
usb: chipidea: udc: delete useless code

Delete useless code

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: update TODO list
Peter Chen [Fri, 23 May 2014 00:12:47 +0000 (08:12 +0800)]
usb: chipidea: update TODO list

Update TODO list

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: gadget: configfs: fix typo
Peter Chen [Sun, 4 May 2014 23:39:34 +0000 (07:39 +0800)]
usb: gadget: configfs: fix typo

%s/atleast/at least

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: udc-core: set gadget state as not attached after unloading module
Peter Chen [Tue, 29 Apr 2014 05:26:29 +0000 (13:26 +0800)]
usb: udc-core: set gadget state as not attached after unloading module

Set gadget state as "not attached" after unloading gadget module, or
its state will be unchanged after we unload gadget module.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: gadget: set gadget state as configured
Peter Chen [Tue, 29 Apr 2014 05:26:28 +0000 (13:26 +0800)]
usb: gadget: set gadget state as configured

Set gadget device state as configurated after set configuration
has finished.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup
Li Jun [Tue, 15 Jul 2014 14:07:40 +0000 (22:07 +0800)]
usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup

This patch try to dequeue the cdev->req to guarantee the request is not queued
before free it.

Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agoDocumentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP
Li Jun [Wed, 23 Apr 2014 07:56:54 +0000 (15:56 +0800)]
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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDocumentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP
Li Jun [Wed, 23 Apr 2014 07:56:53 +0000 (15:56 +0800)]
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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: debug: add debug file for OTG variables
Li Jun [Wed, 23 Apr 2014 07:56:52 +0000 (15:56 +0800)]
usb: chipidea: debug: add debug file for OTG variables

This patch adds a debug file for OTG vairables show.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add sys inputs for OTG fsm input
Li Jun [Wed, 23 Apr 2014 07:56:51 +0000 (15:56 +0800)]
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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: OTG HNP and SRP fsm implementation
Li Jun [Wed, 23 Apr 2014 07:56:50 +0000 (15:56 +0800)]
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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: OTG fsm timers initialization
Li Jun [Wed, 23 Apr 2014 07:56:49 +0000 (15:56 +0800)]
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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add OTG fsm operation functions implementation
Li Jun [Wed, 23 Apr 2014 07:56:48 +0000 (15:56 +0800)]
usb: chipidea: add OTG fsm operation functions implementation

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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: driver update for OTG HNP
Li Jun [Wed, 23 Apr 2014 07:56:47 +0000 (15:56 +0800)]
usb: chipidea: udc: driver update for OTG HNP

Add b_hnp_enable request handling and enable gadget->is_otg

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: refine isr_tr_complete_handler
Peter Chen [Tue, 11 Mar 2014 05:47:37 +0000 (13:47 +0800)]
usb: chipidea: udc: refine isr_tr_complete_handler

Matthieu CASTET and Michael Grzeschik mentioned isr_tr_complete_handler
is a bit messy at below:
http://marc.info/?l=linux-usb&m=139047775001152&w=2

This commit creates a new function isr_setup_packet_handler to handle
setup packet, it makes isr_tr_complete_handler easy to read.

This is no functional change at this commit, tested with g_mass_storage
and g_ether.

Cc: Michael Grzeschik <mgr@pengutronix.de>
Cc: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: host: init otg port number
Li Jun [Wed, 23 Apr 2014 07:56:46 +0000 (15:56 +0800)]
usb: chipidea: host: init otg port number

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

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: host: vbus control change for OTG HNP
Li Jun [Wed, 23 Apr 2014 07:56:45 +0000 (15:56 +0800)]
usb: chipidea: host: vbus control change for OTG HNP

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

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: usb OTG fsm initialization.
Li Jun [Wed, 23 Apr 2014 07:56:44 +0000 (15:56 +0800)]
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: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: phy: otg-fsm: export symbol of otg_statemachine
Li Jun [Wed, 23 Apr 2014 07:56:43 +0000 (15:56 +0800)]
usb: phy: otg-fsm: export symbol of otg_statemachine

This patch exports symbol of otg_statemachine for kernel module
can use it.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: phy: fsm: update OTG HNP state transition
Li Jun [Thu, 13 Mar 2014 07:22:50 +0000 (15:22 +0800)]
usb: phy: fsm: update OTG HNP state transition

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"

- add a_wait_vrise to a_wait_vfall
- update condition from a_wait_vrise to a_wait_bcon

Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 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>
9 years agousb: chipidea: core: Add missing module owner field
Alexander Shiyan [Wed, 23 Apr 2014 07:56:42 +0000 (15:56 +0800)]
usb: chipidea: core: Add missing module owner field

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add proper delay for waiting correct PHY status
Peter Chen [Wed, 23 Apr 2014 07:56:41 +0000 (15:56 +0800)]
usb: chipidea: add proper delay for waiting correct PHY status

After the PHY has powered and initialized, it needs some delay
for controller to reflect PHY's status. Some status and values
for id, vbus, dp/dm are only stable after this delay. The current
code tries to clear id/vbus status without enough delay, it
causes the status are not cleared properly.

This patch add 2ms delay after phy has initialized, and clear the
unexpected status after that.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Tested-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: debug: add debug file for controller registers dump
Li Jun [Wed, 23 Apr 2014 07:56:40 +0000 (15:56 +0800)]
usb: chipidea: debug: add debug file for controller registers dump

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

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: export interrupt enable and status register read functions
Li Jun [Wed, 23 Apr 2014 07:56:39 +0000 (15:56 +0800)]
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.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: operate on otgsc register in a general way
Li Jun [Wed, 23 Apr 2014 07:56:38 +0000 (15:56 +0800)]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: coordinate usb phy initialization for different phy type
Peter Chen [Wed, 23 Apr 2014 07:56:37 +0000 (15:56 +0800)]
usb: chipidea: coordinate usb phy initialization for different phy type

For internal PHY (like UTMI), the phy clock may from internal pll,
it is on/off on the fly, the access PORTSC.PTS will hang without
phy clock. So, the usb_phy_init which will open phy clock needs to
be called before hw_phymode_configure.
See: http://marc.info/?l=linux-arm-kernel&m=139350618732108&w=2

For external PHY (like ulpi), it needs to configure portsc.pts before
visit viewport, or the viewport can't be visited. so phy_phymode_configure
needs to be called before usb_phy_init.
See: cd0b42c2a6d2a74244f0053f8960f5dad5842278

It may not the best solution, but it can work for all situations.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: shc_work@mail.ru
Cc: denis@eukrea.com
Cc: festevam@gmail.com
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUs
Denis Carikli [Wed, 23 Apr 2014 07:56:36 +0000 (15:56 +0800)]
usb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUs

This adds the i.MX25 and the i.MX35 support in the
ChipIdea usbmisc driver.

The i.MX25 and i.MX35 usb controllers are similar enough to be
able to use the same code.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Denis Carikli <denis@eukrea.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add support for USB OTG controller on LSI Zevio SoCs
Daniel Tang [Tue, 11 Mar 2014 05:47:39 +0000 (13:47 +0800)]
usb: chipidea: add support for USB OTG controller on LSI Zevio SoCs

The USB controller in TI-NSPIRE calculators (LSI Zevio SoC) are based off either
Freescale's USB OTG controller or the USB controller found in the IMX233, both
of which are Chipidea compatible.

This patch adds a device tree binding for the controller.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs
Alexander Shiyan [Tue, 11 Mar 2014 05:47:38 +0000 (13:47 +0800)]
usb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs

Use dev_name() for ci_hdrc name to distinguish USBs

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: Propagate the real error code on platform_get_irq() failure
Fabio Estevam [Wed, 19 Feb 2014 05:41:44 +0000 (13:41 +0800)]
usb: chipidea: Propagate the real error code on platform_get_irq() failure

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: add maximum-speed = full-speed option
Michael Grzeschik [Wed, 19 Feb 2014 05:41:43 +0000 (13:41 +0800)]
usb: chipidea: udc: add maximum-speed = full-speed option

This patch makes it possible to set the chipidea udc into full-speed only mode.
It is set by the oftree property "maximum-speed = full-speed".

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: use dev_get_platdata()
Jingoo Han [Wed, 19 Feb 2014 05:41:42 +0000 (13:41 +0800)]
usb: chipidea: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoENGR00333323 ARM: dts: imx6sx: add complete pinmux setting for uart DCE/DTE
Fugang Duan [Fri, 26 Sep 2014 05:23:42 +0000 (13:23 +0800)]
ENGR00333323 ARM: dts: imx6sx: add complete pinmux setting for uart DCE/DTE

Add complete pad pinmux setting for imx6sx uart DCE/DTE mode.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Acked-by: Jason Liu
9 years agonet: fec: free resource after phy probe failed
Nimrod Andy [Tue, 23 Sep 2014 07:40:58 +0000 (15:40 +0800)]
net: fec: free resource after phy probe failed

Free memory and disable all related clocks when there has no phy
connection or phy probe failed.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: align rx data buffer size for dma map/unmap
Nimrod Andy [Tue, 23 Sep 2014 07:40:57 +0000 (15:40 +0800)]
net: fec: align rx data buffer size for dma map/unmap

Align allocated rx data buffer size for dma map/unmap, otherwise
kernel print warning when enable DMA_API_DEBUG.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: remove the ERR006358 workaround for imx6sx enet
Nimrod Andy [Tue, 23 Sep 2014 07:40:56 +0000 (15:40 +0800)]
net: fec: remove the ERR006358 workaround for imx6sx enet

Remove the ERR006358 workaround for imx6sx enet since the hw issue
was fixed on the SOC.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: Add Ftype to BD to distiguish three tx queues for AVB
Nimrod Andy [Tue, 23 Sep 2014 07:40:55 +0000 (15:40 +0800)]
net: fec: Add Ftype to BD to distiguish three tx queues for AVB

The current driver loss Ftype field init for BD, which cause tx
queue #1 and #2 cannot work well.

Add Ftype field to BD to distiguish three queues for AVB:
0 -> Best Effort
1 -> ClassA
2 -> ClassB

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: fix build error at m68k platform
Frank Li [Tue, 16 Sep 2014 18:34:18 +0000 (02:34 +0800)]
net: fec: fix build error at m68k platform

reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 4d494cdc92b3b9a0f5fb9e1560810fa27d5a0489
  make.cross ARCH=m68k  m5272c3_defconfig
  make.cross ARCH=m68k

drivers/net/ethernet/freescale/fec.h:262:0: warning: "FEC_R_DES_START" redefined
 #define FEC_R_DES_START(X) ((X == 1) ? FEC_R_DES_START_1 : \
 ^
drivers/net/ethernet/freescale/fec.h:158:0: note: this is the location of the previous definition
 #define FEC_R_DES_START  0x3d0 /* Receive descriptor ring */
 ^
drivers/net/ethernet/freescale/fec.h:265:0: warning: "FEC_X_DES_START" redefined
 #define FEC_X_DES_START(X) ((X == 1) ? FEC_X_DES_START_1 : \

...

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: ethernet: freescale: fec_main.c: Cleaning up missing null-terminate in conjuncti...
Rickard Strandqvist [Sun, 14 Sep 2014 17:32:42 +0000 (19:32 +0200)]
net: ethernet: freescale: fec_main.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: use container_of to resolve bufdesc_ex from bufdesc
Fabian Frederick [Sat, 13 Sep 2014 20:38:26 +0000 (22:38 +0200)]
net: fec: use container_of to resolve bufdesc_ex from bufdesc

Use container_of instead of casting first structure member.

ARM cross-compiled but untested.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agofec: Remove fec_enet_select_queue()
Fabio Estevam [Mon, 22 Sep 2014 20:55:29 +0000 (17:55 -0300)]
fec: Remove fec_enet_select_queue()

Sparse complains about fec_enet_select_queue() not being static.

Feedback from David Miller [1] was to remove this function instead of making it
static:

"Please just delete this function.

It's overriding code which does exactly the same thing.

Actually, more precisely, this code is duplicating code in a way that
bypasses many core facilitites of the networking.  For example, this
override means that socket based flow steering, XPS, etc. are all
not happening on these devices.

Without ->ndo_select_queue(), the flow dissector does __netdev_pick_tx
which is exactly what you want to happen."

[1] http://www.spinics.net/lists/netdev/msg297653.html

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodoc: dt: mxs-phy: add compatible string for imx6sx-usbphy
Peter Chen [Tue, 26 Aug 2014 02:55:18 +0000 (10:55 +0800)]
doc: dt: mxs-phy: add compatible string for imx6sx-usbphy

Add compatible string for imx6sx-usbphy.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Conflicts:

Documentation/devicetree/bindings/usb/mxs-phy.txt

9 years agousb: phy: mxs: add imx6sx support
Peter Chen [Tue, 26 Aug 2014 02:55:17 +0000 (10:55 +0800)]
usb: phy: mxs: add imx6sx support

Add imx6sx support

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: phy: mxs: Add VF610 USB PHY support
Stefan Agner [Mon, 28 Jul 2014 14:57:29 +0000 (16:57 +0200)]
usb: phy: mxs: Add VF610 USB PHY support

This adds support for the USB PHY in Vybrid VF610. We assume that
the disconnection without VBUS is also needed for Vybrid.

Tests showed, without MXS_PHY_NEED_IP_FIX, enumeration of devices
behind a USB Hub fails with errors:

[  215.163507] usb usb1-port1: cannot reset (err = -32)
[  215.170498] usb usb1-port1: cannot reset (err = -32)
[  215.185120] usb usb1-port1: cannot reset (err = -32)
[  215.191345] usb usb1-port1: cannot reset (err = -32)
[  215.202487] usb usb1-port1: cannot reset (err = -32)
[  215.207718] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[  215.219317] usb usb1-port1: unable to enumerate USB device

Hence we also enable the MXS_PHY_NEED_IP_FIX flag.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agoARM: dts: imx6sx: Fix usbmisc compatible string
Fabio Estevam [Mon, 23 Jun 2014 14:21:04 +0000 (11:21 -0300)]
ARM: dts: imx6sx: Fix usbmisc compatible string

Fix usbmisc compatible string so that usbmisc node can be found and USB
functionality can be functional.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6sx-sdb: Add USB support
Fabio Estevam [Mon, 23 Jun 2014 14:21:05 +0000 (11:21 -0300)]
ARM: dts: imx6sx-sdb: Add USB support

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: fix .is_enabled() of shared gate clock
Shawn Guo [Tue, 16 Sep 2014 01:35:33 +0000 (09:35 +0800)]
ARM: imx: fix .is_enabled() of shared gate clock

Commit 63288b721a80 ("ARM: imx: fix shared gate clock") attempted to fix
an issue with particular enable/disable sequence from two shared gate
clocks.  But unfortunately, while it partially fixed the issue, it also
did something wrong in .is_enabled() function hook.  In case of shared
gate, the function shouldn't really query the hardware state via
share_count, because the function is trying to query the enabling state
of the clock in question, not the hardware state which is shared by
multiple clocks.

Fix the issue by returning the enable_count of the clock itself which is
maintained by clock core, in case it's a clock sharing hardware gate
with others.  As the result, the initialization of share_count per
hardware state is not needed now.  So remove it.

shawn.guo: cherry-pick commit 9e1ac462b982 from upstream

Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Fixes: 63288b721a80 ("ARM: imx: fix shared gate clock")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoENGR00332994: ARM: dts: imx6sl: fix gpu power up failed
Robin Gong [Wed, 24 Sep 2014 09:31:53 +0000 (17:31 +0800)]
ENGR00332994: ARM: dts: imx6sl: fix gpu power up failed

In ldo-bypass mode, antop regulator will bypass vddarm and vddsoc
if found these two have been bypassed,and keep internal vddsoc as 0.
That caused vddpu always set 0 because it tracked with vddsoc while enable.
Add 'regulator-allow-bypass' to set anatop_reg->bypass 1 to avoid this
case.

Signed-off-by: Robin Gong <b38343@freescale.com>
9 years agoENGR00279946 dts: imx6qdl-sabreauto: add baseboard sd card slot support
Haibo Chen [Fri, 26 Sep 2014 01:11:41 +0000 (09:11 +0800)]
ENGR00279946 dts: imx6qdl-sabreauto: add baseboard sd card slot support

NOTE since SD Card in main board takes a long route hence with
Drive Speed High 80 OHMS causing error on high speed cards.
Per suggestion DSE 40 OHMS is used.

And the SD1 on sabreauto baseboard is conflict with gpmi nand.
The conflict pins are DAT4~DAT7. Since the SD3 on cpu board
already supports 8 bit bus width, we do not want add an extra
dts file for it, so we disable 8 bit and use 4 bit width for
this issue.

[haibo chen:
    cherry-pick commit e38226f4cbf222ce9377963e20fe5f1d7103a2af
cherry-pick commit 3807ed7ac39ec402f19bb27d2d60ceb3ce5448b2
from imx_3.10.y]
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
9 years agoENGR00333304 dts: imx6sx: add usdhc into mege_fast wakeup source
Dong Aisheng [Tue, 24 Jun 2014 07:27:35 +0000 (15:27 +0800)]
ENGR00333304 dts: imx6sx: add usdhc into mege_fast wakeup source

The usdhc could also be wakeup source, thus add it into the mege_fast
wakeup source list.

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

9 years agoENGR00333303 dts: imx6sx-sdb-emmc: add emmc support on uSDHC4
Dong Aisheng [Wed, 16 Apr 2014 08:37:36 +0000 (16:37 +0800)]
ENGR00333303 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>
(cherry picked from commit 4b07536a25db281619ce249a46a71e0bb8a08a6b)

9 years agoENGR00333302 dts: imx6: enable sdio wakeup for corresponding boards
Dong Aisheng [Mon, 13 Jan 2014 09:00:46 +0000 (17:00 +0800)]
ENGR00333302 dts: imx6: enable sdio wakeup for corresponding boards

Enable the sdio wakeup capability for SDIO cards.
Note: we do not enable it for sabresd usdhc4 since it has a solid
eMMC card on it.

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

9 years agoENGR00332319 lcdif: imx6sl: disable the pixel rate before call clk_set_rate
Robby Cai [Fri, 19 Sep 2014 10:38:08 +0000 (18:38 +0800)]
ENGR00332319 lcdif: imx6sl: disable the pixel rate before call clk_set_rate

After the following commit is pushed, the lcdif framebuffer driver need
the adjustment.
93a9e3d0b88203cb523dd92e85590683d6a85fdf ENGR00318063-6:
ARM: imx6: add CLK_SET_RATE_GATE flag for PLL clocks

CLK_SET_RATE_GATE flag means "must be gated across rate change".

PLL5 video is the parent clock of the pixel clock, and only used by it.
This patch gates the clock before call clk_set_rate() to meet the requirement.

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoENGR00333251 dts: imx6dl: epdc: fix dtb build error
Robby Cai [Thu, 25 Sep 2014 12:39:36 +0000 (20:39 +0800)]
ENGR00333251 dts: imx6dl: epdc: fix dtb build error

ERROR (phandle_references): Reference to non-existent node or label "reg_sensor"

ERROR: Input tree has errors, aborting (use -f to force output)
make[1]: *** [arch/arm/boot/dts/imx6dl-cubox-i.dtb] Error 2
make[1]: *** Waiting for unfinished jobs....
  DTC     arch/arm/boot/dts/imx6dl-sabresd-enetirq.dtb
...

The label "reg_sensor" is defined in imx6qdl-sabresd.dts, not in
imx6dl.dtsi. The patch moves the epdc parts to imx6dl-sabresd.dts,
which also sounds better since EPDC module is available not on i.mx6q
but i.mx6dl.

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoENGR00333114 ARM: IMX6DL: EPDC: enable epdc module for imx6dl platform
Fancy Fang [Thu, 25 Sep 2014 05:17:19 +0000 (13:17 +0800)]
ENGR00333114 ARM: IMX6DL: EPDC: enable epdc module for imx6dl platform

Complete dts entry for epdc module to enable it
on imx6dl platform.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
9 years agoENGR00333136 dts: imx6: enable keep power capability for corresponding boards
Dong Aisheng [Mon, 13 Jan 2014 08:20:55 +0000 (16:20 +0800)]
ENGR00333136 dts: imx6: enable keep power capability for corresponding boards

All i.MX6 SabreAuto/SabreSD/EVK has the ability to keep card power
during suspend. So add this capability for them.

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

9 years agoENGR00333129 dts: imx6qdl-sabreauto: use external vmmc for sd3 optionally
Dong Aisheng [Fri, 10 Jan 2014 13:31:21 +0000 (21:31 +0800)]
ENGR00333129 dts: imx6qdl-sabreauto: use external vmmc for sd3 optionally

SD3.0 cards require power cycle the card during suspend/resume,
or the card re-enumeration after resume will fail to be identified
as UHS card since the card is already working on 1.8v mode and refuse
to ack the S18R request, thus, it will then work on normal high speed
mode instead.

We have to use external vmmc regulator to power cycle the card during
suspend/resume to reset card signal voltage to 3.3v frist for the later
1.8v voltage switch.

However, due to the sabreauto board limitation, we can not use external
regulator to powere off card by default since the card power is shared
with card detect pullup. Disabling the vmmc regulator will also shutdown
the cd pullup which causes incorrect illusion of card exist.
(e.g. plug out the card, mmc core wll think the card is exist since cd pin
is low but it never can find the card)
HW rework removing R695 and enable PAD internal pullup is needed to
fix this isssue.

User can manually open the mask of vmmc in dts to enable using external
regulator if your board has done the rework as said above.
Or by default we still do not power off card during suspend.

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

9 years agoENGR00333079 ARM: IMX6DL: PXP: enable pxp module for imx6dl platform
Fancy Fang [Thu, 25 Sep 2014 02:33:53 +0000 (10:33 +0800)]
ENGR00333079 ARM: IMX6DL: PXP: enable pxp module for imx6dl platform

Complete the dts entry for PXP to enable it on
imx6dl platform by default.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
9 years agoENGR00333049 ARM: dts: add dts file for ecspi on imx6q sabreauto
Allen Xu [Wed, 24 Sep 2014 20:01:57 +0000 (15:01 -0500)]
ENGR00333049 ARM: dts: add dts file for ecspi on imx6q sabreauto

add new dts file to support ecspi on imx6q sabreauto board.

Signed-off-by: Allen Xu <b45815@freescale.com>
9 years agoENGR00333048 ARM: dts: add new dts for gpmi and weim on imx6q sabreauto
Allen Xu [Wed, 24 Sep 2014 20:00:18 +0000 (15:00 -0500)]
ENGR00333048 ARM: dts: add new dts for gpmi and weim on imx6q sabreauto

new dts file to support gpmi/weim on imx6q sabreauto board.

Signed-off-by: Allen Xu <b45815@freescale.com>
9 years agoENGR00333047 ARM: dts: add new dts for ecspi on imx6dl sabreauto
Allen Xu [Wed, 24 Sep 2014 19:57:27 +0000 (14:57 -0500)]
ENGR00333047 ARM: dts: add new dts for ecspi on imx6dl sabreauto

new dts file to support ecspi on imx6dl sabreauto board.

Signed-off-by: Allen Xu <b45815@freescale.com>
9 years agoENGR00333046 ARM: dts: add new dts for gpmi and weim on imx6dl sabreauto
Allen Xu [Wed, 24 Sep 2014 19:54:11 +0000 (14:54 -0500)]
ENGR00333046 ARM: dts: add new dts for gpmi and weim on imx6dl sabreauto

dts file to support gpmi/weim on imx6dl sabreauto board.

Signed-off-by: Allen Xu <b45815@freescale.com>
9 years agoENGR00332198 ARM: dts: add new dts imx6sx-17x17-arm2-ecspi.dts
Allen Xu [Thu, 18 Sep 2014 20:59:33 +0000 (15:59 -0500)]
ENGR00332198 ARM: dts: add new dts imx6sx-17x17-arm2-ecspi.dts

Add a new dts file for ecspi test on imx6sx 17x17 arm2 board.

Signed-off-by: Allen Xu <b45815@freescale.com>
9 years agoENGR00332937-2 ARM: dts: imx6qdl-sabresd: add no-1-8-v property for usdhc
Haibo Chen [Wed, 24 Sep 2014 05:01:40 +0000 (13:01 +0800)]
ENGR00332937-2 ARM: dts: imx6qdl-sabresd: add no-1-8-v property for usdhc

The sabresd board does not have external 1.8v/3.3v signal voltage
switch support for usdhc.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
9 years agoENGR00332931 ARM: dts: imx6qdl-sabresd: add usdhc4 support
Haibo Chen [Wed, 24 Sep 2014 04:35:42 +0000 (12:35 +0800)]
ENGR00332931 ARM: dts: imx6qdl-sabresd: add usdhc4 support

Add usdhc4 in dts for i.MX6q-sabresd and i.MX6dl-sabresd boards.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
9 years agoENGR00319936-1 mmc: sdhci-esdhc-imx: do not enable wakeup by default
Dong Aisheng [Tue, 24 Jun 2014 09:25:03 +0000 (17:25 +0800)]
ENGR00319936-1 mmc: sdhci-esdhc-imx: do not enable wakeup by default

After adding mega fast support, the default enabled usdhc wakeup will block
M/F to gate off power domain.
To avoid this issue, we only claim wakeup capability and reply on user to enable
it via sysfs according to real needs.
The drawback of such change is that for SDIO WiFi Wakeup On Wireless feature,
User has to enable both uSDHC and WiFi WoW wakeup mannually to make
WoW work well.

BTW, due to the wakeup feature is controller itself, so we do not need to reply
on WiFi PM flags to enable it.

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

9 years agoENGR00332937-1 mmc: sdhci-esdhc-imx: add imx6sx support
Dong Aisheng [Thu, 6 Mar 2014 08:04:19 +0000 (16:04 +0800)]
ENGR00332937-1 mmc: sdhci-esdhc-imx: add imx6sx support

The imx6sx usdhc is derived from imx6sl, the difference is minor.
imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
So introduce a new compatible string for imx6sx to distinguish them.

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

9 years agoENGR00295564 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl
Dong Aisheng [Fri, 17 Jan 2014 02:23:22 +0000 (10:23 +0800)]
ENGR00295564 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl

The usdhc of i.MX6Q/DL can work well under low power mode without
request high bus freq. So we do not need request bus freq for i.MX6Q/DL.
It can save power for i.MX6D/DL due to it saves a lot busfreq switch
cost as well as the CPU time runing on high bus freq after switch
during low power mode.

A new flag ESDHC_FLAG_BUSFREQ is added to indicated this requirement.
Currently only i.MX6SL is using it.

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

9 years agoENGR00295184-7 mmc: sdhci: do not enable card cd wakeup for gpio case
Dong Aisheng [Mon, 13 Jan 2014 10:27:58 +0000 (18:27 +0800)]
ENGR00295184-7 mmc: sdhci: do not enable card cd wakeup for gpio case

Do not need to enable the controller card cd interrupt wakeup
if using GPIO as card detect since it's meaningless.

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

9 years agoENGR00295184-5 mmc: sdhci-esdhc-imx: add wakeup feature for sdio irq
Dong Aisheng [Mon, 13 Jan 2014 08:47:31 +0000 (16:47 +0800)]
ENGR00295184-5 mmc: sdhci-esdhc-imx: add wakeup feature for sdio irq

Enable wakeup for SDIO IRQ when the host is able to keep power
during suspend.

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

9 years agoENGR00295184-3 mmc: sdhci-esdhc-imx: add keep power feature during suspend
Dong Aisheng [Mon, 13 Jan 2014 08:26:19 +0000 (16:26 +0800)]
ENGR00295184-3 mmc: sdhci-esdhc-imx: add keep power feature during suspend

IMX boards can keep power for cards during suspend.
User can enable it from device tree.

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

9 years agoENGR00295184-1 mmc: sdhci: do not enable card detect interrupt for gpio cd type
Dong Aisheng [Tue, 31 Dec 2013 08:22:44 +0000 (16:22 +0800)]
ENGR00295184-1 mmc: sdhci: do not enable card detect interrupt for gpio cd type

Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
we also do not need to handle controller native card detect interrupt
for gpio as card detect case.
If we wrong enabled the card detect interrupt for gpio case,
it will cause a lot of unexpected card detect interrupts during data transfer
which should not happen.

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

9 years agoENGR00292140 mmc: sdhci: fix possible sleep in atomic in sdio_irq enable function
Dong Aisheng [Mon, 16 Dec 2013 06:42:14 +0000 (14:42 +0800)]
ENGR00292140 mmc: sdhci: fix possible sleep in atomic in sdio_irq enable function

The sdhci_runtime_pm_get API is able to sleep, so should not call it in
sdhci_enable_sdio_irq_nolock which is executed with spin_lock_irqsave in
sdhci_enable_sdio_irq.
Move it out of spin lock to fix this issue.

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

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>
(cherry picked from commit 93d508770f5e6c12febff13b8d6fad9b0d9c6a12)

9 years agoENGR00289406-1 mmc: sdhci: add quirk for get max timeout counter
Dong Aisheng [Fri, 22 Nov 2013 12:34:38 +0000 (20:34 +0800)]
ENGR00289406-1 mmc: sdhci: add quirk for get max timeout counter

The max timeout counter of some SoCs like i.MX6 uSDHC may not be standard,
add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER quirk to get the correct max timeout
counter from platform specific code.
Then we can calculate the correct max_discard_to value.

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

9 years agoENGR00289279 mmc: sdhci: get runtime pm when sdio irq is enabled
Dong Aisheng [Fri, 15 Nov 2013 09:54:36 +0000 (17:54 +0800)]
ENGR00289279 mmc: sdhci: get runtime pm when sdio irq is enabled

SDIO cards may need clock to send the card interrupt to host.
Thus, we get runtime pm when sdio irq is enabled to prevent the clock
resource is released and put it when sdio irq is disabled.

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

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>
(cherry picked from commit 885c943ca13d2975651a1d0732dc8866457c85e9)

9 years agoENGR00287331-2 sdhci-esdhc-imx: use bus freq in runtime pm
Dong Aisheng [Mon, 11 Nov 2013 06:53:58 +0000 (14:53 +0800)]
ENGR00287331-2 sdhci-esdhc-imx: use bus freq in runtime pm

Request BUS_FREQ_HIGH when bus is busy and then release BUS_FREQ_HIGH
when bus becomes idle.

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

9 years agoENGR00240226-07 mmc: add delay after CMD6 befoer sending CMD13 for sandisk
Ryan QIAN [Wed, 16 Jan 2013 02:23:28 +0000 (10:23 +0800)]
ENGR00240226-07 mmc: add delay after CMD6 befoer sending CMD13 for sandisk

- Some sandisk emmc cards need certain delay befor sending cmd13 after
cmd6. Original CR: ENGR174296 (commit: fd031f9)

Acked-by: Aisheng Dong <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
(cherry picked from commit f942bf1db36355d46f38792601594949f3f2c71b)

9 years agonet: fec: fix code identation
Nimrod Andy [Fri, 19 Sep 2014 06:26:03 +0000 (14:26 +0800)]
net: fec: fix code identation

There have extra identation before .skb_copy_to_linear_data_offset(),
this patch just remove the identation.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoENGR00305648-1 ASoC: imx-sgtl5000: Support non-ssi cpu-dai
Nicolin Chen [Tue, 25 Mar 2014 12:56:18 +0000 (20:56 +0800)]
ENGR00305648-1 ASoC: imx-sgtl5000: Support non-ssi cpu-dai

The current imx-sgtl5000 driver always attaches the cpu-dai to ssi while
in fact it could be attached to other cpu-dais like SAI. Thus this patch
use a general code to support another cpu-dai. And meanwhile update the
devicetree for i.MX6 Series.

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

9 years agoENGR00321941 ASoC: fsl_spdif: fix that can't get the Rx Sample Rate
Shengjiu Wang [Mon, 7 Jul 2014 11:03:21 +0000 (19:03 +0800)]
ENGR00321941 ASoC: fsl_spdif: fix that can't get the Rx Sample Rate

The SRPC register should be volatile, LOCK bit is set by the hardware.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
(cherry picked from commit 35ac9096cbe158962e779fd9bc64aeb74abbc745)

9 years agoENGR00320241 ASoC: fsl_spdif: Complete the volatile register list
Nicolin Chen [Tue, 24 Jun 2014 06:44:18 +0000 (14:44 +0800)]
ENGR00320241 ASoC: fsl_spdif: Complete the volatile register list

Not only SIS but also other read-only or write-only reigsters should be marked
as volatile register so as not to let regcache cache them. So this patch just
adds those missing registers.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 56ad235ba23274fc05422ad4b13153d1c56801c4)

9 years agoENGR00318773-10 ASoC: imx-audmux: Add driver suspend and resume to support MEGA Fast
Nicolin Chen [Thu, 15 May 2014 10:53:25 +0000 (18:53 +0800)]
ENGR00318773-10 ASoC: imx-audmux: Add driver suspend and resume to support MEGA Fast

For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, AUDMUX needs to
save all the values of registers before the system suspend and restore them
after the system resume.

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

9 years agoENGR00318773-9 ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast
Nicolin Chen [Thu, 15 May 2014 10:51:56 +0000 (18:51 +0800)]
ENGR00318773-9 ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast

For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, SSI needs to save
all the values of registers before the system suspend and restore them after
the system resume.

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

9 years agoENGR00318773-8 ASoC: fsl_spdif: Add driver suspend and resume to support MEGA Fast
Nicolin Chen [Wed, 14 May 2014 10:54:27 +0000 (18:54 +0800)]
ENGR00318773-8 ASoC: fsl_spdif: Add driver suspend and resume to support MEGA Fast

For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, SPDIF needs to save
all the values of registers before the system suspend and restore them after
the system resume.

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

9 years agoENGR00318773-7 ASoC: fsl_esai: Add driver suspend and resume to support MEGA Fast
Nicolin Chen [Mon, 12 May 2014 12:00:48 +0000 (20:00 +0800)]
ENGR00318773-7 ASoC: fsl_esai: Add driver suspend and resume to support MEGA Fast

For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, ESAI needs to save
all the values of registers before the system suspend and restore them after
the system resume.

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

9 years agoENGR00318773-6 ASoC: fsl_sai: Add driver suspend and resume to support MEGA Fast
Nicolin Chen [Mon, 12 May 2014 05:47:52 +0000 (13:47 +0800)]
ENGR00318773-6 ASoC: fsl_sai: Add driver suspend and resume to support MEGA Fast

For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, SAI needs to save
all the values of registers before the system suspend and restore them after
the system resume.

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

9 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>
(cherry picked from commit 28d18f23fe7577f613ad8cfb4699bba26178304b)

9 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>
(cherry picked from commit 440fbeee5bba4d4356a392ff35fe262774c48ea1)

9 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>
(cherry picked from commit 405588f31e432e5c6634a0817e4d804ead87882b)

9 years agoENGR00283079-1 ASoC: fsl: Implement different DMA buffer sizes
Nicolin Chen [Thu, 17 Oct 2013 10:24:29 +0000 (18:24 +0800)]
ENGR00283079-1 ASoC: fsl: Implement different DMA buffer sizes

Each CPU DAI driver has its own defined DMA buffer size, so this patch just
drops the original one that uses a fixed size for all drivers and implements
a different DMA buffer size to each driver.

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