From: Dinh Nguyen <dinh.linux@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: dinguyen@altera.com, linux-arm-kernel@lists.infradead.org,
Seungwon Jeon <tgih.jun@samsung.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Olof Johansson <olof@lixom.net>, Pavel Machek <pavel@denx.de>,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH 5/5] mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA
Date: Wed, 15 May 2013 11:40:12 -0500 [thread overview]
Message-ID: <5193BA6C.2050406@gmail.com> (raw)
In-Reply-To: <201305151525.50005.arnd@arndb.de>
Hi Arnd,
Thanks for the review.
On 05/15/2013 08:25 AM, Arnd Bergmann wrote:
> On Wednesday 15 May 2013, dinguyen@altera.com wrote:
>> +
>> +#define SYSMGR_SDMMCGRP_CTRL_OFFSET 0x108
>> +#define DRV_CLK_PHASE_SHIFT_SEL_MASK 0x7
>> +#define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \
>> + ((((drvsel) << 0) & 0x7) | (((smplsel) << 3) & 0x38))
>> +
>> +extern void __iomem *sys_manager_base_addr;
>
> This is not acceptable, you cannot just reference external symbols
> from one driver in another, without a proper interface.
>
> Please explain what the functionality is that you need here, then
> we can help you find the proper interface. My guess is that you
> need either the functionality provided by drivers/reset/
> or drivers/mfd/syscon.c.
Our implementation has the timing controls for the SD/MMC controller in
another custom IP block(system manager). sys_manager_base_addr was
mapped in mach-socfpga/socfpga.c. I saw the same approach with
drivers/clk(clk_mgr_base_addr), so I thought it would be ok with this
driver. Please advise on another way to do this...
>
>> + if (of_property_read_u32(dev->of_node, "pwr-en", &pwr_en)) {
>> + dev_info(dev, "couldn't determine pwr-en, assuming pwr-en = 0\n");
>> + pwr_en = 0;
>> + }
>> +
>> + /* Set PWREN bit */
>> + mci_writel(host, PWREN, pwr_en);
>
> If you add new properties, you have to document them in
> Documentations/devicetree/bindings/*.
>
> What is the requirement for this property? Is there no way to
> automatically power the card on/off using the normal
> dw_mci_set_ios function?
Apologies...it wasn't there in 3.8. I will fix...
Thanks,
Dinh
>
> The rest of this patch looks ok to me.
>
> Arnd
>
WARNING: multiple messages have this Message-ID (diff)
From: dinh.linux@gmail.com (Dinh Nguyen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA
Date: Wed, 15 May 2013 11:40:12 -0500 [thread overview]
Message-ID: <5193BA6C.2050406@gmail.com> (raw)
In-Reply-To: <201305151525.50005.arnd@arndb.de>
Hi Arnd,
Thanks for the review.
On 05/15/2013 08:25 AM, Arnd Bergmann wrote:
> On Wednesday 15 May 2013, dinguyen at altera.com wrote:
>> +
>> +#define SYSMGR_SDMMCGRP_CTRL_OFFSET 0x108
>> +#define DRV_CLK_PHASE_SHIFT_SEL_MASK 0x7
>> +#define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \
>> + ((((drvsel) << 0) & 0x7) | (((smplsel) << 3) & 0x38))
>> +
>> +extern void __iomem *sys_manager_base_addr;
>
> This is not acceptable, you cannot just reference external symbols
> from one driver in another, without a proper interface.
>
> Please explain what the functionality is that you need here, then
> we can help you find the proper interface. My guess is that you
> need either the functionality provided by drivers/reset/
> or drivers/mfd/syscon.c.
Our implementation has the timing controls for the SD/MMC controller in
another custom IP block(system manager). sys_manager_base_addr was
mapped in mach-socfpga/socfpga.c. I saw the same approach with
drivers/clk(clk_mgr_base_addr), so I thought it would be ok with this
driver. Please advise on another way to do this...
>
>> + if (of_property_read_u32(dev->of_node, "pwr-en", &pwr_en)) {
>> + dev_info(dev, "couldn't determine pwr-en, assuming pwr-en = 0\n");
>> + pwr_en = 0;
>> + }
>> +
>> + /* Set PWREN bit */
>> + mci_writel(host, PWREN, pwr_en);
>
> If you add new properties, you have to document them in
> Documentations/devicetree/bindings/*.
>
> What is the requirement for this property? Is there no way to
> automatically power the card on/off using the normal
> dw_mci_set_ios function?
Apologies...it wasn't there in 3.8. I will fix...
Thanks,
Dinh
>
> The rest of this patch looks ok to me.
>
> Arnd
>
next prev parent reply other threads:[~2013-05-15 16:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 22:52 [PATCH 1/5] ARM: socfpga: dts: Add ethernet bindings for SOCFPGA dinguyen at altera.com
2013-05-14 22:52 ` [PATCH 2/5] ARM: socfpga: dts: Add gate-clock bindings dinguyen at altera.com
2013-05-15 13:06 ` Pavel Machek
2013-05-14 22:52 ` [PATCH 3/5] ARM: socfpga: Add support to gate peripheral clocks dinguyen at altera.com
2013-05-15 13:58 ` Pavel Machek
2013-05-14 22:52 ` [PATCH 4/5] ARM: socfpga: dts: Add support for SD/MMC dinguyen at altera.com
2013-05-15 13:05 ` Pavel Machek
2013-05-14 22:52 ` [PATCH 5/5] mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA dinguyen
2013-05-14 22:52 ` dinguyen at altera.com
2013-05-15 4:28 ` Jaehoon Chung
2013-05-15 4:28 ` Jaehoon Chung
2013-05-15 16:27 ` Dinh Nguyen
2013-05-15 16:27 ` Dinh Nguyen
2013-05-15 13:25 ` Arnd Bergmann
2013-05-15 13:25 ` Arnd Bergmann
2013-05-15 16:40 ` Dinh Nguyen [this message]
2013-05-15 16:40 ` Dinh Nguyen
2013-05-15 17:11 ` Arnd Bergmann
2013-05-15 17:11 ` Arnd Bergmann
2013-05-15 19:18 ` Dinh Nguyen
2013-05-15 19:18 ` Dinh Nguyen
2013-05-15 12:43 ` [PATCH 1/5] ARM: socfpga: dts: Add ethernet bindings for SOCFPGA Pavel Machek
2013-05-15 16:44 ` Dinh Nguyen
2013-05-15 13:19 ` Arnd Bergmann
2013-05-15 16:44 ` Dinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5193BA6C.2050406@gmail.com \
--to=dinh.linux@gmail.com \
--cc=arnd@arndb.de \
--cc=dinguyen@altera.com \
--cc=jh80.chung@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=pavel@denx.de \
--cc=tgih.jun@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.