Re: [PATCH] mmc: sunxi: Use devm_reset_control_get_optional() for reset control

2015-03-03 Thread David Lanzendörfer
Acked-by: David Lanzendörfer > The reset control for the sunxi mmc controller is optional. Some > newer platforms (sun6i, sun8i, sun9i) have it, while older ones > (sun4i, sun5i, sun7i) don't. > > Use the properly stubbed _optional version so the driver does not &g

Re: [PATCH] mmc: sunxi: avoid invalid pointer calculation

2015-02-24 Thread David Lanzendörfer
Acked-by: David Lanzendörfer Am Dienstag, 24. Februar 2015, 10.47:27 schrieb Arnd Bergmann: > The sunxi mmc driver tries to calculate a dma address by using pointer > arithmetic, which causes a warning when dma_addr_t is wider than a pointer: > > drivers/mmc/host/sunxi-mmc.c:

sunxi-project-meetup@31c3

2014-12-28 Thread David Lanzendörfer
Hello folks Is anyone of you at the Chaos Communication Congress? I'd like to organize a table for sunxi-linux-project All the best David signature.asc Description: This is a digitally signed message part.

[PATCH 2/4] mmc: sunxi: Lock fix

2014-12-16 Thread David Lanzendörfer
theoretically been possible that some other function would access the variable at the same time as the function. This has been changed now and the function is using local variables outside the lock and copys the value over during the lock phase. Signed-off-by: David

[PATCH 3/4] mmc: sunxi: Correcting SDXC_HARDWARE_RESET bit

2014-12-16 Thread David Lanzendörfer
Fixing the register name in sunxi_mmc_reset_host since the SDXC_HARDWARE_RESET bit is actually located within REG_GCTRL and not REG_CMDR as it was pointed out by Allwinner. Signed-off-by: David Lanzendörfer Reported-by: 李想 --- drivers/mmc/host/sunxi-mmc.c |2 +- 1 file changed, 1

[PATCH 1/4] mmc: sunxi: Fix setup of last descriptor of dma transfer

2014-12-16 Thread David Lanzendörfer
descriptor. Also set the ER (end of ring) bit and clear buf_addr_ptr2 on the last descriptor, like the android kernel code does. Signed-off-by: Hans de Goede Signed-off-by: David Lanzendörfer Reported-by: 李想 --- drivers/mmc/host/sunxi-mmc.c |4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 4/4] mmc: sunxi: Removing unused code

2014-12-16 Thread David Lanzendörfer
Removing a relict from reverse engineering of the Android driver code in sunxi_mmc_clk_set_rate. Signed-off-by: David Lanzendörfer Reported-by: 李想 --- drivers/mmc/host/sunxi-mmc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b

[PATCH 0/4] mmc: sunxi: General fixup (v2)

2014-12-16 Thread David Lanzendörfer
rward to your feedback Cheers David --- David Lanzendörfer (3): mmc: sunxi: Lock fix mmc: sunxi: Correcting SDXC_HARDWARE_RESET bit mmc: sunxi: Removing unused code Hans de Goede (1): mmc: sunxi: Fix setup of last descriptor of dma transfer drivers/mmc/host/sunxi-

[PATCH 1/4] mmc: sunxi: Lock fix

2014-12-15 Thread David Lanzendörfer
theoretically been possible that some other function would access the variable at the same time as the function. This has been changed now and the function is using local variables outside the lock and copys the value over during the lock phase. Signed-off-by: David

[PATCH 3/4] mmc: sunxi: Reset behavior fix

2014-12-15 Thread David Lanzendörfer
SDXC_IDMAC_DES0_LD are both required in order to use the controller with more than one DES. Signed-off-by: David Lanzendörfer Reported-by: 李想 --- drivers/mmc/host/sunxi-mmc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host

[PATCH 4/4] mmc: sunxi: Removing unused code

2014-12-15 Thread David Lanzendörfer
Removing a relict from reverse engineering of the Android driver code in sunxi_mmc_clk_set_rate. Signed-off-by: David Lanzendörfer Reported-by: 李想 --- drivers/mmc/host/sunxi-mmc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b

[PATCH 0/4] mmc: sunxi: General fixup

2014-12-15 Thread David Lanzendörfer
rward to your feedback Cheers David --- David Lanzendörfer (4): mmc: sunxi: Lock fix mmc: sunxi: Correcting SDXC_HARDWARE_RESET bit mmc: sunxi: Reset behavior fix mmc: sunxi: Removing unused code drivers/mmc/host/sunxi-mmc.c | 37 +--

[PATCH 2/4] mmc: sunxi: Correcting SDXC_HARDWARE_RESET bit

2014-12-15 Thread David Lanzendörfer
Fixing the register name in sunxi_mmc_reset_host since the SDXC_HARDWARE_RESET bit is actually located within REG_GCTRL and not REG_CMDR as it was pointed out by Allwinner. Signed-off-by: David Lanzendörfer Reported-by: 李想 --- drivers/mmc/host/sunxi-mmc.c |2 +- 1 file changed, 1

Re: [PATCH v3 11/12] mmc: sunxi: Convert MMC driver to the standard clock phase API

2014-09-26 Thread David Lanzendörfer
ou my assume my: Acked-by: David Lanzendörfer chears and all the best david > > > [...] > > How did you calculate the actual phase values from the original > > parameters? > > Like shown in the clock driver. 0 is always a 180 deg phase shift, and > any other val

Re: [PATCH v3 11/12] mmc: sunxi: Convert MMC driver to the standard clock phase API

2014-09-26 Thread David Lanzendörfer
oclk_dly = 180; > + sclk_dly = 42; > [...] How did you calculate the actual phase values from the original parameters? greatings -- David Lanzendörfer OpenSourceSupport GmbH System engineer and supporter http://www.o2s.ch/ signature.asc Description: This is a digitally signed message part.

Re: [PATCH v2 03/12] clk: Add a function to retrieve phase

2014-09-02 Thread David Lanzendörfer
Hi > Yep, except that if I see a value -1 as a phase, I would assume that > it's 359, but maybe it's just me :) -1 looks suspiciously like an error return value from somewhere... -- David Lanzendörfer OpenSourceSupport GmbH System engineer and supporter http://www.o2s.ch

Re: [PATCH] mmc: sunxi: Declare ERASE capability

2014-08-29 Thread David Lanzendörfer
Ok then. Let's have it in our driver so far until we can get rid of this flag for good. cheers -- David Lanzendörfer OpenSourceSupport GmbH System engineer and supporter http://www.o2s.ch/ signature.asc Description: This is a digitally signed message part.

Re: [PATCH] mmc: sunxi: Declare ERASE capability

2014-08-20 Thread David Lanzendörfer
40; > mmc->f_max = 5000; > - mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; > + mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | > + MMC_CAP_ERASE; > > ret =

Re: [PATCH v9 05/17] ARM: dts: sun4i: Add pin-muxing info for the mmc0 controller

2014-04-29 Thread David Lanzendörfer
in their muxing. br -- David Lanzendörfer OpenSourceSupport GmbH System engineer and supporter http://www.o2s.ch/ signature.asc Description: This is a digitally signed message part.

Re: [PATCH v5 6/8] ARM: dts: sun4i: Add support for mmc

2014-03-11 Thread David Lanzendörfer
Hi > Oh, good catch, thanks! Fixed in the sunxi-devel branch > in my *personal* git repo. I'll also push this to the official linux-sunxi > sunxi-devel branch later today. Fixed it for the next patch set as well. -david signature.asc Description: This is a digitally signed message part.

Re: [PATCH v7 8/8] ARM: sunxi: Add documentation for driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-21 Thread David Lanzendörfer
Hi > Please use the real compatibles here. It's much easier to search > for. Plus, your driver doesn't support all the SoCs you're mentionning here. > [...] > Please provide the real property name to use. No need for an example > here, you have a full-fledged one in a few lines. Fixed that. > Ditt

[PATCH v7 1/8] clk: sunxi: factors: automatic reparenting support

2014-02-17 Thread David Lanzendörfer
From: Emilio López This commit implements .determine_rate, so that our factor clocks can be reparented when needed. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-factors.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/clk/sunxi/clk-

[PATCH v7 5/8] ARM: dts: sun7i: Add support for mmc

2014-02-17 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v7 8/8] ARM: sunxi: Add documentation for driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-17 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer --- .../devicetree/bindings/mmc/sunxi-mmc.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b

[PATCH v7 3/8] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-17 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

[PATCH v7 7/8] ARM: dts: sun5i: Add support for mmc

2014-02-17 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm

[PATCH v7 6/8] ARM: dts: sun4i: Add support for mmc

2014-02-17 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions

[PATCH v7 4/8] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-17 Thread David Lanzendörfer
This is based on the driver Allwinner ships in their Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v7 0/8] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-17 Thread David Lanzendörfer
on cd pins -fixup: Don't set MMC_CAP_NEEDS_POLL / MMC_CAP_4_BIT_DATA Changes since v6: -fixing copyright info in sunxi-mmc.* -s/__SUNXI_MCI_H__/__SUNXI_MMC_H__/g -s/SDXC_RESPONSE_/SDXC_RESP_/g -s/define/definitions <- Comment from Priit Laes --- David Lanzendörfer (5): ARM: su

[PATCH v7 2/8] clk: sunxi: Implement MMC phase control

2014-02-17 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

Re: [linux-sunxi] [PATCH v6 4/8] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-16 Thread David Lanzendörfer
Hi > > + * Driver for sunxi SD/MMC host controllers > > + * (C) Copyright 2014-2015 Reuuimlla Technology Co., Ltd. > > + * (C) Copyright 2014-2015 Aaron Maoye > > + * (C) Copyright 2014-2015 O2S GmbH > > + * (C) Copyright 2014-2015 David Lanzendörfer > > >

[PATCH v6 5/8] ARM: dts: sun7i: Add support for mmc

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v6 4/8] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-15 Thread David Lanzendörfer
This is based on the driver Allwinner ships in their Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v6 3/8] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-15 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

[PATCH v6 8/8] ARM: sunxi: Add documentation for driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer --- .../devicetree/bindings/mmc/sunxi-mmc.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b

[PATCH v6 7/8] ARM: dts: sun5i: Add support for mmc

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm

[PATCH v6 6/8] ARM: dts: sun4i: Add support for mmc

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions

[PATCH v6 0/8] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-15 Thread David Lanzendörfer
on cd pins -fixup: Don't set MMC_CAP_NEEDS_POLL / MMC_CAP_4_BIT_DATA --- David Lanzendörfer (5): ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs ARM: dts: sun7i: Add support for mmc ARM: dts: sun4i: Add support for mmc ARM: dts: sun5i: Add su

[PATCH v6 2/8] clk: sunxi: Implement MMC phase control

2014-02-15 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

[PATCH v6 1/8] clk: sunxi: factors: automatic reparenting support

2014-02-15 Thread David Lanzendörfer
From: Emilio López This commit implements .determine_rate, so that our factor clocks can be reparented when needed. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-factors.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/clk/sunxi/clk-

[PATCH v6 0/8]

2014-02-15 Thread David Lanzendörfer
on cd pins -fixup: Don't set MMC_CAP_NEEDS_POLL / MMC_CAP_4_BIT_DATA --- David Lanzendörfer (5): ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs ARM: dts: sun7i: Add support for mmc ARM: dts: sun4i: Add support for mmc ARM: dts: sun5i: Add su

[PATCH v6 2/8] clk: sunxi: Implement MMC phase control

2014-02-15 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

[PATCH v6 5/8] ARM: dts: sun7i: Add support for mmc

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v6 6/8] ARM: dts: sun4i: Add support for mmc

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions

[PATCH v6 4/8] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-15 Thread David Lanzendörfer
This is based on the driver Allwinner ships in their Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v6 3/8] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-15 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

[PATCH v6 8/8] ARM: sunxi: Add documentation for driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer --- .../devicetree/bindings/mmc/sunxi-mmc.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b

[PATCH v6 7/8] ARM: dts: sun5i: Add support for mmc

2014-02-15 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm

[PATCH v6 1/8] clk: sunxi: factors: automatic reparenting support

2014-02-15 Thread David Lanzendörfer
From: Emilio López This commit implements .determine_rate, so that our factor clocks can be reparented when needed. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-factors.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/clk/sunxi/clk-

[PATCH v5 2/8] clk: sunxi: Implement MMC phase control

2014-02-11 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

[PATCH v5 0/8] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-11 Thread David Lanzendörfer
-mmc.h -moving defines out of the struct definition since this is bad coding style -adding documentation for the device tree binding --- David Lanzendörfer (5): ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs ARM: dts: sun7i: Add support for mmc ARM: dts: sun4i

[PATCH v5 4/8] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-11 Thread David Lanzendörfer
This is based on the driver Allwinner ships in their Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v5 1/8] clk: sunxi: factors: automatic reparenting support

2014-02-11 Thread David Lanzendörfer
From: Emilio López This commit implements .determine_rate, so that our factor clocks can be reparented when needed. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-factors.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/clk/sunxi/clk-

[PATCH v5 6/8] ARM: dts: sun4i: Add support for mmc

2014-02-11 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions

[PATCH v5 8/8] ARM: sunxi: Add documentation for driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-11 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer --- .../devicetree/bindings/mmc/sunxi-mmc.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b

[PATCH v5 5/8] ARM: dts: sun7i: Add support for mmc

2014-02-11 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v5 7/8] ARM: dts: sun5i: Add support for mmc

2014-02-11 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm

[PATCH v5 3/8] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-11 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

Re: [PATCH v4 4/7] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-10 Thread David Lanzendörfer
Hi > > +(cmd->opcode == 5 || cmd->opcode == 52)) > Aren't these the ones defined in linux/mmc/sdio.h: > 5 - SD_IO_SEND_OP_COND > 52 - SD_IO_RW_DIRECT Yes. They are... Changed that. Also I removed the camel cases and the defines within the struct definition. > > +struct sunxi_mmc_clk_d

[PATCH v4 4/7] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-07 Thread David Lanzendörfer
This is based on the driver Allwinner ships in their Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v4 5/7] ARM: dts: sun7i: Add support for mmc

2014-02-07 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v4 0/7] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-07 Thread David Lanzendörfer
new lines -Adding missing patch for automatic reparenting of clocks Changes since v3: -Move clk_enable / disable into host_init / exit (Hans) -Fix hang on boot caused by irq storm (Hans) regards David --- David Lanzendörfer (4): ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi

[PATCH v4 7/7] ARM: dts: sun5i: Add support for mmc

2014-02-07 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm

[PATCH v4 6/7] ARM: dts: sun4i: Add support for mmc

2014-02-07 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions

[PATCH v4 1/7] clk: sunxi: factors: automatic reparenting support

2014-02-07 Thread David Lanzendörfer
From: Emilio López This commit implements .determine_rate, so that our factor clocks can be reparented when needed. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-factors.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/clk/sunxi/clk-

[PATCH v4 2/7] clk: sunxi: Implement MMC phase control

2014-02-07 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

[PATCH v4 3/7] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-07 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

Re: [PATCH 0/2] sunxi-mci: Fix hang on boot caused by irq storm

2014-02-07 Thread David Lanzendörfer
Hi Hans > Here are 2 patches fixing a hang on boot caused by an irq storm, which > I've sometimes observed on my cubietruck during testing. Can you please > squash these fixes into the next version of the sunxi-mci patch-set ? Ok. Good thing you've discovered this issue. I will incorporate that int

Re: [PATCH v3 0/7] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-05 Thread David Lanzendörfer
As Maxime has pointed out, I've forgotten to add a changelog in my coverletter. Here is, what has changed in this revision: Changes since v1: -Using mmc_of_parse instead of diy dt parsing -Adding nodes for all mmc controller to the dtsi files, including sofar unused controllers -Using generic GP

[PATCH v3 6/7] ARM: dts: sun4i: Add support for mmc

2014-02-05 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions

[PATCH v3 5/7] ARM: dts: sun7i: Add support for mmc

2014-02-05 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v3 3/7] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-05 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

[PATCH v3 7/7] ARM: dts: sun5i: Add support for mmc

2014-02-05 Thread David Lanzendörfer
Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm

[PATCH v3 4/7] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-05 Thread David Lanzendörfer
This is based on the driver Allwinner ships in their Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v3 1/7] clk: sunxi: factors: automatic reparenting support

2014-02-05 Thread David Lanzendörfer
From: Emilio López This commit implements .determine_rate, so that our factor clocks can be reparented when needed. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-factors.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/clk/sunxi/clk-

[PATCH v3 2/7] clk: sunxi: Implement MMC phase control

2014-02-05 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

[PATCH v3 0/7] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-05 Thread David Lanzendörfer
corrections into the previous commits. It also includes the patch of Emilios, I forgot to include last time. best regards David --- David Lanzendörfer (4): ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs ARM: dts: sun7i: Add support for mmc ARM: dts: sun4i: Add

Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-05 Thread David Lanzendörfer
Hi > I'm not that fond of these "default y" patterns. It forces the driver > down to every user of the multiplatform kernels. I'd suggest removing > the default and adding the driver to the defconfigs we have. Ok. Removed it. > > +static void sunxi_mmc_init_host(struct mmc_host *mmc) > > +{ > > [.

Re: [PATCH v2 0/6] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-05 Thread David Lanzendörfer
Hi Maxime > I have four comments here: > - Read Documentation/SubmittingPatches, especially Section 5 and 12 > (hints, you forgot the clock maintainers for your clock patches > and you didn't put any signed-off-by tags) Oops. I added signed-offs now > - You ignored pretty much all the c

Re: [PATCH v2 0/6] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-04 Thread David Lanzendörfer
Hi I forgot to mention that the autoparenting patch of Emilios is a crucial depency... http://git.o2s.ch/?p=linux-next.git;a=commit;h=f8e936772672a3a6ec934558d2a7aef030c663c4 Without it, the clock will return the wrong value and the card will refuse to initialize regards david signature.asc Des

[PATCH v2 2/6] clk: sunxi: Implement MMC phase control

2014-02-04 Thread David Lanzendörfer
From: Emilio López Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index abb6c5a..33b9977 100644 --- a/drivers/clk/sunxi/clk-sun

[PATCH v2 6/6] ARM: dts: sun5i: Add support for mmc

2014-02-04 Thread David Lanzendörfer
--- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++ arch/arm/boot/dts/sun5i-a10s.dtsi| 44 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 arch/arm/boot/dts/sun5i-a13-olinuxino.dts| 15 arch/arm

[PATCH v2 1/6] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-04 Thread David Lanzendörfer
This is based on the driver Allwinner ships in the Android kernel sources. Initial porting to upstream kernels done by David Lanzendörfer, additional fixes and cleanups by Hans de Goede. It uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one

[PATCH v2 3/6] ARM: sunxi: clk: export clk_sunxi_mmc_phase_control

2014-02-04 Thread David Lanzendörfer
From: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/clk/sunxi.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 include/linux/clk/sunxi.h diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000..1e

[PATCH v2 0/6] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs

2014-02-04 Thread David Lanzendörfer
offset configuration has been proposed and implemented by Emilio. This patchset is the second attempt to send this driver upstream. I'm looking forward to the acceptance of this patchset into mainline. best regards David --- David Lanzendörfer (4): ARM: sunxi: Add driver for SD/MMC hosts

[PATCH v2 4/6] ARM: dts: sun7i: Add support for mmc

2014-02-04 Thread David Lanzendörfer
--- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts |8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts |8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 + arch/arm/boot/dts/sun7i-a20.dtsi| 61 +++ 4 files changed, 100 insert

[PATCH v2 5/6] ARM: dts: sun4i: Add support for mmc

2014-02-04 Thread David Lanzendörfer
--- arch/arm/boot/dts/sun4i-a10-a1000.dts |8 arch/arm/boot/dts/sun4i-a10-cubieboard.dts |8 arch/arm/boot/dts/sun4i-a10.dtsi | 54 3 files changed, 70 insertions(+) diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boo

Re: [linux-sunxi] Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2013-12-23 Thread David Lanzendörfer
> I think that we're miss-communicating a bit here. What I'm trying to say > is that trying to extend the dw_mmc driver to support sunxi is a bad > idea because the sunxi hardware is quite different. And that the > sunxi hardware having autostop allows the existing sunxi-mci driver to > be much sim

Re: [PATCHv6 2/5] clk: socfpga: Add a clock type for the SD/MMC driver

2013-12-16 Thread David Lanzendörfer
Hi > that takes the MMC clock (and only the MMC clock) and does the setup > (it's basically configuring two values, "sample" and "output", into the > clock register). I really don't know what does this do/why is it > required/when is it used; I'm cc'ing Hans and David who can hopefully > explain th

Re: [linux-sunxi] Re: [PATCH 2/5] ARM: dts: sun4i: Add support for mmc

2013-12-16 Thread David Lanzendörfer
Hi > Note as said before I expect David to take things from here. I will start working on it this evening. > I just took what David was using. I agree picking one and staying with > it would be better. There is a reason why my working branch was called "plsdsif" (short for "Please don't shout at m

Re: [linux-sunxi] Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2013-12-15 Thread David Lanzendörfer
> > [...] > > Do you have something like this in mind? -> > > drivers/mmc/host/dw_mmc-exynos.c > No, as explained in my previous mail the idmac being shared seemed to be the > only 2 things the dw-mmc controller and the sunxi-mmc controller have in > common. Ok. > Looking at dw_mmc-exynos.c it sti

Re: [linux-sunxi] Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2013-12-15 Thread David Lanzendörfer
Hi > [...] > +mmc->f_max = 5000; > [...] > >> [...] > >> in case of sdc3 they are putting 2 in f_max (as that is often > >> used for sdio cards) but then later in set_ios they clamp the passed > >> in clock to 4700 Mhz, so I seriously doubt that

Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2013-12-15 Thread David Lanzendörfer
Hi > David, since you'll be doing v2 I guess you'll be filling in v2. FYI > I've tested this on sun4i-a10, sun5i-a10s sun5i-a13 and sun7i-a20. Yeah. I'll take care of it. I'll work out a V2 which incorporates all the comments made on the first patch set you've handed in. > It uses dma in bus-maste