All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7] mmc: atmel_sdhci: Convert to the driver model support
Date: Fri, 22 Jul 2016 13:00:13 +0900	[thread overview]
Message-ID: <57919A4D.3070407@samsung.com> (raw)
In-Reply-To: <CAPnjgZ3fr2j_hF6a6oWhU9iRaGxe0dWY8mMK8sG5n1mY8n4fHg@mail.gmail.com>

On 07/22/2016 12:21 PM, Simon Glass wrote:
> Hi,
> 
> On 20 July 2016 at 22:16, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> Hi Wenyuo,
>>
>> On 07/20/2016 07:04 PM, Wenyou Yang wrote:
>>> Convert the driver to the driver model while retaining the existing
>>> legacy code. This allows the driver to support boards that have
>>> converted to driver model as well as those that have not.
>>>
>>> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
>>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>
>>> Changes in v7:
>>>  - Add support for using driver model for block devices and MMC operations.
>>>  - Change clk_client.h -> clk.h to adapt to clk API conversion.
>>>
>>> Changes in v6:
>>>  - Remove unnecessary white space.
>>>  - Use sdhci_read(), instead of readl().
>>>  - Remove the local variables min_clk.
>>>
>>> Changes in v5:
>>>  - Add Reviewed-by tag.
>>>
>>> Changes in v4:
>>>  - Update the clk API based on [PATCH] clk: convert API to match
>>>    reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>>>  - Remove check on dev_get_parent() return.
>>>  - Fixed the return value, such as -ENODEV->-EINVAL.
>>>
>>> Changes in v3:
>>>  - Remove the redundant log print.
>>>
>>> Changes in v2:
>>>  - Add clock support, include enabling peripheral clock and
>>>    generated clock.
>>>  - Retain the existing legacy code to support boards which have not
>>>    converted to driver model.
>>>
>>>  drivers/mmc/Kconfig       |  10 ++++
>>>  drivers/mmc/atmel_sdhci.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++
>>>  include/sdhci.h           |   2 +
>>>  3 files changed, 137 insertions(+)
>>>
>>> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
>>> index 79cf18f..49b325e 100644
>>> --- a/drivers/mmc/Kconfig
>>> +++ b/drivers/mmc/Kconfig
>>> @@ -34,6 +34,16 @@ config MSM_SDHCI
>>>            SD 3.0 specifications. Both SD and eMMC devices are supported.
>>>         Card-detect gpios are not supported.
>>>
>>> +config ATMEL_SDHCI
>>> +     bool "Atmel SDHCI controller support"
>>> +     depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_AT91
>>> +     help
>>> +       This enables support for the Atmel SDHCI controller, which supports
>>> +       the embedded MultiMedia Card (e.MMC) Specification V4.51, the SD
>>> +       Memory Card Specification V3.0, and the SDIO V3.0 specification.
>>> +       It is compliant with the SD Host Controller Standard V3.0
>>> +       specification.
>>> +
>>>  config ROCKCHIP_DWMMC
>>>       bool "Rockchip SD/MMC controller support"
>>>       depends on DM_MMC && OF_CONTROL
>>> diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
>>> index 24b68b6..977f6ef 100644
>>> --- a/drivers/mmc/atmel_sdhci.c
>>> +++ b/drivers/mmc/atmel_sdhci.c
>>> @@ -6,12 +6,15 @@
>>>   */
>>>
>>>  #include <common.h>
>>> +#include <clk.h>
>>> +#include <dm.h>
>>
>> If it doesn't use DM_MMC, then doesn't it need to include dm.h?
> 
> Please don't put #idefs around header files, particularly this one. It
> just clutters the code. We can put logic in header files if needed.
> Eventually most files will include dm.h.

Agreed! Thanks for explanation.

Best Regards,
Jaehoon Chung

> 
>>
>>>  #include <malloc.h>
>>>  #include <sdhci.h>
>>>  #include <asm/arch/clk.h>
>>>
>>>  #define ATMEL_SDHC_MIN_FREQ  400000
> 
> Regards,
> Simon
> 
> 
> 

  reply	other threads:[~2016-07-22  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20160720101618epcas1p12e6a42e8898dcd45b3250df406127f44@epcas1p1.samsung.com>
2016-07-20 10:04 ` [U-Boot] [PATCH v7] mmc: atmel_sdhci: Convert to the driver model support Wenyou Yang
2016-07-21  4:16   ` Jaehoon Chung
2016-07-22  3:21     ` Simon Glass
2016-07-22  4:00       ` Jaehoon Chung [this message]
2016-07-25 10:14     ` Wenyou.Yang at microchip.com

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=57919A4D.3070407@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=u-boot@lists.denx.de \
    /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.