]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoMLK-9686 ARM: dts: imx6x: Add enet2 support for imx6sx-sdb board
Fugang Duan [Tue, 23 Sep 2014 09:20:50 +0000 (17:20 +0800)]
MLK-9686 ARM: dts: imx6x: Add enet2 support for imx6sx-sdb board

Add enet2 support for imx6sx-sdb board, and add the "fsl,imx6q-fec"
compatible for fec2 node to be compatible with the old version.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoARM: imx: add enet init for i.mx6sx
Fugang Duan [Tue, 14 Oct 2014 06:08:18 +0000 (14:08 +0800)]
ARM: imx: add enet init for i.mx6sx

Add enet init for i.mx6sx:
- Add phy ar8031 fixup
- Set enet clock source from internal PLL

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoMLK-9678 arm: imx6: switch to analog bypass before entering DSM
Bai Ping [Tue, 14 Oct 2014 02:17:16 +0000 (10:17 +0800)]
MLK-9678 arm: imx6: switch to analog bypass before entering DSM

this patch implements the workaround for ERR005852:

ERR005852 Analog: Transition from Deep Sleep Mode to LDO Bypass
Mode may cause the slow response of the VDDARM_CAP output.

    Normally, the VDDARM_CAP supply takes only approximately 40 us
    to raise to the correct voltage when exiting from Deep Sleep(DSM)
    mode, if the LDO is enabled. If the LDO bypass mode is selected,
    the VDDARM_CAP supply voltage will drop to approximately 0V when
    entering and when exiting from DSM,even though the VDDARM_IN
    supply is already stable, the VDDARM_CAP supply will take about
    2 ms to rise to the correct voltage.

software workaround:

if internal LDO bypass, switch to analog bypass mode(0x1E), prior
to entering DSM, and then, revert to the normal bypass mode, when
exiting from DSM.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 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>
(cherry picked from commit ee18bcbda4bd111c324a3eb4eefdd57722819d7c)

9 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>
(cherry picked from commit 07952e49e72e62d8d6fcea437caf46f4ca0ebb86)

9 years agoENGR00306653-2 input: keyboad: snvs_pwrkey: add snvs power key driver
Robin Gong [Wed, 2 Apr 2014 08:55:31 +0000 (16:55 +0800)]
ENGR00306653-2 input: keyboad: snvs_pwrkey: add snvs power key driver

add snvs power key driver since ic team has fix some issues of SNVS on i.mx6sx

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 3d259d1673fe9d14251f65871b77f80b0d779a22)

9 years agoENGR00306653-1: ARM: dts: imx6sx: add snvs power key node
Robin Gong [Wed, 2 Apr 2014 08:49:59 +0000 (16:49 +0800)]
ENGR00306653-1: ARM: dts: imx6sx: add snvs power key node

Put snvs-pwrkey device node in imx6sx.dtsi since all boards with i.mx6sx were
designed with ONOFF as power key and it's a function at soc level.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit de58db5d0119933731be15395209ba84d0a352d1)

9 years agoMLK-9669-5 arm: imx: enable busfreq for i.mx6
Anson Huang [Fri, 10 Oct 2014 02:34:39 +0000 (10:34 +0800)]
MLK-9669-5 arm: imx: enable busfreq for i.mx6

enable busfreq for i.mx6 SOCs, only support i.MX6Q/DL/SX
DDR3 platform, i.MX6SL and LPDDR2 will be enabled later.

As there are too many conflicts using cherry-pick, so these
files are copied from L3.10.y branch(b01578a8d466d7420cbc7cfabf984998e8e31657),
please check L3.10.y for history.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9669-4 arm: dts: imx6: enable busfreq
Anson Huang [Thu, 9 Oct 2014 07:00:20 +0000 (15:00 +0800)]
MLK-9669-4 arm: dts: imx6: enable busfreq

enable busfreq driver for i.MX6Q/DL/SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9669-3 arm: imx: set SCU CPU power status register correctly
Anson Huang [Fri, 10 Oct 2014 02:32:59 +0000 (10:32 +0800)]
MLK-9669-3 arm: imx: set SCU CPU power status register correctly

Set the SCU CPU Power status register to reflect the correct status of
a CPU (active/inactive/not-present).

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9669-2 arm: imx: fix the clock warning printed during ddr frequency change procedure.
Anson Huang [Thu, 9 Oct 2014 10:04:39 +0000 (18:04 +0800)]
MLK-9669-2 arm: imx: fix the clock warning printed during ddr frequency change procedure.

Recent checks added to the clock code prints warning during ddr frequency change procedure.
Hence the clock rates printed by clk_summary after ddr freq change are incorrect.
This patch fixes the issue by:
1. Removing CLK_SET_RATE_GATE for ocram_clk since it has a busy bit to be checked when
the ocram_podf is changed.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9669-1 arm: imx: skip system bus related clks parent switch check
Anson Huang [Thu, 9 Oct 2014 09:50:46 +0000 (17:50 +0800)]
MLK-9669-1 arm: imx: skip system bus related clks parent switch check

Those system bus related mux only can be switched by busfreq driver,
and in busfreq asm code, it already follow the flow that hardware design
require, so no need to do flow check for these clk mux:

i.MX6Q/DL: periph_clk2_sel and pre_periph_clk_sel;
i.MX6SL: periph_clk2_sel, pre_periph_clk_sel,
        periph2_clk2_sel and pre_periph2_clk_sel
i.MX6SX: periph_clk2_sel, pre_periph_clk_sel,
        periph2_clk2_sel and pre_periph2_clk_sel.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9672-1 imx6sx:dts:Add GPU module
Shawn Xiao [Fri, 10 Oct 2014 02:50:46 +0000 (10:50 +0800)]
MLK-9672-1 imx6sx:dts:Add GPU module

Add GPU module to imx6sx.dtsi to enable GPU on imx6sx borad

Add power-domain-cell in gpc module to enable power-domain for GPU

Use macro instead of hard code to describe GPU interrupt resource

Signed-off-by: Shawn Xiao <b49994@freescale.com>
9 years agoMLK-9672-2 imx6sl:dts:Add GPU module
Shawn Xiao [Fri, 10 Oct 2014 02:29:37 +0000 (10:29 +0800)]
MLK-9672-2 imx6sl:dts:Add GPU module

Add GPU module to imx6sl.dtsi to enable GPU on imx6sl borad

Use macro instead of hard code to describe GPU interrupt resource

Include the head file defining the macro to imx6sl.dtsi

Signed-off-by: Shawn Xiao <b49994@freescale.com>
9 years agoMLK-9634-1 arm: imx: remove romcp workaround for i.mx6sx TO1.2
Anson Huang [Thu, 25 Sep 2014 03:05:01 +0000 (11:05 +0800)]
MLK-9634-1 arm: imx: remove romcp workaround for i.mx6sx TO1.2

i.MX6SX TO1.2 ROM has add ocram_s space support for ARM resume,
so no need to enable ROMCP to workaround it for TO1.2.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9611 arm: imx6: add support for imx6sx suspend to ocram 0x008f8000
Bai Ping [Sat, 11 Oct 2014 07:13:12 +0000 (15:13 +0800)]
MLK-9611 arm: imx6: add support for imx6sx suspend to ocram 0x008f8000

On imx6sx, it has a dedicated ocram for low power mode. We need to do
some workaround to make imx6sx suspend to ocram 0x008f8000

part of the code is copied from imx_3.10.y branch:

commit 4c6e459d8b91c23d52d1d6e1a51a3be8f7c0230a
Author: Anson Huang <b20788@freescale.com>
Date:   Tue Feb 11 15:33:05 2014 +0800

     e-n-g-r 00298524-6 ARM: imx: enable suspend/resume for i.mx6sx

     Enable suspend/resume feature for i.mx6sx 17x17 arm2 board,
     for dsm mode, as we use dedicated ocram space for low
     power function(start from 0x8f8000), but ROM code still
     use previous ocram space(0x900000) for checking jump address,
     so we need to enable ROMCP of data patch to workaround this
     issue.

Signed-off-by: Bai Ping <b51503@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9666-4: ARM: dts: imx6sx: add audio dts file for 19x19-arm2
Shengjiu Wang [Wed, 8 Oct 2014 09:39:04 +0000 (17:39 +0800)]
MLK-9666-4: ARM: dts: imx6sx: add audio dts file for 19x19-arm2

Add imx6sx-19x19-arm2-sai device tree file.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
9 years agoMLK-9666-3: ARM: dts: imx6sx: add audio dts file for 17x17-arm2
Shengjiu Wang [Wed, 8 Oct 2014 09:38:43 +0000 (17:38 +0800)]
MLK-9666-3: ARM: dts: imx6sx: add audio dts file for 17x17-arm2

Add imx6sx-17x17-arm2-sai, imx6sx-17x17-arm2-ssi, imx6sx-17x17-arm2-spdif
device tree file.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
9 years agoMLK-9666-2: ARM: dts: imx6sx: asrc p2p name has been changed
Shengjiu Wang [Wed, 8 Oct 2014 09:37:18 +0000 (17:37 +0800)]
MLK-9666-2: ARM: dts: imx6sx: asrc p2p name has been changed

refine node for asrc p2p

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
9 years agoMLK-9666-1: ARM: dts: imx6sx: enable esai for imx6sx
Shengjiu Wang [Wed, 24 Sep 2014 03:33:41 +0000 (11:33 +0800)]
MLK-9666-1: ARM: dts: imx6sx: enable esai for imx6sx

update dts file to enable esai

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
9 years agoENGR00301115 net: fec_ptp: fix convergence issue to support IXXAT and LinuxPTP stack
Fugang Duan [Fri, 10 Oct 2014 09:02:39 +0000 (17:02 +0800)]
ENGR00301115 net: fec_ptp: fix convergence issue to support IXXAT and LinuxPTP stack

IEEE 1588 module has one hw issue in capturing the ATVR register. According
to the user manual it is:
           ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
           while(ENET0->ATCR & ENET_ATCR_CAPTURE_MASK);
           ts_counter_ns = ENET0->ATVR;
Incorrect behavior for ENET_ATCR[Capture and Restart Bits]. These bits will always
read a value zero. According to SPEC, when these bits are set to 1'b1, these should
hold value 1'b1 until the counter value is capture in the register clock domain.

Unfortunately there is a bug with the way the bit "ENET_ATCR_CAPTURE" clears.
So need something like:
           ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
           wait();
           ts_counter_ns = ENET0->ATVR;

The wait-time to be at least 6 clock cycle of the slower clock between the register
clock and the 1588 clock. The 1588 ts_clk is 25Mhz, register clock is 66Mhz, so the
wait-time must be greater than 240ns (40ns * 6). The workaround is that adding 1us
delay before read ATVR.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit d4601299b22de03b6dd28baea4643e04f6a41942)

9 years agoENGR00299323-10 net:fec: add enet AVB Ubuntu Gstreamer demo support
Fugang Duan [Fri, 10 Oct 2014 08:25:26 +0000 (16:25 +0800)]
ENGR00299323-10 net:fec: add enet AVB Ubuntu Gstreamer demo support

Support Gstreamer AVB demo support.

ring1 -> ClassA, ring2 -> ClassB, ring0 -> Best Effort

For QoS: ring1 > ring2 > ring0
For bandwidth reverse:
      50% bandwidth -> ClassA
      33% bandwidth -> ClassB
      17% bandwidth -> Best effort queue

In general, ClassA run audio, ClassB run video.
Since AVB demo use big bandwidth streaming, video cost more than
33Mbps bandwidth, and with Qos limitation: ClassA >= ClassB > Best effort,
so we have to change ring2 bandwidth equal to ring1 bandwidth (50%).
After validate on FPGA, AVB demo can work fine for audio and video.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 93d6579a7b3d2dafa721c835df5d5f7d30ed386e)

9 years agoENGR00329822-07 tty: serial: imx: add count stat. for rx dma path
Fugang Duan [Fri, 5 Sep 2014 02:38:36 +0000 (10:38 +0800)]
ENGR00329822-07 tty: serial: imx: add count stat. for rx dma path

Add count stat. for rx dma path.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 0cacf92fbbbd39680372f0eacf6b0c9e82438445)

9 years agoENGR00329822-06 tty: serial: imx: use work_struct instead of delayed work
Fugang Duan [Fri, 5 Sep 2014 01:31:30 +0000 (09:31 +0800)]
ENGR00329822-06 tty: serial: imx: use work_struct instead of delayed work

For rx dma work, use work_struct instead of delayed work.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit bd468211cde377634e26fb1383b9c6e8c180fd27)

9 years agoENGR00329822-05 tty: serial: imx: use delayed work for transmit task
Fugang Duan [Thu, 21 Aug 2014 01:11:06 +0000 (09:11 +0800)]
ENGR00329822-05 tty: serial: imx: use delayed work for transmit task

Use delayed work to schdule the transmit work to send out the last
data to avoid that the rest of data in xmit buffer cannot be sent out.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 230562fe3d44fd0d33bddd409cf254b8c1ec43c5)

9 years agoENGR00329822-04 tty: serial: imx: optimize the rx performance
Fugang Duan [Mon, 4 Aug 2014 07:27:50 +0000 (15:27 +0800)]
ENGR00329822-04 tty: serial: imx: optimize the rx performance

Optimize the uart rx performance that use SDMA loop mode instead
of normal mode. After the changes, uart rx fifo overrun issue disappear
even if hw flow control is disabled.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 3a3eadcc2ab02029236fd0a5ae1c4e9369781157)

9 years agoENGR00329822-03 tty: serial: imx: separate DMA and flow control features
Fugang Duan [Mon, 4 Aug 2014 05:24:08 +0000 (13:24 +0800)]
ENGR00329822-03 tty: serial: imx: separate DMA and flow control features

The current implenention is that DMA feature is dependent on hw flow
control feature. But Uart DMA feature has nothing related to flow
control feature, so separate them.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 05dc8b394aa5874fbb6a2d84d5e18b7c1227976b)

9 years agoENGR00329822-01 dmaengine: imx: fix loop mode issue
Fugang Duan [Fri, 10 Oct 2014 07:31:11 +0000 (15:31 +0800)]
ENGR00329822-01 dmaengine: imx: fix loop mode issue

Fix loop mode issue that calling dmaengine_tx_status() can get
right state.residue value.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 37e17f10b35c34317def08704e4b4edf5aa23894)

9 years agoENGR00332724 IMX6Q: IPUv3: OUTPUT: can't suport RGB565 format on /dev/video20 device
Fancy Fang [Thu, 9 Oct 2014 08:49:37 +0000 (16:49 +0800)]
ENGR00332724 IMX6Q: IPUv3: OUTPUT: can't suport RGB565 format on /dev/video20 device

"
Use  /unit_tests/mxc_v4l2_output.out.
./unit_tests/mxc_v4l2_output.out -d /dev/video20 -iw 320 -ih 240 -f RGBP -ow 320 -oh 240 anyfile.rgb
got following:
g_in_width = 320, g_in_height = 240
g_display_width = 320, g_display_height = 240
driver=mxc_vout, card=DISP4 BG, bus=, version=0x00030a1f, capabilities=0x04000002
fmt RGB565: fourcc = 0x50424752
fmt BGR24: fourcc = 0x33524742
fmt RGB24: fourcc = 0x33424752
fmt RGB32: fourcc = 0x34424752
fmt BGR32: fourcc = 0x34524742
fmt NV12: fourcc = 0x3231564e
fmt UYVY: fourcc = 0x59565955
fmt YUYV: fourcc = 0x56595559
fmt YUV422 planar: fourcc = 0x50323234
fmt YUV444: fourcc = 0x34343459
fmt YUV420: fourcc = 0x32315559
fmt YVU420: fourcc = 0x32315659
fmt TILED NV12P: fourcc = 0x50564e54
fmt TILED NV12F: fourcc = 0x46564e54
fmt YUV444 planar: fourcc = 0x50343434
cropcap.bounds.width = 1024
cropcap.bound.height = 768
cropcap.defrect.width = 1024
cropcap.defrect.height = 768
set format failed

but same command on /dev/video17 as following works well
/unit_tests/mxc_v4l2_output.out -d /dev/video17 -iw 320 -ih 240 -f RGBP -ow 320 -oh 240 anyfile.rgb
"

The 'IPU_PIX_FMT_RGB666' should be marked as RGB colorspace to
avoid unnecessary ipu task submit which will be considered to
be a 'IPU_CHECK_ERR_PROC_NO_NEED' error by IPU driver.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
9 years agoMLK-9644 mx6:Add IRAM TLB for suspend resume
Peng Fan [Sun, 28 Sep 2014 08:36:11 +0000 (16:36 +0800)]
MLK-9644 mx6:Add IRAM TLB for suspend resume

Add IRAM TLB for suspend and resume.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ping Bai <Ping.Bai@freescale.com>
9 years agoMLK-9644 imx6:dtb: reserve 16KB for IRAM TLB
Peng Fan [Fri, 26 Sep 2014 09:15:14 +0000 (17:15 +0800)]
MLK-9644 imx6:dtb: reserve 16KB for IRAM TLB

Reserve 16KB for IRAM TLB. Except mx6sx, all others use 0x900000 as
the IRAM TLB base addr. To mx6sx, 0x8f8000 is used for IRAM TLB base
addr. Actually, 16KB is reserved for IRAM TLB, but only upper 8KB
is used for kernel TLB, the lower 8KB is used for pm_info and OCRAM
code.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ping Bai <Ping.Bai@freescale.com>
9 years agousb: chipidea: Fix oops when removing the ci_hdrc module
Torsten Fleischer [Fri, 3 Oct 2014 09:01:20 +0000 (11:01 +0200)]
usb: chipidea: Fix oops when removing the ci_hdrc module

The call of 'kfree(ci->hw_bank.regmap)' in ci_hdrc_remove() sometimes causes
a kernel oops when removing the ci_hdrc module.

Since there is no separate memory allocated for the ci->hw_bank.regmap array,
there is no need to free it.

Signed-off-by: Torsten Fleischer <to-fleischer@t-online.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoMLK-9662 [V4L2 Capture] Revert patch to re-add support for _G_CHIP_IDENT
Oliver Brown [Tue, 30 Sep 2014 14:12:46 +0000 (09:12 -0500)]
MLK-9662 [V4L2 Capture] Revert patch to re-add support for _G_CHIP_IDENT

This reverts commit b71c99801e18eb172ae34851daf25044a3bf644a.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoMLK-9661-3 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y
Oliver Brown [Mon, 6 Oct 2014 17:30:17 +0000 (12:30 -0500)]
MLK-9661-3 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y

Adding MXC V4L2 capture to kernel confguraiton.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoMLK-9661-2 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y
Oliver Brown [Tue, 7 Oct 2014 04:33:47 +0000 (23:33 -0500)]
MLK-9661-2 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y

Adding local version of V4L2 internal device to MXC V4L capture.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoMLK-9661-1 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y
Oliver Brown [Tue, 30 Sep 2014 13:44:34 +0000 (08:44 -0500)]
MLK-9661-1 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y

Initial port of the mxc V4L2 capture driver. Baseline copied from
imx_3.10.y branch:

commit ffd138854ba04970457ddfbb03c3945df94112ac
Author: Sandor Yu <R01008@freescale.com>
Date:   Mon Aug 11 19:05:11 2014 +0800
e-n-g-r 00322859 CSI: some frames crrouption issue

Removed whitespace and line length warnings from review-commits.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoENGR00288196 ARM: dts: fix epdc and csi conflict on imx6sl evk
Robby Cai [Fri, 15 Nov 2013 09:21:16 +0000 (17:21 +0800)]
ENGR00288196 ARM: dts: fix epdc and csi conflict on imx6sl evk

There is pinmux conflict for EPDC and I2C3 on imx6sl soc.
While on imx6sl evk board, the camera is attached on I2C3 bus, so the
EPDC function and CSI function can not be used at same time.
This patch removes the conflict in imx6sl-evk.dts file for EPDC function
and adds a new dts file for CSI function.

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

9 years agoENGR00275034-2 ARM: dts: add csi and v4l2 capture support on imx6sl-evk
Robby Cai [Thu, 5 Sep 2013 14:50:39 +0000 (22:50 +0800)]
ENGR00275034-2 ARM: dts: add csi and v4l2 capture support on imx6sl-evk

Add CSI module and v4l2 capture support on imx6sl-evk board

Note: CSI has pin conflict with EPDC on imx6sl-evk board.
To use CSI, we can use 'fdt' command in U-Boot to disable EPDC:

fdt addr ${fdt_addr}
fdt set /soc/aips-bus@02000000/epdc@020f4000 status disable

Signed-off-by: Robby Cai <R63905@freescale.com>
9 years agofec: Fix fec_enet_alloc_buffers() error path
Fabio Estevam [Sat, 4 Oct 2014 16:40:01 +0000 (13:40 -0300)]
fec: Fix fec_enet_alloc_buffers() error path

When fec_enet_alloc_buffers() fails we should better undo the previous actions,
which consists of: disabling the FEC clocks and putting the FEC pins into
inactive state.

The error path for fec_enet_mii_probe() is kept unchanged.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: fix build error at m68k platform
Frank Li [Fri, 3 Oct 2014 21:29:14 +0000 (14:29 -0700)]
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 1b7bde6d659d30f171259cc2dfba8e5dab34e735

  make.cross ARCH=m68k m5275evb_defconfig
  make.cross ARCH=m68k

All error/warnings:

   drivers/net/ethernet/freescale/fec_main.c: In function 'fec_enet_rx_queue':
>> drivers/net/ethernet/freescale/fec_main.c:1470:3: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
      prefetch(skb->data - NET_IP_ALIGN);
      ^
   cc1: some warnings being treated as errors

missed included prefetch.h

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Add generic options for tunables
Govindarajulu Varadarajan [Tue, 2 Sep 2014 21:47:20 +0000 (03:17 +0530)]
ethtool: Add generic options for tunables

This patch adds new ethtool cmd, ETHTOOL_GTUNABLE & ETHTOOL_STUNABLE for getting
tunable values from driver.

Add get_tunable and set_tunable to ethtool_ops. Driver implements these
functions for getting/setting tunable value.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Improve explanation of the two arrays following struct ethtool_rxfh
Ben Hutchings [Thu, 15 May 2014 00:07:16 +0000 (01:07 +0100)]
ethtool: Improve explanation of the two arrays following struct ethtool_rxfh

The use of two variable-length arrays is unusual so deserves a bit
more explanation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
9 years agoethtool: Name the 'no change' value for setting RSS hash key but not indir table
Ben Hutchings [Thu, 15 May 2014 00:41:23 +0000 (01:41 +0100)]
ethtool: Name the 'no change' value for setting RSS hash key but not indir table

We usually allocate special values of u32 fields starting from the top
down, so also change the value to 0xffffffff.  As these operations
haven't been included in a stable release yet, it's not too late to
change.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
9 years agoethtool: Support for configurable RSS hash key
Venkata Duvvuru [Mon, 21 Apr 2014 10:07:59 +0000 (15:37 +0530)]
ethtool: Support for configurable RSS hash key

This ethtool patch primarily copies the ioctl command data structures
from/to the User space and invokes the driver hook.

Signed-off-by: Venkat Duvvuru <VenkatKumar.Duvvuru@Emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Fix unwanted section breaks in kernel-doc
Ben Hutchings [Wed, 12 Feb 2014 22:15:09 +0000 (22:15 +0000)]
ethtool: Fix unwanted section breaks in kernel-doc

A colon almost unavoidably starts a new section.  The script should be
changed to provide a way to avoid this, but for now reword the
comments to avoid using colons.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Move kernel-doc comment next to struct ethtool_dump definition
Ben Hutchings [Wed, 12 Feb 2014 22:14:59 +0000 (22:14 +0000)]
ethtool: Move kernel-doc comment next to struct ethtool_dump definition

The kernel-doc script does not tolerate the macro definition in between.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_perm_addr
Ben Hutchings [Wed, 12 Feb 2014 22:14:48 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_perm_addr

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_stats
Ben Hutchings [Wed, 12 Feb 2014 22:14:43 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_stats

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_test
Ben Hutchings [Wed, 12 Feb 2014 22:14:38 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_test

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of string set types
Ben Hutchings [Wed, 12 Feb 2014 22:14:33 +0000 (22:14 +0000)]
ethtool: Expand documentation of string set types

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Update documentation of struct ethtool_pauseparam
Ben Hutchings [Wed, 12 Feb 2014 22:14:28 +0000 (22:14 +0000)]
ethtool: Update documentation of struct ethtool_pauseparam

Convert the inline comments to kernel-doc format.

Explicitly specify that non-zero autoneg is an error if link
autonegotiation is disabled.

Specify that pause capabilities should be advertised dependent on link
autonegotiation, not the autoneg flag here.  There is no way to
opt-out of pause frame autonegotiation, and this improves behaviour
when the link partner is configured to follow pause frame
autonegotiation and our interface is not.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_ringparam
Ben Hutchings [Wed, 12 Feb 2014 22:14:23 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_ringparam

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_eeprom
Ben Hutchings [Wed, 12 Feb 2014 22:14:17 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_eeprom

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_regs
Ben Hutchings [Wed, 12 Feb 2014 22:14:13 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_regs

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_wol
Ben Hutchings [Wed, 12 Feb 2014 22:14:07 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_wol

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_drvinfo
Ben Hutchings [Wed, 12 Feb 2014 22:14:03 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_drvinfo

Replace the inline comments (and some others below) with a full
explanation of the semantics, in kernel-doc format.  Specify which
strings may be empty.  Document the relationship with other commands.

Replace the 'deprecation' of some fields with a proper explanation of
the conversion to generalised string sets, as userland programs may
not be able to assume that ETHTOOL_GSSET_INFO is available.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_cmd
Ben Hutchings [Wed, 12 Feb 2014 22:13:57 +0000 (22:13 +0000)]
ethtool: Expand documentation of struct ethtool_cmd

struct ethtool_cmd has very limited documentation; it contains
several obscure or obsolete fields and several with non-obvious
interpretation.

Replace the inline comments (and some others below) with a full
explanation of the semantics as well as I understand them, in
kernel-doc format.  Formally deprecate some fields that seem to be of
historical use only.

Extend the comment about 32/64-bit compatibility to cover all
ethtool structures.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoENGR00323026 iMX6SX:MCC Disable ADC1 and ADC2 in MCC DTS
Ye.Li [Thu, 17 Jul 2014 03:50:30 +0000 (11:50 +0800)]
ENGR00323026 iMX6SX:MCC Disable ADC1 and ADC2 in MCC DTS

M4 has occupied the ADC1 and ADC2 in RDC, must disable them in DTS
to avoid kernel boot panic.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 0588a0133d649ebdab32d7072c64a051845191f7)

9 years agoMLK-9148 arm: create standalone dts for a9 when m4 is running
Richard Zhu [Tue, 22 Apr 2014 06:49:48 +0000 (14:49 +0800)]
MLK-9148 arm: create standalone dts for a9 when m4 is running

Create standalone dts for a9 when m4 is running, since there
are some conflictions in the following modules
* i2c3
* flexcan1&2
* uart2

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit c156cd72ffa85459b7a0da1912404ec934d87cc1)

9 years agonet: fec: implement rx_copybreak to improve rx performance
Nimrod Andy [Tue, 30 Sep 2014 01:28:05 +0000 (09:28 +0800)]
net: fec: implement rx_copybreak to improve rx performance

- Copy short frames and keep the buffers mapped, re-allocate skb instead of
  memory copy for long frames.
- Add support for setting/getting rx_copybreak using generic ethtool tunable

Changes V3:
* As Eric Dumazet's suggestion that removing the copybreak module parameter
  and only keep the ethtool API support for rx_copybreak.

Changes V2:
* Implements rx_copybreak
* Rx_copybreak provides module parameter to change this value
* Add tunable_ops support for rx_copybreak

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMLK-9645: dts: imx6q/dl-sabresd: add MIPI DSI support
Robby Cai [Mon, 29 Sep 2014 06:32:08 +0000 (14:32 +0800)]
MLK-9645: dts: imx6q/dl-sabresd: add MIPI DSI support

Add mipi dsi support on imx6q/dl sabresd board

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-9651 arm: dts: imx6: add i.mx6sx 17x17 and 19x19 arm2 board support
Anson Huang [Tue, 30 Sep 2014 04:21:39 +0000 (12:21 +0800)]
MLK-9651 arm: dts: imx6: add i.mx6sx 17x17 and 19x19 arm2 board support

Add i.MX6SX 17x17 and 19x19 ARM2 board support.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agousb: core: return -ENOTSUPP for all targeted hosts
Peter Chen [Mon, 29 Sep 2014 02:09:31 +0000 (10:09 +0800)]
usb: core: return -ENOTSUPP for all targeted hosts

The current code only returns -ENOTSUPP for OTG host, but in fact,
embedded host also needs to returns -ENOTSUPP if the peripheral
is not at TPL.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: using devm_request_irq to instead of request_irq
Peter Chen [Mon, 29 Sep 2014 01:30:10 +0000 (09:30 +0800)]
usb: chipidea: using devm_request_irq to instead of request_irq

Using devm_request_irq to instead of request_irq.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoof: add vendor prefix for Chipidea
Peter Chen [Mon, 22 Sep 2014 00:14:18 +0000 (08:14 +0800)]
of: add vendor prefix for Chipidea

Adds chipidea to the list of DT vendor prefixes.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: enhance kernel-doc format
Peter Chen [Mon, 22 Sep 2014 00:14:17 +0000 (08:14 +0800)]
usb: chipidea: enhance kernel-doc format

Some kernel-doc style comment are not satisfied for format, fix them.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: otg initialization is only needed when the gadget is supported
Peter Chen [Mon, 22 Sep 2014 00:14:16 +0000 (08:14 +0800)]
usb: chipidea: otg initialization is only needed when the gadget is supported

We have only needed to enable otg initialization when both of
below conditions are satisfied:

- The controller is otg capable
- The gadget function is enabled

If the controller is otg capable, but is host-only configuration, we do
not need to access register otgsc and do any otg operations (eg, create
otg workqueue).

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add TPL support for targeted hosts
Peter Chen [Tue, 19 Aug 2014 01:51:56 +0000 (09:51 +0800)]
usb: chipidea: add TPL support for targeted hosts

For OTG and Embedded hosts, they may need TPL (Targeted Peripheral List)
for usb certification and other vender specific requirements, the
platform can tell chipidea core driver if it supports tpl through DT
or platform data.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: common: add API to get if the platform supports TPL
Peter Chen [Tue, 19 Aug 2014 01:51:55 +0000 (09:51 +0800)]
usb: common: add API to get if the platform supports TPL

The TPL (Targeted Peripheral List) is used for targeted hosts
(non-PC hosts), and it can be used at USB OTG & EH certification
and some specific products which need white list.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: core: Kconfig: TPL should apply for both OTG and EH
Peter Chen [Tue, 19 Aug 2014 01:51:54 +0000 (09:51 +0800)]
usb: core: Kconfig: TPL should apply for both OTG and EH

Update configuration for USB_OTG_WHITELIST, any targeted hosts
(non PC-hosts) can have TPL (Targered Peripheral List).

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: core: TPL should apply for both OTG and EH
Peter Chen [Tue, 19 Aug 2014 01:51:53 +0000 (09:51 +0800)]
usb: core: TPL should apply for both OTG and EH

According to On-The-Go and Embedded Host Supplement to the USB Revision
2.0 Specification, the targeted hosts (non-PC hosts) include both
embedded hosts and otg, and each targeted host product defines the
set of supported peripherals on a TPL (Targeted Peripheral List). So,
TPL should apply for both OTG and embedded host, and the otg support is
not a must for embedded host.

The TPL support feature will only be effect when CONFIG_USB_OTG_WHITELIST
has been chosen and hcd->tpl_support flag is set, it can avoid the enumeration
fails problem for the user who chooses CONFIG_USB_OTG_WHITELIST wrongly.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: hcd: add TPL support flag
Peter Chen [Tue, 19 Aug 2014 01:51:52 +0000 (09:51 +0800)]
usb: hcd: add TPL support flag

The targeted hosts (non-PC hosts) need to have TPL (Targeted Peripheral List)
for USB OTG & EH certification and other vendor specific requirements.

The platform who needs TPL feature should set this flag at usb host
controller driver.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:

include/linux/usb/hcd.h

9 years agodoc: dt-binding: ci-hdrc-imx: add TPL support
Peter Chen [Tue, 19 Aug 2014 01:51:57 +0000 (09:51 +0800)]
doc: dt-binding: ci-hdrc-imx: add TPL support

TPL (Targeted Peripheral List) is needed for targets host
(OTG and Embedded Hosts) for usb certification and other
vendor specific requirements.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: ci_hdrc_imx doc: fsl,usbphy is required
Markus Pargmann [Tue, 22 Jul 2014 02:09:44 +0000 (10:09 +0800)]
usb: ci_hdrc_imx doc: fsl,usbphy is required

fsl,usbphy is no optional property. This patch moves it to the list of
required properties.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agochipidea: usbmisc_imx: Add USB support for VF610 SoCs
Stefan Agner [Mon, 22 Sep 2014 00:14:15 +0000 (08:14 +0800)]
chipidea: usbmisc_imx: Add USB support for VF610 SoCs

This adds Vybrid VF610 SoC support. The IP is very similar to i.MX6,
however, the non-core registers are spread in two different register
areas. Hence we support multiple instances of the USB misc driver
and add the driver instance to the imx_usbmisc_data structure.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: debug: fix sparse non static symbol warnings
Wei Yongjun [Tue, 22 Jul 2014 02:09:45 +0000 (10:09 +0800)]
usb: chipidea: debug: fix sparse non static symbol warnings

Fixes the following sparse warnings:

drivers/usb/chipidea/debug.c:211:5: warning:
 symbol 'ci_otg_show' was not declared. Should it be static?
drivers/usb/chipidea/debug.c:334:5: warning:
 symbol 'ci_registers_show' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: ci_hdrc_imx: Return -EINVAL for missing USB PHY
Markus Pargmann [Tue, 22 Jul 2014 02:09:43 +0000 (10:09 +0800)]
usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY

-ENODEV is interpreted by the generic driver probing function as a
non-matching driver. This leads to a missing probe failure message.

Also a missing USB PHY is more of an invalid configuration of the usb
driver because it is necessary.

This patch returns -EINVAL if devm_usb_get_phy_by_phandle() returned -ENODEV.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: msm: Initialize offset of the capability registers
Ivan T. Ivanov [Sun, 4 May 2014 01:24:42 +0000 (09:24 +0800)]
usb: chipidea: msm: Initialize offset of the capability registers

Since commit 62bb84e (usb: gadget: ci13xxx: convert to platform device)
start address of the capability registers is not passed correctly to
udc_probe(). Fix this.

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 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>