[PATCH 07/12] mmc: sdhci: add data structure for SD4.0

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn add SD4.0 register define and host data structure for handshake with SD4.0 card. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/host/sdhci.h | 136

[PATCH 09/12] mmc: sdhci: add tlp handler for SD4.0

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn SD4.0 mode using tlp for cmd/data transfer, add tlp functions to handle this case. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/host/sdhci.c | 244

[PATCH 05/12] mmc: core: disable full power cycle for SD4.0

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn We should not do power cycle when card is in SD4.0 mode, if we power off, we should detect UHSII interface again. so we can disable it when card is in UHSII mode. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang

[PATCH 08/12] mmc: sdhci: add SD4.0 operations

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn SD4.0 operations include UHSII interface detect, go/exit dormant and uhsii ios settings. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/host/sdhci.c | 183

[PATCH 03/12] mmc: core: add SD4.0 operation function

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn SD4.0 add some new operations, which include follows: UHSII interface detect: when UHSII interface is detected, the power is up. go/exit dormant: enter or exit dormant state. device init: device init CCMD. enumerate: enumerate CCMD. config space

[PATCH 02/12] mmc: core: modify mmc_app_cmd interface for SD4.0

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn When card running in SD4.0 mode, ACMD is not need to send two command, we only need to mark a flag for the CMD which is to be send. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn ---

[PATCH 04/12] mmc: core: add tlp request handler for SD4.0

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn when card is work in SD4.0 mode, we should send tlp instead of cmd. add this function to handle tlp request. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/core/core.c | 111

[PATCH 06/12] mmc: core: init SD4.0 mode before legacy mode

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn We alloc card before init card, if init UHSII mode failed, then try to init legacy mode. Since we card is allocated before do init operations, so mmc/sdio card init should do some modify. To reduce many diff hunks, the old labels are reserved(we can

[PATCH 00/12] mmc: core: add SD4.0 support

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for SD4.0 card, which introduce UHSII mode and tlp transfer. Micky Ching (12): mmc: core: add data structure define for SD4.0 mmc: core: modify mmc_app_cmd interface for SD4.0 mmc: core: add SD4.0 operation function mmc: core: add

[PATCH 11/12] mmc: sdhci: set DMA configure for SD4.0 mode

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn SD4.0 mode not using SDMA any more, and UHSII mode using different register to specify block size/count. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/host/sdhci.c | 22

[PATCH 12/12] mmc: sdhci: add SD4.0 support

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for SD4.0 card. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/host/sdhci.c | 108 --- 1 file changed, 102 insertions(+), 6

[PATCH 10/12] mmc: sdhci: disable clock control for SD4.0 mode

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Skip clock control settings for UHSII mode. When card is in UHSII mode, we only allow poweroff. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Signed-off-by: Wei Wang wei_w...@realsil.com.cn --- drivers/mmc/host/sdhci.c | 22

[PATCH 01/12] mmc: core: add data structure define for SD4.0

2015-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new data structure for SD4.0 including follows: register: SD4.0 IO space register define. protocol: host and card handshake data. tlp: tlp request data structure for SD4.0 mode. uhsii ios: UHSII bus control data structure. Signed-off-by: Micky

[PATCH] sdhci: rtsx: fix 64 BIT DMA quirks

2015-04-06 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn rts5250 chip failed handle 64 bit ADMA for address below 4G. Add 64 BIT quirks to disable this feature. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/sdhci-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 0/2] mmc: rtsx: add check before sending request

2015-01-13 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add check before sending request can make request return faster. - finish request if no card exist This can make request finish faster, especial for some sdio card, when card removed, there still a lot of command pending, if we check card exist

[PATCH 1/2] mmc: rtsx: finish request if no card exist

2015-01-13 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Return error-code directly if no card exist, this can make card remove faster. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] mmc: rtsx: check sg_count before long data xfer

2015-01-13 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Check sg_count before sending long data xfer. Because dma_map_sg() return int, and sg_count may be negative, so using int instead of unsigned. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 11

[PATCH v5 1/6] mfd: rtsx: add func to split u32 into register

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Acked-by: Lee Jones lee.jo...@linaro.org ---

[PATCH v5 6/6] mmc: rtsx: swap function position to avoid pre declaration

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn move function sd_read_data()/sd_write_data() behind sd_send_cmd_get_rsp() to avoid pre-declaration. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 203 +++--- 1 file

[PATCH v5 2/6] mmc: rtsx: add dump_reg_range to simplify dump register

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add a new function to dump register within a range. We print 1 register a line before this patch, this may make debug info too long when we add more register to dump. The new dump_reg_range() dump to 8 register a line, and it is easy to use.

[PATCH v5 4/6] mmc: rtsx: add helper function to simplify code

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn To support sdio card, transfer mode need make a change, this need to split code and use it in different place, Add new function to simplify repeat operation. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c

[PATCH v5 3/6] mmc: rtsx: init cookie at probe/card_event

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn host-cookie is used for handle async request, we should init it to negative value when new card inserted, make cookie value invalid. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++ 1 file changed, 2

[PATCH v5 0/6] mmc: rtsx: add support for sdio card

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn v5: fix patch(5) building error, no code change diff v4. v4: split patch in more detailed patches. no code changes diff v3. v3: rtsx_pci_sdmmc.c: - dump_reg_range - remove unused pointer check - fix start index v2: rtsx_pci.h:

[PATCH v5 5/6] mmc: rtsx: add support for sdio card

2014-12-22 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Modify transfer mode for support sdio card, send cmd and data at the same time for read data transfer, but send data after cmd for write data transfer. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 234

[PATCH v4 0/6] mmc: rtsx: add support for sdio card

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn v4: split patch in more detailed patches. no code changes diff v3. v3: rtsx_pci_sdmmc.c: - dump_reg_range - remove unused pointer check - fix start index v2: rtsx_pci.h: - remove unused rtsx_pci_write_le32 - add

[PATCH v4 5/6] mmc: rtsx: add support for sdio card

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Modify transfer mode for support sdio card, send cmd and data at the same time for read data transfer, but send data after cmd for write data transfer. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 231

[PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Acked-by: Lee Jones lee.jo...@linaro.org ---

[PATCH v4 4/6] mmc: rtsx: add helper function to simplify code

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn To support sdio card, transfer mode need make a change, this need to split code and use it in different place, Add new function to simplify repeat operation. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c

[PATCH v4 3/6] mmc: rtsx: init cookie at probe/card_event

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn host-cookie is used for handle async request, we should init it to negative value when new card inserted, make cookie value invalid. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++ 1 file changed, 2

[PATCH v4 6/6] mmc: rtsx: swap function position to avoid pre declaration

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn move function sd_read_data()/sd_write_data() behind sd_send_cmd_get_rsp() to avoid pre-declaration. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 200 +++--- 1 file

[PATCH v4 2/6] mmc: rtsx: add dump_reg_range to simplify dump register

2014-12-04 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add a new function to dump register within a range. We print 1 register a line before this patch, this may make debug info too long when we add more register to dump. The new dump_reg_range() dump to 8 register a line, and it is easy to use.

[PATCH v2 0/2] mmc: rtsx: add support for sdio card

2014-12-01 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn v3: rtsx_pci_sdmmc.c: - dump_reg_range - remove unused pointer check - fix start index v2: rtsx_pci.h: - remove unused rtsx_pci_write_le32 - add SD_CMD_START rtsx_pci_sdmmc.c: - dump_reg_range - alloc data on

[PATCH v2 2/2] mmc: rtsx: add support for sdio card

2014-12-01 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for sdio card by SD interface. The main change is data transfer mode, When read data, host wait data transfer while command start. When write data, host will start data transfer after command get response. The transfer mode modify can be

[PATCH v2 1/2] mfd: rtsx: add func to split u32 into register

2014-12-01 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn Acked-by: Lee Jones lee.jo...@linaro.org ---

[PATCH v2 1/2] mfd: rtsx: add func to split u32 into register

2014-11-27 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- include/linux/mfd/rtsx_pci.h | 9 + 1 file

[PATCH v2 0/2] mmc: rtsx: add support for sdio card

2014-11-27 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn v2: rtsx_pci.h: - remove unused rtsx_pci_write_le32 - add SD_CMD_START rtsx_pci_sdmmc.c: - dump_reg_range - alloc data on stack - remove forward declaration - use SD_CMD_START replace magic number 0x40 - move

[PATCH v2 2/2] mmc: rtsx: add support for sdio card

2014-11-27 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for sdio card by SD interface. The main change is data transfer mode, When read data, host wait data transfer while command start. When write data, host will start data transfer after command get response. The transfer mode modify can be

[PATCH 1/2] mfd: rtsx: add func to split u32 into register

2014-11-26 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- include/linux/mfd/rtsx_pci.h | 15 +++ 1

[PATCH 2/2] mmc: rtsx: add support for sdio card

2014-11-26 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for sdio card by SD interface. The main change is data transfer mode, When read data, host wait data transfer while command start. When write data, host will start data transfer after command get response. The transfer mode modify can be

[PATCH 0/2] mmc: rtsx: add support for sdio card

2014-11-26 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn This patch is used to change transfer mode for sdio card support by SD interface. Micky Ching (2): mfd: rtsx: add func to split u32 into register mmc: rtsx: add support for sdio card drivers/mmc/host/rtsx_pci_sdmmc.c | 366

[PATCH] mmc: rtsx: add card power off during probe

2014-09-11 Thread micky_ching
From: Roger Tseng rogera...@realtek.com Some platform have both UEFI driver and MFD/mmc driver, if entering linux while card in the slot, the card power is already on, and rtsx-mmc driver have no chance to make card power off. This will lead UHSI card failed to enter UHSI mode. It is hard to

[PATCH 0/2] mmc: rtsx: add support for async request

2014-06-06 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for sd/mmc async request, which makes next request do dma_map_sg() while previous request transfering data. This behaviour can improve card io performance more than 10%. Since rtsx mfd driver only provide a single function for transfering

[PATCH 1/2] mfd: rtsx: add dma transfer function

2014-06-06 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn rtsx driver using a single function for transfer data, dma map/unmap are placed in one fix function. We need map/unmap dma in different place(for mmc async driver), so add three function for dma map, dma transfer and dma unmap. Signed-off-by: Micky

[PATCH 2/2] mmc: rtsx: add support for async request

2014-06-06 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for non-blocking request, pre_req() runs dma_map_sg() and post_req() runs dma_unmap_sg(). This patch can increase card read/write speed, especially for high speed card and slow speed CPU. Test on intel i3(800MHz - 2.3GHz) performance

[PATCH] mmc: rtsx: Revert mmc: rtsx: add support for pre_req and post_req

2014-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn This reverts commit c42deffd5b53c9e583d83c7964854ede2f12410d. commit mmc: rtsx: add support for pre_req and post_req did use mutex_unlock() in tasklet, but mutex_unlock() can't used in tasklet(atomic context). The driver need use mutex to avoid

[PATCH 0/2] mmc: rtsx: revert support for mmc async request

2014-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The commit mmc: rtsx: add support for pre_req and post_req have some problem, using mutex_unlock() in atomic context, spinlock deadlock, it is hard to fix these problem, and better to use a new method. So just remove it. The commit mmc: rtsx: modify

[PATCH 2/2] mmc: rtsx: Revert mmc: rtsx: add support for pre_req and post_req

2014-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn This reverts commit c42deffd5b53c9e583d83c7964854ede2f12410d. commit mmc: rtsx: add support for pre_req and post_req did use mutex_unlock() in tasklet, but mutex_unlock() can't used in tasklet(atomic context). The driver need use mutex to avoid

[PATCH 1/2] mmc: rtsx: Revert mmc: rtsx: modify error handle and remove smatch warnings

2014-04-28 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn This reverts commit 1f7b581b3ffcb2a8437397a02f4af89fa6934d08. The patch depend on commit c42deffd5b53c9e583d83c7964854ede2f12410d mmc: rtsx: add support for pre_req and post_req, but the previous patch was discard. So we have to delete the patch.

[PATCH] mmc: rtsx: fix possible circular locking dependency

2014-04-15 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn To avoid dead lock, we need make sure host-lock is always acquire before pcr-lock. But in irq handler, we acquired pcr-lock in rtsx mfd driver, and sd_isr_done_transfer() is called during pcr-lock already acquired. Since in sd_isr_done_transfer() the

[PATCH v2 1/2] mmc: rtsx: add R1-no-CRC mmc command type handle

2014-03-26 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn commit a27fbf2f067b0cd6f172c8b696b9a44c58bfaa7a mmc: add ignorance case for CMD13 CRC error produced a cmd.flags unhandled in realtek pci host driver. This will make MMC card failed initialize, this patch is used to handle the new cmd.flags condition

[PATCH v2 0/2] mmc: rtsx: add new cmd type handle and modify error handle

2014-03-26 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn v2: fix checkpatch warning. WARNING: Missing a blank line after declarations v1: Add new command type(R1 without CRC) handle, without this patch mmc card initialize will be failed. Using a more careful handle in request timeout, this would improve

[PATCH v2 2/2] mmc: rtsx: modify error handle and remove smatch warnings

2014-03-26 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Using non-DMA dump-regs, which would be more exactly for DMA transfer failed. More careful handle when cmd/data timeout, add stop(CMD12) cmd before go to finish request when multi-rw timeout. Remove some static checher warings. on commit: mmc: rtsx:

[PATCH 1/2] mmc: rtsx: add R1-no-CRC mmc command type handle

2014-03-25 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn commit a27fbf2f067b0cd6f172c8b696b9a44c58bfaa7a mmc: add ignorance case for CMD13 CRC error produced a cmd.flags unhandled in realtek pci host driver. This will make MMC card failed initialize, this patch is used to handle the new cmd.flags condition

[PATCH 2/2] mmc: rtsx: modify error handle and remove smatch warnings

2014-03-25 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Using non-DMA dump-regs, which would be more exactly for DMA transfer failed. More careful handle when cmd/data timeout, add stop(CMD12) cmd before go to finish request when multi-rw timeout. Remove some static checher warings. on commit: mmc: rtsx:

[PATCH 0/2] mmc: rtsx: add new cmd type handle and modify error handle

2014-03-25 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add new command type(R1 without CRC) handle, without this patch mmc card initialize will be failed. Using a more careful handle in request timeout, this would improve error recover capability. Debug info is printed using non DMA mode, this would help

[PATCH 1/2] mmc: rtsx: add R1-no-CRC mmc command type handle

2014-03-23 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn commit a27fbf2f067b0cd6f172c8b696b9a44c58bfaa7a mmc: add ignorance case for CMD13 CRC error produced a cmd.flags unhandled in realtek pci host driver. This will make MMC card failed initialize, this patch is used to handle the new cmd.flags condition

mmc: rtsx: add new cmd type handle and modify error handle

2014-03-23 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add new command type(R1 without CRC) handle, without this patch mmc card initialize will be failed. Using a more careful handle in request timeout, this would improve error recover capability. Debug info is printed using non DMA mode, this would help

[PATCH 2/2] mmc: rtsx: modify error handle and remove smatch warnings

2014-03-23 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Using non-DMA dump-regs, which would be more exactly for DMA transfer failed. More careful handle when cmd/data timeout, add stop(CMD12) cmd before go to finish request when multi-rw timeout. Remove some static checher warings. on commit: mmc: rtsx:

[PATCH 1/2] mmc: rtsx: add R1-no-CRC mmc command type handle

2014-03-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn commit a27fbf2f067b0cd6f172c8b696b9a44c58bfaa7a mmc: add ignorance case for CMD13 CRC error produced a cmd.flags unhandled in realtek pci host driver. This will make MMC card failed initialize, this patch is used to handle the new cmd.flags condition

[PATCH 0/2] add new cmd type handle and remove smatch warnings

2014-03-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add new command type(R1 without CRC) handle, without this patch mmc card initialize will be failed. Using a more careful handle in request timeout, and debug info is printed using non DMA mode. Smatch warning was removed. Micky Ching (2): mmc:

[PATCH 2/2] mmc: rtsx: modify error handle and remove smatch warnings

2014-03-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Using non-DMA dump-regs, which would be more exactly for DMA transfer failed. More careful handle when cmd/data timeout, add stop(CMD12) cmd before go to finish request when multi-rw timeout. Remove some static checher warings. on commit: mmc: rtsx:

[PATCH] mmc: sdhci: add support for realtek rts5250

2014-02-21 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for realtek rts5250 pci card reader. The card reader have some problem with DDR50 mode, so add a new quirks2 for broken ddr50. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/sdhci-pci.c | 20

[PATCH v2 2/3] mmc: rtsx: modify phase searching method for tuning

2014-02-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new phase searching method is more concise and easier to understand. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 112 +++-- include/linux/mfd/rtsx_pci.h |

[PATCH v2 1/3] mmc: rtsx: fix card poweroff bug

2014-02-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH v2 3/3] mmc: rtsx: add support for pre_req and post_req

2014-02-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for non-blocking request, pre_req() runs dma_map_sg() and post_req() runs dma_unmap_sg(). This patch can increase card read/write speed, especially for high speed card and slow CPU(for some embedded platform). Users can get a great benefit

[PATCH v2 0/3] mmc: rtsx: fix bug and support nonblocking request

2014-02-17 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn First we fix the card poweroff bug: the card power is not shutdown when sd/mmc card removed, this will make UHS-card failed to running in high speed mode if we insert the card again. We offer a concise tuning searching method, it is much easier to

[PATCH RESEND 0/3] mmc: rtsx: fix bug and support nonblocking request

2014-02-16 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn First we fix the card poweroff bug: the card power is not shutdown when sd/mmc card removed, this will make UHS-card failed to running in high speed mode if we insert the card again. We offer a concise tuning searching method, it is much easier to

[PATCH RESEND 3/3] mmc: rtsx: add support for pre_req and post_req

2014-02-16 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for non-blocking request, pre_req() runs dma_map_sg() and post_req() runs dma_unmap_sg(). This patch can increase card read/write speed, especially for high speed card and slow CPU(for some embedded platform). Users can get a great benefit

[PATCH RESEND 1/3] mmc: rtsx: fix card poweroff bug

2014-02-16 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH 2/3] mmc: rtsx: modify phase searching method for tuning

2014-01-08 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new phase searching method is more concise and easier to understand. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 112 +++-- include/linux/mfd/rtsx_pci.h |

[PATCH 1/3] mmc: rtsx: fix card poweroff bug

2014-01-08 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH 3/3] mmc: rtsx: add support for pre_req and post_req

2014-01-08 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn Add support for non-blocking request, pre_req() runs dma_map_sg() and post_req() runs dma_unmap_sg(). This patch can increase card read/write speed, especially for high speed card and slow CPU(for some embedded platform). Users can get a great benefit

[PATCH 0/3] mmc: rtsx: fix bug and support nonblocking request

2014-01-08 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn First we fix the card poweroff bug: the card power is not shutdown when sd/mmc card removed, this will make UHS-card failed to running in high speed mode if we insert the card again. We offer a concise tuning searching method, it is much easier to

[PATCH v3 0/2] fix sd power bug and modify phase-searching method

2013-12-02 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the driver removed while sd card still in the slot, the card power will not power down correctly, if we insert the driver module again, UHS card will not switch to UHS mode. This bug is fix in this patch. We use another phase search method for

[PATCH v3 2/2] mmc: rtsx: modify phase searching method for tuning

2013-12-02 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new phase searching method is more concise and easier to understand. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 112 +++-- include/linux/mfd/rtsx_pci.h |

[PATCH v3 1/2] mmc: rtsx: fix card poweroff bug

2013-12-02 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH v2 2/2] mmc: rtsx: modify phase searching method for tunning

2013-11-20 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new phase searching method is more concise and easier to understand. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 112 +++-- include/linux/mfd/rtsx_pci.h |

[PATCH v2 1/2] mmc: rtsx: fix card poweroff bug

2013-11-20 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH v2 0/2] fix sd power bug and modify phase-searching method

2013-11-20 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the driver removed while sd/mmc card still in the slot, the card power will not power down correctly, if we insert the driver module again, UHS card will not switch to UHS mode. This bug is fixed in this patch. We use another phase search method

[PATCH 1/2] mmc: rtsx: fix card poweroff bug

2013-11-19 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH 2/2] mmc: rtsx: modify phase searching method for tunning

2013-11-19 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new phase searching method is more concise and easier to understand. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 108 +++-- 1 file changed, 30 insertions(+), 78

[PATCH 0/2] fix sd power bug and modify phase-searching method

2013-11-19 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the driver removed while sd card still in the slot, the card power will not power down correctly, if we insert the driver module again, UHS card will not switch to UHS mode. This bug is fix in this patch. We use another phase search method for

[PATCH] mmc: rtsx: fix card poweroff bug

2013-10-16 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by:

[PATCH] mmc: rtsx: change phase searching method

2013-09-02 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn The new phase searching method is more concise, and makes the code easier to understand. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mmc/host/rtsx_pci_sdmmc.c | 107 +++-- 1 file changed, 30