Commit Graph

2092 Commits

Author SHA1 Message Date
xbw
3a52ad0c5f SDMMC-RK31XX:
Eliminate the problem of card as unidentified during the open-device or insert-removal in suspend-resume.
2013-02-21 19:09:29 +08:00
xbw
3c48a4ad61 SDMMC:
add the function to adjust Io-voltage according to specific projects.
2013-01-29 17:16:17 +08:00
xbw
aa983c08c4 SDMMC: Eliminate some small flaws after supporting new iomux-API. 2013-01-23 14:36:21 +08:00
xbw
872f197c55 SDMMC:
1.Compatible with the new interface function of IOMUX-API
2.Eliminate the intererupt-card-det cause the wakeup.
2013-01-22 17:54:47 +08:00
黄涛
b77e0e8463 Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0
Conflicts:
	Makefile
2012-12-12 17:18:39 +08:00
Jaehoon Chung
49a66fd844 mmc: sdhci-s3c: fix the wrong number of max bus clocks
commit 5feb54a1ab upstream.

We can use up to four bus-clocks; but on module remove, we didn't
disable the fourth bus clock.

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>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03 12:59:16 -08:00
hj
64a1ccaaec rk292x (v86 & tr726) :add sd-vcc control while sd hw initial 2012-11-28 11:45:11 +08:00
xbw
dac9df953e Unified version of the file board-xxx-sdmmc.c 2012-11-27 18:36:19 +08:00
xbw
580b5d37a7 SDMMC:
1. When CMD_TIMEOUT or DTO_TIMEOUT occur again, directly stop card to be used, rather than to printe error log always.
   In the case, you will see log ( I am very sorry to tell you,in order to make the machine correctly,you must remove-insert card again.)

2.Increase processing not detect-pin for card in your project. then you have to define detect_irq as INVALID_GPIO in your board_xxxx.c
  because there is not detect-pin in some project.
2012-10-12 15:54:19 +08:00
黄涛
21158e22d9 Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0
Conflicts:
	Makefile
	drivers/mmc/core/sd.c
	drivers/net/usb/asix.c
	drivers/net/wireless/ath/ath9k/recv.c
	drivers/net/wireless/b43legacy/main.c
	drivers/net/wireless/p54/p54usb.c
	drivers/net/wireless/rt2x00/rt2400pci.c
	drivers/net/wireless/rt2x00/rt2400pci.h
	drivers/net/wireless/rt2x00/rt2500pci.c
	drivers/net/wireless/rt2x00/rt2500usb.c
	drivers/net/wireless/rt2x00/rt2500usb.h
	drivers/net/wireless/rt2x00/rt2800pci.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/rt2x00/rt61pci.c
	drivers/net/wireless/rt2x00/rt61pci.h
	drivers/net/wireless/rt2x00/rt73usb.c
	drivers/net/wireless/rt2x00/rt73usb.h
	drivers/net/wireless/rtl818x/rtl8187/dev.c
	drivers/usb/serial/option.c
	kernel/time/timekeeping.c
2012-10-08 10:28:29 +08:00
xbw
d7c5f602ee SDMMC: improve the function of detect-card by gpio-interrput. 2012-10-07 17:37:44 +08:00
Al Cooper
cfa379de3f mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
commit 4188bba0e9 upstream.

The driver should not try to switch to 1.8V when the SD 3.0 host
controller does not have any UHS capabilities bits set (SDR50, DDR50
or SDR104). See page 72 of "SD Specifications Part A2 SD Host
Controller Simplified Specification Version 3.00" under
"1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host
capabilities data structure for all V3.0 host controllers, only set them
if SDR104, SDR50 or DDR50 is set in the host capabilities register. This
will prevent the switch to 1.8V later.

Signed-off-by: Al Cooper <acooper@gmail.com>
Acked-by: Arindam Nath <arindam.nath@amd.com>
Acked-by: Philip Rakity <prakity@marvell.com>
Acked-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 09:47:54 -07:00
Subhash Jadavani
09e4ad5aa6 mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed mode
commit f2815f68da upstream.

Here is Essential conditions to indicate Version 3.00 Card
(SD_SPEC=2 and SD_SPEC3=1) :
(1) The card shall support CMD6
(2) The card shall support CMD8
(3) The card shall support CMD42
(4) User area capacity shall be up to 2GB (SDSC) or 32GB (SDHC)
    User area capacity shall be more than or equal to 32GB and
    up to 2TB (SDXC)
(5) Speed Class shall be supported (SDHC or SDXC)

So even if SD card doesn't support any of the newly defined
UHS-I bus speed mode, it can advertise itself as SD3.0 cards
as long as it supports all the essential conditions of
SD3.0 cards. Given this, these type of cards should atleast
run in High Speed mode @50MHZ if it supports HS.

But current initialization sequence for SD3.0 cards is
such that these non-UHS-I SD3.0 cards runs in Default
Speed mode @25MHz.

This patch makes sure that these non-UHS-I SD3.0 cards run
in High Speed Mode @50MHz.

Tested this patch with SanDisk Extreme SDHC 8GB Class 10 card.

Reported-by: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-10-02 09:47:54 -07:00
Shawn Guo
0afe881364 mmc: sdhci-esdhc: break out early if clock is 0
commit 74f330bcea upstream.

Since commit 30832ab56 ("mmc: sdhci: Always pass clock request value
zero to set_clock host op") was merged, esdhc_set_clock starts hitting
"if (clock == 0)" where ESDHC_SYSTEM_CONTROL has been operated.  This
causes SDHCI card-detection function being broken.  Fix the regression
by moving "if (clock == 0)" above ESDHC_SYSTEM_CONTROL operation.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 09:47:24 -07:00
Lauri Hintsala
2df2bfdbb4 mmc: mxs-mmc: fix deadlock in SDIO IRQ case
commit 1af36b2a99 upstream.

Release the lock before mmc_signal_sdio_irq is called by mxs_mmc_irq_handler.

Backtrace:
[   79.660000] =============================================
[   79.660000] [ INFO: possible recursive locking detected ]
[   79.660000] 3.4.0-00009-g3e96082-dirty #11 Not tainted
[   79.660000] ---------------------------------------------
[   79.660000] swapper/0 is trying to acquire lock:
[   79.660000]  (&(&host->lock)->rlock#2){-.....}, at: [<c026ea3c>] mxs_mmc_enable_sdio_irq+0x18/0xd4
[   79.660000]
[   79.660000] but task is already holding lock:
[   79.660000]  (&(&host->lock)->rlock#2){-.....}, at: [<c026f744>] mxs_mmc_irq_handler+0x1c/0xe8
[   79.660000]
[   79.660000] other info that might help us debug this:
[   79.660000]  Possible unsafe locking scenario:
[   79.660000]
[   79.660000]        CPU0
[   79.660000]        ----
[   79.660000]   lock(&(&host->lock)->rlock#2);
[   79.660000]   lock(&(&host->lock)->rlock#2);
[   79.660000]
[   79.660000]  *** DEADLOCK ***
[   79.660000]
[   79.660000]  May be due to missing lock nesting notation
[   79.660000]
[   79.660000] 1 lock held by swapper/0:
[   79.660000]  #0:  (&(&host->lock)->rlock#2){-.....}, at: [<c026f744>] mxs_mmc_irq_handler+0x1c/0xe8
[   79.660000]
[   79.660000] stack backtrace:
[   79.660000] [<c0014bd0>] (unwind_backtrace+0x0/0xf4) from [<c005f9c0>] (__lock_acquire+0x1948/0x1d48)
[   79.660000] [<c005f9c0>] (__lock_acquire+0x1948/0x1d48) from [<c005fea0>] (lock_acquire+0xe0/0xf8)
[   79.660000] [<c005fea0>] (lock_acquire+0xe0/0xf8) from [<c03a8460>] (_raw_spin_lock_irqsave+0x44/0x58)
[   79.660000] [<c03a8460>] (_raw_spin_lock_irqsave+0x44/0x58) from [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4)
[   79.660000] [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) from [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8)
[   79.660000] [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) from [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254)
[   79.660000] [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) from [<c006bff8>] (handle_irq_event+0x3c/0x5c)
[   79.660000] [<c006bff8>] (handle_irq_event+0x3c/0x5c) from [<c006e6d0>] (handle_level_irq+0x90/0x110)
[   79.660000] [<c006e6d0>] (handle_level_irq+0x90/0x110) from [<c006b930>] (generic_handle_irq+0x38/0x50)
[   79.660000] [<c006b930>] (generic_handle_irq+0x38/0x50) from [<c00102fc>] (handle_IRQ+0x30/0x84)
[   79.660000] [<c00102fc>] (handle_IRQ+0x30/0x84) from [<c000f058>] (__irq_svc+0x38/0x60)
[   79.660000] [<c000f058>] (__irq_svc+0x38/0x60) from [<c0010520>] (default_idle+0x2c/0x40)
[   79.660000] [<c0010520>] (default_idle+0x2c/0x40) from [<c0010a90>] (cpu_idle+0x64/0xcc)
[   79.660000] [<c0010a90>] (cpu_idle+0x64/0xcc) from [<c04ff858>] (start_kernel+0x244/0x2c8)
[   79.660000] BUG: spinlock lockup on CPU#0, swapper/0
[   79.660000]  lock: c398cb2c, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0
[   79.660000] [<c0014bd0>] (unwind_backtrace+0x0/0xf4) from [<c01ddb1c>] (do_raw_spin_lock+0xf0/0x144)
[   79.660000] [<c01ddb1c>] (do_raw_spin_lock+0xf0/0x144) from [<c03a8468>] (_raw_spin_lock_irqsave+0x4c/0x58)
[   79.660000] [<c03a8468>] (_raw_spin_lock_irqsave+0x4c/0x58) from [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4)
[   79.660000] [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) from [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8)
[   79.660000] [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) from [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254)
[   79.660000] [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) from [<c006bff8>] (handle_irq_event+0x3c/0x5c)
[   79.660000] [<c006bff8>] (handle_irq_event+0x3c/0x5c) from [<c006e6d0>] (handle_level_irq+0x90/0x110)
[   79.660000] [<c006e6d0>] (handle_level_irq+0x90/0x110) from [<c006b930>] (generic_handle_irq+0x38/0x50)
[   79.660000] [<c006b930>] (generic_handle_irq+0x38/0x50) from [<c00102fc>] (handle_IRQ+0x30/0x84)
[   79.660000] [<c00102fc>] (handle_IRQ+0x30/0x84) from [<c000f058>] (__irq_svc+0x38/0x60)
[   79.660000] [<c000f058>] (__irq_svc+0x38/0x60) from [<c0010520>] (default_idle+0x2c/0x40)
[   79.660000] [<c0010520>] (default_idle+0x2c/0x40) from [<c0010a90>] (cpu_idle+0x64/0xcc)
[   79.660000] [<c0010a90>] (cpu_idle+0x64/0xcc) from [<c04ff858>] (start_kernel+0x244/0x2c8)

Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 09:47:24 -07:00
xbw
435b5d8927 SDMMC: fix the crash bug when error occur during suspend 2012-09-28 17:23:23 +08:00
黄涛
ed535bdcad Revert "phonepad: add rda5990 bt\wifi support"
This reverts commit 468fa60b79.

Conflicts:

	drivers/mmc/host/rk29_sdmmc.c
2012-09-28 09:53:55 +08:00
xbw
9ab32ee1a1 SDMMC:use gpio-interrupt to detect card.
Please attention to define the detect-pin name and the insert-card voltage in your board_xxxx.c.
2012-09-27 21:23:07 +08:00
linjh
468fa60b79 phonepad: add rda5990 bt\wifi support
[reference file]

	modified:
		arch/arm/mach-rk2928/board-rk2928-sdk-sdmmc.c
		drivers/bluetooth/hci_ldisc.c
		drivers/mmc/host/rk29_sdmmc.c
		net/bluetooth/hci_core.c
2012-09-27 18:04:00 +08:00
xbw
d839e18f17 SDMMC: modify the sd-disk-filesystem crash due to sg-buf 2012-09-26 20:57:33 +08:00
xbw
cb0fc6dd74 SDMMC: improve the process of request ,about the CMD or DTO timeout 2012-09-11 17:39:57 +08:00
kfx
961a9de7d3 rk2928: set sdio max clk: 25Mhz 2012-08-23 17:49:07 +08:00
黄涛
4d93acfd39 rk3066b: rename rk31 to rk3066b 2012-08-22 21:21:56 +08:00
黄涛
0a3b24f10d Merge remote-tracking branch 'origin/develop-3.0-jb' into develop-3.0 2012-08-21 19:55:23 +08:00
xbw
533b210c31 sdmmc: In order to improve the timing,set HOLD_REG to 1,mainly used in RK2928 and RK31. 2012-08-21 18:17:08 +08:00