Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, On 11/27/2013 12:39 AM, Sören Brinkmann wrote: > Hi Chris, > > On Tue, Nov 26, 2013 at 06:22:46PM -0500, Chris Ball wrote: >> Hi Soren, sorry for the late review, just trivial changes: > No problem. Thanks for looking at it. > >> >> On Wed, Oct 30 2013, Soren Brinkmann wrote: >>> diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt >>> b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt >>> new file mode 100644 >>> index ..ef4c5ac753e8 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt >>> @@ -0,0 +1,27 @@ >>> +Device Tree Bindings for the Arasan SDCHI Controller >> >> SDHCI > Oops. Will be fixed. > >> >>> + >>> + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only >>> + deviations are documented here. >>> + >>> + [1] Documentation/devicetree/bindings/mmc/mmc.txt >>> + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt >>> + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt >>> + >>> +Required Properties: >>> + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' >>> + - reg: From mmc bindings: Register location and length. >> >> Actually, reg/interrupts are from the OF core. There's no need to >> mention them here. > Tomasz complained when I left those parts out so I added them in v2. > Since it's there now, I don't mind either way. Let's just agree on one > way or the other. > Binding was Acked-by Rob and that's why I believe this should be fine. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, On Tue, Nov 26, 2013 at 06:22:46PM -0500, Chris Ball wrote: > Hi Soren, sorry for the late review, just trivial changes: No problem. Thanks for looking at it. > > On Wed, Oct 30 2013, Soren Brinkmann wrote: > > diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > > b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > > new file mode 100644 > > index ..ef4c5ac753e8 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > > @@ -0,0 +1,27 @@ > > +Device Tree Bindings for the Arasan SDCHI Controller > > SDHCI Oops. Will be fixed. > > > + > > + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only > > + deviations are documented here. > > + > > + [1] Documentation/devicetree/bindings/mmc/mmc.txt > > + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt > > + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt > > + > > +Required Properties: > > + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' > > + - reg: From mmc bindings: Register location and length. > > Actually, reg/interrupts are from the OF core. There's no need to > mention them here. Tomasz complained when I left those parts out so I added them in v2. Since it's there now, I don't mind either way. Let's just agree on one way or the other. > > > + - clocks: From clock bindings: Handles to clock inputs. > > + - clock-names: From clock bindings: Tuple including "clk_xin" and > > "clk_ahb" > > + - interrupts: Interrupt specifier > > + - interrupt-parent: Phandle for the interrupt controller that services > > + interrupts for this device. > > + > > +Example: > > + sdhci@e010 { > > + compatible = "arasan,sdhci-8.9a"; > > + reg = <0xe010 0x1000>; > > + clock-names = "clk_xin", "clk_ahb"; > > + clocks = < 21>, < 32>; > > + interrupt-parent = <>; > > + interrupts = <0 24 4>; > > + } ; > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 3438384d270c..5ede7f722025 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -1357,6 +1357,7 @@ T:git git://git.xilinx.com/linux-xlnx.git > > S: Supported > > F: arch/arm/mach-zynq/ > > F: drivers/cpuidle/cpuidle-zynq.c > > +F: drivers/mmc/host/sdhci-of-arasan.c > > > > ARM SMMU DRIVER > > M: Will Deacon > > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > > index 7fc5099e44b2..1eb090c187bb 100644 > > --- a/drivers/mmc/host/Kconfig > > +++ b/drivers/mmc/host/Kconfig > > @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM > > > > If unsure, say N. > > > > +config MMC_SDHCI_OF_ARASAN > > + tristate "SDHCI OF support for the Arasan SDHCI controllers" > > + depends on MMC_SDHCI_PLTFM > > + depends on OF > > + help > > + This selects the Arasan Secure Digital Host Controller Interface > > + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. > > + > > + If you have a controller with this interface, say Y or M here. > > + > > + If unsure, say N. > > + > > config MMC_SDHCI_OF_ESDHC > > tristate "SDHCI OF support for the Freescale eSDHC controller" > > depends on MMC_SDHCI_PLTFM > > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile > > index c41d0c364509..f93617ec6548 100644 > > --- a/drivers/mmc/host/Makefile > > +++ b/drivers/mmc/host/Makefile > > @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += > > sdhci-cns3xxx.o > > obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o > > obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o > > obj-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o > > +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN) += sdhci-of-arasan.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 > > diff --git a/drivers/mmc/host/sdhci-of-arasan.c > > b/drivers/mmc/host/sdhci-of-arasan.c > > new file mode 100644 > > index ..98464bc732f6 > > --- /dev/null > > +++ b/drivers/mmc/host/sdhci-of-arasan.c > > @@ -0,0 +1,224 @@ > > +/* > > + * Arasan Secure Digital Host Controller Interface. > > + * Copyright (C) 2011 - 2012 Michal Simek > > + * Copyright (c) 2012 Wind River Systems, Inc. > > + * Copyright (C) 2013 Pengutronix e.K. > > + * Copyright (C) 2013 Xilinx Inc. > > + * > > + * Based on sdhci-of-esdhc.c > > + * > > + * Copyright (c) 2007 Freescale Semiconductor, Inc. > > + * Copyright (c) 2009 MontaVista Software, Inc. > > + * > > + * Authors: Xiaobo Xie > > + * Anton Vorontsov > > + * > > + * This program is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License as published by > > + * the Free Software Foundation; either version 2 of the License, or (at > > + * your option) any later version. > > + */ > > The kernel is licensed under GPLv2, not
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Soren, sorry for the late review, just trivial changes: On Wed, Oct 30 2013, Soren Brinkmann wrote: > diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > new file mode 100644 > index ..ef4c5ac753e8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > @@ -0,0 +1,27 @@ > +Device Tree Bindings for the Arasan SDCHI Controller SDHCI > + > + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only > + deviations are documented here. > + > + [1] Documentation/devicetree/bindings/mmc/mmc.txt > + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt > + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt > + > +Required Properties: > + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' > + - reg: From mmc bindings: Register location and length. Actually, reg/interrupts are from the OF core. There's no need to mention them here. > + - clocks: From clock bindings: Handles to clock inputs. > + - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb" > + - interrupts: Interrupt specifier > + - interrupt-parent: Phandle for the interrupt controller that services > + interrupts for this device. > + > +Example: > + sdhci@e010 { > + compatible = "arasan,sdhci-8.9a"; > + reg = <0xe010 0x1000>; > + clock-names = "clk_xin", "clk_ahb"; > + clocks = < 21>, < 32>; > + interrupt-parent = <>; > + interrupts = <0 24 4>; > + } ; > diff --git a/MAINTAINERS b/MAINTAINERS > index 3438384d270c..5ede7f722025 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1357,6 +1357,7 @@ T: git git://git.xilinx.com/linux-xlnx.git > S: Supported > F: arch/arm/mach-zynq/ > F: drivers/cpuidle/cpuidle-zynq.c > +F: drivers/mmc/host/sdhci-of-arasan.c > > ARM SMMU DRIVER > M: Will Deacon > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > index 7fc5099e44b2..1eb090c187bb 100644 > --- a/drivers/mmc/host/Kconfig > +++ b/drivers/mmc/host/Kconfig > @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM > > If unsure, say N. > > +config MMC_SDHCI_OF_ARASAN > + tristate "SDHCI OF support for the Arasan SDHCI controllers" > + depends on MMC_SDHCI_PLTFM > + depends on OF > + help > + This selects the Arasan Secure Digital Host Controller Interface > + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. > + > + If you have a controller with this interface, say Y or M here. > + > + If unsure, say N. > + > config MMC_SDHCI_OF_ESDHC > tristate "SDHCI OF support for the Freescale eSDHC controller" > depends on MMC_SDHCI_PLTFM > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile > index c41d0c364509..f93617ec6548 100644 > --- a/drivers/mmc/host/Makefile > +++ b/drivers/mmc/host/Makefile > @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += > sdhci-cns3xxx.o > obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)+= sdhci-esdhc-imx.o > obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o > obj-$(CONFIG_MMC_SDHCI_TEGRA)+= sdhci-tegra.o > +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN)+= sdhci-of-arasan.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 > diff --git a/drivers/mmc/host/sdhci-of-arasan.c > b/drivers/mmc/host/sdhci-of-arasan.c > new file mode 100644 > index ..98464bc732f6 > --- /dev/null > +++ b/drivers/mmc/host/sdhci-of-arasan.c > @@ -0,0 +1,224 @@ > +/* > + * Arasan Secure Digital Host Controller Interface. > + * Copyright (C) 2011 - 2012 Michal Simek > + * Copyright (c) 2012 Wind River Systems, Inc. > + * Copyright (C) 2013 Pengutronix e.K. > + * Copyright (C) 2013 Xilinx Inc. > + * > + * Based on sdhci-of-esdhc.c > + * > + * Copyright (c) 2007 Freescale Semiconductor, Inc. > + * Copyright (c) 2009 MontaVista Software, Inc. > + * > + * Authors: Xiaobo Xie > + * Anton Vorontsov > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or (at > + * your option) any later version. > + */ The kernel is licensed under GPLv2, not GPLv2 or later. In fact, GPLv2 is incompatible with GPLv3. Can we stick to GPLv2 only here? > + > +#include > +#include "sdhci-pltfm.h" > + > +#define SDHCI_ARASAN_CLK_CTRL_OFFSET 0x2c > + > +#define CLK_CTRL_TIMEOUT_SHIFT 16 > +#define CLK_CTRL_TIMEOUT_MASK(0xf << CLK_CTRL_TIMEOUT_SHIFT) > +#define CLK_CTRL_TIMEOUT_MIN_EXP 13 > + > +/** > + * struct sdhci_arasan_data > + * @clk_ahb: Pointer to the AHB clock > + */ > +struct
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Soren, sorry for the late review, just trivial changes: On Wed, Oct 30 2013, Soren Brinkmann wrote: diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller SDHCI + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. Actually, reg/interrupts are from the OF core. There's no need to mention them here. + - clocks: From clock bindings: Handles to clock inputs. + - clock-names: From clock bindings: Tuple including clk_xin and clk_ahb + - interrupts: Interrupt specifier + - interrupt-parent: Phandle for the interrupt controller that services + interrupts for this device. + +Example: + sdhci@e010 { + compatible = arasan,sdhci-8.9a; + reg = 0xe010 0x1000; + clock-names = clk_xin, clk_ahb; + clocks = clkc 21, clkc 32; + interrupt-parent = gic; + interrupts = 0 24 4; + } ; diff --git a/MAINTAINERS b/MAINTAINERS index 3438384d270c..5ede7f722025 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ T: git git://git.xilinx.com/linux-xlnx.git S: Supported F: arch/arm/mach-zynq/ F: drivers/cpuidle/cpuidle-zynq.c +F: drivers/mmc/host/sdhci-of-arasan.c ARM SMMU DRIVER M: Will Deacon will.dea...@arm.com diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..1eb090c187bb 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM If unsure, say N. +config MMC_SDHCI_OF_ARASAN + tristate SDHCI OF support for the Arasan SDHCI controllers + depends on MMC_SDHCI_PLTFM + depends on OF + help + This selects the Arasan Secure Digital Host Controller Interface + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. + + If you have a controller with this interface, say Y or M here. + + If unsure, say N. + config MMC_SDHCI_OF_ESDHC tristate SDHCI OF support for the Freescale eSDHC controller depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c41d0c364509..f93617ec6548 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)+= sdhci-esdhc-imx.o obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA)+= sdhci-tegra.o +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN)+= sdhci-of-arasan.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 diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c new file mode 100644 index ..98464bc732f6 --- /dev/null +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -0,0 +1,224 @@ +/* + * Arasan Secure Digital Host Controller Interface. + * Copyright (C) 2011 - 2012 Michal Simek mon...@monstr.eu + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. + * + * Based on sdhci-of-esdhc.c + * + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2009 MontaVista Software, Inc. + * + * Authors: Xiaobo Xie x@freescale.com + * Anton Vorontsov avoront...@ru.mvista.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ The kernel is licensed under GPLv2, not GPLv2 or later. In fact, GPLv2 is incompatible with GPLv3. Can we stick to GPLv2 only here? + +#include linux/module.h +#include sdhci-pltfm.h + +#define SDHCI_ARASAN_CLK_CTRL_OFFSET 0x2c + +#define CLK_CTRL_TIMEOUT_SHIFT 16 +#define CLK_CTRL_TIMEOUT_MASK(0xf CLK_CTRL_TIMEOUT_SHIFT) +#define CLK_CTRL_TIMEOUT_MIN_EXP 13 + +/** + * struct sdhci_arasan_data + * @clk_ahb: Pointer to the AHB clock + */ +struct sdhci_arasan_data { + struct clk *clk_ahb; +}; +
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, On Tue, Nov 26, 2013 at 06:22:46PM -0500, Chris Ball wrote: Hi Soren, sorry for the late review, just trivial changes: No problem. Thanks for looking at it. On Wed, Oct 30 2013, Soren Brinkmann wrote: diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller SDHCI Oops. Will be fixed. + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. Actually, reg/interrupts are from the OF core. There's no need to mention them here. Tomasz complained when I left those parts out so I added them in v2. Since it's there now, I don't mind either way. Let's just agree on one way or the other. + - clocks: From clock bindings: Handles to clock inputs. + - clock-names: From clock bindings: Tuple including clk_xin and clk_ahb + - interrupts: Interrupt specifier + - interrupt-parent: Phandle for the interrupt controller that services + interrupts for this device. + +Example: + sdhci@e010 { + compatible = arasan,sdhci-8.9a; + reg = 0xe010 0x1000; + clock-names = clk_xin, clk_ahb; + clocks = clkc 21, clkc 32; + interrupt-parent = gic; + interrupts = 0 24 4; + } ; diff --git a/MAINTAINERS b/MAINTAINERS index 3438384d270c..5ede7f722025 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ T:git git://git.xilinx.com/linux-xlnx.git S: Supported F: arch/arm/mach-zynq/ F: drivers/cpuidle/cpuidle-zynq.c +F: drivers/mmc/host/sdhci-of-arasan.c ARM SMMU DRIVER M: Will Deacon will.dea...@arm.com diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..1eb090c187bb 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM If unsure, say N. +config MMC_SDHCI_OF_ARASAN + tristate SDHCI OF support for the Arasan SDHCI controllers + depends on MMC_SDHCI_PLTFM + depends on OF + help + This selects the Arasan Secure Digital Host Controller Interface + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. + + If you have a controller with this interface, say Y or M here. + + If unsure, say N. + config MMC_SDHCI_OF_ESDHC tristate SDHCI OF support for the Freescale eSDHC controller depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c41d0c364509..f93617ec6548 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN) += sdhci-of-arasan.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 diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c new file mode 100644 index ..98464bc732f6 --- /dev/null +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -0,0 +1,224 @@ +/* + * Arasan Secure Digital Host Controller Interface. + * Copyright (C) 2011 - 2012 Michal Simek mon...@monstr.eu + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. + * + * Based on sdhci-of-esdhc.c + * + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2009 MontaVista Software, Inc. + * + * Authors: Xiaobo Xie x@freescale.com + * Anton Vorontsov avoront...@ru.mvista.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ The kernel is licensed under GPLv2, not GPLv2 or later. In fact, GPLv2 is incompatible with GPLv3. Can we stick to GPLv2 only here? Well, this header allows you to use this source under GPLv2 - which the
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, On 11/27/2013 12:39 AM, Sören Brinkmann wrote: Hi Chris, On Tue, Nov 26, 2013 at 06:22:46PM -0500, Chris Ball wrote: Hi Soren, sorry for the late review, just trivial changes: No problem. Thanks for looking at it. On Wed, Oct 30 2013, Soren Brinkmann wrote: diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller SDHCI Oops. Will be fixed. + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. Actually, reg/interrupts are from the OF core. There's no need to mention them here. Tomasz complained when I left those parts out so I added them in v2. Since it's there now, I don't mind either way. Let's just agree on one way or the other. Binding was Acked-by Rob and that's why I believe this should be fine. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, On 11/06/2013 10:41 PM, Sören Brinkmann wrote: > Hi Chris, > > any comments from your side? Could you consider applying it to your > tree, please? any update on this one? What's the naming convention we should follow? Is sdhci-of-arasan.c OK? Or should we use sdhci-arasan.c instead? Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, On 11/06/2013 10:41 PM, Sören Brinkmann wrote: Hi Chris, any comments from your side? Could you consider applying it to your tree, please? any update on this one? What's the naming convention we should follow? Is sdhci-of-arasan.c OK? Or should we use sdhci-arasan.c instead? Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, any comments from your side? Could you consider applying it to your tree, please? Thanks, Sören On Wed, Oct 30, 2013 at 09:38:09AM -0700, Soren Brinkmann wrote: > Add a driver for Arasan's SDHCI controller core. > > Signed-off-by: Soren Brinkmann > --- > v2: > - document 'interrupts' and 'interrupt-parent' properties in the driver >bindings > - append '-8.9a' IP version specifier to comaptibility string > --- > .../devicetree/bindings/mmc/arasan,sdhci.txt | 27 +++ > MAINTAINERS| 1 + > drivers/mmc/host/Kconfig | 12 ++ > drivers/mmc/host/Makefile | 1 + > drivers/mmc/host/sdhci-of-arasan.c | 224 > + > 5 files changed, 265 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > create mode 100644 drivers/mmc/host/sdhci-of-arasan.c > > diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > new file mode 100644 > index ..ef4c5ac753e8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > @@ -0,0 +1,27 @@ > +Device Tree Bindings for the Arasan SDCHI Controller > + > + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only > + deviations are documented here. > + > + [1] Documentation/devicetree/bindings/mmc/mmc.txt > + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt > + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt > + > +Required Properties: > + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' > + - reg: From mmc bindings: Register location and length. > + - clocks: From clock bindings: Handles to clock inputs. > + - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb" > + - interrupts: Interrupt specifier > + - interrupt-parent: Phandle for the interrupt controller that services > + interrupts for this device. > + > +Example: > + sdhci@e010 { > + compatible = "arasan,sdhci-8.9a"; > + reg = <0xe010 0x1000>; > + clock-names = "clk_xin", "clk_ahb"; > + clocks = < 21>, < 32>; > + interrupt-parent = <>; > + interrupts = <0 24 4>; > + } ; > diff --git a/MAINTAINERS b/MAINTAINERS > index 3438384d270c..5ede7f722025 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1357,6 +1357,7 @@ T: git git://git.xilinx.com/linux-xlnx.git > S: Supported > F: arch/arm/mach-zynq/ > F: drivers/cpuidle/cpuidle-zynq.c > +F: drivers/mmc/host/sdhci-of-arasan.c > > ARM SMMU DRIVER > M: Will Deacon > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > index 7fc5099e44b2..1eb090c187bb 100644 > --- a/drivers/mmc/host/Kconfig > +++ b/drivers/mmc/host/Kconfig > @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM > > If unsure, say N. > > +config MMC_SDHCI_OF_ARASAN > + tristate "SDHCI OF support for the Arasan SDHCI controllers" > + depends on MMC_SDHCI_PLTFM > + depends on OF > + help > + This selects the Arasan Secure Digital Host Controller Interface > + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. > + > + If you have a controller with this interface, say Y or M here. > + > + If unsure, say N. > + > config MMC_SDHCI_OF_ESDHC > tristate "SDHCI OF support for the Freescale eSDHC controller" > depends on MMC_SDHCI_PLTFM > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile > index c41d0c364509..f93617ec6548 100644 > --- a/drivers/mmc/host/Makefile > +++ b/drivers/mmc/host/Makefile > @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += > sdhci-cns3xxx.o > obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)+= sdhci-esdhc-imx.o > obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o > obj-$(CONFIG_MMC_SDHCI_TEGRA)+= sdhci-tegra.o > +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN)+= sdhci-of-arasan.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 > diff --git a/drivers/mmc/host/sdhci-of-arasan.c > b/drivers/mmc/host/sdhci-of-arasan.c > new file mode 100644 > index ..98464bc732f6 > --- /dev/null > +++ b/drivers/mmc/host/sdhci-of-arasan.c > @@ -0,0 +1,224 @@ > +/* > + * Arasan Secure Digital Host Controller Interface. > + * Copyright (C) 2011 - 2012 Michal Simek > + * Copyright (c) 2012 Wind River Systems, Inc. > + * Copyright (C) 2013 Pengutronix e.K. > + * Copyright (C) 2013 Xilinx Inc. > + * > + * Based on sdhci-of-esdhc.c > + * > + * Copyright (c) 2007 Freescale Semiconductor, Inc. > + * Copyright (c) 2009 MontaVista Software, Inc. > + * > + * Authors: Xiaobo Xie > + * Anton Vorontsov > + * > + * This program is free
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Hi Chris, any comments from your side? Could you consider applying it to your tree, please? Thanks, Sören On Wed, Oct 30, 2013 at 09:38:09AM -0700, Soren Brinkmann wrote: Add a driver for Arasan's SDHCI controller core. Signed-off-by: Soren Brinkmann soren.brinkm...@xilinx.com --- v2: - document 'interrupts' and 'interrupt-parent' properties in the driver bindings - append '-8.9a' IP version specifier to comaptibility string --- .../devicetree/bindings/mmc/arasan,sdhci.txt | 27 +++ MAINTAINERS| 1 + drivers/mmc/host/Kconfig | 12 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-arasan.c | 224 + 5 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/arasan,sdhci.txt create mode 100644 drivers/mmc/host/sdhci-of-arasan.c diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. + - clocks: From clock bindings: Handles to clock inputs. + - clock-names: From clock bindings: Tuple including clk_xin and clk_ahb + - interrupts: Interrupt specifier + - interrupt-parent: Phandle for the interrupt controller that services + interrupts for this device. + +Example: + sdhci@e010 { + compatible = arasan,sdhci-8.9a; + reg = 0xe010 0x1000; + clock-names = clk_xin, clk_ahb; + clocks = clkc 21, clkc 32; + interrupt-parent = gic; + interrupts = 0 24 4; + } ; diff --git a/MAINTAINERS b/MAINTAINERS index 3438384d270c..5ede7f722025 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ T: git git://git.xilinx.com/linux-xlnx.git S: Supported F: arch/arm/mach-zynq/ F: drivers/cpuidle/cpuidle-zynq.c +F: drivers/mmc/host/sdhci-of-arasan.c ARM SMMU DRIVER M: Will Deacon will.dea...@arm.com diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..1eb090c187bb 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM If unsure, say N. +config MMC_SDHCI_OF_ARASAN + tristate SDHCI OF support for the Arasan SDHCI controllers + depends on MMC_SDHCI_PLTFM + depends on OF + help + This selects the Arasan Secure Digital Host Controller Interface + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. + + If you have a controller with this interface, say Y or M here. + + If unsure, say N. + config MMC_SDHCI_OF_ESDHC tristate SDHCI OF support for the Freescale eSDHC controller depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c41d0c364509..f93617ec6548 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)+= sdhci-esdhc-imx.o obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA)+= sdhci-tegra.o +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN)+= sdhci-of-arasan.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 diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c new file mode 100644 index ..98464bc732f6 --- /dev/null +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -0,0 +1,224 @@ +/* + * Arasan Secure Digital Host Controller Interface. + * Copyright (C) 2011 - 2012 Michal Simek mon...@monstr.eu + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. + * + * Based on sdhci-of-esdhc.c + * + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2009 MontaVista Software, Inc. + * + * Authors: Xiaobo Xie x@freescale.com + * Anton Vorontsov avoront...@ru.mvista.com + * + * This program is free software; you can redistribute it
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
On Wed, Oct 30, 2013 at 11:38 AM, Soren Brinkmann wrote: > Add a driver for Arasan's SDHCI controller core. > > Signed-off-by: Soren Brinkmann For the binding: Acked-by: Rob Herring > --- > v2: > - document 'interrupts' and 'interrupt-parent' properties in the driver >bindings > - append '-8.9a' IP version specifier to comaptibility string > --- > .../devicetree/bindings/mmc/arasan,sdhci.txt | 27 +++ > MAINTAINERS| 1 + > drivers/mmc/host/Kconfig | 12 ++ > drivers/mmc/host/Makefile | 1 + > drivers/mmc/host/sdhci-of-arasan.c | 224 > + > 5 files changed, 265 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > create mode 100644 drivers/mmc/host/sdhci-of-arasan.c > > diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > new file mode 100644 > index ..ef4c5ac753e8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > @@ -0,0 +1,27 @@ > +Device Tree Bindings for the Arasan SDCHI Controller > + > + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only > + deviations are documented here. > + > + [1] Documentation/devicetree/bindings/mmc/mmc.txt > + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt > + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt > + > +Required Properties: > + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' > + - reg: From mmc bindings: Register location and length. > + - clocks: From clock bindings: Handles to clock inputs. > + - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb" > + - interrupts: Interrupt specifier > + - interrupt-parent: Phandle for the interrupt controller that services > + interrupts for this device. > + > +Example: > + sdhci@e010 { > + compatible = "arasan,sdhci-8.9a"; > + reg = <0xe010 0x1000>; > + clock-names = "clk_xin", "clk_ahb"; > + clocks = < 21>, < 32>; > + interrupt-parent = <>; > + interrupts = <0 24 4>; > + } ; > diff --git a/MAINTAINERS b/MAINTAINERS > index 3438384d270c..5ede7f722025 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1357,6 +1357,7 @@ T:git git://git.xilinx.com/linux-xlnx.git > S: Supported > F: arch/arm/mach-zynq/ > F: drivers/cpuidle/cpuidle-zynq.c > +F: drivers/mmc/host/sdhci-of-arasan.c > > ARM SMMU DRIVER > M: Will Deacon > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > index 7fc5099e44b2..1eb090c187bb 100644 > --- a/drivers/mmc/host/Kconfig > +++ b/drivers/mmc/host/Kconfig > @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM > > If unsure, say N. > > +config MMC_SDHCI_OF_ARASAN > + tristate "SDHCI OF support for the Arasan SDHCI controllers" > + depends on MMC_SDHCI_PLTFM > + depends on OF > + help > + This selects the Arasan Secure Digital Host Controller Interface > + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. > + > + If you have a controller with this interface, say Y or M here. > + > + If unsure, say N. > + > config MMC_SDHCI_OF_ESDHC > tristate "SDHCI OF support for the Freescale eSDHC controller" > depends on MMC_SDHCI_PLTFM > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile > index c41d0c364509..f93617ec6548 100644 > --- a/drivers/mmc/host/Makefile > +++ b/drivers/mmc/host/Makefile > @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += > sdhci-cns3xxx.o > obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o > obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o > obj-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o > +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN) += sdhci-of-arasan.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 > diff --git a/drivers/mmc/host/sdhci-of-arasan.c > b/drivers/mmc/host/sdhci-of-arasan.c > new file mode 100644 > index ..98464bc732f6 > --- /dev/null > +++ b/drivers/mmc/host/sdhci-of-arasan.c > @@ -0,0 +1,224 @@ > +/* > + * Arasan Secure Digital Host Controller Interface. > + * Copyright (C) 2011 - 2012 Michal Simek > + * Copyright (c) 2012 Wind River Systems, Inc. > + * Copyright (C) 2013 Pengutronix e.K. > + * Copyright (C) 2013 Xilinx Inc. > + * > + * Based on sdhci-of-esdhc.c > + * > + * Copyright (c) 2007 Freescale Semiconductor, Inc. > + * Copyright (c) 2009 MontaVista Software, Inc. > + * > + * Authors: Xiaobo Xie > + * Anton Vorontsov > + * > + * This program is free software; you can redistribute it
[PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Add a driver for Arasan's SDHCI controller core. Signed-off-by: Soren Brinkmann --- v2: - document 'interrupts' and 'interrupt-parent' properties in the driver bindings - append '-8.9a' IP version specifier to comaptibility string --- .../devicetree/bindings/mmc/arasan,sdhci.txt | 27 +++ MAINTAINERS| 1 + drivers/mmc/host/Kconfig | 12 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-arasan.c | 224 + 5 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/arasan,sdhci.txt create mode 100644 drivers/mmc/host/sdhci-of-arasan.c diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. + - clocks: From clock bindings: Handles to clock inputs. + - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb" + - interrupts: Interrupt specifier + - interrupt-parent: Phandle for the interrupt controller that services + interrupts for this device. + +Example: + sdhci@e010 { + compatible = "arasan,sdhci-8.9a"; + reg = <0xe010 0x1000>; + clock-names = "clk_xin", "clk_ahb"; + clocks = < 21>, < 32>; + interrupt-parent = <>; + interrupts = <0 24 4>; + } ; diff --git a/MAINTAINERS b/MAINTAINERS index 3438384d270c..5ede7f722025 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ T:git git://git.xilinx.com/linux-xlnx.git S: Supported F: arch/arm/mach-zynq/ F: drivers/cpuidle/cpuidle-zynq.c +F: drivers/mmc/host/sdhci-of-arasan.c ARM SMMU DRIVER M: Will Deacon diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..1eb090c187bb 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM If unsure, say N. +config MMC_SDHCI_OF_ARASAN + tristate "SDHCI OF support for the Arasan SDHCI controllers" + depends on MMC_SDHCI_PLTFM + depends on OF + help + This selects the Arasan Secure Digital Host Controller Interface + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. + + If you have a controller with this interface, say Y or M here. + + If unsure, say N. + config MMC_SDHCI_OF_ESDHC tristate "SDHCI OF support for the Freescale eSDHC controller" depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c41d0c364509..f93617ec6548 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN) += sdhci-of-arasan.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 diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c new file mode 100644 index ..98464bc732f6 --- /dev/null +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -0,0 +1,224 @@ +/* + * Arasan Secure Digital Host Controller Interface. + * Copyright (C) 2011 - 2012 Michal Simek + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. + * + * Based on sdhci-of-esdhc.c + * + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2009 MontaVista Software, Inc. + * + * Authors: Xiaobo Xie + * Anton Vorontsov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ + +#include +#include "sdhci-pltfm.h" + +#define SDHCI_ARASAN_CLK_CTRL_OFFSET 0x2c + +#define CLK_CTRL_TIMEOUT_SHIFT 16 +#define
[PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
Add a driver for Arasan's SDHCI controller core. Signed-off-by: Soren Brinkmann soren.brinkm...@xilinx.com --- v2: - document 'interrupts' and 'interrupt-parent' properties in the driver bindings - append '-8.9a' IP version specifier to comaptibility string --- .../devicetree/bindings/mmc/arasan,sdhci.txt | 27 +++ MAINTAINERS| 1 + drivers/mmc/host/Kconfig | 12 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-arasan.c | 224 + 5 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/arasan,sdhci.txt create mode 100644 drivers/mmc/host/sdhci-of-arasan.c diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. + - clocks: From clock bindings: Handles to clock inputs. + - clock-names: From clock bindings: Tuple including clk_xin and clk_ahb + - interrupts: Interrupt specifier + - interrupt-parent: Phandle for the interrupt controller that services + interrupts for this device. + +Example: + sdhci@e010 { + compatible = arasan,sdhci-8.9a; + reg = 0xe010 0x1000; + clock-names = clk_xin, clk_ahb; + clocks = clkc 21, clkc 32; + interrupt-parent = gic; + interrupts = 0 24 4; + } ; diff --git a/MAINTAINERS b/MAINTAINERS index 3438384d270c..5ede7f722025 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ T:git git://git.xilinx.com/linux-xlnx.git S: Supported F: arch/arm/mach-zynq/ F: drivers/cpuidle/cpuidle-zynq.c +F: drivers/mmc/host/sdhci-of-arasan.c ARM SMMU DRIVER M: Will Deacon will.dea...@arm.com diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..1eb090c187bb 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM If unsure, say N. +config MMC_SDHCI_OF_ARASAN + tristate SDHCI OF support for the Arasan SDHCI controllers + depends on MMC_SDHCI_PLTFM + depends on OF + help + This selects the Arasan Secure Digital Host Controller Interface + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. + + If you have a controller with this interface, say Y or M here. + + If unsure, say N. + config MMC_SDHCI_OF_ESDHC tristate SDHCI OF support for the Freescale eSDHC controller depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c41d0c364509..f93617ec6548 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN) += sdhci-of-arasan.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 diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c new file mode 100644 index ..98464bc732f6 --- /dev/null +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -0,0 +1,224 @@ +/* + * Arasan Secure Digital Host Controller Interface. + * Copyright (C) 2011 - 2012 Michal Simek mon...@monstr.eu + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. + * + * Based on sdhci-of-esdhc.c + * + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2009 MontaVista Software, Inc. + * + * Authors: Xiaobo Xie x@freescale.com + * Anton Vorontsov avoront...@ru.mvista.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ + +#include linux/module.h +#include sdhci-pltfm.h +
Re: [PATCH v2 1/2] mmc: arasan: Add driver for Arasan SDHCI
On Wed, Oct 30, 2013 at 11:38 AM, Soren Brinkmann soren.brinkm...@xilinx.com wrote: Add a driver for Arasan's SDHCI controller core. Signed-off-by: Soren Brinkmann soren.brinkm...@xilinx.com For the binding: Acked-by: Rob Herring rob.herr...@calxeda.com --- v2: - document 'interrupts' and 'interrupt-parent' properties in the driver bindings - append '-8.9a' IP version specifier to comaptibility string --- .../devicetree/bindings/mmc/arasan,sdhci.txt | 27 +++ MAINTAINERS| 1 + drivers/mmc/host/Kconfig | 12 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-arasan.c | 224 + 5 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/arasan,sdhci.txt create mode 100644 drivers/mmc/host/sdhci-of-arasan.c diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt new file mode 100644 index ..ef4c5ac753e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt @@ -0,0 +1,27 @@ +Device Tree Bindings for the Arasan SDCHI Controller + + The bindings follow the mmc[1], clock[2] and interrupt[3] bindings. Only + deviations are documented here. + + [1] Documentation/devicetree/bindings/mmc/mmc.txt + [2] Documentation/devicetree/bindings/clock/clock-bindings.txt + [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Required Properties: + - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' + - reg: From mmc bindings: Register location and length. + - clocks: From clock bindings: Handles to clock inputs. + - clock-names: From clock bindings: Tuple including clk_xin and clk_ahb + - interrupts: Interrupt specifier + - interrupt-parent: Phandle for the interrupt controller that services + interrupts for this device. + +Example: + sdhci@e010 { + compatible = arasan,sdhci-8.9a; + reg = 0xe010 0x1000; + clock-names = clk_xin, clk_ahb; + clocks = clkc 21, clkc 32; + interrupt-parent = gic; + interrupts = 0 24 4; + } ; diff --git a/MAINTAINERS b/MAINTAINERS index 3438384d270c..5ede7f722025 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ T:git git://git.xilinx.com/linux-xlnx.git S: Supported F: arch/arm/mach-zynq/ F: drivers/cpuidle/cpuidle-zynq.c +F: drivers/mmc/host/sdhci-of-arasan.c ARM SMMU DRIVER M: Will Deacon will.dea...@arm.com diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..1eb090c187bb 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -104,6 +104,18 @@ config MMC_SDHCI_PLTFM If unsure, say N. +config MMC_SDHCI_OF_ARASAN + tristate SDHCI OF support for the Arasan SDHCI controllers + depends on MMC_SDHCI_PLTFM + depends on OF + help + This selects the Arasan Secure Digital Host Controller Interface + (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC. + + If you have a controller with this interface, say Y or M here. + + If unsure, say N. + config MMC_SDHCI_OF_ESDHC tristate SDHCI OF support for the Freescale eSDHC controller depends on MMC_SDHCI_PLTFM diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c41d0c364509..f93617ec6548 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o obj-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o +obj-$(CONFIG_MMC_SDHCI_OF_ARASAN) += sdhci-of-arasan.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 diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c new file mode 100644 index ..98464bc732f6 --- /dev/null +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -0,0 +1,224 @@ +/* + * Arasan Secure Digital Host Controller Interface. + * Copyright (C) 2011 - 2012 Michal Simek mon...@monstr.eu + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. + * + * Based on sdhci-of-esdhc.c + * + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2009 MontaVista Software, Inc. + * + * Authors: Xiaobo Xie x@freescale.com + * Anton Vorontsov avoront...@ru.mvista.com + * + * This program is free software; you can