[PATCH 6/7] mmc: sdhci: Let a driver override timeout clock frequency
Let a driver override the timeout clock frequency by populating it before calling sdhci_add_host(). Note the value will otherwise be zero because sdhci_host is zeroed when allocated. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index abad5e5..6ada726 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2791,6 +2791,7 @@ int sdhci_add_host(struct sdhci_host *host) u32 caps[2] = {0, 0}; u32 max_current_caps; unsigned int ocr_avail; + unsigned int override_timeout_clk; int ret; WARN_ON(host == NULL); @@ -2804,6 +2805,8 @@ int sdhci_add_host(struct sdhci_host *host) if (debug_quirks2) host-quirks2 = debug_quirks2; + override_timeout_clk = host-timeout_clk; + sdhci_do_reset(host, SDHCI_RESET_ALL); host-version = sdhci_readw(host, SDHCI_HOST_VERSION); @@ -2972,6 +2975,9 @@ int sdhci_add_host(struct sdhci_host *host) mmc-max_busy_timeout /= host-timeout_clk; } + if (override_timeout_clk) + host-timeout_clk = override_timeout_clk; + mmc-caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23; mmc-caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] mmc: sdhci-acpi: Add a HID and UID for a SD Card host controller
Add a HID (INT33BB) and UID (3) for a SD Card host controller. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci-acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 1bc92c6..c38f089 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -207,6 +207,7 @@ static const struct sdhci_acpi_uid_slot sdhci_acpi_uids[] = { { 80860F14 , 3 , sdhci_acpi_slot_int_sd }, { 80860F16 , NULL, sdhci_acpi_slot_int_sd }, { INT33BB , 2 , sdhci_acpi_slot_int_sdio }, + { INT33BB , 3 , sdhci_acpi_slot_int_sd }, { INT33C6 , NULL, sdhci_acpi_slot_int_sdio }, { INT3436 , NULL, sdhci_acpi_slot_int_sdio }, { PNP0D40 }, -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 7/7] mmc: sdhci-pci: Fix Braswell eMMC timeout clock frequency
Braswell eMMC host controller specifies an incorrect timeout clock frequncy in the capabilities registers. The correct value is 1 MHz. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 39499fb..9e791e9 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -272,6 +272,8 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot) MMC_CAP_HW_RESET | MMC_CAP_1_8V_DDR; slot-host-mmc-caps2 |= MMC_CAP2_HC_ERASE_SZ; slot-hw_reset = sdhci_pci_int_hw_reset; + if (slot-chip-pdev-device == PCI_DEVICE_ID_INTEL_BSW_EMMC) + slot-host-timeout_clk = 1000; /* 1000 kHz i.e. 1 MHz */ return 0; } -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/7] mmc: sdhci-acpi: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel host controllers
Add quirk SDHCI_QUIRK2_STOP_WITH_TC for Intel host controllers. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci-acpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 3483c08..1bc92c6 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -175,7 +175,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = { MMC_CAP_HW_RESET | MMC_CAP_1_8V_DDR, .caps2 = MMC_CAP2_HC_ERASE_SZ, .flags = SDHCI_ACPI_RUNTIME_PM, - .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | SDHCI_QUIRK2_STOP_WITH_TC, .probe_slot = sdhci_acpi_emmc_probe_slot, }; @@ -191,7 +191,8 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = { static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = { .flags = SDHCI_ACPI_SD_CD | SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL | SDHCI_ACPI_RUNTIME_PM, - .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON, + .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON | + SDHCI_QUIRK2_STOP_WITH_TC, .probe_slot = sdhci_acpi_sd_probe_slot, }; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/7] mmc: sdhci-pci: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel BYT host controllers
Add quirk SDHCI_QUIRK2_STOP_WITH_TC for Intel BYT host controllers. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 580073b..31181d8 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -283,7 +283,8 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot) static const struct sdhci_pci_fixes sdhci_intel_byt_emmc = { .allow_runtime_pm = true, .probe_slot = byt_emmc_probe_slot, - .quirks2= SDHCI_QUIRK2_PRESET_VALUE_BROKEN, + .quirks2= SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_STOP_WITH_TC, }; static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = { @@ -295,7 +296,8 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = { static const struct sdhci_pci_fixes sdhci_intel_byt_sd = { .quirks2= SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON | - SDHCI_QUIRK2_PRESET_VALUE_BROKEN, + SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_STOP_WITH_TC, .allow_runtime_pm = true, .own_cd_for_runtime_pm = true, }; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/7] mmc: sdhci-pci: Add Bay Trail and Braswell SD card detect
Add support for card detect for Bay Trail and Braswell SD Card host controllers in PCI mode. This uses the gpio descriptor API which can find gpio descriptors, for example, on an ACPI comapnion device. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci-pci.c | 20 +++- drivers/mmc/host/sdhci-pci.h | 4 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 31181d8..39499fb 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -24,6 +24,7 @@ #include linux/io.h #include linux/gpio.h #include linux/pm_runtime.h +#include linux/mmc/slot-gpio.h #include linux/mmc/sdhci-pci-data.h #include sdhci.h @@ -280,6 +281,14 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot) return 0; } +static int byt_sd_probe_slot(struct sdhci_pci_slot *slot) +{ + slot-cd_con_id = NULL; + slot-cd_idx = 0; + slot-cd_override_level = true; + return 0; +} + static const struct sdhci_pci_fixes sdhci_intel_byt_emmc = { .allow_runtime_pm = true, .probe_slot = byt_emmc_probe_slot, @@ -300,6 +309,7 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sd = { SDHCI_QUIRK2_STOP_WITH_TC, .allow_runtime_pm = true, .own_cd_for_runtime_pm = true, + .probe_slot = byt_sd_probe_slot, }; /* Define Host controllers for Intel Merrifield platform */ @@ -1354,6 +1364,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( slot-pci_bar = bar; slot-rst_n_gpio = -EINVAL; slot-cd_gpio = -EINVAL; + slot-cd_idx = -1; /* Retrieve platform data if there is any */ if (*sdhci_pci_get_data) @@ -1412,6 +1423,13 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( host-mmc-slotno = slotno; host-mmc-caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP; + if (slot-cd_idx = 0 + mmc_gpiod_request_cd(host-mmc, slot-cd_con_id, slot-cd_idx, +slot-cd_override_level, 0)) { + dev_warn(pdev-dev, failed to setup card detect gpio\n); + slot-cd_idx = -1; + } + ret = sdhci_add_host(host); if (ret) goto remove; @@ -1424,7 +1442,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( * Note sdhci_pci_add_own_cd() sets slot-cd_gpio to -EINVAL on failure. */ if (chip-fixes chip-fixes-own_cd_for_runtime_pm - !gpio_is_valid(slot-cd_gpio)) + !gpio_is_valid(slot-cd_gpio) slot-cd_idx 0) chip-allow_runtime_pm = false; return slot; diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h index 9c1909b..d57c3d1 100644 --- a/drivers/mmc/host/sdhci-pci.h +++ b/drivers/mmc/host/sdhci-pci.h @@ -64,6 +64,10 @@ struct sdhci_pci_slot { int cd_gpio; int cd_irq; + char*cd_con_id; + int cd_idx; + boolcd_override_level; + void (*hw_reset)(struct sdhci_host *host); }; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/7] mmc: Some Braswell patches
Hi Here are some patches to further support for Intel Braswell SoC. Adrian Hunter (7): mmc: sdhci: Add quirk for always getting TC with stop cmd mmc: sdhci-acpi: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel host controllers mmc: sdhci-acpi: Add a HID and UID for a SD Card host controller mmc: sdhci-pci: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel BYT host controllers mmc: sdhci-pci: Add Bay Trail and Braswell SD card detect mmc: sdhci: Let a driver override timeout clock frequency mmc: sdhci-pci: Fix Braswell eMMC timeout clock frequency drivers/mmc/host/sdhci-acpi.c | 6 -- drivers/mmc/host/sdhci-pci.c | 28 +--- drivers/mmc/host/sdhci-pci.h | 4 drivers/mmc/host/sdhci.c | 14 -- include/linux/mmc/sdhci.h | 2 ++ 5 files changed, 47 insertions(+), 7 deletions(-) Regards Adrian -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] mmc: sdhci: Add quirk for always getting TC with stop cmd
Add a quirk for a host controller that always sets a Transfer Complete interrupt status for the stop command even when a busy response is not indicated. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- drivers/mmc/host/sdhci.c | 8 ++-- include/linux/mmc/sdhci.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 7a8586f..abad5e5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2224,7 +2224,7 @@ static void sdhci_tuning_timer(unsigned long data) * * \*/ -static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) +static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask) { BUG_ON(intmask == 0); @@ -2271,6 +2271,9 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) /* The controller does not support the end-of-busy IRQ, * fall through and take the SDHCI_INT_RESPONSE */ + } else if ((host-quirks2 SDHCI_QUIRK2_STOP_WITH_TC) + host-cmd-opcode == MMC_STOP_TRANSMISSION !host-data) { + *mask = ~SDHCI_INT_DATA_END; } if (intmask SDHCI_INT_RESPONSE) @@ -2481,7 +2484,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) } if (intmask SDHCI_INT_CMD_MASK) - sdhci_cmd_irq(host, intmask SDHCI_INT_CMD_MASK); + sdhci_cmd_irq(host, intmask SDHCI_INT_CMD_MASK, + intmask); if (intmask SDHCI_INT_DATA_MASK) sdhci_data_irq(host, intmask SDHCI_INT_DATA_MASK); diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 0aa85ca..dba793e 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -98,6 +98,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_BROKEN_HS200 (16) /* Controller does not support DDR50 */ #define SDHCI_QUIRK2_BROKEN_DDR50 (17) +/* Stop command (CMD12) can set Transfer Complete when not using MMC_RSP_BUSY */ +#define SDHCI_QUIRK2_STOP_WITH_TC (18) int irq;/* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO
On Mon, Sep 22, 2014 at 9:37 PM, Linus Walleij linus.wall...@linaro.org wrote: On Mon, Sep 22, 2014 at 10:20 AM, Adrian Hunter adrian.hun...@intel.com wrote: Unfortunately it doesn't seem to work. I needed the patch below. From: Adrian Hunter adrian.hun...@intel.com Date: Mon, 22 Sep 2014 11:01:16 +0300 Subject: [PATCH] gpio: Fix gpio direction flags not getting set GPIO direction flags are not getting set because an 'if' statement is the wrong way around. Signed-off-by: Adrian Hunter adrian.hun...@intel.com Oopps that's a bug, patch applied for fixes, so it'll work when this hits upstream. Alex: confirm? Oh yes absolutely, this was a mistake of mine. Thanks and sorry for the inconvenience. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/13] mmc: Some Braswell and misc patches
On 23/09/2014 10:34 a.m., Ulf Hansson wrote: On 22 September 2014 12:17, Adrian Hunter adrian.hun...@intel.com wrote: Hi Here are some patches to further support for Intel Braswell SoC plus some miscellaneous changes. The patches needed for Braswell are: mmc: sdhci: Add quirk for always getting TC with stop cmd mmc: sdhci-acpi: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel host controllers mmc: sdhci-acpi: Add a HID and UID for a SD Card host controller mmc: sdhci-pci: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel BYT host controllers mmc: sdhci-pci: Add Bay Trail and Braswell SD card detect mmc: sdhci: Let a driver override timeout clock frequency mmc: sdhci-pci: Fix Braswell eMMC timeout clock frequency The above seems like a good argument to at least split this patchset into two pieces, could you please do that? OK, split into 2 patch sets: http://marc.info/?l=linux-mmcm=141150256610085w=2 http://marc.info/?l=linux-mmcm=141154429821225w=2 Kind regards Uffe Adrian Hunter (13): mmc: Fix use of wrong device in mmc_gpiod_free_cd() mmc: Fix incorrect warning when setting 0 Hz via debugfs mmc: It is not an error for the card to be removed while suspended mmc: block: Fix error recovery stop cmd timeout calculation mmc: block: Fix SD card stop cmd response type mmc: sdhci: Add quirk for always getting TC with stop cmd mmc: sdhci-acpi: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel host controllers mmc: sdhci-acpi: Add a HID and UID for a SD Card host controller mmc: sdhci-pci: Set SDHCI_QUIRK2_STOP_WITH_TC for Intel BYT host controllers mmc: sdhci-pci: Add Bay Trail and Braswell SD card detect mmc: sdhci: Let a driver override timeout clock frequency mmc: sdhci-pci: Fix Braswell eMMC timeout clock frequency mmc: sdhci: Transfer Complete has higher priority than Data Timeout Error drivers/mmc/card/block.c | 30 -- drivers/mmc/core/core.c | 2 +- drivers/mmc/core/mmc.c| 2 +- drivers/mmc/core/sd.c | 2 +- drivers/mmc/core/slot-gpio.c | 2 +- drivers/mmc/host/sdhci-acpi.c | 6 -- drivers/mmc/host/sdhci-pci.c | 28 +--- drivers/mmc/host/sdhci-pci.h | 4 drivers/mmc/host/sdhci.c | 27 +++ include/linux/mmc/sdhci.h | 2 ++ 10 files changed, 82 insertions(+), 23 deletions(-) Regards Adrian -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: Convert pr_warning to pr_warn
On 12 September 2014 23:56, Joe Perches j...@perches.com wrote: Use the much more common pr_warn instead of pr_warning. Other miscellanea: o Coalesce formats o Realign arguments o Remove extra spaces when coalescing formats Signed-off-by: Joe Perches j...@perches.com Thanks! Applied for next! Kind regards Uffe --- drivers/mmc/card/block.c | 4 ++-- drivers/mmc/card/queue.c | 6 ++ drivers/mmc/card/sdio_uart.c | 9 - drivers/mmc/core/core.c | 8 drivers/mmc/core/mmc.c | 17 +++-- drivers/mmc/core/mmc_ops.c | 4 ++-- drivers/mmc/core/sd.c| 33 ++--- drivers/mmc/core/sdio.c | 7 +++ drivers/mmc/core/sdio_bus.c | 4 ++-- drivers/mmc/core/sdio_irq.c | 7 +++ drivers/mmc/host/s3cmci.c| 3 ++- drivers/mmc/host/sdhci.c | 34 -- drivers/mmc/host/tifm_sd.c | 4 ++-- drivers/mmc/host/wbsd.c | 21 ++--- 14 files changed, 69 insertions(+), 92 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index e248b96..ec8ac2a 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1928,8 +1928,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) case MMC_BLK_ECC_ERR: if (brq-data.blocks 1) { /* Redo read one sector at a time */ - pr_warning(%s: retrying using single block read\n, - req-rq_disk-disk_name); + pr_warn(%s: retrying using single block read\n, + req-rq_disk-disk_name); disable_multi = 1; break; } diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 3e049c1..feea926 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -229,14 +229,12 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, if (bouncesz 512) { mqrq_cur-bounce_buf = kmalloc(bouncesz, GFP_KERNEL); if (!mqrq_cur-bounce_buf) { - pr_warning(%s: unable to - allocate bounce cur buffer\n, + pr_warn(%s: unable to allocate bounce cur buffer\n, mmc_card_name(card)); } mqrq_prev-bounce_buf = kmalloc(bouncesz, GFP_KERNEL); if (!mqrq_prev-bounce_buf) { - pr_warning(%s: unable to - allocate bounce prev buffer\n, + pr_warn(%s: unable to allocate bounce prev buffer\n, mmc_card_name(card)); kfree(mqrq_cur-bounce_buf); mqrq_cur-bounce_buf = NULL; diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index f093cea..d2de592 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -1063,8 +1063,8 @@ static int sdio_uart_probe(struct sdio_func *func, return -ENOMEM; if (func-class == SDIO_CLASS_UART) { - pr_warning(%s: need info on UART class basic setup\n, - sdio_func_id(func)); + pr_warn(%s: need info on UART class basic setup\n, + sdio_func_id(func)); kfree(port); return -ENOSYS; } else if (func-class == SDIO_CLASS_GPS) { @@ -1082,9 +1082,8 @@ static int sdio_uart_probe(struct sdio_func *func, break; } if (!tpl) { - pr_warning( - %s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n, - sdio_func_id(func)); + pr_warn(%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n, + sdio_func_id(func)); kfree(port); return -EINVAL; } diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index e2e1dd4..b1e209f 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -433,8 +433,8 @@ static void mmc_wait_for_req_done(struct mmc_host *host, */ if (cmd-sanitize_busy cmd-error == -ETIMEDOUT) { if (!mmc_interrupt_hpi(host-card)) { - pr_warning(%s: %s: Interrupted sanitize\n, - mmc_hostname(host), __func__); +
Re: [PATCH] MAINTAINERS: omap_hsmmc: remove myself from MAINTAINERS
On 17 September 2014 19:20, Balaji T K balaji...@gmail.com wrote: As I won't be able to maintain omap_hsmmc driver Signed-off-by: Balaji T K balaji...@gmail.com Sorry to see you go Balaji. Thanks for all your support! Patch applied for next. Kind regards Uffe --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5e7866a..b296e43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6540,10 +6540,9 @@ S: Maintained F: drivers/mmc/host/omap.c OMAP HS MMC SUPPORT -M: Balaji T K balaj...@ti.com L: linux-mmc@vger.kernel.org L: linux-o...@vger.kernel.org -S: Maintained +S: Orphan F: drivers/mmc/host/omap_hsmmc.c OMAP RANDOM NUMBER GENERATOR SUPPORT -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] mmc: atmel-mci: Switch to using managed resource in probe
On 23 September 2014 14:51, Pramod Gurav pramod.gu...@smartplayin.com wrote: This change uses managed resource APIs to allocate resources such as, clk, gpio, io in order to simplify the driver unload or failure cases. Hence does away with release statements of the same resources in error labels and remove function. Acked-by: Ludovic Desroches ludovic.desroc...@atmel.com Cc: Ludovic Desroches ludovic.desroc...@atmel.com Cc: Chris Ball ch...@printf.net Cc: Ulf Hansson ulf.hans...@linaro.org Cc: linux-mmc@vger.kernel.org Signed-off-by: Pramod Gurav pramod.gu...@smartplayin.com Thanks! Applied for next. You don't need this extensive list of Cc in the commit message for future patches. It's also recommended to add acks etc in chronological order, thus Ludovic's ack should have been put below your sob. Kind regards Uffe --- Changes since v1: - Dropped using devm_request_irq as suggested by Ludovic Desroches as it seems there are race conditions seen with them. - Added another patch to fix failure path in probe to call atmci_cleanup_slot after dma_alloc_coherent() fails to release mmc_host resources. - Fixed typos in commit message --- drivers/mmc/host/atmel-mci.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index bb585d9..36212fb 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -17,6 +17,7 @@ #include linux/gpio.h #include linux/init.h #include linux/interrupt.h +#include linux/io.h #include linux/ioport.h #include linux/module.h #include linux/of.h @@ -2195,7 +2196,8 @@ static int __init atmci_init_slot(struct atmel_mci *host, /* Assume card is present initially */ set_bit(ATMCI_CARD_PRESENT, slot-flags); if (gpio_is_valid(slot-detect_pin)) { - if (gpio_request(slot-detect_pin, mmc_detect)) { + if (devm_gpio_request(host-pdev-dev, slot-detect_pin, + mmc_detect)) { dev_dbg(mmc-class_dev, no detect pin available\n); slot-detect_pin = -EBUSY; } else if (gpio_get_value(slot-detect_pin) ^ @@ -2208,7 +2210,8 @@ static int __init atmci_init_slot(struct atmel_mci *host, mmc-caps |= MMC_CAP_NEEDS_POLL; if (gpio_is_valid(slot-wp_pin)) { - if (gpio_request(slot-wp_pin, mmc_wp)) { + if (devm_gpio_request(host-pdev-dev, slot-wp_pin, + mmc_wp)) { dev_dbg(mmc-class_dev, no WP pin available\n); slot-wp_pin = -EBUSY; } @@ -2232,7 +2235,6 @@ static int __init atmci_init_slot(struct atmel_mci *host, dev_dbg(mmc-class_dev, could not request IRQ %d for detect pin\n, gpio_to_irq(slot-detect_pin)); - gpio_free(slot-detect_pin); slot-detect_pin = -EBUSY; } } @@ -2257,10 +2259,7 @@ static void __exit atmci_cleanup_slot(struct atmel_mci_slot *slot, free_irq(gpio_to_irq(pin), slot); del_timer_sync(slot-detect_timer); - gpio_free(pin); } - if (gpio_is_valid(slot-wp_pin)) - gpio_free(slot-wp_pin); slot-host-slot[id] = NULL; mmc_free_host(slot-mmc); @@ -2395,7 +2394,7 @@ static int __init atmci_probe(struct platform_device *pdev) if (irq 0) return irq; - host = kzalloc(sizeof(struct atmel_mci), GFP_KERNEL); + host = devm_kzalloc(pdev-dev, sizeof(*host), GFP_KERNEL); if (!host) return -ENOMEM; @@ -2403,20 +2402,18 @@ static int __init atmci_probe(struct platform_device *pdev) spin_lock_init(host-lock); INIT_LIST_HEAD(host-queue); - host-mck = clk_get(pdev-dev, mci_clk); - if (IS_ERR(host-mck)) { - ret = PTR_ERR(host-mck); - goto err_clk_get; - } + host-mck = devm_clk_get(pdev-dev, mci_clk); + if (IS_ERR(host-mck)) + return PTR_ERR(host-mck); - ret = -ENOMEM; - host-regs = ioremap(regs-start, resource_size(regs)); + host-regs = devm_ioremap(pdev-dev, regs-start, resource_size(regs)); if (!host-regs) - goto err_ioremap; + return -ENOMEM; ret = clk_prepare_enable(host-mck); if (ret) - goto err_request_irq; + return ret; + atmci_writel(host, ATMCI_CR, ATMCI_CR_SWRST); host-bus_hz = clk_get_rate(host-mck); clk_disable_unprepare(host-mck); @@ -2427,7 +2424,7 @@ static int __init atmci_probe(struct platform_device *pdev) ret =
Re: [PATCH v2 2/2] mmc: atmel-mci: Release mmc resources on failure in probe
On 23 September 2014 12:20, Pramod Gurav pramod.gu...@smartplayin.com wrote: This change takes care of releasing mmc resources on error cases in probe function which was missing. Also release timer in remove function. Cc: Ludovic Desroches ludovic.desroc...@atmel.com Cc: Chris Ball ch...@printf.net Cc: Ulf Hansson ulf.hans...@linaro.org Cc: linux-mmc@vger.kernel.org Signed-off-by: Pramod Gurav pramod.gu...@smartplayin.com Thanks! Applied for next. Kind regards Uffe --- Changes since v1: None drivers/mmc/host/atmel-mci.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 36212fb..288bcc1 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2376,7 +2376,7 @@ static int __init atmci_probe(struct platform_device *pdev) struct resource *regs; unsigned intnr_slots; int irq; - int ret; + int ret, i; regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!regs) @@ -2482,7 +2482,7 @@ static int __init atmci_probe(struct platform_device *pdev) if (!host-buffer) { ret = -ENOMEM; dev_err(pdev-dev, buffer allocation failed\n); - goto err_init_slot; + goto err_dma_alloc; } } @@ -2492,7 +2492,13 @@ static int __init atmci_probe(struct platform_device *pdev) return 0; +err_dma_alloc: + for (i = 0; i ATMCI_MAX_NR_SLOTS; i++) { + if (host-slot[i]) + atmci_cleanup_slot(host-slot[i], i); + } err_init_slot: + del_timer_sync(host-timer); if (host-dma.chan) dma_release_channel(host-dma.chan); free_irq(irq, host); @@ -2519,6 +2525,7 @@ static int __exit atmci_remove(struct platform_device *pdev) atmci_readl(host, ATMCI_SR); clk_disable_unprepare(host-mck); + del_timer_sync(host-timer); if (host-dma.chan) dma_release_channel(host-dma.chan); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/6] unshare and simplify omap_hsmmc platform struct
On 22 September 2014 13:55, Andreas Fenkart afenk...@gmail.com wrote: mmci and omap_hsmmc share very little fields in the platform mmci? Should be omap right? I noticed the similar typo for one of the patches as well. Kind regards Uffe struct. unsharing significantly simplifies the omap_hsmmc driver Andreas Fenkart (6): omap_hsmmc: unshare platform data struct with mmci driver omap_hsmmc: remove unused callbacks from platform data struct omap_hsmmc: remove unused fields in platform_data omap_hsmmc: remove unused get_context_loss_count callback omap_hsmmc: remove un-initialized callbacks from platform data omap_hsmmc: remove un-initialized get_cover_state callback arch/arm/mach-omap2/hsmmc.c| 61 ++ arch/arm/mach-omap2/hsmmc.h| 10 -- arch/arm/mach-omap2/mmc.h | 6 +- .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 6 +- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 +- drivers/mmc/host/omap_hsmmc.c | 133 +++-- include/linux/platform_data/hsmmc-omap.h | 103 7 files changed, 142 insertions(+), 183 deletions(-) create mode 100644 include/linux/platform_data/hsmmc-omap.h -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] mmc: execute tuning when device is not busy.
On 9 September 2014 04:13, Sun, Yi Y yi.y@intel.com wrote: Kind remind. BRs, Yi Sun -Original Message- From: Sun, Yi Y Sent: Thursday, August 14, 2014 1:52 PM To: linux-mmc@vger.kernel.org; ulf.hans...@linaro.org Cc: Sun, Yi Y Subject: [PATCH v2] mmc: execute tuning when device is not busy. We find tuning timeout because of the secure erase operation lasts too long so not to do tuning when device is busy. Signed-off-by: Yi Sun yi.y@intel.com So I have applied this for next. Though the patch had checkpatch errors related to your email and author of the patch. I have fixed it according to what your sob tag stated. Kind regards Uffe --- drivers/mmc/host/sdhci.c |7 --- drivers/mmc/host/sdhci.h |1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 47055f3..6a584d7 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1355,11 +1355,12 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) present_state = sdhci_readl(host, SDHCI_PRESENT_STATE); /* * Check if the re-tuning timer has already expired and there -* is no on-going data transfer. If so, we need to execute -* tuning procedure before sending command. +* is no on-going data transfer and DAT0 is not busy. If so, +* we need to execute tuning procedure before sending command. */ if ((host-flags SDHCI_NEEDS_RETUNING) - !(present_state (SDHCI_DOING_WRITE | SDHCI_DOING_READ))) { + !(present_state (SDHCI_DOING_WRITE | SDHCI_DOING_READ)) + (present_state SDHCI_DATA_0_LVL_MASK)) { if (mmc-card) { /* eMMC uses cmd21 but sd and sdio use cmd19 */ tuning_opcode = diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 4a5cd5e..0ae6b99d 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -72,6 +72,7 @@ #define SDHCI_WRITE_PROTECT 0x0008 #define SDHCI_DATA_LVL_MASK 0x00F0 #define SDHCI_DATA_LVL_SHIFT 20 +#define SDHCI_DATA_0_LVL_MASK0x0010 #define SDHCI_HOST_CONTROL 0x28 #define SDHCI_CTRL_LED0x01 -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek card reader hosts. Signed-off-by: Roger Tseng rogera...@realtek.com --- drivers/mmc/host/rtsx_pci_sdmmc.c |1 + drivers/mmc/host/rtsx_usb_sdmmc.c |1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index dfde4a210238..d49460b5ff07 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host) mmc-caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25; + mmc-caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE; mmc-max_current_330 = 400; mmc-max_current_180 = 800; mmc-ops = realtek_pci_sdmmc_ops; diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 5d3766e792f0..a884631d7eea 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host) MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | MMC_CAP_NEEDS_POLL; + mmc-caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE; mmc-max_current_330 = 400; mmc-max_current_180 = 800; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/2] mmc: Add power_mode MMC_POWER_UNDEFINED
Invent MMC_POWER_UNDEFINED to describe the initial host power_mode which might be either off or turned on by an early driver such as BIOS or UEFI driver. This lets the later mmc_power_off() do actual power-off things and power_mode will be in a known state eventually. Roger Tseng (2): mmc: core: Add new power_mode MMC_POWER_UNDEFINED mmc: rtsx_pci: Set power related cap2 macros drivers/mmc/core/core.c |1 + drivers/mmc/host/rtsx_pci_sdmmc.c |1 + drivers/mmc/host/rtsx_usb_sdmmc.c |1 + include/linux/mmc/host.h |1 + 4 files changed, 4 insertions(+) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios. It will also be set as the initial value of host-ios.power_mode in mmc_start_host(). For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later mmc_power_off() do real power-off things instead of NOP, and further prevents state messed up in cards that was already initialized(eg. by BIOS of UEFI driver). Signed-off-by: Roger Tseng rogera...@realtek.com --- drivers/mmc/core/core.c |1 + include/linux/mmc/host.h |1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index d03a080fb9cd..7dad1a1adf18 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host) { host-f_init = max(freqs[0], host-f_min); host-rescan_disable = 0; + host-ios.power_mode = MMC_POWER_UNDEFINED; if (host-caps2 MMC_CAP2_NO_PRESCAN_POWERUP) mmc_power_off(host); else diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 7960424d0bc0..b3bfa609816a 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -42,6 +42,7 @@ struct mmc_ios { #define MMC_POWER_OFF 0 #define MMC_POWER_UP 1 #define MMC_POWER_ON 2 +#define MMC_POWER_UNDEFINED3 unsigned char bus_width; /* data bus width */ -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/2] mmc, sdhci, bcm-kona, LLVMLinux: Remove use of __initconst
On Tuesday 23 September 2014 15:55:08 beh...@converseincode.com wrote: --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -225,7 +225,7 @@ static struct sdhci_pltfm_data sdhci_pltfm_data_kona = { SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, }; -static struct __initconst of_device_id sdhci_bcm_kona_of_match[] = { +static struct of_device_id const sdhci_bcm_kona_of_match[] = { { .compatible = brcm,kona-sdhci}, { .compatible = bcm,kona-sdhci}, /* deprecated name */ {} Sorry for giving you trouble over such a simple patch (especially one that I have acked already), but I just noticed that this is not following the common style we use in the kernel. Almost everywhere in Linux, we use static const struct of_device_id sdhci_bcm_kona_of_match[] = { not static struct of_device_id const sdhci_bcm_kona_of_match[] = { AFAICT they behave in identical ways, but the first one seems easier to read for someone familiar with kernel code. Arnd -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
On 24 September 2014 11:07, Roger Tseng rogera...@realtek.com wrote: Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios. It will also be set as the initial value of host-ios.power_mode in mmc_start_host(). For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later mmc_power_off() do real power-off things instead of NOP, and further prevents state messed up in cards that was already initialized(eg. by BIOS of UEFI driver). Signed-off-by: Roger Tseng rogera...@realtek.com Thanks! Applied for next! I changes some minor parts of the commit message and set the author of the patch to Roger Tseng rogera...@realtek.com instead of rogera...@realtek.com. Please fix that in for future patches. Kind regards Uffe --- drivers/mmc/core/core.c |1 + include/linux/mmc/host.h |1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index d03a080fb9cd..7dad1a1adf18 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host) { host-f_init = max(freqs[0], host-f_min); host-rescan_disable = 0; + host-ios.power_mode = MMC_POWER_UNDEFINED; if (host-caps2 MMC_CAP2_NO_PRESCAN_POWERUP) mmc_power_off(host); else diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 7960424d0bc0..b3bfa609816a 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -42,6 +42,7 @@ struct mmc_ios { #define MMC_POWER_OFF 0 #define MMC_POWER_UP 1 #define MMC_POWER_ON 2 +#define MMC_POWER_UNDEFINED3 unsigned char bus_width; /* data bus width */ -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
On 24 September 2014 11:07, Roger Tseng rogera...@realtek.com wrote: Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek card reader hosts. Signed-off-by: Roger Tseng rogera...@realtek.com Thanks! Applied for next! Kind regards Uffe --- drivers/mmc/host/rtsx_pci_sdmmc.c |1 + drivers/mmc/host/rtsx_usb_sdmmc.c |1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index dfde4a210238..d49460b5ff07 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host) mmc-caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25; + mmc-caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE; mmc-max_current_330 = 400; mmc-max_current_180 = 800; mmc-ops = realtek_pci_sdmmc_ops; diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 5d3766e792f0..a884631d7eea 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host) MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | MMC_CAP_NEEDS_POLL; + mmc-caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE; mmc-max_current_330 = 400; mmc-max_current_180 = 800; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 01/12] clk: introduce clk_set_phase function callback
Am Donnerstag, 11. September 2014, 22:18:15 schrieb Maxime Ripard: From: Mike Turquette mturque...@linaro.org A common operation for a clock signal generator is to shift the phase of that signal. This patch introduces a new function to the clk.h API to dynamically adjust the phase of a clock signal. Additionally this patch introduces support for the new function in the common clock framework via the .set_phase call back in struct clk_ops. Signed-off-by: Mike Turquette mturque...@linaro.org Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com This looks nice and would also be very useful for Rockchip SoCs I'm working on. And the implementation looks very straightforward. Reviewed-by: Heiko Stuebner he...@sntech.de --- drivers/clk/clk.c| 85 +--- include/linux/clk-private.h | 1 + include/linux/clk-provider.h | 5 +++ include/linux/clk.h | 29 +++ 4 files changed, 116 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index b76fa69b44cb..d87661af0c72 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -117,11 +117,11 @@ static void clk_summary_show_one(struct seq_file *s, struct clk *c, int level) if (!c) return; - seq_printf(s, %*s%-*s %11d %12d %11lu %10lu\n, + seq_printf(s, %*s%-*s %11d %12d %11lu %10lu %-3d\n, level * 3 + 1, , 30 - level * 3, c-name, c-enable_count, c-prepare_count, clk_get_rate(c), -clk_get_accuracy(c)); +clk_get_accuracy(c), clk_get_phase(c)); } static void clk_summary_show_subtree(struct seq_file *s, struct clk *c, @@ -143,8 +143,8 @@ static int clk_summary_show(struct seq_file *s, void *data) struct clk *c; struct hlist_head **lists = (struct hlist_head **)s-private; - seq_puts(s,clock enable_cnt prepare_cnt rate accuracy\n); - seq_puts(s, -- --\n); + seq_puts(s,clock enable_cnt prepare_cntrate accuracy phase\n); + seq_puts(s, -- --\n); clk_prepare_lock(); @@ -180,6 +180,7 @@ static void clk_dump_one(struct seq_file *s, struct clk *c, int level) seq_printf(s, \prepare_count\: %d,, c-prepare_count); seq_printf(s, \rate\: %lu, clk_get_rate(c)); seq_printf(s, \accuracy\: %lu, clk_get_accuracy(c)); + seq_printf(s, \phase\: %d, clk_get_phase(c)); } static void clk_dump_subtree(struct seq_file *s, struct clk *c, int level) @@ -264,6 +265,11 @@ static int clk_debug_create_one(struct clk *clk, struct dentry *pdentry) if (!d) goto err_out; + d = debugfs_create_u32(clk_phase, S_IRUGO, clk-dentry, + (u32 *)clk-phase); + if (!d) + goto err_out; + d = debugfs_create_x32(clk_flags, S_IRUGO, clk-dentry, (u32 *)clk-flags); if (!d) @@ -1739,6 +1745,77 @@ out: EXPORT_SYMBOL_GPL(clk_set_parent); /** + * clk_set_phase - adjust the phase shift of a clock signal + * @clk: clock signal source + * @degrees: number of degrees the signal is shifted + * + * Shifts the phase of a clock signal by the specified + * degrees. Returns 0 on success, -EERROR otherwise. + * + * This function makes no distinction about the input or reference + * signal that we adjust the clock signal phase against. For example + * phase locked-loop clock signal generators we may shift phase with + * respect to feedback clock signal input, but for other cases the + * clock phase may be shifted with respect to some other, unspecified + * signal. + * + * Additionally the concept of phase shift does not propagate through + * the clock tree hierarchy, which sets it apart from clock rates and + * clock accuracy. A parent clock phase attribute does not have an + * impact on the phase attribute of a child clock. + */ +int clk_set_phase(struct clk *clk, int degrees) +{ + int ret = 0; + + if (!clk) + goto out; + + /* sanity check degrees */ + degrees %= 360; + if (degrees 0) + degrees += 360; + + clk_prepare_lock(); + + if (!clk-ops-set_phase) + goto out_unlock; + + ret = clk-ops-set_phase(clk-hw, degrees); + + if (!ret) + clk-phase = degrees; + +out_unlock: + clk_prepare_unlock(); + +out: + return ret; +} + +/** + * clk_get_phase - return the phase shift of a clock signal + * @clk: clock signal source + * + * Returns the phase shift of a clock node in degrees, otherwise returns + * -EERROR. + */ +int clk_get_phase(struct clk *clk) +{ + int ret = 0; + + if (!clk) + goto out; + +
Re: [PATCH v3 03/12] clk: Add a function to retrieve phase
Am Donnerstag, 11. September 2014, 22:18:17 schrieb Maxime Ripard: The current phase API doesn't look into the actual hardware to get the phase value, but will rather get it from a variable only set by the set_phase function. This will cause issue when the client driver will never call the set_phase function, where we can end up having a reported phase that will not match what the hardware has been programmed to by the bootloader or what phase is programmed out of reset. Add a new get_phase function for the drivers to implement so that we can get this value. Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com Reviewed-by: Heiko Stuebner he...@sntech.de --- drivers/clk/clk.c| 10 ++ include/linux/clk-provider.h | 5 + 2 files changed, 15 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index d87661af0c72..113d75db371d 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1934,6 +1934,16 @@ int __clk_init(struct device *dev, struct clk *clk) clk-accuracy = 0; /* + * Set clk's phase. + * Since a phase is by definition relative to its parent, just + * query the current clock phase, or just assume it's in phase. + */ + if (clk-ops-get_phase) + clk-phase = clk-ops-get_phase(clk-hw); + else + clk-phase = 0; + + /* * Set clk's rate. The preferred method is to use .recalc_rate. For * simple clocks and lazy developers the default fallback is to use the * parent's rate. If a clock doesn't have a parent (or is orphaned) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 69b20d4c1e1a..abec961092a7 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -130,6 +130,10 @@ struct dentry; * set then clock accuracy will be initialized to parent accuracy * or 0 (perfect clock) if clock has no parent. * + * @get_phase: Queries the hardware to get the current phase of a clock. + * Returned values are 0-359 degrees on success, negative + * error codes on failure. + * * @set_phase: Shift the phase this clock signal in degrees specified * by the second argument. Valid values for degrees are * 0-359. Return 0 on success, otherwise -EERROR. @@ -182,6 +186,7 @@ struct clk_ops { unsigned long parent_rate, u8 index); unsigned long (*recalc_accuracy)(struct clk_hw *hw, unsigned long parent_accuracy); + int (*get_phase)(struct clk_hw *hw); int (*set_phase)(struct clk_hw *hw, int degrees); void(*init)(struct clk_hw *hw); int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] gpio, bcm-kona, LLVMLinux: Remove use of __initconst
On Wed, Sep 24, 2014 at 12:55 AM, beh...@converseincode.com wrote: From: Behan Webster beh...@converseincode.com The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster beh...@converseincode.com Reviewed-by: Mark Charlebois charl...@gmail.com Acked-by: Arnd Bergmann a...@arndb.de Acked-by: Matt Porter mpor...@linaro.org Patch applied. Yours, Linus Walleij -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 14/27] mmc: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul vinod.k...@intel.com --- drivers/mmc/core/core.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index d03a080..5081089 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -954,8 +954,7 @@ EXPORT_SYMBOL(mmc_get_card); void mmc_put_card(struct mmc_card *card) { mmc_release_host(card-host); - pm_runtime_mark_last_busy(card-dev); - pm_runtime_put_autosuspend(card-dev); + pm_runtime_last_busy_and_autosuspend(card-dev); } EXPORT_SYMBOL(mmc_put_card); -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 16/27] mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code This patch also changes return value from macro rather than 0 always! Signed-off-by: Vinod Koul vinod.k...@intel.com --- drivers/mmc/host/omap_hsmmc.c | 19 --- 1 files changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9656726..2a2affc 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1823,10 +1823,7 @@ static int omap_hsmmc_disable_fclk(struct mmc_host *mmc) { struct omap_hsmmc_host *host = mmc_priv(mmc); - pm_runtime_mark_last_busy(host-dev); - pm_runtime_put_autosuspend(host-dev); - - return 0; + return pm_runtime_last_busy_and_autosuspend(host-dev); } static const struct mmc_host_ops omap_hsmmc_ops = { @@ -1877,10 +1874,7 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) seq_printf(s, CAPA:\t\t0x%08x\n, OMAP_HSMMC_READ(host-base, CAPA)); - pm_runtime_mark_last_busy(host-dev); - pm_runtime_put_autosuspend(host-dev); - - return 0; + return pm_runtime_last_busy_and_autosuspend(host-dev); } static int omap_hsmmc_regs_open(struct inode *inode, struct file *file) @@ -2258,10 +2252,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) } omap_hsmmc_debugfs(mmc); - pm_runtime_mark_last_busy(host-dev); - pm_runtime_put_autosuspend(host-dev); - - return 0; + return pm_runtime_last_busy_and_autosuspend(host-dev); err_slot_name: mmc_remove_host(mmc); @@ -2386,9 +2377,7 @@ static int omap_hsmmc_resume(struct device *dev) !(host-mmc-pm_flags MMC_PM_WAKE_SDIO_IRQ)) enable_irq(host-wake_irq); - pm_runtime_mark_last_busy(host-dev); - pm_runtime_put_autosuspend(host-dev); - return 0; + return pm_runtime_last_busy_and_autosuspend(host-dev); } #else -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 18/27] mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul vinod.k...@intel.com --- drivers/mmc/host/sdhci.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 37b2a9a..862346a 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2623,8 +2623,7 @@ static int sdhci_runtime_pm_get(struct sdhci_host *host) static int sdhci_runtime_pm_put(struct sdhci_host *host) { - pm_runtime_mark_last_busy(host-mmc-parent); - return pm_runtime_put_autosuspend(host-mmc-parent); + return pm_runtime_last_busy_and_autosuspend(host-mmc-parent); } static void sdhci_runtime_pm_bus_on(struct sdhci_host *host) -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 15/27] mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul vinod.k...@intel.com --- drivers/mmc/host/mmci.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index e4d4707..27dcfba 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -223,8 +223,7 @@ static int mmci_card_busy(struct mmc_host *mmc) busy = 1; spin_unlock_irqrestore(host-lock, flags); - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); + pm_runtime_last_busy_and_autosuspend(mmc_dev(mmc)); return busy; } @@ -372,8 +371,7 @@ mmci_request_end(struct mmci_host *host, struct mmc_request *mrq) mmc_request_done(host-mmc, mrq); - pm_runtime_mark_last_busy(mmc_dev(host-mmc)); - pm_runtime_put_autosuspend(mmc_dev(host-mmc)); + pm_runtime_last_busy_and_autosuspend(mmc_dev(host-mmc)); } static void mmci_set_mask1(struct mmci_host *host, unsigned int mask) @@ -1397,8 +1395,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) spin_unlock_irqrestore(host-lock, flags); - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); + pm_runtime_last_busy_and_autosuspend(mmc_dev(mmc)); } static int mmci_get_cd(struct mmc_host *mmc) @@ -1442,8 +1439,7 @@ static int mmci_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios) if (ret) dev_warn(mmc_dev(mmc), Voltage switch failed\n); - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); + pm_runtime_last_busy_and_autosuspend(mmc_dev(mmc)); } return ret; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 00/27] add pm_runtime_last_busy_and_autosuspend() helper
This patch series adds a simple macro pm_runtime_last_busy_and_autosuspend() which invokes pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel. This series can be found at git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git topic/pm_runtime_last_busy_and_autosuspend Fengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements. If all are okay, this should be merged thru PM tree as it depends on macro addition. Subhransu S. Prusty (1): PM: Add helper pm_runtime_last_busy_and_autosuspend() Vinod Koul (26): dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper drm/i915: use pm_runtime_last_busy_and_autosuspend helper drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper drm/radeon: use pm_runtime_last_busy_and_autosuspend helper vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper i2c: designware: use pm_runtime_last_busy_and_autosuspend helper i2c: omap: use pm_runtime_last_busy_and_autosuspend helper i2c: qup: use pm_runtime_last_busy_and_autosuspend helper mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper mei: use pm_runtime_last_busy_and_autosuspend helper mmc: use pm_runtime_last_busy_and_autosuspend helper mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper NFC: trf7970a: use pm_runtime_last_busy_and_autosuspend helper pm2301-charger: use pm_runtime_last_busy_and_autosuspend helper spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper spi: orion: use pm_runtime_last_busy_and_autosuspend helper spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper spi: core: use pm_runtime_last_busy_and_autosuspend helper tty: serial: omap: use pm_runtime_last_busy_and_autosuspend helper usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper video: fbdev: use pm_runtime_last_busy_and_autosuspend helper Documentation/power/runtime_pm.txt |4 ++ drivers/dma/ste_dma40.c | 30 - drivers/extcon/extcon-arizona.c |6 +-- drivers/gpu/drm/i915/intel_pm.c |3 +- drivers/gpu/drm/nouveau/nouveau_connector.c |3 +- drivers/gpu/drm/nouveau/nouveau_drm.c |9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++ drivers/gpu/drm/radeon/radeon_drv.c |5 +- drivers/gpu/drm/radeon/radeon_kms.c |6 +-- drivers/gpu/vga/vga_switcheroo.c|7 +-- drivers/i2c/busses/i2c-designware-core.c|3 +- drivers/i2c/busses/i2c-omap.c |6 +-- drivers/i2c/busses/i2c-qup.c|3 +- drivers/mfd/ab8500-gpadc.c |6 +-- drivers/mfd/arizona-irq.c |3 +- drivers/misc/mei/client.c | 12 ++ drivers/mmc/core/core.c |3 +- drivers/mmc/host/mmci.c | 12 ++ drivers/mmc/host/omap_hsmmc.c | 19 ++--- drivers/mmc/host/sdhci-pxav3.c |6 +-- drivers/mmc/host/sdhci.c|3 +- drivers/nfc/trf7970a.c |3 +- drivers/power/pm2301_charger.c |3 +- drivers/spi/spi-omap2-mcspi.c |9 +--- drivers/spi/spi-orion.c |3 +- drivers/spi/spi-ti-qspi.c |5 +- drivers/spi/spi.c |6 +-- drivers/tty/serial/omap-serial.c| 60 +-- drivers/usb/musb/omap2430.c |6 +-- drivers/video/fbdev/auo_k190x.c |9 +--- include/linux/pm_runtime.h |6 +++ 31 files changed, 97 insertions(+), 177 deletions(-) Thanks -- ~Vinod -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 17/27] mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul vinod.k...@intel.com --- drivers/mmc/host/sdhci-pxav3.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index 6f842fb..2706d3f 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -417,8 +417,7 @@ static int sdhci_pxav3_suspend(struct device *dev) pm_runtime_get_sync(dev); ret = sdhci_suspend_host(host); - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + pm_runtime_last_busy_and_autosuspend(dev); return ret; } @@ -430,8 +429,7 @@ static int sdhci_pxav3_resume(struct device *dev) pm_runtime_get_sync(dev); ret = sdhci_resume_host(host); - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + pm_runtime_last_busy_and_autosuspend(dev); return ret; } -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/2] mmc, sdhci, bcm-kona, LLVMLinux: Remove use of __initconst
On 09/24/14 02:22, Arnd Bergmann wrote: On Tuesday 23 September 2014 15:55:08 beh...@converseincode.com wrote: --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -225,7 +225,7 @@ static struct sdhci_pltfm_data sdhci_pltfm_data_kona = { SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, }; -static struct __initconst of_device_id sdhci_bcm_kona_of_match[] = { +static struct of_device_id const sdhci_bcm_kona_of_match[] = { { .compatible = brcm,kona-sdhci}, { .compatible = bcm,kona-sdhci}, /* deprecated name */ {} Sorry for giving you trouble over such a simple patch (especially one that I have acked already), but I just noticed that this is not following the common style we use in the kernel. It's all good. It's not like you haven't saved me a tonne of time already! :) Almost everywhere in Linux, we use static const struct of_device_id sdhci_bcm_kona_of_match[] = { not static struct of_device_id const sdhci_bcm_kona_of_match[] = { True enough. I put the const where I did to be in keeping with the intent of __initconst, making the array const instead of the contained type. AFAICT they behave in identical ways, Indeed. For C in both cases the resulting array of struct of_device_id ends up in .rodata, so functionally equivalent. but the first one seems easier to read for someone familiar with kernel code. No worries. Happy to post a v3. Linus Walleij: Would you like me to respin the gpio, bcm-kona, LLVMLinux: Remove use of __initconst patch as well? Behan -- Behan Webster beh...@converseincode.com -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/27] add pm_runtime_last_busy_and_autosuspend() helper
On Wednesday, September 24, 2014 09:44:50 PM Vinod Koul wrote: This patch series adds a simple macro pm_runtime_last_busy_and_autosuspend() which invokes pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel. This series can be found at git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git topic/pm_runtime_last_busy_and_autosuspend Fengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements. If all are okay, this should be merged thru PM tree as it depends on macro addition. Subhransu S. Prusty (1): PM: Add helper pm_runtime_last_busy_and_autosuspend() Vinod Koul (26): dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper drm/i915: use pm_runtime_last_busy_and_autosuspend helper drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper drm/radeon: use pm_runtime_last_busy_and_autosuspend helper vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper i2c: designware: use pm_runtime_last_busy_and_autosuspend helper i2c: omap: use pm_runtime_last_busy_and_autosuspend helper i2c: qup: use pm_runtime_last_busy_and_autosuspend helper mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper mei: use pm_runtime_last_busy_and_autosuspend helper mmc: use pm_runtime_last_busy_and_autosuspend helper mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper NFC: trf7970a: use pm_runtime_last_busy_and_autosuspend helper pm2301-charger: use pm_runtime_last_busy_and_autosuspend helper spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper spi: orion: use pm_runtime_last_busy_and_autosuspend helper spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper spi: core: use pm_runtime_last_busy_and_autosuspend helper tty: serial: omap: use pm_runtime_last_busy_and_autosuspend helper usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper video: fbdev: use pm_runtime_last_busy_and_autosuspend helper Documentation/power/runtime_pm.txt |4 ++ drivers/dma/ste_dma40.c | 30 - drivers/extcon/extcon-arizona.c |6 +-- drivers/gpu/drm/i915/intel_pm.c |3 +- drivers/gpu/drm/nouveau/nouveau_connector.c |3 +- drivers/gpu/drm/nouveau/nouveau_drm.c |9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++ drivers/gpu/drm/radeon/radeon_drv.c |5 +- drivers/gpu/drm/radeon/radeon_kms.c |6 +-- drivers/gpu/vga/vga_switcheroo.c|7 +-- drivers/i2c/busses/i2c-designware-core.c|3 +- drivers/i2c/busses/i2c-omap.c |6 +-- drivers/i2c/busses/i2c-qup.c|3 +- drivers/mfd/ab8500-gpadc.c |6 +-- drivers/mfd/arizona-irq.c |3 +- drivers/misc/mei/client.c | 12 ++ drivers/mmc/core/core.c |3 +- drivers/mmc/host/mmci.c | 12 ++ drivers/mmc/host/omap_hsmmc.c | 19 ++--- drivers/mmc/host/sdhci-pxav3.c |6 +-- drivers/mmc/host/sdhci.c|3 +- drivers/nfc/trf7970a.c |3 +- drivers/power/pm2301_charger.c |3 +- drivers/spi/spi-omap2-mcspi.c |9 +--- drivers/spi/spi-orion.c |3 +- drivers/spi/spi-ti-qspi.c |5 +- drivers/spi/spi.c |6 +-- drivers/tty/serial/omap-serial.c| 60 +-- drivers/usb/musb/omap2430.c |6 +-- drivers/video/fbdev/auo_k190x.c |9 +--- include/linux/pm_runtime.h |6 +++ 31 files changed, 97 insertions(+), 177 deletions(-) OK, I guess this is as good as it gets. What tree would you like it go through? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html