]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoMLK-9786 net: fec: Add busfreq support to the driver
Fugang Duan [Tue, 4 Nov 2014 05:23:34 +0000 (13:23 +0800)]
MLK-9786 net: fec: Add busfreq support to the driver

Add request_bus_freq() and release_bus_freq() calls to the
various drivers to ensure that the DDR and AHB are the requested
frequency before the driver starts its task.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agonet: fec: fix suspend broken on multiple MACs sillicons
Fugang Duan [Mon, 3 Nov 2014 04:59:16 +0000 (12:59 +0800)]
net: fec: fix suspend broken on multiple MACs sillicons

On i.MX6SX sdb platform, there has two same enet MACs, after system up,
just eth0 is up, and then do suspend/resume test:

[   50.437967] PM: Syncing filesystems ... done.
[   50.476924] Freezing user space processes ... (elapsed 0.005 seconds) done.
[   50.490093] Freezing remaining freezable tasks ... (elapsed 0.004 seconds) done.
[   50.559771] ------------[ cut here ]------------
[   50.564453] WARNING: CPU: 0 PID: 575 at drivers/clk/clk.c:851 __clk_disable+0x60/0x6c()
[   50.572475] Modules linked in:
[   50.575578] CPU: 0 PID: 575 Comm: sh Not tainted 3.18.0-rc2-next-20141031-00007-gf61135b #21
[   50.584031] Backtrace:
[   50.586550] [<80011ecc>] (dump_backtrace) from [<8001206c>] (show_stack+0x18/0x1c)
[   50.594136]  r6:808a7a54 r5:00000000 r4:00000000 r3:00000000
[   50.599920] [<80012054>] (show_stack) from [<806ab3c0>] (dump_stack+0x80/0x9c)
[   50.607187] [<806ab340>] (dump_stack) from [<8002a3e8>] (warn_slowpath_common+0x6c/0x8c)
[   50.615294]  r5:00000353 r4:00000000
[   50.618940] [<8002a37c>] (warn_slowpath_common) from [<8002a42c>] (warn_slowpath_null+0x24/0x2c)
[   50.627738]  r8:00000000 r7:be144c44 r6:be015600 r5:80070013 r4:be015600
[   50.634573] [<8002a408>] (warn_slowpath_null) from [<804f8d4c>] (__clk_disable+0x60/0x6c)
[   50.642777] [<804f8cec>] (__clk_disable) from [<804f8e5c>] (clk_disable+0x2c/0x38)
[   50.650359]  r4:be015600 r3:00000000
[   50.654006] [<804f8e30>] (clk_disable) from [<80420ab4>] (fec_enet_clk_enable+0xc4/0x258)
[   50.662196]  r5:be3cb620 r4:be3cb000
[   50.665838] [<804209f0>] (fec_enet_clk_enable) from [<80421178>] (fec_suspend+0x30/0x180)
[   50.674026]  r7:be144c44 r6:be144c10 r5:8037f5a4 r4:be3cb000
[   50.679802] [<80421148>] (fec_suspend) from [<8037f5d8>] (platform_pm_suspend+0x34/0x64)
[   50.687906]  r10:00000000 r9:00000000 r8:00000000 r7:be144c44 r6:be144c10 r5:8037f5a4
[   50.695852]  r4:be144c10 r3:80421148
[   50.699511] [<8037f5a4>] (platform_pm_suspend) from [<8038784c>] (dpm_run_callback.isra.14+0x34/0x6c)
[   50.708764] [<80387818>] (dpm_run_callback.isra.14) from [<80387f00>] (__device_suspend+0x12c/0x2a4)
[   50.717909]  r9:8098ec8c r8:80973bec r6:00000002 r5:811c7038 r4:be144c10
[   50.724746] [<80387dd4>] (__device_suspend) from [<803894fc>] (dpm_suspend+0x64/0x224)
[   50.732675]  r8:80973bec r7:be144c10 r6:8098ec24 r5:811c7038 r4:be144cc4
[   50.739509] [<80389498>] (dpm_suspend) from [<8038999c>] (dpm_suspend_start+0x60/0x68)
[   50.747438]  r10:8082fa24 r9:00000000 r8:00000004 r7:00000003 r6:00000000 r5:8116ec80
[   50.755386]  r4:00000002
[   50.757969] [<8038993c>] (dpm_suspend_start) from [<800679d8>] (suspend_devices_and_enter+0x90/0x3ec)
[   50.767202]  r4:00000003 r3:8116eca0
[   50.770843] [<80067948>] (suspend_devices_and_enter) from [<80067f40>] (pm_suspend+0x20c/0x2a4)
[   50.779553]  r8:00000004 r7:00000003 r6:00000000 r5:8116ec8c r4:00000003
[   50.786394] [<80067d34>] (pm_suspend) from [<80066858>] (state_store+0x70/0xc0)
[   50.793718]  r6:8116ec90 r5:00000003 r4:bd88a800 r3:0000006d
[   50.799496] [<800667e8>] (state_store) from [<802b0384>] (kobj_attr_store+0x1c/0x28)
[   50.807251]  r10:bd399f78 r8:00000000 r7:bd88a800 r6:bd88a800 r5:00000004 r4:bd085680
[   50.815219] [<802b0368>] (kobj_attr_store) from [<80153090>] (sysfs_kf_write+0x54/0x58)
[   50.823252] [<8015303c>] (sysfs_kf_write) from [<80151fd8>] (kernfs_fop_write+0xd0/0x194)
[   50.831441]  r6:00000004 r5:bd08568c r4:bd085680 r3:8015303c
[   50.837220] [<80151f08>] (kernfs_fop_write) from [<800eddb4>] (vfs_write+0xb8/0x1a8)
[   50.844975]  r10:00000000 r9:00000000 r8:00000000 r7:bd399f78 r6:01336408 r5:00000004
[   50.852924]  r4:bc584dc0
[   50.855505] [<800edcfc>] (vfs_write) from [<800ee0b8>] (SyS_write+0x48/0x88)
[   50.862567]  r10:00000000 r8:00000000 r7:01336408 r6:00000004 r5:bc584dc0 r4:bc584dc0
[   50.870537] [<800ee070>] (SyS_write) from [<8000eb00>] (ret_fast_syscall+0x0/0x48)
[   50.878120]  r9:bd398000 r8:8000ecc4 r7:00000004 r6:76f42b48 r5:01336408 r4:00000004
[   50.885983] ---[ end trace 7545115d752a316a ]---
[   50.890765] ------------[ cut here ]------------

The root cause is that eth1 is not opened and clock is not enabled, and .suspend() still
call .fec_enet_clk_enable() to disable clock.

To avoid the broken, let it check network device up status by calling .netif_running()
before disable/enable clocks.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMLK-9787 tty: serial: imx: avoid dma overwrite issue
Fugang Duan [Thu, 30 Oct 2014 04:56:09 +0000 (12:56 +0800)]
MLK-9787 tty: serial: imx: avoid dma overwrite issue

The patch fix the potential issue that dma buffer overwrite.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoMLK-9780 thermal: imx6: disable tempmon irq and clk when thermal driver suspend
Bai Ping [Fri, 31 Oct 2014 09:01:04 +0000 (17:01 +0800)]
MLK-9780 thermal: imx6: disable tempmon irq and clk when thermal driver suspend

When the thermal driver doing suspend, disable the tempmon alarm irq
and clk, after the system resume, re-enable the irq and clk.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9777 cpufreq: imx6: fix the high bus count mismatch
Bai Ping [Fri, 31 Oct 2014 08:28:03 +0000 (16:28 +0800)]
MLK-9777 cpufreq: imx6: fix the high bus count mismatch

Normally, the system is booting up with higher cpufreq. In the
cpufreq set_target_index we will release the high bus mode if
the target cpu frequency is the lowest. It will release the high
bus mode and dcrease the high_bus_count.This will lead to a wrong
release of high bus mode. So, in the cpufreq_init function, if the
original frequency is not the lowest, we need request high busfreq.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9750 ARM: Kconfig: increase FORCE_MAX_ZONEORDER for ARCH_MXC
Jason Liu [Wed, 11 Sep 2013 02:50:09 +0000 (10:50 +0800)]
MLK-9750 ARM: Kconfig: increase FORCE_MAX_ZONEORDER for ARCH_MXC

Need increase the FORCE_MAX_ZONEORDER to 14 for high resolution camera
(GPU 2D user case). The default value 11(4MB) is not enough now.

Signed-off-by: Jason Liu <r64343@freescale.com>
(cherry picked from commit fff642ffe868cb55f5caec0501e36fd28b6ece50)

9 years agoMLK-9739 cpufreq: imx: add request busfreq support for cpufreq
Bai Ping [Fri, 24 Oct 2014 08:13:51 +0000 (16:13 +0800)]
MLK-9739 cpufreq: imx: add request busfreq support for cpufreq

Request high bus frequency before scaling up the CPU frequency
and release high bus frequency after scaling down the CPU frequency

Doing so makes a balance between high performance and lower power
consumption.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9721 arm: imx6: add busfreq support for imx6sl
Bai Ping [Mon, 27 Oct 2014 06:28:08 +0000 (14:28 +0800)]
MLK-9721 arm: imx6: add busfreq support for imx6sl

Add busfreq node in the dtsi file and modified the source code
to support imx6sl to enter low busfreq mode.

As the clk tree of imx6sl on 3.14 branch different with imx6q,
imx6sx, etc. So the busfreq change flow need some additional
code. Especially, after change the bus frequency to 24MHz, the
clock parent-child relationship need one more step to update.

Before change to 24MHz low bus mode, the clock tree between the
OSC and MMDC as below:

OSC
 \__pll2_bypass_src
     \__pll2
          \__pll2_bypass
       \_pll2_bus
          \_..... mmdc

After change to 24MHz low bus mode, we bypass the pll2 in asm code, so
the correct clock tree as below:

OSC
  \_pll2_bypass_src
     \_pll2_bypass
      \_pll2_bus
   \_ .... mmdc

So the parent of pll2_bypass clock need to be set to pll2_bypass_src after
entering 24MHz mode, and set to pll2 after exiting 24MHz to reflect the correct
parent-child relationship in kernel.

Changing dev_dbg to printk to ease the debug of busfreq driver, print the busfreq
change information as needed.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9719-4 ARM: dts: imx6qdl-sabreauto: Add V4L2 output support
Robby Cai [Thu, 23 Oct 2014 12:51:33 +0000 (20:51 +0800)]
MLK-9719-4 ARM: dts: imx6qdl-sabreauto: Add V4L2 output support

Add v4l2 output support for imx6qdl sabreauto board

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-9719-3 ARM: dts: imx6qdl-sabreauto: Add pwm setting for backlight
Robby Cai [Thu, 23 Oct 2014 12:42:24 +0000 (20:42 +0800)]
MLK-9719-3 ARM: dts: imx6qdl-sabreauto: Add pwm setting for backlight

Add PWM setting for brightness control

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-9719-2 ARM: dts: imx6qdl-sabreauto: change disp_id to 1 for HDMI
Robby Cai [Thu, 23 Oct 2014 12:18:46 +0000 (20:18 +0800)]
MLK-9719-2 ARM: dts: imx6qdl-sabreauto: change disp_id to 1 for HDMI

disp_id 0 is already used for LDB.
The patch fixed the conflict and supported both in one dts file.

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-9719-1 ARM: dts: imx6qdl-sabreauto: add lvds support
Robby Cai [Wed, 22 Oct 2014 07:10:44 +0000 (15:10 +0800)]
MLK-9719-1 ARM: dts: imx6qdl-sabreauto: add lvds support

Enable LDB driver for imx6q/dl sabreauto board.

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-6304 IPUv3 device: Enable IC task when cropping is needed.
Fancy Fang [Mon, 20 Oct 2014 09:09:38 +0000 (17:09 +0800)]
MLK-6304 IPUv3 device: Enable IC task when cropping is needed.

For the case that, the input and output size are both 640x480,
but the video20's related framebuffer resolution is 1024x768,
so the output should be cropped. In this situation, the ipu
task should be set to IC_MODE to avoid 'IPU_CHECK_ERR_PROC_NO_NEED'
error reporting.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit 3f90d64eb1510211048a8516bbf223215e08331d)

9 years agoMLK-9716 net: fec: Fix the kernel panic issue on i.MX6SL-EVK board.
Luwei Zhou [Wed, 22 Oct 2014 06:32:56 +0000 (14:32 +0800)]
MLK-9716 net: fec: Fix the kernel panic issue on i.MX6SL-EVK board.

The i.MX6SL-EVK FEC IP doesn't support PTP feature. After adding
PPS support, irq handler will invoke fec_check_pps_status function.
We need to add a condition judge.

Unable to handle kernel NULL pointer dereference at virtual address 000000a8
pgd = 80004000
[000000a8] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.17-00946-g1c543fd #7
task: 80cc8028 ti: 80cbc000 task.ti: 80cbc000
PC is at ptp_clock_event+0x144/0x190
LR is at __getnstimeofday+0x3c/0x140
pc : [<8044f4f8>]    lr : [<8006e148>]    psr: 60000193
sp : 80cbde30  ip : 5447606f  fp : 00000001
r10: 80cbde58  r9 : 80d152c5  r8 : 00000000
r7 : 088000f7  r6 : 00000000  r5 : 00000608  r4 : ab1cf4c0
r3 : 00000002  r2 : 3b9ac9ff  r1 : 80cbde30  r0 : 00000000
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: a8d8804a  DAC: 00000015
Process swapper/0 (pid: 0, stack limit = 0x80cbc240)
Stack: (0x80cbde30 to 0x80cbe000)
de20:                                     5447606f 0b0b3ebd 00000001 ab1cf4c0
de40: 00000608 00000000 088000f7 80cc48c0 ab00df00 803b0744 00000002 60000193
de60: 80cc48c0 8002e708 ab1cf000 02000000 00000001 ab1cf4c0 00000092 803abbc0
de80: 803abaac ab2d0f80 ab00df5c 00000000 00000000 80063808 00000002 e6484c37
dea0: e6484c37 ab00df00 ab00df5c ab2d0f80 00000092 00000000 80d152c3 ab7400d4
dec0: 00000000 8006398c ab00df00 ab00df5c 00000064 80066840 00000092 80cb8e54
dee0: 80cbc000 800631ec 80cc4c34 8000eed4 c080210c 80cc4da0 80cbdf20 c0802100
df00: 80ccaa1c 80008574 8006e830 80460f9c 60000113 ffffffff 80cbdf54 80012300
df20: 80cbdf68 3b9aca00 e6483614 00000002 e6429e70 00000002 ab7400d0 00000001
df40: 80ccaa1c 80d152c3 ab7400d4 00000000 0000001a 80cbdf68 8006e830 80460f9c
df60: 60000113 ffffffff e6483614 00000002 80cbc000 80d6ede4 00000001 ab7400d0
df80: 80cbc000 80d6ede4 00000001 80461124 00000000 80cbc000 00000000 80cc49a4
dfa0: 8065b50c 80d152c3 00000001 8000f1e4 00000000 80062f18 80cab938 80c6eaa0
dfc0: ffffffff ffffffff 80c6e57c 00000000 00000000 80cab938 00000000 10c5387d
dfe0: 80cc4928 80cab934 80cc90b0 8000406a 00000000 80008074 00000000 00000000
[<8044f4f8>] (ptp_clock_event) from [<803b0744>] (fec_ptp_check_pps_event+0xd4/0xe4)
[<803b0744>] (fec_ptp_check_pps_event) from [<803abbc0>] (fec_enet_interrupt+0x114/0x16c)
[<803abbc0>] (fec_enet_interrupt) from [<80063808>] (handle_irq_event_percpu+0x50/0x198)
[<80063808>] (handle_irq_event_percpu) from [<8006398c>] (handle_irq_event+0x3c/0x5c)
[<8006398c>] (handle_irq_event) from [<80066840>] (handle_fasteoi_irq+0x98/0x158)
[<80066840>] (handle_fasteoi_irq) from [<800631ec>] (generic_handle_irq+0x20/0x30)
[<800631ec>] (generic_handle_irq) from [<8000eed4>] (handle_IRQ+0x4c/0xb0)
[<8000eed4>] (handle_IRQ) from [<80008574>] (gic_handle_irq+0x28/0x5c)
[<80008574>] (gic_handle_irq) from [<80012300>] (__irq_svc+0x40/0x74)
Exception stack(0x80cbdf20 to 0x80cbdf68)
df20: 80cbdf68 3b9aca00 e6483614 00000002 e6429e70 00000002 ab7400d0 00000001
df40: 80ccaa1c 80d152c3 ab7400d4 00000000 0000001a 80cbdf68 8006e830 80460f9c
df60: 60000113 ffffffff
[<80012300>] (__irq_svc) from [<80460f9c>] (cpuidle_enter_state+0x50/0xe8)
[<80460f9c>] (cpuidle_enter_state) from [<80461124>] (cpuidle_idle_call+0xf0/0x160)
[<80461124>] (cpuidle_idle_call) from [<8000f1e4>] (arch_cpu_idle+0x8/0x44)
[<8000f1e4>] (arch_cpu_idle) from [<80062f18>] (cpu_startup_entry+0x60/0x150)
[<80062f18>] (cpu_startup_entry) from [<80c6eaa0>] (start_kernel+0x300/0x364)
Code: eaffffbc e1a0000d ebf07d11 e1a0100d (e59800a8)
---[ end trace 085ff044896a7d08 ]---
Kernel panic - not syncing: Fatal exception in interrupt

Tested-by: Bai Ping <b51503@freescale.com>
Signed-off-by: Luwei Zhou <b45643@freescale.com>
9 years agoMLK-9698 ARM:imx6x: Fix build break when CONFIG_SMP is not defined
Ranjani Vaidyanathan [Wed, 15 Oct 2014 15:31:07 +0000 (10:31 -0500)]
MLK-9698 ARM:imx6x: Fix build break when CONFIG_SMP is not defined

Ensure that all the code in busfreq driver that is SMP dependent is
enclosed with CONFIG_SMP define, else the build breaks when CONFIG_SMP=n.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
9 years agoMLK-9685 ARM:imx6x:Ensure that the kernel can boot with "nosmp" in the command line
Ranjani Vaidyanathan [Mon, 13 Oct 2014 21:25:18 +0000 (16:25 -0500)]
MLK-9685 ARM:imx6x:Ensure that the kernel can boot with "nosmp" in the command line

When nosmp is added to the command line, setup_max_cpus is set to 0
by the kernel. And this results in num_possible_cpus() returning 0 and the kernel
does not boot.
This patch ensures that at least one CPU's state is set to "possible" as part
of the boot process.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
9 years agoENGR00326248 pxp v4l2 output: Add YUV444 support
Sandor Yu [Thu, 7 Aug 2014 06:53:44 +0000 (14:53 +0800)]
ENGR00326248 pxp v4l2 output: Add YUV444 support

Add YUV444 support.

Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit 847fc84c870b16f92dfb2b9386e6f118137a29f2)

9 years agoARM: imx: add standby mode support for suspend
Anson Huang [Mon, 23 Jun 2014 08:42:44 +0000 (16:42 +0800)]
ARM: imx: add standby mode support for suspend

Add standby mode support for suspend, to enter standby mode:

echo standby > /sys/power/state;

Use UART or RTC alarm to wake up system, when system enters
standby mode, SOC will enter STOP mode with ARM core kept
power on and 24M XTAL on.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: mem bit must be cleared before entering DSM mode
Anson Huang [Mon, 23 Jun 2014 08:42:43 +0000 (16:42 +0800)]
ARM: imx: mem bit must be cleared before entering DSM mode

According to hardware design, mem bit must be clear before
entering DSM mode, as ARM core will be power gated in DSM mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoMLK-9708 arm: imx: add low power idle support for i.mx6sx
Anson Huang [Mon, 20 Oct 2014 08:16:20 +0000 (16:16 +0800)]
MLK-9708 arm: imx: add low power idle support for i.mx6sx

1. improve imx6q_set_int_mem_clk_lpm routine;
2. export rbc enable interface for cpuidle;
3. enable low power idle for i.MX6SX:

   WFI            -> first level idle;
   WAIT mode      -> second level idle;
   Low power idle -> third level idle, only when system is in low bus mode.

In low powe idle mode, below operations will be done:

   ARM power off;
   AHB freq lower to 3MHz;
   PERCLK freq lower to 6MHz;
   MMDC freq lower to 1MHz;

Anatop will be put into low power mode, and regular band-gap will
be off and low power band-gap will be enabled instead.

Also, in low power idle mode, 24MHz XTAL power will be off and 24MHz clk
source will be switched to RC-OSC to save power, this feature is only
enabled on i.MX6SX TO1.2.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agonet: fec: ptp: Enable PPS output based on ptp clock
Luwei Zhou [Fri, 10 Oct 2014 05:15:30 +0000 (13:15 +0800)]
net: fec: ptp: Enable PPS output based on ptp clock

FEC ptp timer has 4 channel compare/trigger function. It can be used to
enable pps output.
The pulse would be ouput high exactly on N second. The pulse ouput high
on compare event mode is used to produce pulse per second.  The pulse
width would be one cycle based on ptp timer clock source.Since 31-bit
ptp hardware timer is used, the timer will wrap more than 2 seconds. We
need to reload the compare compare event about every 1 second.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoptp: drivers: set the number of programmable pins.
Richard Cochran [Thu, 20 Mar 2014 21:21:55 +0000 (22:21 +0100)]
ptp: drivers: set the number of programmable pins.

This patch updates the many PTP Hardware Clock drivers with the
newly introduced field that advertises the number of programmable
pins. Some of these devices do have programmable pins, but the
implementation will have to wait for follow on patches.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoptp: introduce programmable pins.
Richard Cochran [Thu, 20 Mar 2014 21:21:52 +0000 (22:21 +0100)]
ptp: introduce programmable pins.

This patch adds a pair of new ioctls to the PTP Hardware Clock device
interface. Using the ioctls, user space programs can query each pin to
find out its current function and also reprogram a different function
if desired.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: ptp: Use hardware algorithm to adjust PTP counter.
Luwei Zhou [Fri, 10 Oct 2014 05:15:29 +0000 (13:15 +0800)]
net: fec: ptp: Use hardware algorithm to adjust PTP counter.

The FEC IP supports hardware adjustment for ptp timer. Refer to the description of
ENET_ATCOR and ENET_ATINC registers in the spec about the hardware adjustment. This
patch uses hardware support to adjust the ptp offset and frequency on the slave side.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Fugang Duan <b38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: ptp: Use the 31-bit ptp timer.
Luwei Zhou [Fri, 10 Oct 2014 05:15:28 +0000 (13:15 +0800)]
net: fec: ptp: Use the 31-bit ptp timer.

When ptp switches from software adjustment to hardware ajustment, linux ptp can't converge.
It is caused by the IP limit. Hardware adjustment logcial have issue when ptp counter
runs over 0x80000000(31 bit counter). The internal IP reference manual already remove 32bit
free-running count support. This patch replace the 32-bit PTP timer with 31-bit.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: Fix sparse warnings with different lock contexts for basic block
Nimrod Andy [Mon, 13 Oct 2014 02:53:48 +0000 (10:53 +0800)]
net: fec: Fix sparse warnings with different lock contexts for basic block

reproduce:
make  ARCH=arm C=1 2>fec.txt drivers/net/ethernet/freescale/fec_main.o
cat fec.txt

sparse warnings:
drivers/net/ethernet/freescale/fec_main.c:2916:12: warning: context imbalance
in 'fec_set_features' - different lock contexts for basic block

Christopher Li suggest to change as below:
if (need_lock) {
lock();
do_something_real();
unlock();
} else {
do_something_real();
}

Reported-by: Fabio Estevam <festevam@gmail.com>
Suggested-by: Christopher Li <sparse@chrisli.org>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agopwm: imx: set can_sleep flag for imx_pwm
Shawn Guo [Fri, 23 May 2014 08:41:28 +0000 (16:41 +0800)]
pwm: imx: set can_sleep flag for imx_pwm

The .config() hook imx_pwm_config() calls clk APIs like clk_prepare()
and clk_get_rate(), which might sleep, so we need to set can_sleep flag
on pwm_chip.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 31c4fa3442570d001f58303dea36d81693bc199c)

9 years agopwm: imx: Avoid sample FIFO overflow for i.MX PWM version2
Liu Ying [Wed, 28 May 2014 10:50:13 +0000 (18:50 +0800)]
pwm: imx: Avoid sample FIFO overflow for i.MX PWM version2

The i.MX PWM version2 is embedded in several i.MX SoCs, such as i.MX27,
i.MX51 and i.MX6SL.  There is a 4-word (16 bit) sample FIFO in this IP.
Each FIFO slot determines the duty period of a PWM waveform in one full
cycle.  The IP spec mentions that we should not write a fourth sample
because the FIFO will become full and triggers a FIFO write error (FWE)
which will prevent the PWM from starting once it is enabled.  In order
to avoid any sample FIFO overflow issue, this patch clears all sample
FIFO by doing software reset in the configuration hook when the
controller is disabled or waits for a full PWM cycle to get a
relinquished FIFO slot when the controller is enabled and the FIFO is
fully loaded.

The FIFO overflow issue can be reproduced by the following commands on
the i.MX6SL EVK platform, assuming we use PWM2 for the debug LED which
is driven by the pin HSIC_STROBE and the maximal brightness is 255.

echo 0   > /sys/class/leds/user/brightness
echo 0   > /sys/class/leds/user/brightness
echo 0   > /sys/class/leds/user/brightness
echo 0   > /sys/class/leds/user/brightness
echo 255 > /sys/class/leds/user/brightness

Here, FWE happens (PWMSR register reads 0x58) and the LED can not be
lighten.

Another way to reproduce the FIFO overflow issue is to run this script:

while true;
do echo 255 > /sys/class/leds/user/brightness;
done

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: linux-pwm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 137fd45ffec15db14034990ceac890975cae7a32)

9 years agopwm: imx: Cleanup indentation for register definitions
Liu Ying [Wed, 28 May 2014 10:50:12 +0000 (18:50 +0800)]
pwm: imx: Cleanup indentation for register definitions

This patch contains no logic change to cleanup indentation for register
definitions only.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: linux-pwm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 40f260c2cebb464dda6916055112963f1421a111)

9 years agopwm: imx: Fix the macro MX3_PWMCR_PRESCALER(x) definition
Liu Ying [Wed, 28 May 2014 10:50:11 +0000 (18:50 +0800)]
pwm: imx: Fix the macro MX3_PWMCR_PRESCALER(x) definition

This patch adds missing parentheses around the argument of the macro
MX3_PWMCR_PRESCALER(x) to avoid any potential macro expansion issue.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: linux-pwm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit bd59bdc898623e6c948a9f900250ce7343cf9012)

9 years agoMLK-9704 videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity check in...
Fancy Fang [Tue, 2 Sep 2014 07:46:01 +0000 (15:46 +0800)]
MLK-9704 videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity check in vm_iomap_memory().

When user requests V4L2_MEMORY_MMAP type buffers, the videobuf-core
will assign the corresponding offset to the 'boff' field of the
videobuf_buffer for each requested buffer sequentially. Later, user
may call mmap() to map one or all of the buffers with the 'offset'
parameter which is equal to its 'boff' value. Obviously, the 'offset'
value is only used to find the matched buffer instead of to be the
real offset from the buffer's physical start address as used by
vm_iomap_memory(). So, in some case that if the offset is not zero,
vm_iomap_memory() will fail.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
9 years agoMLK-9693 cpufreq: imx: increase cpufreq during suspend/resume
Bai Ping [Wed, 15 Oct 2014 01:04:02 +0000 (09:04 +0800)]
MLK-9693 cpufreq: imx: increase cpufreq during suspend/resume

During suspend/ressume, when cpufreq driver try to increase
Voltage/freq, it needs to control I2C/SPI to communicate with
external PMIC to adjust voltage, but these I2C/SPI devices may
be already suspended, to avoid such scenario, we adjust increase
cpufreq to highest setpoint before suspend.

As this pm notification's updating cpu policy may work together
with cpufreq governor, both of them may call set_target at same
time, so we need to add mutex lock to prevent this scenario,
otherwise, the clock use count will be wrong.

this patch is copyed from imx_3.10.y branch (commit: 6f015845f6f)

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9694 ARM: imx6: init enet MAC address
Fugang Duan [Wed, 15 Oct 2014 01:36:40 +0000 (09:36 +0800)]
MLK-9694 ARM: imx6: init enet MAC address

Enet get MAC address order:
From module parameters or kernel command line -> device tree ->
pfuse -> mac registers set by bootloader -> random mac address.

When there have no "fec.macaddr" parameters set in kernel command
line, enet driver get MAC address from device tree. And then if
the MAC address set in device tree and is valid, enet driver get
MAC address from device tree. Otherwise,enet get MAC address from
pfuse. So, in the condition, update the MAC address (read from pfuse)
to device tree.

Cherry-pick & Merge patches from:
149ac988a25b8d8eb86d05679cbb7b42819ff7a1 &
3269e5c06bdb2f7ab9bd5afa9bbfe46d872197d3

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoMLK-9691 net: fec: call .pm_qos_remove_request() in .ndo_stop() callback
Fugang Duan [Tue, 14 Oct 2014 08:44:57 +0000 (16:44 +0800)]
MLK-9691 net: fec: call .pm_qos_remove_request() in .ndo_stop() callback

Call .pm_qos_remove_request() in .ndo_stop() callback to avoid kernel
warning during enet open/close test.

Signed-off-by: Fugang Duan <B38611@freescale.com>
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>