]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00234411-2 CPUFREQ: fix one code bug on regulator restore when fail
Robin Gong [Thu, 22 Nov 2012 05:45:54 +0000 (13:45 +0800)]
ENGR00234411-2 CPUFREQ: fix one code bug on regulator restore when fail

Didn't care about pu_regulator is enabled or not when regulator restore if some
regulator set failed.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00234411-1 Sabreauto: fix error print COULD NOT SET GP VOLTAGE.
Robin Gong [Thu, 22 Nov 2012 05:31:05 +0000 (13:31 +0800)]
ENGR00234411-1 Sabreauto: fix error print COULD NOT SET GP VOLTAGE.

Didn't take more care about non-pfuze board, and there is two place in BSP will
call "mx6_cpu_regulator_init". It means regulator_get will be called twice on
every vddcore/vddsoc regulator. Then one value need set twice ,because from
regulator core view, there is two regulators share the same regulator. The non-
validate one will return error and print "COULD NOT SET GP VOLTAGE!!!!." on
Sabreauto board. The same as Sabrelite and ARM2 board.

Meanwhile, Sabreauto need be configured LDO bypass default.
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00233494 EPDC: Driver only supports 16 LUTs
Michael Minnick [Tue, 13 Nov 2012 18:51:13 +0000 (12:51 -0600)]
ENGR00233494 EPDC: Driver only supports 16 LUTs

This bug was introduced by ENGR00229290 which fixed
the problem of greater than 16 LUTs used when 5-bit
waveform loaded. The bug is that now the driver is also
restricted to using 16 LUTs in 4-bit mode.

The fix is to correct the test of the EPDC_FORMAT
register used to determine if a 5-bit waveform
is loaded.

Also removed the while loop in favor of a bitwise OR
used to determine if a chosen LUT has yet to be
acknowledged by the interrupt handler.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
11 years agoENGR00234354-2: board-mx6q_sabreauto aline weim-nor partition layout
Adrian Alonso [Wed, 21 Nov 2012 00:25:40 +0000 (18:25 -0600)]
ENGR00234354-2: board-mx6q_sabreauto aline weim-nor partition layout

* Aline weim-nor partition layout with u-boot expected
  offtsets
  "bootloader"  /dev/mtd0
  "bootenv"     /dev/mtd1
  "kernel"      /dev/mtd2
  "rootfs"      /dev/mtd3

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00234354-1: board-mx6q_sabreauto aline spi-nor partition layout
Adrian Alonso [Tue, 20 Nov 2012 23:17:26 +0000 (17:17 -0600)]
ENGR00234354-1: board-mx6q_sabreauto aline spi-nor partition layout

* Aline spi-nor partition layout
* set correct chip-select value

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00234217 cpufreq:fix loops_per_jiffy wrong on new suspend flow of cpufreq
Robin Gong [Tue, 20 Nov 2012 07:08:12 +0000 (15:08 +0800)]
ENGR00234217 cpufreq:fix loops_per_jiffy wrong on new suspend flow of cpufreq

Currently, we use pm_notifier to enter suspend/resume flow. But in the notifier
we only set cpufreq, didn't tell CPUFREQ core what the current cpufreq setting
now. So in the next time if CPUFREQ core find the current cpu frequncy is not
the value that CPUFREQ core want to set before. CPUFREQ core will force to set
the freqs.old with its own rule, which means the freqs.old will be MODIFYED
unexpectedly, and this will cause wrong loops_per_jiffy. We need add cpufreq_
notify_transition in the suspend/resume interface of cpufreq.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00229852 csi/v4l: lower the priority of "working queue empty" message
Robby Cai [Mon, 12 Nov 2012 08:17:14 +0000 (16:17 +0800)]
ENGR00229852 csi/v4l: lower the priority of "working queue empty" message

When pause the capture test program, the "working queue empty" message
shows up repeatedly. However this message is expected to show up because
there's no QBUF called. Change pr_err to pr_debug to keep it as debug level.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00232893 mx6sl: pxp/v4l2: add dependency on CONFIG_FB_MXC_ELCDIF_FB
Robby Cai [Thu, 8 Nov 2012 06:45:56 +0000 (14:45 +0800)]
ENGR00232893 mx6sl: pxp/v4l2: add dependency on CONFIG_FB_MXC_ELCDIF_FB

Without this dependency, we have to manually disable
CONFIG_VIDEO_MXC_PXP_V4L2 when disable CONFIG_FB_MXC_ELCDIF_FB.
Otherwise, a build error shows up. This patch fixed it.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00231307 csi/camera: add some ioctls
Robby Cai [Mon, 5 Nov 2012 08:29:18 +0000 (16:29 +0800)]
ENGR00231307 csi/camera: add some ioctls

added ioctls are:
VIDIOC_ENUM_FRAMEINTERVALS
VIDIOC_ENUM_FRAMESIZES
VIDIOC_ENUM_FMT
VIDIOC_DBG_G_CHIP_IDENT

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00234045 fix building error caused by ENGR00233366
Robin Gong [Mon, 19 Nov 2012 03:35:14 +0000 (11:35 +0800)]
ENGR00234045 fix building error caused by ENGR00233366

Forget submit some local change...

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00233366-4 WDOG LDO_BYPASS: fix wdog2 to reset external pmic in ldo bypass
Robin Gong [Mon, 19 Nov 2012 02:04:46 +0000 (10:04 +0800)]
ENGR00233366-4 WDOG LDO_BYPASS: fix wdog2 to reset external pmic in ldo bypass

On Sabresd board design, the WDOG_B output to reset external pmic source from
GPIO_2 pad which can be configured as WDOG2_WDOG_B, so if in ldo bypass mode,
we should use WDOG2 reset signal to reset pmic, not WDOG1. Also, configure the
related pins.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00233366-3 CPUFREQ:add cpufreq restore back if set fail
Robin Gong [Tue, 13 Nov 2012 05:02:57 +0000 (13:02 +0800)]
ENGR00233366-3 CPUFREQ:add cpufreq restore back if set fail

Restore back cpu freq and regulator if set fail.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00233366-2 mx6q_sabresd mx6sl_arm2 mx6sl_evk: config in LDO bypass
Robin Gong [Tue, 13 Nov 2012 07:06:16 +0000 (15:06 +0800)]
ENGR00233366-2 mx6q_sabresd mx6sl_arm2 mx6sl_evk: config in LDO bypass

U-boot will not care about ldo bypass, move these code from u-boot to kernel.
Move the workaround for PFUZE1.0 to kernel too.
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00233366-1 Anatop PFUZE: LDO bypass can be configed by cmdline
Robin Gong [Mon, 19 Nov 2012 02:21:00 +0000 (10:21 +0800)]
ENGR00233366-1 Anatop PFUZE: LDO bypass can be configed by cmdline

Currently, use CONFIG_MX6_INTER_LDO_BYPASS to enable/disable LDO bypass, and
use the same macro in u-boot too. It's not very friendly ,it will be more
flexible if use dynamic configure by command line input by u-boot.
Two ways to enable LDO bypass:
1. use command line:
You can set "ldo_active=on" or "ldo_active=off" in command line to enable/
disable LDO bypass.
2. set enable_ldo_mode value in board file:
If you didn't set the param in command line, every board
will use its default value, for example, you can find below code in arch/arm/
mach-mx6/mx6q_sabresd_pmic_pfuze100.c:
static int pfuze100_init(struct mc_pfuze *pfuze)
{
        ....
        /*use default mode(ldo bypass) if no param from cmdline*/
        if (enable_ldo_mode == LDO_MODE_DEFAULT)
                enable_ldo_mode = LDO_MODE_BYPASSED;
        ....
}

Note:
1.You should know clearly ldo bypass can be only enabled in the board
that mounted with external pmic to supply VDDARM_IN/VDDSOC_IN power rail, and
you should implement related external regulator firstly, such as:
in arch/arm/mach-mx6/board-mx6q_sabresd.c
static struct mxc_dvfs_platform_data sabresd_dvfscore_data = {
                .reg_id = "VDDCORE",
                .soc_id = "VDDSOC",
                ....
}
otherwise, you have to use internal ldo which is the default configuration.
2.one special case, if the chip is 1.2Ghz, it can't be set LDO bypass.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00234040 FUSE 1.2G: add fuse bit for 1.2G
Robin Gong [Mon, 19 Nov 2012 02:16:22 +0000 (10:16 +0800)]
ENGR00234040 FUSE 1.2G: add fuse bit for 1.2G

Before, we use "arm_freq" in command line to set 1.2G. Now we will read the
fuse bit and "arm_freq", get the mini value to be used as "arm_max_freq".And:
1. you can easily set CPU max freq on what frequency you want by cmdline.
2. if you didn't set arm_freq in cmdline, kernel will read the fuse bit
(0x021bc440) to set the right arm_max_freq.

At the same time, add 1Ghz setpoint if chip max freq is 1.2Ghz.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00233770 i.mx6q/vpu: Add fuse check for VPU_DISABLE feature
Jason Liu [Thu, 15 Nov 2012 06:51:10 +0000 (14:51 +0800)]
ENGR00233770 i.mx6q/vpu: Add fuse check for VPU_DISABLE feature

This patch add the fuse check for VPU_DISABLE feature. If the fuse
bit for VPU_DISABLE is 1, which means VPU is disabled, then we will
not register VPU device to the kernel.

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00233705 [MX6SL] -Fix suspend/resume issue when SD1 is used to boot.
Ranjani Vaidyanathan [Tue, 13 Nov 2012 22:08:41 +0000 (16:08 -0600)]
ENGR00233705 [MX6SL] -Fix suspend/resume issue when SD1 is used to boot.

Setting certain IOMUX settings on SD1 prevents the system from
entering suspend. These pins are already configured as GPIO, so
it does not help to reconfigure them during suspend.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00233929: add kernel command line to enable snvs
Terry Lv [Fri, 16 Nov 2012 07:41:01 +0000 (15:41 +0800)]
ENGR00233929: add kernel command line to enable snvs

In MX6Q/DL, originally GPIO_0 is used as CKO pin function. when SNVS
module is enabled, CKO output stops suddenly.
Both CKO clock config register CCOSR and GPIO_0 IOMUX register value are
not changed. But because ALT7 of GPIO_0 pad is SNVS_VIO_5 function. I
doubt that when SNVS module is enabled, GPIO_0 pad is automatically
changed to SNVS instance by SoC.
Thus we add option for snvs enable/disable.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00233800: CAAM: running sha_speed in cryptodev crashed
Terry Lv [Thu, 15 Nov 2012 08:50:41 +0000 (16:50 +0800)]
ENGR00233800: CAAM: running sha_speed in cryptodev crashed

The reason is that when switching from SHA1 to SHA256, cryptodev will
create a new session.
But in this new session, the __ctx in allocated req is not fully initialized.
Thus dma_buf in __ctx will be a random value.
If the value is 0 or some address in DMA memory, that will be ok,
otherwise, it will crashed in dma_unmap_single().
The calling sequence is:
ahash_final_ctx=>try_buf_map_to_sec_sg()=>dma_unmap_single()
When calling dma_unmap_single(), the parameter buf_dma is invalid in
crash case.
The error msg is:
kernel BUG at arch/arm/mm/dma-mapping.c:478!

requested hash CRYPTO_SHA2_256, Unable to handle kernel NULL pointer
dereference at virtual address 00000000
got sha256 with driver sha256-caapgd = e4ea0000
m
        Encrypting in chunks of 256 b[00000000] *pgd=74edb831ytes: ,
*pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT SMP
Modules linked in: cryptodev
CPU: 0    Not tainted  (3.0.35-02200-ge392070-dirty #68)
     PC is at __bug+0x1c/0x28
     LR is at __bug+0x18/0x28
     pc : [<80044260>]    lr : [<8004425c>]    psr: 60000013
     sp : e4ec7c40  ip : ea9a2000  fp : 00000010
     r10: 883f8038  r9 : 883f8038  r8 : e4803060
     r7 : 00000000  r6 : 00000001  r5 : 00000000  r4 : 6f66c10a
     r3 : 00000000  r2 : 80aafd5c  r1 : 60000093  r0 : 00000033
     Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
     Control: 10c53c7d  Table: 74ea004a  DAC: 00000015
     Process sha_speed (pid: 2747, stack limit = 0xe4ec62f0)
     Stack: (0xe4ec7c40 to 0xe4ec8000)
     7c40: 74803184 8004a424 e4803000 e4730c08 e4262840 803c50dc
     e4786f20 883f8000
     7c60: 00000020 00000000 00000028 883f8018 e43ffcc0 e4803000
     00000000 803c3d04
     7c80: 00000004 80041104 e4ec6000 00000000 7efc4b64 803c3d10
     e4774a3c 802079f8
     7ca0: e43ffd1c e43ffcc0 00000000 7f0031a0 e4ec7e0c e43ffcc0
     e4ec7e0c 7f00240c
     7cc0: 00000100 e4786f20 e481bd40 e4ec7cd8 e4ec7cdc 7f0016b4
     e4803200 00000000
     7ce0: e4094480 00000000 7efc4b2c 00000004 80041104 7f001b64
     8c81200c 00000000
     7d00: 3fe1c2a2 2aba7e2c 00000000 00000000 00000000 00000000
     00000000 2abc8870
     7d20: 2abc8870 2abc8870 7efc4e10 00000000 2aba3000 00000000
     2abc7f48 00000000
     7d40: 00000000 00000000 00000000 00000000 00000000 00000000
     2abc7f88 2abc7f80
     7d60: 2abc7f50 2abc7f60 2abc7f68 00000000 00000000 00000000
     2abc7f70 2abc7f78
     7d80: 00000000 32616873 2a003635 00000000 00000000 2abc7fa0
     2abc7fa8 2abc7fb0
     7da0: 2abc7f90 00000000 00000000 2abc7f98 00000000 00000000
     00000000 00000000
     7dc0: 00000000 32616873 632d3635 006d6161 00000000 00000000
     00000000 00000000
     7de0: 2abc7fc0 2abc7fb8 00000000 2abc7fd0 00000000 00000000
     00000000 00000000
     7e00: 00000000 00000000 00000001 3fe1c2a2 00000000 00000100
     00012008 00000000
     7e20: 7efc4ab8 00000000 00000000 8006a120 e4044740 8c80ef40
     00000001 00000000
     7e40: 00000002 e4044740 e4ec7e7c 8006f5f4 e4ec6000 8007ffd4
     e4348880 60000093
     7e60: 00000000 80ae6de8 e4253200 8004e0fc 00000261 8028c0f4
     e4877000 80ae6de8
     7e80: e4786f20 e481bd40 00000261 8028c0f4 000059ac 00000000
     36390b02 00000000
     7ea0: e4cd7b6c e43488d0 8c80e4c4 00000038 e43488d0 802342dc
     0000003f e43488d0
     7ec0: 8c80e4b8 8c80e4b8 00000038 80090714 0000003f 8aafab02
     00000000 80091134
     7ee0: 8aafab02 0000003f e4ec6000 80a99cc0 e4eed510 7efc4b2c
     e4ef96e0 00000004
     7f00: 80041104 800febd0 60a9b3cd e4786f20 e4348880 00000000
     e4ec7f88 e43488d0
     7f20: e4ec6000 00000000 00000000 80091408 00000000 00000001
     00000001 e4ec7f78
     7f40: 000059b1 00000000 fffffff7 80aedc50 80a8a0c0 00000000
     00000000 e4ec7f90
     7f60: 7efc4b20 e4ef96e0 7efc4b2c c01c6368 00000004 80041104
     e4ec6000 00000000
     7f80: 7efc4b64 800ff0d4 00000000 00000000 00000109 00000000
     00000000 00008628
     7fa0: 00000036 80040f80 00000000 00000000 00000004 c01c6368
     7efc4b2c 7efc4b2c
     7fc0: 00000000 00000000 00008628 00000036 00000000 00000000
     2abc8000 7efc4b64
     7fe0: 00000000 7efc4a90 00008b5c 2ac857bc 80000010 00000004
     e28bd000 e8bd0800
     [<80044260>] (__bug+0x1c/0x28) from [<8004a424>]
     (___dma_single_dev_to_cpu+0x84/0x94)
     [<8004a424>] (___dma_single_dev_to_cpu+0x84/0x94) from [<803c50dc>]
     (ahash_final_ctx+0x1a0/0x41c)
     [<803c50dc>] (ahash_final_ctx+0x1a0/0x41c) from [<803c3d10>]
     (ahash_final+0xc/0x10)
     [<803c3d10>] (ahash_final+0xc/0x10) from [<802079f8>]
     (crypto_ahash_op+0x28/0xc0)
     [<802079f8>] (crypto_ahash_op+0x28/0xc0) from [<7f0031a0>]
     (cryptodev_hash_final+0x30/0xc0 [cryptodev])
     [<7f0031a0>] (cryptodev_hash_final+0x30/0xc0 [cryptodev]) from
     [<7f00240c>] (crypto_run+0x10c/0x398 [cryptodev])
     [<7f00240c>] (crypto_run+0x10c/0x398 [cryptodev]) from [<7f001b64>]
     (cryptodev_ioctl+0x360/0x768 [cryptodev])
     [<7f001b64>] (cryptodev_ioctl+0x360/0x768 [cryptodev]) from
     [<800febd0>] (do_vfs_ioctl+0x80/0x54c)
     [<800febd0>] (do_vfs_ioctl+0x80/0x54c) from [<800ff0d4>]
     (sys_ioctl+0x38/0x5c)
     [<800ff0d4>] (sys_ioctl+0x38/0x5c) from [<80040f80>]
     (ret_fast_syscall+0x0/0x30)
     Code: e59f0010 e1a01003 eb12fddb e3a03000 (e5833000)
     ---[ end trace 0057f6be00952f77 ]---

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00233387: MLB: read fuse to check if to enable mlb
Terry Lv [Tue, 13 Nov 2012 07:50:48 +0000 (15:50 +0800)]
ENGR00233387: MLB: read fuse to check if to enable mlb

Read "Disabled MLB" bit in OTP CFG2 to check if to enable mlb.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00233780 ASRC: limit output buffer size to avoid kernel dump
Chen Liangjun [Mon, 12 Nov 2012 05:41:13 +0000 (13:41 +0800)]
ENGR00233780 ASRC: limit output buffer size to avoid kernel dump

For ASRC memory to memory transfer, user would send driver input buffer
and driver would copy converted output buffer into user's buffer.
However, ASRC can't promise the ratio of output buffer size/input buffer
size being equal to output sample rate/input sample rate.e.g, for
convert from 8k to 48k and 1000 bytes input buffer size, ASRC may pop
out 5999 bytes or 6001 bytes. If driver copy all 6001 bytes into user's
buffer, kernel dump may happens cause of accessing unexisted buffer.

In this patch, if ASRC output buffer size is larger than user's buffer
size, discard exact part.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00233886 ASRC: init variable to fix build warning
Chen Liangjun [Fri, 16 Nov 2012 02:32:07 +0000 (10:32 +0800)]
ENGR00233886 ASRC: init variable to fix build warning

warning:

Compiling warning on mainline imx_3.0.35 (potential bug):
drivers/mxc/asrc/mxc_asrc.c: In function 'asrc_output_task_worker':
drivers/mxc/asrc/mxc_asrc.c:961:68: warning: 't_size' may be used
uninitialized in this function [-Wuninitialized]
drivers/mxc/asrc/mxc_asrc.c:943:23: note: 't_size' was declared here

In this patch, init t_size.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00233570-3 ASRC: Use function pointer to support ASRC loadable
Ge Lei [Thu, 15 Nov 2012 06:58:33 +0000 (14:58 +0800)]
ENGR00233570-3 ASRC: Use function pointer to support ASRC loadable

In ASoC ESAI machine driver, use ASRC ops instead of directly use ASRC
function calling, so that it can support ASRC loadable.

Signed-off-by: Ge Lei <b42127@freescale.com>
11 years agoENGR00233570-2 ASRC: Use function pointer and hook to support ASRC loadable
Ge Lei [Thu, 15 Nov 2012 06:53:40 +0000 (14:53 +0800)]
ENGR00233570-2 ASRC: Use function pointer and hook to support ASRC loadable

In ASoC pcm platform driver, use function pointer(ASRC ops) and hook to call
the APIs in ASRC driver, so that the ASoC platform driver can support ASRC
loadable.

Signed-off-by: Ge Lei <b42127@freescale.com>
11 years agoENGR00233570-1 ASRC: Use hook to add support for ASRC loadable
Ge Lei [Thu, 15 Nov 2012 06:46:19 +0000 (14:46 +0800)]
ENGR00233570-1 ASRC: Use hook to add support for ASRC loadable

ASoC ESAI machine driver and pcm platform driver use the APIs from mxc_asrc.c,
but once ASRC is used as a loadable module, these files can't find the APIs
from this ko. In this patch, we use 'asrc_p2p_hook' to hook the APIs which will
be used in ASoC ESAI machine driver and pcm platform driver.

Signed-off-by: Ge Lei <b42127@freescale.com>
11 years agoENGR00233452 Integrate 4.6.9p9 GPU kernel part driver
Loren Huang [Wed, 14 Nov 2012 05:35:06 +0000 (13:35 +0800)]
ENGR00233452 Integrate 4.6.9p9 GPU kernel part driver

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00233731 ALSA: add DMABUF allocating for different driver
Nicolin Chen [Thu, 15 Nov 2012 03:28:19 +0000 (11:28 +0800)]
ENGR00233731 ALSA: add DMABUF allocating for different driver

 Patch ENGR00233056 added DMABUF size setting for hw_param and changed SSI's
buffer allocating size.
 But didn't add allocation for ESAI and SPDIF, which might cause some dma
transmitting issue.
 This Patch add new allocation code that detects the driver before allocating
its DMABUF.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00233577 ASRC: add spinlock to protect ASRC pair resource
Chen Liangjun [Mon, 12 Nov 2012 13:29:32 +0000 (21:29 +0800)]
ENGR00233577 ASRC: add spinlock to protect ASRC pair resource

when quit from ASRC driver with CTRL + C, driver close() would free
output buffer and close clock. However, it is possible that the buffer
is accessed by work task(work task is trigger by interrupt and it would
not be stopped by CTRL + C). So ASRC driver should promise that  its
pair resource(buffer, SDMA channel, and clock) would not be accessed
after it is released.

In this patch, add protect for pair resource.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00233728 mx6 usb: change usb driver load from arch_initcall to module_init
make shi [Thu, 15 Nov 2012 03:36:37 +0000 (11:36 +0800)]
ENGR00233728 mx6 usb: change usb driver load from arch_initcall to module_init

We should use module_init as usb driver initialization entry point.
To avoid the following crash when sabreauto board bootup:
Unable to handle kernel NULL pointer dereference at virtual address 00000030
pgd = 80004000
[00000030] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP
Modules linked in:
CPU: 0    Not tainted  (3.0.35-02249-g6493632-dirty #3070)
PC is at gpio_set_value_cansleep+0x20/0x34
LR is at mx6_usb_h1_init+0x68/0x188
pc : [<80251638>]    lr : [<80010bd4>]    psr: 20000013
sp : e4049f60  ip : 000000ef  fp : 00000000
r10: 00000000  r9 : 00000000  r8 : e4049f8c
r7 : 80521f04  r6 : e4049f80  r5 : 80521f10  r4 : 80af53cc
r3 : 00000000  r2 : 00000001  r1 : 00000001  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 1000404a  DAC: 00000015
Process swapper (pid: 1, stack limit = 0xe40482f0)
Stack: (0xe4049f60 to 0xe404a000)
9f60: 80af53cc 80010bd4 00000001 02184200 0000004a 00000001 02184200 00000048
9f80: 00000001 0000004d 0000004a 00000001 0000004d 00000048 8002e020 80af4ac0
9fa0: 00000000 80010b6c 00000000 8003b4c4 00000000 80130000 00000000 80abf898
9fc0: 000001f0 8002e020 8002e564 80042040 00000013 00000000 00000000 00000000
9fe0: 00000000 800083cc 00000000 80008334 80042040 80042040 5104b14a f0e00000
[<80251638>] (gpio_set_value_cansleep+0x20/0x34) from [<80010bd4>]
(mx6_usb_h1_init+0x68/0x188)
[<80010bd4>] (mx6_usb_h1_init+0x68/0x188) from [<8003b4c4>]
(do_one_initcall+0x30/0x16c)
[<8003b4c4>] (do_one_initcall+0x30/0x16c) from [<800083cc>]
(kernel_init+0x98/0x144)
[<800083cc>] (kernel_init+0x98/0x144) from [<80042040>]
(kernel_thread_exit+0x0/0x8)
Code: e92d4010 e7933100 e1a02001 e1a00003 (e5931030)
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill init!
[<8004823c>] (unwind_backtrace+0x0/0xfc) from [<8051d790>]
(panic+0x74/0x19c)
[<8051d790>] (panic+0x74/0x19c) from [<80078ba8>] (do_exit+0x664/0x718)
[<80078ba8>] (do_exit+0x664/0x718) from [<80044fcc>] (die+0x250/0x2c8)
[<80044fcc>] (die+0x250/0x2c8) from [<8004ba74>]
(__do_kernel_fault+0x64/0x84)
[<8004ba74>] (__do_kernel_fault+0x64/0x84) from [<8004bc14>]
(do_page_fault+0x180/0x2e0)
[<8004bc14>] (do_page_fault+0x180/0x2e0) from [<8003b400>]
(do_DataAbort+0x34/0x98)
[<8003b400>] (do_DataAbort+0x34/0x98) from [<80040f10>]
(__dabt_svc+0x70/0xa0)

Some board for example sabreauto board usb power gpio is use a io
i2c expander gpio, gpio i2c driver load use subsys_initcall as driver
initialization entry point, so gpio is not accessible at early bootup.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00233732 mx6dl: change 996M setpoint voltage
Anson Huang [Fri, 9 Nov 2012 16:41:34 +0000 (11:41 -0500)]
ENGR00233732 mx6dl: change 996M setpoint voltage

Change 996M setpoint voltage according to datasheet,
lower VDDARM_CAP from 1.275V to 1.25V, and VDDSOC/PU_CAP
from 1.275V to 1.175V.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00233663 HDMI: add support for ALSA DMIX
Chen Liangjun [Wed, 26 Sep 2012 08:00:55 +0000 (16:00 +0800)]
ENGR00233663 HDMI: add support for ALSA DMIX

when using DMIX for ALSA playback, ALSA would not update write index
into driver but maintain it in ALSA LIB level. However, HDMI driver
need write index for HDMI header packing. In this case, HDMI driver
would fail to do HDMI header pack and user hear no sound when using DMIX
in HDMI audio playback.

In this patch, use read index(hw_ptr) for HDMI header packing.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00233051-04 Mx6 USB: driver implementation for OTG modulization
make shi [Thu, 8 Nov 2012 07:50:20 +0000 (15:50 +0800)]
ENGR00233051-04 Mx6 USB: driver implementation for OTG modulization

- reset fsl_otg_dev to NULL after kfree
- remove __exit_p prefix to make sure fsl_udc_remove is called when
  module unload

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00233051-03 Mx6 USB: msl implementation for USB OTG modulization
make shi [Thu, 8 Nov 2012 07:26:22 +0000 (15:26 +0800)]
ENGR00233051-03 Mx6 USB: msl implementation for USB OTG modulization

 - remove mx6_usb_dr_init() in board specific initialization files
 - Add module_init(mx6_usb_dr_init) and module_exit(mx6_usb_dr_exit)
   in usb_dr.c to support the usb_dr modulization
 - Export necessary function which is used in usb_dr.c

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00233051-02 Mx6 USB: msl headfile for OTG modulization
make shi [Thu, 8 Nov 2012 07:23:33 +0000 (15:23 +0800)]
ENGR00233051-02 Mx6 USB: msl headfile for OTG modulization

MSL headfile part change

-Add and remove some function define in usb.h

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00233051-01 Mx6 USB: configure change for OTG modulization
make shi [Thu, 8 Nov 2012 07:18:50 +0000 (15:18 +0800)]
ENGR00233051-01 Mx6 USB: configure change for OTG modulization

- Add USB_FSL_ARC_OTG configuration to imx6_defconfig and imx6s_defconfig,
  the default configuration is selected as "y"
- add related USB_FSL_ARC_OTG configuration to Makefile
- add related USB_FSL_ARC_OTG configuration to Kconfig

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00233427 ASRC: add interface to modify ASRC input/output watermark
Chen Liangjun [Tue, 13 Nov 2012 08:43:25 +0000 (16:43 +0800)]
ENGR00233427 ASRC: add interface to modify ASRC input/output watermark

In this patch, add interface to modify ASRC input/output watermark.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00233380 IPUv3:Warn on sub-CPMEM EBA0 unalignment case
Liu Ying [Tue, 13 Nov 2012 06:42:27 +0000 (14:42 +0800)]
ENGR00233380 IPUv3:Warn on sub-CPMEM EBA0 unalignment case

IPUv3 CPMEM EBA sets buffer start address. EBA should be 8-byte
aligned according to IPUv3 spec. This patch contains code change
only to warn on alternative CPMEM entry's EBA0 unalignment case.

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

11 years agoENGR00232945-4: CAAM: enable SNVS config
Terry Lv [Thu, 8 Nov 2012 10:01:02 +0000 (18:01 +0800)]
ENGR00232945-4: CAAM: enable SNVS config

Enable SNVS config.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00232945-3: CAAM: Add core of SNVS state handler module
Steve Cornelius [Thu, 8 Nov 2012 07:40:51 +0000 (00:40 -0700)]
ENGR00232945-3: CAAM: Add core of SNVS state handler module

Add core of SNVS state handler module.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00232945-2: CAAM: Add SNVS state handler startup
Steve Cornelius [Thu, 8 Nov 2012 07:39:05 +0000 (00:39 -0700)]
ENGR00232945-2: CAAM: Add SNVS state handler startup

Add SNVS state handler startup to CAAM controller driver.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00232945-1: CAAM: Add build environment for CAAM/SNVS handlers
Steve Cornelius [Thu, 8 Nov 2012 07:33:13 +0000 (00:33 -0700)]
ENGR00232945-1: CAAM: Add build environment for CAAM/SNVS handlers

Add build environment for CAAM/SNVS security violation handlers.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00233056 ALSA: adjust dma wm & buffersize configuration strategy
Nicolin Chen [Fri, 9 Nov 2012 07:44:33 +0000 (15:44 +0800)]
ENGR00233056 ALSA: adjust dma wm & buffersize configuration strategy

 Previously SSI/ESAI/SPDIF used one same-sized buffers and watermark(the
WM in the title) for every alsa driver.

 This patch allow each driver config its own buffer size and watermark,
which is obviously more flexible.

 Also, it sets SSI's buffersize from 256k to 64k.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00232528 - IEEE1588:imx6:Upgrade driver to support IXXAT stack V1.05.03
Fugang Duan [Mon, 29 Oct 2012 10:00:09 +0000 (18:00 +0800)]
ENGR00232528 - IEEE1588:imx6:Upgrade driver to support IXXAT stack V1.05.03

Upgrade drivers to support IXXAT IEEE1588 stack V1.05.03.
Ptp message protocol support IPv4, IPv6, and IEEE802.3 L2.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00224109 - MX6 : FEC : optimize ENET_REF_CLK PAD configuration.
Fugang Duan [Thu, 20 Sep 2012 07:26:49 +0000 (15:26 +0800)]
ENGR00224109 - MX6 : FEC : optimize ENET_REF_CLK PAD configuration.

In MX6 Arik and Rigel platforms, RGMII tx_clk clock source is from
ENET_REF_CLK pad supplied by phy. To optimize the clk signal path,
the ENET_REF_CLK I/O must have this configuration:
1. Disable on-chip pull-up, pull-down, and keeper
2. Disable hysteresis
3. Speed = 100 MHz
4. Slew rate = fast

The optimizition make the bias point match the optimum point, which
can maximize design margin.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00232660 EPDC: Wrong panel loaded at boot
Michael Minnick [Tue, 6 Nov 2012 19:21:50 +0000 (13:21 -0600)]
ENGR00232660 EPDC: Wrong panel loaded at boot

The wrong EPDC panel can be loaded at boot time if the machine
board file has multiple panel entries with the same video mode
parameter values. To reproduce, select a particular panel with
u-boot kernel command line parameters, for example:
video=mxcepdcfb:XYZZY

Add panel XYZZY to arch/arm/mach-mx6/board-mx6sl_evk.c after
an existing entry. Use the same video mode parameter settings
as the existing entry. On boot, the existing panel will be loaded
instead of the XYZZY panel because it comes earlier in the list
and happens to have the same video mode parameter values.

Solution: If the video mode parameter settings specified in
the call to msc_epdc_fb_set_par() match those of the panel
already loaded by mxc_epdc_fb_probe(), don't execute a
search for a new matching panel.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
11 years agoENGR00232930 Added default video mode check, make sure it is a CEA mode.
Sandor Yu [Thu, 8 Nov 2012 08:24:10 +0000 (16:24 +0800)]
ENGR00232930 Added default video mode check, make sure it is a CEA mode.

When system bootup without HDMI plugin, the default modelist
and default video mode will create.
Match default video mode in default CEA modelist, make sure
default video mode is a CEA mode.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00231273-02 mmc: sdhci: fix failed to call platform exit on removal
Ryan QIAN [Fri, 26 Oct 2012 02:13:34 +0000 (10:13 +0800)]
ENGR00231273-02 mmc: sdhci: fix failed to call platform exit on removal

Since sdhci_pltfm_data is stored in platform_device_id, but in
sdhci_pltfm_remove, it tried to get sdhci_pltfm_data directly from
pdev->dev.platform_data. It will result that it could not get the correct
sdhci_pltfm_data, so that platform exit will not be called on sdhci module's
removal.

Acked-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00231273-01 mmc: sdhci: modularize sdhci driver
Ryan QIAN [Fri, 26 Oct 2012 02:11:22 +0000 (10:11 +0800)]
ENGR00231273-01 mmc: sdhci: modularize sdhci driver

Export sdhci_request to fix build error.

Here's the error message:
ERROR: "sdhci_request" [drivers/mmc/host/sdhci-platform.ko] undefined!

Acked-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00232583 Mx6 USB host: Set HCD_FLAG_HW_ACCESSIBLE flag after clock gate
make shi [Tue, 6 Nov 2012 07:52:24 +0000 (15:52 +0800)]
ENGR00232583 Mx6 USB host: Set HCD_FLAG_HW_ACCESSIBLE flag after clock gate

There is a USB hang issue when do system suspend/resume test with a USB
device plug in. The issue is caused by USB host driver accessing register
when clock is off. Currently set HCD_FLAG_HW_ACCESSIBLE bit before open
clock in ehci_fsl_bus_resume, it cause accessing register without clock.
So we should change the code call order to avoid driver access register
without clock.

- Set HCD_FLAG_HW_ACCESSIBLE software flag after HW clock turn on
- remove some unnecessary code in ehci_fsl_pre_irq

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00232586 mx6: increase PUPSCR to make sure LDO is ready for resume
Anson Huang [Tue, 6 Nov 2012 22:47:26 +0000 (17:47 -0500)]
ENGR00232586 mx6: increase PUPSCR to make sure LDO is ready for resume

Previous setting of PUPSCR is 0x202, which means there is only ~63us
for LDO ramp up, sometimes, system fail to resume by USB remote wake up,
increase this timing to fix USB remote wake up issue.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00231266-4: board-mx6q_sabreauto adv7280 csi-tx slave address
Adrian Alonso [Wed, 24 Oct 2012 16:58:53 +0000 (11:58 -0500)]
ENGR00231266-4: board-mx6q_sabreauto adv7280 csi-tx slave address

* Pass csi-tx slave address for adv7280 chipset

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00231266-3: adv7280_mipi_tvin add regulator support
Adrian Alonso [Thu, 25 Oct 2012 20:15:26 +0000 (15:15 -0500)]
ENGR00231266-3: adv7280_mipi_tvin add regulator support

* Add regulator support
  Set regulator voltage and enable them
  On remove callback disable regulators
* Add callbacks for target platform custom
  reset, power up/down and io pads configuration

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00231266-2: adv7280_mipi_tvin add i2c dummy client for csi config
Adrian Alonso [Wed, 24 Oct 2012 16:37:11 +0000 (11:37 -0500)]
ENGR00231266-2: adv7280_mipi_tvin add i2c dummy client for csi config

* Add i2c dummy client for csi-tx register map config
* adv7280 csi-tx reg banks are mapped in a different
  memory map and respond to a different i2c slave address
  that user can configure
* Add default config helper function
* Override slave csi-tx address if user provides a different
  value.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00231266-1: fsl_devices add csi_tx_addr
Adrian Alonso [Wed, 24 Oct 2012 16:32:34 +0000 (11:32 -0500)]
ENGR00231266-1: fsl_devices add csi_tx_addr

* Add csi_tx_addr, so it can override slave addr
  for adv7280 tvin decoder device

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00231773-9 ASRC: increace convert speed while in ideal mode
Chen Liangjun [Wed, 31 Oct 2012 04:52:48 +0000 (12:52 +0800)]
ENGR00231773-9 ASRC: increace convert speed while in ideal mode

Increase convert speed while ASRC is working on ideal ratio mode to
satisfy asrc plugin's timing request.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-8 ASRC: prevent user app from processing input/output processing
Chen Liangjun [Wed, 31 Oct 2012 09:27:23 +0000 (17:27 +0800)]
ENGR00231773-8 ASRC: prevent user app from processing input/output processing

To finish a buffer convert in ASRC, user should 1. prepare input buffer,
2. prepare output buffer 3. wait for output buffer's completion 4.wait
for input buffer's comletion. The flow make user application ugly.

In this patch, pack steps above to 1 stop: ASRC_CONVERT.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-7 DMA: add interface to trigger SDMA event pending bit
Chen Liangjun [Mon, 29 Oct 2012 07:38:26 +0000 (15:38 +0800)]
ENGR00231773-7 DMA: add interface to trigger SDMA event pending bit

Add interface in header file to call sdma event pending trigger
function.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-6 SDMA: add event pending trigger interface
Chen Liangjun [Mon, 29 Oct 2012 07:36:24 +0000 (15:36 +0800)]
ENGR00231773-6 SDMA: add event pending trigger interface

When SDMA is use for periphal data transfer, dma request is trigger by
FIFO level. If the SDMA is started after the start of periphal, SDMA
would miss the first pulse and be not able to trigger itself.

In this patch, add interface to trigger a dma request manully.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-5 ASRC: use poll mode to receive last period of ASRC data
Chen Liangjun [Wed, 31 Oct 2012 03:11:26 +0000 (11:11 +0800)]
ENGR00231773-5 ASRC: use poll mode to receive last period of ASRC data

ASRC driver use DMA to transfer data from ASRC output FIFO to memory.
However, DMA way require the data number in ASRC output FIFO being larger
than watermark level. Thus a dma request can trigger a DMA burst. For
the last period of output data, its number is possiblely less than output
FIFO watermark level. In this case, the output DMA would pending for the
last period of output data until timeout.

In this patch:
1 divide expected output data length into 2 parts: DMA part
and poll part. Using DMA to get the DMA part data and poll mode to
get the poll part.
2 to prevent user from processing these 2 parts above, kernel
buffers would be untouchable. User application only need send its data
buffer address to driver instead of query the kernel buffer.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-4 ASRC: use scatter list and stall bit for asrc convert
Chen Liangjun [Fri, 26 Oct 2012 09:43:30 +0000 (17:43 +0800)]
ENGR00231773-4 ASRC: use scatter list and stall bit for asrc convert

In the origin code, ASRC driver use cyclic way to process DMA task
transfering data to/from ASRC input/output FIFO. In this case, it is
necessary that user application should promise that the input buffer
flow is continuous. If not, there would be 0 data be inserted into data
flow. The output data would be noisy.

In this patch,
1 use scatter list instead of cyclic SDMA: with scatter list,
SDMA would stop when the applied scatter list nents are finished.
2 set stall bit for ASRC "memory->ASRC->memory" convert to stop
ASRC convert when input data is not send into ASRC input FIFO in time.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-3 ASRC: use kzalloc to allocate buffer to support scatterlist
Chen Liangjun [Fri, 26 Oct 2012 07:10:09 +0000 (15:10 +0800)]
ENGR00231773-3 ASRC: use kzalloc to allocate buffer to support scatterlist

For ASRC's "memory -> ASRC -> memory" using, new driver would support
model below: user input one buffer into ASRC and an corresponding output
buffer would be poped out. There is no timing requirement between this
input buffer and next input buffer. Thus driver would not use the cyclic
way to config SDMA and scatterlist is used. buffer allocated by
dma_alloc_coherent() can't support scatterlist well.

In this patch, use kzalloc to allocate buffer to support scatterlist.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-2 ASRC: add work struct for asrc output data receive
Chen Liangjun [Fri, 26 Oct 2012 05:42:35 +0000 (13:42 +0800)]
ENGR00231773-2 ASRC: add work struct for asrc output data receive

SDMA driver can't promise receive all output data generated. Cause when
the data in output FIFO is less than ASRC output FIFO watermark, there
would be no DMA request generated and thus no SDMA transfer would
happens.

In this patch, add work struct to support ASRC driver receive last part
of data in OUTPUT FIFO in polling way.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00231773-1 ASRC: remove queue operation in ASRC driver
Chen Liangjun [Fri, 26 Oct 2012 08:07:41 +0000 (16:07 +0800)]
ENGR00231773-1 ASRC: remove queue operation in ASRC driver

According to ASRC memory->ASRC->memory requirement, driver should
satisfy the feature below: user application would passed into one buffer
and waiting until the output buffer is generated. In this case, only one
buffer is on processing and it is no necessary to use the queue to do
the convert. What is worse, queue operation would make the ASRC driver
hard to understand and maintain.

In this patch, remove the queue operation in ASRC driver.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00232424 LDB:Support WXGA@60 video mode
Liu Ying [Mon, 5 Nov 2012 07:58:17 +0000 (15:58 +0800)]
ENGR00232424 LDB:Support WXGA@60 video mode

This patch adds WXGA(1280x800@60) video mode
support to driver CHIMEI WXGA LVDS panel.

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

11 years agoENGR00232327 MX6SL-Optimize board level suspend power
Ranjani Vaidyanathan [Fri, 2 Nov 2012 21:11:38 +0000 (16:11 -0500)]
ENGR00232327 MX6SL-Optimize board level suspend power

Improve the board level suspend power by configuring
various IOMUX pads to low power state.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00232326 MX6x-Fix incorrect I2C bitrate
Ranjani Vaidyanathan [Thu, 25 Oct 2012 20:51:51 +0000 (15:51 -0500)]
ENGR00232326 MX6x-Fix incorrect I2C bitrate

IPG_PERCLK is the parent of I2C. I2C needs a minimum of
12.8MHz as its input clock to achieve 400KHz speed. Hence
change the IPG_PERCLK speed accordingly.
MX6DQ/MX6DL - Set IPG_PERCLK at 22MHz (sourced from IPG_CLK)
MX6SL - Set IPG_PERCLK to 24MHz(Sourced from 24MHz XTAL).

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00225875-2 i.MX6Q/Solo Sabreauto Bluetooth H4 fix uart rx timeouts.
Israel Perez [Wed, 31 Oct 2012 22:13:36 +0000 (17:13 -0500)]
ENGR00225875-2 i.MX6Q/Solo Sabreauto Bluetooth H4 fix uart rx timeouts.

Bluetooth H4 protocol is very susceptible to data reception timeouts.
DMA transfer only happen when ICD or AGTIM interrutps are trigger.
ICD only happen when a N idle frames are present on rx line
and rx FIFO is empty.
Meanwhile Aging timer is trigger when data in FIFO was been sitting for a
period of 8 frames.
This patch enable both in order to dispatch data as fast is possible only
when the select uart have enable DMA flag.

Signed-off-by: Israel Perez <B37753@freescale.com>
11 years agoENGR00225875-1 i.MX6Q/Solo SabreAuto Infineon Bluetooth uart3 config
Israel Perez [Wed, 31 Oct 2012 22:06:44 +0000 (17:06 -0500)]
ENGR00225875-1 i.MX6Q/Solo SabreAuto Infineon Bluetooth uart3 config

Configure MUX settings for bluetooth operation over UART3.
Enable RTS,CTS and DMA only for uart3.
Affected files :
arch/arm/mach-mx6/board-mx6q_sabreauto.c
arch/arm/mach-mx6/board-mx6q_sabreauto.h
arch/arm/mach-mx6/board-mx6solo_sabreauto.h
arch/arm/plat-mxc/include/mach/iomux-mx6q.h
On behalf of Francisco Munoz <francisco.munoz@freescale.com>.
Some modification are needed also on hciattach tool.

Signed-off-by: Israel Perez <B37753@freescale.com>
11 years agoENGR00232000: Fix "dmaengine: failed to get dma1chan0: (-22)" when boot
Robby Cai [Fri, 2 Nov 2012 07:58:40 +0000 (15:58 +0800)]
ENGR00232000: Fix "dmaengine: failed to get dma1chan0: (-22)" when boot

The log from [MX6DL/S_SD]:
...
mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb
dmaengine: failed to get dma1chan0: (-22)
dmaengine: failed to get dma1chan1: (-22)
dmaengine: failed to get dma1chan2: (-22)
dmaengine: failed to get dma1chan3: (-22)
dmaengine: failed to get dma1chan4: (-22)
dmaengine: failed to get dma1chan5: (-22)
dmaengine: failed to get dma1chan6: (-22)
dmaengine: failed to get dma1chan7: (-22)
dmaengine: failed to get dma1chan8: (-22)
dmaengine: failed to get dma1chan9: (-22)
dmaengine: failed to get dma1chan10: (-22)
dmaengine: failed to get dma1chan11: (-22)
dmaengine: failed to get dma1chan12: (-22)
dmaengine: failed to get dma1chan13: (-22)
dmaengine: failed to get dma1chan14: (-22)
dmaengine: failed to get dma1chan15: (-22)
...

It happens when there are many DMA-engine drivers in the system and
dmaengine_get() is called. dmaengine_get() will call dma_chan_get(), which will
call device_alloc_chan_resources() literally on channels of available dma
drivers unless reach -ENODEV. device_alloc_chan_resources() is implemented
in the individual dma drivers, which could return -EINVAL rather than -ENODEV,
then the above messages print out (doesn't hurt, however).

Indeed, the dmaengine_get() and dmaengine_put() is not needed and thus removed.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00231778 MX6 ESAI: Adjust channel support capability of cpu/codec dai
Lionel Xu [Wed, 31 Oct 2012 08:40:37 +0000 (16:40 +0800)]
ENGR00231778 MX6 ESAI: Adjust channel support capability of cpu/codec dai

To adjust the channel support capability, codec dai does not support mono
playback and record, while esai dai does, thus making the whole audio
codec only support stereo and above channel playback/record.

Signed-off-by: Lionel Xu <R63889@freescale.com>
11 years agoENGR00231826 imx esdhc: Add the DMA mask for esdhc device register.
Xinyu Chen [Wed, 31 Oct 2012 06:41:37 +0000 (14:41 +0800)]
ENGR00231826 imx esdhc: Add the DMA mask for esdhc device register.

We must set the DMA mask for esdhc device.
To avoid the following crash when we do not have highmem pages:

[<c0044f90>] (__dabt_svc+0x70/0xa0) from [<c00cf460>]
[<c00cf460>] (mempool_alloc+0x3c/0x108) from [<c00f4aa4>]
[<c00f4aa4>] (blk_queue_bounce+0xc0/0x2fc) from [<c023761c>]
[<c023761c>] (__make_request+0x20/0x2b8) from [<c0235bb4>]
[<c0235bb4>] (generic_make_request+0x3b4/0x4cc) from [<c0235d74>]
[<c0235d74>] (submit_bio+0xa8/0x128) from [<c01279c4>]
[<c01279c4>] (submit_bh+0x108/0x178) from [<c012baa0>]
[<c012baa0>] (block_read_full_pag+e0x278/0x394) from [<c00cd520>]
[<c00cd520>] (do_read_cache_page+0x70/0x154) from [<c00cd64c>]
[<c00cd64c>] (read_cache_page_async+0x1c/0x24) from [<c00cd65c>]
[<c00cd65c>] (read_cache_page+0x8/0x10) from [<c014c354>]
[<c014c354>] (read_dev_sector+0x30/0x68) from [<c014dd4c>]
[<c014dd4c>] (read_lba+0xa0/0x164) from [<c014e300>]
[<c014e300>] (efi_partition+0x9c/0xed4) from [<c014ca0c>]
[<c014ca0c>] (rescan_partitions+0x15c/0x480) from [<c012f190>]
[<c012f190>] (__blkdev_get+0x324/0x394) from [<c012f300>]
[<c012f300>] (blkdev_get+0x100/0x358) from [<c023e5f4>]
[<c023e5f4>] (register_disk+0x140/0x164) from [<c023e73c>]
[<c023e73c>] (add_disk+0x124/0x2a0) from [<c03a7528>]
[<c03a7528>] (mmc_add_disk+0x10/0x68) from [<c03a7820>]
[<c03a7820>] (mmc_blk_probe+0x15c/0x20c) from [<c039cc90>]
[<c039cc90>] (mmc_bus_probe+0x18/0x1c) from [<c0294e28>]

When our DDR size is small or reserved memory are large and
the lowmem can cover all the available pages for kernel,
the highmem pages will not be setup. That means the page_pool
for bounce queue can not be create in init_emergency_pool().
And page_pool will stay NULL without initialized.
In the mmc/card/queue.c the blk_queue_bounce_limit()
function will be called in mmc_init_queue() to
initialize the request_queue and it's bounce_gfp.
If we do not define the DMA mask for our platform,
then the BLK_BOUNCE_HIGH (lowmem pfn) will be set
as limit to queue bounce, which means the blk_queue_bounce
will use page_pool to iterate over the bio segment.
Under the circumstances that highmem is not setup,
the page_pool is null, and causes kernel crash.
After set the DMA mask for esdhci device, the page_pool
will not be used to iterate over the bio segment.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
11 years agoENGR00232087-2 VPU: Fix suspend/resume bugs
Hongzhang Yang [Thu, 1 Nov 2012 11:34:26 +0000 (19:34 +0800)]
ENGR00232087-2 VPU: Fix suspend/resume bugs

1. Fix ENGR00230203 [Android_MX6DL_SD] Gallery: System hang
after resume from suspend during video playback. 20%

2. Fix ENGR00231830 [MX6DL/S_SD] VPU: VPU encode can't
finish and print "VPU blocking: timeout." if suspend/resume. 100%

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
11 years agoENGR00232087-1 MX6: Enable PU LDO gating.
Hongzhang Yang [Thu, 1 Nov 2012 11:26:44 +0000 (19:26 +0800)]
ENGR00232087-1 MX6: Enable PU LDO gating.

1. Revert ENGR00231910 Do not disable PU regulator,revert the PU
regulator patch;

2. VPU reset register address is different on MX6 and MX5. It can
fix ENGR00230203 [Android_MX6DL_SD] Gallery: System hang after resume
from suspend during video playback. 20%

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
11 years agoENGR00232005 mtd: fix the overflow of big mtd partitions
Huang Shijie [Thu, 1 Nov 2012 06:23:25 +0000 (14:23 +0800)]
ENGR00232005 mtd: fix the overflow of big mtd partitions

When the kernel parses the following cmdline

#mtdparts=gpmi-nand:16m(boot),16m(kernel),1g(home),4g(test),-(usr)

for a big nand chip Micron MT29F64G08AFAAAWP(8GB), we got the following wrong
result:

.............................................
"mtd: partition size too small (0)"
.............................................

We can not get any partition.

The "4g(test)" partition triggers a overflow of the "size". The memparse()
returns 4g to the "size", but the size is "unsigned long" type, so a overflow
occurs, the "size" becomes zero in the end.

This patch changes the "size"/"offset" to "unsigned long long" type,
and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and
OFFSET_CONTINUOUS.

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00231965 MX6 USB CV 3.0 test fail
Tony LIU [Thu, 1 Nov 2012 02:15:18 +0000 (10:15 +0800)]
ENGR00231965 MX6 USB CV 3.0 test fail

- For USB CV 3.0 test, the gap between the ACK of set_address and
  the subsequent setup packet may be very little, say 500us, and
  if the latency we handle the ep completion is greater than this
  gap, there is no response to the subsequent packet. It will
  cause CV test fail

- There is another way to set the address, it should set the bit 24
  to 1 with the right address, and then IC controller will set the
  address when the IN req complete instead of SW do it. It is more
  fast so it can fix the CV 3.0 test fail issue

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agomtd: support ONFI multi lun NAND
Matthieu CASTET [Mon, 19 Mar 2012 14:35:25 +0000 (15:35 +0100)]
mtd: support ONFI multi lun NAND

With onfi a flash is organized into one or more logical units (LUNs).
A" logical unit (LUN) is the minimum unit that can independently execute
commands and report status.

Mtd does not exploit LUN, so make it see a big single flash where size is
lun_size * number_of_lun.

Without this patch MT29F8G08ADBDAH4 size is 512MiB instead of 1GiB.

Artem: split long line on 2 shorter ones.

Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com>
Acked-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agomtd: nand_flash_detect_onfi propagate busw info
Matthieu CASTET [Sun, 26 Jun 2011 16:26:55 +0000 (18:26 +0200)]
mtd: nand_flash_detect_onfi propagate busw info

there is a bug in nand_flash_detect_onfi, busw need to be passed
by pointer to return it.

Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00231910 PU regulator: do not disable PU regulator
Robin Gong [Wed, 31 Oct 2012 13:41:16 +0000 (21:41 +0800)]
ENGR00231910 PU regulator: do not disable PU regulator

If system enter suspend/resume during VPU encoding on Rigel, there will be
"VPU blocking: timeout." error . But there is ok if enter suspend/resume
during VPU decoding and enter suspend/resume during encoding/decoding  on
Arik, until now we didn't know the root cause, so revert it firstly.
Because the previous patch about PU regulator is composed with four commits
and hard to revert, now we adopt simplest way that do not disable PU regulator
in low level. The negative impact is there will several mA increasment in
suspend, we will fix it ASAP.
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00231595 spdif: improve spdif driver
Gary Zhang [Tue, 30 Oct 2012 06:52:30 +0000 (14:52 +0800)]
ENGR00231595 spdif: improve spdif driver

add clk operation in mxc_pb_spdif_put function

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00231063 Sabreauto: fix share pins SD Card and NFC
Alejandro Sierra [Wed, 24 Oct 2012 20:32:37 +0000 (15:32 -0500)]
ENGR00231063 Sabreauto: fix share pins SD Card and NFC

SD card card detection and NFC controller CS2 share
the same pin on ARD platform. However CS2 is not
connected to the socket. This signal was removed
from the sabreauto board file.

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
11 years agoENGR00230538-10: imx6: CAAM: enable secure memory and sm test in defconfig
Terry Lv [Mon, 29 Oct 2012 06:18:25 +0000 (14:18 +0800)]
ENGR00230538-10: imx6: CAAM: enable secure memory and sm test in defconfig

Enable secure memory and sm test in defconfig.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-9: CAAM: Add example/test component for CAAM-SM
Steve Cornelius [Fri, 19 Oct 2012 21:51:48 +0000 (14:51 -0700)]
ENGR00230538-9: CAAM: Add example/test component for CAAM-SM

Add example/test component for CAAM-SM.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-8: CAAM: Add CAAM Secure Memory / Keystore API
Steve Cornelius [Fri, 19 Oct 2012 21:50:55 +0000 (14:50 -0700)]
ENGR00230538-8: CAAM: Add CAAM Secure Memory / Keystore API

Add CAAM Secure Memory / Keystore API.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-7: CAAM: Add build configuration for SM API
Steve Cornelius [Fri, 19 Oct 2012 21:48:59 +0000 (14:48 -0700)]
ENGR00230538-7: CAAM: Add build configuration for SM API

This adds build configuration information for the prototype CAAM
Secure Memory API, and the example/test module that accompanies it.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-6: CAAM: Detection and initialization for secure memory.
Steve Cornelius [Fri, 19 Oct 2012 21:47:45 +0000 (14:47 -0700)]
ENGR00230538-6: CAAM: Detection and initialization for secure memory.

Detection and initialization for secure memory.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-5: CAAM: Add SM register defs
Steve Cornelius [Fri, 19 Oct 2012 21:43:41 +0000 (14:43 -0700)]
ENGR00230538-5: CAAM: Add SM register defs

Add SM register defs, and expanded driver-private storage.

These add changes to the driver private areas for the CAAM
controller and CAAM Secure Memory subsystems, and expand register
definitions to include the Secure Memory subsystems as reflected
in multiple areas (controller, rings, secure memory itself).

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-4: CAAM: Add Blob command bitdefs.
Steve Cornelius [Fri, 19 Oct 2012 21:37:12 +0000 (14:37 -0700)]
ENGR00230538-4: CAAM: Add Blob command bitdefs.

Add Blob command bitdefs.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-3: CAAM: Add SNVS HP and LP register definitions
Steve Cornelius [Fri, 19 Oct 2012 21:35:25 +0000 (14:35 -0700)]
ENGR00230538-3: CAAM: Add SNVS HP and LP register definitions

Add SNVS HP and LP register definitions.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-2: CAAM: Add Secure Memory and SNVS properties
Steve Cornelius [Fri, 19 Oct 2012 20:27:24 +0000 (13:27 -0700)]
ENGR00230538-2: CAAM: Add Secure Memory and SNVS properties

Add Secure Memory and SNVS properties to MX6 configuration.

Previous configurations of MX6 platform device definition lacked
specific propeties for CAAM Secure Memory and SNVS. Added these
properties to define register ranges for both entities.

Also corrected the name for the offset of the address range for
CAAM Secure Memory to more accurately reflect it's purpose.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00230538-1: CAAM: Correct shifting offset for CAAM IPG clock selection
Steve Cornelius [Fri, 19 Oct 2012 20:18:37 +0000 (13:18 -0700)]
ENGR00230538-1: CAAM: Correct shifting offset for CAAM IPG clock selection

3 pairs of clock enable bits are required for CAAM clocking:
(1) wrapper IPG clock
(2) wrapper ACLK
(3) secure memory clock

IPG enable happened to be using an incorrect shift selection, which
had the net effect of leaving secure memory unclocked. Added the correct
shift selection in so that all 3 clock enable pairs are turned on.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00231321-2 wm8962: enhance audio driver
Gary Zhang [Fri, 26 Oct 2012 08:16:56 +0000 (16:16 +0800)]
ENGR00231321-2 wm8962: enhance audio driver

1. correct indent issue
2. when driver is unloaded, remove disable clock operateion and free irq

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00231321-1 mx6: remove wm8958 in imx6_defconfig
Gary Zhang [Fri, 26 Oct 2012 08:10:38 +0000 (16:10 +0800)]
ENGR00231321-1 mx6: remove wm8958 in imx6_defconfig

not set wm8958 codec as builtin in imx6_defconfig

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00230981-3 pfuze: add suspend voltage set interface
Robin Gong [Fri, 26 Oct 2012 11:19:43 +0000 (19:19 +0800)]
ENGR00230981-3 pfuze: add suspend voltage set interface

Implement set_suspend_voltage for buck switch of PF100, and set_suspend_enable
/set_suspend_disable interface for LDO(VGENx).
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00230981-2 pfuze:standby voltage increase for PFM
Robin Gong [Wed, 24 Oct 2012 10:28:59 +0000 (18:28 +0800)]
ENGR00230981-2 pfuze:standby voltage increase for PFM

There is 6% tolerance for PFM momde in standby so we need set 0.975V(>0.9V+%6)
for VDDSOC and VDDARM which maybe impact system resume ability.
Another two change is:
1.set  VDDARM and VDDSOC standby voltage by setting PFUZE register directly,it
is not very friendly.So use more common  "state_mem" in constrain of regulator
to set standby voltage.
2.align sabreauto code with sabresd
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00231331 mtd: gpmi: add kernel command line to enable gpmi in arm2 board
Huang Shijie [Fri, 26 Oct 2012 08:04:03 +0000 (16:04 +0800)]
ENGR00231331 mtd: gpmi: add kernel command line to enable gpmi in arm2 board

In mx6q arm2 board, the gpmi conflicts with SD module.
But the defconfig has enabled the gpmi by default.
So we have to add a kernel cmdline to enable the gpmi by hand in arm2 board.

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00231104 i.MX cpufreq: add scaling_available_freqs attribute
Lin Fuzhen [Thu, 25 Oct 2012 06:19:24 +0000 (14:19 +0800)]
ENGR00231104 i.MX cpufreq: add scaling_available_freqs attribute

Add scaling_available_freqs attribute in cpufreq for i.MX
can get cpufreq table info with:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
996000 792000 396000

Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
11 years agoENGR00230167 MX6 regulator: enable and raise the voltage of USB 3p0 LDO
make shi [Thu, 18 Oct 2012 07:59:18 +0000 (15:59 +0800)]
ENGR00230167 MX6 regulator: enable and raise the voltage of USB 3p0 LDO

The USB FS eye test will fail in MX6 board if the 3V USB phy LDO is not enabled.
Setting enable bit (bit-0) of LDO 3p0 will make 3p0 LDO to use bandgap output as
reference voltage, LDO output will be accurate. And HW team suggest that it is
better to raise the voltage of USB 3p0 phy LDO 3.2V to pass the USB compliance
testing.

- Implement vdd3p0 regulator enable and disable function to support
  enable and disable the LDO 3p0 regulator.
- Use regulator API to enable the USB 3p0 phy LDO and raise the LDO
  to 3.2V during system boot up. And disable the LDO before system
  enter suspend and enable the LDO again after system resume.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00230910 IPU: wrong display to downsize large resolution frame on split mode
Wayne Zou [Wed, 24 Oct 2012 01:36:00 +0000 (09:36 +0800)]
ENGR00230910 IPU: wrong display to downsize large resolution frame on split mode

Fix bug: IPU IC resize ratio overflow when downsizing large resolution frame
using split mode, for example downsize 4080x2720 frame into 1920x1080 frame.
Otherwise, the downsized frame is wrong.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00230923 Revert " input: FSL MPR121 capacitive touch button."
Zhang Jiejing [Wed, 24 Oct 2012 04:49:23 +0000 (12:49 +0800)]
ENGR00230923 Revert " input: FSL MPR121 capacitive touch button."

There was a mpr121_touchkey.c driver already upstream,
the orignall driver by 2.6.35 kernel development
should be removed to avoid duplicate.

This reverts commit 3d6df22ad54a14bc8cebb7753c36f7b3cd811665.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00230920-3 HDMI AUIDO: export symbol in HDMI core driver
Chen Liangjun [Wed, 24 Oct 2012 04:46:53 +0000 (12:46 +0800)]
ENGR00230920-3 HDMI AUIDO: export symbol in HDMI core driver

Export symbol in HDMI core driver to support HDMI AUDIO codec driver's
loadable module build.

Signed-off-by: Chen Liangjun <b36089@freescale.com>