firefly-linux-kernel-4.4.55.git
10 years agopinctrl:add debug function support
luowei [Wed, 12 Mar 2014 12:36:55 +0000 (20:36 +0800)]
pinctrl:add debug function support

10 years agoethernet: adjust gmac code
hwg [Wed, 12 Mar 2014 12:23:10 +0000 (20:23 +0800)]
ethernet: adjust gmac code

10 years agork31:linux3.10:support bq27320 fg and bq24296 charger ic
张晴 [Wed, 12 Mar 2014 07:54:36 +0000 (15:54 +0800)]
rk31:linux3.10:support bq27320 fg and bq24296 charger ic

10 years agoUSB: fix compile error if disable config USB20_HOST or USB20_OTG.
wlf [Wed, 12 Mar 2014 07:41:19 +0000 (15:41 +0800)]
USB: fix compile error if disable config USB20_HOST or USB20_OTG.

10 years agork: ion: more debug info
CMY [Wed, 12 Mar 2014 07:21:17 +0000 (15:21 +0800)]
rk: ion: more debug info

10 years agoSDMMC: eMMC OK. It is good to run correctly from emmc
xbw [Wed, 12 Mar 2014 06:37:47 +0000 (14:37 +0800)]
SDMMC: eMMC OK. It is good to run correctly from emmc

10 years agoethernet: remove SI project file
hwg [Wed, 12 Mar 2014 06:34:03 +0000 (14:34 +0800)]
ethernet: remove SI project file

10 years agoARM: rockchip: support console write by thread
黄涛 [Wed, 12 Mar 2014 03:43:07 +0000 (11:43 +0800)]
ARM: rockchip: support console write by thread

10 years agork3288 lcdc: fix some compile warning
hjc [Wed, 12 Mar 2014 03:50:22 +0000 (11:50 +0800)]
rk3288 lcdc: fix some compile warning

10 years agork: ion: get reserve cma memory for ion from device tree
CMY [Wed, 12 Mar 2014 02:49:32 +0000 (10:49 +0800)]
rk: ion: get reserve cma memory for ion from device tree
         restore default CMA size to 16M

10 years agoUSB: fix otg20 host mode auto suspend bug.
wlf [Wed, 12 Mar 2014 03:19:54 +0000 (11:19 +0800)]
USB: fix otg20 host mode auto suspend bug.

10 years agoARM: rockchip: fix debug/rockchip.S compile error
黄涛 [Wed, 12 Mar 2014 02:44:45 +0000 (10:44 +0800)]
ARM: rockchip: fix debug/rockchip.S compile error

10 years agousb sound card: add switch register and switch state setting
陈金泉 [Wed, 12 Mar 2014 02:18:57 +0000 (10:18 +0800)]
usb sound card: add switch register and switch state setting

10 years agowifi: add wifi configuration into rockchip_defconfig.
gwl [Wed, 12 Mar 2014 02:25:38 +0000 (10:25 +0800)]
wifi: add wifi configuration into rockchip_defconfig.

10 years agoinput: ts: ct36x: init use async and fix compile warning
黄涛 [Wed, 12 Mar 2014 01:52:39 +0000 (09:52 +0800)]
input: ts: ct36x: init use async and fix compile warning

10 years agoethernet: solve compile error
hwg [Wed, 12 Mar 2014 01:22:56 +0000 (09:22 +0800)]
ethernet: solve compile error

10 years agoUSB: add remote wakeup and detect by otg bvalid in defconfig
wlf [Wed, 12 Mar 2014 01:10:30 +0000 (09:10 +0800)]
USB: add remote wakeup and detect by otg bvalid in defconfig

10 years agoadd dma support for spi driver
luowei [Tue, 11 Mar 2014 14:05:04 +0000 (22:05 +0800)]
add dma support for spi driver

10 years agoethernet: add gmac driver
hwg [Tue, 11 Mar 2014 13:52:01 +0000 (21:52 +0800)]
ethernet: add gmac driver

10 years agovmac: add phy power control driver
hwg [Tue, 11 Mar 2014 13:09:35 +0000 (21:09 +0800)]
vmac: add phy power control driver

10 years agowifi:bcmdhd: wifi does't work in oob's way.
gwl [Tue, 11 Mar 2014 12:22:30 +0000 (20:22 +0800)]
wifi:bcmdhd: wifi does't work in oob's way.

10 years agowifi:bcmdhd: remove a disgusting print.
gwl [Tue, 11 Mar 2014 12:13:34 +0000 (20:13 +0800)]
wifi:bcmdhd: remove a disgusting print.

10 years agoARM: rockchip: cpu.c support rk3288
黄涛 [Tue, 11 Mar 2014 11:54:12 +0000 (19:54 +0800)]
ARM: rockchip: cpu.c support rk3288

10 years agowifi: modify wifi plat data.
gwl [Tue, 11 Mar 2014 11:38:46 +0000 (19:38 +0800)]
wifi: modify wifi plat data.

10 years agowifi: fix rfkill-wlan.c error.
gwl [Tue, 11 Mar 2014 09:30:13 +0000 (17:30 +0800)]
wifi: fix rfkill-wlan.c error.

10 years agoHDMI: fix rk3288 hdmi driver code compile error
zwl [Tue, 11 Mar 2014 09:15:15 +0000 (17:15 +0800)]
HDMI: fix rk3288 hdmi driver code compile error

10 years agoBT: add bt resource into dts, add bt power driver.
gwl [Tue, 11 Mar 2014 09:23:59 +0000 (17:23 +0800)]
BT: add bt resource into dts, add bt power driver.

10 years agommc: rk_sdmmc: add host->hw_reset for eMMC
lintao [Tue, 11 Mar 2014 09:09:28 +0000 (17:09 +0800)]
mmc: rk_sdmmc: add host->hw_reset for eMMC

10 years agoHDMI: optimize rk3288 hdmi driver code
zwl [Tue, 11 Mar 2014 08:14:11 +0000 (16:14 +0800)]
HDMI: optimize rk3288 hdmi driver code

10 years agoct36x compatible ct363 and ct365
zyk [Tue, 11 Mar 2014 07:59:26 +0000 (15:59 +0800)]
ct36x compatible ct363 and ct365

10 years agoUSB: remove unused files: ehci-rk.c and ohci-rk.c
wlf [Tue, 11 Mar 2014 06:46:49 +0000 (14:46 +0800)]
USB: remove unused files: ehci-rk.c and ohci-rk.c

10 years agoUSB: renamed usb files: ehci-rk.c -> ehci-rockchip.c, ohci-rk.c -> ohci-rockchip.c
wlf [Tue, 11 Mar 2014 06:35:51 +0000 (14:35 +0800)]
USB: renamed usb files: ehci-rk.c -> ehci-rockchip.c, ohci-rk.c -> ohci-rockchip.c

10 years agoUSB: RK3288 USB CTLR initialization
wlf [Tue, 11 Mar 2014 03:14:10 +0000 (11:14 +0800)]
USB: RK3288 USB CTLR initialization

10 years agoSDMMC: to suuport eMMC. continue with commit-7dcb2b4f0
xbw [Tue, 11 Mar 2014 02:36:22 +0000 (10:36 +0800)]
SDMMC: to suuport eMMC. continue with commit-7dcb2b4f0

10 years ago1.to support eMMC.
xbw [Tue, 11 Mar 2014 02:01:46 +0000 (10:01 +0800)]
1.to support eMMC.
2.Resolve conflicts pin used to wifi-sdio-det.
3.Resolve the clock conflict between sd and sdio.

10 years agofs: emmc: Delete useless files
xbw [Tue, 11 Mar 2014 01:53:36 +0000 (09:53 +0800)]
fs: emmc:  Delete useless files

10 years agork3288 lcdc: win0/1/2/3 test at fpga ok
hjc [Tue, 11 Mar 2014 01:40:16 +0000 (09:40 +0800)]
rk3288 lcdc: win0/1/2/3 test at fpga ok

10 years agofix rk3188 and 3288 fpga screen par define error
hjc [Tue, 11 Mar 2014 01:38:30 +0000 (09:38 +0800)]
fix rk3188 and 3288 fpga screen par define error

10 years agoARM: rockchip: fix fpga compile error
黄涛 [Tue, 11 Mar 2014 01:02:37 +0000 (09:02 +0800)]
ARM: rockchip: fix fpga compile error

10 years agoinput: ts: ct36x: fix init
黄涛 [Mon, 10 Mar 2014 12:27:32 +0000 (20:27 +0800)]
input: ts: ct36x: fix init

10 years agoARM: rockchip: move some head files to include/linux/rockchip
黄涛 [Mon, 10 Mar 2014 11:32:34 +0000 (19:32 +0800)]
ARM: rockchip: move some head files to include/linux/rockchip

10 years agork fb: new framework test ok at rk3188
hjc [Fri, 7 Mar 2014 03:49:23 +0000 (11:49 +0800)]
rk fb: new framework test ok at rk3188
this commit depend on the hwc commit:
commit 59966e5cc0530d936435052d187fbe574684f21e
Author: huangds <hds@rock-chips.com>
Date:   Fri Mar 7 11:17:56 2014 +0800

    lcdc ok ,enable hwc
commit 314b22af926f28c3daa048354a4e4185fc46611b
Author: huangds <hds@rock-chips.com>
Date:   Mon Mar 10 18:19:04 2014 +0800

    lcdc abbort ,RK_FBIOSET_CONFIG_DONE remove for a moment

10 years agoARM: rockchip: rk3288 support cpu on/off
黄涛 [Mon, 10 Mar 2014 11:03:15 +0000 (19:03 +0800)]
ARM: rockchip: rk3288 support cpu on/off

10 years agoARM: rockchip: rk3288.dtsi indent only
黄涛 [Mon, 10 Mar 2014 10:25:27 +0000 (18:25 +0800)]
ARM: rockchip: rk3288.dtsi indent only

10 years agoHDMI: add rk3288 hdmi PHY MPLL config
zwl [Mon, 10 Mar 2014 10:22:21 +0000 (18:22 +0800)]
HDMI: add rk3288 hdmi PHY MPLL config

10 years agoMerge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10
libing [Mon, 10 Mar 2014 09:35:08 +0000 (17:35 +0800)]
Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10

10 years agork mipi dsi: dsi file:lcd-rockchip_mipi.dtsi support rk3288.
libing [Mon, 10 Mar 2014 09:34:51 +0000 (17:34 +0800)]
rk mipi dsi: dsi file:lcd-rockchip_mipi.dtsi support rk3288.

10 years agork31:linux3.10:pmic:support dc&ldo suspend en/disable,add rk808 pre_init
张晴 [Mon, 10 Mar 2014 06:21:07 +0000 (14:21 +0800)]
rk31:linux3.10:pmic:support dc&ldo suspend en/disable,add rk808 pre_init

10 years agork610-hdmi:delete hdmi_set_spk
陈金泉 [Mon, 10 Mar 2014 06:03:45 +0000 (14:03 +0800)]
rk610-hdmi:delete hdmi_set_spk

10 years agommc: sdio: fix sdio_reset_comm
lintao [Mon, 10 Mar 2014 04:35:09 +0000 (12:35 +0800)]
mmc: sdio: fix sdio_reset_comm

10 years agoSDMMC: 1.to identify eMMC. 2.add the trace log in rk_sdmmc driver.
xbw [Mon, 10 Mar 2014 04:05:59 +0000 (12:05 +0800)]
SDMMC: 1.to identify eMMC. 2.add the trace log in rk_sdmmc driver.

10 years agoAudio: delete codec_set_spk, update rk616 codec driver
陈金泉 [Mon, 10 Mar 2014 03:10:43 +0000 (11:10 +0800)]
Audio: delete codec_set_spk, update rk616 codec driver

10 years agork: ion: show client's buffer info
CMY [Fri, 7 Mar 2014 11:59:26 +0000 (19:59 +0800)]
rk: ion: show client's buffer info

10 years agoHDMI: implement function at rk3288_hdmi_hw.c and add some register defined
zwl [Sat, 8 Mar 2014 11:13:36 +0000 (19:13 +0800)]
HDMI: implement function at rk3288_hdmi_hw.c and add some register defined

10 years agoRevert "rk fb: new framework test ok at rk3188"
libing [Sat, 8 Mar 2014 06:30:22 +0000 (14:30 +0800)]
Revert "rk fb: new framework test ok at rk3188"

This reverts commit fe817a682b4cf0e477b945bce9565e44f476370c.

10 years agoMerge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10
lintao [Fri, 7 Mar 2014 12:13:34 +0000 (20:13 +0800)]
Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10

10 years agoFix uses of dma_max_pfn() when converting to a limiting address
Russell King [Tue, 11 Feb 2014 17:11:04 +0000 (17:11 +0000)]
Fix uses of dma_max_pfn() when converting to a limiting address

We must use a 64-bit for this, otherwise overflowed bits get lost, and
that can result in a lower than intended value set.

Fixes: 8e0cb8a1f6ac ("ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations")
Fixes: 7d35496dd982 ("ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations")
Tested-Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Conflicts:
drivers/scsi/scsi_lib.c

10 years agommc: fix host release issue after discard operation
Ray Jui [Sat, 26 Oct 2013 18:03:44 +0000 (11:03 -0700)]
mmc: fix host release issue after discard operation

Under function mmc_blk_issue_rq, after an MMC discard operation,
the MMC request data structure may be freed in memory. Later in
the same function, the check of req->cmd_flags & MMC_REQ_SPECIAL_MASK
is dangerous and invalid. It causes the MMC host not to be released
when it should.

This patch fixes the issue by marking the special request down before
the discard/flush operation.

Reported by: Harold (SoonYeal) Yang <haroldsy@broadcom.com>
Signed-off-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agoARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
Santosh Shilimkar [Mon, 29 Jul 2013 13:18:48 +0000 (14:18 +0100)]
ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function

Most of the kernel assumes that PFN0 is the start of the physical
memory (RAM). This assumptions is not true on most of the ARM SOCs
and hence and if one try to update the ARM port to follow the assumptions,
we end of breaking the dma bounce limit for few block layer drivers.
One such example is trying to unify the meaning of max*_pfn on ARM
as the bootmem layer expects, breaks few block layer driver dma
bounce limit.

To fix this problem, we introduce dma_max_pfn(dev) generic helper with
a possibility of override from the architecture code. The helper converts
a DMA bitmask of bits to a block PFN number. In all the generic cases,
it is just  "dev->dma_mask >> PAGE_SHIFT" and hence default behavior
is maintained as is.

Subsequent patches will make use of the helper. No functional change.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 years agoARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
Santosh Shilimkar [Mon, 29 Jul 2013 13:20:15 +0000 (14:20 +0100)]
ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations

DMA bounce limit is the maximum direct DMA'able memory beyond which
bounce buffers has to be used to perform dma operations. MMC queue layr
relies on dma_mask but its calculation is based on max_*pfn which
don't have uniform meaning across architectures. So make use of
dma_max_pfn() which is expected to return the DMAable maximum pfn
value across architectures.

Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 years agommc: Don't force card to active state when entering suspend/shutdown
Ulf Hansson [Wed, 2 Oct 2013 15:37:09 +0000 (17:37 +0200)]
mmc: Don't force card to active state when entering suspend/shutdown

By adding a card state that records if it is suspended or resumed, we
can accept asyncronus suspend/resume requests for the mmc and sd
bus_ops.

MMC_CAP_AGGRESSIVE_PM, will at request inactivity through the runtime
bus_ops callbacks, execute a suspend of the the card. In the state were
this has been done, we can receive a suspend request for the mmc bus,
which for sd and mmc forced the card to active state by a
pm_runtime_get_sync. In other words, the card was resumed and then
immediately suspended again, completely unnecessary.

Since the suspend/resume bus_ops callbacks for sd and mmc are now
capable of handling asynchronous requests, we no longer need to force
the card to active state before executing suspend. Evidently preventing
the above sequence for MMC_CAP_AGGRESSIVE_PM.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/mmc.c
drivers/mmc/core/sd.c

10 years agommc: fix null pointer use in mmc_blk_remove_req
Franck Jullien [Wed, 24 Jul 2013 13:17:48 +0000 (15:17 +0200)]
mmc: fix null pointer use in mmc_blk_remove_req

A previous commit (fdfa20c1631210d0) reordered the shutdown sequence
in mmc_blk_remove_req. However, mmc_cleanup_queue is now called before
we get the card pointer, and mmc_cleanup_queue sets mq->card to NULL.

This patch moves the card pointer assignment before mmc_cleanup_queue.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Handle card shutdown from mmc_bus
Ulf Hansson [Mon, 10 Jun 2013 15:03:40 +0000 (17:03 +0200)]
mmc: core: Handle card shutdown from mmc_bus

Considering shutdown of the card, the responsibility to initate this
sequence shall be driven from the mmc_bus.

This patch enables the mmc_bus to handle this sequence properly. A new
.shutdown callback is added in the mmc_driver struct which is used to
shutdown the blk device.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/bus.c

10 years agommc: card: fixing an false identification of SANITIZE command
Yaniv Gardi [Wed, 5 Jun 2013 11:13:08 +0000 (14:13 +0300)]
mmc: card: fixing an false identification of SANITIZE command

Inside the routine mmc_blk_ioctl_cmd() the sanitize command is
identified according to the value of bits 16-23 of the argument.

but what happens if a different command is sent, and only by
chance, bits 16-23 contain the value of SANITIZE command ?
In that case a SANITIZE command will be falsely identified.
In order to prevent such a case, the condition is expanded and
now it also checks the opcode itself, and verifies that it is an
MMC_SWITCH opcode.

Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: reordered shutdown sequence in mmc_bld_remove_req
Paul Taysom [Tue, 4 Jun 2013 21:42:40 +0000 (14:42 -0700)]
mmc: reordered shutdown sequence in mmc_bld_remove_req

We had a multi-partition SD-Card with two ext2 file systems. The partition
table was getting overwritten by a race between the card removal and
the unmount of the 2nd ext2 partition.

What was observed:
1. Suspend/resume would call to remove the device. The clearing
   of the device information is done asynchronously.
2. A request is made to unmount the file system (this is called
   after the removal has started).
3. The remapping table was cleared by the asynchronous part of
   the device removal.
4. A write request to the super block (block 0 of the partition)
   was sent down and instead of being remapped to the partition
   offset, it was remapped to block 0 of the device which is where
   the partition table is located.
5. Write was queued and written resulting in the overwriting
   of the partition table with the ext2 super block.
6. The mmc_queue is cleaned up.

The mmc card device driver used to access SD cards, was calling del_gendisk
before calling mmc_cleanup-queue. The comment in the mmc_blk_remove_req
code indicated that it expected del_gendisk to block all further requests
from being queued but it doesn't. The mmc driver uses the presences of the
mmc_queue to determine if the request should be queued.

The fix was to clean up the mmc_queue before the rest of the
the delete partition code is called.

This prevents the overwriting of the partition table.

However, the umount gets an error trying to write the super block.
The umount should be issued before the device is removed but that
is not always possible. The umount is still needed to cleanup other
data structures.

Addresses the problem described in http://crbug.com/240815

Signed-off-by: Paul Taysom <taysom@chromium.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: block: Enable runtime pm for mmc blkdevice
Ulf Hansson [Thu, 2 May 2013 12:02:38 +0000 (14:02 +0200)]
mmc: block: Enable runtime pm for mmc blkdevice

Once the mmc blkdevice is being probed, runtime pm will be enabled.
By using runtime autosuspend, the power save operations can be done
when request inactivity occurs for a certain time. Right now the
selected timeout value is set to 3 s. Obviously this value will likely
need to be configurable somehow since it needs to be trimmed depending
on the power save algorithm.

For SD-combo cards, we are still leaving the enablement of runtime PM
to the SDIO init sequence since it depends on the capabilities of the
SDIO func driver.

Moreover, when the blk device is being suspended, we make sure the device
will be runtime resumed. The reason for doing this is that we want the
host suspend sequence to be unaware of any runtime power save operations
done for the card in this phase. Thus it can just handle the suspend as
the card is fully powered from a runtime perspective.

Finally, this patch prepares to make it possible to move BKOPS handling
into the runtime callbacks for the mmc bus_ops. Thus IDLE BKOPS can be
accomplished.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/card/block.c

10 years agommc: sdio: add a quirk for broken SDIO_CCCR_INTx polling
Bing Zhao [Tue, 26 Nov 2013 23:39:20 +0000 (15:39 -0800)]
mmc: sdio: add a quirk for broken SDIO_CCCR_INTx polling

Polling SDIO_CCCR_INTx could create a fake interrupt with Marvell
SD8797 card. Add a quirk to handle this case. The fixup here is
to issue a dummy CMD52 read to function 0 register 0xff, and this
dummy read must be right after SDIO_CCCR_INTx is read.

Patch has been verified on a dw_mmc controller (Samsung Chromebook)
with MMC_CAP_SDIO_IRQ disabled.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
10 years agommc: core: sd: implement proper support for sd3.0 au sizes
Wolfram Sang [Tue, 26 Nov 2013 01:16:25 +0000 (02:16 +0100)]
mmc: core: sd: implement proper support for sd3.0 au sizes

This reverts and updates commit 77776fd0a4cc541b9 ("mmc: sd: fix the
maximum au_size for SD3.0"). The au_size for SD3.0 cannot be achieved
by a simple bit shift, so this needs to be implemented differently.
Also, don't print the warning in case of 0 since 'not defined' is
different from 'invalid'.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: stable <stable@vger.kernel.org> # [3.12, 3.13]
Signed-off-by: Chris Ball <chris@printf.net>
10 years agommc: Do not call get_cd for non removable cards
Sascha Hauer [Thu, 5 Dec 2013 13:34:46 +0000 (14:34 +0100)]
mmc: Do not call get_cd for non removable cards

Non removable cards are always present, so do not call get_cd for them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: mmc DDR mode should not depend on UHS_DDR50
Dong Aisheng [Wed, 30 Oct 2013 14:09:53 +0000 (22:09 +0800)]
mmc: core: mmc DDR mode should not depend on UHS_DDR50

The MMC_CAP_UHS_DDR50 must work on 1.8v.
However, the eMMC DDR mode can work on either 1.8v or 3.3v and
should not depend on UHS_DDR50.
So get rid of this limitation to let controller without 1.8v
signal voltage support can also work for eMMC DDR mode if it claims.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Silence compiler warning in __mmc_switch
Ulf Hansson [Mon, 28 Oct 2013 01:51:41 +0000 (02:51 +0100)]
mmc: core: Silence compiler warning in __mmc_switch

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume
Ulf Hansson [Thu, 10 Oct 2013 15:22:23 +0000 (17:22 +0200)]
mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume

In some environments it is to prefer to postpone the resume of the card
device until runtime_resume is being carried out, since it will mean a
signficant decrease of the total system resume time.

The reason of the decreased resume time is simply because of the actual
re-initalization of the card, which typically takes hundreds of
milliseconds, is performed outside the resume sequence and wont thus
affect it.

For removable card, the detect work tries to re-detect the card to make
sure it is still present, as a part of that sequence the card will also
be runtime_resumed and thus also fully resumed.

For a non-removable card, typically a mmc blk request will trigger a
runtime_resume and thus fully resume the card. This also means the
first request will likely suffer from an inital latency since the
re-initialization of the card needs to be performed.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Improve runtime PM support during suspend/resume for sd/mmc
Ulf Hansson [Thu, 10 Oct 2013 12:20:05 +0000 (14:20 +0200)]
mmc: core: Improve runtime PM support during suspend/resume for sd/mmc

The card device is considered as in-active after it has been suspended.
To prevent any further runtime PM requests in suspend state, we then
disable runtime PM.

After the card device has been resumed, we shall consider it as active,
like we also do after a probe sequence. When resumed, we can safely
enable runtime PM again.

This will make sure the PM core can request the card device to go to
in-active state after a resume has been completed. Previously we had to
wait for new pm_runtime_get->pm_runtime_put cycle to be executed.

Additionally, once a resume has been carried out, update the last busy
mark. At the moment this will have no effect but if the PM core will
respect autosuspend enabled devices, when it directly triggers a
runtime_suspend from a runtime_idle, it will mean the card device will
be scheduled for a delayed runtime_suspend instead of done immediately.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Remove redundant mmc_power_up|off at runtime callbacks
Ulf Hansson [Thu, 3 Oct 2013 09:24:44 +0000 (11:24 +0200)]
mmc: core: Remove redundant mmc_power_up|off at runtime callbacks

Commit "mmc: core: Push common suspend|resume code into each bus_ops"
moved the responsibility for doing mmc_power_up|off into each
suspend/resume bus_ops. When using MMC_CAP_AGGRESSIVE_PM, through the
runtime callbacks, calls to mmc_power_up|off became redundant.

When removing them, we are also able to remove the calls to
mmc_claim|release_host, thus simplifing code a bit more.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: Don't force card to active state when entering suspend/shutdown
Ulf Hansson [Wed, 2 Oct 2013 15:37:09 +0000 (17:37 +0200)]
mmc: Don't force card to active state when entering suspend/shutdown

By adding a card state that records if it is suspended or resumed, we
can accept asyncronus suspend/resume requests for the mmc and sd
bus_ops.

MMC_CAP_AGGRESSIVE_PM, will at request inactivity through the runtime
bus_ops callbacks, execute a suspend of the the card. In the state were
this has been done, we can receive a suspend request for the mmc bus,
which for sd and mmc forced the card to active state by a
pm_runtime_get_sync. In other words, the card was resumed and then
immediately suspended again, completely unnecessary.

Since the suspend/resume bus_ops callbacks for sd and mmc are now
capable of handling asynchronous requests, we no longer need to force
the card to active state before executing suspend. Evidently preventing
the above sequence for MMC_CAP_AGGRESSIVE_PM.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: rk_sdmmc: fix dw_mci_resume
lintao [Fri, 7 Mar 2014 11:33:41 +0000 (19:33 +0800)]
mmc: rk_sdmmc: fix dw_mci_resume

10 years agommc: rk_sdmmc: fix dw_mci_suspend
lintao [Fri, 7 Mar 2014 11:32:06 +0000 (19:32 +0800)]
mmc: rk_sdmmc: fix dw_mci_suspend

10 years agommc: core: Remove deprecated mmc_suspend|resume_host APIs
Ulf Hansson [Thu, 26 Sep 2013 09:01:18 +0000 (11:01 +0200)]
mmc: core: Remove deprecated mmc_suspend|resume_host APIs

The are no more users of the deprecated mmc_suspend|resume_host API,
so let's remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Signal wakeup event at card insert/removal
Ulf Hansson [Fri, 20 Sep 2013 09:02:35 +0000 (11:02 +0200)]
mmc: core: Signal wakeup event at card insert/removal

We want to give user space provision to fully consume a card
insert/remove event, when the event was caused by a wakeup irq.

By signaling the wakeup event for a time of 5 s for devices configured
as wakeup capable, we likely will be prevent a sleep long enough to let
user space consume the event.

To enable this feature, host drivers must thus configure their devices
as wakeup capable.

This is a reworked implementation of the old wakelocks for the mmc
subsystem, originally authored by Colin Cross and San Mehat for the
Android kernel. Zoran Markovic shall also be given cred for recently
re-trying to upstream this feature.

Cc: San Mehat <san@google.com>
Cc: Colin Cross <ccross@android.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Zoran Markovic <zoran.markovic@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Zoran Markovic <zoran.markovic@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/core.c

10 years agoadd spi_write_and_read interface for spi
luowei [Fri, 7 Mar 2014 11:06:04 +0000 (19:06 +0800)]
add spi_write_and_read interface for spi

10 years agoadd spi dts code
luowei [Fri, 7 Mar 2014 11:03:20 +0000 (19:03 +0800)]
add spi dts code

10 years agoadd spi driver support
luowei [Fri, 7 Mar 2014 11:01:09 +0000 (19:01 +0800)]
add spi driver support

10 years agork mipi dsi: dsi driver support rk3288
hhb [Fri, 7 Mar 2014 10:13:27 +0000 (18:13 +0800)]
rk mipi dsi: dsi driver support rk3288

10 years agommc: core: Collect common code for card ocr validation
Ulf Hansson [Mon, 16 Sep 2013 10:06:15 +0000 (12:06 +0200)]
mmc: core: Collect common code for card ocr validation

Since mmc_select_voltage now only gets called from the attach sequence,
it makes sense to move the out of spec validations of the card ocr into
this function.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Prevent violation of specs while initializing cards
Ulf Hansson [Mon, 16 Sep 2013 09:28:42 +0000 (11:28 +0200)]
mmc: core: Prevent violation of specs while initializing cards

According to eMMC/SD/SDIO specs, the VDD (VCC) voltage level must be
maintained during the initialization sequence. If we want/need to tune
the voltage level, a complete power cycle of the card must be executed.

Most host drivers conforms to the specifications by only allowing to
change VDD voltage level at the MMC_POWER_UP state, but some also cares
about MMC_POWER_ON state, which they should'nt. This patch will not
break those drivers, but they could clean up code to better reflect
what is expected from the protocol layer.

A big re-work of the mmc_select_voltage function is done to only change
VDD voltage level if the host supports MMC_CAP2_FULL_PWR_CYCLE.
Otherwise only validation of the host and card ocr mask will be done.

A very nice side-effect of this patch is that we now don't need to
reset the negotiated ocr mask at the mmc_power_off function, since now
it will actually reflect the present voltage level, which safely can be
used at the next power up and re-initialization. Moreover, we then only
need to execute mmc_select_voltage from the attach sequence.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Move cached value of the negotiated ocr mask to card struct
Ulf Hansson [Fri, 13 Sep 2013 09:31:33 +0000 (11:31 +0200)]
mmc: core: Move cached value of the negotiated ocr mask to card struct

The negotiated ocr mask is directly related to the card. Once a card
gets removed, the mask shall be dropped. By moving the cache of the ocr
mask from the host struct to the card struct we have accomplished this.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/sd.c

10 years agommc: core: Cleanup code for setting ocr mask for SDIO
Ulf Hansson [Fri, 13 Sep 2013 08:49:34 +0000 (10:49 +0200)]
mmc: core: Cleanup code for setting ocr mask for SDIO

At several places in mmc_sdio_init_card function the cached mask in
host->ocr were being updated. To simplify code, we make use of an
local ocr parameter instead.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Remove unnecessary retry mechanism at SDIO attach
Ulf Hansson [Thu, 12 Sep 2013 14:38:56 +0000 (16:38 +0200)]
mmc: core: Remove unnecessary retry mechanism at SDIO attach

The retry and fallback mechanism when failing to switch to 1.8V
signaling voltage is handled by the SDIO card init function. Thus we
can remove the duplicated old code from the attach function.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: remove mmc_resume_bus
lintao [Fri, 7 Mar 2014 09:26:15 +0000 (17:26 +0800)]
mmc: core: remove mmc_resume_bus

10 years agommc: core: Let mmc_set_signal_voltage take ocr as parameter
Ulf Hansson [Thu, 12 Sep 2013 13:36:34 +0000 (15:36 +0200)]
mmc: core: Let mmc_set_signal_voltage take ocr as parameter

This is yet another step of restructure code to be able to fixup the
setup of the negotiated ocr mask.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Let mmc_power_up|cycle take ocr as parameter
Ulf Hansson [Thu, 12 Sep 2013 12:36:53 +0000 (14:36 +0200)]
mmc: core: Let mmc_power_up|cycle take ocr as parameter

As a step to fixup the setup of the negotiated ocr mask, we need the
mmc_power_up|cycle functions to take the ocr as a parameter.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Do not poll for busy with status cmd for all switch cmds
Ulf Hansson [Mon, 9 Sep 2013 09:57:57 +0000 (11:57 +0200)]
mmc: core: Do not poll for busy with status cmd for all switch cmds

Some switch operations like poweroff notify, shall according to the
spec not be followed by any other new commands. For these cases and
when the host does'nt support MMC_CAP_WAIT_WHILE_BUSY, we must not
send status commands to poll for busy detection. Instead wait for
the stated timeout from the EXT_CSD before completing the request.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: clean up duplicate macros
Jackey Shen [Fri, 17 May 2013 09:17:43 +0000 (17:17 +0800)]
mmc: core: clean up duplicate macros

Clean up the duplicate macros:
mmc_sd_card_uhs -> mmc_card_uhs
mmc_sd_card_set_uhs -> mmc_card_set_uhs

Signed-off-by: Jackey Shen <jackey.shen@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: add ignorance case for CMD13 CRC error
Seungwon Jeon [Wed, 4 Sep 2013 12:21:05 +0000 (21:21 +0900)]
mmc: add ignorance case for CMD13 CRC error

While speed mode is changed, CMD13 cannot be guaranteed.
According to the spec., it is not recommended to use CMD13
to check the busy completion of the timing change.
If CMD13 is used in this case, CRC error must be ignored.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: remove dead function mmc_try_claim_host
Grant Grundler [Fri, 20 Sep 2013 01:21:36 +0000 (18:21 -0700)]
mmc: core: remove dead function mmc_try_claim_host

cscope says there are no callers for mmc_try_claim_host in the kernel.
No reason to keep it.

Signed-off-by: Grant Grundler <grundler@chromium.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: parse voltage from device-tree
Haijun Zhang [Mon, 26 Aug 2013 01:19:22 +0000 (09:19 +0800)]
mmc: core: parse voltage from device-tree

Add function to support getting voltage from device-tree.
If voltage-range is specified in device-tree node, this function
will parse it and return the available voltage mask.

Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/core.c

10 years agommc: slot-gpio: Add debouncing capability to mmc_gpio_request_cd()
Laurent Pinchart [Thu, 8 Aug 2013 10:38:31 +0000 (12:38 +0200)]
mmc: slot-gpio: Add debouncing capability to mmc_gpio_request_cd()

Add a debounce parameter to the mmc_gpio_request_cd() function that
enables GPIO debouncing when set to a non-zero value. This can be used
by MMC host drivers to enable debouncing on the card detect signal.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/host/jz4740_mmc.c
drivers/mmc/host/mvsdio.c

10 years agommc: core: Set data timeout for mmc bus test commands (CMD14 and CMD19).
Minjian Wu [Sun, 25 Aug 2013 03:25:12 +0000 (23:25 -0400)]
mmc: core: Set data timeout for mmc bus test commands (CMD14 and CMD19).

Signed-off-by: Minjian Wu <minjianwu@micron.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agoregulator: core: Split devres code out into a separate file
Mark Brown [Wed, 11 Sep 2013 12:15:40 +0000 (13:15 +0100)]
regulator: core: Split devres code out into a separate file

Cut down on the size of core.c a bit more and ensure that the devres
versions of things don't do too much peering inside the internals of
the APIs they wrap.

Signed-off-by: Mark Brown <broonie@linaro.org>
Conflicts:
drivers/regulator/Makefile
drivers/regulator/core.c

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>