]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agoENGR00295218-2 gpu: Allow allocate vg memory from small block reserved memory
Loren Huang [Thu, 16 Jan 2014 08:23:37 +0000 (16:23 +0800)]
ENGR00295218-2 gpu: Allow allocate vg memory from small block reserved memory

-Most vg memory must requires reserved memory, when reserved memory is
used up by 3d appliction. vg hardware can't be constructed successfully,
which cause whole context creation failure(including 3d context).
-Allow allocating vg memory from small block reserved memory can help such
multi context cases.

Date: Jan 15, 2014

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 5d7c8c1c695b79f7372de16504292a1241390a8b)

10 years agousb: chipidea: Reallocate regmap only if lpm is detected
Chris Ruehl [Fri, 6 Dec 2013 08:35:12 +0000 (16:35 +0800)]
usb: chipidea: Reallocate regmap only if lpm is detected

The regmap only needs to reallocate if the hw_read on the CAP register shows
lpm is used. Therefore the if() statement check the change.

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 57fadc36d11a1263b446ef6f5d474d529274faa8)

10 years agousb: chipidea: imx: avoid unnecessary probe defer every time
Peter Chen [Fri, 6 Dec 2013 08:35:13 +0000 (16:35 +0800)]
usb: chipidea: imx: avoid unnecessary probe defer every time

The ci_hdrc_imx's probe needs usbmisc_imx to be loadded beforehand,
so it is better we load usbmisc_imx first.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4ee606c17718706a2bf0f68c70124a343341b4f1)

10 years agousb: chipidea: host: Only disable the vbus regulator if it is not NULL
Fabio Estevam [Thu, 5 Dec 2013 07:20:49 +0000 (15:20 +0800)]
usb: chipidea: host: Only disable the vbus regulator if it is not NULL

Commit 40ed51a4b (usb: chipidea: host: add vbus regulator
control) introduced a smatch complaint because regulator_disable() is called
without checking whether ci->platdata->reg_vbus is not NULL.

Fix this by adding the check.

This patch is needed for 3.12 stable

Cc: stable <stable@vger.kernel.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ae93fad5728e08f7cde89f628be2703ad249930d)

10 years agoUSB: chipidea: add guard macro to ci_hdrc_imx.h
Rahul Bedarkar [Tue, 31 Dec 2013 16:28:11 +0000 (21:58 +0530)]
USB: chipidea: add guard macro to ci_hdrc_imx.h

Add guard macro to driver/usb/chipidea/ci_hdrc_imx.h

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d27c16a1270c339e62ccc5816f3346d29f6b6c0d)

10 years agousb: chipidea: udc: using MultO at TD as real mult value for ISO-TX
Peter Chen [Fri, 10 Jan 2014 05:51:32 +0000 (13:51 +0800)]
usb: chipidea: udc: using MultO at TD as real mult value for ISO-TX

We have met a bug that the high bandwidth ISO-TX transfer has failed
at the last packet if it is less than 1024, the TD status shows it
is "Transaction Error".

The root cause of this problem is: the mult value at qh is not correct
for current TD's transfer length. We use TD list to queue un-transfer
TDs, and change mult for new adding TDs. If new adding TDs transfer length
less than 1024, but the queued un-transfer TDs transfer length is larger
than 1024, the transfer error will occur, and vice versa.
Usually, this problem occurs at the last packet, and the first packet for
new frame.

We fixed this problem by setting Mult at QH as the largest value (3), and
set MultO (Multiplier Override) at TD according to every transfer length.
It can cover both hardware version less than 2.3 (the real mult is MultO
if it is not 0) and 2.3+ (the real mult is min(qh.mult, td.multo)).

Since the MultO bits are only existed at TX TD, we keep the ISO-RX behavior
unchanged.

For stable tree: 3.11+.

Cc: stable <stable@vger.kernel.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reported-by: Matthieu Vanin <b47495@freescale.com>
Tested-by: Matthieu Vanin <b47495@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1c91f7e338e24fe86e5dba384337f19e49348430)

10 years agousb: chipidea: put hw_phymode_configure before ci_usb_phy_init
Chris Ruehl [Fri, 10 Jan 2014 05:51:30 +0000 (13:51 +0800)]
usb: chipidea: put hw_phymode_configure before ci_usb_phy_init

hw_phymode_configure configures the PORTSC registers and allow the
following phy_inits to operate on the right parameters. This fix a problem
where the UPLI (ISP1504) could not be detected, because the Viewport was not
available and read the viewport return 0's only.

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit fda8a80b7e944ec29f4438d6e6f159f691ae41a6)

10 years agousb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag
Chris Ruehl [Fri, 10 Jan 2014 05:51:29 +0000 (13:51 +0800)]
usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag

* init the sts flag to 0 (missed)
* fix write the real bit not sts value
* Set PORTCS_STS and DEVLC_STS only if sts = 1

[Peter Chen: This one and the next patch fix the problem occurred imx27
and imx31, and imx27 and imx31 usb support are enabled until 3.14, so
these two patches isn't needed for -stable]

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4cf40dc3d21cd9a482d969d1468fd265ec9921dd)

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

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00295184-6 dts: imx6: enable sdio wakeup for corresponding boards
Dong Aisheng [Mon, 13 Jan 2014 09:00:46 +0000 (17:00 +0800)]
ENGR00295184-6 dts: imx6: enable sdio wakeup for corresponding boards

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00295184-5 mmc: sdhci-esdhc-imx: add wakeup feature for sdio irq
Dong Aisheng [Mon, 13 Jan 2014 08:47:31 +0000 (16:47 +0800)]
ENGR00295184-5 mmc: sdhci-esdhc-imx: add wakeup feature for sdio irq

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00295184-4 dts: imx6: enable keep power capability for corresponding boards
Dong Aisheng [Mon, 13 Jan 2014 08:20:55 +0000 (16:20 +0800)]
ENGR00295184-4 dts: imx6: enable keep power capability for corresponding boards

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00295184-3 mmc: sdhci-esdhc-imx: add keep power feature during suspend
Dong Aisheng [Mon, 13 Jan 2014 08:26:19 +0000 (16:26 +0800)]
ENGR00295184-3 mmc: sdhci-esdhc-imx: add keep power feature during suspend

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00295184-2 dts: imx6qdl-sabreauto: use external vmmc for sd3 optionally
Dong Aisheng [Fri, 10 Jan 2014 13:31:21 +0000 (21:31 +0800)]
ENGR00295184-2 dts: imx6qdl-sabreauto: use external vmmc for sd3 optionally

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

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

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

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00295184-1 mmc: sdhci: do not enable card detect interrupt for gpio cd type
Dong Aisheng [Tue, 31 Dec 2013 08:22:44 +0000 (16:22 +0800)]
ENGR00295184-1 mmc: sdhci: do not enable card detect interrupt for gpio cd type

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00293505 ARM: dtsi: imx6qdl-sabresd: Change disp id for mipi dsi
Liu Ying [Wed, 8 Jan 2014 07:44:52 +0000 (15:44 +0800)]
ENGR00293505 ARM: dtsi: imx6qdl-sabresd: Change disp id for mipi dsi

Currently, by default, we assign ipu display ports for the following
5 types of display devices on the imx6q sabresd platform in this way:
 ----------------------------------------
|                 | ipu             | di |
|----------------------------------------|
| ldb channel0    | 1(0 for imx6dl) | 0  |
|----------------------------------------|
| ldb channel1    | 1(0 for imx6dl) | 1  |
|----------------------------------------|
| hdmi            | 0               | 0  |
|----------------------------------------|
| mipi dsi        | 0               | 0  |
|----------------------------------------|
| parallel output | 0               | 0  |
 ----------------------------------------

So, the ipu0 di1 display port is not used by any display device.
This patch assigns this unused display port to mipi dsi by default.

Acked-by: Robby Cai <R63905@freescale.com>
Cc: Oliver Brown <oliver.brown@freescale.com>
Cc: Sandor Yu <R01008@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00294354 gpu:Using vitural memory cause AXI bus error
Loren Huang [Thu, 9 Jan 2014 09:38:37 +0000 (17:38 +0800)]
ENGR00294354 gpu:Using vitural memory cause AXI bus error

There are two possible reasons to cause AXI bus error
1.Allocate Tile status buffer from virtual memory. It seems gc2000
and gc880 doesn't support tile status buffer from virtual memory.
2.Stream buffer using very beginning gpu mmu address. In this condition,
a faked non gpu mmu address maybe generated and fill into gpu which cause
AXI bus error.

[DATE]09-01-2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00292154-3 gpu:Adjust logic for non_paged memory cache
Loren Huang [Thu, 9 Jan 2014 09:36:27 +0000 (17:36 +0800)]
ENGR00292154-3 gpu:Adjust logic for non_paged memory cache

non_page memory cache will only be freed when application exit.
It will have waste when contiguous memory used up.
Add logic to free it when contiguous memory is used up.

[DATE]16-12-2013
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00292154-2 gpu:Fix random kernel panic for vg application.
Loren Huang [Thu, 9 Jan 2014 09:35:41 +0000 (17:35 +0800)]
ENGR00292154-2 gpu:Fix random kernel panic for vg application.

The root cause is kernelVirtual is not initialized which
may cause incorrect kernel virtual address for vg.

[DATE]16-12-2013
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00292154-1 gpu:Fix kernel panic when ctrl+c an application
Loren Huang [Thu, 9 Jan 2014 09:35:07 +0000 (17:35 +0800)]
ENGR00292154-1 gpu:Fix kernel panic when ctrl+c an application

When application is using virtual memory, ctrl+c it will have
kernel panic caused by null pointer.
The reason is hardware struture already is freed when driver wants
to use it.

[DATE]16-12-2013
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00286762 gpu: enable swap rectange and fix a bug
Loren Huang [Thu, 9 Jan 2014 09:41:50 +0000 (17:41 +0800)]
ENGR00286762 gpu: enable swap rectange and fix a bug

add eglSetSwapRectangleANDROID back and enable swap rectange,
fix a swap rectange bug which will swap whole screen instead
of the indicate swap region if region's left and top is (0,0).

Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00289999 gpu: fixed gc880 invalid command state message
Xianzhong [Thu, 28 Nov 2013 14:37:16 +0000 (22:37 +0800)]
ENGR00289999 gpu: fixed gc880 invalid command state message

gpu kernel dump the error message when enable DEBUG mode:

gckCONTEXT_Update(1493): State 0x0518 is not mapped.
gckCONTEXT_Update(1493): State 0x0520 is not mapped.
gckCONTEXT_Update(1493): State 0x0518 is not mapped.
gckCONTEXT_Update(1493): State 0x0520 is not mapped.

align gpu kernel driver to fix the error message

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
10 years agoENGR00284988 gpu:Sync gpu kernel driver code
Loren Huang [Thu, 9 Jan 2014 09:03:08 +0000 (17:03 +0800)]
ENGR00284988 gpu:Sync gpu kernel driver code

Sync the code with commit 255ee1de in gpu-viv git.

Mainly covered tickets:
ENGR00288588 fixed system reboot when run webGL test
ENGR00284988 Camera recording kernel crash on WFD source
ENGR00283494 Modify Status to status to avoid build error
ENGR00278179-1 query video memory with seperate types

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00294115 PXP: correct the pxp_dispatch thread exit logic
Fancy Fang [Wed, 8 Jan 2014 02:43:17 +0000 (10:43 +0800)]
ENGR00294115 PXP: correct the pxp_dispatch thread exit logic

We should add thread stop checking before handle pxp task,
since the wait condition includes this check.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00294114 PXP: correct the PS U/V buffer settings when format is YVU420P
Fancy Fang [Wed, 8 Jan 2014 02:32:52 +0000 (10:32 +0800)]
ENGR00294114 PXP: correct the PS U/V buffer settings when format is YVU420P

The PXP itself doesn't support YVU420P default. But we can get the
U and V address according to the format when we try to set PS_UBUF
and PS_VBUF registers. So the YVU420P can be supported indirectly.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00294026-2 ARM: dts: imx: add viim device node in dts
Robin Gong [Tue, 7 Jan 2014 09:38:37 +0000 (17:38 +0800)]
ENGR00294026-2 ARM: dts: imx: add viim device node in dts

Enable viim device node in dts and enable in defconfig

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00294026-1 char: viim: modify for device tree
Robin Gong [Wed, 8 Jan 2014 08:54:36 +0000 (08:54 +0000)]
ENGR00294026-1 char: viim: modify for device tree

Change iim driver code for device tree framework.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00155179-2: Change imx_viim to mxs_viim.
Terry Lv [Mon, 22 Aug 2011 10:13:00 +0000 (18:13 +0800)]
ENGR00155179-2: Change imx_viim to mxs_viim.

This is the change for driver files.

Signed-off-by: Terry Lv <r65388@freescale.com>
(cherry picked from commit 2febec063fbeb749f993db24e2ae44ddcd5ac0e8)

10 years agoENGR00154889-2: Add virtual iim driver
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>
10 years agoENGR00292062 usb: chipidea: need to mask INT_STATUS when write otgsc
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>
10 years agoENGR00292408-2 usb: chipidea: imx: enable different wakeup setting
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>
10 years agoENGR00292408-1 usb: chipidea: add query_available_role interface
Peter Chen [Fri, 3 Jan 2014 05:42:56 +0000 (13:42 +0800)]
ENGR00292408-1 usb: chipidea: add query_available_role interface

The glue layer may need to know current available role, add
ci_hdrc_query_available_role for that.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00291282-7 ARM: imx_v7_defconfig: Add USB PHY NOP driver
Peter Chen [Thu, 26 Dec 2013 05:08:38 +0000 (13:08 +0800)]
ENGR00291282-7 ARM: imx_v7_defconfig: Add USB PHY NOP driver

It is needed for USB HSIC controller

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00291282-6 usb: phy-nop: add the implementation of .set_suspend
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>
10 years agoENGR00291282-5 usb: phy-nop: defer clock prepare until PHY init
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:

https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/drivers
/usb/phy/phy-generic.c?h=usb-next&id=4d175f340c9c055482688d2205038413dc7b6f1e

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00291282-4 usb: chipidea: imx: add HSIC support
Peter Chen [Thu, 26 Dec 2013 02:45:42 +0000 (10:45 +0800)]
ENGR00291282-4 usb: chipidea: imx: add HSIC support

Add imx6 HSIC support

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00291282-3 ARM: imx6q-arm2-hsic: add usb hsic dts
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>
10 years agoENGR00291282-2 ARM: imx6: add more dts entries for hsic controller
Peter Chen [Wed, 25 Dec 2013 09:16:21 +0000 (17:16 +0800)]
ENGR00291282-2 ARM: imx6: add more dts entries for hsic controller

- Add usbphy_nop, hsic uses nop phy driver
- Add anatop phandle, hsic needs to access anatop register to
change osc clock for different boards
- Add phy_type, hsic needs to config PHY parameters at portsc

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00291282-1 usb: doc: ci13xxx-imx: update for hsic controller
Peter Chen [Thu, 26 Dec 2013 01:56:21 +0000 (09:56 +0800)]
ENGR00291282-1 usb: doc: ci13xxx-imx: update for hsic controller

Update for hsic controller

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00293898 PXP: set the pxp_dispatch kernel thread to be freezable to avoid hang
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293323 PXP: add WC and cacheable dma buffer support for PXP device
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293292 PXP: enhance channel and buffer reclaim for PXP device
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293234 PXP: let irq_pending variable to be atomic
Fancy Fang [Tue, 24 Dec 2013 09:42:22 +0000 (17:42 +0800)]
ENGR00293234 PXP: let irq_pending variable to be atomic

Change irq_pending field in struct pxp_irq_info to a atomic
type. So the spin lock in pxp_irq_info is unnecessary.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293211 PXP: bind allocated DMA channels to opened device file descriptor
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293132-2 pxp/v4l2: restore smem_start for framebuffer even exit abnormally
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.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00293132-1 pxp/v4l2: change memory alloc policy for PxP output buffer
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.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agomtd: nand: refactor print messages
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.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00293170 PXP: remove cpu_addr field from struct pxp_mem_desc
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293235 IPUv3: Refine register access
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>
10 years agoENGR00293231 IPUv3 reg: Remove some unused macros
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>
10 years agoENGR00293119 PXP: change the dma buffer lists management for PXP device
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292816 PXP: move two struct definitions to pxp_device.h
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00293101 hwmon: mma8451: add sys interface to set sensor scale mode.
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

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00281813 input: mma8450: evbug module will keep print message.
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.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00292775 mipi csi2: Refine register access
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>
10 years agonet: fec: fix potential use after free
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>
10 years agoENGR00292585 IPUv3: Fix a horizontal line at the middle playing 1080i
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>
10 years agoENGR00290579 IPUv3: Fix split mode warnings
Oliver Brown [Tue, 3 Dec 2013 15:30:02 +0000 (09:30 -0600)]
ENGR00290579 IPUv3: Fix split mode warnings

Changed alignement for planar formats back to 16 pixels.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
10 years agoENGR00292607 PXP: define a static dma_chan array to record channel status
Fancy Fang [Wed, 18 Dec 2013 08:34:05 +0000 (16:34 +0800)]
ENGR00292607 PXP: define a static dma_chan array to record channel status

Since the number of dma channels is constant, it is more efficient
to use an array to record all the channels alloc/free status.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292562 PXP: move the definitions used only by PXP device to a new header file
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292398 PXP: refine two spin locks usage in PXP dma driver
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00291876 usb: phy-mxs: add delay before set phyctrl.clkgate
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.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit a7a99b979db9d0bf7277533a3a39ba09755768f0)

10 years agoENGR00291103 IPUv3 common:Don't initialize PRP_VF for MEM_VDI_MEM
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"

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00292369 PXP: remove unnecessary head list empty check
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292129 PXP: remove some unnecessary code from PXP dma driver
Fancy Fang [Mon, 16 Dec 2013 05:34:25 +0000 (13:34 +0800)]
ENGR00292129 PXP: remove some unnecessary code from PXP dma driver

There is no need to use spin lock in pxp_prep_slave_sg() after
dynamic descriptors allocation enabled.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292121 PXP: remove __u32 definition in pxp_dma.h
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292140 mmc: sdhci: fix possible sleep in atomic in sdio_irq enable function
Dong Aisheng [Mon, 16 Dec 2013 06:42:14 +0000 (14:42 +0800)]
ENGR00292140 mmc: sdhci: fix possible sleep in atomic in sdio_irq enable function

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00292033 wireless: ath6kl: fix potiential firmware dump issue
Dong Aisheng [Thu, 12 Dec 2013 11:02:49 +0000 (19:02 +0800)]
ENGR00292033 wireless: ath6kl: fix potiential firmware dump issue

When run iperf we could see the following error:
root@freescale ~$ iperf -c 192.168.0.102 -i 5 -t 60
------------------------------------------------------------
Client connecting to 192.168.0.100, TCP port 5001
TCP window size: 20.7 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.102 port 38093 connected with 192.168.0.100 port 5001
ath6kl: firmware crashed
ath6kl: crash dump:
ath6kl: hw 0x30000582 fw 3.2.0.144^A
ath6kl: 0: 0x30000582 0x000015b3 0x008ee731 0x004f5b31
ath6kl: 4: 0x008ee731 0x00060730 0x0000001e 0x00544248
ath6kl: 8: 0x0056526c 0x005652ac 0x00568fa8 0x00568fa8
ath6kl: 12: 0x00000009 0xffffffff 0x00917d19 0x00917d3b
ath6kl: 16: 0x00917ca7 0x008e1038 0x00000000 0x00000000
ath6kl: 20: 0x408ee731 0x005441b8 0x00000001 0x004f5a00
ath6kl: 24: 0x808ee8c6 0x00544218 0x00571880 0xc08ee731
ath6kl: 28: 0x808efa6a 0x00544248 0x0056526c 0x00000004
ath6kl: 32: 0x808e2756 0x00544278 0x00565780 0x00000000
ath6kl: 36: 0x808e166c 0x005442a8 0x00000004 0x00542810
ath6kl: 40: 0x808e1640 0x005442d8 0x00540000 0x00000000
ath6kl: 44: 0x808e16bd 0x005442f8 0x00540d14 0x00000000
ath6kl: 48: 0x408e0c24 0x00544318 0x00519291 0x000017a8
ath6kl: 52: 0x00000000 0x00544338 0x00559301 0x00040020
ath6kl: 56: 0x00565780 0x0f000000 0xf0000000 0x00000001

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.

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

10 years agoENGR00291843 V4L2_PXP: fix a dangling pointer accessing issue
Fancy Fang [Thu, 12 Dec 2013 05:52:26 +0000 (13:52 +0800)]
ENGR00291843 V4L2_PXP: fix a dangling pointer accessing issue

After dynamically alloc/free tx descriptors enabled, the descriptors
will be freed in PXP ISR which happens before pxp_buf_free() is called.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00291731 PXP: move pxp_irq_info definition from PXP dma to PXP device
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00291729 PXP: remove a mutex lock from pxp channel
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00291658 PXP: allow PXP device users to submit multiple tasks before start PXP
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00292021-2 ARM: imx6q: correct pll4_audio_div name in cko1_sels
Nicolin Chen [Fri, 13 Dec 2013 08:46:33 +0000 (16:46 +0800)]
ENGR00292021-2 ARM: imx6q: correct pll4_audio_div name in cko1_sels

There's a typo in cko1_sels[], thus fix it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00292021-1 arm: dts: imx6sl-evk: Specify the IOMUX value of GPIO4_IO19
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>
10 years agoENGR00291400 PXP: Organize PXP task queue to be FIFO
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00291111 mxc vout:Restore when new config fails
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.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agommc: sd: fix the maximum au_size for SD3.0
Jaehoon Chung [Thu, 18 Jul 2013 04:34:41 +0000 (13:34 +0900)]
mmc: sd: fix the maximum au_size for SD3.0

Since SD Physical Layer specification V3.0, AU_SIZE is supported up
to 0xf.  So If SD-card is supported v3.0, then max_au should be 0xf.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
(cherry picked from commit 77776fd0a4cc541b9a528eacc1d31ca47eb1ae7a)

10 years agommc: core: Only execute tuning for SDR50 and SDR104
Fredrik Soderstedt [Wed, 17 Apr 2013 11:50:53 +0000 (13:50 +0200)]
mmc: core: Only execute tuning for SDR50 and SDR104

Only execute tuning for sd and sdio devices that are using
SDR50 or SDR104.

Make sure clock is hold during tuning for sdio devices.

Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Acked-by: Johan Rudholm <jrudholm@gmail.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
(cherry picked from commit 810e08ee425f8d7327e4b30069a9b2b3dccfc67d)

10 years agoENGR00290679 mxc: mlb Fix the MLB150 not stable issue in ISOC mode.
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.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00289855 usb: chipidea: udc: pull down dp before the charger detection
Peter Chen [Wed, 27 Nov 2013 07:35:42 +0000 (15:35 +0800)]
ENGR00289855 usb: chipidea: udc: pull down dp before the charger detection

If rom code or bootloader has used usb before loading kernel, the dp
may still be pulled up, it will cause USB charger detection fail.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00290601 [iMX6x] Ensure PLL is powered down when bypass rate is requested.
Ranjani Vaidyanathan [Tue, 3 Dec 2013 19:40:52 +0000 (11:40 -0800)]
ENGR00290601 [iMX6x] Ensure PLL is powered down when bypass rate is requested.

Ensure that PLL is powered down when bypass rate is requested and
power it up when some other rate is requested.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
10 years agoENGR00290664 PXP: allocate DMA TX descriptors on demand instead of in PXP initialization
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00290613 PXP: add asynchronous multi instances support for PXP
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.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00290654 IPUv3 dev:Workaround split mode downsize overflow
Liu Ying [Wed, 4 Dec 2013 10:02:00 +0000 (18:02 +0800)]
ENGR00290654 IPUv3 dev:Workaround split mode downsize overflow

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:

==================================================================
mxc_v4l2_output.out -iw 1920 -ih 1080 -ow 200 -oh 200 -v 1

mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22
mxc_ipu mxc_ipu: sp_task[0],no-0x12 fail state:-22, queue err:-22.
mxc_ipu mxc_ipu: ERR: [0xac73ea00] no-0x10,state 3: error
mxc_ipu mxc_ipu: ERR: no-0x10,ipu_queue_task err:-125
mxc_v4l2_output v4l2_out.35: display work fail ret = -125
mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22
mxc_ipu mxc_ipu: sp_task[0],no-0x22 fail state:-22, queue err:-22.
mxc_ipu mxc_ipu: ERR: [0xac73ea00] no-0x20,state 3: error
mxc_ipu mxc_ipu: ERR: no-0x20,ipu_queue_task err:-125
mxc_v4l2_output v4l2_out.35: display work fail ret = -125
mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22
mxc_ipu mxc_ipu: sp_task[0],no-0x32 fail state:-22, queue err:-22.
mxc_ipu mxc_ipu: ERR: [0xac63c400] no-0x30,state 3: error
mxc_ipu mxc_ipu: ERR: no-0x30,ipu_queue_task err:-125
mxc_v4l2_output v4l2_out.35: display work fail ret = -125
VIDIOC_QBUF failed -1
==================================================================

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00290635-2 IPUv3 stripe:Fix a build warning
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]

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00290635-1 mxc vout:Fix a build warning
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=]

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00290496-2 ARM: imx_v7_defconfig: Enable gpio-led in configs
Robin Gong [Tue, 3 Dec 2013 07:03:03 +0000 (15:03 +0800)]
ENGR00290496-2 ARM: imx_v7_defconfig: Enable gpio-led in configs

Enable the related option of configuration.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00290496-1 ARM: imx6: Add charging led support on Sabresd board
Robin Gong [Tue, 3 Dec 2013 06:59:05 +0000 (14:59 +0800)]
ENGR00290496-1 ARM: imx6: Add charging led support on Sabresd board

Enable led lighting while the board in charging status. Implement it on Sabresd
board.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00290361-2 MXC IPUv3 fb:Add check for a IDMAC errata
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.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00290361-1 IPUv3 IC:Add check for a IDMAC errata
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.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00290337 ipuv3: Setup pixel clock tree after ipu reset
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

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agomtd: add MTD_MLCNANDFLASH case for mtd_type_show()
Huang Shijie [Wed, 25 Sep 2013 06:58:19 +0000 (14:58 +0800)]
mtd: add MTD_MLCNANDFLASH case for mtd_type_show()

The current mtd_type_show() misses the MTD_MLCNANDFLASH case.
This patch adds the case for it, and also updates the ABI.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agoENGR00290297 usb: imx6-usb-charger: disable charger if it has not configurated
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>
10 years agoENGR00290021 [iMX6QDL] Skip RNG instantiation unless needed.
Dan Douglass [Thu, 28 Nov 2013 07:29:05 +0000 (01:29 -0600)]
ENGR00290021 [iMX6QDL] Skip RNG instantiation unless needed.

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>
10 years agoENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P
Fancy Fang [Fri, 29 Nov 2013 10:37:45 +0000 (18:37 +0800)]
ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P

When the s0 format is PXP_PIX_FMT_YUV422P, the s0 pitch and U/V
buffer address cannot be set correctly.

Signed-off-by: Fancy Fang <B47543@freescale.com>
10 years agoENGR00290229 ASoC: fsl: Drop snd_soc_dapm_sync() in imx-wm8962
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>
10 years agoENGR00289645 usb: chipidea: udc: don't do hardware access if gadget has stopped
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.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit ac760d29366f19eb1a4d4c37899b33019570a447)

10 years agoENGR00290176 mxc: mlb: Fix MLB suspend/resume issue
Luwei Zhou [Fri, 29 Nov 2013 04:54:49 +0000 (12:54 +0800)]
ENGR00290176 mxc: mlb: Fix MLB suspend/resume issue

There is risk that mlb register will be access when clock
is closed. This patch fix it.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00289381 mxc: asrc: Fix RCU stall in output_task_worker
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().

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 5b35fca56107cb04bdf342969887b386683da901)

10 years agoENGR00211653 [MX6Q ARD] IMX UART add support for loopback mode.
Israel Perez [Thu, 28 Nov 2013 07:00:33 +0000 (15:00 +0800)]
ENGR00211653 [MX6Q ARD] IMX UART add support for loopback mode.

ttymxc serial uart driver add  support loopback mode.
returns TIOCM_LOOP set when reading the status.

[original hash:42d5723   fix a litte for 3.10.17]
Signed-off-by: Israel Perez <B37753@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>