firefly-linux-kernel-4.4.55.git
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 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>
10 years agommc: core: free mmc_card if cmd 3,9,7 fails in mmc_sd_init_card
Wei WANG [Wed, 17 Jul 2013 06:21:10 +0000 (14:21 +0800)]
mmc: core: free mmc_card if cmd 3,9,7 fails in mmc_sd_init_card

In function mmc_sd_init_card, if command 3/9/7 got failed, mmc_card
allocated just before won't be freed. This would cause memory leak.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Indicate that vmmcq may be absent
Mark Brown [Mon, 29 Jul 2013 20:58:01 +0000 (21:58 +0100)]
mmc: core: Indicate that vmmcq may be absent

Use regulator_get_optional() to tell the core that requests for the vmmcq
regulator can fail in a real system.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Fixup Oops for SDIO shutdown
Ulf Hansson [Tue, 2 Jul 2013 10:53:01 +0000 (12:53 +0200)]
mmc: core: Fixup Oops for SDIO shutdown

Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
Oops in the shutdown sequence for SDIO.

The drv pointer, does not exist for SDIO since the probing of the SDIO
card from the mmc_bus perspective is expected to fail by returning
-ENODEV.

This patch adds the proper check for the pointer before calling it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Reported-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Tested-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: production year for eMMC 4.41 and later
Romain Izard [Fri, 14 Jun 2013 12:25:44 +0000 (14:25 +0200)]
mmc: core: production year for eMMC 4.41 and later

The field containing the production date in the CID register only uses
4 bits to encode the year, starting from 1997 in the original standard.
In 2013, the production year field contains 0, and the kernel reports a
1997 production date.

The eMMC 4.51 specification adds a new interpretation rule. For all
devices implementing the 4.41 specification or later, the production
year field will be interpreted as a value between 2010 and 2025, with
0 corresponding to 2013.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Add DT-bindings for MMC_CAP2_FULL_PWR_CYCLE
Ulf Hansson [Mon, 10 Jun 2013 15:03:47 +0000 (17:03 +0200)]
mmc: core: Add DT-bindings for MMC_CAP2_FULL_PWR_CYCLE

The DT-binding for MMC_CAP2_FULL_PWR_CYCLE, is used to indicate whether
it is possible to perform a full power cycle of the card.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Invent MMC_CAP2_FULL_PWR_CYCLE
Ulf Hansson [Mon, 10 Jun 2013 15:03:46 +0000 (17:03 +0200)]
mmc: core: Invent MMC_CAP2_FULL_PWR_CYCLE

MMC_CAP2_FULL_PWR_CYCLE shall be set by host drivers which are able to
do a complete power cycle of the card. In the eMMC case that includes
both vcc and vccq.

This CAP is providing the protocol layer with important information,
needed to take optimized decisions during card initialization and in
the suspend/resume sequence.

MMC_CAP2_POWEROFF_NOTIFY is replaced by MMC_CAP2_FULL_PWR_CYCLE, since
it makes sense to use a wider scope for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Enable power_off_notify for eMMC shutdown sequence
Ulf Hansson [Mon, 10 Jun 2013 15:03:45 +0000 (17:03 +0200)]
mmc: core: Enable power_off_notify for eMMC shutdown sequence

In suspend mode it is important to save power. If the host is able to
cut buth vcc and vccq, the MMC_CAP2_POWEROFF_NOTIFY shall be set. It
will mean the card will be completely powered down at suspend and the
power off notification cmd will be sent prior power down.

It seems common not being able to cut both vcc and vccq for a host. In
this situation we issue the sleep cmd in favor of the power off
notification cmd, to save more power.

While maintainng the above policy, we also want to make use of the
power off notification in the shutdown sequence, even in the case were
the host has not set MMC_CAP2_POWEROFF_NOTIFY, since we know vcc and
vccq will regardless be cut.

We accomplish this by always enabling the power off notification byte
in the EXT_CSD and issue the power off notification when either
MMC_CAP2_POWEROFF_NOTIFY is set or we are executing a shutdown.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Add shutdown callback for (e)MMC bus_ops
Ulf Hansson [Mon, 10 Jun 2013 15:03:44 +0000 (17:03 +0200)]
mmc: core: Add shutdown callback for (e)MMC bus_ops

The shutdown sequence of an (e)MMC is very similar to a suspend. We
re-use the suspend function and tell it we are not in suspend context.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Handle both poweroff notification types for eMMC
Ulf Hansson [Mon, 10 Jun 2013 15:03:43 +0000 (17:03 +0200)]
mmc: core: Handle both poweroff notification types for eMMC

Depending on the context of the operation while powering down the card,
either POWER_OFF_NOTIFY_SHORT or POWER_OFF_NOTIFY_LONG will be used. In
suspend context a short timeout is preferred while a long timeout would
be acceptable in a shutdown/hibernation context.

We add a new parameter to the mmc_suspend function so we can provide an
indication of what notification type to use.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Add shutdown callback for SD bus_ops
Ulf Hansson [Mon, 10 Jun 2013 15:03:42 +0000 (17:03 +0200)]
mmc: core: Add shutdown callback for SD bus_ops

For the SD .shutdown callback we re-use the SD suspend function since
it performs the relevant actions.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Extend shutdown sequence to handle bus operations
Ulf Hansson [Mon, 10 Jun 2013 15:03:41 +0000 (17:03 +0200)]
mmc: core: Extend shutdown sequence to handle bus operations

By adding an optional .shutdown callback to the bus_ops struct we
provide the possibility to let each bus type handle it's shutdown
requirements.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
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>
10 years agommc: core: Initiate suspend|resume from mmc bus instead of mmc host
Ulf Hansson [Mon, 10 Jun 2013 15:03:39 +0000 (17:03 +0200)]
mmc: core: Initiate suspend|resume from mmc bus instead of mmc host

The host should be responsible to suspend|resume the host and not the
card. This patch changes this behaviour, by moving the responsiblity
to the mmc bus instead which already holds the card device.

The exported functions mmc_suspend|resume_host are now to be considered
as depcrecated. Once all host drivers moves away from using them, we
can remove them. As of now, a successful error code is always returned.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/core.c

10 years agommc: core: Push common suspend|resume code into each bus_ops
Ulf Hansson [Mon, 10 Jun 2013 15:03:38 +0000 (17:03 +0200)]
mmc: core: Push common suspend|resume code into each bus_ops

By moving code from the mmc_suspend|resume_host down into each
.suspend|resume bus_ops callback, we get a more flexible solution.

Some nice side effects are that we get a better understanding of each
bus_ops suspend|resume sequence and the common code don't have to take
care of specific corner cases, especially for the SDIO case.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/core/core.c
drivers/mmc/core/sd.c

10 years agommc: core: Validate suspend prerequisites for SDIO at SUSPEND_PREPARE
Ulf Hansson [Mon, 10 Jun 2013 15:03:37 +0000 (17:03 +0200)]
mmc: core: Validate suspend prerequisites for SDIO at SUSPEND_PREPARE

This patch moves the validation for all the suspend prerequisites to be
done at SUSPEND_PREPARE notification. Previously in the SDIO case parts
of the validation was done from mmc_suspend_host.

This patch invents a new pre_suspend bus_ops callback and implements it
for SDIO. Returning an error code from it, will mean at SUSPEND_PREPARE
notification, the card will be removed before proceeding with the
suspend sequence.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Remove unnecessary check for the remove callback
Ulf Hansson [Mon, 10 Jun 2013 15:03:36 +0000 (17:03 +0200)]
mmc: core: Remove unnecessary check for the remove callback

For every bus_ops type the .remove callback always exist, thus there
are no need to check the existence of it, before we decide to call it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Update the ext-csd.rev check for eMMC5.1
Yuvaraj Kumar C D [Tue, 21 May 2013 09:38:43 +0000 (15:08 +0530)]
mmc: core: Update the ext-csd.rev check for eMMC5.1

With the new eMMC5.1 spec, there is a new EXT_CSD register with
the revision number(EXT_CSD_REV) 7. This patch updates the check
for ext-csd.rev number as 7.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: return mmc_of_parse() errors to caller
Simon Baatz [Sun, 9 Jun 2013 20:14:11 +0000 (22:14 +0200)]
mmc: return mmc_of_parse() errors to caller

In addition to just logging errors encountered during DT parsing or
allocating GPIO slots for CD/WP, mmc_of_parse() now returns with an error.

In particular, this is needed if the GPIO allocation may return
EPROBE_DEFER.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agoPM / Runtime: Rework the "runtime idle" helper routine
Rafael J. Wysocki [Mon, 3 Jun 2013 19:49:52 +0000 (21:49 +0200)]
PM / Runtime: Rework the "runtime idle" helper routine

The "runtime idle" helper routine, rpm_idle(), currently ignores
return values from .runtime_idle() callbacks executed by it.
However, it turns out that many subsystems use
pm_generic_runtime_idle() which checks the return value of the
driver's callback and executes pm_runtime_suspend() for the device
unless that value is not 0.  If that logic is moved to rpm_idle()
instead, pm_generic_runtime_idle() can be dropped and its users
will not need any .runtime_idle() callbacks any more.

Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
ata_port_runtime_idle(), respectively, as well as a few drivers'
ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
been returned by the .runtime_idle() callback executed by it.

To reduce overall code bloat, make the changes described above.

Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
10 years agommc: core: Fix select power class after resume
Fredrik Soderstedt [Tue, 23 Apr 2013 14:27:07 +0000 (16:27 +0200)]
mmc: core: Fix select power class after resume

Use the saved values in card->ext_csd when selecting power class.
By doing this the power class will be selected even if mmc_init_card
is called with oldcard != NULL, which is the case after a suspend/resume.

Today ext_csd is NULL if mmc_init_card is called with oldcard != NULL
and power class will not be selected.

According to the eMMC specification the POWER_CLASS value is reset after
power failure, H/W reset assertion and any CMD0 reset.

Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Reviewed-by: Johan Rudholm <jrudholm@gmail.com>
Acked By: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Restructure and simplify code for mmc sleep|awake
Ulf Hansson [Fri, 19 Apr 2013 13:12:11 +0000 (15:12 +0200)]
mmc: core: Restructure and simplify code for mmc sleep|awake

The mmc_card_sleep|awake APIs are not being used since the support is
already properly encapsulated within the suspend sequence. Sleep|awake
command is also specific for eMMC.

We remove the sleep|awake bus_ops, the mmc_card_sleep|awake APIs and
move the code into the mmc specific core instead. This also includes
the mmc ops function, mmc_sleepawake. All releated functions have then
become static and we have got far less code to maintain.

Additionally this patch also simplifies the code from mmc_sleepawake,
since it is only used to put the card to sleep and not awake.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Support aggressive power management for (e)MMC/SD
Ulf Hansson [Thu, 2 May 2013 12:02:39 +0000 (14:02 +0200)]
mmc: core: Support aggressive power management for (e)MMC/SD

Aggressive power management is suitable when saving power is
essential. At request inactivity timeout, aka pm runtime
autosuspend timeout, the card will be suspended.

Once a new request arrives, the card will be re-initalized and
thus the first request will suffer from a latency. This latency
is card-specific, experiments has shown in general that SD-cards
has quite poor initialization time, around 300ms-1100ms. eMMC is
not surprisingly far better but still a couple of hundreds of ms
has been observed.

Except for the request latency, it is important to know that
suspending the card will also prevent the card from executing
internal house-keeping operations in idle mode. This could mean
degradation in performance.

To use this feature make sure the request inactivity timeout is
chosen carefully. This has not been done as a part of this patch.

Enable this feature by using host cap MMC_CAP_AGGRESSIVE_PM and
by setting CONFIG_MMC_UNSAFE_RESUME.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.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>
10 years agommc: core: Add bus_ops for runtime pm callbacks
Ulf Hansson [Thu, 2 May 2013 12:02:37 +0000 (14:02 +0200)]
mmc: core: Add bus_ops for runtime pm callbacks

SDIO is the only protocol that uses runtime pm for the card device
right now. To provide the option for sd and mmc to use runtime pm as
well the bus_ops callback are extended with two new functions. One for
runtime_suspend and one for runtime_resume.

This patch will also implement the callbacks for SDIO to make sure
existing functionality is maintained. It also prepares to move
away from using the mmc_power_restore_host API, since it is not
needed when using runtime PM.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: core: Stop bkops for eMMC only from mmc suspend
Ulf Hansson [Thu, 2 May 2013 12:02:36 +0000 (14:02 +0200)]
mmc: core: Stop bkops for eMMC only from mmc suspend

Move mmc suspend specific operations to be executed from the .suspend
callback in the mmc bus_ops. This simplifies the mmc_suspend_host
function which is supposed to handle nothing but common suspend tasks.

Since eMMC can be considered non-removable there are no need to check
for ongoing bkops at PM_SUSPEND_PREPARE notification so remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
10 years agommc: card: Adding support for sanitize in eMMC 4.5
Maya Erez [Thu, 18 Apr 2013 12:41:55 +0000 (15:41 +0300)]
mmc: card: Adding support for sanitize in eMMC 4.5

The sanitize support is added as a user-app ioctl call, and
was removed from the block-device request, since its purpose is
to be invoked not via File-System but by a user.

This feature deletes the unmap memory region of the eMMC card,
by writing to a specific register in the EXT_CSD.

unmap region is the memory region that was previously deleted
(by erase, trim or discard operation).

In order to avoid timeout when sanitizing large-scale cards,
the timeout for sanitize operation is 240 seconds.

Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/card/block.c

10 years agommc: core: Re-use code for MMC_CAP2_DETECT_ON_ERR in polling mode
Ulf Hansson [Thu, 18 Apr 2013 09:02:07 +0000 (11:02 +0200)]
mmc: core: Re-use code for MMC_CAP2_DETECT_ON_ERR in polling mode

Previously the MMC_CAP2_DETECT_ON_ERR was invented for detecting
slow card removal. In was never a realy good solution and a proper
fix has been merged using gpio debouncing instead. We remove this
cap in this patch.

Although when using polling card detect mode, the code invented for
MMC_CAP2_DETECT_ON_ERR is re-used to complete card removal in an
earlier phase. There are no need waiting for the polling timeout to
elapse in this case.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
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>
10 years agosupport 3188 vmac
hwg [Fri, 7 Mar 2014 01:12:45 +0000 (09:12 +0800)]
support 3188 vmac

10 years agoupload vcodec (vpu and hevc) service driver
ljf [Thu, 6 Mar 2014 12:27:30 +0000 (20:27 +0800)]
upload vcodec (vpu and hevc) service driver

10 years agoupload iep driver for linux kernel 3.10
ljf [Thu, 6 Mar 2014 12:14:38 +0000 (20:14 +0800)]
upload iep driver for linux kernel 3.10

10 years agofix rga copy DMA_buf error
zsq [Thu, 6 Mar 2014 09:54:57 +0000 (17:54 +0800)]
fix rga copy DMA_buf error

10 years agorga2 on rk3288 FPGA is valid
zsq [Thu, 6 Mar 2014 09:35:38 +0000 (17:35 +0800)]
rga2 on rk3288 FPGA is valid

10 years agoSDMMC: complete submission rk_sdmmc debug function
xbw [Thu, 6 Mar 2014 09:26:40 +0000 (17:26 +0800)]
SDMMC: complete submission rk_sdmmc debug function

10 years agork3188 tp: ct365
zyk [Thu, 6 Mar 2014 08:13:08 +0000 (16:13 +0800)]
rk3188 tp: ct365

10 years agoHDMI: add dt node at rk3288.dtsi and add HDMI config
zwl [Thu, 6 Mar 2014 06:22:03 +0000 (14:22 +0800)]
HDMI: add dt node at rk3288.dtsi and add HDMI config

10 years agoUSB: change FSG_BUFLEN from 16KB to 64KB in order to increase copy-speed
wlf [Thu, 6 Mar 2014 06:06:01 +0000 (14:06 +0800)]
USB: change FSG_BUFLEN from 16KB to 64KB in order to increase copy-speed

10 years agoUSB: support development tool to do reboot loader
wlf [Thu, 6 Mar 2014 06:00:21 +0000 (14:00 +0800)]
USB: support development tool to do reboot loader

10 years agoHDMI: implement function at rk3288_hdmi.c and fix some code error
zwl [Thu, 6 Mar 2014 03:57:41 +0000 (11:57 +0800)]
HDMI: implement function at rk3288_hdmi.c and fix some code error

10 years agoporting tp ct36x to linux3.10
yxj [Thu, 6 Mar 2014 01:34:09 +0000 (09:34 +0800)]
porting tp ct36x to linux3.10

10 years agork32 edp:add bist/hw link traing support
yxj [Wed, 26 Feb 2014 07:12:23 +0000 (15:12 +0800)]
rk32 edp:add bist/hw link traing support

10 years agodts: rk3188-lrl097: pwm backlight fix
yxj [Wed, 26 Feb 2014 03:04:34 +0000 (11:04 +0800)]
dts: rk3188-lrl097: pwm backlight fix

10 years agoedp anx6345: add dpcd&edid read support
yxj [Wed, 26 Feb 2014 03:03:21 +0000 (11:03 +0800)]
edp anx6345: add dpcd&edid read support

10 years agork: ion: to view the CMA heap debug information through bitmap
CMY [Thu, 6 Mar 2014 03:04:50 +0000 (11:04 +0800)]
rk: ion: to view the CMA heap debug information through bitmap

10 years agoaudio codec : add support compile all audio codec (omission rt5631)
qjb [Thu, 6 Mar 2014 03:01:23 +0000 (11:01 +0800)]
audio codec : add support compile all audio codec (omission rt5631)

10 years agoaudio codec : add support compile all audio codec
qjb [Thu, 6 Mar 2014 02:57:14 +0000 (10:57 +0800)]
audio codec : add support compile all audio codec

10 years agoAudio: add codec-of-node and cpu-of-node, delete CODEC_NAME_CMP, codec-name, cpu...
陈金泉 [Thu, 6 Mar 2014 02:48:47 +0000 (10:48 +0800)]
Audio: add codec-of-node and cpu-of-node, delete CODEC_NAME_CMP, codec-name, cpu-dai-name

10 years agodel rga disable status
zsq [Wed, 5 Mar 2014 11:51:37 +0000 (19:51 +0800)]
del rga disable status

10 years agodts: add mshc@rk3288.dtsi
lintao [Thu, 6 Mar 2014 00:30:51 +0000 (08:30 +0800)]
dts: add mshc@rk3288.dtsi

10 years agofix sensors include file err
guoyi [Wed, 5 Mar 2014 07:33:25 +0000 (15:33 +0800)]
fix sensors include file err

10 years agoporting sensor-dev to 3.10
guoyi [Wed, 5 Mar 2014 07:32:13 +0000 (15:32 +0800)]
porting sensor-dev to 3.10

10 years agoSDMMC: complete submission for IDMA. With reading and writing to verify IDMA, no...
xbw [Wed, 5 Mar 2014 09:53:16 +0000 (17:53 +0800)]
SDMMC: complete submission for IDMA. With reading and writing to verify IDMA, no exception occurs.

10 years agoSDMMC: define the debug log
xbw [Wed, 5 Mar 2014 09:33:38 +0000 (17:33 +0800)]
SDMMC: define the debug log

10 years agoSDMMC: set the init-clock to 200Khz.
xbw [Wed, 5 Mar 2014 09:31:37 +0000 (17:31 +0800)]
SDMMC: set the init-clock to 200Khz.

10 years agoadd rga support for dma buf
zsq [Wed, 5 Mar 2014 09:43:31 +0000 (17:43 +0800)]
add rga support for dma buf

10 years agofix rga 3288 dts interp error
zsq [Wed, 5 Mar 2014 09:32:07 +0000 (17:32 +0800)]
fix rga 3288 dts interp error

10 years agoupdate i2s spdif dts
qjb [Wed, 5 Mar 2014 09:23:49 +0000 (17:23 +0800)]
update i2s spdif dts

10 years agosound soc-core:codec_name not adapted i2c_name
qjb [Wed, 5 Mar 2014 08:42:52 +0000 (16:42 +0800)]
sound soc-core:codec_name not adapted i2c_name
change i2s id

10 years agoUSB: add gadget_connected and fsg.luns[1] for usb gadget
wlf [Wed, 5 Mar 2014 07:48:45 +0000 (15:48 +0800)]
USB: add gadget_connected and fsg.luns[1] for usb gadget

10 years agokey: add rk_send_wakeup_key function
wdc [Wed, 5 Mar 2014 06:07:16 +0000 (14:07 +0800)]
key: add rk_send_wakeup_key function

10 years agoSDMMC: guarantee stop-abort cmd in data errors
xbw [Wed, 5 Mar 2014 05:55:14 +0000 (13:55 +0800)]
SDMMC: guarantee stop-abort cmd in data errors
In error cases, DTO interrupt may or may not be generated depending
    on remained data. Stop/Abort command ensures DTO generation for that
    situation. Currently if 'stop' field of data is empty, there is no
    stop/abort command. So, it could hang waiting DTO. This change
    reinforces these cases.

10 years agoSDMMC: fix error handling on response error
xbw [Wed, 5 Mar 2014 03:08:13 +0000 (11:08 +0800)]
SDMMC: fix error handling on response error
ven if response error is detected in case data command, data transfer
    is continued. It means that data can live in FIFO. Current handling
    just breaks out the request when seeing the command error. This causes
    kernel panic in dw_mci_read_data_pio() [host->data = NULL]. And also,
    FIFO should be guaranteed to be empty.

    Unable to handle kernel NULL pointer dereference at virtual address 00000018
    <...>
    [<c02af814>] (dw_mci_read_data_pio+0x68/0x198) from [<c02b04b4>] (dw_mci_interrupt+0x374/0x3a0)
    [<c02b04b4>] (dw_mci_interrupt+0x374/0x3a0) from [<c006b094>] (handle_irq_event_percpu+0x50/0x194)
    [<c006b094>] (handle_irq_event_percpu+0x50/0x194) from [<c006b214>] (handle_irq_event+0x3c/0x5c)
    [<c006b214>] (handle_irq_event+0x3c/0x5c) from [<c006de1c>] (handle_fasteoi_irq+0xa4/0x148)
    [<c006de1c>] (handle_fasteoi_irq+0xa4/0x148) from [<c006aa88>] (generic_handle_irq+0x20/0x30)
    [<c006aa88>] (generic_handle_irq+0x20/0x30) from [<c000f154>] (handle_IRQ+0x38/0x90)
    [<c000f154>] (handle_IRQ+0x38/0x90) from [<c00085bc>] (gic_handle_irq+0x34/0x68)
    [<c00085bc>] (gic_handle_irq+0x34/0x68) from [<c0011f40>] (__irq_svc+0x40/0x70)
    Exception stack(0xef0b1c00 to 0xef0b1c48)
    1c00: 000eb0cf ffffffff 00001300 c01a7738 ef295e10 0000000a c04df298 ef0b1dc0
    1c20: ef295ec0 00000000 00000000 00000006 00000000 ef0b1c48 c02b1274 c01a7764
    1c40: 20000113 ffffffff
    [<c0011f40>] (__irq_svc+0x40/0x70) from [<c01a7764>] (__loop_delay+0x0/0xc)
    Code: e1a00005 e0891006 e0662004 e12fff33 (e59a3018)
    ---[ end trace a7043b9ba9aed1db ]---
    Kernel panic - not syncing: Fatal exception in interrupt

10 years agowifi: extend power up waiting time.
gwl [Wed, 5 Mar 2014 02:08:56 +0000 (10:08 +0800)]
wifi: extend power up waiting time.

10 years ago3288: i2c & adc dts update
wdc [Wed, 5 Mar 2014 01:40:47 +0000 (09:40 +0800)]
3288: i2c & adc dts update

10 years agoUSB: add otg irq detect function and chip id detect function
wlf [Wed, 5 Mar 2014 01:40:45 +0000 (09:40 +0800)]
USB: add otg irq detect function and chip id detect function

10 years agoHDMI: add rk3288 hdmi register defined
zwl [Wed, 5 Mar 2014 00:51:21 +0000 (08:51 +0800)]
HDMI: add rk3288 hdmi register defined

10 years agoSDMMC: use slot-gpio to handle cd pin
xbw [Tue, 4 Mar 2014 13:47:48 +0000 (21:47 +0800)]
SDMMC: use slot-gpio to handle cd pin

10 years agofix rga driver crash bug
zsq [Tue, 4 Mar 2014 13:06:53 +0000 (21:06 +0800)]
fix rga driver crash bug