diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index 754946206c..3e8b90bbb8 100644 --- a/projects/RPi/linux/linux.arm.conf +++ b/projects/RPi/linux/linux.arm.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.9.2 Kernel Configuration +# Linux/arm 3.9.6 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -58,7 +58,6 @@ CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_HARDIRQS_SW_RESEND=y -# CONFIG_ALWAYS_USE_PERSISTENT_CLOCK is not set CONFIG_KTIME_SCALAR=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y @@ -282,6 +281,7 @@ CONFIG_BCM2708_GPIO=y CONFIG_BCM2708_VCMEM=y # CONFIG_BCM2708_NOL2CACHE is not set CONFIG_BCM2708_DMAER=y +CONFIG_BCM2708_SPIDEV=y # # Processor Type diff --git a/projects/RPi/patches/linux/linux-01-RPi_support-5ded0f9.patch b/projects/RPi/patches/linux/linux-01-RPi_support-975bd78.patch similarity index 98% rename from projects/RPi/patches/linux/linux-01-RPi_support-5ded0f9.patch rename to projects/RPi/patches/linux/linux-01-RPi_support-975bd78.patch index 547d2b272e..832a64cdcd 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support-5ded0f9.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support-975bd78.patch @@ -1,7 +1,7 @@ -From cbf7cb1e733f0b7c117d55519ffaab6513b3db93 Mon Sep 17 00:00:00 2001 +From 9adaf647f55ded1a82f11539341dd7fd9cf95941 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 01/95] Add dwc_otg driver +Subject: [PATCH 01/98] Add dwc_otg driver Signed-off-by: popcornmix --- @@ -45178,10 +45178,10 @@ index 0000000..abcf284 1.8.1.6 -From f85fdade5cdd7807608bfec780a40c70ddf920a9 Mon Sep 17 00:00:00 2001 +From 28f316fee7b79e44dc3c2be12d1f0098e3c0336f Mon Sep 17 00:00:00 2001 From: popcornmix -Date: Wed, 8 May 2013 11:59:48 +0100 -Subject: [PATCH 02/95] Main bcm2708 linux port +Date: Sun, 12 May 2013 12:24:19 +0100 +Subject: [PATCH 02/98] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -45189,32 +45189,32 @@ Signed-off-by: popcornmix arch/arm/Kconfig.debug | 8 + arch/arm/Makefile | 1 + arch/arm/configs/bcmrpi_cutdown_defconfig | 474 +++++++ - arch/arm/configs/bcmrpi_defconfig | 510 +++++++ + arch/arm/configs/bcmrpi_defconfig | 510 ++++++++ arch/arm/configs/bcmrpi_emergency_defconfig | 532 ++++++++ arch/arm/mach-bcm2708/Kconfig | 34 + arch/arm/mach-bcm2708/Makefile | 8 + arch/arm/mach-bcm2708/Makefile.boot | 3 + - arch/arm/mach-bcm2708/armctrl.c | 208 +++ + arch/arm/mach-bcm2708/armctrl.c | 208 ++++ arch/arm/mach-bcm2708/armctrl.h | 27 + - arch/arm/mach-bcm2708/bcm2708.c | 638 +++++++++ + arch/arm/mach-bcm2708/bcm2708.c | 638 ++++++++++ arch/arm/mach-bcm2708/bcm2708.h | 51 + arch/arm/mach-bcm2708/bcm2708_gpio.c | 339 +++++ arch/arm/mach-bcm2708/clock.c | 61 + arch/arm/mach-bcm2708/clock.h | 24 + arch/arm/mach-bcm2708/dma.c | 397 ++++++ - arch/arm/mach-bcm2708/include/mach/arm_control.h | 419 ++++++ + arch/arm/mach-bcm2708/include/mach/arm_control.h | 419 +++++++ arch/arm/mach-bcm2708/include/mach/arm_power.h | 60 + arch/arm/mach-bcm2708/include/mach/clkdev.h | 7 + arch/arm/mach-bcm2708/include/mach/debug-macro.S | 22 + arch/arm/mach-bcm2708/include/mach/dma.h | 84 ++ - arch/arm/mach-bcm2708/include/mach/entry-macro.S | 69 + + arch/arm/mach-bcm2708/include/mach/entry-macro.S | 69 ++ arch/arm/mach-bcm2708/include/mach/frc.h | 38 + arch/arm/mach-bcm2708/include/mach/gpio.h | 18 + arch/arm/mach-bcm2708/include/mach/hardware.h | 28 + arch/arm/mach-bcm2708/include/mach/io.h | 27 + arch/arm/mach-bcm2708/include/mach/irqs.h | 196 +++ arch/arm/mach-bcm2708/include/mach/memory.h | 57 + - arch/arm/mach-bcm2708/include/mach/platform.h | 220 +++ + arch/arm/mach-bcm2708/include/mach/platform.h | 220 ++++ arch/arm/mach-bcm2708/include/mach/power.h | 26 + arch/arm/mach-bcm2708/include/mach/system.h | 53 + arch/arm/mach-bcm2708/include/mach/timex.h | 23 + @@ -45230,11 +45230,11 @@ Signed-off-by: popcornmix arch/arm/tools/mach-types | 1 + drivers/mmc/host/Kconfig | 21 + drivers/mmc/host/Makefile | 1 + - drivers/mmc/host/sdhci-bcm2708.c | 1555 ++++++++++++++++++++++ - drivers/mmc/host/sdhci.c | 288 ++-- - drivers/mmc/host/sdhci.h | 42 + + drivers/mmc/host/sdhci-bcm2708.c | 1425 ++++++++++++++++++++++ + drivers/mmc/host/sdhci.c | 209 +++- + drivers/mmc/host/sdhci.h | 37 + include/linux/mmc/sdhci.h | 2 + - 49 files changed, 7666 insertions(+), 89 deletions(-) + 49 files changed, 7470 insertions(+), 71 deletions(-) create mode 100644 arch/arm/configs/bcmrpi_cutdown_defconfig create mode 100644 arch/arm/configs/bcmrpi_defconfig create mode 100644 arch/arm/configs/bcmrpi_emergency_defconfig @@ -51462,10 +51462,10 @@ index c380e3c..497b3a5 100644 obj-$(CONFIG_MMC_OMAP) += omap.o diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c new file mode 100644 -index 0000000..4b23c8b +index 0000000..e79723d --- /dev/null +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -0,0 +1,1555 @@ +@@ -0,0 +1,1425 @@ +/* + * sdhci-bcm2708.c Support for SDHCI device on BCM2708 + * Copyright (c) 2010 Broadcom @@ -51501,7 +51501,6 @@ index 0000000..4b23c8b +#include +#include +#include -+#include + +#include "sdhci.h" + @@ -51544,11 +51543,6 @@ index 0000000..4b23c8b +/* Mhz clock that the EMMC core is running at. Should match the platform clockman settings */ +#define BCM2708_EMMC_CLOCK_FREQ 80000000 + -+#define POWER_OFF 0 -+#define POWER_LAZY_OFF 1 -+#define POWER_ON 2 -+ -+ +/*****************************************************************************\ + * * + * Debug * @@ -51904,10 +51898,6 @@ index 0000000..4b23c8b + /* tracking scatter gather progress */ + unsigned sg_ix; /* scatter gather list index */ + unsigned sg_done; /* bytes in current sg_ix done */ -+ /* power management */ -+ BCM_POWER_HANDLE_T power_handle; -+ unsigned char power_state; /* enable/disable power state */ -+ unsigned char power_mode; /* last set power mode */ +#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA + unsigned char dma_wanted; /* DMA transfer requested */ + unsigned char dma_waits; /* wait states in DMAs */ @@ -52567,7 +52557,6 @@ index 0000000..4b23c8b + + if (host) { + struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -+ int power_state = host_priv->power_state; + return sprintf(buf, + "present: yes\n" + "power: %s\n" @@ -52577,10 +52566,7 @@ index 0000000..4b23c8b +#else + "dma: unconfigured\n", +#endif -+ power_state == POWER_ON? "on": -+ power_state == POWER_OFF? "off": -+ power_state == POWER_LAZY_OFF? "lazy-off": -+ "", ++ "always on", + host->clock +#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA + , (host->flags & SDHCI_USE_PLATDMA)? "on": "off" @@ -52629,110 +52615,6 @@ index 0000000..4b23c8b +#endif + + -+/* Click forwards one step towards fully on */ -+static int sdhci_bcm2708_enable(struct sdhci_host *host) -+{ -+ int rc; -+ struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -+ -+ if (host_priv->power_state == POWER_OFF) { -+ /* warning: may schedule - don't call in irq mode */ -+ rc = bcm_power_request(host_priv->power_handle, -+ BCM_POWER_SDCARD); -+ -+ if (rc == 0) { -+ mmc_power_restore_host(host->mmc); -+ host_priv->power_state = POWER_ON; -+ } else if (rc != -EINTR) -+ printk(KERN_ERR "%s: mmc power up request failed - " -+ "rc %d\n", -+ mmc_hostname(host->mmc), rc); -+ } else { -+ host_priv->power_state = POWER_ON; -+ rc = 0; -+ } -+ -+ return rc; -+} -+ -+/* Click backwards one step towards fully off */ -+static int sdhci_bcm2708_disable(struct sdhci_host *host, int lazy) -+{ -+ int rc; -+ struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -+ -+ if ((host_priv->power_state == POWER_ON) && lazy) { -+ host_priv->power_state = POWER_LAZY_OFF; -+ return BCM2708_SDHCI_SLEEP_TIMEOUT; -+ } -+ -+ /* warning: may schedule - don't call in irq mode */ -+ rc = bcm_power_request(host_priv->power_handle, BCM_POWER_NONE); -+ -+ if (rc == 0) -+ host_priv->power_state = POWER_OFF; -+ else if (rc != -EINTR) -+ printk(KERN_ERR "%s: mmc power down request failed - rc %d\n", -+ mmc_hostname(host->mmc), rc); -+ -+ return rc; -+} -+ -+static int sdhci_bcm2708_set_plat_power(struct sdhci_host *host, -+ int power_mode) -+{ -+ struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -+ int rc; -+ -+ do { -+ rc = mmc_host_enable(host->mmc); -+ } while (-EINTR == rc); -+ -+ if (rc == 0) do { -+ if (rc == 0 && power_mode != host_priv->power_mode) -+ { -+ switch (power_mode) -+ { -+ case MMC_POWER_OFF: -+ rc = bcm_power_request(host_priv->power_handle, -+ BCM_POWER_NONE); -+ break; -+ -+ case MMC_POWER_UP: -+ rc = bcm_power_request(host_priv->power_handle, -+ BCM_POWER_SDCARD); -+ /* -+ * We need an extra 10ms delay of 10ms before we -+ * can apply clock after applying power -+ */ -+ if (rc == 0) -+ mdelay(10); -+ break; -+ -+ case MMC_POWER_ON: -+ mdelay(10); -+ /* do_send_init_stream = 1; */ -+ break; -+ } -+ -+ if (rc == 0) -+ host_priv->power_mode = power_mode; -+ } -+ } while (-EINTR == rc); -+ -+ if (rc == 0) do { -+ if (rc == 0) { -+ if (power_mode == MMC_POWER_OFF) -+ rc = mmc_host_disable(host->mmc); -+ else -+ rc = mmc_host_lazy_disable(host->mmc); -+ } -+ -+ } while (-EINTR == rc); -+ -+ return rc; -+} -+ +/*****************************************************************************\ + * * + * Device quirk functions. Implemented as local ops because the flags * @@ -52782,10 +52664,6 @@ index 0000000..4b23c8b + //.get_min_clock = NULL, + .get_timeout_clock = sdhci_bcm2708_get_timeout_clock, + -+ .enable = sdhci_bcm2708_enable, -+ .disable = sdhci_bcm2708_disable, -+ .set_plat_power = sdhci_bcm2708_set_plat_power, -+ +#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA + // Platform DMA operations + .pdma_able = sdhci_bcm2708_platdma_dmaable, @@ -52804,7 +52682,7 @@ index 0000000..4b23c8b + * * +\*****************************************************************************/ + -+static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) ++static int sdhci_bcm2708_probe(struct platform_device *pdev) +{ + struct sdhci_host *host; + struct resource *iomem; @@ -52863,11 +52741,6 @@ index 0000000..4b23c8b + + host_priv = SDHCI_HOST_PRIV(host); + -+ host_priv->power_state = POWER_ON; -+ ret = bcm_power_open(&host_priv->power_handle); -+ if (ret != 0) -+ goto err_power; -+ +#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA + host_priv->dma_wanted = 0; +#ifdef CHECK_DMA_USE @@ -52938,8 +52811,6 @@ index 0000000..4b23c8b + host_priv->cb_handle); +err_alloc_cb: +#endif -+ bcm_power_close(host_priv->power_handle); -+err_power: + iounmap(host->ioaddr); +err_remap: + release_mem_region(iomem->start, resource_size(iomem)); @@ -52950,7 +52821,7 @@ index 0000000..4b23c8b + return ret; +} + -+static int __devexit sdhci_bcm2708_remove(struct platform_device *pdev) ++static int sdhci_bcm2708_remove(struct platform_device *pdev) +{ + struct sdhci_host *host = platform_get_drvdata(pdev); + struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -52972,7 +52843,6 @@ index 0000000..4b23c8b + dma_free_writecombine(&pdev->dev, SZ_4K, host_priv->cb_base, + host_priv->cb_handle); +#endif -+ bcm_power_close(host_priv->power_handle); + sdhci_remove_host(host, dead); + iounmap(host->ioaddr); + release_mem_region(iomem->start, resource_size(iomem)); @@ -52988,7 +52858,7 @@ index 0000000..4b23c8b + .owner = THIS_MODULE, + }, + .probe = sdhci_bcm2708_probe, -+ .remove = __devexit_p(sdhci_bcm2708_remove), ++ .remove = sdhci_bcm2708_remove, + +#ifdef CONFIG_PM + .suspend = sdhci_bcm2708_suspend, @@ -53022,17 +52892,17 @@ index 0000000..4b23c8b +MODULE_ALIAS("platform:"DRIVER_NAME); + diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 51bbba4..79f9efd 100644 +index 51bbba4..71e2696 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -29,6 +29,7 @@ +@@ -28,6 +28,7 @@ + #include #include #include - #include +#include + #include #include "sdhci.h" - @@ -315,7 +316,7 @@ static void sdhci_read_block_pio(struct sdhci_host *host) u32 uninitialized_var(scratch); u8 *buf; @@ -53183,17 +53053,12 @@ index 51bbba4..79f9efd 100644 if (host->version >= SDHCI_SPEC_200) { ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); ctrl &= ~SDHCI_CTRL_DMA_MASK; -- if ((host->flags & SDHCI_REQ_USE_DMA) && -- (host->flags & SDHCI_USE_ADMA)) -- ctrl |= SDHCI_CTRL_ADMA32; -- else -- ctrl |= SDHCI_CTRL_SDMA; + if (! (host->flags & SDHCI_USE_PLATDMA)) { -+ if ((host->flags & SDHCI_REQ_USE_DMA) && -+ (host->flags & SDHCI_USE_ADMA)) -+ ctrl |= SDHCI_CTRL_ADMA32; -+ else -+ ctrl |= SDHCI_CTRL_SDMA; + if ((host->flags & SDHCI_REQ_USE_DMA) && + (host->flags & SDHCI_USE_ADMA)) + ctrl |= SDHCI_CTRL_ADMA32; + else + ctrl |= SDHCI_CTRL_SDMA; + } sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } @@ -53259,51 +53124,7 @@ index 51bbba4..79f9efd 100644 sdhci_prepare_data(host, cmd); -@@ -1299,6 +1313,35 @@ static int sdhci_set_power(struct sdhci_host *host, unsigned short power) - return power; - } - -+/* Power on or off the circuitary supporting the register set */ -+static int sdhci_set_plat_power(struct sdhci_host *host, int power_mode) -+{ -+ if (host->ops->set_plat_power) -+ return host->ops->set_plat_power(host, power_mode); -+ else -+ return 0; -+} -+ -+/* Click forwards one step towards fully on */ -+static int sdhci_enable(struct mmc_host *mmc) -+{ -+ struct sdhci_host *host; -+ -+ host = mmc_priv(mmc); -+ -+ return host->ops->enable? host->ops->enable(host): 0; -+} -+ -+/* Click backwards one step towards fully off */ -+static int sdhci_disable(struct mmc_host *mmc, int lazy) -+{ -+ struct sdhci_host *host; -+ -+ host = mmc_priv(mmc); -+ -+ return host->ops->disable? host->ops->disable(host, lazy): 0; -+} -+ - /*****************************************************************************\ - * * - * MMC callbacks * -@@ -1398,6 +1441,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) - unsigned long flags; - int vdd_bit = -1; - u8 ctrl; -+ int rc; - - spin_lock_irqsave(&host->lock, flags); - -@@ -1470,7 +1514,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1470,7 +1484,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) else ctrl &= ~SDHCI_CTRL_HISPD; @@ -53312,57 +53133,30 @@ index 51bbba4..79f9efd 100644 u16 clk, ctrl_2; /* In case of UHS-I modes, set High Speed Enable */ -@@ -1478,7 +1522,8 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) - (ios->timing == MMC_TIMING_UHS_SDR50) || - (ios->timing == MMC_TIMING_UHS_SDR104) || - (ios->timing == MMC_TIMING_UHS_DDR50) || -- (ios->timing == MMC_TIMING_UHS_SDR25)) -+ (ios->timing == MMC_TIMING_UHS_SDR25) || -+ (ios->timing == MMC_TIMING_UHS_SDR12)) - ctrl |= SDHCI_CTRL_HISPD; - - ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); -@@ -1570,6 +1615,12 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) - - mmiowb(); - spin_unlock_irqrestore(&host->lock, flags); -+ -+ if (ios->power_mode == MMC_POWER_OFF) { -+ do -+ rc = sdhci_set_plat_power(host, ios->power_mode); -+ while (rc == -EINTR); -+ } - } - - static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) -@@ -2132,7 +2183,7 @@ static void sdhci_timeout_timer(unsigned long data) +@@ -2132,7 +2146,7 @@ static void sdhci_timeout_timer(unsigned long data) if (host->mrq) { pr_err("%s: Timeout waiting for hardware " - "interrupt.\n", mmc_hostname(host->mmc)); -+ "interrupt - cmd%d.\n", mmc_hostname(host->mmc), host->last_cmdop); ++ "interrupt - cmd%d.\n", mmc_hostname(host->mmc), host->last_cmdop); sdhci_dumpregs(host); if (host->data) { -@@ -2177,10 +2228,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) +@@ -2177,10 +2191,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) BUG_ON(intmask == 0); if (!host->cmd) { -- pr_err("%s: Got command interrupt 0x%08x even " -- "though no command operation was in progress.\n", -- mmc_hostname(host->mmc), (unsigned)intmask); -- sdhci_dumpregs(host); + if (!(host->ops->extra_ints)) { -+ pr_err("%s: Got command interrupt 0x%08x even " -+ "though no command operation was in progress.\n", -+ mmc_hostname(host->mmc), (unsigned)intmask); -+ sdhci_dumpregs(host); + pr_err("%s: Got command interrupt 0x%08x even " + "though no command operation was in progress.\n", + mmc_hostname(host->mmc), (unsigned)intmask); + sdhci_dumpregs(host); + } else + DBG("cmd irq 0x%08x cmd complete\n", (unsigned)intmask); return; } -@@ -2250,6 +2304,19 @@ static void sdhci_show_adma_error(struct sdhci_host *host) +@@ -2250,6 +2267,19 @@ static void sdhci_show_adma_error(struct sdhci_host *host) static void sdhci_show_adma_error(struct sdhci_host *host) { } #endif @@ -53382,21 +53176,15 @@ index 51bbba4..79f9efd 100644 static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) { u32 command; -@@ -2278,24 +2345,40 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) - return; +@@ -2279,23 +2309,39 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) } } -- -- pr_err("%s: Got data interrupt 0x%08x even " -- "though no data operation was in progress.\n", -- mmc_hostname(host->mmc), (unsigned)intmask); -- sdhci_dumpregs(host); -+ + + if (!(host->ops->extra_ints)) { -+ pr_err("%s: Got data interrupt 0x%08x even " -+ "though no data operation was in progress.\n", -+ mmc_hostname(host->mmc), (unsigned)intmask); -+ sdhci_dumpregs(host); + pr_err("%s: Got data interrupt 0x%08x even " + "though no data operation was in progress.\n", + mmc_hostname(host->mmc), (unsigned)intmask); + sdhci_dumpregs(host); + } else + DBG("data irq 0x%08x but no data\n", (unsigned)intmask); @@ -53406,8 +53194,6 @@ index 51bbba4..79f9efd 100644 if (intmask & SDHCI_INT_DATA_TIMEOUT) host->data->error = -ETIMEDOUT; - else if (intmask & SDHCI_INT_DATA_END_BIT) -- host->data->error = -EILSEQ; -- else if ((intmask & SDHCI_INT_DATA_CRC) && + else if (intmask & SDHCI_INT_DATA_END_BIT) { + DBG("end error in cmd %d\n", host->last_cmdop); + if (host->ops->spurious_crc_acmd51 && @@ -53415,12 +53201,11 @@ index 51bbba4..79f9efd 100644 + DBG("ignoring spurious data_end_bit error\n"); + intmask = SDHCI_INT_DATA_AVAIL|SDHCI_INT_DATA_END; + } else -+ host->data->error = -EILSEQ; + host->data->error = -EILSEQ; +- else if ((intmask & SDHCI_INT_DATA_CRC) && + } else if ((intmask & SDHCI_INT_DATA_CRC) && SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND)) - != MMC_BUS_TEST_R) -- host->data->error = -EILSEQ; -- else if (intmask & SDHCI_INT_ADMA_ERROR) { + != MMC_BUS_TEST_R) { + DBG("crc error in cmd %d\n", host->last_cmdop); + if (host->ops->spurious_crc_acmd51 && @@ -53428,13 +53213,14 @@ index 51bbba4..79f9efd 100644 + DBG("ignoring spurious data_crc_bit error\n"); + intmask = SDHCI_INT_DATA_AVAIL|SDHCI_INT_DATA_END; + } else { -+ host->data->error = -EILSEQ; + host->data->error = -EILSEQ; +- else if (intmask & SDHCI_INT_ADMA_ERROR) { + } + } else if (intmask & SDHCI_INT_ADMA_ERROR) { pr_err("%s: ADMA error\n", mmc_hostname(host->mmc)); sdhci_show_adma_error(host); host->data->error = -EIO; -@@ -2303,11 +2386,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) +@@ -2303,11 +2349,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) host->ops->adma_workaround(host, intmask); } @@ -53457,7 +53243,7 @@ index 51bbba4..79f9efd 100644 /* * We currently don't do anything fancy with DMA -@@ -2336,18 +2426,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) +@@ -2336,18 +2389,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS); } @@ -53478,7 +53264,7 @@ index 51bbba4..79f9efd 100644 } } -@@ -2403,6 +2483,22 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2403,6 +2446,22 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) tasklet_schedule(&host->card_tasklet); } @@ -53501,7 +53287,7 @@ index 51bbba4..79f9efd 100644 if (intmask & SDHCI_INT_CMD_MASK) { sdhci_writel(host, intmask & SDHCI_INT_CMD_MASK, SDHCI_INT_STATUS); -@@ -2417,7 +2513,13 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2417,7 +2476,13 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); @@ -53516,23 +53302,17 @@ index 51bbba4..79f9efd 100644 if (intmask & SDHCI_INT_BUS_POWER) { pr_err("%s: Card is consuming too much power!\n", -@@ -2537,7 +2639,14 @@ int sdhci_resume_host(struct sdhci_host *host) +@@ -2537,7 +2602,8 @@ int sdhci_resume_host(struct sdhci_host *host) { int ret; - if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { -+ if (host->vmmc) { -+ int ret = regulator_enable(host->vmmc); -+ if (ret) -+ return ret; -+ } -+ + if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA | + SDHCI_USE_PLATDMA)) { if (host->ops->enable_dma) host->ops->enable_dma(host); } -@@ -2753,14 +2862,16 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -2753,14 +2819,16 @@ int sdhci_add_host(struct sdhci_host *host) host->flags &= ~SDHCI_USE_ADMA; } @@ -53551,29 +53331,20 @@ index 51bbba4..79f9efd 100644 } } } -@@ -2871,7 +2982,7 @@ int sdhci_add_host(struct sdhci_host *host) - /* Auto-CMD23 stuff only works in ADMA or PIO. */ - if ((host->version >= SDHCI_SPEC_300) && - ((host->flags & SDHCI_USE_ADMA) || -- !(host->flags & SDHCI_USE_SDMA))) { -+ !(host->flags & SDHCI_USE_SDMA) )) { - host->flags |= SDHCI_AUTO_CMD23; - DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc)); - } else { -@@ -3043,6 +3154,12 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -3043,6 +3111,12 @@ int sdhci_add_host(struct sdhci_host *host) SDHCI_MAX_CURRENT_MULTIPLIER; } + if(host->ops->voltage_broken) { + ocr_avail |= MMC_VDD_32_33 | MMC_VDD_33_34; -+ // Cannot support UHS modes is we are stuck at 3.3V; ++ // Cannot support UHS modes if we are stuck at 3.3V; + mmc->caps &= ~(MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50); + } + mmc->ocr_avail = ocr_avail; mmc->ocr_avail_sdio = ocr_avail; if (host->ocr_avail_sdio) -@@ -3173,6 +3290,7 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -3173,6 +3247,7 @@ int sdhci_add_host(struct sdhci_host *host) pr_info("%s: SDHCI controller on %s [%s] using %s\n", mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)), @@ -53582,19 +53353,14 @@ index 51bbba4..79f9efd 100644 (host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO"); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h -index 379e09d..45592d2 100644 +index 379e09d..f90574e 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h -@@ -289,6 +289,25 @@ struct sdhci_ops { +@@ -289,6 +289,20 @@ struct sdhci_ops { void (*platform_reset_enter)(struct sdhci_host *host, u8 mask); void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); + -+ int (*enable)(struct sdhci_host *mmc); -+ int (*disable)(struct sdhci_host *mmc, int lazy); -+ int (*set_plat_power)(struct sdhci_host *mmc, -+ int power_mode); -+ + int (*pdma_able)(struct sdhci_host *host, + struct mmc_data *data); + void (*pdma_avail)(struct sdhci_host *host, @@ -53611,7 +53377,7 @@ index 379e09d..45592d2 100644 void (*hw_reset)(struct sdhci_host *host); void (*platform_suspend)(struct sdhci_host *host); void (*platform_resume)(struct sdhci_host *host); -@@ -399,6 +418,29 @@ static inline void *sdhci_priv(struct sdhci_host *host) +@@ -399,6 +413,29 @@ static inline void *sdhci_priv(struct sdhci_host *host) extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); #endif @@ -53665,10 +53431,10 @@ index b838ffc..f3a39c1 100644 1.8.1.6 -From ecad00d36ce5d320c249f468ede434324ccae6ab Mon Sep 17 00:00:00 2001 +From 3ec376874ce56f9b64b278064092f74607f4fd2c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 03/95] bcm2708 watchdog driver +Subject: [PATCH 03/98] bcm2708 watchdog driver Signed-off-by: popcornmix --- @@ -54102,10 +53868,10 @@ index 0000000..dd33c35 1.8.1.6 -From 1bb23e111d60adab8df63ef766d2f3bc185778af Mon Sep 17 00:00:00 2001 +From e83f74d1ca02a8742e9f41caf92ac824ef99a032 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 04/95] bcm2708 framebuffer driver +Subject: [PATCH 04/98] bcm2708 framebuffer driver Signed-off-by: popcornmix --- @@ -57140,10 +56906,10 @@ index 3c14e43..7626beb 100644 1.8.1.6 -From eba16ea8bf19dee42d87a9cfac55f88aca4e3fd8 Mon Sep 17 00:00:00 2001 +From 606042e379283d4d340e0d40db74d728d5d13e5d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 27 Mar 2013 23:10:07 +0000 -Subject: [PATCH 05/95] bcm2708 vchiq driver +Subject: [PATCH 05/98] bcm2708 vchiq driver Signed-off-by: popcornmix --- @@ -69585,10 +69351,10 @@ index 0000000..b6bfa21 1.8.1.6 -From e80667986ce0db068d72fe1aae8a37a48ae19a45 Mon Sep 17 00:00:00 2001 +From 94c300082a474195796a4cac65aa45aab5c009c7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Mar 2013 00:10:21 +0000 -Subject: [PATCH 06/95] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 06/98] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- @@ -70885,10 +70651,10 @@ index 0000000..bdc9d79 1.8.1.6 -From a53cbc1c13befbe10a0c06ff81d0cb9f0c699b14 Mon Sep 17 00:00:00 2001 +From bb3c5c906a825358602227bb17942c89ee923488 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 07/95] Allow mac address to be set in smsc95xx +Subject: [PATCH 07/98] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -70982,10 +70748,10 @@ index e6d2dea..9709314 100644 1.8.1.6 -From e2b023487bff9ca672ebd8b75900417bc5b3e341 Mon Sep 17 00:00:00 2001 +From e9157bffdd8a900961e094a57560b049b1e7e91b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 08/95] bcm2708: alsa sound driver +Subject: [PATCH 08/98] bcm2708: alsa sound driver Signed-off-by: popcornmix --- @@ -73308,10 +73074,10 @@ index 0000000..af3e6eb 1.8.1.6 -From b8ef5a6c27eca1b32bb541968068922336a5019c Mon Sep 17 00:00:00 2001 +From a0481fb6e7ae7fc6dcaf0d5019f41d815a3d3fb1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 27 Apr 2012 00:30:15 +0100 -Subject: [PATCH 09/95] Fix (hopefully) for DWC_MEMCPY kernel panics. Thanks to +Subject: [PATCH 09/98] Fix (hopefully) for DWC_MEMCPY kernel panics. Thanks to Naren Sankar for finding this --- @@ -73352,10 +73118,10 @@ index a5f8546..5261d2a 100644 1.8.1.6 -From f500dc5269e80976df4073121ef1f0b5db499597 Mon Sep 17 00:00:00 2001 +From 4393f5d06d89e551ca6f45ec13a0f316b74827e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:36:22 +0000 -Subject: [PATCH 10/95] added support for TT in the USB driver. Thanks Naren +Subject: [PATCH 10/98] added support for TT in the USB driver. Thanks Naren --- drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 3 +++ @@ -73379,10 +73145,10 @@ index 5261d2a..e7b90c8 100644 1.8.1.6 -From 27c5263d74dc511e0d3da51f1ef560a6911155ef Mon Sep 17 00:00:00 2001 +From 1cb7438324989a2b903eb9f023ae9c6677fa45ad Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:09:44 +0100 -Subject: [PATCH 11/95] Use dwc_alloc_atomic. Thanks bootc +Subject: [PATCH 11/98] Use dwc_alloc_atomic. Thanks bootc --- drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 4 ++-- @@ -73414,20 +73180,20 @@ index 9459c4c..f6e7870 100644 1.8.1.6 -From 3a5fa8d50770bf02c6238e36d45df663b12a6d71 Mon Sep 17 00:00:00 2001 +From f1f2dd31f46173c0b3a51128228287dc57dc6c45 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:12:13 +0100 -Subject: [PATCH 12/95] possible fix for sdcard missing status. Thank naren +Subject: [PATCH 12/98] possible fix for sdcard missing status. Thank naren --- drivers/mmc/host/sdhci-bcm2708.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 4b23c8b..cae6be9 100644 +index e79723d..a405114 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1291,6 +1291,14 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) +@@ -1173,6 +1173,14 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) return 1; } @@ -73442,7 +73208,7 @@ index 4b23c8b..cae6be9 100644 /***************************************************************************** \ * * * Device ops * -@@ -1328,6 +1336,7 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) +@@ -1206,6 +1214,7 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) .spurious_crc_acmd51 = sdhci_bcm2708_quirk_spurious_crc, .voltage_broken = sdhci_bcm2708_quirk_voltage_broken, .uhs_broken = sdhci_bcm2708_uhs_broken, @@ -73454,10 +73220,10 @@ index 4b23c8b..cae6be9 100644 1.8.1.6 -From f30daa0ddaa2d5a73d577a9c74accbad541fe4dd Mon Sep 17 00:00:00 2001 +From 74d53fb6bb5cf56625b365f2f55379829a6f6988 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 15 May 2012 15:24:40 +0100 -Subject: [PATCH 13/95] Fix for DWC OTG HCD URB Dequeue has NULL URB panic. +Subject: [PATCH 13/98] Fix for DWC OTG HCD URB Dequeue has NULL URB panic. Thanks Naren --- @@ -73488,20 +73254,20 @@ index e7b90c8..2a3b689 100644 1.8.1.6 -From a5a8f6129d7ab8c167625ec4458ee2171f5c47e0 Mon Sep 17 00:00:00 2001 +From da62791a191199ccdbfe0212dd9c37469e86c2c1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 May 2012 14:44:19 +0100 -Subject: [PATCH 14/95] sdcard patch improvements from naren +Subject: [PATCH 14/98] sdcard patch improvements from naren --- drivers/mmc/host/sdhci-bcm2708.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index cae6be9..7136998 100644 +index a405114..ae8edf7 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -896,8 +896,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -886,8 +886,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, We get CRC and DEND errors unless we wait for the SD controller to finish reading/writing to the card. */ u32 state_mask; @@ -73511,7 +73277,7 @@ index cae6be9..7136998 100644 DBG("PDMA over - sync card\n"); if (data->flags & MMC_DATA_READ) -@@ -905,17 +904,12 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -895,17 +894,12 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, else state_mask = SDHCI_DOING_WRITE; @@ -73534,7 +73300,7 @@ index cae6be9..7136998 100644 if (timeout <= 0) printk(KERN_ERR"%s: final %s to SD card still " "running\n", -@@ -1293,10 +1287,7 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) +@@ -1175,10 +1169,7 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) { @@ -73550,10 +73316,10 @@ index cae6be9..7136998 100644 1.8.1.6 -From 6f202485e8e16c3c101d8b91d53941a0657f594d Mon Sep 17 00:00:00 2001 +From 442f0344ea45c7c435f9d94000928ebf8a8a383e Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 4 Jun 2012 04:27:48 +0200 -Subject: [PATCH 15/95] sdhci-bcm2708: speed up DMA sync +Subject: [PATCH 15/98] sdhci-bcm2708: speed up DMA sync Experiments show that it doesn't really take that long to sync, so we can reduce the poll interval slightly. Might improve performance a bit. @@ -73562,10 +73328,10 @@ can reduce the poll interval slightly. Might improve performance a bit. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 7136998..9aebdfb 100644 +index ae8edf7..a6bdc25 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -907,7 +907,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -897,7 +897,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) & state_mask) && --timeout > 0) { @@ -73578,10 +73344,10 @@ index 7136998..9aebdfb 100644 1.8.1.6 -From 59cb62fdde3180c862640ca04e048d93f2684f41 Mon Sep 17 00:00:00 2001 +From 2b2d2523b69e6a58232ed87fb5eb940c94391b65 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:52:04 +0200 -Subject: [PATCH 16/95] sdhci-bcm2708: remove custom clock handling +Subject: [PATCH 16/98] sdhci-bcm2708: remove custom clock handling The custom clock handling code is redundant and buggy. The MMC/SDHCI subsystem does a better job than it, so remove it for good. @@ -73590,10 +73356,10 @@ subsystem does a better job than it, so remove it for good. 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 9aebdfb..c964911 100644 +index a6bdc25..0ed4d85 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -359,68 +359,9 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) +@@ -353,68 +353,9 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) static unsigned int sdhci_bcm2708_get_max_clock(struct sdhci_host *host) { @@ -73663,7 +73429,7 @@ index 9aebdfb..c964911 100644 /*****************************************************************************\ * * * DMA Operation * -@@ -1307,11 +1248,7 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) +@@ -1189,11 +1130,7 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) #else #error The BCM2708 SDHCI driver needs CONFIG_MMC_SDHCI_IO_ACCESSORS to be set #endif @@ -73673,16 +73439,16 @@ index 9aebdfb..c964911 100644 - //.get_min_clock = NULL, - .get_timeout_clock = sdhci_bcm2708_get_timeout_clock, - .enable = sdhci_bcm2708_enable, - .disable = sdhci_bcm2708_disable, + #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA + // Platform DMA operations -- 1.8.1.6 -From ebbaeed930adbbeb799435391350c1328c531718 Mon Sep 17 00:00:00 2001 +From 0c8ada1f84794bdb016d841acda291d71c8f038c Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:53:59 +0200 -Subject: [PATCH 17/95] sdhci-bcm2708: add additional quirks +Subject: [PATCH 17/98] sdhci-bcm2708: add additional quirks Some additional quirks are needed for correct operation. There's no SDHCI capabilities register documented, and it always reads @@ -73694,10 +73460,10 @@ high-speed mode, so add it as well. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index c964911..16c918b 100644 +index 0ed4d85..3001836 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1311,7 +1311,9 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1189,7 +1189,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) host->quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | @@ -73712,10 +73478,10 @@ index c964911..16c918b 100644 1.8.1.6 -From d9e1f976f047f65a2ecbe5ca0cc18cb0a53db40d Mon Sep 17 00:00:00 2001 +From 992870434932c3acf2e029c120f0a84084f95ded Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:57:13 +0200 -Subject: [PATCH 18/95] sdhci-bcm2708: add allow_highspeed parameter +Subject: [PATCH 18/98] sdhci-bcm2708: add allow_highspeed parameter Add a parameter to disable high-speed mode for the few cards that still might have problems. High-speed mode is enabled by default. @@ -73724,10 +73490,10 @@ still might have problems. High-speed mode is enabled by default. 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 16c918b..a8aae16 100644 +index 3001836..c64de21 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -135,6 +135,8 @@ static inline unsigned long int since_ns(hptime_t t) +@@ -129,6 +129,8 @@ static inline unsigned long int since_ns(hptime_t t) return (unsigned long)((hptime() - t) * HPTIME_CLK_NS); } @@ -73736,7 +73502,7 @@ index 16c918b..a8aae16 100644 #if 0 static void hptime_test(void) { -@@ -1381,7 +1383,8 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1254,7 +1256,8 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) host_priv->dma_chan, host_priv->dma_chan_base, host_priv->dma_irq); @@ -73746,7 +73512,7 @@ index 16c918b..a8aae16 100644 #endif ret = sdhci_add_host(host); -@@ -1487,8 +1490,12 @@ static void __exit sdhci_drv_exit(void) +@@ -1357,8 +1360,12 @@ static void __exit sdhci_drv_exit(void) module_init(sdhci_drv_init); module_exit(sdhci_drv_exit); @@ -73763,10 +73529,10 @@ index 16c918b..a8aae16 100644 1.8.1.6 -From 0669f11bbea66d22b713cc9f117bdd55fd64420e Mon Sep 17 00:00:00 2001 +From 12e7971b93d012e4375ab6b94f4175a05d3488c5 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:58:40 +0200 -Subject: [PATCH 19/95] sdhci-bcm2708: assume 50 MHz eMMC clock +Subject: [PATCH 19/98] sdhci-bcm2708: assume 50 MHz eMMC clock 80 MHz clock isnt't suited well to be dividable to get SD clocks of 25 MHz (default mode) or 50 MHz (high speed mode). 50 MHz are perfect to @@ -73776,26 +73542,26 @@ drive the SD interface at ideal frequencies. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index a8aae16..64b956b 100644 +index c64de21..d174938 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -74,7 +74,7 @@ +@@ -73,7 +73,7 @@ #define BCM2708_SDHCI_SLEEP_TIMEOUT 1000 /* msecs */ /* Mhz clock that the EMMC core is running at. Should match the platform clockman settings */ -#define BCM2708_EMMC_CLOCK_FREQ 80000000 +#define BCM2708_EMMC_CLOCK_FREQ 50000000 - #define POWER_OFF 0 - #define POWER_LAZY_OFF 1 + /*****************************************************************************\ + * * -- 1.8.1.6 -From 3b3c7f3af59e848e3fd77d4b04407fe4f239f0fd Mon Sep 17 00:00:00 2001 +From 09e8e1b162764431ec65ca0e90907d7ea62cb2a1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Jun 2012 22:31:55 +0100 -Subject: [PATCH 20/95] Allow emmc clock to be specified as command line +Subject: [PATCH 20/98] Allow emmc clock to be specified as command line parameter --- @@ -73803,10 +73569,10 @@ Subject: [PATCH 20/95] Allow emmc clock to be specified as command line 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 64b956b..0241261 100644 +index d174938..0ee983c 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -136,6 +136,7 @@ static inline unsigned long int since_ns(hptime_t t) +@@ -130,6 +130,7 @@ static inline unsigned long int since_ns(hptime_t t) } static bool allow_highspeed = 1; @@ -73814,7 +73580,7 @@ index 64b956b..0241261 100644 #if 0 static void hptime_test(void) -@@ -361,7 +362,7 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) +@@ -355,7 +356,7 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) static unsigned int sdhci_bcm2708_get_max_clock(struct sdhci_host *host) { @@ -73823,7 +73589,7 @@ index 64b956b..0241261 100644 } /*****************************************************************************\ -@@ -1491,6 +1492,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1361,6 +1362,7 @@ static void __exit sdhci_drv_exit(void) module_exit(sdhci_drv_exit); module_param(allow_highspeed, bool, 0444); @@ -73831,7 +73597,7 @@ index 64b956b..0241261 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1498,4 +1500,6 @@ static void __exit sdhci_drv_exit(void) +@@ -1368,4 +1370,6 @@ static void __exit sdhci_drv_exit(void) MODULE_ALIAS("platform:"DRIVER_NAME); MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); @@ -73842,10 +73608,10 @@ index 64b956b..0241261 100644 1.8.1.6 -From ca89e3b94174cc1da6b6b2df4be628352a18d44f Mon Sep 17 00:00:00 2001 +From 6170b6726f14cc5a50b4707da7266b2eb2df7d05 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Jun 2012 22:35:38 +0100 -Subject: [PATCH 21/95] sdhci-bcm2708: raise DMA sync timeout +Subject: [PATCH 21/98] sdhci-bcm2708: raise DMA sync timeout Commit d64b84c by accident reduced the maximum overall DMA sync timeout. The maximum overall timeout was reduced from 100ms to 30ms, @@ -73859,10 +73625,10 @@ enough for most cards. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 0241261..13abbc9 100644 +index 0ee983c..b0cdd7d 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -840,7 +840,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -830,7 +830,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, We get CRC and DEND errors unless we wait for the SD controller to finish reading/writing to the card. */ u32 state_mask; @@ -73875,10 +73641,10 @@ index 0241261..13abbc9 100644 1.8.1.6 -From f4c976470e366c01c2fd172cfeb4d495107002d0 Mon Sep 17 00:00:00 2001 +From d0693090be715641994f1c52bd1dba2de9b27385 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 17 Jun 2012 00:14:54 +0100 -Subject: [PATCH 22/95] Explicitly set usb host channels to 8, as in the spec +Subject: [PATCH 22/98] Explicitly set usb host channels to 8, as in the spec --- drivers/usb/host/dwc_otg/dwc_otg_core_if.h | 3 ++- @@ -73902,10 +73668,10 @@ index 4a78b03..25aae5e 100644 1.8.1.6 -From 2ec0d2172a0b6cf2a459bc9d7c469ae2c6c6f1f9 Mon Sep 17 00:00:00 2001 +From 5c0ed036f9488c743eca5260f2b5d8f421766383 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 22 Jun 2012 12:55:39 +0100 -Subject: [PATCH 23/95] Fix unintended line swap that cause cause memory leak +Subject: [PATCH 23/98] Fix unintended line swap that cause cause memory leak in USB driver --- @@ -73930,20 +73696,20 @@ index 2a3b689..970b065 100644 1.8.1.6 -From a1146c3f5c1e2cf715d587400f8e71af795de43c Mon Sep 17 00:00:00 2001 +From 8da8147a7fb91311225e41cc77e87e90b1093750 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 22 Jun 2012 12:57:42 +0100 -Subject: [PATCH 24/95] Use ndelay rather than udelay. Thanks lb +Subject: [PATCH 24/98] Use ndelay rather than udelay. Thanks lb --- drivers/mmc/host/sdhci-bcm2708.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 13abbc9..1d8751c 100644 +index b0cdd7d..7bba950 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -255,14 +255,14 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) +@@ -249,14 +249,14 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) if (now == last_write_hpt || now == last_write_hpt+1) { /* we can't guarantee any significant time has * passed - we'll have to wait anyway ! */ @@ -73960,7 +73726,7 @@ index 13abbc9..1d8751c 100644 } last_write_hpt = now; } -@@ -278,13 +278,13 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) +@@ -272,13 +272,13 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) ier &= ~SDHCI_INT_DATA_TIMEOUT; writel(ier, host->ioaddr + SDHCI_SIGNAL_ENABLE); timeout_disabled = true; @@ -73980,10 +73746,10 @@ index 13abbc9..1d8751c 100644 1.8.1.6 -From 86edb5235ecd9e3ba69e3a97a02b40e6376394c0 Mon Sep 17 00:00:00 2001 +From 27786e9017d099826200db1a7acaa1621a5c77bb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Jun 2012 15:54:11 +0100 -Subject: [PATCH 25/95] Fixed issue with some keyboards giving too much data +Subject: [PATCH 25/98] Fixed issue with some keyboards giving too much data resulting in overrun of the input buffer and memory corruption causing an OOPS. We should be checking for the fact that we might get more data than we want. Thanks Naren. @@ -74080,10 +73846,10 @@ index 970b065..05fd421 100644 1.8.1.6 -From d64807509c4d97befc91c9b5066b7e1cb7b6e78d Mon Sep 17 00:00:00 2001 +From 4d31e006ac48fc386ab69092e732374d582b774e Mon Sep 17 00:00:00 2001 From: Bryan Kemp Date: Sat, 7 Jul 2012 16:24:07 -0500 -Subject: [PATCH 26/95] Updating dwc_otg driver to fix issue releasing pcm +Subject: [PATCH 26/98] Updating dwc_otg driver to fix issue releasing pcm stream see: https://github.com/raspberrypi/firmware/issues/51 --- @@ -74154,10 +73920,10 @@ index 05fd421..e9f4f31 100644 1.8.1.6 -From f6a7f1be06b9dcf9d6c66ab4601ff337cb74274f Mon Sep 17 00:00:00 2001 +From 5619f2d372973e30fdd752be7f904919301a11d9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:44:40 +0100 -Subject: [PATCH 27/95] Backport of Chris Boot's i2c and spi drivers. +Subject: [PATCH 27/98] Backport of Chris Boot's i2c and spi drivers. --- arch/arm/configs/bcmrpi_cutdown_defconfig | 10 + @@ -75446,10 +75212,10 @@ index 0000000..9f1580e 1.8.1.6 -From 2413e776a3cc5e0e090a758a4f618a7543ccc449 Mon Sep 17 00:00:00 2001 +From d9d613b3060f515227befa1ceaa847a8ddd8d9cb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 19 Jul 2012 16:00:28 +0100 -Subject: [PATCH 28/95] Add SPI_SPI_DEV module +Subject: [PATCH 28/98] Add SPI_SPI_DEV module --- arch/arm/configs/bcmrpi_defconfig | 1 + @@ -75471,10 +75237,10 @@ index 6219df3..31f5afaa 100644 1.8.1.6 -From 97ae9d4ff362beb78e4e8beddd2172e89fd9cf3e Mon Sep 17 00:00:00 2001 +From bc0c859db722bb88915e1987fa02bec82f3d32d2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 13 Jul 2012 18:34:18 +0100 -Subject: [PATCH 29/95] Fix for quitting X hang. Interrupted mailbox reads are +Subject: [PATCH 29/98] Fix for quitting X hang. Interrupted mailbox reads are not something we can reliably recover from, so down_interruptable is not a safe call. @@ -75509,20 +75275,20 @@ index 799a0ac..3874051 100644 1.8.1.6 -From 3fb82a6a148cc1c7ba4333ea6efd02b7f218049d Mon Sep 17 00:00:00 2001 +From 5faeab13f46472006aaadd441c9a2f340d45d9e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 17 Jul 2012 00:48:27 +0100 -Subject: [PATCH 30/95] Add sync_after_dma module parameter +Subject: [PATCH 30/98] Add sync_after_dma module parameter --- drivers/mmc/host/sdhci-bcm2708.c | 60 +++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 1d8751c..1d50cc6 100644 +index 7bba950..3792b9f 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -52,7 +52,6 @@ +@@ -51,7 +51,6 @@ #undef CONFIG_MMC_SDHCI_BCM2708_DMA #define CONFIG_MMC_SDHCI_BCM2708_DMA y @@ -75530,7 +75296,7 @@ index 1d8751c..1d50cc6 100644 #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA /* #define CHECK_DMA_USE */ #endif -@@ -137,6 +136,7 @@ static inline unsigned long int since_ns(hptime_t t) +@@ -131,6 +130,7 @@ static inline unsigned long int since_ns(hptime_t t) static bool allow_highspeed = 1; static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; @@ -75538,7 +75304,7 @@ index 1d8751c..1d50cc6 100644 #if 0 static void hptime_test(void) -@@ -832,34 +832,34 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -822,34 +822,34 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, SDHCI_INT_SPACE_AVAIL); } } else { @@ -75599,7 +75365,7 @@ index 1d8751c..1d50cc6 100644 if (host_priv->complete) { (*host_priv->complete)(host); DBG("PDMA %s complete\n", -@@ -1315,7 +1315,9 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1193,7 +1193,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_MISSING_CAPS | @@ -75610,7 +75376,7 @@ index 1d8751c..1d50cc6 100644 #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA host->flags = SDHCI_USE_PLATDMA; -@@ -1493,6 +1495,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1363,6 +1365,7 @@ static void __exit sdhci_drv_exit(void) module_param(allow_highspeed, bool, 0444); module_param(emmc_clock_freq, int, 0444); @@ -75618,7 +75384,7 @@ index 1d8751c..1d50cc6 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1501,5 +1504,6 @@ static void __exit sdhci_drv_exit(void) +@@ -1371,5 +1374,6 @@ static void __exit sdhci_drv_exit(void) MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); @@ -75629,31 +75395,32 @@ index 1d8751c..1d50cc6 100644 1.8.1.6 -From 715e9dc9c5f12fc5fccccdb785c80354722e2477 Mon Sep 17 00:00:00 2001 -From: Grigori Goronzy -Date: Thu, 21 Jun 2012 00:57:59 +0200 -Subject: [PATCH 31/95] sdhci-bcm2708: use extension FIFO to buffer DMA +From 9e07f7687de1fb42f8f4350784c14e95bd4f3c32 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sun, 12 May 2013 12:25:52 +0100 +Subject: [PATCH 31/98] sdhci-bcm2708: use extension FIFO to buffer DMA transfers The additional FIFO might speed up transfers in some cases. --- - drivers/mmc/host/sdhci-bcm2708.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) + drivers/mmc/host/sdhci-bcm2708.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 1d50cc6..882ae42 100644 +index 3792b9f..326b962 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -79,6 +79,8 @@ - #define POWER_LAZY_OFF 1 - #define POWER_ON 2 +@@ -74,6 +74,9 @@ + /* Mhz clock that the EMMC core is running at. Should match the platform clockman settings */ + #define BCM2708_EMMC_CLOCK_FREQ 50000000 +#define REG_EXRDFIFO_EN 0x80 +#define REG_EXRDFIFO_CFG 0x84 - ++ /*****************************************************************************\ * * -@@ -967,10 +969,12 @@ static ssize_t attr_dma_store(struct device *_dev, + * Debug * +@@ -957,10 +960,12 @@ static ssize_t attr_dma_store(struct device *_dev, int on = simple_strtol(buf, NULL, 0); if (on) { host->flags |= SDHCI_USE_PLATDMA; @@ -75666,7 +75433,7 @@ index 1d50cc6..882ae42 100644 printk(KERN_INFO "%s: DMA disabled\n", mmc_hostname(host->mmc)); } -@@ -1399,6 +1403,12 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1272,6 +1277,12 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) ret = device_create_file(&pdev->dev, &dev_attr_dma_wait); ret = device_create_file(&pdev->dev, &dev_attr_status); @@ -75683,10 +75450,10 @@ index 1d50cc6..882ae42 100644 1.8.1.6 -From 0c5d137e83057b37e17412567ef2d0fd21fb8b1c Mon Sep 17 00:00:00 2001 +From 4579648f2f33a93931e1cb27df5afd8f59955aef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 20:04:12 +0100 -Subject: [PATCH 32/95] sdhci-bcm2708: use multiblock-type transfers for single +Subject: [PATCH 32/98] sdhci-bcm2708: use multiblock-type transfers for single blocks There are issues with both single block reads (missed completion) @@ -75713,10 +75480,10 @@ index 5bab73b..8df187c 100644 * token, not a STOP_TRANSMISSION request. */ diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 882ae42..ad44fbe 100644 +index 326b962..c6d6bb0 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1392,6 +1392,9 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1266,6 +1266,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) if (allow_highspeed) host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; @@ -75742,10 +75509,10 @@ index d6f20cc..860bff9 100644 1.8.1.6 -From d53faa0d797c999d91ad2ef5df057baae948f87d Mon Sep 17 00:00:00 2001 +From 3046166886536f258d853f8dcaabc23e5926ca9d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 Aug 2012 19:02:14 +0100 -Subject: [PATCH 33/95] Add module parameter for missing_status quirk. +Subject: [PATCH 33/98] Add module parameter for missing_status quirk. sdhci-bcm2708.missing_status=0 may improve interrupt latency --- @@ -75753,10 +75520,10 @@ Subject: [PATCH 33/95] Add module parameter for missing_status quirk. 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index ad44fbe..1ac1e64 100644 +index c6d6bb0..8243593 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -139,6 +139,7 @@ static inline unsigned long int since_ns(hptime_t t) +@@ -134,6 +134,7 @@ static inline unsigned long int since_ns(hptime_t t) static bool allow_highspeed = 1; static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; static bool sync_after_dma = 1; @@ -75764,7 +75531,7 @@ index ad44fbe..1ac1e64 100644 #if 0 static void hptime_test(void) -@@ -1271,7 +1272,6 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) +@@ -1150,7 +1151,6 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) .spurious_crc_acmd51 = sdhci_bcm2708_quirk_spurious_crc, .voltage_broken = sdhci_bcm2708_quirk_voltage_broken, .uhs_broken = sdhci_bcm2708_uhs_broken, @@ -75772,7 +75539,7 @@ index ad44fbe..1ac1e64 100644 }; /*****************************************************************************\ -@@ -1310,6 +1310,9 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1189,6 +1189,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) ret = PTR_ERR(host); goto err; } @@ -75782,7 +75549,7 @@ index ad44fbe..1ac1e64 100644 host->hw_name = "BCM2708_Arasan"; host->ops = &sdhci_bcm2708_ops; -@@ -1509,6 +1512,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1380,6 +1383,7 @@ static void __exit sdhci_drv_exit(void) module_param(allow_highspeed, bool, 0444); module_param(emmc_clock_freq, int, 0444); module_param(sync_after_dma, bool, 0444); @@ -75790,7 +75557,7 @@ index ad44fbe..1ac1e64 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1518,5 +1522,6 @@ static void __exit sdhci_drv_exit(void) +@@ -1389,5 +1393,6 @@ static void __exit sdhci_drv_exit(void) MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); @@ -75801,20 +75568,20 @@ index ad44fbe..1ac1e64 100644 1.8.1.6 -From 919d96f78e7bd8a62d63fee97a8701dafdc93f64 Mon Sep 17 00:00:00 2001 +From d3c4bf4da40415ed87bb27a08a9c88a423f84248 Mon Sep 17 00:00:00 2001 From: ddv2005 Date: Sun, 5 Aug 2012 10:42:12 -0400 -Subject: [PATCH 34/95] Fix spinlock recursion in sdhci-bcm2708.c +Subject: [PATCH 34/98] Fix spinlock recursion in sdhci-bcm2708.c --- drivers/mmc/host/sdhci-bcm2708.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 1ac1e64..e2eab34 100644 +index 8243593..7a703c2 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -652,11 +652,11 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) +@@ -643,11 +643,11 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data) { struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); @@ -75828,7 +75595,7 @@ index 1ac1e64..e2eab34 100644 if (host_priv->dma_wanted) { if (NULL == data) { -@@ -736,7 +736,7 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) +@@ -727,7 +727,7 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) #endif } @@ -75837,7 +75604,7 @@ index 1ac1e64..e2eab34 100644 } -@@ -749,11 +749,11 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -740,11 +740,11 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, int sg_len; int sg_ix; int sg_todo; @@ -75851,7 +75618,7 @@ index 1ac1e64..e2eab34 100644 data = host->data; #ifdef CHECK_DMA_USE -@@ -778,7 +778,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -769,7 +769,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, if (NULL == data) { DBG("PDMA unused completion - status 0x%X\n", dma_cs); @@ -75860,7 +75627,7 @@ index 1ac1e64..e2eab34 100644 return; } sg = data->sg; -@@ -871,7 +871,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, +@@ -862,7 +862,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, SDHCI_INT_SPACE_AVAIL); } } @@ -75873,10 +75640,10 @@ index 1ac1e64..e2eab34 100644 1.8.1.6 -From 8e771d01ea375a187fd510f836a4cb83abd74f3d Mon Sep 17 00:00:00 2001 +From 70772a7eeb670f5e92079ec07d0369bc9e92aae8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 13:34:40 +0000 -Subject: [PATCH 35/95] Update Synopsys USB OTG driver to v2.94a and disable +Subject: [PATCH 35/98] Update Synopsys USB OTG driver to v2.94a and disable CRYPTOLIB --- @@ -110562,10 +110329,10 @@ index e8220ad..8dc648b 100644 1.8.1.6 -From bd620a2625e4d0cdf924c8100d14095d59b367ad Mon Sep 17 00:00:00 2001 +From 9214ddc59aa8f08d877c9ee1a84f491788562e2e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 19 Aug 2012 11:58:01 +0100 -Subject: [PATCH 36/95] Merged in microframe scheduler, currently disabled. +Subject: [PATCH 36/98] Merged in microframe scheduler, currently disabled. Enable with dwc_otg.microframe_schedule=1 --- @@ -111298,10 +111065,10 @@ index 903a902..08c1669 100644 1.8.1.6 -From b0b228f4abd55993e03e6a1b56431bdc57f93c93 Mon Sep 17 00:00:00 2001 +From 0eb490f3c7878b058da12a996573fc2b57a53817 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 21 Aug 2012 18:49:44 +0100 -Subject: [PATCH 37/95] Read memory size for vc_mem through mailbox property +Subject: [PATCH 37/98] Read memory size for vc_mem through mailbox property channel --- @@ -111472,10 +111239,10 @@ index 67c10ee..775c213 100644 1.8.1.6 -From 4a3b8b15bf9c309dc66b63faec89aef2dd55f48b Mon Sep 17 00:00:00 2001 +From 02d7648325d15cbccbdb57cba620d7ed8fa9621b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 22 Aug 2012 12:43:36 +0100 -Subject: [PATCH 38/95] Update to dwc_otg 3.00. Seems to be a very minor update +Subject: [PATCH 38/98] Update to dwc_otg 3.00. Seems to be a very minor update (mostly adding support for a newer version of hardware) --- @@ -113927,10 +113694,10 @@ index 8dc648b..0572642 100644 1.8.1.6 -From caaf0b3cf7f2dc22ea6d5bcc775e05406a1e63dc Mon Sep 17 00:00:00 2001 +From 48f266f03ce22587aca96efb123ddc1912d99533 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 39/95] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 39/98] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) --- @@ -113993,10 +113760,10 @@ index 510be0b..d61e747 100644 1.8.1.6 -From d66cb6a6d2487d01bdfd744531af3da8181c8006 Mon Sep 17 00:00:00 2001 +From 0a0fb275d0e029be4749eea14fee73523af7ef6d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 24 Aug 2012 23:25:13 +0100 -Subject: [PATCH 40/95] Turn on microframe_schedule by default. Can still be +Subject: [PATCH 40/98] Turn on microframe_schedule by default. Can still be disabled on command line --- @@ -114020,32 +113787,32 @@ index 8ddc9ae..e7f99e1 100644 1.8.1.6 -From 9a1ed9ad7559a9fff4fdba6ad19b3aa78995dc82 Mon Sep 17 00:00:00 2001 +From 11b684d148ae600198a9fbf8ae709c43e96c0d2f Mon Sep 17 00:00:00 2001 From: popcornmix -Date: Wed, 1 May 2013 20:53:06 +0100 -Subject: [PATCH 41/95] Add low-latency mode to sdcard driver. Enable with - sdhci-bcm2708.enable_llm=1. Thanks ddv2005. +Date: Sun, 12 May 2013 12:27:48 +0100 +Subject: [PATCH 41/98] Add low-latency mode to sdcard driver. Disable with + sdhci-bcm2708.enable_llm=0. Thanks ddv2005. --- - drivers/mmc/host/sdhci-bcm2708.c | 17 +++-- - drivers/mmc/host/sdhci.c | 155 +++++++++++++++++++++++++++++---------- + drivers/mmc/host/sdhci-bcm2708.c | 17 ++-- + drivers/mmc/host/sdhci.c | 165 ++++++++++++++++++++++++++++++--------- drivers/mmc/host/sdhci.h | 6 ++ include/linux/mmc/sdhci.h | 1 + - 4 files changed, 135 insertions(+), 44 deletions(-) + 4 files changed, 145 insertions(+), 44 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index e2eab34..d0acde7 100644 +index 7a703c2..7ce2829 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -140,6 +140,7 @@ static inline unsigned long int since_ns(hptime_t t) +@@ -135,6 +135,7 @@ static inline unsigned long int since_ns(hptime_t t) static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; static bool sync_after_dma = 1; static bool missing_status = 1; -+bool enable_llm = 0; ++bool enable_llm = 1; #if 0 static void hptime_test(void) -@@ -880,12 +881,11 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) +@@ -871,12 +872,11 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) struct sdhci_host *host = dev_id; struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); u32 dma_cs; /* control and status register */ @@ -114059,7 +113826,7 @@ index e2eab34..d0acde7 100644 dma_cs = readl(host_priv->dma_chan_base + BCM2708_DMA_CS); -@@ -926,8 +926,7 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) +@@ -917,8 +917,7 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) result = IRQ_HANDLED; } @@ -114069,7 +113836,7 @@ index e2eab34..d0acde7 100644 return result; } -@@ -1314,9 +1313,12 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1193,9 +1192,12 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) sdhci_bcm2708_ops.missing_status = sdhci_bcm2708_missing_status; } @@ -114082,7 +113849,7 @@ index e2eab34..d0acde7 100644 host->quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | -@@ -1382,12 +1384,13 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1256,12 +1258,13 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) } host_priv->dma_chan = ret; @@ -114098,7 +113865,7 @@ index e2eab34..d0acde7 100644 DBG("DMA CBs %p handle %08X DMA%d %p DMA IRQ %d\n", host_priv->cb_base, (unsigned)host_priv->cb_handle, host_priv->dma_chan, host_priv->dma_chan_base, -@@ -1513,6 +1516,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1384,6 +1387,7 @@ static void __exit sdhci_drv_exit(void) module_param(emmc_clock_freq, int, 0444); module_param(sync_after_dma, bool, 0444); module_param(missing_status, bool, 0444); @@ -114106,7 +113873,7 @@ index e2eab34..d0acde7 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1523,5 +1527,6 @@ static void __exit sdhci_drv_exit(void) +@@ -1394,5 +1398,6 @@ static void __exit sdhci_drv_exit(void) MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); @@ -114114,10 +113881,10 @@ index e2eab34..d0acde7 100644 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 79f9efd..8da17c0 100644 +index 71e2696..c9dcd22 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -124,6 +124,79 @@ static void sdhci_dumpregs(struct sdhci_host *host) +@@ -124,6 +124,91 @@ static void sdhci_dumpregs(struct sdhci_host *host) * Low level functions * * * \*****************************************************************************/ @@ -114126,6 +113893,7 @@ index 79f9efd..8da17c0 100644 +void sdhci_spin_lock(struct sdhci_host *host) +{ + spin_lock(&host->lock); ++#ifdef CONFIG_PREEMPT + if(enable_llm) + { + disable_irq_nosync(host->irq); @@ -114133,22 +113901,26 @@ index 79f9efd..8da17c0 100644 + disable_irq_nosync(host->second_irq); + local_irq_enable(); + } ++#endif +} + +void sdhci_spin_unlock(struct sdhci_host *host) +{ ++#ifdef CONFIG_PREEMPT + if(enable_llm) + { + local_irq_disable(); -+ enable_irq(host->irq); + if(host->second_irq) + enable_irq(host->second_irq); ++ enable_irq(host->irq); + } ++#endif + spin_unlock(&host->lock); +} + +void sdhci_spin_lock_irqsave(struct sdhci_host *host,unsigned long *flags) +{ ++#ifdef CONFIG_PREEMPT + if(enable_llm) + { + while(sdhci_locked) @@ -114162,52 +113934,49 @@ index 79f9efd..8da17c0 100644 + local_irq_enable(); + } + else ++#endif + spin_lock_irqsave(&host->lock,*flags); +} + +void sdhci_spin_unlock_irqrestore(struct sdhci_host *host,unsigned long flags) +{ ++#ifdef CONFIG_PREEMPT + if(enable_llm) + { + local_irq_disable(); -+ enable_irq(host->irq); + if(host->second_irq) + enable_irq(host->second_irq); ++ enable_irq(host->irq); + } ++#endif + spin_unlock_irqrestore(&host->lock,flags); +} + +static void sdhci_spin_enable_schedule(struct sdhci_host *host) +{ ++#ifdef CONFIG_PREEMPT + if(enable_llm) + { + sdhci_locked = 1; + preempt_enable(); + } ++#endif +} + +static void sdhci_spin_disable_schedule(struct sdhci_host *host) +{ ++#ifdef CONFIG_PREEMPT + if(enable_llm) + { + preempt_disable(); + sdhci_locked = 0; + } ++#endif +} static void sdhci_clear_set_irqs(struct sdhci_host *host, u32 clear, u32 set) { -@@ -208,7 +281,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) - return; - } - timeout--; -+ sdhci_spin_enable_schedule(host); - mdelay(1); -+ sdhci_spin_disable_schedule(host); - } - - if (host->ops->platform_reset_exit) -@@ -289,7 +364,7 @@ static void sdhci_led_control(struct led_classdev *led, +@@ -289,7 +374,7 @@ static void sdhci_led_control(struct led_classdev *led, struct sdhci_host *host = container_of(led, struct sdhci_host, led); unsigned long flags; @@ -114216,7 +113985,7 @@ index 79f9efd..8da17c0 100644 if (host->runtime_suspended) goto out; -@@ -299,7 +374,7 @@ static void sdhci_led_control(struct led_classdev *led, +@@ -299,7 +384,7 @@ static void sdhci_led_control(struct led_classdev *led, else sdhci_activate_led(host); out: @@ -114225,7 +113994,7 @@ index 79f9efd..8da17c0 100644 } #endif -@@ -1007,7 +1082,9 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) +@@ -1007,7 +1092,9 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) return; } timeout--; @@ -114235,7 +114004,7 @@ index 79f9efd..8da17c0 100644 } DBG("send cmd %d - wait 0x%X irq 0x%x\n", cmd->opcode, mask, sdhci_readl(host, SDHCI_INT_STATUS)); -@@ -1234,7 +1311,9 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) +@@ -1234,7 +1321,9 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) return; } timeout--; @@ -114245,7 +114014,7 @@ index 79f9efd..8da17c0 100644 } clk |= SDHCI_CLOCK_CARD_EN; -@@ -1359,7 +1438,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -1330,7 +1419,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) sdhci_runtime_pm_get(host); @@ -114254,7 +114023,7 @@ index 79f9efd..8da17c0 100644 WARN_ON(host->mrq != NULL); -@@ -1417,9 +1496,9 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -1388,9 +1477,9 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) mmc->card->type == MMC_TYPE_MMC ? MMC_SEND_TUNING_BLOCK_HS200 : MMC_SEND_TUNING_BLOCK; @@ -114266,7 +114035,7 @@ index 79f9efd..8da17c0 100644 /* Restore original mmc_request structure */ host->mrq = mrq; -@@ -1433,7 +1512,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -1404,7 +1493,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) } mmiowb(); @@ -114275,9 +114044,9 @@ index 79f9efd..8da17c0 100644 } static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) -@@ -1443,10 +1522,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1413,10 +1502,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) + int vdd_bit = -1; u8 ctrl; - int rc; - spin_lock_irqsave(&host->lock, flags); + sdhci_spin_lock_irqsave(host, &flags); @@ -114288,7 +114057,7 @@ index 79f9efd..8da17c0 100644 if (host->vmmc && ios->power_mode == MMC_POWER_OFF) mmc_regulator_set_ocr(host->mmc, host->vmmc, 0); return; -@@ -1473,9 +1552,9 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1443,9 +1532,9 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) vdd_bit = sdhci_set_power(host, ios->vdd); if (host->vmmc && vdd_bit != -1) { @@ -114300,16 +114069,16 @@ index 79f9efd..8da17c0 100644 } if (host->ops->platform_send_init_74_clocks) -@@ -1614,7 +1693,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1583,7 +1672,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); mmiowb(); - spin_unlock_irqrestore(&host->lock, flags); + sdhci_spin_unlock_irqrestore(host, flags); + } - if (ios->power_mode == MMC_POWER_OFF) { - do -@@ -1637,7 +1716,7 @@ static int sdhci_check_ro(struct sdhci_host *host) + static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -1600,7 +1689,7 @@ static int sdhci_check_ro(struct sdhci_host *host) unsigned long flags; int is_readonly; @@ -114318,7 +114087,7 @@ index 79f9efd..8da17c0 100644 if (host->flags & SDHCI_DEVICE_DEAD) is_readonly = 0; -@@ -1647,7 +1726,7 @@ static int sdhci_check_ro(struct sdhci_host *host) +@@ -1610,7 +1699,7 @@ static int sdhci_check_ro(struct sdhci_host *host) is_readonly = !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_WRITE_PROTECT); @@ -114327,7 +114096,7 @@ index 79f9efd..8da17c0 100644 /* This quirk needs to be replaced by a callback-function later */ return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ? -@@ -1720,9 +1799,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) +@@ -1683,9 +1772,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -114339,7 +114108,7 @@ index 79f9efd..8da17c0 100644 } static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, -@@ -2066,7 +2145,7 @@ static void sdhci_card_event(struct mmc_host *mmc) +@@ -2029,7 +2118,7 @@ static void sdhci_card_event(struct mmc_host *mmc) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -114348,7 +114117,7 @@ index 79f9efd..8da17c0 100644 /* Check host->mrq first in case we are runtime suspended */ if (host->mrq && -@@ -2083,7 +2162,7 @@ static void sdhci_card_event(struct mmc_host *mmc) +@@ -2046,7 +2135,7 @@ static void sdhci_card_event(struct mmc_host *mmc) tasklet_schedule(&host->finish_tasklet); } @@ -114357,7 +114126,7 @@ index 79f9efd..8da17c0 100644 } static const struct mmc_host_ops sdhci_ops = { -@@ -2121,14 +2200,14 @@ static void sdhci_tasklet_finish(unsigned long param) +@@ -2084,14 +2173,14 @@ static void sdhci_tasklet_finish(unsigned long param) host = (struct sdhci_host*)param; @@ -114374,7 +114143,7 @@ index 79f9efd..8da17c0 100644 return; } -@@ -2166,7 +2245,7 @@ static void sdhci_tasklet_finish(unsigned long param) +@@ -2129,7 +2218,7 @@ static void sdhci_tasklet_finish(unsigned long param) #endif mmiowb(); @@ -114383,7 +114152,7 @@ index 79f9efd..8da17c0 100644 mmc_request_done(host->mmc, mrq); sdhci_runtime_pm_put(host); -@@ -2179,7 +2258,7 @@ static void sdhci_timeout_timer(unsigned long data) +@@ -2142,7 +2231,7 @@ static void sdhci_timeout_timer(unsigned long data) host = (struct sdhci_host*)data; @@ -114392,7 +114161,7 @@ index 79f9efd..8da17c0 100644 if (host->mrq) { pr_err("%s: Timeout waiting for hardware " -@@ -2200,7 +2279,7 @@ static void sdhci_timeout_timer(unsigned long data) +@@ -2163,7 +2252,7 @@ static void sdhci_timeout_timer(unsigned long data) } mmiowb(); @@ -114401,7 +114170,7 @@ index 79f9efd..8da17c0 100644 } static void sdhci_tuning_timer(unsigned long data) -@@ -2210,11 +2289,11 @@ static void sdhci_tuning_timer(unsigned long data) +@@ -2173,11 +2262,11 @@ static void sdhci_tuning_timer(unsigned long data) host = (struct sdhci_host *)data; @@ -114415,7 +114184,7 @@ index 79f9efd..8da17c0 100644 } /*****************************************************************************\ -@@ -2438,10 +2517,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2401,10 +2490,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) u32 intmask, unexpected = 0; int cardint = 0, max_loops = 16; @@ -114428,7 +114197,7 @@ index 79f9efd..8da17c0 100644 pr_warning("%s: got irq while runtime suspended\n", mmc_hostname(host->mmc)); return IRQ_HANDLED; -@@ -2545,7 +2624,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2508,7 +2597,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) if (intmask && --max_loops) goto again; out: @@ -114437,7 +114206,7 @@ index 79f9efd..8da17c0 100644 if (unexpected) { pr_err("%s: Unexpected interrupt 0x%08x.\n", -@@ -2713,15 +2792,15 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) +@@ -2670,15 +2759,15 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) host->flags &= ~SDHCI_NEEDS_RETUNING; } @@ -114457,7 +114226,7 @@ index 79f9efd..8da17c0 100644 return ret; } -@@ -2747,16 +2826,16 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) +@@ -2704,16 +2793,16 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) sdhci_do_start_signal_voltage_switch(host, &host->mmc->ios); if ((host_flags & SDHCI_PV_ENABLED) && !(host->quirks2 & SDHCI_QUIRK2_PRESET_VALUE_BROKEN)) { @@ -114477,7 +114246,7 @@ index 79f9efd..8da17c0 100644 host->runtime_suspended = false; -@@ -2767,7 +2846,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) +@@ -2724,7 +2813,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) /* Enable Card Detection */ sdhci_enable_card_detection(host); @@ -114486,7 +114255,7 @@ index 79f9efd..8da17c0 100644 return ret; } -@@ -3254,7 +3333,7 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -3211,7 +3300,7 @@ int sdhci_add_host(struct sdhci_host *host) host->tuning_timer.function = sdhci_tuning_timer; } @@ -114495,7 +114264,7 @@ index 79f9efd..8da17c0 100644 mmc_hostname(mmc), host); if (ret) { pr_err("%s: Failed to request IRQ %d: %d\n", -@@ -3318,7 +3397,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) +@@ -3275,7 +3364,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) unsigned long flags; if (dead) { @@ -114504,7 +114273,7 @@ index 79f9efd..8da17c0 100644 host->flags |= SDHCI_DEVICE_DEAD; -@@ -3330,7 +3409,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) +@@ -3287,7 +3376,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) tasklet_schedule(&host->finish_tasklet); } @@ -114514,10 +114283,10 @@ index 79f9efd..8da17c0 100644 sdhci_disable_card_detection(host); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h -index 45592d2..9932ae8 100644 +index f90574e..cc393af 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h -@@ -446,4 +446,10 @@ static inline void *sdhci_priv(struct sdhci_host *host) +@@ -441,4 +441,10 @@ static inline void *sdhci_priv(struct sdhci_host *host) extern int sdhci_runtime_resume_host(struct sdhci_host *host); #endif @@ -114544,37 +114313,10 @@ index f3a39c1..58bfab0 100644 1.8.1.6 -From a03921149702b50c7504a67cc69c75b312689f97 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 31 Aug 2012 12:53:51 +0100 -Subject: [PATCH 42/95] Enable low latency mode by default in sdcard driver. - Can be disabled with sdhci-bcm2708.enable_llm=0 - ---- - drivers/mmc/host/sdhci-bcm2708.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index d0acde7..2703103 100644 ---- a/drivers/mmc/host/sdhci-bcm2708.c -+++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -140,7 +140,7 @@ static inline unsigned long int since_ns(hptime_t t) - static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; - static bool sync_after_dma = 1; - static bool missing_status = 1; --bool enable_llm = 0; -+bool enable_llm = 1; - - #if 0 - static void hptime_test(void) --- -1.8.1.6 - - -From d9951935d16acffeb8442751e5b910305404cca6 Mon Sep 17 00:00:00 2001 +From 78459294cc7f7f6d78851b7b343aad0a4b94982d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 12:02:03 +0100 -Subject: [PATCH 43/95] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 42/98] Add FIQ patch to dwc_otg driver. Enable with dwc_otg.fiq_fix_enable=1. Should give about 10% more ARM performance. Thanks to Gordon and Costas @@ -115734,10 +115476,10 @@ index a7e9076..bb1c42d 100644 1.8.1.6 -From 790f4ed6331cc3328eb7d7510458459160bad414 Mon Sep 17 00:00:00 2001 +From 27cb36d5d42e9121b7f79e631e0e3190dd886a40 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 -Subject: [PATCH 46/95] Add verious user config requests. +Subject: [PATCH 45/98] Add verious user config requests. CONFIG_DEVTMPFS_MOUNT, CONFIG_NFS_V4_1=y CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y, drbd and IPSEC modules @@ -116147,10 +115889,10 @@ index 31f5afaa..ef43466 100644 1.8.1.6 -From 3f20000a1d7914490fb412d0c30601d1fafbb759 Mon Sep 17 00:00:00 2001 +From ac3412470183a71d5c5b762fb6c81c6b9ee31193 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 14:49:16 +0100 -Subject: [PATCH 47/95] Don't believe KDIR is required when building as part of +Subject: [PATCH 46/98] Don't believe KDIR is required when building as part of kernel --- @@ -116178,10 +115920,10 @@ index 203c7ea..63e3485 100644 1.8.1.6 -From 736f10345c26243dc1b29371135dd9f440f15972 Mon Sep 17 00:00:00 2001 +From c91242c1f74e5dfde52fc6180508f4f0115aebdf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 15:17:53 +0100 -Subject: [PATCH 48/95] Avoid dynamic memory allocation for channel lock in USB +Subject: [PATCH 47/98] Avoid dynamic memory allocation for channel lock in USB driver. Thanks ddv2005. --- @@ -116288,10 +116030,10 @@ index f1658fa..21e8f09 100644 1.8.1.6 -From 68ca431893f399302cd3869ee509628f92cc95f5 Mon Sep 17 00:00:00 2001 +From 7e235aaefd873d791af85bdb26beae2db6235773 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 12:04:44 +0100 -Subject: [PATCH 49/95] Add cpufreq driver +Subject: [PATCH 48/98] Add cpufreq driver --- arch/arm/Kconfig | 1 + @@ -116819,10 +116561,10 @@ index 0000000..aa6fc66 1.8.1.6 -From c18c17004d6f1d7f72d8a12ec9494e883a43abf9 Mon Sep 17 00:00:00 2001 +From 6bfd6f15475d8c57145fcefa1513c1de8ae4cb47 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 8 Apr 2013 21:12:48 +0100 -Subject: [PATCH 50/95] Add NAK holdoff scheme. Enabled by default, disable +Subject: [PATCH 49/98] Add NAK holdoff scheme. Enabled by default, disable with dwc_otg.nak_holdoff_enable=0. Thanks gsh --- @@ -117032,10 +116774,10 @@ index ac10323..e6b2a7b 100644 1.8.1.6 -From 04a378c1036eb1c92290b7268144c4f94e07d05c Mon Sep 17 00:00:00 2001 +From d793bfa36883079927d2b4ac45e0824b408e4cd9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 51/95] Added hwmon/thermal driver for reporting core +Subject: [PATCH 50/98] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- @@ -117559,10 +117301,10 @@ index 0000000..f1ecdb2 1.8.1.6 -From 7268e463bed7aede375481f6ed48c70b315df6bc Mon Sep 17 00:00:00 2001 +From 6a7dd4bc5dde74ca7a769aa0fa3a7bd6213552a5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:59:27 +0100 -Subject: [PATCH 52/95] Add config options for thermal sensor, L2TP, +Subject: [PATCH 51/98] Add config options for thermal sensor, L2TP, RT2800USB_UNKNOWN, and various I2C and SPI RTCs. Tidy of thermal driver. --- @@ -117730,10 +117472,10 @@ index f1ecdb2..3f9a733 100644 1.8.1.6 -From dbb27e6e511589e6d951a4fc6dd90ae4c87aaccf Mon Sep 17 00:00:00 2001 +From 3c1fc05cfc59dd1be85600f2bca94d7700e70d25 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Mar 2013 01:19:54 +0000 -Subject: [PATCH 53/95] 2708fb: Remove some unnecessary dmesg output. +Subject: [PATCH 52/98] 2708fb: Remove some unnecessary dmesg output. --- drivers/video/bcm2708_fb.c | 34 +++++++++++++++++++--------------- @@ -117860,10 +117602,10 @@ index c82dd90..08d9238 100644 1.8.1.6 -From fa830efc9affbb36f0ef96b97e337dc76c7b6a78 Mon Sep 17 00:00:00 2001 +From 083eb06994b92388ff59bfb7e708606cc297638f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Mar 2013 01:20:34 +0000 -Subject: [PATCH 54/95] cpufreq: Remove some unnecessary dmesg output. +Subject: [PATCH 53/98] cpufreq: Remove some unnecessary dmesg output. --- drivers/cpufreq/bcm2835-cpufreq.c | 2 +- @@ -117886,10 +117628,10 @@ index aa6fc66..6ff1edb 100755 1.8.1.6 -From b69b507614b12eb36d6c9ab9c69bc83a7d3d0e00 Mon Sep 17 00:00:00 2001 +From 0c20134fb009a06049dd26b994a70085002cf4cc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 17 Sep 2012 22:57:29 +0100 -Subject: [PATCH 55/95] Switch to powersave governor. We'll enable ondemand in +Subject: [PATCH 54/98] Switch to powersave governor. We'll enable ondemand in the distribution --- @@ -117917,10 +117659,10 @@ index d11f688..c1afa47 100644 1.8.1.6 -From 69c9c89722e48fec53c8e7260b77bdaf6d39b99f Mon Sep 17 00:00:00 2001 +From c5cea896a470a53f8d427b035233e465cb0105e9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Apr 2013 12:16:36 +0100 -Subject: [PATCH 56/95] Enable multiple ALSA channels +Subject: [PATCH 55/98] Enable multiple ALSA channels --- arch/arm/mach-bcm2708/bcm2708.c | 54 ++++++++++++++++++++++++++++++++++++----- @@ -117995,10 +117737,10 @@ index 2875cd2..27e9553 100644 1.8.1.6 -From 3f3eccd9a846adf02d10ad69465943a65739bb3b Mon Sep 17 00:00:00 2001 +From 79058dfc58b650b2b8759e27491c96337b23cb6c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Oct 2012 20:08:19 +0100 -Subject: [PATCH 57/95] set i2c speed via module-parameter or menuconfig. +Subject: [PATCH 56/98] set i2c speed via module-parameter or menuconfig. Thanks FrankBoesing --- @@ -118073,10 +117815,10 @@ index 7cae615..3391889 100644 1.8.1.6 -From 1f7f1d615177aaba6bae39baf3e0c074307c7c71 Mon Sep 17 00:00:00 2001 +From dd419344111e0c10e560adf4ed069b74ab67e531 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Oct 2012 21:31:48 +0100 -Subject: [PATCH 58/95] Allow the number of cycles delay between sdcard +Subject: [PATCH 57/98] Allow the number of cycles delay between sdcard peripheral writes to be specified on command line with sdhci-bcm2708.cycle_delay @@ -118085,10 +117827,10 @@ Subject: [PATCH 58/95] Allow the number of cycles delay between sdcard 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 2703103..80e4228 100644 +index 7ce2829..ffd7310 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -82,6 +82,8 @@ +@@ -77,6 +77,8 @@ #define REG_EXRDFIFO_EN 0x80 #define REG_EXRDFIFO_CFG 0x84 @@ -118097,7 +117839,7 @@ index 2703103..80e4228 100644 /*****************************************************************************\ * * * Debug * -@@ -254,7 +256,7 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) +@@ -249,7 +251,7 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) /* host->clock is the clock freq in Hz */ static hptime_t last_write_hpt; hptime_t now = hptime(); @@ -118106,7 +117848,7 @@ index 2703103..80e4228 100644 if (now == last_write_hpt || now == last_write_hpt+1) { /* we can't guarantee any significant time has -@@ -1517,6 +1519,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1388,6 +1390,7 @@ static void __exit sdhci_drv_exit(void) module_param(sync_after_dma, bool, 0444); module_param(missing_status, bool, 0444); module_param(enable_llm, bool, 0444); @@ -118118,10 +117860,10 @@ index 2703103..80e4228 100644 1.8.1.6 -From b220aacb415f9c27ba17cbf0bf1a9141f32f9b2a Mon Sep 17 00:00:00 2001 +From 074b0842b2feeb4bf924b4642217206ba10ce1b8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Apr 2013 14:37:25 +0100 -Subject: [PATCH 59/95] Fix vc-mem by using module parameters +Subject: [PATCH 58/98] Fix vc-mem by using module parameters --- arch/arm/mach-bcm2708/bcm2708.c | 12 ++--- @@ -118356,10 +118098,10 @@ index ae1810c..5c56b31 100644 1.8.1.6 -From 13f54027174a3fb2798bbddaaea57f95e072ae84 Mon Sep 17 00:00:00 2001 +From e2a149d5cb1132424aa8eb7841e9c4001e46a65d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 5 Oct 2012 22:44:47 +0100 -Subject: [PATCH 60/95] Support dummy vc-mem ioctl used by vcdbg +Subject: [PATCH 59/98] Support dummy vc-mem ioctl used by vcdbg --- arch/arm/mach-bcm2708/include/mach/vc_mem.h | 1 + @@ -118407,10 +118149,10 @@ index 5c56b31..f12cb49 100644 1.8.1.6 -From 67bb97a7ddc0c18b18738c8d8cba6954f3668c85 Mon Sep 17 00:00:00 2001 +From 1a618d1167c4fd3b5ae1009d901bd37582dc4df0 Mon Sep 17 00:00:00 2001 From: dero Date: Mon, 19 Nov 2012 12:46:06 +0100 -Subject: [PATCH 61/95] Lazy CRC quirk: Implemented retrying mechanisms for SD +Subject: [PATCH 60/98] Lazy CRC quirk: Implemented retrying mechanisms for SD SSR and SCR, disabled missing_status and spurious CRC ACMD51 quirks by default (should be fixed by the retrying-mechanishm) @@ -118582,10 +118324,10 @@ index 9e645e1..1ee6cf3 100644 /* * Fetch and process SD Status register. diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 80e4228..4d6c616 100644 +index ffd7310..3556ed3 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -142,6 +142,7 @@ static inline unsigned long int since_ns(hptime_t t) +@@ -137,6 +137,7 @@ static inline unsigned long int since_ns(hptime_t t) static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; static bool sync_after_dma = 1; static bool missing_status = 1; @@ -118593,7 +118335,7 @@ index 80e4228..4d6c616 100644 bool enable_llm = 1; #if 0 -@@ -1220,7 +1221,7 @@ static unsigned int sdhci_bcm2708_quirk_extra_ints(struct sdhci_host *host) +@@ -1103,7 +1104,7 @@ static unsigned int sdhci_bcm2708_quirk_extra_ints(struct sdhci_host *host) return 1; } @@ -118602,7 +118344,7 @@ index 80e4228..4d6c616 100644 { return 1; } -@@ -1270,7 +1271,6 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) +@@ -1149,7 +1150,6 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) .pdma_reset = sdhci_bcm2708_platdma_reset, #endif .extra_ints = sdhci_bcm2708_quirk_extra_ints, @@ -118610,7 +118352,7 @@ index 80e4228..4d6c616 100644 .voltage_broken = sdhci_bcm2708_quirk_voltage_broken, .uhs_broken = sdhci_bcm2708_uhs_broken, }; -@@ -1315,6 +1315,11 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) +@@ -1194,6 +1194,11 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) sdhci_bcm2708_ops.missing_status = sdhci_bcm2708_missing_status; } @@ -118622,7 +118364,7 @@ index 80e4228..4d6c616 100644 printk("sdhci: %s low-latency mode\n",enable_llm?"Enable":"Disable"); host->hw_name = "BCM2708_Arasan"; -@@ -1518,6 +1523,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1389,6 +1394,7 @@ static void __exit sdhci_drv_exit(void) module_param(emmc_clock_freq, int, 0444); module_param(sync_after_dma, bool, 0444); module_param(missing_status, bool, 0444); @@ -118630,7 +118372,7 @@ index 80e4228..4d6c616 100644 module_param(enable_llm, bool, 0444); module_param(cycle_delay, int, 0444); -@@ -1530,6 +1536,7 @@ static void __exit sdhci_drv_exit(void) +@@ -1401,6 +1407,7 @@ static void __exit sdhci_drv_exit(void) MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); @@ -118642,578 +118384,10 @@ index 80e4228..4d6c616 100644 1.8.1.6 -From fdcef746471a1baddb8a5e09f7778491de6d9bb1 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 12 Apr 2013 22:41:19 +0100 -Subject: [PATCH 62/95] mmc:sdhci-bcm2708.c:Fix up issues with rebase - ---- - drivers/mmc/host/sdhci-bcm2708.c | 137 ++------------------------------------- - 1 file changed, 4 insertions(+), 133 deletions(-) - -diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 4d6c616..3556ed3 100644 ---- a/drivers/mmc/host/sdhci-bcm2708.c -+++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -33,7 +33,6 @@ - #include - #include - #include --#include - - #include "sdhci.h" - -@@ -75,10 +74,6 @@ - /* Mhz clock that the EMMC core is running at. Should match the platform clockman settings */ - #define BCM2708_EMMC_CLOCK_FREQ 50000000 - --#define POWER_OFF 0 --#define POWER_LAZY_OFF 1 --#define POWER_ON 2 -- - #define REG_EXRDFIFO_EN 0x80 - #define REG_EXRDFIFO_CFG 0x84 - -@@ -387,10 +382,6 @@ struct sdhci_bcm2708_priv { - /* tracking scatter gather progress */ - unsigned sg_ix; /* scatter gather list index */ - unsigned sg_done; /* bytes in current sg_ix done */ -- /* power management */ -- BCM_POWER_HANDLE_T power_handle; -- unsigned char power_state; /* enable/disable power state */ -- unsigned char power_mode; /* last set power mode */ - #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA - unsigned char dma_wanted; /* DMA transfer requested */ - unsigned char dma_waits; /* wait states in DMAs */ -@@ -1044,7 +1035,6 @@ static ssize_t attr_status_show(struct device *_dev, - - if (host) { - struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -- int power_state = host_priv->power_state; - return sprintf(buf, - "present: yes\n" - "power: %s\n" -@@ -1054,10 +1044,7 @@ static ssize_t attr_status_show(struct device *_dev, - #else - "dma: unconfigured\n", - #endif -- power_state == POWER_ON? "on": -- power_state == POWER_OFF? "off": -- power_state == POWER_LAZY_OFF? "lazy-off": -- "", -+ "always on", - host->clock - #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA - , (host->flags & SDHCI_USE_PLATDMA)? "on": "off" -@@ -1106,110 +1093,6 @@ static int sdhci_bcm2708_resume(struct platform_device *dev) - #endif - - --/* Click forwards one step towards fully on */ --static int sdhci_bcm2708_enable(struct sdhci_host *host) --{ -- int rc; -- struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -- -- if (host_priv->power_state == POWER_OFF) { -- /* warning: may schedule - don't call in irq mode */ -- rc = bcm_power_request(host_priv->power_handle, -- BCM_POWER_SDCARD); -- -- if (rc == 0) { -- mmc_power_restore_host(host->mmc); -- host_priv->power_state = POWER_ON; -- } else if (rc != -EINTR) -- printk(KERN_ERR "%s: mmc power up request failed - " -- "rc %d\n", -- mmc_hostname(host->mmc), rc); -- } else { -- host_priv->power_state = POWER_ON; -- rc = 0; -- } -- -- return rc; --} -- --/* Click backwards one step towards fully off */ --static int sdhci_bcm2708_disable(struct sdhci_host *host, int lazy) --{ -- int rc; -- struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -- -- if ((host_priv->power_state == POWER_ON) && lazy) { -- host_priv->power_state = POWER_LAZY_OFF; -- return BCM2708_SDHCI_SLEEP_TIMEOUT; -- } -- -- /* warning: may schedule - don't call in irq mode */ -- rc = bcm_power_request(host_priv->power_handle, BCM_POWER_NONE); -- -- if (rc == 0) -- host_priv->power_state = POWER_OFF; -- else if (rc != -EINTR) -- printk(KERN_ERR "%s: mmc power down request failed - rc %d\n", -- mmc_hostname(host->mmc), rc); -- -- return rc; --} -- --static int sdhci_bcm2708_set_plat_power(struct sdhci_host *host, -- int power_mode) --{ -- struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); -- int rc; -- -- do { -- rc = mmc_host_enable(host->mmc); -- } while (-EINTR == rc); -- -- if (rc == 0) do { -- if (rc == 0 && power_mode != host_priv->power_mode) -- { -- switch (power_mode) -- { -- case MMC_POWER_OFF: -- rc = bcm_power_request(host_priv->power_handle, -- BCM_POWER_NONE); -- break; -- -- case MMC_POWER_UP: -- rc = bcm_power_request(host_priv->power_handle, -- BCM_POWER_SDCARD); -- /* -- * We need an extra 10ms delay of 10ms before we -- * can apply clock after applying power -- */ -- if (rc == 0) -- mdelay(10); -- break; -- -- case MMC_POWER_ON: -- mdelay(10); -- /* do_send_init_stream = 1; */ -- break; -- } -- -- if (rc == 0) -- host_priv->power_mode = power_mode; -- } -- } while (-EINTR == rc); -- -- if (rc == 0) do { -- if (rc == 0) { -- if (power_mode == MMC_POWER_OFF) -- rc = mmc_host_disable(host->mmc); -- else -- rc = mmc_host_lazy_disable(host->mmc); -- } -- -- } while (-EINTR == rc); -- -- return rc; --} -- - /*****************************************************************************\ - * * - * Device quirk functions. Implemented as local ops because the flags * -@@ -1260,10 +1143,6 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) - #endif - .get_max_clock = sdhci_bcm2708_get_max_clock, - -- .enable = sdhci_bcm2708_enable, -- .disable = sdhci_bcm2708_disable, -- .set_plat_power = sdhci_bcm2708_set_plat_power, -- - #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA - // Platform DMA operations - .pdma_able = sdhci_bcm2708_platdma_dmaable, -@@ -1281,7 +1160,7 @@ static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) - * * - \*****************************************************************************/ - --static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) -+static int sdhci_bcm2708_probe(struct platform_device *pdev) - { - struct sdhci_host *host; - struct resource *iomem; -@@ -1355,11 +1234,6 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) - - host_priv = SDHCI_HOST_PRIV(host); - -- host_priv->power_state = POWER_ON; -- ret = bcm_power_open(&host_priv->power_handle); -- if (ret != 0) -- goto err_power; -- - #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA - host_priv->dma_wanted = 0; - #ifdef CHECK_DMA_USE -@@ -1441,8 +1315,6 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) - host_priv->cb_handle); - err_alloc_cb: - #endif -- bcm_power_close(host_priv->power_handle); --err_power: - iounmap(host->ioaddr); - err_remap: - release_mem_region(iomem->start, resource_size(iomem)); -@@ -1453,7 +1325,7 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) - return ret; - } - --static int __devexit sdhci_bcm2708_remove(struct platform_device *pdev) -+static int sdhci_bcm2708_remove(struct platform_device *pdev) - { - struct sdhci_host *host = platform_get_drvdata(pdev); - struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -@@ -1475,7 +1347,6 @@ static int __devexit sdhci_bcm2708_remove(struct platform_device *pdev) - dma_free_writecombine(&pdev->dev, SZ_4K, host_priv->cb_base, - host_priv->cb_handle); - #endif -- bcm_power_close(host_priv->power_handle); - sdhci_remove_host(host, dead); - iounmap(host->ioaddr); - release_mem_region(iomem->start, resource_size(iomem)); -@@ -1491,7 +1362,7 @@ static int __devexit sdhci_bcm2708_remove(struct platform_device *pdev) - .owner = THIS_MODULE, - }, - .probe = sdhci_bcm2708_probe, -- .remove = __devexit_p(sdhci_bcm2708_remove), -+ .remove = sdhci_bcm2708_remove, - - #ifdef CONFIG_PM - .suspend = sdhci_bcm2708_suspend, --- -1.8.1.6 - - -From c430bc8ffc9625615504183a8cfdd9408bbcab7a Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 12 Apr 2013 22:41:31 +0100 -Subject: [PATCH 63/95] mmc:sdhci.c:Fix up issues with rebase - ---- - drivers/mmc/host/sdhci.c | 103 ++++++++++++++++------------------------------- - 1 file changed, 35 insertions(+), 68 deletions(-) - -diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 8da17c0..c9dcd22 100644 ---- a/drivers/mmc/host/sdhci.c -+++ b/drivers/mmc/host/sdhci.c -@@ -28,8 +28,8 @@ - #include - #include - #include --#include - #include -+#include - - #include "sdhci.h" - -@@ -129,6 +129,7 @@ static void sdhci_dumpregs(struct sdhci_host *host) - void sdhci_spin_lock(struct sdhci_host *host) - { - spin_lock(&host->lock); -+#ifdef CONFIG_PREEMPT - if(enable_llm) - { - disable_irq_nosync(host->irq); -@@ -136,22 +137,26 @@ void sdhci_spin_lock(struct sdhci_host *host) - disable_irq_nosync(host->second_irq); - local_irq_enable(); - } -+#endif - } - - void sdhci_spin_unlock(struct sdhci_host *host) - { -+#ifdef CONFIG_PREEMPT - if(enable_llm) - { - local_irq_disable(); -- enable_irq(host->irq); - if(host->second_irq) - enable_irq(host->second_irq); -+ enable_irq(host->irq); - } -+#endif - spin_unlock(&host->lock); - } - - void sdhci_spin_lock_irqsave(struct sdhci_host *host,unsigned long *flags) - { -+#ifdef CONFIG_PREEMPT - if(enable_llm) - { - while(sdhci_locked) -@@ -165,37 +170,44 @@ void sdhci_spin_lock_irqsave(struct sdhci_host *host,unsigned long *flags) - local_irq_enable(); - } - else -+#endif - spin_lock_irqsave(&host->lock,*flags); - } - - void sdhci_spin_unlock_irqrestore(struct sdhci_host *host,unsigned long flags) - { -+#ifdef CONFIG_PREEMPT - if(enable_llm) - { - local_irq_disable(); -- enable_irq(host->irq); - if(host->second_irq) - enable_irq(host->second_irq); -+ enable_irq(host->irq); - } -+#endif - spin_unlock_irqrestore(&host->lock,flags); - } - - static void sdhci_spin_enable_schedule(struct sdhci_host *host) - { -+#ifdef CONFIG_PREEMPT - if(enable_llm) - { - sdhci_locked = 1; - preempt_enable(); - } -+#endif - } - - static void sdhci_spin_disable_schedule(struct sdhci_host *host) - { -+#ifdef CONFIG_PREEMPT - if(enable_llm) - { - preempt_disable(); - sdhci_locked = 0; - } -+#endif - } - - static void sdhci_clear_set_irqs(struct sdhci_host *host, u32 clear, u32 set) -@@ -281,9 +293,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) - return; - } - timeout--; -- sdhci_spin_enable_schedule(host); - mdelay(1); -- sdhci_spin_disable_schedule(host); - } - - if (host->ops->platform_reset_exit) -@@ -925,11 +935,11 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) - ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); - ctrl &= ~SDHCI_CTRL_DMA_MASK; - if (! (host->flags & SDHCI_USE_PLATDMA)) { -- if ((host->flags & SDHCI_REQ_USE_DMA) && -- (host->flags & SDHCI_USE_ADMA)) -- ctrl |= SDHCI_CTRL_ADMA32; -- else -- ctrl |= SDHCI_CTRL_SDMA; -+ if ((host->flags & SDHCI_REQ_USE_DMA) && -+ (host->flags & SDHCI_USE_ADMA)) -+ ctrl |= SDHCI_CTRL_ADMA32; -+ else -+ ctrl |= SDHCI_CTRL_SDMA; - } - sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); - } -@@ -1392,35 +1402,6 @@ static int sdhci_set_power(struct sdhci_host *host, unsigned short power) - return power; - } - --/* Power on or off the circuitary supporting the register set */ --static int sdhci_set_plat_power(struct sdhci_host *host, int power_mode) --{ -- if (host->ops->set_plat_power) -- return host->ops->set_plat_power(host, power_mode); -- else -- return 0; --} -- --/* Click forwards one step towards fully on */ --static int sdhci_enable(struct mmc_host *mmc) --{ -- struct sdhci_host *host; -- -- host = mmc_priv(mmc); -- -- return host->ops->enable? host->ops->enable(host): 0; --} -- --/* Click backwards one step towards fully off */ --static int sdhci_disable(struct mmc_host *mmc, int lazy) --{ -- struct sdhci_host *host; -- -- host = mmc_priv(mmc); -- -- return host->ops->disable? host->ops->disable(host, lazy): 0; --} -- - /*****************************************************************************\ - * * - * MMC callbacks * -@@ -1520,7 +1501,6 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) - unsigned long flags; - int vdd_bit = -1; - u8 ctrl; -- int rc; - - sdhci_spin_lock_irqsave(host, &flags); - -@@ -1601,8 +1581,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) - (ios->timing == MMC_TIMING_UHS_SDR50) || - (ios->timing == MMC_TIMING_UHS_SDR104) || - (ios->timing == MMC_TIMING_UHS_DDR50) || -- (ios->timing == MMC_TIMING_UHS_SDR25) || -- (ios->timing == MMC_TIMING_UHS_SDR12)) -+ (ios->timing == MMC_TIMING_UHS_SDR25)) - ctrl |= SDHCI_CTRL_HISPD; - - ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); -@@ -1694,12 +1673,6 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) - - mmiowb(); - sdhci_spin_unlock_irqrestore(host, flags); -- -- if (ios->power_mode == MMC_POWER_OFF) { -- do -- rc = sdhci_set_plat_power(host, ios->power_mode); -- while (rc == -EINTR); -- } - } - - static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) -@@ -2262,7 +2235,7 @@ static void sdhci_timeout_timer(unsigned long data) - - if (host->mrq) { - pr_err("%s: Timeout waiting for hardware " -- "interrupt - cmd%d.\n", mmc_hostname(host->mmc), host->last_cmdop); -+ "interrupt - cmd%d.\n", mmc_hostname(host->mmc), host->last_cmdop); - sdhci_dumpregs(host); - - if (host->data) { -@@ -2308,10 +2281,10 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) - - if (!host->cmd) { - if (!(host->ops->extra_ints)) { -- pr_err("%s: Got command interrupt 0x%08x even " -- "though no command operation was in progress.\n", -- mmc_hostname(host->mmc), (unsigned)intmask); -- sdhci_dumpregs(host); -+ pr_err("%s: Got command interrupt 0x%08x even " -+ "though no command operation was in progress.\n", -+ mmc_hostname(host->mmc), (unsigned)intmask); -+ sdhci_dumpregs(host); - } else - DBG("cmd irq 0x%08x cmd complete\n", (unsigned)intmask); - return; -@@ -2424,12 +2397,12 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) - return; - } - } -- -+ - if (!(host->ops->extra_ints)) { -- pr_err("%s: Got data interrupt 0x%08x even " -- "though no data operation was in progress.\n", -- mmc_hostname(host->mmc), (unsigned)intmask); -- sdhci_dumpregs(host); -+ pr_err("%s: Got data interrupt 0x%08x even " -+ "though no data operation was in progress.\n", -+ mmc_hostname(host->mmc), (unsigned)intmask); -+ sdhci_dumpregs(host); - } else - DBG("data irq 0x%08x but no data\n", (unsigned)intmask); - -@@ -2445,7 +2418,7 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) - DBG("ignoring spurious data_end_bit error\n"); - intmask = SDHCI_INT_DATA_AVAIL|SDHCI_INT_DATA_END; - } else -- host->data->error = -EILSEQ; -+ host->data->error = -EILSEQ; - } else if ((intmask & SDHCI_INT_DATA_CRC) && - SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND)) - != MMC_BUS_TEST_R) { -@@ -2455,7 +2428,7 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) - DBG("ignoring spurious data_crc_bit error\n"); - intmask = SDHCI_INT_DATA_AVAIL|SDHCI_INT_DATA_END; - } else { -- host->data->error = -EILSEQ; -+ host->data->error = -EILSEQ; - } - } else if (intmask & SDHCI_INT_ADMA_ERROR) { - pr_err("%s: ADMA error\n", mmc_hostname(host->mmc)); -@@ -2718,12 +2691,6 @@ int sdhci_resume_host(struct sdhci_host *host) - { - int ret; - -- if (host->vmmc) { -- int ret = regulator_enable(host->vmmc); -- if (ret) -- return ret; -- } -- - if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA | - SDHCI_USE_PLATDMA)) { - if (host->ops->enable_dma) -@@ -3061,7 +3028,7 @@ int sdhci_add_host(struct sdhci_host *host) - /* Auto-CMD23 stuff only works in ADMA or PIO. */ - if ((host->version >= SDHCI_SPEC_300) && - ((host->flags & SDHCI_USE_ADMA) || -- !(host->flags & SDHCI_USE_SDMA) )) { -+ !(host->flags & SDHCI_USE_SDMA))) { - host->flags |= SDHCI_AUTO_CMD23; - DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc)); - } else { -@@ -3235,7 +3202,7 @@ int sdhci_add_host(struct sdhci_host *host) - - if(host->ops->voltage_broken) { - ocr_avail |= MMC_VDD_32_33 | MMC_VDD_33_34; -- // Cannot support UHS modes is we are stuck at 3.3V; -+ // Cannot support UHS modes if we are stuck at 3.3V; - mmc->caps &= ~(MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50); - } - --- -1.8.1.6 - - -From a4e8cd4b90e40e8266765681ed908a6610d80342 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 12 Apr 2013 22:41:37 +0100 -Subject: [PATCH 64/95] mmc:sdhci.h:Fix up issues with rebase - ---- - drivers/mmc/host/sdhci.h | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h -index 9932ae8..cc393af 100644 ---- a/drivers/mmc/host/sdhci.h -+++ b/drivers/mmc/host/sdhci.h -@@ -290,11 +290,6 @@ struct sdhci_ops { - void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); - int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); - -- int (*enable)(struct sdhci_host *mmc); -- int (*disable)(struct sdhci_host *mmc, int lazy); -- int (*set_plat_power)(struct sdhci_host *mmc, -- int power_mode); -- - int (*pdma_able)(struct sdhci_host *host, - struct mmc_data *data); - void (*pdma_avail)(struct sdhci_host *host, --- -1.8.1.6 - - -From aa4b2f9b06e60345c694712a4f376851cd880d6e Mon Sep 17 00:00:00 2001 +From 49b4cd75acc6fdba028c3b72a03915fb783b8211 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Mar 2013 00:10:32 +0000 -Subject: [PATCH 65/95] bcm2708: Add vc_cma driver to enable use of CMA +Subject: [PATCH 61/98] bcm2708: Add vc_cma driver to enable use of CMA --- arch/arm/mach-bcm2708/bcm2708.c | 18 ++++++++++++++++++ @@ -119274,10 +118448,10 @@ index e010515..9d38d40 100644 1.8.1.6 -From 7709e8d5b95d65d2fdbb3cfe59f6de073a3c8c37 Mon Sep 17 00:00:00 2001 +From 7e2ac45d61bfd7ff39b0cd8e78f11612454385c7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 24 Oct 2012 22:00:43 +0100 -Subject: [PATCH 66/95] Fix reboot with new restart method of machine driver +Subject: [PATCH 62/98] Fix reboot with new restart method of machine driver --- arch/arm/mach-bcm2708/bcm2708.c | 18 +++++++++++++++++- @@ -119355,10 +118529,10 @@ index bc9d458..2d0b821 100644 1.8.1.6 -From a7db2e2fd4b67f16a00c039f3cf7e2e5bdcef561 Mon Sep 17 00:00:00 2001 +From fbee956ee0bc629a53f5dd0b5a312a7bb9353410 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Sun, 4 Nov 2012 15:55:01 +0000 -Subject: [PATCH 67/95] Make sure we wait for the reset to finish +Subject: [PATCH 63/98] Make sure we wait for the reset to finish --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2 ++ @@ -119381,10 +118555,10 @@ index 3e762e2..e8c91e7 100644 1.8.1.6 -From 3132dd7b0bfcd1944784b2605d5e24e25a07b54f Mon Sep 17 00:00:00 2001 +From cfbcc471ffd6711ae93b0132b5edca0c0904bc9b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 19 Nov 2012 18:27:05 +0000 -Subject: [PATCH 68/95] Add Simon Hall's dma helper module, useful in future +Subject: [PATCH 64/98] Add Simon Hall's dma helper module, useful in future for X acceleration --- @@ -120722,10 +119896,10 @@ index 0000000..5cb1335 1.8.1.6 -From 16555ecdf4dc9f49b3d860d483833fdad349f8a2 Mon Sep 17 00:00:00 2001 +From fac111f0dc6579857b79a262115eb6acc79b9c6d Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 69/95] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 65/98] lirc: added support for RaspberryPi GPIO --- drivers/staging/media/lirc/Kconfig | 6 + @@ -121460,10 +120634,10 @@ index 0000000..96acab0 1.8.1.6 -From be52bbc167b78f6642b40002fc8908b3c76a6eb9 Mon Sep 17 00:00:00 2001 +From 8e255c899b8c1730b788f50c9ecdd92b6c43f04d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 25 Nov 2012 18:28:09 +0000 -Subject: [PATCH 70/95] Allow mailbox driver to be called from user code though +Subject: [PATCH 66/98] Allow mailbox driver to be called from user code though ioctl --- @@ -121700,10 +120874,10 @@ index 468fdef..09b78b5 100644 1.8.1.6 -From 21c737667da2695cb7adda165b00449c4d83bb40 Mon Sep 17 00:00:00 2001 +From 6dc85542e98a396a1551cfed9b01095d50fdc24e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 18:23:03 +0000 -Subject: [PATCH 71/95] Default to dwc_otp.lpm_enable=0 +Subject: [PATCH 67/98] Default to dwc_otp.lpm_enable=0 --- drivers/usb/host/dwc_otg/dwc_otg_driver.c | 2 +- @@ -121726,10 +120900,10 @@ index d353a9a..cea8fcb 100644 1.8.1.6 -From f2abd325f8c72fa1921bdc93003370d0019cdf52 Mon Sep 17 00:00:00 2001 +From 45ee86129a3d878d3a720f3e68eb4239d8c28efa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 19:04:27 +0000 -Subject: [PATCH 72/95] Increase default coherent pool so vchiq starts up +Subject: [PATCH 68/98] Increase default coherent pool so vchiq starts up --- arch/arm/mach-bcm2708/bcm2708.c | 4 +--- @@ -121754,10 +120928,10 @@ index 9f456e9..87fd348 100644 1.8.1.6 -From cd3e9b7bd25fc1e3f109fd853a6b2739aa20fd4c Mon Sep 17 00:00:00 2001 +From 9f14fd75602667beb25a144603b663831780c631 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Jan 2013 21:34:59 +0000 -Subject: [PATCH 73/95] Add mutex around bcm_mailbox_property function +Subject: [PATCH 69/98] Add mutex around bcm_mailbox_property function --- arch/arm/mach-bcm2708/vcio.c | 5 ++++- @@ -121797,10 +120971,10 @@ index 09b78b5..599eb63 100644 1.8.1.6 -From dba2a1dcb5f53765afac6612b1bcb06c9849a399 Mon Sep 17 00:00:00 2001 +From 034485623b4918ed4ce8bd8c15304603856d0045 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 9 Jan 2013 16:12:04 +0000 -Subject: [PATCH 74/95] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent +Subject: [PATCH 70/98] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent kernel memory corruption, escalating to OOPS under high USB load. --- @@ -121837,10 +121011,10 @@ index e6b2a7b..b337e1b 100644 1.8.1.6 -From 7e8a9d827cabf0db6a14bd5b4a276211e6fbd692 Mon Sep 17 00:00:00 2001 +From 0ef244165c885638ea672ba55d90a4050fb1da19 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 21 Jan 2013 23:03:53 +0000 -Subject: [PATCH 75/95] Return error value from bcm2708_setup_state. Thanks +Subject: [PATCH 71/98] Return error value from bcm2708_setup_state. Thanks notro --- @@ -121863,10 +121037,10 @@ index 9f1580e..8513704 100644 1.8.1.6 -From 2429e28f4db39405773b896e7925860218e44d26 Mon Sep 17 00:00:00 2001 +From 26e96b922bd30cddbd8c1e3aa0dea36d30821ccd Mon Sep 17 00:00:00 2001 From: Kamal Mostafa Date: Mon, 22 Oct 2012 15:52:44 -0700 -Subject: [PATCH 76/95] spi/spi-bcm2708: respect per-transfer SPI clock +Subject: [PATCH 72/98] spi/spi-bcm2708: respect per-transfer SPI clock speed_hz value The bcm2708 SPI driver's bcm2708_process_transfer() was ignoring the @@ -121911,10 +121085,10 @@ index 8513704..b74aa32 100644 1.8.1.6 -From 7622149459557ba0bc886c9c24281948d8ebc2db Mon Sep 17 00:00:00 2001 +From da0350f552bfc8e782bfc8b746518110bee8e222 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 22:29:01 +0000 -Subject: [PATCH 77/95] Add hwrng (hardware random number generator) driver +Subject: [PATCH 73/98] Add hwrng (hardware random number generator) driver Conflicts: --- @@ -122094,10 +121268,10 @@ index 0000000..1ffa7d7 1.8.1.6 -From 8a9e31362a133355f8ec4e9ea30d7453bae8e6e0 Mon Sep 17 00:00:00 2001 +From 0ebf6b6ca0724d536616d8a168a2f7cf6ed8331d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 7 Feb 2013 17:04:13 +0000 -Subject: [PATCH 78/95] Add missing newlines to log messages +Subject: [PATCH 74/98] Add missing newlines to log messages --- drivers/cpufreq/bcm2835-cpufreq.c | 20 ++++++++++---------- @@ -122196,10 +121370,10 @@ index 6ff1edb..5a19212 100755 1.8.1.6 -From 8d3d6ccc8198707a3667fb3931a4ea91bc1ca87f Mon Sep 17 00:00:00 2001 +From d280bebfd970d43982a5df78227353b6393dc46d Mon Sep 17 00:00:00 2001 From: Technion Date: Mon, 11 Feb 2013 22:08:53 +1100 -Subject: [PATCH 79/95] Changed wording on logging. Previously, we received +Subject: [PATCH 75/98] Changed wording on logging. Previously, we received errors like this: mmc0: could read SD Status register (SSR) at the 3th attempt A more sensible response is now returned. A typo also fixed in comments. @@ -122234,10 +121408,10 @@ index 1ee6cf3..90228f9 100644 1.8.1.6 -From e3f52010f19b564e4f22763cc10ef472c594b8bb Mon Sep 17 00:00:00 2001 +From a3c046d9b88330827ac8f35ebf940ef0a1e07cde Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:36:47 +0000 -Subject: [PATCH 80/95] dwc_otg: Fix unsafe access of QTD during URB enqueue +Subject: [PATCH 76/98] dwc_otg: Fix unsafe access of QTD during URB enqueue In dwc_otg_hcd_urb_enqueue during qtd creation, it was possible that the transaction could complete almost immediately after the qtd was assigned @@ -122324,10 +121498,10 @@ index b337e1b..b3e6e52 100644 1.8.1.6 -From 6421e90373006e1eba37590565dc0ba7dc9d5ff7 Mon Sep 17 00:00:00 2001 +From cc70157a7e0854b99eb41599e6381c9ed06f8155 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:38:40 +0000 -Subject: [PATCH 81/95] dwc_otg: Fix incorrect URB allocation error handling +Subject: [PATCH 77/98] dwc_otg: Fix incorrect URB allocation error handling If the memory allocation for a dwc_otg_urb failed, the kernel would OOPS because for some reason a member of the *unallocated* struct was set to @@ -122368,10 +121542,10 @@ index e653d84..fcec97f 100644 1.8.1.6 -From b9b308e7fa83703d2be04c04c9a42392eef9effb Mon Sep 17 00:00:00 2001 +From ecdda43eb0dbfc2e15de6039cd2adac412f1c68d Mon Sep 17 00:00:00 2001 From: pjennings Date: Wed, 20 Feb 2013 17:51:43 -0600 -Subject: [PATCH 82/95] Added inverted transmitter support +Subject: [PATCH 78/98] Added inverted transmitter support --- drivers/staging/media/lirc/lirc_rpi.c | 17 +++++++++++------ @@ -122452,10 +121626,10 @@ index 96acab0..5bb0dfe 100644 1.8.1.6 -From 28387c3a462a968228d0e6a22f89fb13680d0b50 Mon Sep 17 00:00:00 2001 +From 75e337fd44be6fb8ba6d71b88ce12c7ecd26eb5e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 24 Feb 2013 16:30:57 +0000 -Subject: [PATCH 83/95] Add retry on error and tidy of temperature driver +Subject: [PATCH 79/98] Add retry on error and tidy of temperature driver --- drivers/thermal/bcm2835-thermal.c | 78 ++++++++++++++------------------------- @@ -122582,10 +121756,10 @@ index 3f9a733..85fceb5 100644 1.8.1.6 -From 0b28dfd60c43cd1a263bfe0722e8ed6ca368c0ae Mon Sep 17 00:00:00 2001 +From 4fde193a1a885d33c6466f3d7d5981fd4cc49ba2 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 28 Feb 2013 16:52:51 +0000 -Subject: [PATCH 84/95] dwc_otg: fix potential use-after-free case in interrupt +Subject: [PATCH 80/98] dwc_otg: fix potential use-after-free case in interrupt handler If a transaction had previously aborted, certain interrupts are @@ -122617,10 +121791,10 @@ index e8c91e7..0c81a64 100644 1.8.1.6 -From e84447e71ebb957d21e69999b54cae65d7b60d16 Mon Sep 17 00:00:00 2001 +From e0b79f66bcdc2084db2a2b3cc043e62200b2166e Mon Sep 17 00:00:00 2001 From: P33M Date: Sun, 3 Mar 2013 14:45:53 +0000 -Subject: [PATCH 85/95] dwc_otg: add handling of SPLIT transaction data toggle +Subject: [PATCH 81/98] dwc_otg: add handling of SPLIT transaction data toggle errors Previously a data toggle error on packets from a USB1.1 device behind @@ -122675,10 +121849,10 @@ index 0c81a64..16e8c6c 100644 1.8.1.6 -From 8c91077b39b262d7d7b04d5e74cadf40055d6a4f Mon Sep 17 00:00:00 2001 +From 76b262fd78916bd714f9a07887b2429afc035d53 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 21:14:28 +0100 -Subject: [PATCH 86/95] Add bitbanging pullups, use them for w1-gpio +Subject: [PATCH 82/98] Add bitbanging pullups, use them for w1-gpio Allows parasite power to work, uses module option pullup=1 --- @@ -122817,10 +121991,10 @@ index e10acc2..667fdd5 100644 1.8.1.6 -From 9e0a44ca8629762becbcd8cfc91fce2880cc8ce5 Mon Sep 17 00:00:00 2001 +From 4ef8f2e537f6da3b8a7fec148ec5f977aad3e4c9 Mon Sep 17 00:00:00 2001 From: notro Date: Sat, 26 Jan 2013 20:38:03 +0100 -Subject: [PATCH 87/95] spi-bcm2708: add 9-bit support using LoSSI mode +Subject: [PATCH 83/98] spi-bcm2708: add 9-bit support using LoSSI mode --- drivers/spi/spi-bcm2708.c | 30 ++++++++++++++++++++++++++++-- @@ -122890,10 +122064,10 @@ index b74aa32..abaa5a6 100644 1.8.1.6 -From deebe69082b9df25018ea89a5817d164e0aae387 Mon Sep 17 00:00:00 2001 +From ed2b56cca472c3580dd4dd0d9923e18b184361b8 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 21 Mar 2013 19:36:17 +0000 -Subject: [PATCH 88/95] dwc_otg: implement tasklet for returning URBs to +Subject: [PATCH 84/98] dwc_otg: implement tasklet for returning URBs to usbcore hcd layer The dwc_otg driver interrupt handler for transfer completion will spend @@ -123135,10 +122309,10 @@ index 9702f81..7bb133a 100644 1.8.1.6 -From f3706de4a993683d123fbadad2b14a3d9b5196e8 Mon Sep 17 00:00:00 2001 +From 36674c3936fdf6cbbdaeceb04c44503ece90dfb1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 27 Mar 2013 20:23:39 +0000 -Subject: [PATCH 89/95] dwc_otg: Fix build issue with usb_gadget_probe_driver +Subject: [PATCH 85/98] dwc_otg: Fix build issue with usb_gadget_probe_driver --- drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c | 22 +++------------------- @@ -123204,10 +122378,10 @@ index 903e670..a591d89 100644 1.8.1.6 -From 66a26e9f64b85ac9d8cde6ddcc123f98d232907e Mon Sep 17 00:00:00 2001 +From fc6f746d8e48c3c405b97ec241217fba7b55c873 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 27 Apr 2012 00:31:37 +0100 -Subject: [PATCH 90/95] Update config files for f2fs and 3.8 kernel +Subject: [PATCH 86/98] Update config files for f2fs and 3.8 kernel --- arch/arm/configs/bcmrpi_cutdown_defconfig | 504 ---------------------------- @@ -124837,10 +124011,10 @@ index 0000000..10b84df 1.8.1.6 -From b7d81237d4a4e0c72de823db7a77dafebe40be17 Mon Sep 17 00:00:00 2001 +From 94a90cc4da9d051ef0fa192bb11145e126bc716d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 Apr 2013 15:36:01 +0100 -Subject: [PATCH 92/95] Add v6wbi_flush_kern_tlb_range to allow zsmalloc to be +Subject: [PATCH 88/98] Add v6wbi_flush_kern_tlb_range to allow zsmalloc to be built as a module --- @@ -124863,10 +124037,10 @@ index 60d3b73..cba4d28 100644 1.8.1.6 -From af21f81d58195d0712fd047a86429b80dfb3b461 Mon Sep 17 00:00:00 2001 +From a75e8f6e0f095a39b6bd1babb70d19b23f6dd8bc Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Apr 2013 00:08:36 +0100 -Subject: [PATCH 93/95] dwc_otg: fix NAK holdoff and allow on split +Subject: [PATCH 89/98] dwc_otg: fix NAK holdoff and allow on split transactions only This corrects a bug where if a single active non-periodic endpoint @@ -124936,10 +124110,10 @@ index 91eefecd..eaa8f38 100644 1.8.1.6 -From 9f5ffefb664c9ac66735944afb0e6eea51527e93 Mon Sep 17 00:00:00 2001 +From 5ce1da4709ccd13ba0e9f511af9cbb920b1f0b73 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 26 Apr 2013 10:08:31 -0700 -Subject: [PATCH 94/95] Merge pull request #286 from +Subject: [PATCH 90/98] Merge pull request #286 from martinezjavier/rpi-3.6.y-dev add mmap support and some cleanups to bcm2835 ALSA driver @@ -125420,10 +124594,10 @@ index b966e28..08c763d 100755 1.8.1.6 -From 5ded0f9a6a8cdefc25dc893afecda51367d9ed25 Mon Sep 17 00:00:00 2001 +From d9b38d9b00566541b5cb3f53e1f1645e6e42e16d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 95/95] Add quick config. +Subject: [PATCH 91/98] Add quick config. This is designed for quick compiling when developing. No modules are needed and it includes all Pi specific drivers @@ -125817,3 +124991,243 @@ index 10b84df..e5efe75 100644 -- 1.8.1.6 + +From 438fe3becc355a5381fa89ca0d488f66c142d2d0 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 10 May 2013 19:42:38 +0100 +Subject: [PATCH 92/98] mmc: suppress sdcard warnings we are happy about by + default + +--- + drivers/mmc/host/sdhci-bcm2708.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 3556ed3..c2409b9 100644 +--- a/drivers/mmc/host/sdhci-bcm2708.c ++++ b/drivers/mmc/host/sdhci-bcm2708.c +@@ -139,6 +139,7 @@ static inline unsigned long int since_ns(hptime_t t) + static bool missing_status = 1; + static bool spurious_crc_acmd51 = 0; + bool enable_llm = 1; ++bool extra_messages = 0; + + #if 0 + static void hptime_test(void) +@@ -672,13 +673,16 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) + cs = readl(host_priv->dma_chan_base + BCM2708_DMA_CS); + + if (!(BCM2708_DMA_ACTIVE & cs)) +- printk(KERN_INFO "%s: missed completion of " ++ { ++ if (extra_messages) ++ printk(KERN_INFO "%s: missed completion of " + "cmd %d DMA (%d/%d [%d]/[%d]) - " + "ignoring it\n", + mmc_hostname(host->mmc), + host->last_cmdop, + host_priv->sg_done, sg_todo, + host_priv->sg_ix+1, sg_len); ++ } + else + printk(KERN_INFO "%s: resetting ongoing cmd %d" + "DMA before %d/%d [%d]/[%d] complete\n", +@@ -903,7 +907,8 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) + + if (!host_priv->dma_wanted) { + /* ignore this interrupt - it was reset */ +- printk(KERN_INFO "%s: DMA IRQ %X ignored - " ++ if (extra_messages) ++ printk(KERN_INFO "%s: DMA IRQ %X ignored - " + "results were reset\n", + mmc_hostname(host->mmc), dma_cs); + #ifdef CHECK_DMA_USE +@@ -1397,6 +1402,7 @@ static void __exit sdhci_drv_exit(void) + module_param(spurious_crc_acmd51, bool, 0444); + module_param(enable_llm, bool, 0444); + module_param(cycle_delay, int, 0444); ++module_param(extra_messages, bool, 0444); + + MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); + MODULE_AUTHOR("Broadcom "); +@@ -1409,5 +1415,6 @@ static void __exit sdhci_drv_exit(void) + MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); + MODULE_PARM_DESC(spurious_crc_acmd51, "Use the spurious crc quirk for reading SCR (ACMD51)"); + MODULE_PARM_DESC(enable_llm, "Enable low-latency mode"); ++MODULE_PARM_DESC(extra_messages, "Enable more sdcard warning messages"); + + +-- +1.8.1.6 + + +From ff0b79fd73e0980dc50df6809f183e0221a74fec Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 14 May 2013 11:42:25 +0100 +Subject: [PATCH 93/98] Allow reboot=q on command line to set a flag that + bootcode.bin can use to boot from alternate partition + +--- + arch/arm/mach-bcm2708/bcm2708.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 87fd348..1ed4d73 100644 +--- a/arch/arm/mach-bcm2708/bcm2708.c ++++ b/arch/arm/mach-bcm2708/bcm2708.c +@@ -629,6 +629,15 @@ static void bcm2708_restart(char mode, const char *cmd) + uint32_t pm_rstc, pm_wdog; + uint32_t timeout = 10; + ++ /* For quick reset notification add reboot=q to cmdline ++ */ ++ if(mode == 'q') ++ { ++ uint32_t pm_rsts = readl(__io_address(PM_RSTS)); ++ pm_rsts = PM_PASSWORD | pm_rsts | PM_RSTS_HADWRQ_SET; ++ writel(pm_rsts, __io_address(PM_RSTS)); ++ } ++ + /* Setup watchdog for reset */ + pm_rstc = readl(__io_address(PM_RSTC)); + +-- +1.8.1.6 + + +From c0fb35980968ba9c2dd21e0ff3a096bd97a8cdd6 Mon Sep 17 00:00:00 2001 +From: hutorny +Date: Mon, 13 May 2013 10:26:14 +0300 +Subject: [PATCH 95/98] Update bcm2708.c to use CONFIG_BCM2708_SPIDEV rather + than CONFIG_SPI + +--- + arch/arm/mach-bcm2708/Kconfig | 7 +++++++ + arch/arm/mach-bcm2708/bcm2708.c | 4 ++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig +index 2a24db6..1dfd0a4 100644 +--- a/arch/arm/mach-bcm2708/Kconfig ++++ b/arch/arm/mach-bcm2708/Kconfig +@@ -38,4 +38,11 @@ config BCM2708_DMAER + help + Enable DMA helper for accelerating X composition + ++config BCM2708_SPIDEV ++ bool "Bind spidev to SPI0 master" ++ depends on MACH_BCM2708 ++ depends on SPI ++ default y ++ help ++ Binds spidev driver to the SPI0 master + endmenu +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 1ed4d73..68c577a 100644 +--- a/arch/arm/mach-bcm2708/bcm2708.c ++++ b/arch/arm/mach-bcm2708/bcm2708.c +@@ -545,7 +545,7 @@ struct platform_device bcm2708_powerman_device = { + .resource = bcm2708_spi_resources, + }; + +-#ifdef CONFIG_SPI ++#ifdef CONFIG_BCM2708_SPIDEV + static struct spi_board_info bcm2708_spi_devices[] = { + #ifdef CONFIG_SPI_SPIDEV + { +@@ -715,7 +715,7 @@ void __init bcm2708_init(void) + system_rev = boardrev; + system_serial_low = serial; + +-#ifdef CONFIG_SPI ++#ifdef CONFIG_BCM2708_SPIDEV + spi_register_board_info(bcm2708_spi_devices, + ARRAY_SIZE(bcm2708_spi_devices)); + #endif +-- +1.8.1.6 + + +From c44ae247fcaa54491bde50555625e1e81605e1cb Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 8 Jun 2013 22:14:13 +0100 +Subject: [PATCH 97/98] Only init gpio pins of selected i2c bus + +--- + drivers/i2c/busses/i2c-bcm2708.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index 3391889..edc90c0 100644 +--- a/drivers/i2c/busses/i2c-bcm2708.c ++++ b/drivers/i2c/busses/i2c-bcm2708.c +@@ -97,7 +97,7 @@ struct bcm2708_i2c { + * + * FIXME: This is a hack. Use pinmux / pinctrl. + */ +-static void bcm2708_i2c_init_pinmode(void) ++static void bcm2708_i2c_init_pinmode(int id) + { + #define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) + #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) +@@ -105,8 +105,10 @@ static void bcm2708_i2c_init_pinmode(void) + int pin; + u32 *gpio = ioremap(0x20200000, SZ_16K); + ++ BUG_ON(id != 0 && id != 1); + /* BSC0 is on GPIO 0 & 1, BSC1 is on GPIO 2 & 3 */ +- for (pin = 0; pin <= 3; pin++) { ++ for (pin = id*2+0; pin <= id*2+1; pin++) { ++printk("bcm2708_i2c_init_pinmode(%d,%d)\n", id, pin); + INP_GPIO(pin); /* set mode to GPIO input first */ + SET_GPIO_ALT(pin, 0); /* set mode to ALT 0 */ + } +@@ -279,7 +281,7 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) + return PTR_ERR(clk); + } + +- bcm2708_i2c_init_pinmode(); ++ bcm2708_i2c_init_pinmode(pdev->id); + + bi = kzalloc(sizeof(*bi), GFP_KERNEL); + if (!bi) +-- +1.8.1.6 + + +From 975bd78d089fda92d1db126cf1cb199237f2142b Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Thu, 13 Jun 2013 16:46:54 +0100 +Subject: [PATCH 98/98] Avoid responding to unexpected I2C interrupts + +--- + drivers/i2c/busses/i2c-bcm2708.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index edc90c0..33f4e7d 100644 +--- a/drivers/i2c/busses/i2c-bcm2708.c ++++ b/drivers/i2c/busses/i2c-bcm2708.c +@@ -175,6 +175,11 @@ static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id) + + spin_lock(&bi->lock); + ++ /* we may see camera interrupts on the "other" I2C channel ++ Just return if we've not sent anything */ ++ if (!bi->nmsgs || !bi->msg ) ++ goto early_exit; ++ + s = bcm2708_rd(bi, BSC_S); + + if (s & (BSC_S_CLKT | BSC_S_ERR)) { +@@ -208,6 +213,7 @@ static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id) + handled = false; + } + ++early_exit: + spin_unlock(&bi->lock); + + return handled ? IRQ_HANDLED : IRQ_NONE; +-- +1.8.1.6 +