From: Dinh Nguyen <dinh.linux@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
Seungwon Jeon <tgih.jun@samsung.com>,
Pavel Machek <pavel@denx.de>,
linux-mmc@vger.kernel.org, Jaehoon Chung <jh80.chung@samsung.com>,
dinguyen@altera.com, Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 5/5] mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA
Date: Wed, 15 May 2013 14:18:51 -0500 [thread overview]
Message-ID: <5193DF9B.8030504@gmail.com> (raw)
In-Reply-To: <5336483.qTzEF54m2z@wuerfel>
Hi Arnd,
On 05/15/2013 12:11 PM, Arnd Bergmann wrote:
> On Wednesday 15 May 2013 11:40:12 Dinh Nguyen wrote:
>> 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...
>
> The clock code is tied more more closely to the platform code, so I
> was turning a blind eye on that one, under the assumption that it
> was only used there.
I think I can use the syscon interface for this. Thanks for the pointer.
I kinda thought that these dw_mmc-<platform> is platform specific
enough, but I will go the syscon route.
Dinh
>
> Arnd
>
prev parent reply other threads:[~2013-05-15 19:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1368571955-6652-1-git-send-email-dinguyen@altera.com>
2013-05-14 22:52 ` [PATCH 5/5] mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA dinguyen
2013-05-15 4:28 ` Jaehoon Chung
2013-05-15 16:27 ` Dinh Nguyen
2013-05-15 13:25 ` Arnd Bergmann
2013-05-15 16:40 ` Dinh Nguyen
2013-05-15 17:11 ` Arnd Bergmann
2013-05-15 19:18 ` Dinh Nguyen [this message]
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=5193DF9B.8030504@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).