Re: [PATCH 1/1] mmc: of_mmc_spi: fix card detect irq
On 23:13 Sun 26 May , Sergei Shtylyov wrote: Hello. On 05/26/2013 04:28 PM, Jean-Christophe PLAGNIOL-VILLARD wrote: set missing irq type the IRQF_ONESHOT Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: stable sta...@vger.kernel.org # 3.4+ Cc: linux-mmc@vger.kernel.org --- drivers/mmc/host/of_mmc_spi.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index d720b5e..cfb2e61 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c @@ -74,8 +74,8 @@ static int of_mmc_spi_init(struct device *dev, { struct of_mmc_spi *oms = to_of_mmc_spi(dev); -return request_threaded_irq(oms-detect_irq, NULL, irqhandler, 0, -dev_name(dev), mmc); +return request_threaded_irq(oms-detect_irq, NULL, irqhandler, +IRQF_ONESHOT, dev_name(dev), mmc); Please don't change the indentation. too long 80 Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] mmc: of_mmc_spi: fix card detect irq
set missing irq type the IRQF_ONESHOT Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: stable sta...@vger.kernel.org # 3.4+ Cc: linux-mmc@vger.kernel.org --- drivers/mmc/host/of_mmc_spi.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index d720b5e..cfb2e61 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c @@ -74,8 +74,8 @@ static int of_mmc_spi_init(struct device *dev, { struct of_mmc_spi *oms = to_of_mmc_spi(dev); - return request_threaded_irq(oms-detect_irq, NULL, irqhandler, 0, - dev_name(dev), mmc); + return request_threaded_irq(oms-detect_irq, NULL, irqhandler, + IRQF_ONESHOT, dev_name(dev), mmc); } static void of_mmc_spi_exit(struct device *dev, void *mmc) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: mmc: bcm281xx SDHCI driver
On 00:29 Fri 10 May , Christian Daudt wrote: Thanks for the feedback. On 13-05-08 11:35 PM, Jean-Christophe PLAGNIOL-VILLARD wrote: On 22:55 Wed 08 May , Christian Daudt wrote: Add SDHCI driver for the Broadcom 281xx SoCs. Also add bindings for it into bcm281xx dts files. Still missing: - power managemement split the dts/dtsi in an other patch ok. Signed-off-by: Christian Daudt c...@broadcom.com diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig index e3bf2d6..65edf6d 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig @@ -78,6 +78,13 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_TEST=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_BCM_KONA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_TRIGGERS=y diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index d88219e..e067c5a 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -238,6 +238,16 @@ config MMC_SDHCI_S3C_DMA YMMV. +config MMC_SDHCI_BCM_KONA + tristate SDHCI support on Broadcom KONA platform + depends on ARCH_BCM MMC_SDHCI_PLTFM select MMC_SDHCI_PLTFM will be better Ok - changed it. Why is the select is better than the depends ? + +static int sdhci_bcm_kona_sd_reset(struct sdhci_host *host) +{ + unsigned int val; + unsigned long timeout; + + /* This timeout should be sufficent for core to reset */ + timeout = jiffies + msecs_to_jiffies(100); + + /* reset the host using the top level reset */ + val = sdhci_readl(host, KONA_SDHOST_CORECTRL); + val |= KONA_SDHOST_RESET; + sdhci_writel(host, val, KONA_SDHOST_CORECTRL); + + while (!(sdhci_readl(host, KONA_SDHOST_CORECTRL) KONA_SDHOST_RESET)) { + if (time_is_before_jiffies(timeout)) { + pr_err(Error: sd host is stuck in reset!!!\n); + return -EFAULT; + } + } + + /* bring the host out of reset */ + val = sdhci_readl(host, KONA_SDHOST_CORECTRL); + val = ~KONA_SDHOST_RESET; + + /* +* Back-to-Back register write needs a delay of 1ms at bootup (min 10uS) +* Back-to-Back writes to same register needs delay when SD bus clock +* is very low w.r.t AHB clock, mainly during boot-time and during card +* insert-removal. +*/ + udelay(1000); really a udelay of 1ms I'm trying to clarify on whether this is really necessary but it does seem that this is the case. I'll send a follow-up patch if I manage to get confirmation on a smaller safe number. a smaller delay will be better otherwise a msleep(1) Best Regards, J. + sdhci_writel(host, val, KONA_SDHOST_CORECTRL); + + return 0; +} + +static void sdhci_bcm_kona_sd_init(struct sdhci_host *host) +{ + unsigned int val; + + /* enable the interrupt from the IP core */ + val = sdhci_readl(host, KONA_SDHOST_COREIMR); + val |= KONA_SDHOST_IP; + sdhci_writel(host, val, KONA_SDHOST_COREIMR); + + /* Enable the AHB clock gating module to the host */ + val = sdhci_readl(host, KONA_SDHOST_CORECTRL); + val |= KONA_SDHOST_EN; + + /* +* Back-to-Back register write needs a delay of 1ms at bootup (min 10uS) +* Back-to-Back writes to same register needs delay when SD bus clock +* is very low w.r.t AHB clock, mainly during boot-time and during card +* insert-removal. +*/ + udelay(1000); ditto see above + sdhci_writel(host, val, KONA_SDHOST_CORECTRL); +} + +/* + * Software emulation of the SD card insertion/removal. Set insert=1 for insert + * and insert=0 for removal. The card detection is done by GPIO. For Broadcom + * IP to function properly the bit 0 of CORESTAT register needs to be set/reset + * to generate the CD IRQ handled in sdhci.c which schedules card_tasklet. + */ +static int sdhci_bcm_kona_sd_card_emulate(struct sdhci_host *host, int insert) +{ + struct sdhci_pltfm_host *pltfm_priv = sdhci_priv(host); + struct sdhci_bcm_kona_dev *kona_dev = pltfm_priv-priv; + u32 val; + unsigned long flags; + + /* this function can be called from various contexts including ISR */ + spin_lock_irqsave(host-lock, flags); + /* Ensure SD bus scanning to detect media change */ + host-mmc-rescan_disable = 0; + + /* +* Back-to-Back register write needs a delay of min 10uS. +* Back-to-Back writes to same register needs delay when SD bus clock +* is very low w.r.t AHB clock, mainly during boot-time and during card +* insert-removal. +* We keep 20uS +*/ + udelay(20); + val = sdhci_readl(host, KONA_SDHOST_CORESTAT); + + if (insert) { + if (kona_dev-cfg-wp_gpio = 0) { gpio_is_valid done + int wp_status = gpio_get_value(kona_dev-cfg
Re: [PATCH] ARM: mmc: bcm281xx SDHCI driver
On 22:55 Wed 08 May , Christian Daudt wrote: Add SDHCI driver for the Broadcom 281xx SoCs. Also add bindings for it into bcm281xx dts files. Still missing: - power managemement split the dts/dtsi in an other patch Signed-off-by: Christian Daudt c...@broadcom.com diff --git a/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt new file mode 100644 index 000..ad1c4bd --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt @@ -0,0 +1,16 @@ +Broadcom BCM281xx SDHCI driver + +This file documents differences between the core properties in mmc.txt +and the properties in the bcm281xx driver. + +Required properties: +- compatible : Should be bcm,kona-sdhci + +Example: + +sdio2: sdio@0x3f1a { + compatible = bcm,kona-sdhci; + reg = 0x3f1a 0x1; + interrupts = 0x0 74 0x4; +}; + diff --git a/arch/arm/boot/dts/bcm11351-brt.dts b/arch/arm/boot/dts/bcm11351-brt.dts index 248067c..9ae3404 100644 --- a/arch/arm/boot/dts/bcm11351-brt.dts +++ b/arch/arm/boot/dts/bcm11351-brt.dts @@ -27,4 +27,21 @@ status = okay; }; + sdio0: sdio@0x3f18 { + max-frequency = 4800; + status = okay; + }; + + sdio1: sdio@0x3f19 { + non-removable; + max-frequency = 4800; + status = okay; + }; + + sdio3: sdio@0x3f1b { + max-frequency = 4800; + status = okay; + }; + + }; diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi index ad13588..6606b41 100644 --- a/arch/arm/boot/dts/bcm11351.dtsi +++ b/arch/arm/boot/dts/bcm11351.dtsi @@ -47,4 +47,33 @@ cache-unified; cache-level = 2; }; + + sdio0: sdio@0x3f18 { + compatible = bcm,kona-sdhci; + reg = 0x3f18 0x1; + interrupts = 0x0 77 0x4; + status = disabled; + }; + + sdio1: sdio@0x3f19 { + compatible = bcm,kona-sdhci; + reg = 0x3f19 0x1; + interrupts = 0x0 76 0x4; + status = disabled; + }; + + sdio2: sdio@0x3f1a { + compatible = bcm,kona-sdhci; + reg = 0x3f1a 0x1; + interrupts = 0x0 74 0x4; + status = disabled; + }; + + sdio3: sdio@0x3f1b { + compatible = bcm,kona-sdhci; + reg = 0x3f1b 0x1; + interrupts = 0x0 73 0x4; + status = disabled; + }; + }; diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig index e3bf2d6..65edf6d 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig @@ -78,6 +78,13 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_TEST=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_BCM_KONA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_TRIGGERS=y diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index d88219e..e067c5a 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -238,6 +238,16 @@ config MMC_SDHCI_S3C_DMA YMMV. +config MMC_SDHCI_BCM_KONA + tristate SDHCI support on Broadcom KONA platform + depends on ARCH_BCM MMC_SDHCI_PLTFM select MMC_SDHCI_PLTFM will be better + help + This selects the Broadcom Kona Secure Digital Host Controller + Interface(SDHCI) support. + This is used in Broadcom mobile SoCs. + + 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 diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c380e3c..a9f582b 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -59,6 +59,7 @@ obj-$(CONFIG_MMC_SDHCI_DOVE)+= sdhci-dove.o obj-$(CONFIG_MMC_SDHCI_TEGRA)+= sdhci-tegra.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 ifeq ($(CONFIG_CB710_DEBUG),y) diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c new file mode 100644 index 000..27188b9 --- /dev/null +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -0,0 +1,486 @@ +/* + * Copyright (C) 2013 Broadcom Corporation + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU
Re: [PATCH 0/3] ARM: at91: move to generic DMA device tree bindings
On 14:16 Mon 15 Apr , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Hi, This set of patches introduces DMA device tree bindings support for the atmel DMA controller and first driver conversions. I'll send an update of dts file in the next version if there is no major issue with the bindings. looks fine Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. Regards Ludovic Desroches (3): at_hdmac: move to generic DMA binding i2c: at91: convert to dma_request_slave_channel_compat() mci: at91: convert to dma_request_slave_channel_compat() .../devicetree/bindings/dma/atmel-dma.txt | 26 +- arch/arm/boot/dts/sama5d3.dtsi | 4 +- drivers/dma/at_hdmac.c | 93 -- drivers/dma/at_hdmac_regs.h| 4 + drivers/i2c/busses/i2c-at91.c | 49 ++-- drivers/mmc/host/atmel-mci.c | 25 +++--- 6 files changed, 154 insertions(+), 47 deletions(-) -- 1.7.11.3 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] mmc:atmel-mci: use devm_gpio_request/free and configure the pin corrently
as on DT we do not configure the pin via AT91 custom pinmux as before Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: linux-mmc@vger.kernel.org Cc: Ludovic Desroches ludovic.desroc...@atmel.com --- based on next-20121115 Best Regards, J. drivers/mmc/host/atmel-mci.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 767706b..d97771d 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2108,6 +2108,7 @@ static int __init atmci_init_slot(struct atmel_mci *host, { struct mmc_host *mmc; struct atmel_mci_slot *slot; + int ret; mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), host-pdev-dev); if (!mmc) @@ -2161,12 +2162,20 @@ static int __init atmci_init_slot(struct atmel_mci *host, /* Assume card is present initially */ set_bit(ATMCI_CARD_PRESENT, slot-flags); if (gpio_is_valid(slot-detect_pin)) { - if (gpio_request(slot-detect_pin, mmc_detect)) { - dev_dbg(mmc-class_dev, no detect pin available\n); - slot-detect_pin = -EBUSY; - } else if (gpio_get_value(slot-detect_pin) ^ - slot-detect_is_active_high) { - clear_bit(ATMCI_CARD_PRESENT, slot-flags); + ret = devm_gpio_request(mmc-class_dev, slot-detect_pin, mmc_detect); + if (ret) { + dev_warn(mmc-class_dev, can't request detect pin\n); + slot-detect_pin = ret; + } else { + ret = gpio_direction_input(slot-detect_pin); + if (ret) { + dev_err(mmc-class_dev, can't set detect pin direction\n); + devm_gpio_free(mmc-class_dev, slot-detect_pin); + slot-detect_pin = -ret; + } else if (gpio_get_value(slot-detect_pin) ^ + slot-detect_is_active_high) { + clear_bit(ATMCI_CARD_PRESENT, slot-flags); + } } } @@ -2174,9 +2183,17 @@ static int __init atmci_init_slot(struct atmel_mci *host, mmc-caps |= MMC_CAP_NEEDS_POLL; if (gpio_is_valid(slot-wp_pin)) { - if (gpio_request(slot-wp_pin, mmc_wp)) { - dev_dbg(mmc-class_dev, no WP pin available\n); - slot-wp_pin = -EBUSY; + ret = devm_gpio_request(mmc-class_dev, slot-wp_pin, mmc_wp); + if (ret) { + dev_warn(mmc-class_dev, no WP pin available\n); + slot-wp_pin = ret; + } else { + ret = gpio_direction_output(slot-wp_pin, 0); + if (ret) { + dev_err(mmc-class_dev, can't set WP pin direction\n); + devm_gpio_free(mmc-class_dev, slot-wp_pin); + slot-wp_pin = ret; + } } } @@ -2197,8 +2214,8 @@ static int __init atmci_init_slot(struct atmel_mci *host, dev_dbg(mmc-class_dev, could not request IRQ %d for detect pin\n, gpio_to_irq(slot-detect_pin)); - gpio_free(slot-detect_pin); - slot-detect_pin = -EBUSY; + devm_gpio_free(mmc-class_dev, slot-detect_pin); + slot-detect_pin = ret; } } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL] at91: fixes for 3.7-rc7
On 19:47 Tue 20 Nov , Linus Walleij wrote: On Mon, Nov 19, 2012 at 6:29 PM, Nicolas Ferre nicolas.fe...@atmel.com wrote: If you do not take it for 3.7, maybe we will have to queue these patches on top of our AT91 pinctrl work (on Linus Walleij side), so, you do need to queue this one for the moment... Tell me what the outcome is, if I should merge some stuff on top of my pinctrl tree just send me the patches... I send you the pull with few patch for pinctrl Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 02/10] arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Nicolas Ferre nicolas.fe...@atmel.com Cc: linux-...@vger.kernel.org Cc: linux-in...@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: net...@vger.kernel.org Cc: linux-pcm...@lists.infradead.org Cc: rtc-li...@googlegroups.com Cc: spi-devel-gene...@lists.sourceforge.net Cc: linux-ser...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-fb...@vger.kernel.org --- HI all, If it's ok with everyone this will go via at91 with the patch serie than clean up the include/mach For preparation to switch to arm multiarch kernel Best Regards, J. arch/arm/mach-at91/include/mach/board.h | 55 -- arch/avr32/mach-at32ap/include/mach/board.h |7 --- drivers/ata/pata_at91.c |2 +- drivers/input/touchscreen/atmel_tsadcc.c|2 +- drivers/mmc/host/atmel-mci.c|2 +- drivers/net/can/at91_can.c |3 +- drivers/net/ethernet/cadence/at91_ether.c |2 +- drivers/pcmcia/at91_cf.c|2 +- drivers/rtc/rtc-at91sam9.c |2 +- drivers/spi/spi-atmel.c |2 +- drivers/tty/serial/atmel_serial.c |2 +- drivers/usb/gadget/at91_udc.c |2 +- drivers/usb/gadget/atmel_usba_udc.c |2 +- drivers/usb/host/ohci-at91.c|2 +- drivers/video/atmel_lcdfb.c |2 +- include/linux/platform_data/atmel.h | 67 +++ 16 files changed, 80 insertions(+), 76 deletions(-) diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index c55a436..662451d 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h @@ -31,42 +31,15 @@ #ifndef __ASM_ARCH_BOARD_H #define __ASM_ARCH_BOARD_H -#include linux/mtd/partitions.h -#include linux/device.h -#include linux/i2c.h -#include linux/leds.h -#include linux/spi/spi.h -#include linux/usb/atmel_usba_udc.h -#include linux/atmel-mci.h -#include sound/atmel-ac97c.h -#include linux/serial.h -#include linux/platform_data/macb.h #include linux/platform_data/atmel.h /* USB Device */ -struct at91_udc_data { - int vbus_pin; /* high == host powering us */ - u8 vbus_active_low;/* vbus polarity */ - u8 vbus_polled;/* Use polling, not interrupt */ - int pullup_pin; /* active == D+ pulled up */ - u8 pullup_active_low; /* true == pullup_pin is active low */ -}; extern void __init at91_add_device_udc(struct at91_udc_data *data); /* USB High Speed Device */ extern void __init at91_add_device_usba(struct usba_platform_data *data); /* Compact Flash */ -struct at91_cf_data { - int irq_pin;/* I/O IRQ */ - int det_pin;/* Card detect */ - int vcc_pin;/* power switching */ - int rst_pin;/* card reset */ - u8 chipselect; /* EBI Chip Select number */ - u8 flags; -#define AT91_CF_TRUE_IDE 0x01 -#define AT91_IDE_SWAP_A0_A20x02 -}; extern void __init at91_add_device_cf(struct at91_cf_data *data); /* MMC / SD */ @@ -86,16 +59,6 @@ extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *d extern void __init at91_add_device_eth(struct macb_platform_data *data); /* USB Host */ -#define AT91_MAX_USBH_PORTS3 -struct at91_usbh_data { - int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */ - int overcurrent_pin[AT91_MAX_USBH_PORTS]; - u8 ports; /* number of ports on root hub */ - u8 overcurrent_supported; - u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS]; - u8 overcurrent_status[AT91_MAX_USBH_PORTS]; - u8 overcurrent_changed[AT91_MAX_USBH_PORTS]; -}; extern void __init at91_add_device_usbh(struct at91_usbh_data *data); extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); @@ -124,13 +87,6 @@ extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pin extern struct platform_device *atmel_default_console_device; -struct atmel_uart_data { - int num;/* port num */ - short use_dma_tx; /* use transmit DMA? */ - short use_dma_rx; /* use receive DMA? */ - void __iomem*regs; /* virt. base address, if any */ - struct serial_rs485 rs485; /* rs485 settings */ -}; extern void __init at91_add_device_serial(void); /* @@ -173,24 +129,13 @@ extern void __init
Re: [PATCH] mmc: at91-mci: remove driver
On 11:38 Tue 30 Oct , Chris Ball wrote: Hi, On Tue, Oct 30 2012, Jean-Christophe PLAGNIOL-VILLARD wrote: On 11:09 Tue 30 Oct , Chris Ball wrote: Hi, On Tue, Oct 30 2012, Jean-Christophe PLAGNIOL-VILLARD wrote: Thanks! Pushed to mmc-next for 3.8. if you don't mind I prefer to take it via at91 I've a patch series that cleanup the platform_data it's difficult to merge with this one Hm, I don't understand why it should be difficult to merge. Is it because this patch modifies arch/arm/mach-at91/include/mach/board.h? If so, sounds like we should just take that change out of this patch and have it go into your platform data cleanup patch, and then I can merge the drivers/mmc change independently? Let me know what you think. I'm modifing and moiving the board.h so this file will not exist anymore and the platform data are not anymore in arch/arm/mach-at91/include/mach/board.h Can we take the modification of board.h out of this patch, then, leaving just the drivers/mmc/ changes? If you really insist but for changelog history and bisectable I'll prefer to do not do so Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: at91-mci: remove driver
On 11:09 Tue 30 Oct , Chris Ball wrote: Hi, On Tue, Oct 30 2012, Jean-Christophe PLAGNIOL-VILLARD wrote: Thanks! Pushed to mmc-next for 3.8. if you don't mind I prefer to take it via at91 I've a patch series that cleanup the platform_data it's difficult to merge with this one Hm, I don't understand why it should be difficult to merge. Is it because this patch modifies arch/arm/mach-at91/include/mach/board.h? If so, sounds like we should just take that change out of this patch and have it go into your platform data cleanup patch, and then I can merge the drivers/mmc change independently? Let me know what you think. I'm modifing and moiving the board.h so this file will not exist anymore and the platform data are not anymore in arch/arm/mach-at91/include/mach/board.h Best Regards, J. Thanks, - Chris. -- Chris Ball c...@laptop.org http://printf.net/ One Laptop Per Child -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: at91-mci: remove driver
On 10:45 Mon 29 Oct , Chris Ball wrote: Hi, On Mon, Oct 29 2012, ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com The at91-mci driver is no more needed since atmel-mci driver supports all Atmel devices. Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com Thanks! Pushed to mmc-next for 3.8. if you don't mind I prefer to take it via at91 I've a patch series that cleanup the platform_data it's difficult to merge with this one Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] MMC: fix sdhci-dove removal
On 11:44 Mon 15 Oct , Russell King - ARM Linux wrote: On Mon, Oct 15, 2012 at 11:37:25AM +0100, Russell King - ARM Linux wrote: On Mon, Oct 15, 2012 at 10:43:48AM +0100, Russell King - ARM Linux wrote: 1. Unregister the device _BEFORE_ taking away any resources it may be using. 2. Don't check clks against NULL. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk Looking at this driver some more, who the hell came up with the sdhci registration interface? It violates one of the most fundamental principles of kernel driver programming. You do _NOT_ publish your driver interfaces _UNTIL_ you have finished setting your device up. Otherwise, in a preemptible or SMP kernel, your driver can be used before the initialization has completed. As this driver calls sdhci_pltfm_register() before it has obtained the clock for the interface, and this function does: sdhci_pltfm_init sdhci_add_host mmc_add_host mmc_start_host mmc_power_up mmc_set_ios sdhci_set_ios See, we're trying to power up and clock the card _before_ the dove sdhci driver has even claimed the clock let alone enabled it. This is total bollocks. The sdhci platform interface is total crap for creating this broken design in the first place. This is why MMC has the init + add interfaces, they're there to allow drivers to do stuff the Right(tm) way and avoid shit like the above. This should have been picked up at review time before the driver went into mainline. In any case, it needs to be fixed. Here's an updated patch which just about fixes the sdhci-dove driver. I would not be surprised given the idiotic sdhci-pltfm API if many other drivers suffered the same bug. 8 From: Russell King rmk+ker...@arm.linux.org.uk Subject: [PATCH] MMC: fix sdhci-dove probe/removal 1. Never ever publish a device in the system before it has been setup to a usable state. 2. Unregister the device _BEFORE_ taking away any resources it may be using. 3. Don't check clks against NULL. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/mmc/host/sdhci-dove.c | 36 ++-- 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index a6e53a1..7d3a4e4 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c @@ -83,30 +83,31 @@ static int __devinit sdhci_dove_probe(struct platform_device *pdev) struct sdhci_dove_priv *priv; int ret; - ret = sdhci_pltfm_register(pdev, sdhci_dove_pdata); - if (ret) - goto sdhci_dove_register_fail; - priv = devm_kzalloc(pdev-dev, sizeof(struct sdhci_dove_priv), GFP_KERNEL); if (!priv) { dev_err(pdev-dev, unable to allocate private data); - ret = -ENOMEM; - goto sdhci_dove_allocate_fail; + return -ENOMEM; } + priv-clk = clk_get(pdev-dev, NULL); you have devm_clk_get too maybe you could use it here too Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] ARM: at91: add atmel-mci support for chips and boards which can use it
On 12:56 Tue 29 May , Nicolas Ferre wrote: On 05/28/2012 09:41 AM, Jean-Christophe PLAGNIOL-VILLARD : On 12:23 Mon 21 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Since atmel-mci driver supports all atmel mci version excepted the rm9200 one, use it instead of at91_mci driver. Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com --- V2: add several boards I missed for the 9g20 and 9260 please drop the old driver support too No, we will drop the support for old driver when we finish the transition period. We will then drop at91_mci with all configuration data in device/board files. on 9g20 and 9260 the new drivers is present for release there is no reason to keep one more release Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/4 v5] ARM: dts: add nodes for atmel hsmci controllers for atmel boards
On 17:15 Thu 24 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Add mci controller nodes to atmel boards. Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4 v5] ARM: dts: add nodes for atmel hsmci controllers for atmel SOCs
On 17:15 Thu 24 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Add mci controller nodes to atmel SOCs. Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4 v5] mmc: atmel-mci: add device tree support
On 17:15 Thu 24 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 67 +++ drivers/mmc/host/atmel-mci.c | 85 +++- 2 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/atmel-hsmci.txt diff --git a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt new file mode 100644 index 000..81c20cc --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt @@ -0,0 +1,67 @@ +* Atmel High Speed MultiMedia Card Interface + +This controller on atmel products provides an interface for MMC, SD and SDIO +types of memory cards. + +1) MCI node + +Required properties: +- compatible: no blank atmel,hsmci +- reg: should contain HSMCI registers location and length +- interrupts: should contain HSMCI interrupt number +- #address-cells: should be one. The cell is the slot id. +- #size-cells: should be zero. +- at least one slot node + +The node contains child nodes for each slot that the platform uses + +Example MCI node: + +mmc0: mmc@f0008000 { + compatible = atmel,hsmci; + reg = 0xf0008000 0x600; + interrupts = 12 4; + #address-cells = 1; + #size-cells = 0; + + [ child node definitions...] +}; + +2) slot nodes + +Required properties: +- reg: should contain the slot id. +- bus-width: number of data lines connected to the controller + +Optional properties: +- cd-gpios: specify GPIOs for card detection +- cd-inverted: invert the value of external card detect gpio line +- wp-gpios: specify GPIOs for write protection + +Example slot node: + +slot@0 { + reg = 0; + bus-width = 4; + cd-gpios = pioD 15 0 + cd-inverted; +}; + +Example full MCI node: +mmc0: mmc@f0008000 { + compatible = atmel,hsmci; + reg = 0xf0008000 0x600; + interrupts = 12 4; + #address-cells = 1; + #size-cells = 0; + slot@0 { + reg = 0; + bus-width = 4; + cd-gpios = pioD 15 0 + cd-inverted; + }; + slot@1 { + reg = 1; + bus-width = 4; + }; +}; diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index f2c115e..47421fc 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -19,6 +19,9 @@ #include linux/interrupt.h #include linux/ioport.h #include linux/module.h +#include linux/of.h +#include linux/of_device.h +#include linux/of_gpio.h #include linux/platform_device.h #include linux/scatterlist.h #include linux/seq_file.h @@ -493,6 +496,70 @@ err: dev_err(mmc-class_dev, failed to initialize debugfs for slot\n); } +#if defined(CONFIG_OF) +static const struct of_device_id atmci_dt_ids[] = { + { .compatible = atmel,hsmci }, + { /* sentinel */ } +}; + +MODULE_DEVICE_TABLE(of, atmci_dt_ids); + +static struct mci_platform_data __devinit* +atmci_of_init(struct platform_device *pdev) +{ + struct device_node *np = pdev-dev.of_node; + struct device_node *cnp; + struct mci_platform_data *pdata; + u32 slot_id; + + if (!np) { + dev_err(pdev-dev, device node not found\n); + return ERR_PTR(-EINVAL); + } + + pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL); + if (!pdata) { + dev_err(pdev-dev, could not allocate memory for pdata\n); + return ERR_PTR(-ENOMEM); + } + + for_each_child_of_node(np, cnp) { + if (of_property_read_u32(cnp, reg, slot_id)) { + dev_warn(pdev-dev, reg property is missing for %s\n, + cnp-full_name); + continue; + } + + if (slot_id = ATMCI_MAX_NR_SLOTS) { + dev_warn(pdev-dev, can't have more than %d slots\n, + ATMCI_MAX_NR_SLOTS); + break; + } + + if (of_property_read_u32(cnp, bus-width, + pdata-slot[slot_id].bus_width)) + pdata-slot[slot_id].bus_width = 1; + + pdata-slot[slot_id].detect_pin = + of_get_named_gpio(cnp, cd-gpios, 0); + + pdata-slot[slot_id].detect_is_active_high = + of_property_read_bool(cnp, cd-inverted); as this is going to be removed at once please implement the gpio active low too otherwise Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http
Re: [PATCH v2] ARM: at91: add atmel-mci support for chips and boards which can use it
On 12:23 Mon 21 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Since atmel-mci driver supports all atmel mci version excepted the rm9200 one, use it instead of at91_mci driver. Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com --- V2: add several boards I missed for the 9g20 and 9260 please drop the old driver support too for calao bord you can do it too Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 1/3] mmc: atmel-mci: add device tree support
On 09:23 Wed 23 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 67 +++ drivers/mmc/host/atmel-mci.c | 87 +++- 2 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/atmel-hsmci.txt diff --git a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt new file mode 100644 index 000..81c20cc --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt @@ -0,0 +1,67 @@ +* Atmel High Speed MultiMedia Card Interface + +This controller on atmel products provides an interface for MMC, SD and SDIO +types of memory cards. + +1) MCI node + +Required properties: +- compatible: no blank atmel,hsmci +- reg: should contain HSMCI registers location and length +- interrupts: should contain HSMCI interrupt number +- #address-cells: should be one. The cell is the slot id. +- #size-cells: should be zero. +- at least one slot node + +The node contains child nodes for each slot that the platform uses + +Example MCI node: + +mmc0: mmc@f0008000 { + compatible = atmel,hsmci; + reg = 0xf0008000 0x600; + interrupts = 12 4; + #address-cells = 1; + #size-cells = 0; + + [ child node definitions...] +}; + +2) slot nodes + +Required properties: +- reg: should contain the slot id. +- bus-width: number of data lines connected to the controller + +Optional properties: +- cd-gpios: specify GPIOs for card detection +- cd-inverted: invert the value of external card detect gpio line +- wp-gpios: specify GPIOs for write protection + +Example slot node: + +slot@0 { + reg = 0; + bus-width = 4; + cd-gpios = pioD 15 0 + cd-inverted; +}; + +Example full MCI node: +mmc0: mmc@f0008000 { + compatible = atmel,hsmci; + reg = 0xf0008000 0x600; + interrupts = 12 4; + #address-cells = 1; + #size-cells = 0; + slot@0 { + reg = 0; + bus-width = 4; + cd-gpios = pioD 15 0 + cd-inverted; + }; + slot@1 { + reg = 1; + bus-width = 4; + }; +}; diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 556d384..1842dc7 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -19,6 +19,9 @@ #include linux/interrupt.h #include linux/ioport.h #include linux/module.h +#include linux/of.h +#include linux/of_device.h +#include linux/of_gpio.h #include linux/platform_device.h #include linux/scatterlist.h #include linux/seq_file.h @@ -493,6 +496,72 @@ err: dev_err(mmc-class_dev, failed to initialize debugfs for slot\n); } +#if defined(CONFIG_OF) +static const struct of_device_id atmci_dt_ids[] = { + { .compatible = atmel,hsmci }, + { /* sentinel */ } +}; + +MODULE_DEVICE_TABLE(of, atmci_dt_ids); + +static struct mci_platform_data __devinit* +atmci_of_init(struct platform_device *pdev) +{ + struct device_node *np = pdev-dev.of_node; + struct device_node *cnp; + struct mci_platform_data *pdata; + u32 slot_id; + int ret; + + if (!np) { + dev_err(pdev-dev, device node not found\n); + return ERR_PTR(-EINVAL); + } + + pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL); + if (!pdata) { + dev_err(pdev-dev, could not allocate memory for pdata\n); + return ERR_PTR(-ENOMEM); + } + + for_each_child_of_node(np, cnp) { + ret = of_property_read_u32(cnp, reg, slot_id); + if (ret) { really need ret = ? + dev_warn(pdev-dev, reg property is missing for %s\n, + cnp-full_name); + continue; + } + + if (slot_id (ATMCI_MAX_NR_SLOTS-1)) { missing spase arround '-' if (slot_id = ATMCI_MAX_NR_SLOTS) will do the same + dev_warn(pdev-dev, can't have more than %d slots\n, + ATMCI_MAX_NR_SLOTS); + break; + } + + if (of_property_read_u32(cnp, bus-width, + pdata-slot[slot_id].bus_width)) + pdata-slot[slot_id].bus_width = 1; + + pdata-slot[slot_id].detect_pin = + of_get_named_gpio(cnp, cd-gpios, 0); + + pdata-slot[slot_id].detect_is_active_high = + of_property_read_bool(cnp, cd-inverted); I really this this is redondant with gpio binding Chris?? BestRegards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to
Re: [PATCH v3 1/3] mmc: atmel-mci: add device tree support
On 12:09 Tue 22 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 67 +++ drivers/mmc/host/atmel-mci.c | 89 +++- 2 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/atmel-hsmci.txt diff --git a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt new file mode 100644 index 000..81c20cc --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt @@ -0,0 +1,67 @@ +* Atmel High Speed MultiMedia Card Interface + +This controller on atmel products provides an interface for MMC, SD and SDIO +types of memory cards. + +1) MCI node + +Required properties: +- compatible: no blank atmel,hsmci +- reg: should contain HSMCI registers location and length +- interrupts: should contain HSMCI interrupt number +- #address-cells: should be one. The cell is the slot id. +- #size-cells: should be zero. +- at least one slot node + +The node contains child nodes for each slot that the platform uses + +Example MCI node: + +mmc0: mmc@f0008000 { + compatible = atmel,hsmci; + reg = 0xf0008000 0x600; + interrupts = 12 4; + #address-cells = 1; + #size-cells = 0; + + [ child node definitions...] +}; + +2) slot nodes + +Required properties: +- reg: should contain the slot id. +- bus-width: number of data lines connected to the controller + +Optional properties: +- cd-gpios: specify GPIOs for card detection +- cd-inverted: invert the value of external card detect gpio line why this no need you can use the third field and OF_GPIO_ACTIVE_LOW as done on ohci-at91.c +- wp-gpios: specify GPIOs for write protection + +Example slot node: + +slot@0 { + reg = 0; + bus-width = 4; + cd-gpios = pioD 15 0 + cd-inverted; +}; + +Example full MCI node: +mmc0: mmc@f0008000 { + compatible = atmel,hsmci; + reg = 0xf0008000 0x600; + interrupts = 12 4; + #address-cells = 1; + #size-cells = 0; + slot@0 { + reg = 0; + bus-width = 4; + cd-gpios = pioD 15 0 + cd-inverted; + }; + slot@1 { + reg = 1; + bus-width = 4; + }; +}; diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 556d384..43f98fc 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -19,6 +19,9 @@ #include linux/interrupt.h #include linux/ioport.h #include linux/module.h +#include linux/of.h +#include linux/of_device.h +#include linux/of_gpio.h #include linux/platform_device.h #include linux/scatterlist.h #include linux/seq_file.h @@ -493,6 +496,74 @@ err: dev_err(mmc-class_dev, failed to initialize debugfs for slot\n); } +#if defined(CONFIG_OF) +static const struct of_device_id atmci_dt_ids[] = { + { .compatible = atmel,hsmci }, + { /* sentinel */ } +}; + +MODULE_DEVICE_TABLE(of, atmci_dt_ids); + +static struct mci_platform_data __devinit* +atmci_of_init(struct platform_device *pdev) +{ + struct device_node *np = pdev-dev.of_node; + struct device_node *cnp; + struct mci_platform_data *pdata; + unsigned int slot_id; + const __be32 *reg; + + if (!np) { + dev_err(pdev-dev, device node not found\n); + return ERR_PTR(-EINVAL); + } + + pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL); + if (!pdata) { + dev_err(pdev-dev, could not allocate memory for pdata\n); + return ERR_PTR(-ENOMEM); + } + + for_each_child_of_node(np, cnp) { + reg = of_get_property(cnp, reg, NULL); + if (!reg) { + dev_warn(pdev-dev, reg property is missing for %s\n, + cnp-full_name); + continue; + } + + slot_id = be32_to_cpu(reg[0]); read_u32 + + if (slot_id (ATMCI_MAX_NR_SLOTS-1)) { + dev_warn(pdev-dev, can't have more than %d slots\n, + ATMCI_MAX_NR_SLOTS); + break; + } + + if (of_property_read_u32(cnp, bus-width, + pdata-slot[slot_id].bus_width)) + pdata-slot[slot_id].bus_width = 1; + + pdata-slot[slot_id].detect_pin = + of_get_named_gpio(cnp, cd-gpios, 0); + + if (of_find_property(cnp, cd-inverted, NULL)) + pdata-slot[slot_id].detect_is_active_high = true; + + pdata-slot[slot_id].wp_pin = + of_get_named_gpio(cnp, wp-gpios, 0); + }
Re: [PATCH v3 2/3] ARM: at91: add clocks for DT entries
On 12:09 Tue 22 May , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Add clocks to clock lookup table for DT entries. Signed-off-by: Ludovic Desroches ludovic.desroc...@atmel.com Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1 3/5] ARM: imx28evk: add mmc dt support
On 12:45 Tue 13 Mar , Rob Herring wrote: On 03/13/2012 11:52 AM, Sascha Hauer wrote: On Tue, Mar 13, 2012 at 09:39:30AM -0500, Rob Herring wrote: On 03/13/2012 03:47 AM, Dong Aisheng wrote: From: Dong Aisheng dong.aish...@linaro.org Signed-off-by: Dong Aisheng dong.aish...@linaro.org --- arch/arm/boot/dts/imx28-evk.dts | 14 ++ arch/arm/boot/dts/imx28.dtsi| 33 + arch/arm/mach-mxs/imx28-dt.c|2 ++ 3 files changed, 49 insertions(+), 0 deletions(-) snip diff --git a/arch/arm/mach-mxs/imx28-dt.c b/arch/arm/mach-mxs/imx28-dt.c index 78d1129..429b88e 100644 --- a/arch/arm/mach-mxs/imx28-dt.c +++ b/arch/arm/mach-mxs/imx28-dt.c @@ -23,6 +23,8 @@ static const struct of_dev_auxdata imx28_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl011, MX28_DUART_BASE_ADDR, duart, NULL), OF_DEV_AUXDATA(fsl,imx28-fec, MX28_ENET_MAC0_BASE_ADDR, imx28-fec.0, NULL), OF_DEV_AUXDATA(fsl,imx28-fec, MX28_ENET_MAC1_BASE_ADDR, imx28-fec.1, NULL), + OF_DEV_AUXDATA(fsl,imx28-mmc, MX28_SSP0_BASE_ADDR, mxs-mmc.0, NULL), + OF_DEV_AUXDATA(fsl,imx28-mmc, MX28_SSP1_BASE_ADDR, mxs-mmc.1, NULL), Why is this needed? These are needed for the drivers which have still the mxs-mmc.* names to find their clocks. Alternatively we could also add the appropriate clocks to the clock file. Don't know if that's better though. Ah, yes I should have known that... If clk lookup is all that's needed, I'd suggest adding the necessary clk lookups either here or in the clock code. Not much difference, but at least it removes the use of *_BASE_ADDR defines. Agreed we do this on AT91 Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1 2/5] mmc: mxs-mmc: add dt probe support
On 16:47 Tue 13 Mar , Dong Aisheng wrote: From: Dong Aisheng dong.aish...@linaro.org Signed-off-by: Dong Aisheng dong.aish...@linaro.org --- The patch is still using a private way for dma part binding since the common dma binding is still under discussion. http://www.spinics.net/lists/linux-omap/msg65528.html Will update to use common dma binding when it hits mainline. --- .../devicetree/bindings/mmc/fsl-mxs-mmc.txt| 23 ++ drivers/mmc/host/mxs-mmc.c | 82 +++- 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/fsl-mxs-mmc.txt b/Documentation/devicetree/bindings/mmc/fsl-mxs-mmc.txt new file mode 100644 index 000..adc1142 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/fsl-mxs-mmc.txt @@ -0,0 +1,23 @@ +* FREESCALE MXS MMC peripheral + +Required properties: +- compatible : Should be fsl,chip-mmc +- reg : Should contain registers location and length +- interrupts : Should contain interrupt. + The format is irq_err irq_dma. +- dma_channel: Should contain the dma channel it uses + +Optional properties: +- wp-gpios : Specify GPIOs for write protection +- slot-4bit: Specify 4 bit mode support +- slot-8bit: Specify 8 bit and 4 bit mode support + +Examples: +mmc1: ssp@8001 { + compatible = fsl,imx28-mmc; + reg = 0x8001 2000; + /* irq_err irq_dma */ + interrupts = 96 82; + dma_channel = 0; + slot-8bit; +}; diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 382c835..6cf2d17 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -38,6 +38,10 @@ #include linux/gpio.h #include linux/regulator/consumer.h #include linux/module.h +#include linux/of.h +#include linux/of_device.h +#include linux/of_gpio.h +#include linux/slab.h #include mach/mxs.h #include mach/common.h @@ -673,17 +677,79 @@ static bool mxs_mmc_dma_filter(struct dma_chan *chan, void *param) return true; } +#ifdef CONFIG_OF +static struct resource * __devinit mxs_mmc_get_of_dmares( + struct platform_device *pdev) +{ + struct device_node *np = pdev-dev.of_node; + struct resource *dmares; + int ret; + + if (!np) + return NULL; + + dmares = kzalloc(sizeof(*dmares), GFP_KERNEL); + dmares-flags = IORESOURCE_DMA; + ret = of_property_read_u32(np, dma_channel, dmares-start); + if (ret) { + dev_err(pdev-dev, unable to get dmares from dt\n); + return NULL; + } + dmares-end = dmares-start; + + return dmares; +} + +static int __devinit mxs_mmc_get_of_property(struct platform_device *pdev, + struct mxs_mmc_platform_data **ppdata) +{ + struct device_node *np = pdev-dev.of_node; + struct mxs_mmc_platform_data *pdata = *ppdata; + + if (!np) + return -ENODEV; + + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); + + if (of_get_property(np, slot-8bit, NULL)) + pdata-flags |= SLOTF_8_BIT_CAPABLE; + + if (of_get_property(np, slot-4bit, NULL)) + pdata-flags |= SLOTF_4_BIT_CAPABLE; it will conflit if both binding are set use a number instead Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1 3/5] ARM: imx28evk: add mmc dt support
On 16:47 Tue 13 Mar , Dong Aisheng wrote: From: Dong Aisheng dong.aish...@linaro.org Signed-off-by: Dong Aisheng dong.aish...@linaro.org --- arch/arm/boot/dts/imx28-evk.dts | 14 ++ arch/arm/boot/dts/imx28.dtsi| 33 + arch/arm/mach-mxs/imx28-dt.c|2 ++ 3 files changed, 49 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts index 9758dc4..61350ab 100644 --- a/arch/arm/boot/dts/imx28-evk.dts +++ b/arch/arm/boot/dts/imx28-evk.dts @@ -21,6 +21,20 @@ reg = 0x4000 0x0800; }; +apb@8000 { +apbh@8000 { + mmc1: ssp@8001 { + slot-8bit; + status = okay; + }; + + mmc2: ssp@80012000 { + slot-8bit; + status = okay; + }; + }; + }; + ahb@8008 { fec@800f { phy-mode = rmii; diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index acf0dab..71c7bfb 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -46,6 +46,39 @@ #interrupt-cells = 1; reg = 0x8000 0x2000; }; + + ssp@8001 { + compatible = fsl,imx28-mmc; + reg = 0x8001 2000; + /* irq_err irq_dma */ + interrupts = 96 82; + dma_channel = 0; + status = disabled; + }; + + ssp@80012000 { + compatible = fsl,imx28-mmc; + reg = 0x80012000 2000; + interrupts = 97 83; + dma_channel = 1; + status = disabled; + }; + + ssp@80014000 { + compatible = fsl,imx28-mmc; + reg = 0x80014000 2000; + interrupts = 98 84; + dma_channel = 2; + status = disabled; + }; + + ssp@80016000 { + compatible = fsl,imx28-mmc; + reg = 0x80016000 2000; + interrupts = 99 85; + dma_channel = 3; + status = disabled; + }; }; apbx@8004 { diff --git a/arch/arm/mach-mxs/imx28-dt.c b/arch/arm/mach-mxs/imx28-dt.c index 78d1129..429b88e 100644 --- a/arch/arm/mach-mxs/imx28-dt.c +++ b/arch/arm/mach-mxs/imx28-dt.c @@ -23,6 +23,8 @@ static const struct of_dev_auxdata imx28_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl011, MX28_DUART_BASE_ADDR, duart, NULL), OF_DEV_AUXDATA(fsl,imx28-fec, MX28_ENET_MAC0_BASE_ADDR, imx28-fec.0, NULL), OF_DEV_AUXDATA(fsl,imx28-fec, MX28_ENET_MAC1_BASE_ADDR, imx28-fec.1, NULL), + OF_DEV_AUXDATA(fsl,imx28-mmc, MX28_SSP0_BASE_ADDR, mxs-mmc.0, NULL), + OF_DEV_AUXDATA(fsl,imx28-mmc, MX28_SSP1_BASE_ADDR, mxs-mmc.1, NULL), do we really need to continue to add OF_DEV_AUXDATA instead add a clkdev entry IIRC OF_DEV_AUXDATA was a temporary solution, we need to stop to use it more and more Best Reards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1 3/5] ARM: imx28evk: add mmc dt support
On 16:20 Wed 14 Mar , Dong Aisheng wrote: On Wed, Mar 14, 2012 at 03:30:35PM +0800, Jean-Christophe PLAGNIOL-VILLARD wrote: On 12:45 Tue 13 Mar , Rob Herring wrote: On 03/13/2012 11:52 AM, Sascha Hauer wrote: On Tue, Mar 13, 2012 at 09:39:30AM -0500, Rob Herring wrote: On 03/13/2012 03:47 AM, Dong Aisheng wrote: From: Dong Aisheng dong.aish...@linaro.org Signed-off-by: Dong Aisheng dong.aish...@linaro.org --- arch/arm/boot/dts/imx28-evk.dts | 14 ++ arch/arm/boot/dts/imx28.dtsi| 33 + arch/arm/mach-mxs/imx28-dt.c|2 ++ 3 files changed, 49 insertions(+), 0 deletions(-) snip diff --git a/arch/arm/mach-mxs/imx28-dt.c b/arch/arm/mach-mxs/imx28-dt.c index 78d1129..429b88e 100644 --- a/arch/arm/mach-mxs/imx28-dt.c +++ b/arch/arm/mach-mxs/imx28-dt.c @@ -23,6 +23,8 @@ static const struct of_dev_auxdata imx28_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl011, MX28_DUART_BASE_ADDR, duart, NULL), OF_DEV_AUXDATA(fsl,imx28-fec, MX28_ENET_MAC0_BASE_ADDR, imx28-fec.0, NULL), OF_DEV_AUXDATA(fsl,imx28-fec, MX28_ENET_MAC1_BASE_ADDR, imx28-fec.1, NULL), + OF_DEV_AUXDATA(fsl,imx28-mmc, MX28_SSP0_BASE_ADDR, mxs-mmc.0, NULL), + OF_DEV_AUXDATA(fsl,imx28-mmc, MX28_SSP1_BASE_ADDR, mxs-mmc.1, NULL), Why is this needed? These are needed for the drivers which have still the mxs-mmc.* names to find their clocks. Alternatively we could also add the appropriate clocks to the clock file. Don't know if that's better though. Ah, yes I should have known that... If clk lookup is all that's needed, I'd suggest adding the necessary clk lookups either here or in the clock code. Not much difference, but at least it removes the use of *_BASE_ADDR defines. Agreed we do this on AT91 I'm willing to do like that. But i'm new to this, can you help point our where the code i can reference in Rob suggested way? mach-at91 Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1 2/5] mmc: mxs-mmc: add dt probe support
On 16:09 Wed 14 Mar , Dong Aisheng wrote: On Wed, Mar 14, 2012 at 03:23:43PM +0800, Jean-Christophe PLAGNIOL-VILLARD wrote: On 16:47 Tue 13 Mar , Dong Aisheng wrote: From: Dong Aisheng dong.aish...@linaro.org Signed-off-by: Dong Aisheng dong.aish...@linaro.org --- The patch is still using a private way for dma part binding since the common dma binding is still under discussion. http://www.spinics.net/lists/linux-omap/msg65528.html Will update to use common dma binding when it hits mainline. --- .../devicetree/bindings/mmc/fsl-mxs-mmc.txt| 23 ++ drivers/mmc/host/mxs-mmc.c | 82 +++- 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/fsl-mxs-mmc.txt b/Documentation/devicetree/bindings/mmc/fsl-mxs-mmc.txt new file mode 100644 index 000..adc1142 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/fsl-mxs-mmc.txt @@ -0,0 +1,23 @@ +* FREESCALE MXS MMC peripheral + +Required properties: +- compatible : Should be fsl,chip-mmc +- reg : Should contain registers location and length +- interrupts : Should contain interrupt. + The format is irq_err irq_dma. +- dma_channel: Should contain the dma channel it uses + +Optional properties: +- wp-gpios : Specify GPIOs for write protection +- slot-4bit: Specify 4 bit mode support +- slot-8bit: Specify 8 bit and 4 bit mode support + +Examples: +mmc1: ssp@8001 { + compatible = fsl,imx28-mmc; + reg = 0x8001 2000; + /* irq_err irq_dma */ + interrupts = 96 82; + dma_channel = 0; + slot-8bit; +}; diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 382c835..6cf2d17 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -38,6 +38,10 @@ #include linux/gpio.h #include linux/regulator/consumer.h #include linux/module.h +#include linux/of.h +#include linux/of_device.h +#include linux/of_gpio.h +#include linux/slab.h #include mach/mxs.h #include mach/common.h @@ -673,17 +677,79 @@ static bool mxs_mmc_dma_filter(struct dma_chan *chan, void *param) return true; } +#ifdef CONFIG_OF +static struct resource * __devinit mxs_mmc_get_of_dmares( + struct platform_device *pdev) +{ + struct device_node *np = pdev-dev.of_node; + struct resource *dmares; + int ret; + + if (!np) + return NULL; + + dmares = kzalloc(sizeof(*dmares), GFP_KERNEL); + dmares-flags = IORESOURCE_DMA; + ret = of_property_read_u32(np, dma_channel, dmares-start); + if (ret) { + dev_err(pdev-dev, unable to get dmares from dt\n); + return NULL; + } + dmares-end = dmares-start; + + return dmares; +} + +static int __devinit mxs_mmc_get_of_property(struct platform_device *pdev, + struct mxs_mmc_platform_data **ppdata) +{ + struct device_node *np = pdev-dev.of_node; + struct mxs_mmc_platform_data *pdata = *ppdata; + + if (!np) + return -ENODEV; + + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); + + if (of_get_property(np, slot-8bit, NULL)) + pdata-flags |= SLOTF_8_BIT_CAPABLE; + + if (of_get_property(np, slot-4bit, NULL)) + pdata-flags |= SLOTF_4_BIT_CAPABLE; it will conflit if both binding are set use a number instead Hmm, i did not see conflict, can you explain more? The slot-8bit includes the support for 4bit.(see binding doc) Even user define them two property in dt by mistake, it does not cause conflict. See: if (pdata) { if (pdata-flags SLOTF_8_BIT_CAPABLE) mmc-caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; if (pdata-flags SLOTF_4_BIT_CAPABLE) mmc-caps |= MMC_CAP_4_BIT_DATA; } this is mmc specifc sohould have a generic binding Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: atmel-mci: save and restore sdioirq when soft reset is performed
On 16:45 Wed 08 Feb , Ludovic Desroches wrote: Hello Jean-Christophe, A customer using an Atheros AR6103 SDIO WLAN adapter faces this issue. Sometimes we perform a software reset and he noticed that after he didn't get sdio irq. The interrupt mask register is also resetted when performing software reset. so put this in the commit Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: atmel-mci: save and restore sdioirq when soft reset is performed
On 18:22 Wed 08 Feb , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com why do you need this? Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 06/11] at91/mmc: use gpio_is_valid to check the gpio
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Nicolas Ferre nicolas.fe...@atmel.com Cc: linux-mmc@vger.kernel.org --- Hi, I'd like to apply this patch via AT91 with the whole gpio patch series Best Regards, J. drivers/mmc/host/at91_mci.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index a4aa3af..7504b22 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -741,7 +741,7 @@ static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) at91_mci_write(host, AT91_MCI_MR, (at91_mci_read(host, AT91_MCI_MR) ~AT91_MCI_CLKDIV) | clkdiv); /* maybe switch power to the card */ - if (host-board-vcc_pin) { + if (gpio_is_valid(host-board-vcc_pin)) { switch (ios-power_mode) { case MMC_POWER_OFF: gpio_set_value(host-board-vcc_pin, 0); @@ -893,7 +893,7 @@ static int at91_mci_get_ro(struct mmc_host *mmc) { struct at91mci_host *host = mmc_priv(mmc); - if (host-board-wp_pin) + if (gpio_is_valid(host-board-wp_pin)) return !!gpio_get_value(host-board-wp_pin); /* * Board doesn't support read only detection; let the mmc core @@ -987,21 +987,21 @@ static int __init at91_mci_probe(struct platform_device *pdev) * Reserve GPIOs ... board init code makes sure these pins are set * up as GPIOs with the right direction (input, except for vcc) */ - if (host-board-det_pin) { + if (gpio_is_valid(host-board-det_pin)) { ret = gpio_request(host-board-det_pin, mmc_detect); if (ret 0) { dev_dbg(pdev-dev, couldn't claim card detect pin\n); goto fail4b; } } - if (host-board-wp_pin) { + if (gpio_is_valid(host-board-wp_pin)) { ret = gpio_request(host-board-wp_pin, mmc_wp); if (ret 0) { dev_dbg(pdev-dev, couldn't claim wp sense pin\n); goto fail4; } } - if (host-board-vcc_pin) { + if (gpio_is_valid(host-board-vcc_pin)) { ret = gpio_request(host-board-vcc_pin, mmc_vcc); if (ret 0) { dev_dbg(pdev-dev, couldn't claim vcc switch pin\n); @@ -1053,7 +1053,7 @@ static int __init at91_mci_probe(struct platform_device *pdev) /* * Add host to MMC layer */ - if (host-board-det_pin) { + if (gpio_is_valid(host-board-det_pin)) { host-present = !gpio_get_value(host-board-det_pin); } else @@ -1064,7 +1064,7 @@ static int __init at91_mci_probe(struct platform_device *pdev) /* * monitor card insertion/removal if we can */ - if (host-board-det_pin) { + if (gpio_is_valid(host-board-det_pin)) { ret = request_irq(gpio_to_irq(host-board-det_pin), at91_mmc_det_irq, 0, mmc_hostname(mmc), host); if (ret) @@ -1083,13 +1083,13 @@ fail0: fail1: clk_put(host-mci_clk); fail2: - if (host-board-vcc_pin) + if (gpio_is_valid(host-board-vcc_pin)) gpio_free(host-board-vcc_pin); fail3: - if (host-board-wp_pin) + if (gpio_is_valid(host-board-wp_pin)) gpio_free(host-board-wp_pin); fail4: - if (host-board-det_pin) + if (gpio_is_valid(host-board-det_pin)) gpio_free(host-board-det_pin); fail4b: if (host-buffer) @@ -1121,7 +1121,7 @@ static int __exit at91_mci_remove(struct platform_device *pdev) dma_free_coherent(pdev-dev, MCI_BUFSIZE, host-buffer, host-physical_address); - if (host-board-det_pin) { + if (gpio_is_valid(host-board-det_pin)) { if (device_can_wakeup(pdev-dev)) free_irq(gpio_to_irq(host-board-det_pin), host); device_init_wakeup(pdev-dev, 0); @@ -1136,9 +1136,9 @@ static int __exit at91_mci_remove(struct platform_device *pdev) clk_disable(host-mci_clk); /* Disable the peripheral clock */ clk_put(host-mci_clk); - if (host-board-vcc_pin) + if (gpio_is_valid(host-board-vcc_pin)) gpio_free(host-board-vcc_pin); - if (host-board-wp_pin) + if (gpio_is_valid(host-board-wp_pin)) gpio_free(host-board-wp_pin); iounmap(host-baseaddr); @@ -1159,7 +1159,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) struct at91mci_host *host = mmc_priv(mmc); int ret = 0; - if (host-board-det_pin device_may_wakeup(pdev-dev)) + if (gpio_is_valid(host-board-det_pin
Re: [RFC PATCH 6/9] atmel_pdc: add ATMEL_PDC_SCND_BUF_OFF
On 16:29 Thu 28 Jul , ludovic.desroc...@atmel.com wrote: From: Ludovic Desroches ludovic.desroc...@atmel.com Add define for the offset value between first and second buffer registers. patch 6 7 can be joined Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] at91_mci: move register header to drivers
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Nicolas Ferre nicolas.fe...@atmel.com Cc: linux-mmc@vger.kernel.org --- drivers/mmc/host/at91_mci.c|3 ++- .../include/mach = drivers/mmc/host}/at91_mci.h |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) rename {arch/arm/mach-at91/include/mach = drivers/mmc/host}/at91_mci.h (99%) diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index d3e6a96..a4aa3af 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -77,7 +77,8 @@ #include mach/board.h #include mach/cpu.h -#include mach/at91_mci.h + +#include at91_mci.h #define DRIVER_NAME at91_mci diff --git a/arch/arm/mach-at91/include/mach/at91_mci.h b/drivers/mmc/host/at91_mci.h similarity index 99% rename from arch/arm/mach-at91/include/mach/at91_mci.h rename to drivers/mmc/host/at91_mci.h index 02182c1..eec3a6b 100644 --- a/arch/arm/mach-at91/include/mach/at91_mci.h +++ b/drivers/mmc/host/at91_mci.h @@ -1,5 +1,5 @@ /* - * arch/arm/mach-at91/include/mach/at91_mci.h + * drivers/mmc/host/at91_mci.h * * Copyright (C) 2005 Ivan Kokshaysky * Copyright (C) SAN People -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] MMC: Fix multiblock SDIO transfers in ATMEL MCI
On 19:14 Fri 10 Dec , Nicolas Ferre wrote: Based on report made by Yauhen in: MMC: Fix multiblock SDIO transfers in AT91 MCI patch, I report those changes to the brother driver: atmel-mci. So, this patch sets SDIO transfer types: SDIO block and SDIO byte transfers instead of using ordinary MMC block transfers. It is checking opcode for SDIO CMD53 and setting transfer type in MCI_CMDR register properly. Reported-by: Yauhen Kharuzhy yauhen.kharu...@promwad.com Signed-off-by: Nicolas Ferre nicolas.fe...@atmel.com Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] MMC: Fix multiblock SDIO transfers in AT91 MCI
On 12:11 Thu 25 Nov , Yauhen Kharuzhy wrote: The AT91 MCI has special SDIO transfer types: SDIO block and SDIO byte transfers, but at91_mci driver doesn't use them and handles all SDIO transfers as ordinary MMC block transfers. This causes problems for multiple-block SDIO transfers (in particular for 256-bytes blocks). Fix this situation by check opcode for SDIO CMD53 and set transfer type in AT91_MCI_CMDR register properly. This patch was tested with libertas SDIO driver: problem with TX timeouts on big packets was eliminated. Signed-off-by: Yauhen Kharuzhy yauhen.kharu...@promwad.com Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH RESEND] at91_mci.c: use resource_size()
On 20:24 Fri 27 Aug , Matt Fleming wrote: [Adding maintainer to CC] On Fri, Aug 27, 2010 at 08:08:13PM +0100, Chris Ball wrote: From: H Hartley Sweeten hswee...@visionengravers.com Date: Mon, 14 Dec 2009 14:10:26 -0500 Use resource_size(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com [cjb: rebased patch against Linus] Signed-off-by: Chris Ball c...@laptop.org Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Bset Regards, J. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html