]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00177737-2: add HDMI sii902x support in mx6q-arm2
Hake Huang [Fri, 23 Mar 2012 02:57:37 +0000 (10:57 +0800)]
ENGR00177737-2: add HDMI sii902x support in mx6q-arm2

test with
video=mxcfb0:dev=sii902x_hdmi,1024x768M@60,if=RGB24 disable_mipi_dsi

Note:
1. currently we use the same ipu setting port with on chip HDMI,
if we need coexist need change the on chip HDMI ipu settings.
2. need remove MIPI DSI initial with 'disable_mipi_dsi' in kernel command line,
as mipi dsi reset will reset on board sii902x as well.
3. change the I2C2 work at 100K not 400K, to be compatible with EDID spec.
4. the side effect is that Sii902x will have to use "sii902x_hdmi",
instead of "hdmi" as before

Signed-off-by: Hake Huang <b20222@freescale.com>
11 years agoENGR00177737-1 change the drv name to sii902x_hdmi
Hake Huang [Fri, 23 Mar 2012 02:55:55 +0000 (10:55 +0800)]
ENGR00177737-1 change the drv name to sii902x_hdmi

so that system can use 2 type of HDMI device driver sii902x and on chip one

Signed-off-by: Hake Huang <b20222@freescale.com>
11 years agoENGR00177581-3 WM8962: add wm8962 codec driver
Gary Zhang [Fri, 23 Mar 2012 08:50:45 +0000 (16:50 +0800)]
ENGR00177581-3 WM8962: add wm8962 codec driver

add wm8962 audio codec driver

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00177581-2 MX6_SABRESD: add wm8962 support
Gary Zhang [Thu, 22 Mar 2012 02:15:04 +0000 (10:15 +0800)]
ENGR00177581-2 MX6_SABRESD: add wm8962 support

add wm8962 codec support on sabresd revB

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00177581-1 MX6: add wm8962 in defconfig
Gary Zhang [Thu, 22 Mar 2012 02:12:29 +0000 (10:12 +0800)]
ENGR00177581-1 MX6: add wm8962 in defconfig

add wm8962 codec option in imx6_defconfig file

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agomxc: hdmi: fix potention deadlock issue
Jason Chen [Tue, 27 Dec 2011 08:12:07 +0000 (16:12 +0800)]
mxc: hdmi: fix potention deadlock issue

Signed-off-by: Jason Chen <jason.chen@linaro.org>
11 years agoENGR00177310-4 i.mx6 sabresd: change fb_data sequence
Lily Zhang [Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)]
ENGR00177310-4 i.mx6 sabresd: change fb_data sequence

i.mx6dl only support one single IPU, up to 2 displays.
change fb_data sequence for i.mx6dl support.

The following command options can be used for the display
tests on i.mx6dl sabresd boards.
- HDMI:
 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24
- LVDS0:
 None or ldb=sin0, ldb=sep0
- LVDS1:
 ldb=sep1
- SEIKO-WVGA:
 video=mxcfb0:dev=lcd,SEIKO-WVGA,if=RGB24
- CLAA-WVGA:
 video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB565
- HDMI + LVDS0:
 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 ldb=sin0
 (or ldb=sep0)
 echo 0 > /sys/class/graphics/fb2/blank
- HDMI + LVDS1:
 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 ldb=sep1 (sin1
 is not supported)
 echo 0 > /sys/class/graphics/fb2/blank
- LVDS0 + LVDS1:
 none
 echo 0 > /sys/class/graphics/fb2/blank

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177310-3 v4l2 capture: enable mclk when open function
Lily Zhang [Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)]
ENGR00177310-3 v4l2 capture: enable mclk when open function

Enable mclk when opening v4l2 capture device and disable
mclk when closing v4l2 capture device.
If mclk is disabled when operating MIPI camera, the test
is failed.

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177310-2 mx6 clock: change _clk_clko_round_rate
Lily Zhang [Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)]
ENGR00177310-2 mx6 clock: change _clk_clko_round_rate

Change _clk_clko_round_rate and ensure the clock should
be less than the input rate.

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177310-1 i.mx6dl sabresd: add camera support
Lily Zhang [Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)]
ENGR00177310-1 i.mx6dl sabresd: add camera support

Add camera support into i.mx6dl sabreasd board.

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177359 - EPDC fb: Add EPDC support to SabreSD board
Danny Nold [Wed, 21 Mar 2012 04:01:53 +0000 (23:01 -0500)]
ENGR00177359 - EPDC fb: Add EPDC support to SabreSD board

- Change EPDC pad groups to have one for EPDC enable and one
for EPDC disable.
- Add EPDC and Maxim 17135 structures and functions to SabreSD
board file.  Code pulled in with minimal change from ARM2 board
file.
  One exception: Had to remove regulator_has_full_constraints()
  from max17135_regulator_init() to prevent PFUZE from disabling
  regulators and removing power from the board at the end of
  kernel initialization.

Signed-off-by: Danny Nold <dannynold@freescale.com>
11 years agoENGR00177098 HMDI mmap support in isr could underflow
Alan Tull [Fri, 16 Mar 2012 17:26:48 +0000 (12:26 -0500)]
ENGR00177098 HMDI mmap support in isr could underflow

Take out mmap functionality.

Signed-off-by: Alan Tull <r80115@freescale.com>
11 years agoENGR00177048 Merge vivante 4.6.6 kernel part code
Loren Huang [Fri, 16 Mar 2012 07:29:06 +0000 (15:29 +0800)]
ENGR00177048 Merge vivante 4.6.6 kernel part code

Merge vivante 4.6.6 kernel part code

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00171874 fix ASRC noise bug for i.MX6
Chen Liangjun [Wed, 21 Mar 2012 05:19:05 +0000 (13:19 +0800)]
ENGR00171874 fix ASRC noise bug for i.MX6

Solve the ASRC noise:
1 change the DMA mode from normal mode to loop mode.
2 use dma_alloc_coherent alloc dma buffer instead of kzalloc.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00176299-4 usb host suspend/resume can't work randomly
Tony LIU [Fri, 16 Mar 2012 08:05:42 +0000 (16:05 +0800)]
ENGR00176299-4 usb host suspend/resume can't work randomly

driver part

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00176299-3 usb host suspend/resume can't work randomly
Tony LIU [Wed, 7 Mar 2012 07:57:01 +0000 (15:57 +0800)]
ENGR00176299-3 usb host suspend/resume can't work randomly

head file part

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00176299-2 usb host suspend/resume can't work randomly
Tony LIU [Wed, 7 Mar 2012 07:55:32 +0000 (15:55 +0800)]
ENGR00176299-2 usb host suspend/resume can't work randomly

usb core part

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00176299-1 usb host suspend/resume can't work randomly
Tony LIU [Wed, 7 Mar 2012 07:53:56 +0000 (15:53 +0800)]
ENGR00176299-1 usb host suspend/resume can't work randomly

MSL part
- after suspend bit is set, we need to set PWD bit and
  clear it right now to let PHY know the state change
- after suspend bit is set, disconnect detection should be
  clear
- after set resume bit, disconnect detection should be set
  after 30 ms
- IC issue PDM refer to
  TKT092876
  TKT092872

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00177083-6 i.mx6: sabresd: change gpio configuration
Lily Zhang [Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)]
ENGR00177083-6 i.mx6: sabresd: change gpio configuration

- add gpio configuration according to revB schematic
- reorder gpio configuration by gpio group

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177083-5 i.mx6: sabresd: add initial i.mx6dl support
Lily Zhang [Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)]
ENGR00177083-5 i.mx6: sabresd: add initial i.mx6dl support

This patch adds the initial i.mx6dl support for sabre
smart device board. i.mx6dl and i.mx6q share the same
board due to pin to pin compatible.

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177083-4 i.mx6: sabresd: add i.mx6dl pad table
Lily Zhang [Tue, 13 Mar 2012 10:14:20 +0000 (18:14 +0800)]
ENGR00177083-4 i.mx6: sabresd: add i.mx6dl pad table

Add i.mx6dl pad table

Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177083-3 i.mx6: sabresd: move the pad table to board head file
Lily Zhang [Tue, 13 Mar 2012 08:59:22 +0000 (16:59 +0800)]
ENGR00177083-3 i.mx6: sabresd: move the pad table to board head file

move the pad table to board head file

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177083-2 i.mx6: sabresd: move pfuse declaration to common.h
Lily Zhang [Tue, 13 Mar 2012 08:48:53 +0000 (16:48 +0800)]
ENGR00177083-2 i.mx6: sabresd: move pfuse declaration to common.h

- Move mx6q_sabresd_init_pfuze100 to common.h
- Delete the declarations which are already in common.h

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177083-1 i.mx6: sabresd: remove the prefix MX6Q from gpio definition
Lily Zhang [Tue, 13 Mar 2012 08:42:34 +0000 (16:42 +0800)]
ENGR00177083-1 i.mx6: sabresd: remove the prefix MX6Q from gpio definition

Since i.mx6q and i.mx6sdl share the same sabreauto board, the
gpio is the same. Remove the MX6Q_ prefix from gpio defintion to
avoid the confusion which may think it is MX6Q specific.

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00177186 - MX6 : modify board_is_mx6_xxx macro.
Fugang Duan [Mon, 19 Mar 2012 12:35:30 +0000 (20:35 +0800)]
ENGR00177186 - MX6 : modify board_is_mx6_xxx macro.

- Redefine MX6 board revision ID, and modify the following macros
  to make codes readable.
  board_is_mx6_reva()
  board_is_mx6_revb()
  board_is_mx6_revc()

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00177154 solo sabreauto: config USB pin according to board
make shi [Mon, 19 Mar 2012 09:41:14 +0000 (17:41 +0800)]
ENGR00177154 solo sabreauto: config USB pin according to board

config the USB pin and power control for ARD board

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00177082 mx6 sabreauto: enable NAND by default
Allen Xu [Mon, 19 Mar 2012 05:47:38 +0000 (13:47 +0800)]
ENGR00177082 mx6 sabreauto: enable NAND by default

The default sabreauto code enabled BT_WiFi via NAND_BT_WIFI_STEER,
change it to enable NAND as default.

Signed-off-by: Allen Xu <allen.xu@freescale.com>
11 years agoENGR00177046: Add the platform dependency for PXP in Kconfig
Robby Cai [Fri, 16 Mar 2012 03:40:02 +0000 (11:40 +0800)]
ENGR00177046: Add the platform dependency for PXP in Kconfig

If there's no dependency, build will be broken when do
`make ARCH=arm CROSS_COMPILE=<cross-compiler path> allmodconfig'
`make'
because PXP module will be turned on. This patch fixed it.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00175884 System resume failed when the power key was pressed shortly
Lin Fuzhen [Thu, 1 Mar 2012 10:52:09 +0000 (18:52 +0800)]
ENGR00175884 System resume failed when the power key was pressed shortly

Some platform like Android needs to get the power key event to
reume the other devcies such as FB, TS. System resume failed when
the gpio power key was pressed shortly sometime, but can resume the
by long press the power key.

The root cause of this issue is that the GPIO IRQ is registered as device
IRQ, but device IRQs will just be enabled after early resume finished,
so when the power key press shortly, the gpio-irq may still disabled in that
time, and the ISR will be ignored and could not detect the key down event.

To fix this bug, add the IRQF_EARLY_RESUME flag to the irq if platform
has specified that the button can wake up the system , in this way, this
irq will be enabled during syscore resume, so that the power key press
can be handled and reported as early as possible.

Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
11 years agoENGR00176974 MX6Q: make 624M WP work, change 624 WP to 672 WP
Zhang Jiejing [Thu, 15 Mar 2012 09:09:40 +0000 (17:09 +0800)]
ENGR00176974 MX6Q: make 624M WP work, change 624 WP to 672 WP

since pll1 have a limit that cannot scaling down to 650M and below
so change the 600M WP to 672MHz.

otherwise, the 600WP's clock will depens on last frequency.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00176808 system crashes if switching between PAL & NTSC
Tony Lin [Wed, 14 Mar 2012 02:34:11 +0000 (10:34 +0800)]
ENGR00176808 system crashes if switching between PAL & NTSC

it's a video out issue instead of camera/tvin.
the queue list and active list should be cleared in stream off function.

Signed-off-by: Tony Lin <tony.lin@freescale.com>
11 years agoENGR00176812-11 mx6 sabreauto: remove section mismatch warning
Lily Zhang [Fri, 9 Mar 2012 16:36:47 +0000 (00:36 +0800)]
ENGR00176812-11 mx6 sabreauto: remove section mismatch warning

Remove the followinig section mismatch warning
WARNING: vmlinux.o(.text+0x1bdf8): Section mismatch in
reference from the function gpmi_nand_platform_init() to
the (unknown reference) .init.data:(unknown)
The function gpmi_nand_platform_init() references
the (unknown reference) __initdata (unknown).
This is often because gpmi_nand_platform_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00176812-10 mx6solo sabreauto: change display for single IPU
Lily Zhang [Mon, 12 Mar 2012 12:58:54 +0000 (20:58 +0800)]
ENGR00176812-10 mx6solo sabreauto: change display for single IPU

mx6solo only supports single IPU, up to 2 display
by default. So (ARRAY_SIZE(sabr_fb_data) + 1 )/ 2
fb devices are registered. The board configuration
is:
HDMI: ipu-0, di-1
ldb: ipu-0, di-0, sec_ipu-0, sec_di-1, LDB_SEP0

Signed-off-by: Wayne Zou <b36644@freescale.com>
Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00176812-9 mx6 sabreauto: add revB board support
Adrian Alonso [Fri, 9 Mar 2012 21:52:02 +0000 (15:52 -0600)]
ENGR00176812-9 mx6 sabreauto: add revB board support

* mx6 sabreauto revB include a steering logic
  circuit that enables the route path for i2c3_sda signal.
  This patch enables i2c3_sda route to fix io-expander
  read/write errors and additional devices connected to
  the i2c3 bus.
* mx6 sabreauto revB board uses atheors fec phy.
* Set GPIO_16 as input for IEEE-1588 ts_clk and RMII
  reference clk

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00176812-8 mx6 sabreauto: add board_is_mx6_xxx macro
Lily Zhang [Mon, 12 Mar 2012 13:36:28 +0000 (21:36 +0800)]
ENGR00176812-8 mx6 sabreauto: add board_is_mx6_xxx macro

Add the following macros to make codes readable.
board_is_mx6_sabreauto_reva()
board_is_mx6_sabreauto_revb()

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00176812-7 mx6 sabreauto: remove MX6Q_PAD_EIM_EB2__GPIO_2_30
Lily Zhang [Fri, 9 Mar 2012 13:48:57 +0000 (21:48 +0800)]
ENGR00176812-7 mx6 sabreauto: remove MX6Q_PAD_EIM_EB2__GPIO_2_30

- EIM_EB2 is used as I2C2_SCL instead of GPIO for SPI
NOR for RevA board
- Use CONFIG_MTD_M25P80 to control SPI NOR code only

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00176812-6 i.mx: sabreauto: add initial i.mx6solo support
Jason Liu [Thu, 8 Mar 2012 10:59:50 +0000 (18:59 +0800)]
ENGR00176812-6 i.mx: sabreauto: add initial i.mx6solo support

This patch adds the initial i.mx6solo support for this sabreauto board.
i.mx6dl and i.mx6q share the same board due to pin to pin compatible.

Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00176812-5 i.mx6: sabreauto: add the i.mx6solo pad table
Jason Liu [Thu, 8 Mar 2012 09:47:31 +0000 (17:47 +0800)]
ENGR00176812-5 i.mx6: sabreauto: add the i.mx6solo pad table

Add the i.mx6solo pad table

Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00176812-4 i.mx6: sabreauto: move all the pad table to board head file
Jason Liu [Thu, 8 Mar 2012 09:42:59 +0000 (17:42 +0800)]
ENGR00176812-4 i.mx6: sabreauto: move all the pad table to board head file

Just move the pad table out of the board file, no function change

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00176812-3 i.mx6: sabreauto: move some declarations to common.h
Jason Liu [Thu, 8 Mar 2012 09:22:51 +0000 (17:22 +0800)]
ENGR00176812-3 i.mx6: sabreauto: move some declarations to common.h

Need move some declarations to common.h to avoid each user
individully declare it in their own .c file. This can make
the code clean and also avoid the duplication.

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00176812-2 i.mx6: sabreauto: remove the prefix MX6Q from gpio definition
Jason Liu [Thu, 8 Mar 2012 09:11:31 +0000 (17:11 +0800)]
ENGR00176812-2 i.mx6: sabreauto: remove the prefix MX6Q from gpio definition

Since i.mx6q and i.mx6sdl share the same sabreauto board, the
gpio is the same. Remove the MX6Q_ prefix from gpio defintion to
avoid the confusion which may think it is MX6Q specific.

This patch also make the GPIO definion sorted by GPIO_NR

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00176812-1 i.mx6: sabreauto: cosmetic code alignment and spaces
Jason Liu [Thu, 8 Mar 2012 08:29:29 +0000 (16:29 +0800)]
ENGR00176812-1 i.mx6: sabreauto: cosmetic code alignment and spaces

This patch is only used for cosmetic, no code
function changes

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00176921:gpu-viv: set outstanding request number for all chips that using gc320
Wu Guoxing [Thu, 15 Mar 2012 02:54:26 +0000 (10:54 +0800)]
ENGR00176921:gpu-viv: set outstanding request number for all chips that using gc320

this needs by all the chips(6dl, 6dq) that using gc320

this is vivante's IP bug, that when set outstanding number bigger than
16, it will have a chance for gc320 to dead lock the axi bus, which will
lead to system hang.
also, as our chip can only support axi outstanding of 8(for 6dl) and 4(6dq),
this change have no performance impact.

Signed-off-by: Wu Guoxing <b39297@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00176469-5: Remove build warnings in mxc_mlb150.c
Terry Lv [Wed, 14 Mar 2012 08:35:14 +0000 (16:35 +0800)]
ENGR00176469-5: Remove build warnings in mxc_mlb150.c

Remove build warnings in mxc_mlb150.c.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00176469-4: Remove build warnings in clock.c
Terry Lv [Wed, 14 Mar 2012 08:32:32 +0000 (16:32 +0800)]
ENGR00176469-4: Remove build warnings in clock.c

Remove build warnings in clock.c.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00176374 SPDIF TX Fix channel status bit order
Alan Tull [Wed, 7 Mar 2012 15:37:08 +0000 (09:37 -0600)]
ENGR00176374 SPDIF TX Fix channel status bit order

The channel status bits in STCSCH and STCSCL are reverse of
how they are defined in asoundef.h.

Signed-off-by: Alan Tull <r80115@freescale.com>
11 years agoENGR00174923 - EPDC fb: Stress Test Failure Fixed
Danny Nold [Wed, 29 Feb 2012 03:31:56 +0000 (21:31 -0600)]
ENGR00174923 - EPDC fb: Stress Test Failure Fixed

- Changed workqueues to use strict ordering and one process at a time
- Changed mutex ordering in IRQ handler to avoid race condition
- Updated 64-bit logic operation to ensure proper logic
- Fixed bug in how LUT cancellation case is handled.  The wrong
index was being used to clear LUT IRQ and IRQ_MASK.
- Increased flush_updates timeout to 8s, since it may take several
seconds if a long queue of updates is waiting.

Signed-off-by: Danny Nold <dannynold@freescale.com>
11 years agoENGR00175700 System hang when change HDMI from XGA to 1080P with display blank
Sandor Yu [Wed, 29 Feb 2012 10:09:00 +0000 (18:09 +0800)]
ENGR00175700 System hang when change HDMI from XGA to 1080P with display blank

Change the vide mode from XGA to 1080P when display blank,
the system will hang.

It is cause by overflow interrupt will trigger when the video mode change,
but clean the interrupt status bit depend on pixewl clock.
In blank state the pixel clock is gating so the HDMI PHY can't work.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00176649-3 regulator:Support regulator set in sysfs
Robin Gong [Tue, 13 Mar 2012 06:50:15 +0000 (14:50 +0800)]
ENGR00176649-3 regulator:Support regulator set in sysfs

By default, regulator set is disabled by kernel, but if enable the function
we can easily set regulator in sysfs, it's useful for unit test of pfuze
regulator.
Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00176649-2 sabrelite_SD ARD pfuze: update board level for pfuze100 1.0
Robin Gong [Tue, 13 Mar 2012 09:00:06 +0000 (17:00 +0800)]
ENGR00176649-2 sabrelite_SD ARD pfuze: update board level for pfuze100 1.0

modify SW1xSTANDBY value,Update for Sabrelite_SD board and Sabrelite_ARD board

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00176649-1 sabrelite_SD ARD pfuze: update pfuze driver for pfuze100 1.0
Robin Gong [Tue, 13 Mar 2012 08:57:48 +0000 (16:57 +0800)]
ENGR00176649-1 sabrelite_SD ARD pfuze: update pfuze driver for pfuze100 1.0

Since some power rail is differnet between pfuze100 0.1 and pfuze100 1.0,
remove PFUZE100_FIRST_VERSION and change PFUZE100_SW4_VOL6 define.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00176469-3: Remove build warnings in mlb
Terry Lv [Wed, 14 Mar 2012 03:09:30 +0000 (11:09 +0800)]
ENGR00176469-3: Remove build warnings in mlb

Remove build warnings in mlb.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00176629 [Thermal]Add 1.2G support
Anson Huang [Tue, 13 Mar 2012 07:09:29 +0000 (15:09 +0800)]
ENGR00176629 [Thermal]Add 1.2G support

Fix bug of saving previous cpufreq not support
up to 1.2G freq. Max length set to 7 instead of 6.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00176469-2: Improve the performance of MLB
Terry Lv [Fri, 9 Mar 2012 03:26:52 +0000 (11:26 +0800)]
ENGR00176469-2: Improve the performance of MLB

Main changes:
1. Directly use ring buffer to read.
2. Trival code clean for improvement.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00176469-1: Improve the performance of MLB
Terry Lv [Fri, 9 Mar 2012 03:25:31 +0000 (11:25 +0800)]
ENGR00176469-1: Improve the performance of MLB

Pll clock change to make pll clocked more stable.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00176656:gpu-viv:separate gpu 2d and vg core clock and axi clock operation
Wu Guoxing [Tue, 13 Mar 2012 07:04:47 +0000 (15:04 +0800)]
ENGR00176656:gpu-viv:separate gpu 2d and vg core clock and axi clock operation

separate gpu 2d and vg core clock and axi clock operation

Signed-off-by: Wu Guoxing <b39297@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00176655:mx6:remove openvg_axi_clk from gpu2d_axi_clk's secondary
Wu Guoxing [Tue, 13 Mar 2012 06:40:50 +0000 (14:40 +0800)]
ENGR00176655:mx6:remove openvg_axi_clk from gpu2d_axi_clk's secondary

if set vg clock as 2d axi clk's secondary will make
2d axi clk use count error

Signed-off-by: Wu Guoxing <b39297@freescale.com>
11 years agoENGR00176571 MX6DL: Added support for 1.2GHz ARM Frequency
Robin Gong [Mon, 12 Mar 2012 10:37:59 +0000 (18:37 +0800)]
ENGR00176571 MX6DL: Added support for 1.2GHz ARM Frequency

Added the new 1.2GHz working point.Currently 'arm_freq=1200"
should be added to commandline for the core to run at 1.2GHz

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00176504 - EPDC fb: Reduce number of PxP output buffers to 2
Danny Nold [Thu, 8 Mar 2012 21:12:43 +0000 (15:12 -0600)]
ENGR00176504 - EPDC fb: Reduce number of PxP output buffers to 2

- Changed from one-buffer-per-LUT (up to 16 for EPDCv1.0 and 64 for EPDCv2.0)
to using 2 static buffers for PxP output.  This is facilitated by the switch
to using a single-threaded workqueue to process each update, which
guarantees that we can use just 2 buffers without clobbering concurrent
updates.
- One known limitation: This restricts the SNAPSHOT update scheme to only 2
concurrent updates.  So if a user intends to use SNAPSHOT scheme, the
EPDC_MAX_NUM_BUFFERS #define should be increased based on the desired number
of allowable concurrent updates (with a corresponding penalty in static
memory allocation).

Signed-off-by: Danny Nold <dannynold@freescale.com>
11 years agoENGR00175090 Update the fsl copyright of gpu kernel driver to 2012
Huang Loren [Wed, 22 Feb 2012 06:41:00 +0000 (14:41 +0800)]
ENGR00175090 Update the fsl copyright of gpu kernel driver to 2012

Update the fsl copyright of gpu kernel driver to 2012

Signed-off-by: Huang Loren <b02279@freescale.com>
11 years agoENGR00174654-2 Update gpu kernel driver to vivante 4.6.5 release Merge 4.6.5 p1 kerne...
Loren Huang [Sun, 4 Mar 2012 04:02:32 +0000 (12:02 +0800)]
ENGR00174654-2 Update gpu kernel driver to vivante 4.6.5 release Merge 4.6.5 p1 kernel part code.

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00176160 [MX6]Correct PLL1 freq change flow
Anson Huang [Tue, 6 Mar 2012 04:00:16 +0000 (12:00 +0800)]
ENGR00176160 [MX6]Correct PLL1 freq change flow

Previous PLL1 freq change is done by switching CPU clock
to 400M pfd or 24M OSC, then modifying
PLL1 div directly, and switch back CPU clock immediately,
it will result in CPU clock stop during PLL1 hardware lock
period, thus, DRAM FIFO may blocked by the data CPU
requested before PLL1 clock changed, and it will block other devices
accessing DRAM, such as IPU, VPU etc. It will cause
underrun or hang issue. We should wait PLL1 lock, then switch
back.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00176147-3: usb: change data types for wakeup_event
Peter Chen [Tue, 6 Mar 2012 02:16:46 +0000 (10:16 +0800)]
ENGR00176147-3: usb: change data types for wakeup_event

In order to know which wakeup event occurs for usb wakeup

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00176147-2: usb: pass the wakeup event to pdata
Peter Chen [Tue, 6 Mar 2012 02:10:22 +0000 (10:10 +0800)]
ENGR00176147-2: usb: pass the wakeup event to pdata

The host driver needs to differentiate wakeup event.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00176147-1: usb: fix some wakeup problems
Peter Chen [Wed, 22 Feb 2012 03:14:01 +0000 (11:14 +0800)]
ENGR00176147-1: usb: fix some wakeup problems

- Do not call hcd core adjust wakeup flag code. It may change
wakeup flag, and cause port change detect(PCD) enable setting change.
- For ID wakeup, it should not call host's fsl_usb_recover_hcd at ID interrupt.
The coming ID switch event will resume host.
- Do not need enable wakeup interrupt for host at platform driver resume
routine, it may introduce unnessary wakeup interrupt during bus resume.
The wakeup will be enabled again when usb host goes to controller again
due to autosuspend.
- When there is no gadget enabled, the otg port is still at host mode with
interrupt enabled, so when male Micro-B to female A-type cable with
usb device plugs in, there will be PCD interrupt before hcd core leaves
suspend mode.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00176061-2 usb: otg: add discharge vbus flag
Peter Chen [Tue, 6 Mar 2012 03:11:45 +0000 (11:11 +0800)]
ENGR00176061-2 usb: otg: add discharge vbus flag

Add discharge vbus flag

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00176061-1 usb: otg: delete discharge vbus operation at otg driver
Peter Chen [Wed, 22 Feb 2012 05:46:14 +0000 (13:46 +0800)]
ENGR00176061-1 usb: otg: delete discharge vbus operation at otg driver

It may be useless at most of platforms, the user can enable discharge
vbus if he/she wants speed up vbus lower speed during OTG switch.

Besides, disable vbus interrupt during vbus change due
to device <--> host mode switch.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00175864 [MMC]pipeline mmc requests
Tony Lin [Mon, 27 Feb 2012 07:53:02 +0000 (15:53 +0800)]
ENGR00175864 [MMC]pipeline mmc requests

the patch is based on a series of patches by Per Forlin
the patch is sdhci host side implementation.

using a toshiba SDHC3.0 card, the performance increases
from 48.5MB/s to 52.4MB/s.

cmd: dd if=/dev/mmcblk0 of=/dev/null bs=1M count=500

the performance results running@1GHz, 200MHz CPU freq are:
52.4MB/s -> 20.7MB/s

Signed-off-by: Tony Lin <tony.lin@freescale.com>
11 years agoENGR00176068-3 defconfig: enable localtimer in defconfig
Xinyu Chen [Wed, 7 Mar 2012 04:03:33 +0000 (12:03 +0800)]
ENGR00176068-3 defconfig: enable localtimer in defconfig

Enable local timer by default. If wait mode is on,
local timer will be shutdown automatically on boot.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
11 years agoENGR00176068-2 smp_twd: reconfigure clockevents after cpufreq change
Xinyu Chen [Mon, 5 Mar 2012 08:17:52 +0000 (16:17 +0800)]
ENGR00176068-2 smp_twd: reconfigure clockevents after cpufreq change

After a cpufreq transition, update the clockevent's frequency
by fetching the new clock rate from the clock framework and
reprogram the next clock event.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoENGR00176068-1 mx6q: add smp_twd clock for localtimer
Xinyu Chen [Mon, 5 Mar 2012 08:15:20 +0000 (16:15 +0800)]
ENGR00176068-1 mx6q: add smp_twd clock for localtimer

Add a smp_twd system clock which is simple clock
from parent of cpu_clk, and it's rate is half
of the cpu_clk.
This is used for reprograming the twd clock event
after cpu freq is changed.
Also disable local timer setup when wait mode enabled.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
11 years agoENGR00176279 [MX6DL] MMC: improve SD3.0 SDR104 mode compatability.
Ryan QIAN [Wed, 7 Mar 2012 02:56:13 +0000 (10:56 +0800)]
ENGR00176279 [MX6DL] MMC: improve SD3.0 SDR104 mode compatability.

remove SION bit for SD3_CMD pad control, it will enlarge clock tuning
window on MX6DL.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00175446 ldb: avoid NULL pointer when ldb driver is probed but not inited.
Wayne Zou [Mon, 27 Feb 2012 01:31:18 +0000 (09:31 +0800)]
ENGR00175446 ldb: avoid NULL pointer when ldb driver is probed but not inited.

ldb: avoid NULL pointer when ldb driver is probed but not inited.
It can lead to kernel crash when framebuffer on LVDS panel is not inited.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00174062 CCM: change clock enable_count to usecount
Lin Fuzhen [Fri, 10 Feb 2012 05:26:21 +0000 (13:26 +0800)]
ENGR00174062 CCM: change clock enable_count to usecount

change clock debugfs sys attr 'enable_count' to 'usecount'
to align with some power debug tool used

Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
11 years agoENGR00176136- MX6: Added support for 1.2GHz ARM Frequency
Ranjani Vaidyanathan [Mon, 5 Mar 2012 20:26:45 +0000 (14:26 -0600)]
ENGR00176136- MX6: Added support for 1.2GHz ARM Frequency

Added the new 1.2GHz working point.
Currently 'arm_freq=1200" should be added to commandline
for the core to run at 1.2GHz. Also ensure that the appropriate
HW board mods have been done to set VDDARM_IN at 1.425V.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00176175 MX6Q: fix typo in cpu op voltage setting.
Zhang Jiejing [Tue, 6 Mar 2012 08:09:47 +0000 (16:09 +0800)]
ENGR00176175 MX6Q: fix typo in cpu op voltage setting.

Fix a typo when adding 600M WP, the voltage value is wrong,
it will lead a warnning when change to this WP:

COULD NOT SET GP VOLTAGE!!!!

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00176159 video: ipuv3-fb: change to timeout semaphore to wait on irq.
Zhang Jiejing [Tue, 6 Mar 2012 06:47:57 +0000 (14:47 +0800)]
ENGR00176159 video: ipuv3-fb: change to timeout semaphore to wait on irq.

change to timeout semaphore to wait on irq.

use no timeout semaphore have below issues:
1. since fbmem.c will hold the console_lock() before call PAN_DISPLAY ioictl,
 if have wrong happens on IPU, IRQ not come, any log printk will not ouput,
 it will become like a system hang, and developer don't know what's wrong.

2. semaphore don't have timeout, here we can't know irq not come,
  so hang it infintly.
3. semaphore lock and unlock in different context is a dangous operation.

To fix these issue, use timedout version to wait on irq.
But for better coding stly to align Kernel Coding Style Doc,
better use complete to wait on irq, use semaphre little ugly.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00170526-4 ESAI: To resolve the playback no sound issue occasionally happen
Lionel Xu [Fri, 2 Mar 2012 05:18:17 +0000 (13:18 +0800)]
ENGR00170526-4 ESAI: To resolve the playback no sound issue occasionally happen

There is no sound output any longer sometimes after several times of playback,
this platch is trying to resolve this issue by:

1)move the global power control bit setting from function hw_params/shutdown to
DAPM, thererfor the PWN bit will not be set/unset each time playback;
2)
Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00170526-3 ESAI: Remove the workaround to reset codec before playbacking
Lionel Xu [Fri, 2 Mar 2012 05:12:26 +0000 (13:12 +0800)]
ENGR00170526-3 ESAI: Remove the workaround to reset codec before playbacking

Previously in order to avoid audio playback no sound issue, a hardware reset
was made to the codec chip each time when doing playback. now remove this
workaround.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00170526-2 AUDIO: Remove struct field rst_gpio to audio platform data
Lionel Xu [Fri, 2 Mar 2012 05:07:57 +0000 (13:07 +0800)]
ENGR00170526-2 AUDIO: Remove struct field rst_gpio to audio platform data

Remove rst_gpio field to mxc_audio_platform_data.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00170526-1 MX6Q_Sabreauto: remove audio platform data rst_gpio.
Lionel Xu [Fri, 2 Mar 2012 04:57:51 +0000 (12:57 +0800)]
ENGR00170526-1 MX6Q_Sabreauto: remove audio platform data rst_gpio.

Remove audio platform data rst_gpio which is not longer required now.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00175551:Update sabreauto board file for handling spi and paralle nor
Francisco Munoz [Thu, 1 Mar 2012 23:50:28 +0000 (17:50 -0600)]
ENGR00175551:Update sabreauto board file for handling spi and paralle nor

*Files affected: board-mx6q_sabreauto.c
*Added IOMUX settings for parallel nor
*Utilized physmap driver in order to probe the chip
*Implemented conditional compilation enabling either spi or parallel
nor.

Signed-off-by: Francisco Munoz <b37752@freescale.com>
11 years agoENGR00175947 camera: sensor mclk change name to clko_clk
Yuxi Sun [Fri, 2 Mar 2012 07:15:49 +0000 (15:15 +0800)]
ENGR00175947 camera: sensor mclk change name to clko_clk

Change mclk sensor name to clko_clk

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00175219-8 wm8958: add clock management
Gary Zhang [Thu, 1 Mar 2012 08:23:43 +0000 (16:23 +0800)]
ENGR00175219-8 wm8958: add clock management

1. add clko_clk clock management
2. use 'Headphone Jack' name

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00175219-7 camera: use clko_clk source
Gary Zhang [Thu, 1 Mar 2012 08:21:56 +0000 (16:21 +0800)]
ENGR00175219-7 camera: use clko_clk source

change clock source to clko_clk from cko1_clk

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00175219-6 MX6Q_SABRESD: add clko_clk support
Gary Zhang [Thu, 1 Mar 2012 08:18:15 +0000 (16:18 +0800)]
ENGR00175219-6 MX6Q_SABRESD: add clko_clk support

audio codec wm8958 and camera use the same clock
clko_clk with around 22MHz.

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00175219-5 MX6: remove cko1_clk in clock.c
Gary Zhang [Thu, 1 Mar 2012 08:09:18 +0000 (16:09 +0800)]
ENGR00175219-5 MX6: remove cko1_clk in clock.c

there are clko_clk and cko1_clk in clock.c which operate
the same CKO1 clock source.
remove cko1_clk codes to avoid operation confusion.

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00172084 MX6Q: Add 4 capture modes for ov5642
Daiane Angolini [Thu, 1 Mar 2012 16:37:52 +0000 (13:37 -0300)]
ENGR00172084 MX6Q: Add 4 capture modes for ov5642

capture modes included:
 VGA(640x480)@15fps
 QVGA(320x240)@15fps
 NTSC(720x480)@15fps
 PAL(720x576)@15fps

in order to test it:
mxc_v4l2_capture.out -iw 640 -ih 480 -ow 640 -oh 480 -r 0 -fr 15 -m 0 test.yuv
mxc_v4l2_capture.out -iw 320 -ih 240 -ow 320 -oh 240 -r 0 -fr 15 -m 1 test.yuv
mxc_v4l2_capture.out -iw 720 -ih 480 -ow 720 -oh 480 -r 0 -fr 15 -m 2 test.yuv
mxc_v4l2_capture.out -iw 720 -ih 480 -ow 720 -oh 576 -r 0 -fr 15 -m 3 test.yuv

Signed-off-by: Daiane Angolini <daiane.angolini@freescale.com>
11 years agoENGR00175261 - EPDC fb: Remove warning messages from EPDC init
Danny Nold [Wed, 29 Feb 2012 20:31:04 +0000 (14:31 -0600)]
ENGR00175261 - EPDC fb: Remove warning messages from EPDC init

- Remove screen update from probe function.  This update is redundant.
The update in mxc_epdc_fb_fw_handler() will update and show the tux
logo if FB console is added, so this achieves the same effect as the
update invocation that was removed.
- Remove dmaengine_get(), because SDMA driver returns a failure when
cycling through DMA channels.  Since it is not essential to register
with this call, it has been removed.  dmaengine_put() also removed.
- Added hw_inialization variable to track whether HW is in process
of being initialized.  In which case, we do not print an error
message when an update is received.

Signed-off-by: Danny Nold <dannynold@freescale.com>
11 years agommc: block: add handling for two parallel block requests in issue_rw_rq
Per Forlin [Fri, 1 Jul 2011 16:55:33 +0000 (18:55 +0200)]
mmc: block: add handling for two parallel block requests in issue_rw_rq

Change mmc_blk_issue_rw_rq() to become asynchronous.
The execution flow looks like this:

* The mmc-queue calls issue_rw_rq(), which sends the request
  to the host and returns back to the mmc-queue.
* The mmc-queue calls issue_rw_rq() again with a new request.
* This new request is prepared in issue_rw_rq(), then it waits for
  the active request to complete before pushing it to the host.
* When the mmc-queue is empty it will call issue_rw_rq() with a NULL
  req to finish off the active request without starting a new request.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: queue: add a second mmc queue request member
Per Forlin [Fri, 1 Jul 2011 16:55:31 +0000 (18:55 +0200)]
mmc: queue: add a second mmc queue request member

Add an additional mmc queue request instance to make way for two active
block requests. One request may be active while the other request is
being prepared.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: block: move error path in issue_rw_rq to a separate function.
Per Forlin [Fri, 1 Jul 2011 16:55:30 +0000 (18:55 +0200)]
mmc: block: move error path in issue_rw_rq to a separate function.

Break out code without functional changes. This simplifies the code and
makes way for handling two parallel requests.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: block: add a block request prepare function
Per Forlin [Fri, 1 Jul 2011 16:55:29 +0000 (18:55 +0200)]
mmc: block: add a block request prepare function

Break out code from mmc_blk_issue_rw_rq to create a block request prepare
function. This doesn't change any functionallity. This helps when handling
more than one active block request.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: block: add member in mmc queue struct to hold request data
Per Forlin [Sat, 9 Jul 2011 21:12:36 +0000 (17:12 -0400)]
mmc: block: add member in mmc queue struct to hold request data

The way the request data is organized in the mmc queue struct, it only
allows processing of one request at a time.  This patch adds a new struct
to hold mmc queue request data such as sg list, request, blk request and
bounce buffers, and updates any functions depending on the mmc queue
struct. This prepares for using multiple active requests in one mmc queue.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: queue: let host controllers specify maximum discard timeout
Adrian Hunter [Tue, 28 Jun 2011 14:16:02 +0000 (17:16 +0300)]
mmc: queue: let host controllers specify maximum discard timeout

Some host controllers will not operate without a hardware
timeout that is limited in value.  However large discards
require large timeouts, so there needs to be a way to
specify the maximum discard size.

A host controller driver may now specify the maximum discard
timeout possible so that max_discard_sectors can be calculated.

However, for eMMC when the High Capacity Erase Group Size
is not in use, the timeout calculation depends on clock
rate which may change.  For that case Preferred Erase Size
is used instead.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: block: add checking of r/w command response
Russell King - ARM Linux [Mon, 20 Jun 2011 19:10:49 +0000 (20:10 +0100)]
mmc: block: add checking of r/w command response

Check the status bits in the r/w command response for any errors.
If error bits are set, then we won't have seen any data transferred,
so it's pointless doing any further checking.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: block: improve error recovery from command channel errors
Russell King - ARM Linux [Mon, 20 Jun 2011 19:10:28 +0000 (20:10 +0100)]
mmc: block: improve error recovery from command channel errors

Command channel errors fall into four classes:

1. The command was issued with the card in the wrong state
2. The command failed to be received by the card correctly
3. The cards response failed to be received by the host (CRC error)
4. The card failed to respond to the card

For (1), in theory we should know that the card is in the correct state.
However, a failed stop command (or other failure) may result in the card
remaining in a data transfer state from the previous command.  If we
detect this condition, we try to recover by sending a stop command.

For the initial commands (set block count and the read/write command)
no data will have been transferred.  All that we need deal with is
retrying at this point.  A failed stop command can be remedied as
above.

If we are unable to recover the card (eg, the card ignores our requests
for status, or we don't recognise the error code) then we immediately
fail the request.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: block: allow get_card_status() to return error status
Russell King - ARM Linux [Mon, 20 Jun 2011 19:10:08 +0000 (20:10 +0100)]
mmc: block: allow get_card_status() to return error status

If the MMC_SEND_STATUS command is not successful, we should not return
a zero status word, but instead allow the caller to know positively
that an error occurred.

Convert the open-coded get_card_status() to use the helper function,
and provide definitions for the card state field.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: mmc_test: test to measure how sg_len affect performance
Per Forlin [Fri, 1 Jul 2011 16:55:27 +0000 (18:55 +0200)]
mmc: mmc_test: test to measure how sg_len affect performance

Add a test that measures how the mmc bandwidth depends on the numbers of
sg elements in the sg list. The transfer size if fixed and sg length goes
from a few up to 512. The purpose is to measure overhead caused by
multiple sg elements.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: mmc_test: add test for non-blocking transfers
Per Forlin [Fri, 1 Jul 2011 16:55:26 +0000 (18:55 +0200)]
mmc: mmc_test: add test for non-blocking transfers

Add four tests for read and write performance per
different transfer size, 4k to 4M.
 * Read using blocking mmc request
 * Read using non-blocking mmc request
 * Write using blocking mmc request
 * Write using non-blocking mmc request

The host driver must support pre_req() and post_req()
in order to run the non-blocking test cases.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>