10 Nov, 2014

1 commit


26 Sep, 2014

1 commit

  • pci_enable_msi() can return failure with both positive and negative
    integers -- it returns 0 for success -- but is only tested here for
    "if (ret < 0)". This causes us to try to use MSI on the RTS5249 SD
    reader in the Dell XPS 11 when enabling MSI failed, causing:

    [ 1.737110] rtsx_pci: probe of 0000:05:00.0 failed with error -110

    Cc: stable
    Reported-by: D. Jared Dominguez
    Tested-by: D. Jared Dominguez
    Signed-off-by: Chris Ball
    Signed-off-by: Lee Jones

    Chris Ball
     

09 Jul, 2014

1 commit

  • 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 Ching
    Signed-off-by: Lee Jones

    Micky Ching
     

08 May, 2014

1 commit

  • This reverts commit c42deffd5b53c9e583d83c7964854ede2f12410d.

    commit did use
    mutex_unlock() in tasklet, but mutex_unlock() can't be used in
    tasklet(atomic context). The driver needs to use mutex to avoid
    concurrency, so we can't use tasklet here, the patch need to be
    removed.

    The spinlock host->lock and pcr->lock may deadlock, one way to solve
    the deadlock is remove host->lock in sd_isr_done_transfer(), but if
    using workqueue the we can avoid using the spinlock and also avoid
    the problem.

    Signed-off-by: Micky Ching
    Acked-by: Ulf Hansson
    Signed-off-by: Lee Jones

    Micky Ching
     

23 Feb, 2014

1 commit

  • 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 from this patch. if CPU frequency is 800MHz,
    SDR104 or DDR50 card read/write speed may increase more than 15%.

    test results:
    intel i3(800MHz - 2.3GHz), SD card clock 208MHz

    performance mode(2.3GHz):
    Before:
    dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
    67108864 bytes (67 MB) copied, 1.18191 s, 56.8 MB/s
    After:
    dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
    67108864 bytes (67 MB) copied, 1.09276 s, 61.4 MB/s

    powersave mode(800MHz):
    Before:
    dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
    67108864 bytes (67 MB) copied, 1.29569 s, 51.8 MB/s
    After:
    dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
    67108864 bytes (67 MB) copied, 1.11218 s, 60.3 MB/s

    Signed-off-by: Micky Ching
    Signed-off-by: Chris Ball

    Micky Ching
     

22 Jan, 2014

1 commit

  • Pull MFD changes from Lee Jones:
    "New drivers
    - Samsung Maxim 14577; Micro USB, Regulator, IRQ Controller and
    Battery Charger
    - TI/National Semiconductor LP3943 I2C GPIO Expander and PWM
    Generator

    Existing driver adaptions
    - Expansion of Wolfson Arizona DSP and High-Pass filter controls
    - TI TWL6040 default Regmap support and Regcache addition/bypass
    - Some nice Smatch catch fixes
    - Conversion of TI OMAP-USB and TI TWL6030 to endian neutralness
    - ChromeOS EC timing (delay) adaptions and added dependency on OF
    - Many constifications of 'struct {mfd_cell,regmap_irq,et.al}'
    - Watchdog support added for NVIDIA AS3722
    - Convert functions to static in TI AM335x
    - Realigned previously defeated functionality in TI AM335x
    - IIO ADC-TSC concurrency dead-lock/timeout resolution
    - Addition of Power Management and Clock support for Samsung core
    - DEFINE_PCI_DEVICE_TABLE macro removal from MFD Subsystem
    - Greater use of irqdomain functionality in ST-E AB8500
    - Removal of 'include/linux/mfd/abx500/ab8500-gpio.h'
    - Wolfson WM831x PMIC Power Management changes s/poweroff/shutdown/
    - Device Tree documentation added for TI/Nat Semi LP3943
    - Version detection and voltage tables for TI TPS6586x PMIC devices
    - Simplification of Freescale MC13XXX (de-)initialisation routines
    - Clean-up and simplification of the Realtek parent driver
    - Added support for RTL8402 Realtek PCI-Express card reader
    - Resource leak fix for Maxim 77686
    - Possible suspend BUG() fix in OMAP USB TLL
    - Support for new Wolfson WM5110 Revision (D)
    - Testing of automatic assignment of of_node in mfd_add_device()
    - Reversion of the above when it started to cause issues
    - Remove legacy Platform Data from;
    TI TWL Core, Qualcomm SSBI and ST-E ABx500 Pinctrl
    - Clean-ups; tabbing issues, function name changes, 'drvdata = NULL'
    removal, unused uninitialised warning mitigation, error
    message clarity, removal of redundant/duplicate checks,
    licensing (GPL -> GPL2), coding consistency, duplicate
    function declaration, ret checks, commit corrections,
    redundant of_match_ptr() helper removal, spelling,
    #if-deffery removal and header guards name changes"

    * tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd: (78 commits)
    mfd: wm5110: Add register patch for rev D chip
    mfd: omap-usb-tll: Don't hold lock during pm_runtime_get/put_sync()
    gpio: lp3943: Remove redundant of_match_ptr helper
    mfd: sta2x11-mfd: Use named constants for pci_power_t values
    Documentation: mfd: Fix LDO index in s2mps11.txt
    mfd: Cleanup mfd-mcp-sa11x0.h header
    mfd: max8997: Use "IS_ENABLED(CONFIG_OF)" for DT code.
    mfd: twl6030: Fix endianness problem in IRQ handler
    mfd: sec-core: Add cells for S5M8767-clocks
    mfd: max14577: Remove redundant of_match_ptr helper
    mfd: twl6040: Fix sparse non static symbol warning
    mfd: Revert "mfd: Always assign of_node in mfd_add_device()"
    mfd: rtsx: Fix sparse non static symbol warning
    mfd: max77693: Set proper maximum register for MUIC regmap
    mfd: max77686: Fix regmap resource leak on driver remove
    mfd: Represent correct filenames in file headers
    mfd: rtsx: Add support for card reader rtl8402
    mfd: rtsx: Add set pull control macro and simplify rtl8411
    mfd: max8997: Enforce mfd_add_devices() return value check
    mfd: mc13xxx: Simplify probe() & remove()
    ...

    Linus Torvalds
     

21 Jan, 2014

2 commits


10 Dec, 2013

1 commit


23 Oct, 2013

1 commit


20 Aug, 2013

5 commits


12 Jun, 2013

1 commit


20 Apr, 2013

1 commit

  • RTS5249 supports SD UHS-II interface.

    In order to support SD UHS-II,the definitions of some internal
    registers of RTS5249 have to be modified and are different from its
    predecessors. So we need this patch to ensure RTS5249 can work, even
    SD/MMC stack doesn't support UHS-II interface.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     

06 Apr, 2013

1 commit

  • When rtsx_pci_acquire_irq fails in rtsx_pci_probe, we forget to
    disable an MSI (if we enabled it). This results in this warning on the
    next attempt to load the module:
    WARNING: at drivers/pci/msi.c:834 pci_enable_msi_block+0x2a4/0x2b0()
    Hardware name: HP EliteBook 840 G1
    Modules linked in: rtsx_pci(+) ...
    Pid: 4056, comm: modprobe Tainted: G I 3.8.0-9405-gd895cb1-1-vanilla #1
    Call Trace:
    [] warn_slowpath_common+0x7a/0xc0
    [] warn_slowpath_null+0x15/0x20
    [] pci_enable_msi_block+0x2a4/0x2b0
    [] rtsx_pci_probe+0x55a/0x720 [rtsx_pci]
    ...

    So properly disable MSI in that case.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Samuel Ortiz

    Jiri Slaby
     

28 Feb, 2013

1 commit


14 Feb, 2013

7 commits

  • Realtek card reader supports both SD and MS card. According to the
    settings of rtsx MFD driver, SD host will be probed before MS host.
    If we boot/reboot Linux with SD card inserted, the resetting flow of SD
    card will succeed, and the following resetting flow of MS is sure to fail.
    Then MS upper-level driver will ask rtsx driver to turn power off. This
    request leads to the result that the following SD commands fail and SD card
    can't be accessed again.

    In this commit, Realtek's SD and MS host driver will check whether the card
    that upper driver requesting is the one existing in the slot. If not, Realtek's
    host driver will refuse the operation to make sure the exlusive accessing
    at the same time.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • Support new model RTS5227.

    Signed-off-by: Roger Tseng
    Reviewed-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Roger Tseng
     
  • 1. Schedule card detect work at the end of the ISR
    2. Callback function ops->cd_deglitch may delay for a period of time.
    It is not proper to call this callback when local irq disabled.
    3. Card detect flow can't be executed in parallel with other card reader
    operations, so it's better to be protected by mutex.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • In function rtsx_pci_switch_clock, some variables, such as min_n, max_n,
    and max_div, are not necessary. And those assigned values look very
    obscure for others. It's more proper to use macro definitions here to
    replace these variables.

    Signed-off-by: Wei WANG
    Acked-by: Borislav Petkov
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • WARNING: Avoid CamelCase:
    + u8 N, min_N, max_N, clk_divider;

    WARNING: Avoid CamelCase:
    + u8 N, min_N, max_N, clk_divider;

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • Realtek PCIe card reader only supports 32bit DMA.
    This declaration can improve the readability.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless.

    Signed-off-by: Wei WANG
    Acked-by: Borislav Petkov
    Signed-off-by: Samuel Ortiz

    Wei WANG
     

27 Jan, 2013

3 commits

  • If rtsx_pci_sdmmc is not probed, function pointer pcr->slots[].card_event
    will point to NULL, and thus rtsx_pci_card_detect will reference a NULL
    pointer.
    Check card_event pointer before referencing it can avoid kernel panic.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • Add callback function conv_clk_and_div_n to convert between SSC clock
    and its divider N.
    For rtl8411, the formula to calculate SSC clock divider N is different
    with the other card reader models.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     
  • Different card reader has different method to switch output voltage,
    add this callback to let the card reader implement its individual switch
    function.
    This is needed as rtl8411 has a specific switch output voltage procedure.

    Signed-off-by: Wei WANG
    Signed-off-by: Samuel Ortiz

    Wei WANG
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Samuel Ortiz
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Nov, 2012

1 commit

  • This fixes the following build error on some architectures (parisc at least):

    drivers/mfd/rtsx_pcr.c: In function 'rtsx_pci_init_chip':
    drivers/mfd/rtsx_pcr.c:985:2: error: implicit declaration of function 'kcalloc'
    [-Werror=implicit-function-declaration]
    drivers/mfd/rtsx_pcr.c:985:13: warning: assignment makes pointer from integer
    without a cast [enabled by default]

    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     

08 Nov, 2012

1 commit