Re: [PATCHv2 0/5] ARM: remove the sub-node and deprecated supports-highspeed property for dwmmc.

2014-07-01 Thread Sachin Kamat
Hi Jaehoon,

On Mon, Jun 30, 2014 at 5:19 PM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 Since used the mmc_of_parse(), didn't parse the sub-node.
 So we can remove the sub-node, because almost SoC used the only one card per 
 a host.
 And supports-highspeed can be replaced to cap-mmc/sd-highspeed property.

 Jaehoon Chung (5):
   mmc: dw_mmc: modify the dt-binding for removing slot-node and
 supports-highspeed
   ARM: dts: exynos: unuse the slot-node and deprecated the
 supports-highspeed for dw-mmc
   ARM: dts: socfpga: unuse the slot-node and deprecated the
 supports-highspeed for dw-mmc
   ARM: dts: rockchip: unuse the slot-node and deprecated the
 supports-highspeed for dw-mmc
   mmc: dw_mmc: replace disable-wp from slot's quirk to host's quirk

It is a good practice to include revision history for subsequent versions.

Tested on Exynos 5250 based Snow and Arndale boards. Works fine now.

Tested-by: Sachin Kamat sachin.ka...@samsung.com

-- 
Regards,
Sachin.
--
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 0/4] ARM: remove the sub-node and deprecated supports-highspeed property.

2014-06-30 Thread Sachin Kamat
Hi Jaehoon,

On Mon, Jun 30, 2014 at 12:52 PM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 Since used the mmc_of_parse(), didn't parse the sub-node.
 So we can remove the sub-node, because almost SoC used the only one card per 
 a host.
 And supports-highspeed can be replaced to cap-mmc/sd-highspeed property.

 Jaehoon Chung (4):
   mmc: dw_mmc: modify the dt-binding for removing slot-node and
 supports-highspeed
   ARM: dts: exynos: unuse the slot-node and deprecated the
 supports-highspeed for dw-mmc

I still get the below crash on Exynos5250 Arndale boards with the above patches.
It works fine on 5250 Snow board.

[3.072323] mmc_host mmc1: Bus speed (slot 0) = 5000Hz (slot
req 5000Hz, actual 5000HZ div = 0)
[3.072421] mmc1: new high speed SDHC card at address 
[3.075159] mmcblk1: mmc1: SU04G 3.69 GiB (ro)
[3.076614]  mmcblk1: p1 p2 p3
[3.098050] of_get_named_gpiod_flags exited with status 0
[3.103444] of_get_named_gpiod_flags exited with status 0
[3.108836] gpio-144: gpiod_set_debounce: missing set() or
set_debounce() operations
[3.116626] gpio-145: gpiod_set_debounce: missing set() or
set_debounce() operations
[3.124326] gpio-146: gpiod_set_debounce: missing set() or
set_debounce() operations
[3.132060] gpio-147: gpiod_set_debounce: missing set() or
set_debounce() operations
[3.139780] gpio-148: gpiod_set_debounce: missing set() or
set_debounce() operations
[3.147507] gpio-149: gpiod_set_debounce: missing set() or
set_debounce() operations
[3.155458] input: gpio_keys as /devices/gpio_keys/input/input0
[3.161395] s3c-rtc 101e.rtc: setting system clock to
2000-01-01 00:00:00 UTC (946684800)
[3.184653] hdmi-en: disabling
[3.186272] MAIN_DC: disabling
[3.190510] VFS: Cannot open root device mmcblk1p3 or
unknown-block(179,35): error -30
[3.197417] Please append a correct root= boot option; here are
the available partitions:
[3.205736] b300 3907584 mmcblk0  driver: mmcblk
[3.211009]   b301 2352800 mmcblk0p1 -01
[3.216269]   b302  507872 mmcblk0p2 -02
[3.221563]   b303  507840 mmcblk0p3 -03
[3.226858]   b304  507840 mmcblk0p4 -04
[3.232155] b318 128 mmcblk0rpmb  (driver?)
[3.237363] b3101024 mmcblk0boot1  (driver?)
[3.242657] b3081024 mmcblk0boot0  (driver?)
[3.247951] b320 3872256 mmcblk1  driver: mmcblk
[3.253246]   b3214095 mmcblk1p1 0005ac11-01
[3.258539]   b322   53248 mmcblk1p2 0005ac11-02
[3.263835]   b323 3814912 mmcblk1p3 0005ac11-03
[3.269132] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(179,35)
[3.277647] CPU: 0 PID: 1 Comm: swapper/0 Tainted: GW
3.16.0-rc3-next-20140630-00049-g6a4f4b293862 #182
[3.288161] [c0014230] (unwind_backtrace) from [c001150c]
(show_stack+0x10/0x14)
[3.295878] [c001150c] (show_stack) from [c03c2ff0]
(dump_stack+0x84/0xc4)
[3.303079] [c03c2ff0] (dump_stack) from [c03c24c4] (panic+0xa4/0x200)
[3.309937] [c03c24c4] (panic) from [c052e0c8]
(mount_block_root+0x218/0x298)
[3.317403] [c052e0c8] (mount_block_root) from [c052e428]
(prepare_namespace+0x190/0x1d4)
[3.325910] [c052e428] (prepare_namespace) from [c052dd94]
(kernel_init_freeable+0x1c8/0x1d8)
[3.334763] [c052dd94] (kernel_init_freeable) from [c03c16d4]
(kernel_init+0xc/0xe8)
[3.342835] [c03c16d4] (kernel_init) from [c000e638]
(ret_from_fork+0x14/0x3c)
[3.350388] CPU1: stopping
[3.353070] CPU: 1 PID: 0 Comm: swapper/1 Tainted: GW
3.16.0-rc3-next-20140630-00049-g6a4f4b293862 #182
[3.363586] [c0014230] (unwind_backtrace) from [c001150c]
(show_stack+0x10/0x14)
[3.371306] [c001150c] (show_stack) from [c03c2ff0]
(dump_stack+0x84/0xc4)
[3.378507] [c03c2ff0] (dump_stack) from [c0013508]
(handle_IPI+0x17c/0x18c)
[3.385885] [c0013508] (handle_IPI) from [c00085f8]
(gic_handle_irq+0x64/0x68)
[3.393438] [c00085f8] (gic_handle_irq) from [c0012080]
(__irq_svc+0x40/0x70)
[3.400898] Exception stack(0xee09ffa0 to 0xee09ffe8)
[3.405930] ffa0: 0001 c04a5378 058a  ee09e030
c0576484 c03cba84 c05ab257
[3.414095] ffc0: c05ab257 ee09e000   c0305d78
ee09ffe8 c000f1a0 c000f1a4
[3.422251] ffe0: 6113 
[3.425724] [c0012080] (__irq_svc) from [c000f1a4]
(arch_cpu_idle+0x2c/0x30)
[3.433109] [c000f1a4] (arch_cpu_idle) from [c00514fc]
(cpu_startup_entry+0x118/0x174)
[3.441351] [c00514fc] (cpu_startup_entry) from [40008684] (0x40008684)
[3.448294] ---[ end Kernel panic - not syncing: VFS: Unable to
mount root fs on unknown-block(179,35)

-- 
Regards,
Sachin.
--
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: host: Kconfig: Update SDHCI S3C entry

2014-06-25 Thread Sachin Kamat
All Exynos4 SoC based boards have SDHCI controller and mostly
use SD mounted filesystem. Hence it makes sense to default it
to yes on Exynos4 platform. While at it also fix a couple of
typos in the help text.

Signed-off-by: Sachin Kamat sachin.ka...@samsung.com
Cc: Doug Anderson diand...@chromium.org
---
 drivers/mmc/host/Kconfig |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index a5652548230a..fe812dd876df 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -193,10 +193,11 @@ config MMC_SDHCI_TEGRA
 config MMC_SDHCI_S3C
tristate SDHCI support on Samsung S3C SoC
depends on MMC_SDHCI  PLAT_SAMSUNG
+   default y if ARCH_EXYNOS4
help
  This selects the Secure Digital Host Controller Interface (SDHCI)
- often referrered to as the HSMMC block in some of the Samsung S3C
- range of SoC.
+ often referred to as the HSMMC block in some of the Samsung S3C
+ range of SoCs.
 
  If you have a controller with this interface, say Y or M here.
 
-- 
1.7.9.5

--
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/1] mmc: host: Kconfig: Update SDHCI S3C entry

2014-06-25 Thread Sachin Kamat
On Wed, Jun 25, 2014 at 3:38 PM, Arnd Bergmann a...@arndb.de wrote:
 On Wednesday 25 June 2014 15:28:06 Sachin Kamat wrote:
 All Exynos4 SoC based boards have SDHCI controller and mostly
 use SD mounted filesystem. Hence it makes sense to default it
 to yes on Exynos4 platform. While at it also fix a couple of
 typos in the help text.

 Signed-off-by: Sachin Kamat sachin.ka...@samsung.com
 Cc: Doug Anderson diand...@chromium.org


 I'm not following that reasoning. We don't normally 'default y'
 peripheral drivers at all, but just enable them in the defconfig.

Doug and I had a small private discussion whereby defaulting commonly
used features across platforms to 'yes' seemed sensible to avoid end users
from trying to figure out the options and dependencies themselves when
trying to build their own configs.

Probably Doug can add more or correct me here.

-- 
Regards,
Sachin.
--
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: MMC error on Exynos4210 board

2014-06-22 Thread Sachin Kamat
Hi Tim,

On Sat, Jun 21, 2014 at 2:31 AM, Tim Kryger tim.kry...@gmail.com wrote:
 On Thu, Jun 19, 2014 at 8:33 PM, Sachin Kamat spk.li...@gmail.com wrote:
 On Thu, Jun 19, 2014 at 6:11 PM, Jaehoon Chung jh80.ch...@samsung.com 
 wrote:
 On 06/19/2014 07:40 PM, Sachin Kamat wrote:
 On Thu, Jun 19, 2014 at 2:40 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Thu, Jun 19, 2014 at 1:49 AM, Sachin Kamat spk.li...@gmail.com wrote:
 On Thu, Jun 19, 2014 at 2:12 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Wed, Jun 18, 2014 at 8:54 PM, Sachin Kamat spk.li...@gmail.com 
 wrote:
 On Wed, Jun 18, 2014 at 4:33 AM, Sachin Kamat spk.li...@gmail.com 
 wrote:

 I see the below error on Exynos4210 based Origen board with 
 linux-next
 (20140618).
 Reverting the below commit works fine.

 Commit: 8d02e775a6 mmc: sdhci: Use mmc core regulator infrastucture


 -- [2.068992] sdhci: Secure Digital Host Controller Interface 
 driver
 [2.075059] sdhci: Copyright(c) Pierre Ossman
 [2.079762] of_get_named_gpiod_flags: can't parse gpios property 
 of
 node '/sdhci@1251[0]'
 [2.088021] s3c-sdhci 1251.sdhci: clock source 2: mmc_busclk.2
 (5000 Hz)
 [2.095322] of_get_named_gpiod_flags: can't parse gpios property 
 of
 node '/sdhci@1251[0]'
 [2.103794] of_get_named_gpiod_flags: can't parse gpios property 
 of
 node '/sdhci@1251[0]'
 [2.112478] s3c-sdhci 1251.sdhci: No vqmmc regulator found
 [2.118117] mmc0: Hardware doesn't report any support voltages.
 [2.124004] s3c-sdhci 1251.sdhci: sdhci_add_host() failed
 [2.130080] of_get_named_gpiod_flags: can't parse gpios property 
 of
 node '/sdhci@1253[0]'
 [2.138352] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2
 (1667 Hz)
 [2.145661] of_get_named_gpiod_flags: can't parse gpios property 
 of
 node '/sdhci@1253[0]'
 [2.154139] of_get_named_gpiod_flags: can't parse gpios property 
 of
 node '/sdhci@1253[0]'
 [2.162834] s3c-sdhci 1253.sdhci: No vqmmc regulator found
 [2.168464] mmc0: Hardware doesn't report any support voltages.
 [2.174349] s3c-sdhci 1253.sdhci: sdhci_add_host() failed

 [2.336148] Waiting for root device /dev/mmcblk0p1...

 FYI, the board has a 2.8V fixed regulator supply connected to the MMC.
 You may refer to arch/arm/boot/dts/exynos4210-origen.dts for more 
 details.

 A 2.8v regulator results in mmc-ocr_avail being set to MMC_VDD_27_28
 | MMC_VDD_28_29.

 The SDHCI capabilities register only indicates support of three voltage 
 levels
   - 1.8v: SDHCI_CAN_VDD_180 = MMC_VDD_165_195
   - 3.0v: SDHCI_CAN_VDD_300 = MMC_VDD_29_30 | MMC_VDD_30_31
   - 3.3v: SDHCI_CAN_VDD_330 = MMC_VDD_32_33 | MMC_VDD_33_34

 Right. sdhci capabilities only indicated them.
 But I think SoC can be support the specific VDD range.


 Even if all capability bits of the host controller were set, there
 still wouldn't be any overlap.  Thus you see a Hardware doesn't
 report any support voltages message.

 Previously, this issue was being swept under the rug by cec2e21 mmc:
 sdhci: Use regulator min/max voltage range according to spec.  That
 change hacked up the voltage range checks such that with your 2.8v
 fixed regulator, the driver would believe the host could support
 MMC_VDD_29_30 | MMC_VDD_30_31 | MMC_VDD_32_33 | MMC_VDD_33_34.  The
 driver would start down the path of commanding 3.3v-3.4v (the highest
 voltage range believed to be supported).  At the last second, the
 driver would see the regulator was fixed and blindly skip over the set
 voltage operation, saving it from failure.

 Since my patch eliminates the bogus voltage range checks, your board
 is now getting caught playing too loose with the SDHCI regulator
 voltages.

 Furthermore, the fixed regulator special-case logic that helped hide
 your issue should also be considered for removal given that fixed
 regulators now behave properly thanks to c00dc35 regulator: core:
 Allow regulator_set_voltage for fixed regulators.

 Thanks for the detailed explanation. What do you propose to get this 
 fixed

 It would be nice if the driver could be extended
 to handle the peculiarities of your board in a deliberate manner but
 limiting the common sdhci driver to supporting only the three voltages
 from the spec also seems sensible.

 Until such time that the driver gets fixed to handle 2.8V fixed supply your
 current patch leaves several of Exynos boards broken for now.

 the all of exynos used the fixed-regulator(2.8v) should be broken.
 (Maybe exynos4 series??)

 Probably. I haven't verified for the other boards. Hence would be good to 
 handle
 this case in the driver itself.

 The current external VDD regulator support in the SDHCI driver feels a
 bit tacked on.

 External regulators could reasonably support other voltage ranges,
 like MMC_VDD_27_28 | MMC_VDD_28_29, but those never appear in the
 final ocr_avail for the host. The driver only looks for the
 intersection of the ranges implied by the capabilities

Re: MMC error on Exynos4210 board

2014-06-19 Thread Sachin Kamat
+cc Some relevant guys from Samsung

On Thu, Jun 19, 2014 at 2:12 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Wed, Jun 18, 2014 at 8:54 PM, Sachin Kamat spk.li...@gmail.com wrote:

 On Wed, Jun 18, 2014 at 4:33 AM, Sachin Kamat spk.li...@gmail.com wrote:

 I see the below error on Exynos4210 based Origen board with linux-next
 (20140618).
 Reverting the below commit works fine.

 Commit: 8d02e775a6 mmc: sdhci: Use mmc core regulator infrastucture


 -- [2.068992] sdhci: Secure Digital Host Controller Interface driver
 [2.075059] sdhci: Copyright(c) Pierre Ossman
 [2.079762] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.088021] s3c-sdhci 1251.sdhci: clock source 2: mmc_busclk.2
 (5000 Hz)
 [2.095322] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.103794] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.112478] s3c-sdhci 1251.sdhci: No vqmmc regulator found
 [2.118117] mmc0: Hardware doesn't report any support voltages.
 [2.124004] s3c-sdhci 1251.sdhci: sdhci_add_host() failed
 [2.130080] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.138352] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2
 (1667 Hz)
 [2.145661] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.154139] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.162834] s3c-sdhci 1253.sdhci: No vqmmc regulator found
 [2.168464] mmc0: Hardware doesn't report any support voltages.
 [2.174349] s3c-sdhci 1253.sdhci: sdhci_add_host() failed

 [2.336148] Waiting for root device /dev/mmcblk0p1...

 FYI, the board has a 2.8V fixed regulator supply connected to the MMC.
 You may refer to arch/arm/boot/dts/exynos4210-origen.dts for more details.

 A 2.8v regulator results in mmc-ocr_avail being set to MMC_VDD_27_28
 | MMC_VDD_28_29.

 The SDHCI capabilities register only indicates support of three voltage levels
   - 1.8v: SDHCI_CAN_VDD_180 = MMC_VDD_165_195
   - 3.0v: SDHCI_CAN_VDD_300 = MMC_VDD_29_30 | MMC_VDD_30_31
   - 3.3v: SDHCI_CAN_VDD_330 = MMC_VDD_32_33 | MMC_VDD_33_34

 Even if all capability bits of the host controller were set, there
 still wouldn't be any overlap.  Thus you see a Hardware doesn't
 report any support voltages message.

 Previously, this issue was being swept under the rug by cec2e21 mmc:
 sdhci: Use regulator min/max voltage range according to spec.  That
 change hacked up the voltage range checks such that with your 2.8v
 fixed regulator, the driver would believe the host could support
 MMC_VDD_29_30 | MMC_VDD_30_31 | MMC_VDD_32_33 | MMC_VDD_33_34.  The
 driver would start down the path of commanding 3.3v-3.4v (the highest
 voltage range believed to be supported).  At the last second, the
 driver would see the regulator was fixed and blindly skip over the set
 voltage operation, saving it from failure.

 Since my patch eliminates the bogus voltage range checks, your board
 is now getting caught playing too loose with the SDHCI regulator
 voltages.

 Furthermore, the fixed regulator special-case logic that helped hide
 your issue should also be considered for removal given that fixed
 regulators now behave properly thanks to c00dc35 regulator: core:
 Allow regulator_set_voltage for fixed regulators.

Thanks for the detailed explanation. What do you propose to get this fixed?

-- 
Regards,
Sachin.
--
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: MMC error on Exynos4210 board

2014-06-19 Thread Sachin Kamat
On Thu, Jun 19, 2014 at 2:40 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Thu, Jun 19, 2014 at 1:49 AM, Sachin Kamat spk.li...@gmail.com wrote:
 +cc Some relevant guys from Samsung

 On Thu, Jun 19, 2014 at 2:12 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Wed, Jun 18, 2014 at 8:54 PM, Sachin Kamat spk.li...@gmail.com wrote:

 On Wed, Jun 18, 2014 at 4:33 AM, Sachin Kamat spk.li...@gmail.com wrote:

 I see the below error on Exynos4210 based Origen board with linux-next
 (20140618).
 Reverting the below commit works fine.

 Commit: 8d02e775a6 mmc: sdhci: Use mmc core regulator infrastucture


 -- [2.068992] sdhci: Secure Digital Host Controller Interface driver
 [2.075059] sdhci: Copyright(c) Pierre Ossman
 [2.079762] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.088021] s3c-sdhci 1251.sdhci: clock source 2: mmc_busclk.2
 (5000 Hz)
 [2.095322] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.103794] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.112478] s3c-sdhci 1251.sdhci: No vqmmc regulator found
 [2.118117] mmc0: Hardware doesn't report any support voltages.
 [2.124004] s3c-sdhci 1251.sdhci: sdhci_add_host() failed
 [2.130080] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.138352] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2
 (1667 Hz)
 [2.145661] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.154139] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.162834] s3c-sdhci 1253.sdhci: No vqmmc regulator found
 [2.168464] mmc0: Hardware doesn't report any support voltages.
 [2.174349] s3c-sdhci 1253.sdhci: sdhci_add_host() failed

 [2.336148] Waiting for root device /dev/mmcblk0p1...

 FYI, the board has a 2.8V fixed regulator supply connected to the MMC.
 You may refer to arch/arm/boot/dts/exynos4210-origen.dts for more details.

 A 2.8v regulator results in mmc-ocr_avail being set to MMC_VDD_27_28
 | MMC_VDD_28_29.

 The SDHCI capabilities register only indicates support of three voltage 
 levels
   - 1.8v: SDHCI_CAN_VDD_180 = MMC_VDD_165_195
   - 3.0v: SDHCI_CAN_VDD_300 = MMC_VDD_29_30 | MMC_VDD_30_31
   - 3.3v: SDHCI_CAN_VDD_330 = MMC_VDD_32_33 | MMC_VDD_33_34

 Even if all capability bits of the host controller were set, there
 still wouldn't be any overlap.  Thus you see a Hardware doesn't
 report any support voltages message.

 Previously, this issue was being swept under the rug by cec2e21 mmc:
 sdhci: Use regulator min/max voltage range according to spec.  That
 change hacked up the voltage range checks such that with your 2.8v
 fixed regulator, the driver would believe the host could support
 MMC_VDD_29_30 | MMC_VDD_30_31 | MMC_VDD_32_33 | MMC_VDD_33_34.  The
 driver would start down the path of commanding 3.3v-3.4v (the highest
 voltage range believed to be supported).  At the last second, the
 driver would see the regulator was fixed and blindly skip over the set
 voltage operation, saving it from failure.

 Since my patch eliminates the bogus voltage range checks, your board
 is now getting caught playing too loose with the SDHCI regulator
 voltages.

 Furthermore, the fixed regulator special-case logic that helped hide
 your issue should also be considered for removal given that fixed
 regulators now behave properly thanks to c00dc35 regulator: core:
 Allow regulator_set_voltage for fixed regulators.

 Thanks for the detailed explanation. What do you propose to get this fixed?

 I'm not really sure of the best path forward.  I suppose you could
 modify your device tree to lie about the voltage of the fixed
 regulator.  Changing it to 3.0v should allow it to boot up but that is
 definitely a hack.

Or I could simply remove the vmmc-supply property altogether (as it is optional)
and get the board to work.

 It would be nice if the driver could be extended
 to handle the peculiarities of your board in a deliberate manner but
 limiting the common sdhci driver to supporting only the three voltages
 from the spec also seems sensible.

Until such time that the driver gets fixed to handle 2.8V fixed supply your
current patch leaves several of Exynos boards broken for now.

-- 
Regards,
Sachin.
--
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: MMC error on Exynos4210 board

2014-06-19 Thread Sachin Kamat
On Thu, Jun 19, 2014 at 6:11 PM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 On 06/19/2014 07:40 PM, Sachin Kamat wrote:
 On Thu, Jun 19, 2014 at 2:40 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Thu, Jun 19, 2014 at 1:49 AM, Sachin Kamat spk.li...@gmail.com wrote:
 +cc Some relevant guys from Samsung

 On Thu, Jun 19, 2014 at 2:12 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Wed, Jun 18, 2014 at 8:54 PM, Sachin Kamat spk.li...@gmail.com wrote:

 On Wed, Jun 18, 2014 at 4:33 AM, Sachin Kamat spk.li...@gmail.com 
 wrote:

 I see the below error on Exynos4210 based Origen board with linux-next
 (20140618).
 Reverting the below commit works fine.

 Commit: 8d02e775a6 mmc: sdhci: Use mmc core regulator infrastucture


 -- [2.068992] sdhci: Secure Digital Host Controller Interface 
 driver
 [2.075059] sdhci: Copyright(c) Pierre Ossman
 [2.079762] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.088021] s3c-sdhci 1251.sdhci: clock source 2: mmc_busclk.2
 (5000 Hz)
 [2.095322] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.103794] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.112478] s3c-sdhci 1251.sdhci: No vqmmc regulator found
 [2.118117] mmc0: Hardware doesn't report any support voltages.
 [2.124004] s3c-sdhci 1251.sdhci: sdhci_add_host() failed
 [2.130080] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.138352] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2
 (1667 Hz)
 [2.145661] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.154139] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.162834] s3c-sdhci 1253.sdhci: No vqmmc regulator found
 [2.168464] mmc0: Hardware doesn't report any support voltages.
 [2.174349] s3c-sdhci 1253.sdhci: sdhci_add_host() failed

 [2.336148] Waiting for root device /dev/mmcblk0p1...

 FYI, the board has a 2.8V fixed regulator supply connected to the MMC.
 You may refer to arch/arm/boot/dts/exynos4210-origen.dts for more 
 details.

 A 2.8v regulator results in mmc-ocr_avail being set to MMC_VDD_27_28
 | MMC_VDD_28_29.

 The SDHCI capabilities register only indicates support of three voltage 
 levels
   - 1.8v: SDHCI_CAN_VDD_180 = MMC_VDD_165_195
   - 3.0v: SDHCI_CAN_VDD_300 = MMC_VDD_29_30 | MMC_VDD_30_31
   - 3.3v: SDHCI_CAN_VDD_330 = MMC_VDD_32_33 | MMC_VDD_33_34

 Right. sdhci capabilities only indicated them.
 But I think SoC can be support the specific VDD range.


 Even if all capability bits of the host controller were set, there
 still wouldn't be any overlap.  Thus you see a Hardware doesn't
 report any support voltages message.

 Previously, this issue was being swept under the rug by cec2e21 mmc:
 sdhci: Use regulator min/max voltage range according to spec.  That
 change hacked up the voltage range checks such that with your 2.8v
 fixed regulator, the driver would believe the host could support
 MMC_VDD_29_30 | MMC_VDD_30_31 | MMC_VDD_32_33 | MMC_VDD_33_34.  The
 driver would start down the path of commanding 3.3v-3.4v (the highest
 voltage range believed to be supported).  At the last second, the
 driver would see the regulator was fixed and blindly skip over the set
 voltage operation, saving it from failure.

 Since my patch eliminates the bogus voltage range checks, your board
 is now getting caught playing too loose with the SDHCI regulator
 voltages.

 Furthermore, the fixed regulator special-case logic that helped hide
 your issue should also be considered for removal given that fixed
 regulators now behave properly thanks to c00dc35 regulator: core:
 Allow regulator_set_voltage for fixed regulators.

 Thanks for the detailed explanation. What do you propose to get this fixed?

 I'm not really sure of the best path forward.  I suppose you could
 modify your device tree to lie about the voltage of the fixed
 regulator.  Changing it to 3.0v should allow it to boot up but that is
 definitely a hack.
 I don't want to change the 3.0V at dt file...is it hack? i don't think so.
 Almost exynos4 Series is used the fixed regulator(2.8V).
 I didn't know exactly why we used the 2.8V. But i guess there is some 
 reason.(H/W design).

 If we need to change ocr value,
 then i will add the quirk or controlling function for exynos into sdhci-s3c.c
 How about?

That sounds good compared to adding hacks in DT files.



 Or I could simply remove the vmmc-supply property altogether (as it is 
 optional)
 and get the board to work.
 Then is it supported the power always-on?

Atleast on Exynos 4210 and 4412 Origen boards the 2.8V MMC supply is derived
directly from the 5V input DC supply and hence it is always on.


 It would be nice if the driver could be extended
 to handle the peculiarities of your board in a deliberate manner but
 limiting

MMC regression with linux-next on Exynos5250

2014-06-18 Thread Sachin Kamat
Hi Jaehoon,

I get the below crash on Exyos5250 based Arndale board with linux-next
(20140618) kernel.
Looks like the following patch is causing it
Commit da118915cc72  mmc: dw_mmc: replace disable-wp from slot's
quirk to host's quirk

Reverting the above patch fixes the issue.

The below changes in dts file also did not help.

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts
b/arch/arm/boot/dts/exynos5250-arndale.dts
index d0de1f50d15b..617fc5fe50f7 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -422,6 +422,7 @@
num-slots = 1;
supports-highspeed;
card-detect-delay = 200;
+   disable-wp;
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
@@ -432,7 +433,6 @@
slot@0 {
reg = 0;
bus-width = 4;
-   disable-wp;
};
};

Please check.


-- [2.043665] mmc_host mmc0: Bus speed (slot 0) = 1Hz
(slot req 5200Hz, actual 5000HZ div = 1)
[2.044300] Waiting for root device /dev/mmcblk1p3...
[2.058350] mmc0: new DDR MMC card at address 0001
[2.063256] mmcblk0: mmc0:0001 M4G1FA 3.72 GiB
[2.067633] mmcblk0boot0: mmc0:0001 M4G1FA partition 1 1.00 MiB
[2.073531] mmcblk0boot1: mmc0:0001 M4G1FA partition 2 1.00 MiB
[2.079433] mmcblk0rpmb: mmc0:0001 M4G1FA partition 3 128 KiB
[2.086554]  mmcblk0: p1 p2 p3 p4
[2.089706]  mmcblk0boot1: unknown partition table
[2.093953]  mmcblk0boot0: unknown partition table
[2.098345] platform 122f.sata: Driver ahci requests probe deferral
[2.172280] mmc_host mmc1: Bus speed (slot 0) = 5000Hz (slot
req 5000Hz, actual 5000HZ div = 0)
[2.180563] mmc1: new high speed SDHC card at address 
[2.186220] mmcblk1: mmc1: SU04G 3.69 GiB (ro)
[2.192336]  mmcblk1: p1 p2 p3
[2.194654] platform 122f.sata: Driver ahci requests probe deferral
[2.250761] VFS: Cannot open root device mmcblk1p3 or
unknown-block(179,67): error -30
[2.257452] Please append a correct root= boot option; here are
the available partitions:
[2.265787] b300 3907584 mmcblk0  driver: mmcblk
[2.271059]   b301 2352800 mmcblk0p1 -01
[2.276312]   b302  507872 mmcblk0p2 -02
[2.281606]   b303  507840 mmcblk0p3 -03
[2.286899]   b304  507840 mmcblk0p4 -04
[2.292206] b330 128 mmcblk0rpmb  (driver?)
[2.297406] b3201024 mmcblk0boot1  (driver?)
[2.302700] b3101024 mmcblk0boot0  (driver?)
[2.307994] b340 3872256 mmcblk1  driver: mmcblk
[2.313289]   b3414095 mmcblk1p1 0005ac11-01
[2.318582]   b342   53248 mmcblk1p2 0005ac11-02
[2.323876]   b343 3814912 mmcblk1p3 0005ac11-03
[2.329174] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(179,67)
[2.337696] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
3.16.0-rc1-next-20140618-00048-g868c90fe6c88 #2106
[2.347186] [c0216130] (unwind_backtrace) from [c0211ccc]
(show_stack+0x10/0x14)
[2.354895] [c0211ccc] (show_stack) from [c0822420]
(dump_stack+0x8c/0x9c)
[2.362090] [c0822420] (dump_stack) from [c0821b80] (panic+0xa4/0x21c)
[2.368950] [c0821b80] (panic) from [c0ae50d4]
(mount_block_root+0x1a0/0x230)
[2.376415] [c0ae50d4] (mount_block_root) from [c0ae526c]
(mount_root+0x108/0x110)
[2.384313] [c0ae526c] (mount_root) from [c0ae53cc]
(prepare_namespace+0x158/0x19c)
[2.392301] [c0ae53cc] (prepare_namespace) from [c0ae4d90]
(kernel_init_freeable+0x1cc/0x1dc)
[2.401159] [c0ae4d90] (kernel_init_freeable) from [c081fed4]
(kernel_init+0xc/0xe8)
[2.409229] [c081fed4] (kernel_init) from [c020e838]
(ret_from_fork+0x14/0x3c)
[2.416770] CPU1: stopping
[2.419453] CPU: 1 PID: 0 Comm: swapper/1 Not tainted
3.16.0-rc1-next-20140618-00048-g868c90fe6c88 #2106
[2.428948] [c0216130] (unwind_backtrace) from [c0211ccc]
(show_stack+0x10/0x14)
[2.436660] [c0211ccc] (show_stack) from [c0822420]
(dump_stack+0x8c/0x9c)
[2.443856] [c0822420] (dump_stack) from [c02149ac]
(handle_IPI+0x150/0x170)
[2.451233] [c02149ac] (handle_IPI) from [c0208910]
(gic_handle_irq+0x64/0x68)
[2.458781] [c0208910] (gic_handle_irq) from [c0212840]
(__irq_svc+0x40/0x50)
[2.466239] Exception stack(0xe989ff90 to 0xe989ffd8)
[2.471268] ff80: ffed
 ffed c021f6c0
[2.479438] ffa0: e989e020 c0b94458 c0b944c4  
e989e000 c082ef44 c0b88da8
[2.487594] ffc0: c0b95858 e989ffd8 c020f374 c020f378 6113 
[2.494195] [c0212840] (__irq_svc) from [c020f378]
(arch_cpu_idle+0x38/0x3c)
[2.501587] [c020f378] (arch_cpu_idle) from [c027d7e4]
(cpu_startup_entry+0x1e8/0x23c)
[

Re: MMC regression with linux-next on Exynos5250

2014-06-18 Thread Sachin Kamat
Hi Jaehoon,

On Wed, Jun 18, 2014 at 3:50 PM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 Hi, Sachin.

 Did you check the below patch?
 https://patchwork.kernel.org/patch/4346781/

Thanks for the patch. But even with this patch, I continue to get the
aforementioned crash.


 I will resend the patch after including the ARM soc mailing.

 dw-mmc controller used the mmc_of_parse(), but it can't parse the sub-node.
 After checking it, let me know your result, plz.

Regards,
Sachin.
--
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: MMC regression with linux-next on Exynos5250

2014-06-18 Thread Sachin Kamat
Hi Ulf,

On Wed, Jun 18, 2014 at 4:43 PM, Ulf Hansson ulf.hans...@linaro.org wrote:
 On 18 June 2014 13:10, Sachin Kamat sachin.ka...@samsung.com wrote:
 Hi Jaehoon,

 On Wed, Jun 18, 2014 at 3:50 PM, Jaehoon Chung jh80.ch...@samsung.com 
 wrote:
 Hi, Sachin.

 Did you check the below patch?
 https://patchwork.kernel.org/patch/4346781/

 Thanks for the patch. But even with this patch, I continue to get the
 aforementioned crash.

 Hi Sachin / Jaehoon,

 Until we sorted out the problem, I will drop the related patch from my mmc 
 tree.

OK.
Also, I feel the mmc patch and the corresponding DT changes should go through
single tree to avoid dependency issues.

Regards,
Sachin.
--
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


MMC error on Exynos4210 board

2014-06-18 Thread Sachin Kamat
Hi Tim,

I see the below error on Exynos4210 based Origen board with linux-next
(20140618).
Reverting the below commit works fine.

Commit: 8d02e775a6 mmc: sdhci: Use mmc core regulator infrastucture

Any ideas?

***

-- [2.068992] sdhci: Secure Digital Host Controller Interface driver
[2.075059] sdhci: Copyright(c) Pierre Ossman
[2.079762] of_get_named_gpiod_flags: can't parse gpios property of
node '/sdhci@1251[0]'
[2.088021] s3c-sdhci 1251.sdhci: clock source 2: mmc_busclk.2
(5000 Hz)
[2.095322] of_get_named_gpiod_flags: can't parse gpios property of
node '/sdhci@1251[0]'
[2.103794] of_get_named_gpiod_flags: can't parse gpios property of
node '/sdhci@1251[0]'
[2.112478] s3c-sdhci 1251.sdhci: No vqmmc regulator found
[2.118117] mmc0: Hardware doesn't report any support voltages.
[2.124004] s3c-sdhci 1251.sdhci: sdhci_add_host() failed
[2.130080] of_get_named_gpiod_flags: can't parse gpios property of
node '/sdhci@1253[0]'
[2.138352] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2
(1667 Hz)
[2.145661] of_get_named_gpiod_flags: can't parse gpios property of
node '/sdhci@1253[0]'
[2.154139] of_get_named_gpiod_flags: can't parse gpios property of
node '/sdhci@1253[0]'
[2.162834] s3c-sdhci 1253.sdhci: No vqmmc regulator found
[2.168464] mmc0: Hardware doesn't report any support voltages.
[2.174349] s3c-sdhci 1253.sdhci: sdhci_add_host() failed
[2.180281] Synopsys Designware Multimedia Card Interface Driver
[2.188131] usbcore: registered new interface driver usbhid
[2.192287] usbhid: USB HID core driver
[2.196329] TCP: cubic registered
[2.199362] NET: Registered protocol family 17
[2.203917] NET: Registered protocol family 15
[2.208404] Registering SWP/SWPB emulation handler
[2.214357] of_get_named_gpiod_flags exited with status 0
[2.218430] of_get_named_gpiod_flags exited with status 0
[2.223803] of_get_named_gpiod_flags exited with status 0
[2.229170] of_get_named_gpiod_flags exited with status 0
[2.234560] of_get_named_gpiod_flags exited with status 0
[2.239953] gpio-229: gpiod_set_debounce: missing set() or
set_debounce() operations
[2.247773] gpio-230: gpiod_set_debounce: missing set() or
set_debounce() operations
[2.255473] gpio-228: gpiod_set_debounce: missing set() or
set_debounce() operations
[2.263221] gpio-227: gpiod_set_debounce: missing set() or
set_debounce() operations
[2.270918] gpio-226: gpiod_set_debounce: missing set() or
set_debounce() operations
[2.278899] input: gpio_keys as /devices/gpio_keys/input/input0
[2.285196] s3c-rtc 1007.rtc: setting system clock to
2000-01-01 00:00:00 UTC (946684800)
[2.295072] VDD_G3D_1.1V: disabling
[2.304744] VADC_3.3V: disabling
[2.312095] VDD_AUD_1.8V: disabling
[2.319714] VMIPI_1.1V: disabling
[2.327193] VDD_ABB_3.3V: disabling
[2.332779] VMEM_VDD_2.8V: disabling
[2.336148] Waiting for root device /dev/mmcblk0p1...

*
Regards,
Sachin.
--
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: MMC error on Exynos4210 board

2014-06-18 Thread Sachin Kamat
On Wed, Jun 18, 2014 at 7:41 PM, Tim Kryger tim.kry...@gmail.com wrote:
 On Wed, Jun 18, 2014 at 4:33 AM, Sachin Kamat spk.li...@gmail.com wrote:
 Hi Tim,

 I see the below error on Exynos4210 based Origen board with linux-next
 (20140618).
 Reverting the below commit works fine.

 Commit: 8d02e775a6 mmc: sdhci: Use mmc core regulator infrastucture

 Any ideas?

 ***

 -- [2.068992] sdhci: Secure Digital Host Controller Interface driver
 [2.075059] sdhci: Copyright(c) Pierre Ossman
 [2.079762] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.088021] s3c-sdhci 1251.sdhci: clock source 2: mmc_busclk.2
 (5000 Hz)
 [2.095322] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.103794] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1251[0]'
 [2.112478] s3c-sdhci 1251.sdhci: No vqmmc regulator found
 [2.118117] mmc0: Hardware doesn't report any support voltages.
 [2.124004] s3c-sdhci 1251.sdhci: sdhci_add_host() failed
 [2.130080] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.138352] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2
 (1667 Hz)
 [2.145661] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.154139] of_get_named_gpiod_flags: can't parse gpios property of
 node '/sdhci@1253[0]'
 [2.162834] s3c-sdhci 1253.sdhci: No vqmmc regulator found
 [2.168464] mmc0: Hardware doesn't report any support voltages.
 [2.174349] s3c-sdhci 1253.sdhci: sdhci_add_host() failed
 [2.180281] Synopsys Designware Multimedia Card Interface Driver
 [2.188131] usbcore: registered new interface driver usbhid
 [2.192287] usbhid: USB HID core driver
 [2.196329] TCP: cubic registered
 [2.199362] NET: Registered protocol family 17
 [2.203917] NET: Registered protocol family 15
 [2.208404] Registering SWP/SWPB emulation handler
 [2.214357] of_get_named_gpiod_flags exited with status 0
 [2.218430] of_get_named_gpiod_flags exited with status 0
 [2.223803] of_get_named_gpiod_flags exited with status 0
 [2.229170] of_get_named_gpiod_flags exited with status 0
 [2.234560] of_get_named_gpiod_flags exited with status 0
 [2.239953] gpio-229: gpiod_set_debounce: missing set() or
 set_debounce() operations
 [2.247773] gpio-230: gpiod_set_debounce: missing set() or
 set_debounce() operations
 [2.255473] gpio-228: gpiod_set_debounce: missing set() or
 set_debounce() operations
 [2.263221] gpio-227: gpiod_set_debounce: missing set() or
 set_debounce() operations
 [2.270918] gpio-226: gpiod_set_debounce: missing set() or
 set_debounce() operations
 [2.278899] input: gpio_keys as /devices/gpio_keys/input/input0
 [2.285196] s3c-rtc 1007.rtc: setting system clock to
 2000-01-01 00:00:00 UTC (946684800)
 [2.295072] VDD_G3D_1.1V: disabling
 [2.304744] VADC_3.3V: disabling
 [2.312095] VDD_AUD_1.8V: disabling
 [2.319714] VMIPI_1.1V: disabling
 [2.327193] VDD_ABB_3.3V: disabling
 [2.332779] VMEM_VDD_2.8V: disabling
 [2.336148] Waiting for root device /dev/mmcblk0p1...

 *
 Regards,
 Sachin.

 Would you mind reverting just this part of the commit to see if it
 clears up your trouble?

 if (host-ocr_mask)
 -   ocr_avail = host-ocr_mask;
 +   ocr_avail = host-ocr_mask;

Reverting this did not help. I still get the above error. My diff:

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c23a87285a95..f4135094320d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3096,7 +3096,7 @@ int sdhci_add_host(struct sdhci_host *host)
ocr_avail = mmc-ocr_avail;

if (host-ocr_mask)
-   ocr_avail = host-ocr_mask;
+   ocr_avail = host-ocr_mask;

mmc-ocr_avail = ocr_avail;
mmc-ocr_avail_sdio = ocr_avail;

FYI, the board has a 2.8V fixed regulator supply connected to the MMC.
You may refer to arch/arm/boot/dts/exynos4210-origen.dts for more details.

-- 
Regards,
Sachin.
--
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/1] mmc: moxart: Remove unneeded version.h inclusion

2014-05-27 Thread Sachin Kamat
On 22 May 2014 09:36, Sachin Kamat sachin.ka...@linaro.org wrote:
 version.h inclusion is not needed as suggested by versioncheck.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: Jonas Jensen jonas.jen...@gmail.com
 ---
  drivers/mmc/host/moxart-mmc.c |1 -
  1 file changed, 1 deletion(-)

 diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
 index 74924a04026e..b4b1efbf6c16 100644
 --- a/drivers/mmc/host/moxart-mmc.c
 +++ b/drivers/mmc/host/moxart-mmc.c
 @@ -13,7 +13,6 @@
   * warranty of any kind, whether express or implied.
   */

 -#include linux/version.h
  #include linux/module.h
  #include linux/init.h
  #include linux/platform_device.h
 --
 1.7.9.5


Gentle ping.

-- 
With warm regards,
Sachin
--
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: moxart: Remove unneeded version.h inclusion

2014-05-21 Thread Sachin Kamat
version.h inclusion is not needed as suggested by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Jonas Jensen jonas.jen...@gmail.com
---
 drivers/mmc/host/moxart-mmc.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index 74924a04026e..b4b1efbf6c16 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -13,7 +13,6 @@
  * warranty of any kind, whether express or implied.
  */
 
-#include linux/version.h
 #include linux/module.h
 #include linux/init.h
 #include linux/platform_device.h
-- 
1.7.9.5

--
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/1] mmc: dw_mmc: exynos: Staticize dw_mci_exynos_pmops

2014-03-26 Thread Sachin Kamat
On 18 March 2014 11:46, Seungwon Jeon tgih@samsung.com wrote:
 On Tue, March 18, 2014, Sachin Kamat wrote:
 On 4 March 2014 17:14, Jaehoon Chung jh80.ch...@samsung.com wrote:
  Acked-by: Jaehoon Chung jh80.ch...@samsung.com

 Ping Ulf, Chris.

 Acked-by: Seungwon Jeon tgih@samsung.com

Ping Ulf.


-- 
With warm regards,
Sachin
--
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/1] mmc: dw_mmc: exynos: Staticize dw_mci_exynos_pmops

2014-03-17 Thread Sachin Kamat
On 4 March 2014 17:14, Jaehoon Chung jh80.ch...@samsung.com wrote:
 Acked-by: Jaehoon Chung jh80.ch...@samsung.com

Ping Ulf, Chris.

-- 
With warm regards,
Sachin
--
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: dw_mmc: exynos: Staticize dw_mci_exynos_pmops

2014-03-03 Thread Sachin Kamat
'dw_mci_exynos_pmops' is local to this file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc-exynos.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 3423c5ed50c7..12f0929f12a9 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -426,7 +426,7 @@ static int dw_mci_exynos_probe(struct platform_device *pdev)
return dw_mci_pltfm_register(pdev, drv_data);
 }
 
-const struct dev_pm_ops dw_mci_exynos_pmops = {
+static const struct dev_pm_ops dw_mci_exynos_pmops = {
SET_SYSTEM_SLEEP_PM_OPS(dw_mci_exynos_suspend, dw_mci_exynos_resume)
.resume_noirq = dw_mci_exynos_resume_noirq,
.thaw_noirq = dw_mci_exynos_resume_noirq,
-- 
1.7.9.5

--
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 Resend 01/10] mmc: ushc: Fix incorrect parameter in sizeof

2014-02-25 Thread Sachin Kamat
sizeof should be of the parent structure type.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Hi Ulf / Chris,

This series which is a re-send has been pending since a very long time.
Hope to have this merged atleast during this cycle.
---
 drivers/mmc/host/ushc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index c0105a2e269a..d2c386f09d69 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
-   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
+   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
if (ushc-csw == NULL) {
ret = -ENOMEM;
goto err;
-- 
1.7.9.5

--
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 05/10] mmc: dw_mmc: Remove redundant of_match_ptr

2014-02-25 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc-pltfm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5c4965655297..2553bfbfc6df 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -123,7 +123,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
.remove = dw_mci_pltfm_remove,
.driver = {
.name   = dw_mmc,
-   .of_match_table = of_match_ptr(dw_mci_pltfm_match),
+   .of_match_table = dw_mci_pltfm_match,
.pm = dw_mci_pltfm_pmops,
},
 };
-- 
1.7.9.5

--
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/10] mmc: sdhci-dove: Remove redundant of_match_ptr

2014-02-25 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/sdhci-dove.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 8424839660f8..736d7a2eb7ec 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -208,7 +208,7 @@ static struct platform_driver sdhci_dove_driver = {
.name   = sdhci-dove,
.owner  = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
-   .of_match_table = of_match_ptr(sdhci_dove_of_match_table),
+   .of_match_table = sdhci_dove_of_match_table,
},
.probe  = sdhci_dove_probe,
.remove = sdhci_dove_remove,
-- 
1.7.9.5

--
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 09/10] mmc: mvsdio: Cleanup mmc-mvsdio.h header

2014-02-25 Thread Sachin Kamat
Commit c02cecb92ed4 (ARM: orion: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-mvsdio.h |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/linux/platform_data/mmc-mvsdio.h 
b/include/linux/platform_data/mmc-mvsdio.h
index 1190efedcb94..d02704cd3695 100644
--- a/include/linux/platform_data/mmc-mvsdio.h
+++ b/include/linux/platform_data/mmc-mvsdio.h
@@ -1,13 +1,11 @@
 /*
- * arch/arm/plat-orion/include/plat/mvsdio.h
- *
  * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed as is without any
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __MACH_MVSDIO_H
-#define __MACH_MVSDIO_H
+#ifndef __MMC_MVSDIO_H
+#define __MMC_MVSDIO_H
 
 #include linux/mbus.h
 
-- 
1.7.9.5

--
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 07/10] mmc: dw_mmc: Add missing description

2014-02-25 Thread Sachin Kamat
Commit 0976f16d (mmc: dw_mmc: add support tuning scheme) introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 6bf24ab917e6..306451fbbfe1 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -244,6 +244,7 @@ struct dw_mci_tuning_data {
  * @prepare_command: handle CMD register extensions.
  * @set_ios: handle bus specific extensions.
  * @parse_dt: parse implementation specific device tree properties.
+ * @execute_tuning: implementation specific tuning procedure.
  *
  * Provide controller implementation specific extensions. The usage of this
  * data structure is fully optional and usage of each member in this structure
-- 
1.7.9.5

--
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 03/10] mmc: sdhci-spear: Fix NULL pointer dereference

2014-02-25 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Dereference pdata only
if it is not NULL.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Viresh Kumar viresh.ku...@linaro.org
---
 drivers/mmc/host/sdhci-spear.c |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 2dba9f8d1760..76ddd89a688e 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -84,14 +84,12 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct 
platform_device *pde
/* If pdata is required */
if (cd_gpio != -1) {
pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
-   if (!pdata) {
+   if (!pdata)
dev_err(pdev-dev, DT: kzalloc failed\n);
-   return ERR_PTR(-ENOMEM);
-   }
+   else
+   pdata-card_int_gpio = cd_gpio;
}
 
-   pdata-card_int_gpio = cd_gpio;
-
return pdata;
 }
 #else
-- 
1.7.9.5

--
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] mmc: wmt-sdmmc: Fix NULL pointer dereference

2014-02-25 Thread Sachin Kamat
'of_id' is dereferenced before NULL pointer check. Move it to
after the check.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Tony Prisk li...@prisktech.co.nz
---
 drivers/mmc/host/wmt-sdmmc.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index e902ed7846b0..498d1f799085 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -757,7 +757,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
struct device_node *np = pdev-dev.of_node;
const struct of_device_id *of_id =
of_match_device(wmt_mci_dt_ids, pdev-dev);
-   const struct wmt_mci_caps *wmt_caps = of_id-data;
+   const struct wmt_mci_caps *wmt_caps;
int ret;
int regular_irq, dma_irq;
 
@@ -766,6 +766,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
return -EFAULT;
}
 
+   wmt_caps = of_id-data;
+
if (!np) {
dev_err(pdev-dev, Missing SDMMC description in 
devicetree\n);
return -EFAULT;
-- 
1.7.9.5

--
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 04/10] mmc: davinci: Remove redundant of_match_ptr

2014-02-25 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/davinci_mmc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index d6153740b77f..5d4c5e0fba2f 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1192,7 +1192,7 @@ static struct davinci_mmc_config
struct device_node *np;
struct davinci_mmc_config *pdata = pdev-dev.platform_data;
const struct of_device_id *match =
-   of_match_device(of_match_ptr(davinci_mmc_dt_ids), pdev-dev);
+   of_match_device(davinci_mmc_dt_ids, pdev-dev);
u32 data;
 
np = pdev-dev.of_node;
@@ -1468,7 +1468,7 @@ static struct platform_driver davinci_mmcsd_driver = {
.name   = davinci_mmc,
.owner  = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
-   .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
+   .of_match_table = davinci_mmc_dt_ids,
},
.remove = __exit_p(davinci_mmcsd_remove),
.id_table   = davinci_mmc_devtype,
-- 
1.7.9.5

--
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 10/10] mmc: dw_mmc: Fix NULL pointer dereference

2014-02-25 Thread Sachin Kamat
If mrq-sbc is not NULL but data-stop happens to be NULL,
it will lead to NULL pointer dereferencing. Avoid this by
having a NULL check for data-stop.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 55cd110a49c4..0c56faa6730e 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1345,7 +1345,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
 
if (!err) {
if (!data-stop || mrq-sbc) {
-   if (mrq-sbc)
+   if (mrq-sbc  data-stop)
data-stop-error = 0;
dw_mci_request_end(host, mrq);
goto unlock;
-- 
1.7.9.5

--
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 08/10] mmc: msm: Cleanup mmc-msm_sdcc.h header

2014-02-25 Thread Sachin Kamat
Commit 1ef21f6343ff (ARM: msm: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-msm_sdcc.h |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/platform_data/mmc-msm_sdcc.h 
b/include/linux/platform_data/mmc-msm_sdcc.h
index ffcd9e3a6a7e..55aa873c9396 100644
--- a/include/linux/platform_data/mmc-msm_sdcc.h
+++ b/include/linux/platform_data/mmc-msm_sdcc.h
@@ -1,8 +1,5 @@
-/*
- *  arch/arm/include/asm/mach/mmc.h
- */
-#ifndef ASMARM_MACH_MMC_H
-#define ASMARM_MACH_MMC_H
+#ifndef __MMC_MSM_SDCC_H
+#define __MMC_MSM_SDCC_H
 
 #include linux/mmc/host.h
 #include linux/mmc/card.h
-- 
1.7.9.5

--
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: dw_mmc: Fix card detection regression

2014-01-15 Thread Sachin Kamat
mmc_gpio_get_cd returns a negative error value upon failure.
However gpio_cd was initialised with the negated return value
of the above function. This negation resulted in losing of the
error value thereby triggering the code to take a wrong path as
IS_ERR_VALUE(gpio_cd) now returned 0 even when mmc_gpio_get_cd
returned an error value. This issue introduced by commit bf626e5550f2
(mmc: dw_mmc: use slot-gpio to handle cd pin) caused card detection
failure on Exynos5 boards which is now fixed by this patch.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Zhangfei Gao zhangfei@linaro.org
Cc: Jaehoon Chung jh80.ch...@samsung.com
Cc: Arnd Bergmann a...@arndb.de
---
 drivers/mmc/host/dw_mmc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a776f24f4311..f1683ba194ee 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1033,7 +1033,7 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
int present;
struct dw_mci_slot *slot = mmc_priv(mmc);
struct dw_mci_board *brd = slot-host-pdata;
-   int gpio_cd = !mmc_gpio_get_cd(mmc);
+   int gpio_cd = mmc_gpio_get_cd(mmc);
 
/* Use platform get_cd function, else try onboard card detect */
if (brd-quirks  DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
@@ -1041,7 +1041,7 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
else if (brd-get_cd)
present = !brd-get_cd(slot-id);
else if (!IS_ERR_VALUE(gpio_cd))
-   present = !!gpio_cd;
+   present = !gpio_cd;
else
present = (mci_readl(slot-host, CDETECT)  (1  slot-id))
== 0 ? 1 : 0;
-- 
1.7.9.5

--
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/1] mmc: dw_mmc: Fix card detection regression

2014-01-15 Thread Sachin Kamat
Hi Zhangfei,

On 15 January 2014 14:11, zhangfei zhangfei@linaro.org wrote:
 Hi, Sachin




 On 01/15/2014 04:31 PM, Sachin Kamat wrote:

 mmc_gpio_get_cd returns a negative error value upon failure.
 However gpio_cd was initialised with the negated return value
 of the above function. This negation resulted in losing of the
 error value thereby triggering the code to take a wrong path as
 IS_ERR_VALUE(gpio_cd) now returned 0 even when mmc_gpio_get_cd
 returned an error value. This issue introduced by commit bf626e5550f2
 (mmc: dw_mmc: use slot-gpio to handle cd pin) caused card detection
 failure on Exynos5 boards which is now fixed by this patch.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: Zhangfei Gao zhangfei@linaro.org
 Cc: Jaehoon Chung jh80.ch...@samsung.com
 Cc: Arnd Bergmann a...@arndb.de
 ---


 Thanks for the patch
 I just submitted one patch to fix the issue, in case you missed it.

Yes I did as I am not subscribed to mmc list.

 Also spin_lock is required for atomic accessing DW_MMC_CARD_PRESENT.
 Otherwise sd detect may be failed sometimes.

 Could you help take a look.

I looked at and tested your patch [1] (which is similar to mine except
for the locking part).

Since I do not have your patch in my mailbox, FWIW,

Reviewed-by: Sachin Kamat sachin.ka...@linaro.org
Tested-by: Sachin Kamat sachin.ka...@linaro.org

[1] http://permalink.gmane.org/gmane.linux.kernel.mmc/24600
---
With warm regards,
Sachin
--
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/1] mmc: dw_mmc: Fix card detection regression

2014-01-15 Thread Sachin Kamat
On 15 January 2014 15:13, zhangfei zhangfei@linaro.org wrote:


 On 01/15/2014 05:39 PM, Sachin Kamat wrote:

 Thanks for the patch
 I just submitted one patch to fix the issue, in case you missed it.


 Yes I did as I am not subscribed to mmc list.

 Also spin_lock is required for atomic accessing DW_MMC_CARD_PRESENT.
 Otherwise sd detect may be failed sometimes.

 Could you help take a look.


 I looked at and tested your patch [1] (which is similar to mine except
 for the locking part).

 Since I do not have your patch in my mailbox, FWIW,

 Reviewed-by: Sachin Kamat sachin.ka...@linaro.org
 Tested-by: Sachin Kamat sachin.ka...@linaro.org


 Thanks Sachin,  that's great it works, all my mistake.
 Then I resumit the patch with this and cc you.

If you are planning to re-submit, then you may please consider
revising the commit message as follows:

s/Introdeced/Introduced
Please provide patch title after the commit Id in braces (patch title).
s/ingored/ignored

You may also elaborate on why IS_ERR_VALUE(!mmc_gpio_get_cd(mmc)) does not work.

-- 
With warm regards,
Sachin
--
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: dw_mmc: Fix NULL pointer dereference

2014-01-15 Thread Sachin Kamat
If mrq-sbc is not NULL but data-stop happens to be NULL,
it will lead to NULL pointer dereferencing. Avoid this by
having a NULL check for data-stop.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 9ded62c8225e..8b3e58a5f9ed 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1345,7 +1345,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
 
if (!err) {
if (!data-stop || mrq-sbc) {
-   if (mrq-sbc)
+   if (mrq-sbc  data-stop)
data-stop-error = 0;
dw_mci_request_end(host, mrq);
goto unlock;
-- 
1.7.9.5

--
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 2/9] mmc: wmt-sdmmc: Fix NULL pointer dereference

2014-01-14 Thread Sachin Kamat
'of_id' is dereferenced before NULL pointer check. Move it to
after the check.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Tony Prisk li...@prisktech.co.nz
---
 drivers/mmc/host/wmt-sdmmc.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index e902ed7846b0..498d1f799085 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -757,7 +757,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
struct device_node *np = pdev-dev.of_node;
const struct of_device_id *of_id =
of_match_device(wmt_mci_dt_ids, pdev-dev);
-   const struct wmt_mci_caps *wmt_caps = of_id-data;
+   const struct wmt_mci_caps *wmt_caps;
int ret;
int regular_irq, dma_irq;
 
@@ -766,6 +766,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
return -EFAULT;
}
 
+   wmt_caps = of_id-data;
+
if (!np) {
dev_err(pdev-dev, Missing SDMMC description in 
devicetree\n);
return -EFAULT;
-- 
1.7.9.5

--
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 Resend 1/9] mmc: ushc: Fix incorrect parameter in sizeof

2014-01-14 Thread Sachin Kamat
sizeof should be of the parent structure type.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Resending this series once again as it hasn't received Chris'
attention during the previous re-sends. Hope Chris will pick it
up atleast this time considering it is pending since a few months
now and has been acked by the concerned people.
---
 drivers/mmc/host/ushc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index c0105a2e269a..d2c386f09d69 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
-   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
+   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
if (ushc-csw == NULL) {
ret = -ENOMEM;
goto err;
-- 
1.7.9.5

--
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 4/9] mmc: davinci: Remove redundant of_match_ptr

2014-01-14 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/davinci_mmc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index d6153740b77f..5d4c5e0fba2f 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1192,7 +1192,7 @@ static struct davinci_mmc_config
struct device_node *np;
struct davinci_mmc_config *pdata = pdev-dev.platform_data;
const struct of_device_id *match =
-   of_match_device(of_match_ptr(davinci_mmc_dt_ids), pdev-dev);
+   of_match_device(davinci_mmc_dt_ids, pdev-dev);
u32 data;
 
np = pdev-dev.of_node;
@@ -1468,7 +1468,7 @@ static struct platform_driver davinci_mmcsd_driver = {
.name   = davinci_mmc,
.owner  = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
-   .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
+   .of_match_table = davinci_mmc_dt_ids,
},
.remove = __exit_p(davinci_mmcsd_remove),
.id_table   = davinci_mmc_devtype,
-- 
1.7.9.5

--
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 5/9] mmc: dw_mmc: Remove redundant of_match_ptr

2014-01-14 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc-pltfm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5c4965655297..2553bfbfc6df 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -123,7 +123,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
.remove = dw_mci_pltfm_remove,
.driver = {
.name   = dw_mmc,
-   .of_match_table = of_match_ptr(dw_mci_pltfm_match),
+   .of_match_table = dw_mci_pltfm_match,
.pm = dw_mci_pltfm_pmops,
},
 };
-- 
1.7.9.5

--
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 8/9] mmc: msm: Cleanup mmc-msm_sdcc.h header

2014-01-14 Thread Sachin Kamat
Commit 1ef21f6343ff (ARM: msm: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-msm_sdcc.h |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/platform_data/mmc-msm_sdcc.h 
b/include/linux/platform_data/mmc-msm_sdcc.h
index ffcd9e3a6a7e..55aa873c9396 100644
--- a/include/linux/platform_data/mmc-msm_sdcc.h
+++ b/include/linux/platform_data/mmc-msm_sdcc.h
@@ -1,8 +1,5 @@
-/*
- *  arch/arm/include/asm/mach/mmc.h
- */
-#ifndef ASMARM_MACH_MMC_H
-#define ASMARM_MACH_MMC_H
+#ifndef __MMC_MSM_SDCC_H
+#define __MMC_MSM_SDCC_H
 
 #include linux/mmc/host.h
 #include linux/mmc/card.h
-- 
1.7.9.5

--
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 9/9] mmc: mvsdio: Cleanup mmc-mvsdio.h header

2014-01-14 Thread Sachin Kamat
Commit c02cecb92ed4 (ARM: orion: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-mvsdio.h |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/linux/platform_data/mmc-mvsdio.h 
b/include/linux/platform_data/mmc-mvsdio.h
index 1190efedcb94..d02704cd3695 100644
--- a/include/linux/platform_data/mmc-mvsdio.h
+++ b/include/linux/platform_data/mmc-mvsdio.h
@@ -1,13 +1,11 @@
 /*
- * arch/arm/plat-orion/include/plat/mvsdio.h
- *
  * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed as is without any
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __MACH_MVSDIO_H
-#define __MACH_MVSDIO_H
+#ifndef __MMC_MVSDIO_H
+#define __MMC_MVSDIO_H
 
 #include linux/mbus.h
 
-- 
1.7.9.5

--
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 7/9] mmc: dw_mmc: Add missing description

2014-01-14 Thread Sachin Kamat
Commit 0976f16d (mmc: dw_mmc: add support tuning scheme) introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 6bf24ab917e6..306451fbbfe1 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -244,6 +244,7 @@ struct dw_mci_tuning_data {
  * @prepare_command: handle CMD register extensions.
  * @set_ios: handle bus specific extensions.
  * @parse_dt: parse implementation specific device tree properties.
+ * @execute_tuning: implementation specific tuning procedure.
  *
  * Provide controller implementation specific extensions. The usage of this
  * data structure is fully optional and usage of each member in this structure
-- 
1.7.9.5

--
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 1/7] mmc: ushc: Fix incorrect parameter in sizeof

2014-01-12 Thread Sachin Kamat
On 19 December 2013 14:13, Sachin Kamat sachin.ka...@linaro.org wrote:
 sizeof should be of the parent structure type.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: David Vrabel david.vra...@csr.com
 ---
  drivers/mmc/host/ushc.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
 index c0105a2e269a..d2c386f09d69 100644
 --- a/drivers/mmc/host/ushc.c
 +++ b/drivers/mmc/host/ushc.c
 @@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
 struct usb_device_id *id
 ret = -ENOMEM;
 goto err;
 }
 -   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
 +   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
 if (ushc-csw == NULL) {
 ret = -ENOMEM;
 goto err;
 --
 1.7.9.5



Gentle ping on this series, Chris.

-- 
With warm regards,
Sachin
--
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 2/2] mmc: mvsdio: Cleanup mmc-mvsdio.h header

2014-01-03 Thread Sachin Kamat
Commit c02cecb92ed4 (ARM: orion: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-mvsdio.h |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/linux/platform_data/mmc-mvsdio.h 
b/include/linux/platform_data/mmc-mvsdio.h
index 1190efedcb94..d02704cd3695 100644
--- a/include/linux/platform_data/mmc-mvsdio.h
+++ b/include/linux/platform_data/mmc-mvsdio.h
@@ -1,13 +1,11 @@
 /*
- * arch/arm/plat-orion/include/plat/mvsdio.h
- *
  * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed as is without any
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __MACH_MVSDIO_H
-#define __MACH_MVSDIO_H
+#ifndef __MMC_MVSDIO_H
+#define __MMC_MVSDIO_H
 
 #include linux/mbus.h
 
-- 
1.7.9.5

--
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/2] mmc: msm: Cleanup mmc-msm_sdcc.h header

2014-01-03 Thread Sachin Kamat
Commit 1ef21f6343ff (ARM: msm: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-msm_sdcc.h |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/platform_data/mmc-msm_sdcc.h 
b/include/linux/platform_data/mmc-msm_sdcc.h
index ffcd9e3a6a7e..55aa873c9396 100644
--- a/include/linux/platform_data/mmc-msm_sdcc.h
+++ b/include/linux/platform_data/mmc-msm_sdcc.h
@@ -1,8 +1,5 @@
-/*
- *  arch/arm/include/asm/mach/mmc.h
- */
-#ifndef ASMARM_MACH_MMC_H
-#define ASMARM_MACH_MMC_H
+#ifndef __MMC_MSM_SDCC_H
+#define __MMC_MSM_SDCC_H
 
 #include linux/mmc/host.h
 #include linux/mmc/card.h
-- 
1.7.9.5

--
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 2/2] mmc: mvsdio: Cleanup mmc-mvsdio.h header

2013-12-29 Thread Sachin Kamat
Commit c02cecb92ed4 (ARM: orion: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-mvsdio.h |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/linux/platform_data/mmc-mvsdio.h 
b/include/linux/platform_data/mmc-mvsdio.h
index 1190efedcb94..d02704cd3695 100644
--- a/include/linux/platform_data/mmc-mvsdio.h
+++ b/include/linux/platform_data/mmc-mvsdio.h
@@ -1,13 +1,11 @@
 /*
- * arch/arm/plat-orion/include/plat/mvsdio.h
- *
  * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed as is without any
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __MACH_MVSDIO_H
-#define __MACH_MVSDIO_H
+#ifndef __MMC_MVSDIO_H
+#define __MMC_MVSDIO_H
 
 #include linux/mbus.h
 
-- 
1.7.9.5

--
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/2] mmc: msm: Cleanup mmc-msm_sdcc.h header

2013-12-29 Thread Sachin Kamat
Commit 1ef21f6343ff (ARM: msm: move platform_data definitions)
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 include/linux/platform_data/mmc-msm_sdcc.h |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/platform_data/mmc-msm_sdcc.h 
b/include/linux/platform_data/mmc-msm_sdcc.h
index ffcd9e3a6a7e..55aa873c9396 100644
--- a/include/linux/platform_data/mmc-msm_sdcc.h
+++ b/include/linux/platform_data/mmc-msm_sdcc.h
@@ -1,8 +1,5 @@
-/*
- *  arch/arm/include/asm/mach/mmc.h
- */
-#ifndef ASMARM_MACH_MMC_H
-#define ASMARM_MACH_MMC_H
+#ifndef __MMC_MSM_SDCC_H
+#define __MMC_MSM_SDCC_H
 
 #include linux/mmc/host.h
 #include linux/mmc/card.h
-- 
1.7.9.5

--
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 Resend 3/7] mmc: sdhci-spear: Fix NULL pointer dereference

2013-12-19 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Dereference pdata only
if it is not NULL.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Viresh Kumar viresh.ku...@linaro.org
---
 drivers/mmc/host/sdhci-spear.c |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 2dba9f8d1760..76ddd89a688e 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -84,14 +84,12 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct 
platform_device *pde
/* If pdata is required */
if (cd_gpio != -1) {
pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
-   if (!pdata) {
+   if (!pdata)
dev_err(pdev-dev, DT: kzalloc failed\n);
-   return ERR_PTR(-ENOMEM);
-   }
+   else
+   pdata-card_int_gpio = cd_gpio;
}
 
-   pdata-card_int_gpio = cd_gpio;
-
return pdata;
 }
 #else
-- 
1.7.9.5

--
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 Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof

2013-12-19 Thread Sachin Kamat
sizeof should be of the parent structure type.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: David Vrabel david.vra...@csr.com
---
 drivers/mmc/host/ushc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index c0105a2e269a..d2c386f09d69 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
-   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
+   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
if (ushc-csw == NULL) {
ret = -ENOMEM;
goto err;
-- 
1.7.9.5

--
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 Resend 4/7] mmc: davinci: Remove redundant of_match_ptr

2013-12-19 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/davinci_mmc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index d6153740b77f..5d4c5e0fba2f 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1192,7 +1192,7 @@ static struct davinci_mmc_config
struct device_node *np;
struct davinci_mmc_config *pdata = pdev-dev.platform_data;
const struct of_device_id *match =
-   of_match_device(of_match_ptr(davinci_mmc_dt_ids), pdev-dev);
+   of_match_device(davinci_mmc_dt_ids, pdev-dev);
u32 data;
 
np = pdev-dev.of_node;
@@ -1468,7 +1468,7 @@ static struct platform_driver davinci_mmcsd_driver = {
.name   = davinci_mmc,
.owner  = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
-   .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
+   .of_match_table = davinci_mmc_dt_ids,
},
.remove = __exit_p(davinci_mmcsd_remove),
.id_table   = davinci_mmc_devtype,
-- 
1.7.9.5

--
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 Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference

2013-12-19 Thread Sachin Kamat
'of_id' is dereferenced before NULL pointer check. Move it to
after the check.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Tony Prisk li...@prisktech.co.nz
---
 drivers/mmc/host/wmt-sdmmc.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index e902ed7846b0..498d1f799085 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -757,7 +757,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
struct device_node *np = pdev-dev.of_node;
const struct of_device_id *of_id =
of_match_device(wmt_mci_dt_ids, pdev-dev);
-   const struct wmt_mci_caps *wmt_caps = of_id-data;
+   const struct wmt_mci_caps *wmt_caps;
int ret;
int regular_irq, dma_irq;
 
@@ -766,6 +766,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
return -EFAULT;
}
 
+   wmt_caps = of_id-data;
+
if (!np) {
dev_err(pdev-dev, Missing SDMMC description in 
devicetree\n);
return -EFAULT;
-- 
1.7.9.5

--
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 Resend 7/7] mmc: dw_mmc: Add missing description

2013-12-19 Thread Sachin Kamat
Commit 0976f16d (mmc: dw_mmc: add support tuning scheme) introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 6bf24ab917e6..306451fbbfe1 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -244,6 +244,7 @@ struct dw_mci_tuning_data {
  * @prepare_command: handle CMD register extensions.
  * @set_ios: handle bus specific extensions.
  * @parse_dt: parse implementation specific device tree properties.
+ * @execute_tuning: implementation specific tuning procedure.
  *
  * Provide controller implementation specific extensions. The usage of this
  * data structure is fully optional and usage of each member in this structure
-- 
1.7.9.5

--
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 Resend 5/7] mmc: dw_mmc: Remove redundant of_match_ptr

2013-12-19 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc-pltfm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5c4965655297..2553bfbfc6df 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -123,7 +123,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
.remove = dw_mci_pltfm_remove,
.driver = {
.name   = dw_mmc,
-   .of_match_table = of_match_ptr(dw_mci_pltfm_match),
+   .of_match_table = dw_mci_pltfm_match,
.pm = dw_mci_pltfm_pmops,
},
 };
-- 
1.7.9.5

--
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 Resend 6/7] mmc: sdhci-dove: Remove redundant of_match_ptr

2013-12-19 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/sdhci-dove.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 8424839660f8..736d7a2eb7ec 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -208,7 +208,7 @@ static struct platform_driver sdhci_dove_driver = {
.name   = sdhci-dove,
.owner  = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
-   .of_match_table = of_match_ptr(sdhci_dove_of_match_table),
+   .of_match_table = sdhci_dove_of_match_table,
},
.probe  = sdhci_dove_probe,
.remove = sdhci_dove_remove,
-- 
1.7.9.5

--
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 Resend 4/7] mmc: davinci: Remove redundant of_match_ptr

2013-10-30 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/davinci_mmc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index d615374..5d4c5e0 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1192,7 +1192,7 @@ static struct davinci_mmc_config
struct device_node *np;
struct davinci_mmc_config *pdata = pdev-dev.platform_data;
const struct of_device_id *match =
-   of_match_device(of_match_ptr(davinci_mmc_dt_ids), pdev-dev);
+   of_match_device(davinci_mmc_dt_ids, pdev-dev);
u32 data;
 
np = pdev-dev.of_node;
@@ -1468,7 +1468,7 @@ static struct platform_driver davinci_mmcsd_driver = {
.name   = davinci_mmc,
.owner  = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
-   .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
+   .of_match_table = davinci_mmc_dt_ids,
},
.remove = __exit_p(davinci_mmcsd_remove),
.id_table   = davinci_mmc_devtype,
-- 
1.7.9.5

--
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 Resend 6/7] mmc: sdhci-dove: Remove redundant of_match_ptr

2013-10-30 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/sdhci-dove.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 95f1076..fc59f96 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -208,7 +208,7 @@ static struct platform_driver sdhci_dove_driver = {
.name   = sdhci-dove,
.owner  = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
-   .of_match_table = of_match_ptr(sdhci_dove_of_match_table),
+   .of_match_table = sdhci_dove_of_match_table,
},
.probe  = sdhci_dove_probe,
.remove = sdhci_dove_remove,
-- 
1.7.9.5

--
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 Resend 5/7] mmc: dw_mmc: Remove redundant of_match_ptr

2013-10-30 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc-pltfm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5c49656..2553bfb 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -123,7 +123,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
.remove = dw_mci_pltfm_remove,
.driver = {
.name   = dw_mmc,
-   .of_match_table = of_match_ptr(dw_mci_pltfm_match),
+   .of_match_table = dw_mci_pltfm_match,
.pm = dw_mci_pltfm_pmops,
},
 };
-- 
1.7.9.5

--
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 Resend 7/7] mmc: dw_mmc: Add missing description

2013-10-30 Thread Sachin Kamat
Commit 0976f16d (mmc: dw_mmc: add support tuning scheme) introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 6bf24ab..306451f 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -244,6 +244,7 @@ struct dw_mci_tuning_data {
  * @prepare_command: handle CMD register extensions.
  * @set_ios: handle bus specific extensions.
  * @parse_dt: parse implementation specific device tree properties.
+ * @execute_tuning: implementation specific tuning procedure.
  *
  * Provide controller implementation specific extensions. The usage of this
  * data structure is fully optional and usage of each member in this structure
-- 
1.7.9.5

--
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 Resend 3/7] mmc: sdhci-spear: Fix NULL pointer dereference

2013-10-30 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Dereference pdata only
if it is not NULL.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Viresh Kumar viresh.ku...@linaro.org
---
 drivers/mmc/host/sdhci-spear.c |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 9b6459d..af3fe87 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -84,14 +84,12 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct 
platform_device *pde
/* If pdata is required */
if (cd_gpio != -1) {
pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
-   if (!pdata) {
+   if (!pdata)
dev_err(pdev-dev, DT: kzalloc failed\n);
-   return ERR_PTR(-ENOMEM);
-   }
+   else
+   pdata-card_int_gpio = cd_gpio;
}
 
-   pdata-card_int_gpio = cd_gpio;
-
return pdata;
 }
 #else
-- 
1.7.9.5

--
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 Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference

2013-10-30 Thread Sachin Kamat
'of_id' is dereferenced before NULL pointer check. Move it to
after the check.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Tony Prisk li...@prisktech.co.nz
---
 drivers/mmc/host/wmt-sdmmc.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index e902ed7..498d1f7 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -757,7 +757,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
struct device_node *np = pdev-dev.of_node;
const struct of_device_id *of_id =
of_match_device(wmt_mci_dt_ids, pdev-dev);
-   const struct wmt_mci_caps *wmt_caps = of_id-data;
+   const struct wmt_mci_caps *wmt_caps;
int ret;
int regular_irq, dma_irq;
 
@@ -766,6 +766,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
return -EFAULT;
}
 
+   wmt_caps = of_id-data;
+
if (!np) {
dev_err(pdev-dev, Missing SDMMC description in 
devicetree\n);
return -EFAULT;
-- 
1.7.9.5

--
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 Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof

2013-10-30 Thread Sachin Kamat
sizeof should be of the parent structure type.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: David Vrabel david.vra...@csr.com
---
Chris,
Resending the pending patches with appropriate acks.
---
 drivers/mmc/host/ushc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index c0105a2..d2c386f 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
-   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
+   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
if (ushc-csw == NULL) {
ret = -ENOMEM;
goto err;
-- 
1.7.9.5

--
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/3] mmc: davinci: Remove redundant of_match_ptr

2013-10-20 Thread Sachin Kamat
On 30 September 2013 10:29, Sachin Kamat sachin.ka...@linaro.org wrote:
 The data structure of_match_ptr() protects is always compiled in.
 Hence of_match_ptr() is not needed.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/davinci_mmc.c |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
 index e9fa87d..39b311e 100644
 --- a/drivers/mmc/host/davinci_mmc.c
 +++ b/drivers/mmc/host/davinci_mmc.c
 @@ -1193,7 +1193,7 @@ static struct davinci_mmc_config
 struct device_node *np;
 struct davinci_mmc_config *pdata = pdev-dev.platform_data;
 const struct of_device_id *match =
 -   of_match_device(of_match_ptr(davinci_mmc_dt_ids), pdev-dev);
 +   of_match_device(davinci_mmc_dt_ids, pdev-dev);
 u32 data;

 np = pdev-dev.of_node;
 @@ -1484,7 +1484,7 @@ static struct platform_driver davinci_mmcsd_driver = {
 .name   = davinci_mmc,
 .owner  = THIS_MODULE,
 .pm = davinci_mmcsd_pm_ops,
 -   .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
 +   .of_match_table = davinci_mmc_dt_ids,
 },
 .remove = __exit_p(davinci_mmcsd_remove),
 .id_table   = davinci_mmc_devtype,
 --
 1.7.9.5


Gentle ping on this series, Chris.


-- 
With warm regards,
Sachin
--
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/1] mmc: ushc: Fix incorrect parameter in sizeof

2013-10-20 Thread Sachin Kamat
On 12 September 2013 13:44, Sachin Kamat sachin.ka...@linaro.org wrote:
 sizeof should be of the parent structure type.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: David Vrabel david.vra...@csr.com
 ---
 Compile tested.
 ---
  drivers/mmc/host/ushc.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
 index c0105a2..d2c386f 100644
 --- a/drivers/mmc/host/ushc.c
 +++ b/drivers/mmc/host/ushc.c
 @@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
 struct usb_device_id *id
 ret = -ENOMEM;
 goto err;
 }
 -   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
 +   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
 if (ushc-csw == NULL) {
 ret = -ENOMEM;
 goto err;
 --
 1.7.9.5


Gentle ping ...

-- 
With warm regards,
Sachin
--
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/1] mmc: wmt-sdmmc: Fix NULL pointer dereference

2013-10-20 Thread Sachin Kamat
On 12 September 2013 13:51, Sachin Kamat sachin.ka...@linaro.org wrote:
 'of_id' is dereferenced before NULL pointer check. Move it to
 after the check.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 Compile tested.
 ---
  drivers/mmc/host/wmt-sdmmc.c |4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
 index 34231d5..3523a72 100644
 --- a/drivers/mmc/host/wmt-sdmmc.c
 +++ b/drivers/mmc/host/wmt-sdmmc.c
 @@ -771,7 +771,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
 struct device_node *np = pdev-dev.of_node;
 const struct of_device_id *of_id =
 of_match_device(wmt_mci_dt_ids, pdev-dev);
 -   const struct wmt_mci_caps *wmt_caps = of_id-data;
 +   const struct wmt_mci_caps *wmt_caps;
 int ret;
 int regular_irq, dma_irq;

 @@ -780,6 +780,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
 return -EFAULT;
 }

 +   wmt_caps = of_id-data;
 +
 if (!np) {
 dev_err(pdev-dev, Missing SDMMC description in 
 devicetree\n);
 return -EFAULT;
 --
 1.7.9.5


Gentle ping...

-- 
With warm regards,
Sachin
--
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 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-10-20 Thread Sachin Kamat
On 12 September 2013 14:34, Sachin Kamat sachin.ka...@linaro.org wrote:
 pdata could be NULL if cd_gpio = -1. Dereference pdata only
 if it is not NULL.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: Viresh Kumar viresh.ku...@linaro.org
 ---
 Compile tested.
 Changes since v1:
 * Moved the pdata assignment inside if condition.
 ---
  drivers/mmc/host/sdhci-spear.c |8 +++-
  1 file changed, 3 insertions(+), 5 deletions(-)

 diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
 index 2dba9f8..76ddd89 100644
 --- a/drivers/mmc/host/sdhci-spear.c
 +++ b/drivers/mmc/host/sdhci-spear.c
 @@ -84,14 +84,12 @@ static struct sdhci_plat_data 
 *sdhci_probe_config_dt(struct platform_device *pde
 /* If pdata is required */
 if (cd_gpio != -1) {
 pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
 -   if (!pdata) {
 +   if (!pdata)
 dev_err(pdev-dev, DT: kzalloc failed\n);
 -   return ERR_PTR(-ENOMEM);
 -   }
 +   else
 +   pdata-card_int_gpio = cd_gpio;
 }

 -   pdata-card_int_gpio = cd_gpio;
 -
 return pdata;
  }
  #else
 --
 1.7.9.5


Gentle ping, Chris.


-- 
With warm regards,
Sachin
--
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: dw_mmc: Add missing description

2013-10-16 Thread Sachin Kamat
Commit 0976f16d (mmc: dw_mmc: add support tuning scheme) introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Seungwon Jeon tgih@samsung.com
---
 drivers/mmc/host/dw_mmc.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 6bf24ab..306451f 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -244,6 +244,7 @@ struct dw_mci_tuning_data {
  * @prepare_command: handle CMD register extensions.
  * @set_ios: handle bus specific extensions.
  * @parse_dt: parse implementation specific device tree properties.
+ * @execute_tuning: implementation specific tuning procedure.
  *
  * Provide controller implementation specific extensions. The usage of this
  * data structure is fully optional and usage of each member in this structure
-- 
1.7.9.5

--
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 2/3] mmc: dw_mmc: Remove redundant of_match_ptr

2013-09-29 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc-pltfm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5c49656..2553bfb 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -123,7 +123,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
.remove = dw_mci_pltfm_remove,
.driver = {
.name   = dw_mmc,
-   .of_match_table = of_match_ptr(dw_mci_pltfm_match),
+   .of_match_table = dw_mci_pltfm_match,
.pm = dw_mci_pltfm_pmops,
},
 };
-- 
1.7.9.5

--
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/3] mmc: davinci: Remove redundant of_match_ptr

2013-09-29 Thread Sachin Kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/davinci_mmc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index e9fa87d..39b311e 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1193,7 +1193,7 @@ static struct davinci_mmc_config
struct device_node *np;
struct davinci_mmc_config *pdata = pdev-dev.platform_data;
const struct of_device_id *match =
-   of_match_device(of_match_ptr(davinci_mmc_dt_ids), pdev-dev);
+   of_match_device(davinci_mmc_dt_ids, pdev-dev);
u32 data;
 
np = pdev-dev.of_node;
@@ -1484,7 +1484,7 @@ static struct platform_driver davinci_mmcsd_driver = {
.name   = davinci_mmc,
.owner  = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
-   .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
+   .of_match_table = davinci_mmc_dt_ids,
},
.remove = __exit_p(davinci_mmcsd_remove),
.id_table   = davinci_mmc_devtype,
-- 
1.7.9.5

--
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/1] mmc: wmt-sdmmc: Fix NULL pointer dereference

2013-09-27 Thread Sachin Kamat
On 13 September 2013 00:13, Tony Prisk li...@prisktech.co.nz wrote:
 On 12/09/13 20:21, Sachin Kamat wrote:

 'of_id' is dereferenced before NULL pointer check. Move it to
 after the check.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 Compile tested.
 ---
   drivers/mmc/host/wmt-sdmmc.c |4 +++-
   1 file changed, 3 insertions(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
 index 34231d5..3523a72 100644
 --- a/drivers/mmc/host/wmt-sdmmc.c
 +++ b/drivers/mmc/host/wmt-sdmmc.c
 @@ -771,7 +771,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
 struct device_node *np = pdev-dev.of_node;
 const struct of_device_id *of_id =
 of_match_device(wmt_mci_dt_ids, pdev-dev);
 -   const struct wmt_mci_caps *wmt_caps = of_id-data;
 +   const struct wmt_mci_caps *wmt_caps;
 int ret;
 int regular_irq, dma_irq;
   @@ -780,6 +780,8 @@ static int wmt_mci_probe(struct platform_device
 *pdev)
 return -EFAULT;
 }
   + wmt_caps = of_id-data;
 +
 if (!np) {
 dev_err(pdev-dev, Missing SDMMC description in
 devicetree\n);
 return -EFAULT;


 While I don't mind either way, this can never fail anyway. arch-vt8500 is
 devicetree only, so the only way the driver will get probed is through a
 compatible-match, and .data must be (and is) specified.

 I guess it's still good housekeeping to test it to protect future changes
 so:

 Acked-by: Tony Prisk li...@prisktech.co.nz

Ping Chris.

-- 
With warm regards,
Sachin
--
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 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-27 Thread Sachin Kamat
On 12 September 2013 14:54, Viresh Kumar viresh.ku...@linaro.org wrote:
 On 12 September 2013 14:34, Sachin Kamat sachin.ka...@linaro.org wrote:
 pdata could be NULL if cd_gpio = -1. Dereference pdata only
 if it is not NULL.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: Viresh Kumar viresh.ku...@linaro.org
 ---
 Compile tested.
 Changes since v1:
 * Moved the pdata assignment inside if condition.
 ---
  drivers/mmc/host/sdhci-spear.c |8 +++-
  1 file changed, 3 insertions(+), 5 deletions(-)

 diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
 index 2dba9f8..76ddd89 100644
 --- a/drivers/mmc/host/sdhci-spear.c
 +++ b/drivers/mmc/host/sdhci-spear.c
 @@ -84,14 +84,12 @@ static struct sdhci_plat_data 
 *sdhci_probe_config_dt(struct platform_device *pde
 /* If pdata is required */
 if (cd_gpio != -1) {
 pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
 -   if (!pdata) {
 +   if (!pdata)
 dev_err(pdev-dev, DT: kzalloc failed\n);
 -   return ERR_PTR(-ENOMEM);
 -   }
 +   else
 +   pdata-card_int_gpio = cd_gpio;
 }

 -   pdata-card_int_gpio = cd_gpio;
 -
 return pdata;
  }
  #else

 Acked-by: Viresh Kumar viresh.ku...@linaro.org


Ping Chris.

-- 
With warm regards,
Sachin
--
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/1] mmc: ushc: Fix incorrect parameter in sizeof

2013-09-25 Thread Sachin Kamat
Hi Chris,

On 12 September 2013 13:44, Sachin Kamat sachin.ka...@linaro.org wrote:
 sizeof should be of the parent structure type.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: David Vrabel david.vra...@csr.com
 ---
 Compile tested.
 ---
  drivers/mmc/host/ushc.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
 index c0105a2..d2c386f 100644
 --- a/drivers/mmc/host/ushc.c
 +++ b/drivers/mmc/host/ushc.c
 @@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
 struct usb_device_id *id
 ret = -ENOMEM;
 goto err;
 }
 -   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
 +   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
 if (ushc-csw == NULL) {
 ret = -ENOMEM;
 goto err;
 --
 1.7.9.5


Thanks for applying my other patches. Can you please check this one too?


-- 
With warm regards,
Sachin
--
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/3] mmc: mvsdio: Convert to devm_ioremap_resource

2013-09-24 Thread Sachin Kamat
On 12 September 2013 12:16, Sachin Kamat sachin.ka...@linaro.org wrote:
 devm_request_and_ioremap() is deprecated. Use devm_ioremap_resource()
 instead.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org

Gentle ping on this series Chris.

-- 
With warm regards,
Sachin
--
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: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Hence move the NULL check
outside the if condition.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Viresh Kumar viresh.ku...@linaro.org
---
Only compile tested.
---
 drivers/mmc/host/sdhci-spear.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 2dba9f8..4f3557a 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -82,12 +82,12 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct 
platform_device *pde
cd_gpio = -1;
 
/* If pdata is required */
-   if (cd_gpio != -1) {
+   if (cd_gpio != -1)
pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
-   if (!pdata) {
-   dev_err(pdev-dev, DT: kzalloc failed\n);
-   return ERR_PTR(-ENOMEM);
-   }
+
+   if (!pdata) {
+   dev_err(pdev-dev, pdata is NULL\n);
+   return ERR_PTR(-ENOMEM);
}
 
pdata-card_int_gpio = cd_gpio;
-- 
1.7.9.5

--
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/3] mmc: mvsdio: Convert to devm_ioremap_resource

2013-09-12 Thread Sachin Kamat
devm_request_and_ioremap() is deprecated. Use devm_ioremap_resource()
instead.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/mvsdio.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 06c5b0b..a592407 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -775,9 +775,9 @@ static int __init mvsd_probe(struct platform_device *pdev)
 
spin_lock_init(host-lock);
 
-   host-base = devm_request_and_ioremap(pdev-dev, r);
-   if (!host-base) {
-   ret = -ENOMEM;
+   host-base = devm_ioremap_resource(pdev-dev, r);
+   if (IS_ERR(host-base)) {
+   ret = PTR_ERR(host-base);
goto out;
}
 
-- 
1.7.9.5

--
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 2/3] mmc: dw_mmc-socfpga: Remove redundant of_match_ptr

2013-09-12 Thread Sachin Kamat
'dw_mci_socfpga_match' is always compiled in.
Hence of_match_ptr is not necessary.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc-socfpga.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-socfpga.c 
b/drivers/mmc/host/dw_mmc-socfpga.c
index 14b5961..5ce00b2 100644
--- a/drivers/mmc/host/dw_mmc-socfpga.c
+++ b/drivers/mmc/host/dw_mmc-socfpga.c
@@ -128,7 +128,7 @@ static struct platform_driver dw_mci_socfpga_pltfm_driver = 
{
.remove = __exit_p(dw_mci_pltfm_remove),
.driver = {
.name   = dwmmc_socfpga,
-   .of_match_table = of_match_ptr(dw_mci_socfpga_match),
+   .of_match_table = dw_mci_socfpga_match,
.pm = dw_mci_pltfm_pmops,
},
 };
-- 
1.7.9.5

--
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/3] mmc: dw_mmc-socfpga: Staticize dw_mci_socfpga_probe

2013-09-12 Thread Sachin Kamat
'dw_mci_socfpga_probe' is used only in this file. Make it static.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc-socfpga.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-socfpga.c 
b/drivers/mmc/host/dw_mmc-socfpga.c
index 5ce00b2..56c7fe2 100644
--- a/drivers/mmc/host/dw_mmc-socfpga.c
+++ b/drivers/mmc/host/dw_mmc-socfpga.c
@@ -113,7 +113,7 @@ static const struct of_device_id dw_mci_socfpga_match[] = {
 };
 MODULE_DEVICE_TABLE(of, dw_mci_socfpga_match);
 
-int dw_mci_socfpga_probe(struct platform_device *pdev)
+static int dw_mci_socfpga_probe(struct platform_device *pdev)
 {
const struct dw_mci_drv_data *drv_data;
const struct of_device_id *match;
-- 
1.7.9.5

--
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/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 13:19, Viresh Kumar viresh.ku...@linaro.org wrote:
 On 12 September 2013 12:13, Sachin Kamat sachin.ka...@linaro.org wrote:
 pdata could be NULL if cd_gpio = -1. Hence move the NULL check
 outside the if condition.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: Viresh Kumar viresh.ku...@linaro.org
 ---
 Only compile tested.
 ---
  drivers/mmc/host/sdhci-spear.c |   10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

 diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
 index 2dba9f8..4f3557a 100644
 --- a/drivers/mmc/host/sdhci-spear.c
 +++ b/drivers/mmc/host/sdhci-spear.c
 @@ -82,12 +82,12 @@ static struct sdhci_plat_data 
 *sdhci_probe_config_dt(struct platform_device *pde
 cd_gpio = -1;

 /* If pdata is required */
 -   if (cd_gpio != -1) {
 +   if (cd_gpio != -1)
 pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
 -   if (!pdata) {
 -   dev_err(pdev-dev, DT: kzalloc failed\n);
 -   return ERR_PTR(-ENOMEM);
 -   }
 +
 +   if (!pdata) {
 +   dev_err(pdev-dev, pdata is NULL\n);
 +   return ERR_PTR(-ENOMEM);
 }

 pdata-card_int_gpio = cd_gpio;

 Or better move above line in the if block? We are already printing
 error in probe..

Yes. That was my second option. If we do that we would get something as below:

 84 /* If pdata is required */
 85 if (cd_gpio != -1) {
 86pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
 87if (!pdata) {
 88dev_err(pdev-dev, DT: kzalloc failed\n);
 89goto out;
 90}
 91pdata-card_int_gpio = cd_gpio;
 92return pdata;
 93  }
 94
 95 out:
 96  return ERR_PTR(-ENODATA);

Does this look OK?

-- 
With warm regards,
Sachin
--
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/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 13:43, Viresh Kumar viresh.ku...@linaro.org wrote:
 On 12 September 2013 13:41, Sachin Kamat sachin.ka...@linaro.org wrote:
 Yes. That was my second option. If we do that we would get something as 
 below:

  84 /* If pdata is required */
  85 if (cd_gpio != -1) {
  86pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), 
 GFP_KERNEL);
  87if (!pdata) {
  88dev_err(pdev-dev, DT: kzalloc failed\n);
  89goto out;
  90}
  91pdata-card_int_gpio = cd_gpio;
  92return pdata;
  93  }
  94
  95 out:
  96  return ERR_PTR(-ENODATA);

 Does this look OK?

 Or this:

  85 if (cd_gpio != -1) {
  86pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), 
 GFP_KERNEL);
  87if (!pdata)
  88dev_err(pdev-dev, DT: kzalloc failed\n);
 else
  91pdata-card_int_gpio = cd_gpio;
  93  }
  94
  96  return ERR_PTR(-ENODATA);

Wouldn't this be unconditional error return whether pdata is null or not?

-- 
With warm regards,
Sachin
--
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/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 13:50, Viresh Kumar viresh.ku...@linaro.org wrote:
 On 12 September 2013 13:48, Sachin Kamat sachin.ka...@linaro.org wrote:
  96  return ERR_PTR(-ENODATA);

 Wouldn't this be unconditional error return whether pdata is null or not?

 Stupid me... I meant return pdata from this place..

 Necessary checks are done in sdhci_probe()

sdhci_probe only checks for IS_ERR. We would need to change it to
IS_ERR_OR_NULL (which I do not prefer personally as there is some
discussion for its removal). In that case we would need to return as I
mentioned in my earlier email. Let me know your opinion.

-- 
With warm regards,
Sachin
--
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: ushc: Fix incorrect parameter in sizeof

2013-09-12 Thread Sachin Kamat
sizeof should be of the parent structure type.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: David Vrabel david.vra...@csr.com
---
Compile tested.
---
 drivers/mmc/host/ushc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index c0105a2..d2c386f 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const 
struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
-   ushc-csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
+   ushc-csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
if (ushc-csw == NULL) {
ret = -ENOMEM;
goto err;
-- 
1.7.9.5

--
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: wmt-sdmmc: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
'of_id' is dereferenced before NULL pointer check. Move it to
after the check.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Compile tested.
---
 drivers/mmc/host/wmt-sdmmc.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 34231d5..3523a72 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -771,7 +771,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
struct device_node *np = pdev-dev.of_node;
const struct of_device_id *of_id =
of_match_device(wmt_mci_dt_ids, pdev-dev);
-   const struct wmt_mci_caps *wmt_caps = of_id-data;
+   const struct wmt_mci_caps *wmt_caps;
int ret;
int regular_irq, dma_irq;
 
@@ -780,6 +780,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
return -EFAULT;
}
 
+   wmt_caps = of_id-data;
+
if (!np) {
dev_err(pdev-dev, Missing SDMMC description in 
devicetree\n);
return -EFAULT;
-- 
1.7.9.5

--
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/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 14:26, Viresh Kumar viresh.ku...@linaro.org wrote:
 On 12 September 2013 13:52, Sachin Kamat sachin.ka...@linaro.org wrote:
 sdhci_probe only checks for IS_ERR. We would need to change it to
 IS_ERR_OR_NULL (which I do not prefer personally as there is some
 discussion for its removal). In that case we would need to return as I
 mentioned in my earlier email. Let me know your opinion.

 The problem with pdata normally is that it can't be NULL. Its not like clk/
 regulator framework where NULL's are valid...

 And that's why we are checking NULL later in the probe().. Probably you can
 just move that up a bit.. and nothing else..

Yes you are right. I had not seen that check which is done later in
probe. I will leave the probe
as it is and modify the sdhci_probe_config_dt as per your suggestion.
-- 
With warm regards,
Sachin
--
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 v2 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Dereference pdata only
if it is not NULL.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Viresh Kumar viresh.ku...@linaro.org
---
Compile tested.
Changes since v1:
* Moved the pdata assignment inside if condition.
---
 drivers/mmc/host/sdhci-spear.c |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 2dba9f8..76ddd89 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -84,14 +84,12 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct 
platform_device *pde
/* If pdata is required */
if (cd_gpio != -1) {
pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL);
-   if (!pdata) {
+   if (!pdata)
dev_err(pdev-dev, DT: kzalloc failed\n);
-   return ERR_PTR(-ENOMEM);
-   }
+   else
+   pdata-card_int_gpio = cd_gpio;
}
 
-   pdata-card_int_gpio = cd_gpio;
-
return pdata;
 }
 #else
-- 
1.7.9.5

--
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/3] mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion

2013-08-23 Thread Sachin Kamat
Hi Christian,

On 22 August 2013 23:16, Christian Daudt c...@broadcom.com wrote:
 On 13-08-21 11:07 PM, Sachin Kamat wrote:

 On 20 July 2013 02:01, Christian Daudt c...@broadcom.com wrote:

 On 13-07-07 11:11 PM, Sachin Kamat wrote:

 version.h header inclusion is not necessary as detected by
 versioncheck.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
drivers/mmc/host/sdhci-bcm-kona.c |1 -
1 file changed, 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci-bcm-kona.c
 b/drivers/mmc/host/sdhci-bcm-kona.c
 index 87175f9..bca6d55 100644
 --- a/drivers/mmc/host/sdhci-bcm-kona.c
 +++ b/drivers/mmc/host/sdhci-bcm-kona.c
 @@ -24,7 +24,6 @@
#include linux/of.h
#include linux/of_device.h
#include linux/of_gpio.h
 -#include linux/version.h
#include linux/mmc/slot-gpio.h
  #include sdhci-pltfm.h

 Acked-by: Christian Daudt c...@broadcom.com

   thanks,
 csd


 Ping Chris..


 Hi Sachin,
  I can pull this one into bcm tree, as I already have other patches for that
 file in there. I'm also pulling in patch 3.

Sounds good. Please go ahead. Thanks.


Patch 2 was already covered by
 this commit which is already in my pull request to armsoc so I'll drop it:
 Author: Markus Mayer markus.ma...@linaro.org
 Date:   Wed Aug 7 15:39:59 2013 -0700

 mmc: sdhci-bcm-kona: make linker-section warning go away

 This change makes the following build warning go away:
 [...]
   LINKvmlinux
   LD  vmlinux.o
   MODPOST vmlinux.o
 WARNING: modpost: Found 2 section mismatch(es).
 To see full details build your kernel with:
 'make CONFIG_DEBUG_SECTION_MISMATCH=y'

 Signed-off-by: Markus Mayer markus.ma...@linaro.org
 Reviewed-by: Christian Daudt c...@broadcom.com
 Reviewed-by: Matt Porter matt.por...@linaro.org



  thanks,
csd





-- 
With warm regards,
Sachin
--
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/3] mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion

2013-08-22 Thread Sachin Kamat
On 20 July 2013 02:01, Christian Daudt c...@broadcom.com wrote:
 On 13-07-07 11:11 PM, Sachin Kamat wrote:

 version.h header inclusion is not necessary as detected by
 versioncheck.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
   drivers/mmc/host/sdhci-bcm-kona.c |1 -
   1 file changed, 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci-bcm-kona.c
 b/drivers/mmc/host/sdhci-bcm-kona.c
 index 87175f9..bca6d55 100644
 --- a/drivers/mmc/host/sdhci-bcm-kona.c
 +++ b/drivers/mmc/host/sdhci-bcm-kona.c
 @@ -24,7 +24,6 @@
   #include linux/of.h
   #include linux/of_device.h
   #include linux/of_gpio.h
 -#include linux/version.h
   #include linux/mmc/slot-gpio.h
 #include sdhci-pltfm.h

 Acked-by: Christian Daudt c...@broadcom.com

  thanks,
csd



Ping Chris..


-- 
With warm regards,
Sachin
--
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/1] mmc: vub300: Staticize vub300_init_card

2013-08-02 Thread Sachin Kamat
On 26 June 2013 12:02, Sachin Kamat sachin.ka...@linaro.org wrote:
 'vub300_init_card' is used only in this file. Make it
 static.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/vub300.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
 index cb9f361..e9028ad 100644
 --- a/drivers/mmc/host/vub300.c
 +++ b/drivers/mmc/host/vub300.c
 @@ -2079,7 +2079,7 @@ static void vub300_enable_sdio_irq(struct mmc_host 
 *mmc, int enable)
 kref_put(vub300-kref, vub300_delete);
  }

 -void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
 +static void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
  {  /* NOT irq */
 struct vub300_mmc_host *vub300 = mmc_priv(mmc);
 dev_info(vub300-udev-dev, NO host QUIRKS for this card\n);
 --
 1.7.9.5


Chris,

Any comments on this patch?

-- 
With warm regards,
Sachin
--
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/1] mmc: sdhci-bcm2835: Staticize bcm2835_sdhci_get_min_clock

2013-08-02 Thread Sachin Kamat
On 26 June 2013 11:57, Sachin Kamat sachin.ka...@linaro.org wrote:
 'bcm2835_sdhci_get_min_clock' is used only in this file.
 Make it static.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/sdhci-bcm2835.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci-bcm2835.c 
 b/drivers/mmc/host/sdhci-bcm2835.c
 index 0584a1c..36fa2df 100644
 --- a/drivers/mmc/host/sdhci-bcm2835.c
 +++ b/drivers/mmc/host/sdhci-bcm2835.c
 @@ -119,7 +119,7 @@ static u8 bcm2835_sdhci_readb(struct sdhci_host *host, 
 int reg)
 return byte;
  }

 -unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
 +static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
  {
 return MIN_FREQ;
  }
 --
 1.7.9.5

Chris,

Any comments on this patch?


-- 
With warm regards,
Sachin
--
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/3] mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion

2013-08-02 Thread Sachin Kamat
On 20 July 2013 02:01, Christian Daudt c...@broadcom.com wrote:
 On 13-07-07 11:11 PM, Sachin Kamat wrote:

 version.h header inclusion is not necessary as detected by
 versioncheck.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
   drivers/mmc/host/sdhci-bcm-kona.c |1 -
   1 file changed, 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci-bcm-kona.c
 b/drivers/mmc/host/sdhci-bcm-kona.c
 index 87175f9..bca6d55 100644
 --- a/drivers/mmc/host/sdhci-bcm-kona.c
 +++ b/drivers/mmc/host/sdhci-bcm-kona.c
 @@ -24,7 +24,6 @@
   #include linux/of.h
   #include linux/of_device.h
   #include linux/of_gpio.h
 -#include linux/version.h
   #include linux/mmc/slot-gpio.h
 #include sdhci-pltfm.h

 Acked-by: Christian Daudt c...@broadcom.com

  thanks,
csd


Chris,

Can you please check this series?


-- 
With warm regards,
Sachin
--
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/1] mmc: sdhci-bcm2835: Staticize bcm2835_sdhci_get_min_clock

2013-07-22 Thread Sachin Kamat
On 26 June 2013 11:57, Sachin Kamat sachin.ka...@linaro.org wrote:
 'bcm2835_sdhci_get_min_clock' is used only in this file.
 Make it static.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/sdhci-bcm2835.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci-bcm2835.c 
 b/drivers/mmc/host/sdhci-bcm2835.c
 index 0584a1c..36fa2df 100644
 --- a/drivers/mmc/host/sdhci-bcm2835.c
 +++ b/drivers/mmc/host/sdhci-bcm2835.c
 @@ -119,7 +119,7 @@ static u8 bcm2835_sdhci_readb(struct sdhci_host *host, 
 int reg)
 return byte;
  }

 -unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
 +static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
  {
 return MIN_FREQ;
  }
 --
 1.7.9.5


Ping..

-- 
With warm regards,
Sachin
--
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/1] mmc: vub300: Staticize vub300_init_card

2013-07-22 Thread Sachin Kamat
On 26 June 2013 12:02, Sachin Kamat sachin.ka...@linaro.org wrote:
 'vub300_init_card' is used only in this file. Make it
 static.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/vub300.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
 index cb9f361..e9028ad 100644
 --- a/drivers/mmc/host/vub300.c
 +++ b/drivers/mmc/host/vub300.c
 @@ -2079,7 +2079,7 @@ static void vub300_enable_sdio_irq(struct mmc_host 
 *mmc, int enable)
 kref_put(vub300-kref, vub300_delete);
  }

 -void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
 +static void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
  {  /* NOT irq */
 struct vub300_mmc_host *vub300 = mmc_priv(mmc);
 dev_info(vub300-udev-dev, NO host QUIRKS for this card\n);
 --
 1.7.9.5


Ping..

-- 
With warm regards,
Sachin
--
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/3] mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion

2013-07-19 Thread Sachin Kamat
On 8 July 2013 11:41, Sachin Kamat sachin.ka...@linaro.org wrote:
 version.h header inclusion is not necessary as detected by
 versioncheck.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/sdhci-bcm-kona.c |1 -
  1 file changed, 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci-bcm-kona.c 
 b/drivers/mmc/host/sdhci-bcm-kona.c
 index 87175f9..bca6d55 100644
 --- a/drivers/mmc/host/sdhci-bcm-kona.c
 +++ b/drivers/mmc/host/sdhci-bcm-kona.c
 @@ -24,7 +24,6 @@
  #include linux/of.h
  #include linux/of_device.h
  #include linux/of_gpio.h
 -#include linux/version.h
  #include linux/mmc/slot-gpio.h

  #include sdhci-pltfm.h
 --
 1.7.9.5


Ping on this series.

-- 
With warm regards,
Sachin
--
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/3] mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event

2013-07-08 Thread Sachin Kamat
sdhci_bcm_kona_card_event is referenced only in this file.
Make it static.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/sdhci-bcm-kona.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-bcm-kona.c 
b/drivers/mmc/host/sdhci-bcm-kona.c
index d7a44ae..f59f332 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -161,7 +161,7 @@ static int sdhci_bcm_kona_sd_card_emulate(struct sdhci_host 
*host, int insert)
 /*
  * SD card interrupt event callback
  */
-void sdhci_bcm_kona_card_event(struct sdhci_host *host)
+static void sdhci_bcm_kona_card_event(struct sdhci_host *host)
 {
if (mmc_gpio_get_cd(host-mmc)  0) {
dev_dbg(mmc_dev(host-mmc),
-- 
1.7.9.5

--
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 2/3] mmc: sdhci-bcm-kona: Remove redundant use of_match_ptr

2013-07-08 Thread Sachin Kamat
sdhci_bcm_kona_of_match structure is always compiled in. Hence
of_match_ptr macro is not necessary.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/sdhci-bcm-kona.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-bcm-kona.c 
b/drivers/mmc/host/sdhci-bcm-kona.c
index bca6d55..d7a44ae 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -335,7 +335,7 @@ static struct platform_driver sdhci_bcm_kona_driver = {
.name   = sdhci-kona,
.owner  = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
-   .of_match_table = of_match_ptr(sdhci_bcm_kona_of_match),
+   .of_match_table = sdhci_bcm_kona_of_match,
},
.probe  = sdhci_bcm_kona_probe,
.remove = __exit_p(sdhci_bcm_kona_remove),
-- 
1.7.9.5

--
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/3] mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion

2013-07-08 Thread Sachin Kamat
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/sdhci-bcm-kona.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-bcm-kona.c 
b/drivers/mmc/host/sdhci-bcm-kona.c
index 87175f9..bca6d55 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -24,7 +24,6 @@
 #include linux/of.h
 #include linux/of_device.h
 #include linux/of_gpio.h
-#include linux/version.h
 #include linux/mmc/slot-gpio.h
 
 #include sdhci-pltfm.h
-- 
1.7.9.5

--
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: pxa: propagate errors from regulator_enable() to pxamci

2013-07-07 Thread Sachin Kamat
On 5 July 2013 21:21, Arnd Bergmann a...@arndb.de wrote:
 The em_x270_mci_setpower() and em_x270_usb_hub_init() functions
 call regulator_enable(), which may return an error that must
 be checked.

 This changes the em_x270_usb_hub_init() function to bail out
 if it fails, and changes the pxamci_platform_data-setpower
 callback so that the a failed em_x270_mci_setpower call
 can be propagated by the pxamci driver into the mmc core.

 Signed-off-by: Arnd Bergmann a...@arndb.de
 Cc: Mike Rapoport m...@compulab.co.il
 Cc: Paul Gortmaker paul.gortma...@windriver.com
 Cc: Mark Brown broo...@opensource.wolfsonmicro.com
 Cc: Haojian Zhuang haojian.zhu...@gmail.com
 Cc: Chris Ball c...@laptop.org

 diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
 index f6726bb..f8062e4 100644
 --- a/arch/arm/mach-pxa/em-x270.c
 +++ b/arch/arm/mach-pxa/em-x270.c
 @@ -477,16 +477,24 @@ static int em_x270_usb_hub_init(void)
 /* USB Hub power-on and reset */
 gpio_direction_output(usb_hub_reset, 1);
 gpio_direction_output(GPIO9_USB_VBUS_EN, 0);
 -   regulator_enable(em_x270_usb_ldo);
 +   err = regulator_enable(em_x270_usb_ldo);
 +   if (err)
 +   goto err_free_rst_gpio;
 +
 gpio_set_value(usb_hub_reset, 0);
 gpio_set_value(usb_hub_reset, 1);
 regulator_disable(em_x270_usb_ldo);
 -   regulator_enable(em_x270_usb_ldo);
 +   if (err)
 +   goto err_free_rst_gpio;

Shouldn't this check be after the below (regulator_enable) statement?

 +
 +   err = regulator_enable(em_x270_usb_ldo);
 gpio_set_value(usb_hub_reset, 0);
 gpio_set_value(GPIO9_USB_VBUS_EN, 1);

 return 0;

 +err_free_rst_gpio:
 +   gpio_free(usb_hub_reset);
  err_free_vbus_gpio:
 gpio_free(GPIO9_USB_VBUS_EN);
  err_free_usb_ldo:
 @@ -592,7 +600,7 @@ err_irq:
 return err;
  }

-- 
With warm regards,
Sachin
--
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: sdhci-sirf: Fix build breakage

2013-06-18 Thread Sachin Kamat
Commit 0e74823429 (mmc: sdhci: Add size for caller in init+register)
introduced size parameter to sdhci_pltfm_init(). This driver probably
got left out during the conversion. Passing in zero as done for other
drivers to avoid the following build error:

drivers/mmc/host/sdhci-sirf.c: In function ‘sdhci_sirf_probe’:
drivers/mmc/host/sdhci-sirf.c:78:2: error: too few arguments to function
‘sdhci_pltfm_init’
  host = sdhci_pltfm_init(pdev, sdhci_sirf_pdata);

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Christian Daudt c...@broadcom.com
Cc: Barry Song baohua.s...@csr.com
---
Compile tested on linux-next (20130618)
---
 drivers/mmc/host/sdhci-sirf.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-sirf.c b/drivers/mmc/host/sdhci-sirf.c
index 09805af..1a149eb 100644
--- a/drivers/mmc/host/sdhci-sirf.c
+++ b/drivers/mmc/host/sdhci-sirf.c
@@ -75,7 +75,7 @@ static int sdhci_sirf_probe(struct platform_device *pdev)
priv-gpio_cd = -EINVAL;
}
 
-   host = sdhci_pltfm_init(pdev, sdhci_sirf_pdata);
+   host = sdhci_pltfm_init(pdev, sdhci_sirf_pdata, 0);
if (IS_ERR(host)) {
ret = PTR_ERR(host);
goto err_sdhci_pltfm_init;
-- 
1.7.9.5

--
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 v2 1/2] mmc: dw_mmc: Check return value of regulator_enable

2013-04-04 Thread Sachin Kamat
regulator_enable() is declared with __must_check attribute.
Hence check the return value to ensure that the regulator is enabled.
Fixes the following warning:
drivers/mmc/host/dw_mmc.c:2461:19: warning:
ignoring return value of ‘regulator_enable’, declared with attribute
warn_unused_result [-Wunused-result]
drivers/mmc/host/dw_mmc.c: In function ‘dw_mci_init_slot’:
drivers/mmc/host/dw_mmc.c:1994:19: warning:
ignoring return value of ‘regulator_enable’, declared with attribute
warn_unused_result [-Wunused-result]

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
---
Changes since v1:
Changed 'if (ret != 0)' to 'if (ret)'
---
 drivers/mmc/host/dw_mmc.c |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a443820..4e3ebff 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1990,8 +1990,14 @@ static int dw_mci_init_slot(struct dw_mci *host, 
unsigned int id)
if (IS_ERR(host-vmmc)) {
pr_info(%s: no vmmc regulator found\n, mmc_hostname(mmc));
host-vmmc = NULL;
-   } else
-   regulator_enable(host-vmmc);
+   } else {
+   ret = regulator_enable(host-vmmc);
+   if (ret) {
+   dev_err(host-dev,
+   failed to enable regulator: %d\n, ret);
+   goto err_setup_bus;
+   }
+   }
 
if (dw_mci_get_cd(mmc))
set_bit(DW_MMC_CARD_PRESENT, slot-flags);
@@ -2457,8 +2463,14 @@ int dw_mci_resume(struct dw_mci *host)
 {
int i, ret;
 
-   if (host-vmmc)
-   regulator_enable(host-vmmc);
+   if (host-vmmc) {
+   ret = regulator_enable(host-vmmc);
+   if (ret) {
+   dev_err(host-dev,
+   failed to enable regulator: %d\n, ret);
+   return ret;
+   }
+   }
 
if (!mci_wait_reset(host-dev, host)) {
ret = -ENODEV;
-- 
1.7.9.5

--
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 v2 2/2] mmc: dw_mmc: Use pr_info instead of printk

2013-04-04 Thread Sachin Kamat
pr_info(... is preferred to printk(KERN_INFO ...

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Acked-by: Seungwon Jeon tgih@samsung.com
---
No change since v1
---
 drivers/mmc/host/dw_mmc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 4e3ebff..84f4464 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2509,7 +2509,7 @@ EXPORT_SYMBOL(dw_mci_resume);
 
 static int __init dw_mci_init(void)
 {
-   printk(KERN_INFO Synopsys Designware Multimedia Card Interface 
Driver);
+   pr_info(Synopsys Designware Multimedia Card Interface Driver\n);
return 0;
 }
 
-- 
1.7.9.5

--
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/2] mmc: dw_mmc: Check return value of regulator_enable

2013-04-03 Thread Sachin Kamat
On 4 April 2013 11:19, Seungwon Jeon tgih@samsung.com wrote:
 On Thursday, March 28, 2013, Sachin Kamat wrote:
 regulator_enable() is declared with __must_check attribute.
 Hence check the return value to ensure that the regulator is enabled.
 Fixes the following warning:
 drivers/mmc/host/dw_mmc.c:2461:19: warning:
 ignoring return value of ‘regulator_enable’, declared with attribute
 warn_unused_result [-Wunused-result]
 drivers/mmc/host/dw_mmc.c: In function ‘dw_mci_init_slot’:
 drivers/mmc/host/dw_mmc.c:1994:19: warning:
 ignoring return value of ‘regulator_enable’, declared with attribute
 warn_unused_result [-Wunused-result]

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/mmc/host/dw_mmc.c |   20 
  1 files changed, 16 insertions(+), 4 deletions(-)

 diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
 index a443820..1ba09d0 100644
 --- a/drivers/mmc/host/dw_mmc.c
 +++ b/drivers/mmc/host/dw_mmc.c
 @@ -1990,8 +1990,14 @@ static int dw_mci_init_slot(struct dw_mci *host, 
 unsigned int id)
   if (IS_ERR(host-vmmc)) {
   pr_info(%s: no vmmc regulator found\n, mmc_hostname(mmc));
   host-vmmc = NULL;
 - } else
 - regulator_enable(host-vmmc);
 + } else {
 + ret = regulator_enable(host-vmmc);
 + if (ret != 0) {
 Just for trivial style... if (ret) {
 It looks like more simple?

Ok. I will resend with this change.


 + dev_err(host-dev,
 + failed to enable regulator: %d\n, ret);
 + goto err_setup_bus;
 + }
 + }

   if (dw_mci_get_cd(mmc))
   set_bit(DW_MMC_CARD_PRESENT, slot-flags);
 @@ -2457,8 +2463,14 @@ int dw_mci_resume(struct dw_mci *host)
  {
   int i, ret;

 - if (host-vmmc)
 - regulator_enable(host-vmmc);
 + if (host-vmmc) {
 + ret = regulator_enable(host-vmmc);
 + if (ret != 0) {
 As above,

 Thanks,
 Seungwon Jeon
 + dev_err(host-dev,
 + failed to enable regulator: %d\n, ret);
 + return ret;
 + }
 + }

   if (!mci_wait_reset(host-dev, host)) {
   ret = -ENODEV;
 --
 1.7.4.1

 --
 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




-- 
With warm regards,
Sachin
--
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 Resend 2/2] mmc: dw_mmc: Use pr_info instead of printk

2013-03-28 Thread Sachin Kamat
pr_info(... is preferred to printk(KERN_INFO ...

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
---
 drivers/mmc/host/dw_mmc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1ba09d0..870d311 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2509,7 +2509,7 @@ EXPORT_SYMBOL(dw_mci_resume);
 
 static int __init dw_mci_init(void)
 {
-   printk(KERN_INFO Synopsys Designware Multimedia Card Interface 
Driver);
+   pr_info(Synopsys Designware Multimedia Card Interface Driver\n);
return 0;
 }
 
-- 
1.7.4.1

--
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/2] mmc: dw_mmc: Check return value of regulator_enable

2013-03-27 Thread Sachin Kamat
regulator_enable() is declared with __must_check attribute.
Hence check the return value to ensure that the regulator is enabled.
Fixes the following warning:
drivers/mmc/host/dw_mmc.c:2461:19: warning:
ignoring return value of ‘regulator_enable’, declared with attribute
warn_unused_result [-Wunused-result]
drivers/mmc/host/dw_mmc.c: In function ‘dw_mci_init_slot’:
drivers/mmc/host/dw_mmc.c:1994:19: warning:
ignoring return value of ‘regulator_enable’, declared with attribute
warn_unused_result [-Wunused-result]

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc.c |   20 
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a443820..1ba09d0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1990,8 +1990,14 @@ static int dw_mci_init_slot(struct dw_mci *host, 
unsigned int id)
if (IS_ERR(host-vmmc)) {
pr_info(%s: no vmmc regulator found\n, mmc_hostname(mmc));
host-vmmc = NULL;
-   } else
-   regulator_enable(host-vmmc);
+   } else {
+   ret = regulator_enable(host-vmmc);
+   if (ret != 0) {
+   dev_err(host-dev,
+   failed to enable regulator: %d\n, ret);
+   goto err_setup_bus;
+   }
+   }
 
if (dw_mci_get_cd(mmc))
set_bit(DW_MMC_CARD_PRESENT, slot-flags);
@@ -2457,8 +2463,14 @@ int dw_mci_resume(struct dw_mci *host)
 {
int i, ret;
 
-   if (host-vmmc)
-   regulator_enable(host-vmmc);
+   if (host-vmmc) {
+   ret = regulator_enable(host-vmmc);
+   if (ret != 0) {
+   dev_err(host-dev,
+   failed to enable regulator: %d\n, ret);
+   return ret;
+   }
+   }
 
if (!mci_wait_reset(host-dev, host)) {
ret = -ENODEV;
-- 
1.7.4.1

--
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 2/2] mmc: dw_mmc: Use pr_info instead of printk

2013-03-27 Thread Sachin Kamat
pr_info(... is preferred to printk(KERN_INFO ...

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/mmc/host/dw_mmc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1ba09d0..b8582d0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2509,7 +2509,7 @@ EXPORT_SYMBOL(dw_mci_resume);
 
 static int __init dw_mci_init(void)
 {
-   printk(KERN_INFO Synopsys Designware Multimedia Card Interface 
Driver);
+   pr_info(Synopsys Designware Multimedia Card Interface Driver);
return 0;
 }
 
-- 
1.7.4.1

--
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 2/2] mmc: dw_mmc: exynos: Remove unnecessary use of of_match_ptr()

2013-03-20 Thread Sachin Kamat
On 13 March 2013 21:05, Sachin Kamat sachin.ka...@linaro.org wrote:
 Hi Chris,

 On 13 March 2013 19:47, Seungwon Jeon tgih@samsung.com wrote:
 On Monday, February 18, 2013, Sachin Kamat wrote:
 'dw_mci_exynos_match' is always compiled in. Hence of_match_ptr
 is not required.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org

 Acked-by: Seungwon Jeon tgih@samsung.com


 Here are the required Ack's for you to apply the patch :)


ping Chris.



-- 
With warm regards,
Sachin
--
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


  1   2   >