linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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 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 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...
> 
> 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
> 

  reply	other threads:[~2013-05-15 19:18 UTC|newest]

Thread overview: 18+ 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 at altera.com
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]
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=5193DF9B.8030504@gmail.com \
    --to=dinh.linux@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).