* [PATCH 0/2] mmc: remove sdhci-bcm2835 @ 2016-06-03 19:47 ` Stefan Wahren 0 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-03 19:47 UTC (permalink / raw) To: Ulf Hansson, Adrian Hunter, Eric Anholt, Stephen Warren, Lee Jones, Rob Herring, Pawel Moll, Mark Rutland Cc: devicetree, linux-rpi-kernel, linux-arm-kernel, linux-mmc, Stefan Wahren The sdhci-bcm2835 is no more needed since it has been replaced by sdhci-iproc. Stefan Wahren (2): DT: bindings: remove bcm2835-sdhci mmc: sdhci-bcm2835: remove driver .../devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt | 18 -- drivers/mmc/host/Kconfig | 11 -- drivers/mmc/host/Makefile | 1 - drivers/mmc/host/sdhci-bcm2835.c | 204 -------------------- 4 files changed, 234 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt delete mode 100644 drivers/mmc/host/sdhci-bcm2835.c -- 1.7.9.5 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/2] mmc: remove sdhci-bcm2835 @ 2016-06-03 19:47 ` Stefan Wahren 0 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-03 19:47 UTC (permalink / raw) To: linux-arm-kernel The sdhci-bcm2835 is no more needed since it has been replaced by sdhci-iproc. Stefan Wahren (2): DT: bindings: remove bcm2835-sdhci mmc: sdhci-bcm2835: remove driver .../devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt | 18 -- drivers/mmc/host/Kconfig | 11 -- drivers/mmc/host/Makefile | 1 - drivers/mmc/host/sdhci-bcm2835.c | 204 -------------------- 4 files changed, 234 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt delete mode 100644 drivers/mmc/host/sdhci-bcm2835.c -- 1.7.9.5 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] DT: bindings: remove bcm2835-sdhci 2016-06-03 19:47 ` Stefan Wahren @ 2016-06-03 19:47 ` Stefan Wahren -1 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-03 19:47 UTC (permalink / raw) To: Ulf Hansson, Adrian Hunter, Eric Anholt, Stephen Warren, Lee Jones, Rob Herring, Pawel Moll, Mark Rutland Cc: Stefan Wahren, devicetree, linux-mmc, linux-rpi-kernel, linux-arm-kernel The sdhci-iproc also supports bcm2835. So this binding is obsolete. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> --- .../devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt deleted file mode 100644 index 59476fb..0000000 --- a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt +++ /dev/null @@ -1,18 +0,0 @@ -Broadcom BCM2835 SDHCI controller - -This file documents differences between the core properties described -by mmc.txt and the properties that represent the BCM2835 controller. - -Required properties: -- compatible : Should be "brcm,bcm2835-sdhci". -- clocks : The clock feeding the SDHCI controller. - -Example: - -sdhci: sdhci { - compatible = "brcm,bcm2835-sdhci"; - reg = <0x7e300000 0x100>; - interrupts = <2 30>; - clocks = <&clk_mmc>; - bus-width = <4>; -}; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] DT: bindings: remove bcm2835-sdhci @ 2016-06-03 19:47 ` Stefan Wahren 0 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-03 19:47 UTC (permalink / raw) To: linux-arm-kernel The sdhci-iproc also supports bcm2835. So this binding is obsolete. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> --- .../devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt deleted file mode 100644 index 59476fb..0000000 --- a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt +++ /dev/null @@ -1,18 +0,0 @@ -Broadcom BCM2835 SDHCI controller - -This file documents differences between the core properties described -by mmc.txt and the properties that represent the BCM2835 controller. - -Required properties: -- compatible : Should be "brcm,bcm2835-sdhci". -- clocks : The clock feeding the SDHCI controller. - -Example: - -sdhci: sdhci { - compatible = "brcm,bcm2835-sdhci"; - reg = <0x7e300000 0x100>; - interrupts = <2 30>; - clocks = <&clk_mmc>; - bus-width = <4>; -}; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
[parent not found: <1464983233-27001-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>]
* Re: [PATCH 1/2] DT: bindings: remove bcm2835-sdhci 2016-06-03 19:47 ` Stefan Wahren @ 2016-06-03 20:00 ` Stephen Warren -1 siblings, 0 replies; 16+ messages in thread From: Stephen Warren @ 2016-06-03 20:00 UTC (permalink / raw) To: Stefan Wahren Cc: Ulf Hansson, Adrian Hunter, Eric Anholt, Lee Jones, Rob Herring, Pawel Moll, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-mmc-u79uwXL29TY76Z2rM5mHXA On 06/03/2016 01:47 PM, Stefan Wahren wrote: > The sdhci-iproc also supports bcm2835. So this binding is obsolete. sdhci-iproc supports this binding, so I don't believe the binding is obsolete. The duplicate implementations (drivers) can possibly be removed, but not the binding doc, which is (or at least could be) still in use. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] DT: bindings: remove bcm2835-sdhci @ 2016-06-03 20:00 ` Stephen Warren 0 siblings, 0 replies; 16+ messages in thread From: Stephen Warren @ 2016-06-03 20:00 UTC (permalink / raw) To: linux-arm-kernel On 06/03/2016 01:47 PM, Stefan Wahren wrote: > The sdhci-iproc also supports bcm2835. So this binding is obsolete. sdhci-iproc supports this binding, so I don't believe the binding is obsolete. The duplicate implementations (drivers) can possibly be removed, but not the binding doc, which is (or at least could be) still in use. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] DT: bindings: remove bcm2835-sdhci 2016-06-03 20:00 ` Stephen Warren @ 2016-06-09 18:11 ` Stefan Wahren -1 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-09 18:11 UTC (permalink / raw) To: Stephen Warren Cc: Mark Rutland, devicetree, Ulf Hansson, Pawel Moll, Lee Jones, linux-mmc, Adrian Hunter, Eric Anholt, Rob Herring, linux-rpi-kernel, linux-arm-kernel Hi Stephen, > Stephen Warren <swarren@wwwdotorg.org> hat am 3. Juni 2016 um 22:00 > geschrieben: > > > On 06/03/2016 01:47 PM, Stefan Wahren wrote: > > The sdhci-iproc also supports bcm2835. So this binding is obsolete. > > sdhci-iproc supports this binding, so I don't believe the binding is > obsolete. The duplicate implementations (drivers) can possibly be > removed, but not the binding doc, which is (or at least could be) still > in use. sorry for my late reply. So the brcm,bcm2835-sdhci.txt must be kept, even if the compatible string "brcm,bcm2835-sdhci" has been added to brcm,sdhci-iproc.txt? Do i need to send a new version of this series? Stefan > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] DT: bindings: remove bcm2835-sdhci @ 2016-06-09 18:11 ` Stefan Wahren 0 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-09 18:11 UTC (permalink / raw) To: linux-arm-kernel Hi Stephen, > Stephen Warren <swarren@wwwdotorg.org> hat am 3. Juni 2016 um 22:00 > geschrieben: > > > On 06/03/2016 01:47 PM, Stefan Wahren wrote: > > The sdhci-iproc also supports bcm2835. So this binding is obsolete. > > sdhci-iproc supports this binding, so I don't believe the binding is > obsolete. The duplicate implementations (drivers) can possibly be > removed, but not the binding doc, which is (or at least could be) still > in use. sorry for my late reply. So the brcm,bcm2835-sdhci.txt must be kept, even if the compatible string "brcm,bcm2835-sdhci" has been added to brcm,sdhci-iproc.txt? Do i need to send a new version of this series? Stefan > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] DT: bindings: remove bcm2835-sdhci 2016-06-09 18:11 ` Stefan Wahren @ 2016-06-17 18:59 ` Stephen Warren -1 siblings, 0 replies; 16+ messages in thread From: Stephen Warren @ 2016-06-17 18:59 UTC (permalink / raw) To: Stefan Wahren Cc: Mark Rutland, devicetree, Ulf Hansson, Pawel Moll, Lee Jones, linux-mmc, Adrian Hunter, Eric Anholt, Rob Herring, linux-rpi-kernel, linux-arm-kernel On 06/09/2016 12:11 PM, Stefan Wahren wrote: > Hi Stephen, > >> Stephen Warren <swarren@wwwdotorg.org> hat am 3. Juni 2016 um 22:00 >> geschrieben: >> >> >> On 06/03/2016 01:47 PM, Stefan Wahren wrote: >>> The sdhci-iproc also supports bcm2835. So this binding is obsolete. >> >> sdhci-iproc supports this binding, so I don't believe the binding is >> obsolete. The duplicate implementations (drivers) can possibly be >> removed, but not the binding doc, which is (or at least could be) still >> in use. > > sorry for my late reply. > > So the brcm,bcm2835-sdhci.txt must be kept, even if the compatible string > "brcm,bcm2835-sdhci" has been added to brcm,sdhci-iproc.txt? Sorry for the slow reply; I was on vacation. So, if the binding documentation has been collapsed into the other binding document, then it's OK to remove this one. I took a look at the iproc binding doc and it looks completely compatible with this removed binding doc, so I think this patch is OK. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] DT: bindings: remove bcm2835-sdhci @ 2016-06-17 18:59 ` Stephen Warren 0 siblings, 0 replies; 16+ messages in thread From: Stephen Warren @ 2016-06-17 18:59 UTC (permalink / raw) To: linux-arm-kernel On 06/09/2016 12:11 PM, Stefan Wahren wrote: > Hi Stephen, > >> Stephen Warren <swarren@wwwdotorg.org> hat am 3. Juni 2016 um 22:00 >> geschrieben: >> >> >> On 06/03/2016 01:47 PM, Stefan Wahren wrote: >>> The sdhci-iproc also supports bcm2835. So this binding is obsolete. >> >> sdhci-iproc supports this binding, so I don't believe the binding is >> obsolete. The duplicate implementations (drivers) can possibly be >> removed, but not the binding doc, which is (or at least could be) still >> in use. > > sorry for my late reply. > > So the brcm,bcm2835-sdhci.txt must be kept, even if the compatible string > "brcm,bcm2835-sdhci" has been added to brcm,sdhci-iproc.txt? Sorry for the slow reply; I was on vacation. So, if the binding documentation has been collapsed into the other binding document, then it's OK to remove this one. I took a look at the iproc binding doc and it looks completely compatible with this removed binding doc, so I think this patch is OK. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] mmc: sdhci-bcm2835: remove driver 2016-06-03 19:47 ` Stefan Wahren @ 2016-06-03 19:47 ` Stefan Wahren -1 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-03 19:47 UTC (permalink / raw) To: Ulf Hansson, Adrian Hunter, Eric Anholt, Stephen Warren, Lee Jones, Rob Herring, Pawel Moll, Mark Rutland Cc: devicetree, linux-rpi-kernel, linux-arm-kernel, linux-mmc, Stefan Wahren The sdhci-bcm2835 is no more needed since it has been replaced by sdhci-iproc. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> --- drivers/mmc/host/Kconfig | 11 -- drivers/mmc/host/Makefile | 1 - drivers/mmc/host/sdhci-bcm2835.c | 204 -------------------------------------- 3 files changed, 216 deletions(-) delete mode 100644 drivers/mmc/host/sdhci-bcm2835.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 0aa484c..2cf124a 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -296,17 +296,6 @@ config MMC_SDHCI_BCM_KONA If you have a controller with this interface, say Y or M here. -config MMC_SDHCI_BCM2835 - tristate "SDHCI platform support for the BCM2835 SD/MMC Controller" - depends on ARCH_BCM2835 - depends on MMC_SDHCI_PLTFM - select MMC_SDHCI_IO_ACCESSORS - help - This selects the BCM2835 SD/MMC controller. If you have a BCM2835 - platform with SD or MMC devices, say Y or M here. - - If unsure, say N. - config MMC_SDHCI_F_SDH30 tristate "SDHCI support for Fujitsu Semiconductor F_SDH30" depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index af918d2..61a9345 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -71,7 +71,6 @@ obj-$(CONFIG_MMC_SDHCI_OF_AT91) += sdhci-of-at91.o obj-$(CONFIG_MMC_SDHCI_OF_ESDHC) += sdhci-of-esdhc.o obj-$(CONFIG_MMC_SDHCI_OF_HLWD) += sdhci-of-hlwd.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o -obj-$(CONFIG_MMC_SDHCI_BCM2835) += sdhci-bcm2835.o obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_MSM) += sdhci-msm.o obj-$(CONFIG_MMC_SDHCI_ST) += sdhci-st.o diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c deleted file mode 100644 index 4a6a1d1..0000000 --- a/drivers/mmc/host/sdhci-bcm2835.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * BCM2835 SDHCI - * Copyright (C) 2012 Stephen Warren - * Based on U-Boot's MMC driver for the BCM2835 by Oleksandr Tymoshenko & me - * Portions of the code there were obviously based on the Linux kernel at: - * git://github.com/raspberrypi/linux.git rpi-3.6.y - * commit f5b930b "Main bcm2708 linux port" signed-off-by Dom Cobley. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include <linux/delay.h> -#include <linux/module.h> -#include <linux/mmc/host.h> -#include "sdhci-pltfm.h" - -/* - * 400KHz is max freq for card ID etc. Use that as min card clock. We need to - * know the min to enable static calculation of max BCM2835_SDHCI_WRITE_DELAY. - */ -#define MIN_FREQ 400000 - -/* - * The Arasan has a bugette whereby it may lose the content of successive - * writes to registers that are within two SD-card clock cycles of each other - * (a clock domain crossing problem). It seems, however, that the data - * register does not have this problem, which is just as well - otherwise we'd - * have to nobble the DMA engine too. - * - * This should probably be dynamically calculated based on the actual card - * frequency. However, this is the longest we'll have to wait, and doesn't - * seem to slow access down too much, so the added complexity doesn't seem - * worth it for now. - * - * 1/MIN_FREQ is (max) time per tick of eMMC clock. - * 2/MIN_FREQ is time for two ticks. - * Multiply by 1000000 to get uS per two ticks. - * *1000000 for uSecs. - * +1 for hack rounding. - */ -#define BCM2835_SDHCI_WRITE_DELAY (((2 * 1000000) / MIN_FREQ) + 1) - -struct bcm2835_sdhci { - u32 shadow; -}; - -static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg) -{ - writel(val, host->ioaddr + reg); - - udelay(BCM2835_SDHCI_WRITE_DELAY); -} - -static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) -{ - u32 val = readl(host->ioaddr + reg); - - if (reg == SDHCI_CAPABILITIES) - val |= SDHCI_CAN_VDD_330; - - return val; -} - -static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg) -{ - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - struct bcm2835_sdhci *bcm2835_host = sdhci_pltfm_priv(pltfm_host); - u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow : - bcm2835_sdhci_readl(host, reg & ~3); - u32 word_num = (reg >> 1) & 1; - u32 word_shift = word_num * 16; - u32 mask = 0xffff << word_shift; - u32 newval = (oldval & ~mask) | (val << word_shift); - - if (reg == SDHCI_TRANSFER_MODE) - bcm2835_host->shadow = newval; - else - bcm2835_sdhci_writel(host, newval, reg & ~3); -} - -static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg) -{ - u32 val = bcm2835_sdhci_readl(host, (reg & ~3)); - u32 word_num = (reg >> 1) & 1; - u32 word_shift = word_num * 16; - u32 word = (val >> word_shift) & 0xffff; - - return word; -} - -static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg) -{ - u32 oldval = bcm2835_sdhci_readl(host, reg & ~3); - u32 byte_num = reg & 3; - u32 byte_shift = byte_num * 8; - u32 mask = 0xff << byte_shift; - u32 newval = (oldval & ~mask) | (val << byte_shift); - - bcm2835_sdhci_writel(host, newval, reg & ~3); -} - -static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) -{ - u32 val = bcm2835_sdhci_readl(host, (reg & ~3)); - u32 byte_num = reg & 3; - u32 byte_shift = byte_num * 8; - u32 byte = (val >> byte_shift) & 0xff; - - return byte; -} - -static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host) -{ - return MIN_FREQ; -} - -static const struct sdhci_ops bcm2835_sdhci_ops = { - .write_l = bcm2835_sdhci_writel, - .write_w = bcm2835_sdhci_writew, - .write_b = bcm2835_sdhci_writeb, - .read_l = bcm2835_sdhci_readl, - .read_w = bcm2835_sdhci_readw, - .read_b = bcm2835_sdhci_readb, - .set_clock = sdhci_set_clock, - .get_max_clock = sdhci_pltfm_clk_get_max_clock, - .get_min_clock = bcm2835_sdhci_get_min_clock, - .set_bus_width = sdhci_set_bus_width, - .reset = sdhci_reset, - .set_uhs_signaling = sdhci_set_uhs_signaling, -}; - -static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = { - .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | - SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, - .ops = &bcm2835_sdhci_ops, -}; - -static int bcm2835_sdhci_probe(struct platform_device *pdev) -{ - struct sdhci_host *host; - struct bcm2835_sdhci *bcm2835_host; - struct sdhci_pltfm_host *pltfm_host; - int ret; - - host = sdhci_pltfm_init(pdev, &bcm2835_sdhci_pdata, - sizeof(*bcm2835_host)); - if (IS_ERR(host)) - return PTR_ERR(host); - - pltfm_host = sdhci_priv(host); - - pltfm_host->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(pltfm_host->clk)) { - ret = PTR_ERR(pltfm_host->clk); - goto err; - } - ret = clk_prepare_enable(pltfm_host->clk); - if (ret) { - dev_err(&pdev->dev, "failed to enable host clk\n"); - goto err; - } - - ret = sdhci_add_host(host); - if (ret) - goto err_clk; - - return 0; -err_clk: - clk_disable_unprepare(pltfm_host->clk); -err: - sdhci_pltfm_free(pdev); - return ret; -} - -static const struct of_device_id bcm2835_sdhci_of_match[] = { - { .compatible = "brcm,bcm2835-sdhci" }, - { } -}; -MODULE_DEVICE_TABLE(of, bcm2835_sdhci_of_match); - -static struct platform_driver bcm2835_sdhci_driver = { - .driver = { - .name = "sdhci-bcm2835", - .of_match_table = bcm2835_sdhci_of_match, - .pm = SDHCI_PLTFM_PMOPS, - }, - .probe = bcm2835_sdhci_probe, - .remove = sdhci_pltfm_unregister, -}; -module_platform_driver(bcm2835_sdhci_driver); - -MODULE_DESCRIPTION("BCM2835 SDHCI driver"); -MODULE_AUTHOR("Stephen Warren"); -MODULE_LICENSE("GPL v2"); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] mmc: sdhci-bcm2835: remove driver @ 2016-06-03 19:47 ` Stefan Wahren 0 siblings, 0 replies; 16+ messages in thread From: Stefan Wahren @ 2016-06-03 19:47 UTC (permalink / raw) To: linux-arm-kernel The sdhci-bcm2835 is no more needed since it has been replaced by sdhci-iproc. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> --- drivers/mmc/host/Kconfig | 11 -- drivers/mmc/host/Makefile | 1 - drivers/mmc/host/sdhci-bcm2835.c | 204 -------------------------------------- 3 files changed, 216 deletions(-) delete mode 100644 drivers/mmc/host/sdhci-bcm2835.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 0aa484c..2cf124a 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -296,17 +296,6 @@ config MMC_SDHCI_BCM_KONA If you have a controller with this interface, say Y or M here. -config MMC_SDHCI_BCM2835 - tristate "SDHCI platform support for the BCM2835 SD/MMC Controller" - depends on ARCH_BCM2835 - depends on MMC_SDHCI_PLTFM - select MMC_SDHCI_IO_ACCESSORS - help - This selects the BCM2835 SD/MMC controller. If you have a BCM2835 - platform with SD or MMC devices, say Y or M here. - - If unsure, say N. - config MMC_SDHCI_F_SDH30 tristate "SDHCI support for Fujitsu Semiconductor F_SDH30" depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index af918d2..61a9345 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -71,7 +71,6 @@ obj-$(CONFIG_MMC_SDHCI_OF_AT91) += sdhci-of-at91.o obj-$(CONFIG_MMC_SDHCI_OF_ESDHC) += sdhci-of-esdhc.o obj-$(CONFIG_MMC_SDHCI_OF_HLWD) += sdhci-of-hlwd.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o -obj-$(CONFIG_MMC_SDHCI_BCM2835) += sdhci-bcm2835.o obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_MSM) += sdhci-msm.o obj-$(CONFIG_MMC_SDHCI_ST) += sdhci-st.o diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c deleted file mode 100644 index 4a6a1d1..0000000 --- a/drivers/mmc/host/sdhci-bcm2835.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * BCM2835 SDHCI - * Copyright (C) 2012 Stephen Warren - * Based on U-Boot's MMC driver for the BCM2835 by Oleksandr Tymoshenko & me - * Portions of the code there were obviously based on the Linux kernel at: - * git://github.com/raspberrypi/linux.git rpi-3.6.y - * commit f5b930b "Main bcm2708 linux port" signed-off-by Dom Cobley. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include <linux/delay.h> -#include <linux/module.h> -#include <linux/mmc/host.h> -#include "sdhci-pltfm.h" - -/* - * 400KHz is max freq for card ID etc. Use that as min card clock. We need to - * know the min to enable static calculation of max BCM2835_SDHCI_WRITE_DELAY. - */ -#define MIN_FREQ 400000 - -/* - * The Arasan has a bugette whereby it may lose the content of successive - * writes to registers that are within two SD-card clock cycles of each other - * (a clock domain crossing problem). It seems, however, that the data - * register does not have this problem, which is just as well - otherwise we'd - * have to nobble the DMA engine too. - * - * This should probably be dynamically calculated based on the actual card - * frequency. However, this is the longest we'll have to wait, and doesn't - * seem to slow access down too much, so the added complexity doesn't seem - * worth it for now. - * - * 1/MIN_FREQ is (max) time per tick of eMMC clock. - * 2/MIN_FREQ is time for two ticks. - * Multiply by 1000000 to get uS per two ticks. - * *1000000 for uSecs. - * +1 for hack rounding. - */ -#define BCM2835_SDHCI_WRITE_DELAY (((2 * 1000000) / MIN_FREQ) + 1) - -struct bcm2835_sdhci { - u32 shadow; -}; - -static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg) -{ - writel(val, host->ioaddr + reg); - - udelay(BCM2835_SDHCI_WRITE_DELAY); -} - -static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) -{ - u32 val = readl(host->ioaddr + reg); - - if (reg == SDHCI_CAPABILITIES) - val |= SDHCI_CAN_VDD_330; - - return val; -} - -static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg) -{ - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - struct bcm2835_sdhci *bcm2835_host = sdhci_pltfm_priv(pltfm_host); - u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow : - bcm2835_sdhci_readl(host, reg & ~3); - u32 word_num = (reg >> 1) & 1; - u32 word_shift = word_num * 16; - u32 mask = 0xffff << word_shift; - u32 newval = (oldval & ~mask) | (val << word_shift); - - if (reg == SDHCI_TRANSFER_MODE) - bcm2835_host->shadow = newval; - else - bcm2835_sdhci_writel(host, newval, reg & ~3); -} - -static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg) -{ - u32 val = bcm2835_sdhci_readl(host, (reg & ~3)); - u32 word_num = (reg >> 1) & 1; - u32 word_shift = word_num * 16; - u32 word = (val >> word_shift) & 0xffff; - - return word; -} - -static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg) -{ - u32 oldval = bcm2835_sdhci_readl(host, reg & ~3); - u32 byte_num = reg & 3; - u32 byte_shift = byte_num * 8; - u32 mask = 0xff << byte_shift; - u32 newval = (oldval & ~mask) | (val << byte_shift); - - bcm2835_sdhci_writel(host, newval, reg & ~3); -} - -static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) -{ - u32 val = bcm2835_sdhci_readl(host, (reg & ~3)); - u32 byte_num = reg & 3; - u32 byte_shift = byte_num * 8; - u32 byte = (val >> byte_shift) & 0xff; - - return byte; -} - -static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host) -{ - return MIN_FREQ; -} - -static const struct sdhci_ops bcm2835_sdhci_ops = { - .write_l = bcm2835_sdhci_writel, - .write_w = bcm2835_sdhci_writew, - .write_b = bcm2835_sdhci_writeb, - .read_l = bcm2835_sdhci_readl, - .read_w = bcm2835_sdhci_readw, - .read_b = bcm2835_sdhci_readb, - .set_clock = sdhci_set_clock, - .get_max_clock = sdhci_pltfm_clk_get_max_clock, - .get_min_clock = bcm2835_sdhci_get_min_clock, - .set_bus_width = sdhci_set_bus_width, - .reset = sdhci_reset, - .set_uhs_signaling = sdhci_set_uhs_signaling, -}; - -static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = { - .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | - SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, - .ops = &bcm2835_sdhci_ops, -}; - -static int bcm2835_sdhci_probe(struct platform_device *pdev) -{ - struct sdhci_host *host; - struct bcm2835_sdhci *bcm2835_host; - struct sdhci_pltfm_host *pltfm_host; - int ret; - - host = sdhci_pltfm_init(pdev, &bcm2835_sdhci_pdata, - sizeof(*bcm2835_host)); - if (IS_ERR(host)) - return PTR_ERR(host); - - pltfm_host = sdhci_priv(host); - - pltfm_host->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(pltfm_host->clk)) { - ret = PTR_ERR(pltfm_host->clk); - goto err; - } - ret = clk_prepare_enable(pltfm_host->clk); - if (ret) { - dev_err(&pdev->dev, "failed to enable host clk\n"); - goto err; - } - - ret = sdhci_add_host(host); - if (ret) - goto err_clk; - - return 0; -err_clk: - clk_disable_unprepare(pltfm_host->clk); -err: - sdhci_pltfm_free(pdev); - return ret; -} - -static const struct of_device_id bcm2835_sdhci_of_match[] = { - { .compatible = "brcm,bcm2835-sdhci" }, - { } -}; -MODULE_DEVICE_TABLE(of, bcm2835_sdhci_of_match); - -static struct platform_driver bcm2835_sdhci_driver = { - .driver = { - .name = "sdhci-bcm2835", - .of_match_table = bcm2835_sdhci_of_match, - .pm = SDHCI_PLTFM_PMOPS, - }, - .probe = bcm2835_sdhci_probe, - .remove = sdhci_pltfm_unregister, -}; -module_platform_driver(bcm2835_sdhci_driver); - -MODULE_DESCRIPTION("BCM2835 SDHCI driver"); -MODULE_AUTHOR("Stephen Warren"); -MODULE_LICENSE("GPL v2"); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] mmc: sdhci-bcm2835: remove driver 2016-06-03 19:47 ` Stefan Wahren @ 2016-06-04 0:02 ` Eric Anholt -1 siblings, 0 replies; 16+ messages in thread From: Eric Anholt @ 2016-06-04 0:02 UTC (permalink / raw) To: Ulf Hansson, Adrian Hunter, Stephen Warren, Lee Jones, Rob Herring, Pawel Moll, Mark Rutland Cc: Stefan Wahren, devicetree, linux-mmc, linux-rpi-kernel, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 288 bytes --] Stefan Wahren <stefan.wahren@i2se.com> writes: > The sdhci-bcm2835 is no more needed since it has been replaced > by sdhci-iproc. We've had a cycle to catch regressions from the merged driver, so I'm happy to see the old one go. Thanks Stefan! Acked-by: Eric Anholt <eric@anholt.net> [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 818 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] mmc: sdhci-bcm2835: remove driver @ 2016-06-04 0:02 ` Eric Anholt 0 siblings, 0 replies; 16+ messages in thread From: Eric Anholt @ 2016-06-04 0:02 UTC (permalink / raw) To: linux-arm-kernel Stefan Wahren <stefan.wahren@i2se.com> writes: > The sdhci-bcm2835 is no more needed since it has been replaced > by sdhci-iproc. We've had a cycle to catch regressions from the merged driver, so I'm happy to see the old one go. Thanks Stefan! Acked-by: Eric Anholt <eric@anholt.net> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160603/95f6fb38/attachment-0001.sig> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/2] mmc: remove sdhci-bcm2835 2016-06-03 19:47 ` Stefan Wahren @ 2016-06-22 15:22 ` Ulf Hansson -1 siblings, 0 replies; 16+ messages in thread From: Ulf Hansson @ 2016-06-22 15:22 UTC (permalink / raw) To: Stefan Wahren Cc: Adrian Hunter, Eric Anholt, Stephen Warren, Lee Jones, Rob Herring, Pawel Moll, Mark Rutland, devicetree@vger.kernel.org, linux-rpi-kernel, linux-arm-kernel@lists.infradead.org, linux-mmc On 3 June 2016 at 21:47, Stefan Wahren <stefan.wahren@i2se.com> wrote: > The sdhci-bcm2835 is no more needed since it has been replaced > by sdhci-iproc. > > Stefan Wahren (2): > DT: bindings: remove bcm2835-sdhci > mmc: sdhci-bcm2835: remove driver > > .../devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt | 18 -- > drivers/mmc/host/Kconfig | 11 -- > drivers/mmc/host/Makefile | 1 - > drivers/mmc/host/sdhci-bcm2835.c | 204 -------------------- > 4 files changed, 234 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt > delete mode 100644 drivers/mmc/host/sdhci-bcm2835.c > > -- > 1.7.9.5 > Thanks, applied for next! Kind regards Uffe ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/2] mmc: remove sdhci-bcm2835 @ 2016-06-22 15:22 ` Ulf Hansson 0 siblings, 0 replies; 16+ messages in thread From: Ulf Hansson @ 2016-06-22 15:22 UTC (permalink / raw) To: linux-arm-kernel On 3 June 2016 at 21:47, Stefan Wahren <stefan.wahren@i2se.com> wrote: > The sdhci-bcm2835 is no more needed since it has been replaced > by sdhci-iproc. > > Stefan Wahren (2): > DT: bindings: remove bcm2835-sdhci > mmc: sdhci-bcm2835: remove driver > > .../devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt | 18 -- > drivers/mmc/host/Kconfig | 11 -- > drivers/mmc/host/Makefile | 1 - > drivers/mmc/host/sdhci-bcm2835.c | 204 -------------------- > 4 files changed, 234 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt > delete mode 100644 drivers/mmc/host/sdhci-bcm2835.c > > -- > 1.7.9.5 > Thanks, applied for next! Kind regards Uffe ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-06-22 15:23 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-03 19:47 [PATCH 0/2] mmc: remove sdhci-bcm2835 Stefan Wahren
2016-06-03 19:47 ` Stefan Wahren
2016-06-03 19:47 ` [PATCH 1/2] DT: bindings: remove bcm2835-sdhci Stefan Wahren
2016-06-03 19:47 ` Stefan Wahren
[not found] ` <1464983233-27001-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-06-03 20:00 ` Stephen Warren
2016-06-03 20:00 ` Stephen Warren
2016-06-09 18:11 ` Stefan Wahren
2016-06-09 18:11 ` Stefan Wahren
2016-06-17 18:59 ` Stephen Warren
2016-06-17 18:59 ` Stephen Warren
2016-06-03 19:47 ` [PATCH 2/2] mmc: sdhci-bcm2835: remove driver Stefan Wahren
2016-06-03 19:47 ` Stefan Wahren
2016-06-04 0:02 ` Eric Anholt
2016-06-04 0:02 ` Eric Anholt
2016-06-22 15:22 ` [PATCH 0/2] mmc: remove sdhci-bcm2835 Ulf Hansson
2016-06-22 15:22 ` Ulf Hansson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.