Terry Lv [Tue, 16 Aug 2011 08:06:24 +0000 (16:06 +0800)]
ENGR00154889-2: Add virtual iim driver
Add virtual iim driver.
This driver will be used by MM team.
Signed-off-by: Terry Lv <r65388@freescale.com>
(cherry picked from commit 6637e480585112bb310fcbd7ccd1cbf1d67cf9ff) Signed-off-by: Robin Gong <b38343@freescale.com>
Peter Chen [Tue, 7 Jan 2014 07:25:26 +0000 (15:25 +0800)]
ENGR00292062 usb: chipidea: need to mask INT_STATUS when write otgsc
For otgsc, both enable bits and status bits are in it. So we need
to make sure the status bits are not be cleared when write enable
bits. It can fix one bug that we plug in/out Micro AB cable fast,
and sometimes, the IDIS will be cleared wrongly when handle last
ID interrupt (ID 0->1), so the current interrupt will not occur.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Peter Chen [Fri, 3 Jan 2014 05:45:30 +0000 (13:45 +0800)]
ENGR00292408-2 usb: chipidea: imx: enable different wakeup setting
We have different wakeup setting for different roles:
For peripheral-only mode, we may only enable vbus wakeup.
The Micro-AB cable should not be considered as wakeup source.
For host-only mode, the ID change or vbus change should not be
considered as wakeup source.
For OTG mode, all wakeup setting should be considered as wakeup
source.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Peter Chen [Thu, 26 Dec 2013 08:16:44 +0000 (16:16 +0800)]
ENGR00291282-6 usb: phy-nop: add the implementation of .set_suspend
Add clock enable/disable at .set_suspend if the PHY has
suspend requirement, it can be benefit of power saving for
phy and the whole system (parent clock may also be disabled).
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Peter Chen [Thu, 26 Dec 2013 08:06:16 +0000 (16:06 +0800)]
ENGR00291282-5 usb: phy-nop: defer clock prepare until PHY init
It can avoid the problem that the prepare count is non-zero even
nop PHY is un-used. In fact, the same operation is already
at the lastest mainline code:
Peter Chen [Tue, 10 Dec 2013 02:17:02 +0000 (10:17 +0800)]
ENGR00291282-3 ARM: imx6q-arm2-hsic: add usb hsic dts
Since hsic has pin conflict with ethernet, we disable ethernet
at this dts. Besides, please make sure the line of data and strobe
has unchanged between board boots up and hsic controller has
benn enabled.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Fancy Fang [Mon, 6 Jan 2014 08:26:52 +0000 (16:26 +0800)]
ENGR00293898 PXP: set the pxp_dispatch kernel thread to be freezable to avoid hang
By default, the kernel thread cannot be freezed during pm suspend.
So during pm suspend, the pxp_dipatch thread is still handling pxp
task and setting pxp registers. And in some time, this pxp register
setting may happen after the pxp_suspend done. So the hang issue
happens. This patch set the thread to be freezable to freeze it
before pxp_suspend called to avoid this hang issue.
Fancy Fang [Wed, 25 Dec 2013 10:04:56 +0000 (18:04 +0800)]
ENGR00293323 PXP: add WC and cacheable dma buffer support for PXP device
This change add support for new dma buffer type(writecombine and cacheable)
which allows user application has more choices for the buffer type. And if
the dma buffer is cacheable, then add flush interfaces to make it cache
coherent when necessary.
Fancy Fang [Wed, 25 Dec 2013 02:03:35 +0000 (10:03 +0800)]
ENGR00293292 PXP: enhance channel and buffer reclaim for PXP device
Enhance channel and buffer reclaim to make sure that all the
allocated resources which are not freed yet to be freed
when the device file descriptor release() function called.
Fancy Fang [Tue, 24 Dec 2013 08:05:53 +0000 (16:05 +0800)]
ENGR00293211 PXP: bind allocated DMA channels to opened device file descriptor
The allocated DMA channels via some opened file descriptor is better
to be bound to this descriptor. Since this can avoid some application
to fake a channel id which may be requested by other applications to
request PXP service. And also, this make it easier to release the dma
channel when application exists abnormally or forgets to release it
explicitly.
Robby Cai [Wed, 25 Dec 2013 07:46:37 +0000 (15:46 +0800)]
ENGR00293132-2 pxp/v4l2: restore smem_start for framebuffer even exit abnormally
Previously, the framebuffer for UI display may only be restored after
STREAMOFF ioctl is called. But sometimes the application may exit abnormally
(without call STREAMOFF) for some reason. Now restore previously-saved
smem_start in release function to make sure it's set correctly, to avoid some
video frame remain.
Robby Cai [Fri, 20 Dec 2013 10:20:47 +0000 (18:20 +0800)]
ENGR00293132-1 pxp/v4l2: change memory alloc policy for PxP output buffer
In previous implementation, the memory allocation/free for PxP output buffer is
done each time v4l2 output device is opened/closed. This is not necessary and
may cause memory fragmentation issue after running many many times. Now we
re-allocate the memory for it only if the existing memory size is not sufficent
for new case.
Ezequiel Garcia [Mon, 25 Nov 2013 11:30:31 +0000 (08:30 -0300)]
mtd: nand: refactor print messages
Add a nice "nand:" prefix to all pr_xxx() messages. This allows
to get rid of the "NAND" words in messages, given the context
is already given by the prefix.
Remove the __func__ report from messages where it's not needed and refactor
the device detection messages to show itself in several lines.
Fancy Fang [Tue, 24 Dec 2013 02:36:17 +0000 (10:36 +0800)]
ENGR00293170 PXP: remove cpu_addr field from struct pxp_mem_desc
The cpu_addr field in struct pxp_mem_desc cannot be used
by user application, so it is not necessary to pass this
field data to user. Now the similar field 'virtual' in
struct pxp_buf_obj is used to store the kernel space
virtual addr for allocated dma buffer.
Liu Ying [Tue, 24 Dec 2013 08:26:35 +0000 (16:26 +0800)]
ENGR00293235 IPUv3: Refine register access
The original IPUv3 driver uses readl()/writel() to
access the IPUv3 registers in the following way where
ipu->reg_base is a pointer which points to a 32 bit
I/O memory cell of a certain IPUv3 deblock's base address:
writel(value, ipu->reg_base + offset);
readl(ipu->reg_base + offset);
This makes the register offset values shrink 4 times,
comparing to the offset values documented in the
reference manual. For example, we need to change the
offset value from 0x003C to 0x003C/4 so that we may
access the register IPU_INT_CTRL_1 correctly.
This patch redefines the type of ipu->reg_base to
'void __iomem *', then the offset values can be the
same to what they are documented.
Also, this patch corrects some register relevant
macros by wrapping their arguments with parentheses
to avoid any unsafe decipher.
Reviewed-by: Robby Cai <R63905@freescale.com> Cc: Oliver Brown <oliver.brown@freescale.com> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Liu Ying [Tue, 24 Dec 2013 08:18:56 +0000 (16:18 +0800)]
ENGR00293231 IPUv3 reg: Remove some unused macros
This patch removes two unused macros IPU_INT_CTRL_IRQ(irq)
and IPU_INT_STAT_IRQ(irq) to save two lines of code. The
existing another two macros IPUIRQ_2_STATREG(irq) and
IPUIRQ_2_CTRLREG(irq) are the surrogates for them.
Reviewed-by: Robby Cai <R63905@freescale.com> Cc: Oliver Brown <oliver.brown@freescale.com> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Fancy Fang [Fri, 20 Dec 2013 10:14:21 +0000 (18:14 +0800)]
ENGR00293119 PXP: change the dma buffer lists management for PXP device
Create pxp_info struct data for each opened device file descriptor.
And bind all the allocated dma buffers to this struct for each opened
file. This makes the dma buffer lists management safer, more effective
and more flexible.
Fancy Fang [Thu, 19 Dec 2013 10:32:42 +0000 (18:32 +0800)]
ENGR00292816 PXP: move two struct definitions to pxp_device.h
Move two struct definitions defined in pxp_device.c to pxp_device.h.
Now the pxp_device.h has been created for PXP device driver. So all
the type definition should stay in header file not c source file.
Luwei Zhou [Mon, 23 Dec 2013 06:09:25 +0000 (14:09 +0800)]
ENGR00293101 hwmon: mma8451: add sys interface to set sensor scale mode.
mma8451 sensor driver on i.MX6Q/DL SabreSD/AUTO doesn't provide the
interface to set sensor scale. The new sys interface name is "scalemode".
The mode is defined as:
MODE_2G : 0, MODE_4G : 1, MODE_8G : 2
Luwei Zhou [Fri, 20 Dec 2013 02:23:39 +0000 (10:23 +0800)]
ENGR00281813 input: mma8450: evbug module will keep print message.
evbug will open the mma8450 on i.MX6SL_EVK and mma8450 will work in 2G mode by default.
That is the reason why mma8450 logs will be printed out. The main changes is below:
* Remove the open(), close() hook out of the drivers. The open() and close()
hook in input framwork is defined as void type. It isn't strictly safe in
logic when some error happends. So remove them out.
* Modify the mma8450 to standby mode by default. It will be more power saving
and there would be no log printing out after booting up.
* Provide the sys interface to modify the mma8450 work modes. Then the higher
layer can modify the the mma8450 work mode via the interface. It would be
much safer.There would be a sclaemode interface in the folder of
/sys/devices/soc0/soc.1/2100000.aips-bus/21a0000.i2c/i2c-0/0-001c/scalemode
User can use cat to read the current scalemode and echo to write. The mode
is defined as: MODE_STANDBY: 0 MODE_2G:1 MODE_4G:2 MODE_8G:3
* Add mutex to protect and some error handling.
Liu Ying [Thu, 19 Dec 2013 05:54:28 +0000 (13:54 +0800)]
ENGR00292775 mipi csi2: Refine register access
The original mipi csi2 driver uses readl()/writel()
to access the 32 bit mipi csi2 registers in the
following way where info->mipi_csi2_base is a pointer
which points to a 32 bit I/O memory cell of the mipi
csi2's base address:
writel(value, info->mipi_csi2_base + offset);
readl(info->mipi_csi2_base + offset);
This makes the register offset values shrink 4 times,
comparing to the offset values documented in the
reference manual. For example, we need to change the
offset value from 0x004 to 0x001 so that we may access
the register MIPI_CSI2_N_LANES correctly.
This patch redefines the type of info->mipi_csi2_base
to 'void __iomem *', then the offset values can be the
same to what they are documented. Also, the macro names
for the registers are aligned to the documentation.
Acked-by: Robby Cai <R63905@freescale.com> Cc: Oliver Brown <oliver.brown@freescale.com> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Eric Dumazet [Thu, 19 Dec 2013 18:53:02 +0000 (10:53 -0800)]
net: fec: fix potential use after free
skb_tx_timestamp(skb) should be called _before_ TX completion
has a chance to trigger, otherwise it is too late and we access
freed memory.
Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: de5fb0a05348 ("net: fec: put tx to napi poll function to fix dead lock") Cc: Frank Li <Frank.Li@freescale.com> Cc: Richard Cochran <richardcochran@gmail.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Oliver Brown [Thu, 19 Dec 2013 18:59:05 +0000 (12:59 -0600)]
ENGR00292585 IPUv3: Fix a horizontal line at the middle playing 1080i
Added additional check to handle stripe limits differently for upscaling
and downscaling. Upscaling requires relaxed checking because input stripe
may fall slighty outside of the input window. Downscaling requires strict
limit checking.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
Fancy Fang [Wed, 18 Dec 2013 05:38:23 +0000 (13:38 +0800)]
ENGR00292562 PXP: move the definitions used only by PXP device to a new header file
Some definitions used only by PXP device driver should not stay in
pxp_dma.h which is shared by PXP, EPDC and V4L2. So the patch creates
a new header file pxp_device.h to hold these definitions.
Fancy Fang [Tue, 17 Dec 2013 08:58:26 +0000 (16:58 +0800)]
ENGR00292398 PXP: refine two spin locks usage in PXP dma driver
This patch provides the following refinements:
1. For pxp channel lock, use spin_lock() instead of spin_lock_irqsave().
Since this lock is not used in any ISR. Moreover, this can increase the
driver's concurrency with no local irq disabled.
2. Narrow down the pxp lock's locking range in pxp_issue_pending().
Since this lock is also used in PXP ISR, so its hold time should be as
few as possible to reduce the time when local irq disabled.
Peter Chen [Thu, 12 Dec 2013 06:33:02 +0000 (14:33 +0800)]
ENGR00291876 usb: phy-mxs: add delay before set phyctrl.clkgate
There is a request from IC engineer that if we doesn't
set phypwd as 0xffffffff, we need to delay about five
32Khz cycles before set phypwd, otherwise, the wakeup
signal may can't wake up controller.
Liu Ying [Wed, 18 Dec 2013 02:03:22 +0000 (10:03 +0800)]
ENGR00291103 IPUv3 common:Don't initialize PRP_VF for MEM_VDI_MEM
Since the channel MEM_VDI_MEM doesn't use the PRP_VF task, this
patch removes the code to initialize the PRP_VF task for the
channel MEM_VDI_MEM. This change may fix the issue caused by
the unnesessary PRP_VF task output resolution limitation check.
The issue can be reproduced by the following unit test case:
mxc_vpu_test.out -D "-f 2 -y 2 -v m -i
1080i_shields1088i2997_shields_ter_4x300_15fps_track1.h264"
Fancy Fang [Tue, 17 Dec 2013 07:30:58 +0000 (15:30 +0800)]
ENGR00292369 PXP: remove unnecessary head list empty check
The head list empty check in function pxpdma_dostart_work()
is meaningless, since this function only can be called when
there is some pxp task in the head list, that is to say head
list is not empty.
Fancy Fang [Mon, 16 Dec 2013 02:55:04 +0000 (10:55 +0800)]
ENGR00292121 PXP: remove __u32 definition in pxp_dma.h
Remove the __u32 macro definition in pxp_dma.h. But include
<linux/types.h> in pxp_dma.h to make sure user application
which include pxp_dma.h to be compiled with no error.
Dong Aisheng [Mon, 16 Dec 2013 06:42:14 +0000 (14:42 +0800)]
ENGR00292140 mmc: sdhci: fix possible sleep in atomic in sdio_irq enable function
The sdhci_runtime_pm_get API is able to sleep, so should not call it in
sdhci_enable_sdio_irq_nolock which is executed with spin_lock_irqsave in
sdhci_enable_sdio_irq.
Move it out of spin lock to fix this issue.
There's actually a major bug right there, scat_list can corrupt scat_q_depth.
Move scat_list down after scat_q_depth and change to scat_q_depth[0] to
avoid the possible corruption of scat_q_depth.
Fancy Fang [Wed, 11 Dec 2013 10:48:44 +0000 (18:48 +0800)]
ENGR00291731 PXP: move pxp_irq_info definition from PXP dma to PXP device
struct pxp_irq_info is only used by PXP device driver, so it is unreasonable
to define it in pxp_dma.h which will be included by EPDC, V4L2 PXP and PXP
device driver.
Fancy Fang [Wed, 11 Dec 2013 10:21:10 +0000 (18:21 +0800)]
ENGR00291729 PXP: remove a mutex lock from pxp channel
This mutex lock is no longer necessary in PXP dma driver. After
the commit "ENGR00291400 PXP: Organize PXP task queue to be FIFO",
protection fields can be protected by the spin lock in PXP channel
now.
Fancy Fang [Wed, 11 Dec 2013 06:22:35 +0000 (14:22 +0800)]
ENGR00291658 PXP: allow PXP device users to submit multiple tasks before start PXP
After the commit "ffcad666548417ef21937e0a755d85ab922313a9" pushed,
adding this support in PXP device driver is also necessary. This
change allows users to submit more than one PXP tasks followd by
only one wait for finished ioctl. It means that users can wait for
more than one tasks done by calling one PXP_IOC_WAIT4CMPLT ioctl.
Nicolin Chen [Mon, 2 Dec 2013 06:06:02 +0000 (14:06 +0800)]
ENGR00292021-1 arm: dts: imx6sl-evk: Specify the IOMUX value of GPIO4_IO19
We are missing one pull-up resistor attached to GPIO4_IO19 on EVK board,
thus use specific IOMUX value to pull up the GPIO4_IO19 by SoC itself.
Otherwise, system like Android might not have the ability to determine
whether the headphone is currently plugged into the jack.
Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Fancy Fang [Mon, 9 Dec 2013 10:36:39 +0000 (18:36 +0800)]
ENGR00291400 PXP: Organize PXP task queue to be FIFO
The requested PXP tasks were handled based on channel unit. All the
tasks in one channel were handled one by one, and the tasks in another
channel only can get chance after all the tasks in previous channel
were finished. So this may allow some channel occupies PXP hardware
exclusively all the time, and other channels may never get PXP services.
So this change makes the PXP task queue to be a FIFO to avoid this kind
of unfair usage for PXP.
Liu Ying [Tue, 10 Dec 2013 09:28:09 +0000 (17:28 +0800)]
ENGR00291111 mxc vout:Restore when new config fails
Users may call VIDIOC_S_CTRL and VIDIOC_S_CROP ioctrls
to change rotation and cropping settings when streaming.
The driver should restore the original settings if new
configuration fails, otherwise, it might break the
present pipeline.
This patch fixes the issue which can be reproduced by
this test case with a 1080P HDMI primary display:
gplay Mpeg4_SP1_480x260_24_1200_aac_48_128_2_terminator3.mp4
Type 't' to set rotation to 90.
Luwei Zhou [Tue, 10 Dec 2013 06:21:15 +0000 (14:21 +0800)]
ENGR00290679 mxc: mlb Fix the MLB150 not stable issue in ISOC mode.
The MLB test bench has bug when testing the ISOC mode.When we press
stop test button when completing test, MITB will cause MLB150 on ARD
error.The mlbintr ISR handler is used to handle the error interrupt.
In the ISR handler, the MLB150_MS0,MLB150MS1 should be cleared.
The spec doesn't give detailed description. The spec only says that
the registers need to be cleared before enabling interrupt.
Fancy Fang [Wed, 4 Dec 2013 07:32:20 +0000 (15:32 +0800)]
ENGR00290664 PXP: allocate DMA TX descriptors on demand instead of in PXP initialization
In previous PXP driver, the number of tx descriptors allocated
for each channel is a constant 16 and they can only be allocated
during PXP initialization. But since the driver allows users to
queue more than one PXP tasks for each channel before issuing
pending tasks, so in this case the descriptors may be not enough
for some cases.
Fancy Fang [Wed, 4 Dec 2013 02:13:26 +0000 (10:13 +0800)]
ENGR00290613 PXP: add asynchronous multi instances support for PXP
Move PXP registers setting from pxp_issue_pending() to a seperate
kernel thread. This change will avoid the multi instances hang issues
solved in previous commits. And also the pxp users won't be blocked
when it call dma_async_issue_pending() function.
The downsizing ratio overflow check should cover every stripe
in the split mode. We need to do the overflow check correctly
by taking the width/height 8-pixel alignment requirement into
consideration since the alignment would be done when every
stripe is checked in it's own ipu task.
This patch takes a workaround for the issue which can be
reproduced by this unit test case:
Liu Ying [Wed, 4 Dec 2013 03:48:27 +0000 (11:48 +0800)]
ENGR00290635-2 IPUv3 stripe:Fix a build warning
This patch fixes the following build warning by
initializing some local variables:
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c: In function ‘ipu_calc_stripes_sizes’:
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c:393:3: warning: ‘difwr’ may be used uninitialized in this function [-Wuninitialized]
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c:393:3: warning: ‘onw’ may be used uninitialized in this function [-Wuninitialized]
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c:393:3: warning: ‘inw’ may be used uninitialized in this function [-Wuninitialized]
Liu Ying [Wed, 4 Dec 2013 03:26:12 +0000 (11:26 +0800)]
ENGR00290635-1 mxc vout:Fix a build warning
This patch fixes the following build warning by allocating
a block of virtual memory to cache an instance of the structure
mxc_vout_output instead of using the stack frame.
drivers/media/platform/mxc/output/mxc_vout.c: In function ‘mxc_vidioc_s_crop’:
drivers/media/platform/mxc/output/mxc_vout.c:1529:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Liu Ying [Mon, 2 Dec 2013 08:56:00 +0000 (16:56 +0800)]
ENGR00290361-2 MXC IPUv3 fb:Add check for a IDMAC errata
The IPUv3 IDMAC has a bug to read 32bpp pixels from a
graphics plane whose alpha component is at the most
significant 8 bits. The bug only impacts on cases in which
the relevant separate alpha channel is enabled.
This patch adds check for the errata so that the bad
cases won't be triggered.
Liu Ying [Thu, 21 Nov 2013 08:39:08 +0000 (16:39 +0800)]
ENGR00290361-1 IPUv3 IC:Add check for a IDMAC errata
The IPUv3 IDMAC has a bug to read 32bpp pixels from a
graphics plane whose alpha component is at the most
significant 8 bits. The bug only impacts on cases in which
the relevant separate alpha channel is enabled.
This patch adds check for the errata so that the bad
cases won't be triggered.
Sandor Yu [Mon, 2 Dec 2013 07:40:46 +0000 (15:40 +0800)]
ENGR00290337 ipuv3: Setup pixel clock tree after ipu reset
When the ipu pixel clocks are initialized, the default pixel clock rate
will be calucated according to the present ipu register setting which
is likely set by a bootloader.
But these registers will be reset by the ipu reset function.
If the default pixel clock rate is the same to what is requested later,
the clk_set_rate function will treat this case as pixel clock unchanged.
Move the pixel clock setup function after the ipu reset function to
resolve this issue
Peter Chen [Thu, 28 Nov 2013 08:06:44 +0000 (16:06 +0800)]
ENGR00290297 usb: imx6-usb-charger: disable charger if it has not configurated
If the user set imx6-usb-charger-detection at dts, but not enable
CONFIG_IMX6_USB_CHARGER, the imx6_usb_create_charger will return
-ENODEV, and the controlller probe will fail, it is not we want,
what we expect is the charger detection has disabled, but controller
function should not be affected.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Adding check to skip RNG instantiation if previously performed. This will prevent CAAM from crashing when HAB instantiates the RNG at boot on a closed device. Also removed an extra printk that isn't needed in secvio initialization.
Signed-off-by: Dan Douglass <b41520@freescale.com>
Nicolin Chen [Fri, 29 Nov 2013 09:44:39 +0000 (17:44 +0800)]
ENGR00290229 ASoC: fsl: Drop snd_soc_dapm_sync() in imx-wm8962
As DAPM would do the sync() for us, we don't need to handle it by ourselves.
And leaving snd_soc_dapm_sync() here is dangerous because it would disable
the clock from WM8962 during the short period of the output route changing
since we don't leave the alternative route's enanbling to this machine driver
but to DAPM core.
Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Peter Chen [Tue, 26 Nov 2013 05:33:21 +0000 (13:33 +0800)]
ENGR00289645 usb: chipidea: udc: don't do hardware access if gadget has stopped
After _gadget_stop_activity is executed, we can consider the hardware
operation for gadget has finished, and the udc can be stopped and enter
low power mode. So, any later hardware operations (from usb_ep_ops APIs
or usb_gadget_ops APIs) should be considered invalid, any deinitializatons
has been covered at _gadget_stop_activity.
I meet this problem when I plug out usb cable from PC (using g_mass_storage),
my callstack like: vbus interrupt->.vbus_session->composite_disconnect
->pm_runtime_put_sync(&_gadget->dev), the composite_disconnect will
call fsg_disable, but fsg_disable calls usb_ep_disable using async way,
there are register accesses for usb_ep_disable. So sometimes, I get system
hang due to visit register without clock, sometimes not.
The Linux Kernel USB maintainer Alan Stern suggests this kinds of solution.
See: http://marc.info/?l=linux-usb&m=138541769810983&w=2.
Nicolin Chen [Fri, 22 Nov 2013 12:22:47 +0000 (20:22 +0800)]
ENGR00289381 mxc: asrc: Fix RCU stall in output_task_worker
In kernel 3.10.17, RCU has its threshold to detect RCU stall. So it might be
risky for us to use a whole second to wait for the completion, which would
be surely returned within 100ms. Thus, we shrink the wait period so as to
circumvent some potential RCU stall issue.
This patch also moved pair_hold into spin_lock protection due to a race with
pair_hold in close() and release().
Dan Douglass [Wed, 27 Nov 2013 09:40:44 +0000 (03:40 -0600)]
ENGR00289885 [iMX6Q] Add Secure Memory and SECVIO support.
1. Pull in secure memory support from 3.0.35 kernel.
2. Pull in SECVIO support from 3.0.35 kernel.
3. Make changes to support device tree.
4. Add device tree setting for SECVIO sources.
Signed-off-by: Dan Douglass <b41520@freescale.com>
Nicolin Chen [Tue, 26 Nov 2013 07:08:41 +0000 (15:08 +0800)]
ENGR00289643-2 ASoC: fsl: Add missing spba clock for esai and spdif
Both esai and spdif are using SDMA script to transmit and receive data while
the essential spba clock is missed in the current two drivers. Thus add them.
Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Fancy Fang [Wed, 27 Nov 2013 08:41:38 +0000 (16:41 +0800)]
ENGR00289859 PXP: fix that multi users may access PXP hardware simultaneously
After the patch 6320ada11093ef0a4ded9065d6ae284a9129f7d6, there still exists
some cases that more than one user would set PXP hardware registers before the
previous task done. Now use another mutex lock to make sure that registers
settings can only happen when PXP hardware is idle.
Robby Cai [Tue, 26 Nov 2013 07:20:28 +0000 (15:20 +0800)]
ENGR00289648 mx6sl: v4l2 output: Add UYVY format as input format for v4l2
This feature is easy for gstreamer to pipeline v4lsrc and v4lsink, since
camera output format can be set as UYVY in v4l2 capture driver, and PxP
will do the CSC from UYVY to RGB565 in v4l2 output driver for LCD display.
Liu Ying [Mon, 25 Nov 2013 10:34:40 +0000 (18:34 +0800)]
ENGR00289553 IPU dev:correct downsize overflow check in rot case
In rotation cases, the width and height of IPUv3 IC scaling block's
output should align with the width and height of IPUv3 IC rotation
block. And, users only tell the IPUv3 device driver about the parameters
of scaling block's input and rotation block's output. So, we need to
swap the width and height of rotation block in cache before we do
downsize(a functionality of the scaling block) overflow check.
This patch fixes the issue which can be reproduced by this unit test case:
/unit_tests/mxc_v4l2_output.out -iw 128 -ih 128 -ow 176 -oh 10 -r 90
Oliver Brown [Fri, 22 Nov 2013 16:30:15 +0000 (10:30 -0600)]
ENGR00289436 - [V4L2 Capture] Build warning on mxc_v4l2_capture.c
Need to remove the following warning:
warning: array subscript is above array bounds
Summary of changes:
Moved MXC_SENSOR_NUM definition to mxc_v4l2_capture.h.
all_sensors[] now uses MXC_SENSOR_NUM in definition.
MXC_SENSOR_NUM is now used for bounds checking the array.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
ENGR00289268 [iMX6x] Ensure there is no TLB miss when DDR is in self-refresh
During DDR frequency change code or in low power IDLE code (in iMX6SL),
we need to ensure that all register addresses accessed in the IRAM
code are in the TLB. There should be no TLB walks when DDR is in self-refresh.
To ensure this flush the TLB before DDR frequency change and before
low power IDLE (only iMX6SL) procedures.
Oliver Brown [Mon, 18 Nov 2013 20:52:27 +0000 (14:52 -0600)]
ENGR00274166 - Split mode has artifacts
- Need to use different multiple and index parameters for vertical
and horizontal stripes
- Use correct multiple and index based upon pixel format
- Allow input crop and size to be larger than width by upto 16 pixels
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
Oliver Brown [Tue, 19 Nov 2013 15:49:53 +0000 (09:49 -0600)]
ENGR00272541 IPUv3 IC: Split Downsizing overflow for size greater than 1024
For downscaling, it is possible that downscaler output is greater
than 1024. Added a function, calc_split_resize_coeffs, based upon
_calc_resize_coeffs to calculate resizing and downscaling coefficients.
In ipu_ic.c, checks for the range of *_resize_ratio are no longer needed.
Non split cases will always have *_resize_ratio of zero.
In ipu_device, additional checks are needed to check for an error from
ipu_calc_stripes_sizes if calc_split_resize_coeffs fails.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
The max timeout counter for uSDHC is SDCLK x (1 << 28), not as standard
controller defined as TMCLK x (1 <<27).
Add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER quirk to handle it.
Dong Aisheng [Fri, 22 Nov 2013 12:34:38 +0000 (20:34 +0800)]
ENGR00289406-1 mmc: sdhci: add quirk for get max timeout counter
The max timeout counter of some SoCs like i.MX6 uSDHC may not be standard,
add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER quirk to get the correct max timeout
counter from platform specific code.
Then we can calculate the correct max_discard_to value.
ENGR00258885 flexcan: fix errata ERR005829 that MB may fail to be sent
This is an issue from IC errata ERR005829 which is described as follows:
----------------------------------------------------------
FlexCAN does not transmit a message that is enabled to be transmitted
in a specific moment during the arbitration process. The following
conditions are necessary to have the issue.
- Only one MB is configured to be transmitted
- The write which enables the MB to be transmitted (write on Control status
word) happens during a specific clock during the arbitration process.
After this arbitration process occurs, the bus goes to Idle state and no
new message is received on bus.
For example:
1) MB13 is deactivated on RxIntermission (write 0x0 on CODE field from Control
Status word) - First write on CODE
2) Reconfigure the ID and data fields
3) Enable the MB13 to be transmitted on BusIdle (write 0xC on Code
field) - Second write on code
4) CAN bus keeps in Idle state
5) No write on Control status from any MB happens.
During the second write on code (step 3), the write must happen one clock
before the current MB13 is to be scanned by arbitration process.
In this case, it does not detect the new code (0xC) and no new arbitration is
scheduled.
The suggested workaround which is implemented in this patch is:
The workaround consists of executing two extra steps:
6. Reserve the first valid mailbox as an inactive mailbox (CODE=0b1000).
If RX FIFO is disabled, this mailbox must be MB0. Otherwise, the first
valid mailbox can be found by using table "RX FIFO filters" on FlexCAN3 chapter.
7. Write twice INACTIVE code (0b1000) into the first valid mailbox.
Note: The first mailbox cannot be used for reception or transmission process.
-------------------------------------------------------------
Note: Although the currently flexcan driver does not have the step 1 to run,
it's also possible to meet this issue in theory because we can not predict
when the arbitration is scheduled.
With a modified can-utils/canfdttest tool simulating Pingpong test, we were
able to reproduce this issue after running a about one day.
After applying this patch, we ran six days and did not see the issue happen
again on two mx6q sabrelite boards.
Note: with a few minors change for new kernel and change errata id from
ERR005641 to ERR005829 which is the open one in freescale website.
Fancy Fang [Thu, 21 Nov 2013 11:44:45 +0000 (19:44 +0800)]
ENGR00289237 PXP: fix a multiple instances hang issue
In pxp_issue_pending(), the wait for pxp done processes will be woken up
together in PXP ISR. So there will be some situations that one process will
set PXP hardware registers after another process's setting but before the
first PXP task done. So the PXP hardware may be corrupted and hang maybe
happen.
Fugang Duan [Tue, 19 Nov 2013 04:59:18 +0000 (12:59 +0800)]
ENGR00288569: net:fec_ptp: fix the potential issue for storing timestamp
The timestamps generated in the i.MX drivers are generated by the
nanoseconds part coming from the 1588 clock. But the number of seconds
are maintained in a private structure of the interface. Those are
updated in a 1588 clock rollover interrupt.
The timestamp is generated right before a rollover of a second and the
timestamp value is constructed afterwards. Therefore the bigger part of
the timestamp is wrong (the second).
But it is not perfect and there still exist potenitial second sync issue.
So, the patch Suggested solution (pseudo-code):
If( actual-time.nsec < timestamp.nsec &&
!FEC_IEVENT[TS_TIMER] )
Timestamp.sec = fpp->prtc -1;
Else
Timestamp.sec = fpp->prtc;
Dong Aisheng [Fri, 22 Nov 2013 05:45:22 +0000 (13:45 +0800)]
ENGR00289278 dts: imx6qdl-sabreauto: fix usdhc1 pin conflict with gpmi
The SD1 on sabreauto baseboard is conflict with gpmi nand. The conflict
pins are DAT4~DAT7. Since the SD3 on cpu board already supports 8 bit bus
width, we do not want add an extra dts file for it, so we disable 8 bit and use
4 bit width for this issue.
Dong Aisheng [Fri, 15 Nov 2013 09:54:36 +0000 (17:54 +0800)]
ENGR00289279 mmc: sdhci: get runtime pm when sdio irq is enabled
SDIO cards may need clock to send the card interrupt to host.
Thus, we get runtime pm when sdio irq is enabled to prevent the clock
resource is released and put it when sdio irq is disabled.
Peter Chen [Thu, 21 Nov 2013 08:45:18 +0000 (16:45 +0800)]
ENGR00288578-8 usb: phy-mxs: do not set PWD.RXPWD1PT1 for low speed connection
At very rare cases, the SoF will not send out after resume with
low speed connection. The workaround is do not power down
PWD.RXPWD1PT1 bit during the suspend.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Peter Chen [Tue, 19 Nov 2013 07:42:32 +0000 (15:42 +0800)]
ENGR00288578-4 usb: chipidea: using timer to delay decreasing power.usage_count
We need to keep controller as active until the udc or host driver
requests its power.usage_count, otherwise, the system will hang
due to access register at low power mode.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Peter Chen [Tue, 19 Nov 2013 06:29:33 +0000 (14:29 +0800)]
ENGR00288578-3 usb: chipidea: only update ci->vbus_active at peripheral mode
If we connect between otg-host and host pc with Male-A-To-Male-A cable,
the ci->vbus_active will be error, and cause the controller run when
we load gadget module (ci_udc_start will be run), it causes the kernel
panic since no one will handle irq at that mode.
Signed-off-by: Peter Chen <peter.chen@freescale.com>