From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] mmc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller.
Date: Tue, 12 May 2015 20:39:42 +0200 [thread overview]
Message-ID: <201505122039.42587.marex@denx.de> (raw)
In-Reply-To: <1431437912-18988-6-git-send-email-peter.griffin@linaro.org>
On Tuesday, May 12, 2015 at 03:38:31 PM, Peter Griffin wrote:
> This patch adds the glue code for hi6220 SoC which has 2x synopsis
> dw_mmc controllers. This will be used by the hikey board support
> in subsequent patches.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
[...]
> diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
> new file mode 100644
> index 0000000..a3880a3
> --- /dev/null
> +++ b/drivers/mmc/hi6220_dw_mmc.c
> @@ -0,0 +1,63 @@
> +/*
> + * (C) Copyright 2015 Linaro
> + * peter.griffin <peter.griffin@linaro.org>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <dwmmc.h>
> +#include <malloc.h>
> +#include <asm-generic/errno.h>
> +
> +#define DWMMC_MAX_CH_NUM 4
> +
> +/*
> +#define DWMMC_MAX_FREQ 52000000
> +#define DWMMC_MIN_FREQ 400000
> +*/
Please zap these dead macros.
> +/*TODO we should probably use the frequencies above, but ATF uses
> + the ones below so stick with that for the moment */
> +#define DWMMC_MAX_FREQ 50000000
> +#define DWMMC_MIN_FREQ 378000
> +
> +/* Source clock is configured to 100Mhz by ATF bl1*/
> +#define MMC0_DEFAULT_FREQ 100000000
[...]
> +int hi6220_dwmci_add_port(int index, u32 regbase, int bus_width)
> +{
> + struct dwmci_host *host = NULL;
> +
> + host = malloc(sizeof(struct dwmci_host));
calloc(1, sizeof(...)) so the data are inited/zero'd out please.
[...]
next prev parent reply other threads:[~2015-05-12 18:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1431437912-18988-1-git-send-email-peter.griffin@linaro.org>
[not found] ` <1431437912-18988-2-git-send-email-peter.griffin@linaro.org>
2015-05-12 18:30 ` [U-Boot] [PATCH 1/6] usb: dwc2: Add support for v3 snpsid value Marek Vasut
2015-05-13 11:00 ` Peter Griffin
2015-05-13 20:05 ` Marek Vasut
[not found] ` <1431437912-18988-3-git-send-email-peter.griffin@linaro.org>
2015-05-12 18:36 ` [U-Boot] [PATCH 2/6] dm: gpio: hi6220: Add a hi6220 GPIO driver model driver Marek Vasut
2015-05-12 19:08 ` Tom Rini
2015-05-13 12:00 ` Peter Griffin
2015-05-13 20:01 ` Marek Vasut
[not found] ` <1431437912-18988-6-git-send-email-peter.griffin@linaro.org>
2015-05-12 18:39 ` Marek Vasut [this message]
2015-05-13 12:10 ` [U-Boot] [PATCH 5/6] mmc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller Peter Griffin
2015-05-12 13:25 [U-Boot] [PATCH 0/6] Add support for hi6220 SoC and HiKey 96boards CE board Peter Griffin
2015-05-12 13:25 ` [U-Boot] [PATCH 5/6] mmc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller Peter Griffin
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=201505122039.42587.marex@denx.de \
--to=marex@denx.de \
--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