From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] mmc: tangier: Add Intel Tangier eMMC/SDHCI driver
Date: Wed, 15 Feb 2017 09:54:45 +0200 [thread overview]
Message-ID: <878tp7q46y.fsf@linux.intel.com> (raw)
In-Reply-To: <9f080cbc-81cb-9777-fcaf-41f59bbdfcbf@samsung.com>
Hi,
Jaehoon Chung <jh80.chung@samsung.com> writes:
> Hi Andy,
>
> On 02/14/2017 11:18 PM, Andy Shevchenko wrote:
>> From: Felipe Balbi <felipe.balbi@linux.intel.com>
>>
>> This patch adds Intel Tangier eMMC/SDHCI driver.
>>
>> Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
>> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>> drivers/mmc/Kconfig | 5 ++++
>> drivers/mmc/Makefile | 1 +
>> drivers/mmc/tangier_sdhci.c | 73 +++++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 79 insertions(+)
>> create mode 100644 drivers/mmc/tangier_sdhci.c
>>
>> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
>> index 01d1dbfb1b..42a44f9888 100644
>> --- a/drivers/mmc/Kconfig
>> +++ b/drivers/mmc/Kconfig
>> @@ -310,6 +310,11 @@ config MMC_SDHCI_XENON
>>
>> If unsure, say N.
>>
>> +config MMC_SDHCI_TANGIER
>> + bool "Tangier SDHCI controller supprt"
>> + depends on DM_MMC && BLK && DM_MMC_OPS
>
> DM_MMC_OPS is enabled by default when DM_MMC is enabled.
removed from dependency list
>> diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
>> index ef27d55088..019b587441 100644
>> --- a/drivers/mmc/Makefile
>> +++ b/drivers/mmc/Makefile
>> @@ -63,6 +63,7 @@ obj-$(CONFIG_MMC_SDHCI_PIC32) += pic32_sdhci.o
>> obj-$(CONFIG_MMC_SDHCI_ROCKCHIP) += rockchip_sdhci.o
>> obj-$(CONFIG_MMC_SDHCI_S5P) += s5p_sdhci.o
>> obj-$(CONFIG_MMC_SDHCI_SPEAR) += spear_sdhci.o
>> +obj-$(CONFIG_MMC_SDHCI_TANGIER) += tangier_sdhci.o
>> obj-$(CONFIG_MMC_SDHCI_TEGRA) += tegra_mmc.o
>> obj-$(CONFIG_MMC_SDHCI_XENON) += xenon_sdhci.o
>> obj-$(CONFIG_MMC_SDHCI_ZYNQ) += zynq_sdhci.o
>> diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c
>> new file mode 100644
>> index 0000000000..6a8a6270a9
>> --- /dev/null
>> +++ b/drivers/mmc/tangier_sdhci.c
>> @@ -0,0 +1,73 @@
>> +#include <common.h>
>> +#include <linux/io.h>
>> +#include <linux/sizes.h>
>> +#include <mmc.h>
>> +#include <dm.h>
>> +#include <dm/device.h>
>> +#include <malloc.h>
>> +#include <sdhci.h>
>
> Ordering.
sorted
>> +static int sdhci_tangier_probe(struct udevice *dev)
>> +{
>> + struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
>> + struct sdhci_tangier_plat *plat = dev_get_platdata(dev);
>> + struct sdhci_host *host = dev_get_priv(dev);
>> + fdt_addr_t base;
>> + int ret;
>> +
>> + base = dev_get_addr(dev);
>> + if (base == FDT_ADDR_T_NONE)
>> + return -EINVAL;
>> +
>> + plat->ioaddr = devm_ioremap(dev, base, SZ_1K);
>> + if (!plat->ioaddr)
>> + return -ENOMEM;
>> +
>> + host->name = dev->name;
>> + host->ioaddr = plat->ioaddr;
>> + host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
>> + SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
>> + SDHCI_QUIRK_WAIT_SEND_CMD;
>
> I really wonder whether BROKEN_R1B is need.
>
> commit 17ea3c862865c0d704646f67dbf8412f9ff54f59
> Refs: v2016.09-rc1-248-g17ea3c8
> Author: Jaehoon Chung <jh80.chung@samsung.com>
> AuthorDate: Tue Jul 12 21:18:46 2016 +0900
> Commit: Jaehoon Chung <jh80.chung@samsung.com>
> CommitDate: Fri Aug 5 11:21:24 2016 +0900
>
> mmc: sdhci: set to INT_DATA_END when there are data
>
> http://git.denx.de/?p=u-boot/u-boot-mmc.git;a=commitdiff;h=17ea3c862865c0d704646f67dbf8412f9ff54f59
>
> I'm thinking this patch might be fixed about broken R1b.
> Actually, i want to remove SDHCI_QUIRK_BROKEN_R1B..
yeah, worked just fine without it.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170215/13a7a749/attachment.sig>
prev parent reply other threads:[~2017-02-15 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170214142004epcas5p147b304baae093c9fc7244961bbdcc20e@epcas5p1.samsung.com>
2017-02-14 14:18 ` [U-Boot] [PATCH v1] mmc: tangier: Add Intel Tangier eMMC/SDHCI driver Andy Shevchenko
2017-02-15 3:59 ` Jaehoon Chung
2017-02-15 7:54 ` Felipe Balbi [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=878tp7q46y.fsf@linux.intel.com \
--to=felipe.balbi@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox