All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@st.com>
To: Peter Griffin <peter.griffin@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, patrice.chotard@st.com,
	srinivas.kandagatla@gmail.com, chris@printf.net,
	ulf.hansson@linaro.org
Cc: lee.jones@linaro.org, devicetree@vger.kernel.org,
	linux-mmc@vger.kernel.org, peppe.cavallaro@st.com
Subject: Re: [PATCH v2 1/8] mmc: sdhci-st: Add macros for register offsets and bitfields for mmcss glue regs
Date: Tue, 3 Mar 2015 11:24:45 +0100	[thread overview]
Message-ID: <54F58BED.4020900@st.com> (raw)
In-Reply-To: <1424956227-18258-2-git-send-email-peter.griffin@linaro.org>

Hi Peter,

On 02/26/2015 02:10 PM, Peter Griffin wrote:
> The stih407 family SoC's have additional glue registers in the flashSS which
> are used to configure the Arasan controller.
>
> This patch adds macros for the register offsets and bitfields which will be used by
> subsequent patches to support stih407 family SoC's.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
>   drivers/mmc/host/sdhci-st.c | 91 +++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 91 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
> index 882b07e..a3bc3c3 100644
> --- a/drivers/mmc/host/sdhci-st.c
> +++ b/drivers/mmc/host/sdhci-st.c
> @@ -26,6 +26,97 @@
>   
>   #include "sdhci-pltfm.h"
>   
> +/* MMCSS glue logic to setup the HC on some ST SoCs (e.g. STiH407 family) */
> +
> +#define	ST_MMC_CCONFIG_REG_1		0x400
Maybe my mail client, but I see a tab instead of a space after #define.
> +#define ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT	BIT(24)
> +#define ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ	BIT(12)
> +#define ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT	BIT(8)
> +#define ST_MMC_CCONFIG_ASYNC_WAKEUP	BIT(0)
> +#define ST_MMC_CCONFIG_1_DEFAULT	\
> +				((ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT) | \
> +				 (ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ) | \
> +				 (ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT))
> +
> +#define ST_MMC_CCONFIG_REG_2		0x404
> +#define ST_MMC_CCONFIG_HIGH_SPEED	BIT(28)
> +#define ST_MMC_CCONFIG_ADMA2		BIT(24)
> +#define ST_MMC_CCONFIG_8BIT		BIT(20)
> +#define ST_MMC_CCONFIG_MAX_BLK_LEN	16
> +#define  MAX_BLK_LEN_1024		1
> +#define  MAX_BLK_LEN_2048		2
> +#define BASE_CLK_FREQ_200		0xc8
> +#define BASE_CLK_FREQ_100		0x64
> +#define BASE_CLK_FREQ_50		0x32
> +#define ST_MMC_CCONFIG_2_DEFAULT \
> +	(ST_MMC_CCONFIG_HIGH_SPEED | ST_MMC_CCONFIG_ADMA2 | \
> +	 ST_MMC_CCONFIG_8BIT | \
> +	 (MAX_BLK_LEN_1024 << ST_MMC_CCONFIG_MAX_BLK_LEN))
> +
> +#define ST_MMC_CCONFIG_REG_3			0x408
> +#define ST_MMC_CCONFIG_EMMC_SLOT_TYPE		BIT(28)
> +#define ST_MMC_CCONFIG_64BIT			BIT(24)
> +#define ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT	BIT(20)
> +#define ST_MMC_CCONFIG_1P8_VOLT			BIT(16)
> +#define ST_MMC_CCONFIG_3P0_VOLT			BIT(12)
> +#define ST_MMC_CCONFIG_3P3_VOLT			BIT(8)
> +#define ST_MMC_CCONFIG_SUSP_RES_SUPPORT		BIT(4)
> +#define ST_MMC_CCONFIG_SDMA			BIT(0)
> +#define ST_MMC_CCONFIG_3_DEFAULT	\
> +			 (ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT	| \
> +			  ST_MMC_CCONFIG_3P3_VOLT		| \
> +			  ST_MMC_CCONFIG_SUSP_RES_SUPPORT	| \
> +			  ST_MMC_CCONFIG_SDMA)
> +
> +#define ST_MMC_CCONFIG_REG_4	0x40c
> +#define ST_MMC_CCONFIG_D_DRIVER	BIT(20)
> +#define ST_MMC_CCONFIG_C_DRIVER	BIT(16)
> +#define ST_MMC_CCONFIG_A_DRIVER	BIT(12)
> +#define ST_MMC_CCONFIG_DDR50	BIT(8)
> +#define ST_MMC_CCONFIG_SDR104	BIT(4)
> +#define ST_MMC_CCONFIG_SDR50	BIT(0)
> +#define ST_MMC_CCONFIG_4_DEFAULT	0
> +
> +#define ST_MMC_CCONFIG_REG_5		0x410
> +#define ST_MMC_CCONFIG_TUNING_FOR_SDR50	BIT(8)
> +#define RETUNING_TIMER_CNT_MAX		0xf
> +#define ST_MMC_CCONFIG_5_DEFAULT	0
> +
> +/* I/O configuration for Arasan IP */
> +#define	ST_MMC_GP_OUTPUT	0x450
Same Here.

Best regards,
Maxime

WARNING: multiple messages have this Message-ID (diff)
From: maxime.coquelin@st.com (Maxime Coquelin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/8] mmc: sdhci-st: Add macros for register offsets and bitfields for mmcss glue regs
Date: Tue, 3 Mar 2015 11:24:45 +0100	[thread overview]
Message-ID: <54F58BED.4020900@st.com> (raw)
In-Reply-To: <1424956227-18258-2-git-send-email-peter.griffin@linaro.org>

Hi Peter,

On 02/26/2015 02:10 PM, Peter Griffin wrote:
> The stih407 family SoC's have additional glue registers in the flashSS which
> are used to configure the Arasan controller.
>
> This patch adds macros for the register offsets and bitfields which will be used by
> subsequent patches to support stih407 family SoC's.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
>   drivers/mmc/host/sdhci-st.c | 91 +++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 91 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
> index 882b07e..a3bc3c3 100644
> --- a/drivers/mmc/host/sdhci-st.c
> +++ b/drivers/mmc/host/sdhci-st.c
> @@ -26,6 +26,97 @@
>   
>   #include "sdhci-pltfm.h"
>   
> +/* MMCSS glue logic to setup the HC on some ST SoCs (e.g. STiH407 family) */
> +
> +#define	ST_MMC_CCONFIG_REG_1		0x400
Maybe my mail client, but I see a tab instead of a space after #define.
> +#define ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT	BIT(24)
> +#define ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ	BIT(12)
> +#define ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT	BIT(8)
> +#define ST_MMC_CCONFIG_ASYNC_WAKEUP	BIT(0)
> +#define ST_MMC_CCONFIG_1_DEFAULT	\
> +				((ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT) | \
> +				 (ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ) | \
> +				 (ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT))
> +
> +#define ST_MMC_CCONFIG_REG_2		0x404
> +#define ST_MMC_CCONFIG_HIGH_SPEED	BIT(28)
> +#define ST_MMC_CCONFIG_ADMA2		BIT(24)
> +#define ST_MMC_CCONFIG_8BIT		BIT(20)
> +#define ST_MMC_CCONFIG_MAX_BLK_LEN	16
> +#define  MAX_BLK_LEN_1024		1
> +#define  MAX_BLK_LEN_2048		2
> +#define BASE_CLK_FREQ_200		0xc8
> +#define BASE_CLK_FREQ_100		0x64
> +#define BASE_CLK_FREQ_50		0x32
> +#define ST_MMC_CCONFIG_2_DEFAULT \
> +	(ST_MMC_CCONFIG_HIGH_SPEED | ST_MMC_CCONFIG_ADMA2 | \
> +	 ST_MMC_CCONFIG_8BIT | \
> +	 (MAX_BLK_LEN_1024 << ST_MMC_CCONFIG_MAX_BLK_LEN))
> +
> +#define ST_MMC_CCONFIG_REG_3			0x408
> +#define ST_MMC_CCONFIG_EMMC_SLOT_TYPE		BIT(28)
> +#define ST_MMC_CCONFIG_64BIT			BIT(24)
> +#define ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT	BIT(20)
> +#define ST_MMC_CCONFIG_1P8_VOLT			BIT(16)
> +#define ST_MMC_CCONFIG_3P0_VOLT			BIT(12)
> +#define ST_MMC_CCONFIG_3P3_VOLT			BIT(8)
> +#define ST_MMC_CCONFIG_SUSP_RES_SUPPORT		BIT(4)
> +#define ST_MMC_CCONFIG_SDMA			BIT(0)
> +#define ST_MMC_CCONFIG_3_DEFAULT	\
> +			 (ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT	| \
> +			  ST_MMC_CCONFIG_3P3_VOLT		| \
> +			  ST_MMC_CCONFIG_SUSP_RES_SUPPORT	| \
> +			  ST_MMC_CCONFIG_SDMA)
> +
> +#define ST_MMC_CCONFIG_REG_4	0x40c
> +#define ST_MMC_CCONFIG_D_DRIVER	BIT(20)
> +#define ST_MMC_CCONFIG_C_DRIVER	BIT(16)
> +#define ST_MMC_CCONFIG_A_DRIVER	BIT(12)
> +#define ST_MMC_CCONFIG_DDR50	BIT(8)
> +#define ST_MMC_CCONFIG_SDR104	BIT(4)
> +#define ST_MMC_CCONFIG_SDR50	BIT(0)
> +#define ST_MMC_CCONFIG_4_DEFAULT	0
> +
> +#define ST_MMC_CCONFIG_REG_5		0x410
> +#define ST_MMC_CCONFIG_TUNING_FOR_SDR50	BIT(8)
> +#define RETUNING_TIMER_CNT_MAX		0xf
> +#define ST_MMC_CCONFIG_5_DEFAULT	0
> +
> +/* I/O configuration for Arasan IP */
> +#define	ST_MMC_GP_OUTPUT	0x450
Same Here.

Best regards,
Maxime

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Coquelin <maxime.coquelin@st.com>
To: Peter Griffin <peter.griffin@linaro.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <patrice.chotard@st.com>,
	<srinivas.kandagatla@gmail.com>, <chris@printf.net>,
	<ulf.hansson@linaro.org>
Cc: <lee.jones@linaro.org>, <devicetree@vger.kernel.org>,
	<linux-mmc@vger.kernel.org>, <peppe.cavallaro@st.com>
Subject: Re: [PATCH v2 1/8] mmc: sdhci-st: Add macros for register offsets and bitfields for mmcss glue regs
Date: Tue, 3 Mar 2015 11:24:45 +0100	[thread overview]
Message-ID: <54F58BED.4020900@st.com> (raw)
In-Reply-To: <1424956227-18258-2-git-send-email-peter.griffin@linaro.org>

Hi Peter,

On 02/26/2015 02:10 PM, Peter Griffin wrote:
> The stih407 family SoC's have additional glue registers in the flashSS which
> are used to configure the Arasan controller.
>
> This patch adds macros for the register offsets and bitfields which will be used by
> subsequent patches to support stih407 family SoC's.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
>   drivers/mmc/host/sdhci-st.c | 91 +++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 91 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
> index 882b07e..a3bc3c3 100644
> --- a/drivers/mmc/host/sdhci-st.c
> +++ b/drivers/mmc/host/sdhci-st.c
> @@ -26,6 +26,97 @@
>   
>   #include "sdhci-pltfm.h"
>   
> +/* MMCSS glue logic to setup the HC on some ST SoCs (e.g. STiH407 family) */
> +
> +#define	ST_MMC_CCONFIG_REG_1		0x400
Maybe my mail client, but I see a tab instead of a space after #define.
> +#define ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT	BIT(24)
> +#define ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ	BIT(12)
> +#define ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT	BIT(8)
> +#define ST_MMC_CCONFIG_ASYNC_WAKEUP	BIT(0)
> +#define ST_MMC_CCONFIG_1_DEFAULT	\
> +				((ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT) | \
> +				 (ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ) | \
> +				 (ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT))
> +
> +#define ST_MMC_CCONFIG_REG_2		0x404
> +#define ST_MMC_CCONFIG_HIGH_SPEED	BIT(28)
> +#define ST_MMC_CCONFIG_ADMA2		BIT(24)
> +#define ST_MMC_CCONFIG_8BIT		BIT(20)
> +#define ST_MMC_CCONFIG_MAX_BLK_LEN	16
> +#define  MAX_BLK_LEN_1024		1
> +#define  MAX_BLK_LEN_2048		2
> +#define BASE_CLK_FREQ_200		0xc8
> +#define BASE_CLK_FREQ_100		0x64
> +#define BASE_CLK_FREQ_50		0x32
> +#define ST_MMC_CCONFIG_2_DEFAULT \
> +	(ST_MMC_CCONFIG_HIGH_SPEED | ST_MMC_CCONFIG_ADMA2 | \
> +	 ST_MMC_CCONFIG_8BIT | \
> +	 (MAX_BLK_LEN_1024 << ST_MMC_CCONFIG_MAX_BLK_LEN))
> +
> +#define ST_MMC_CCONFIG_REG_3			0x408
> +#define ST_MMC_CCONFIG_EMMC_SLOT_TYPE		BIT(28)
> +#define ST_MMC_CCONFIG_64BIT			BIT(24)
> +#define ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT	BIT(20)
> +#define ST_MMC_CCONFIG_1P8_VOLT			BIT(16)
> +#define ST_MMC_CCONFIG_3P0_VOLT			BIT(12)
> +#define ST_MMC_CCONFIG_3P3_VOLT			BIT(8)
> +#define ST_MMC_CCONFIG_SUSP_RES_SUPPORT		BIT(4)
> +#define ST_MMC_CCONFIG_SDMA			BIT(0)
> +#define ST_MMC_CCONFIG_3_DEFAULT	\
> +			 (ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT	| \
> +			  ST_MMC_CCONFIG_3P3_VOLT		| \
> +			  ST_MMC_CCONFIG_SUSP_RES_SUPPORT	| \
> +			  ST_MMC_CCONFIG_SDMA)
> +
> +#define ST_MMC_CCONFIG_REG_4	0x40c
> +#define ST_MMC_CCONFIG_D_DRIVER	BIT(20)
> +#define ST_MMC_CCONFIG_C_DRIVER	BIT(16)
> +#define ST_MMC_CCONFIG_A_DRIVER	BIT(12)
> +#define ST_MMC_CCONFIG_DDR50	BIT(8)
> +#define ST_MMC_CCONFIG_SDR104	BIT(4)
> +#define ST_MMC_CCONFIG_SDR50	BIT(0)
> +#define ST_MMC_CCONFIG_4_DEFAULT	0
> +
> +#define ST_MMC_CCONFIG_REG_5		0x410
> +#define ST_MMC_CCONFIG_TUNING_FOR_SDR50	BIT(8)
> +#define RETUNING_TIMER_CNT_MAX		0xf
> +#define ST_MMC_CCONFIG_5_DEFAULT	0
> +
> +/* I/O configuration for Arasan IP */
> +#define	ST_MMC_GP_OUTPUT	0x450
Same Here.

Best regards,
Maxime

  reply	other threads:[~2015-03-03 10:25 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 13:10 [PATCH v2 0/8] Add sd/emmc support for stih407 family silicon Peter Griffin
2015-02-26 13:10 ` Peter Griffin
2015-02-26 13:10 ` [PATCH v2 1/8] mmc: sdhci-st: Add macros for register offsets and bitfields for mmcss glue regs Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 10:24   ` Maxime Coquelin [this message]
2015-03-03 10:24     ` Maxime Coquelin
2015-03-03 10:24     ` Maxime Coquelin
     [not found]     ` <54F58BED.4020900-qxv4g6HH51o@public.gmane.org>
2015-03-30 10:29       ` Peter Griffin
2015-03-30 10:29         ` Peter Griffin
2015-03-30 10:29         ` Peter Griffin
2015-02-26 13:10 ` [PATCH v2 2/8] mmc: sdhci-st: Add support for de-asserting reset signal and top regs resource Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 10:34   ` Maxime Coquelin
2015-03-03 10:34     ` Maxime Coquelin
2015-03-03 10:34     ` Maxime Coquelin
2015-02-26 13:10 ` [PATCH v2 3/8] mmc: sdhci-st: Add delay management functions for top registers (eMMC) Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 10:47   ` Maxime Coquelin
2015-03-03 10:47     ` Maxime Coquelin
2015-03-03 10:47     ` Maxime Coquelin
2015-03-30 10:33     ` Peter Griffin
2015-03-30 10:33       ` Peter Griffin
2015-02-26 13:10 ` [PATCH v2 4/8] mmc: sdhci-st: Add st_mmcss_cconfig function to configure mmcss glue registers Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 10:53   ` Maxime Coquelin
2015-03-03 10:53     ` Maxime Coquelin
2015-03-03 10:53     ` Maxime Coquelin
2015-02-26 13:10 ` [PATCH v2 5/8] mmc: sdhci-st: Add sdhci_st_set_uhs_signaling function Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 10:56   ` Maxime Coquelin
2015-03-03 10:56     ` Maxime Coquelin
2015-03-03 10:56     ` Maxime Coquelin
2015-03-30 10:46     ` Peter Griffin
2015-03-30 10:46       ` Peter Griffin
2015-02-26 13:10 ` [PATCH v2 6/8] mmc: sdhci-st: Update the quirks for this controller Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 10:57   ` Maxime Coquelin
2015-03-03 10:57     ` Maxime Coquelin
2015-03-03 10:57     ` Maxime Coquelin
2015-02-26 13:10 ` [PATCH v2 7/8] mmc: sdhci-st: Update ST SDHCI binding documentation Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 11:01   ` Maxime Coquelin
2015-03-03 11:01     ` Maxime Coquelin
2015-03-03 11:01     ` Maxime Coquelin
2015-02-26 13:10 ` [PATCH v2 8/8] ARM: STi: DT: STiH407: Add dt nodes for sdhci and emmc Peter Griffin
2015-02-26 13:10   ` Peter Griffin
2015-03-03 11:03   ` Maxime Coquelin
2015-03-03 11:03     ` Maxime Coquelin
2015-03-03 11:03     ` Maxime Coquelin
2015-03-30 11:23     ` Peter Griffin
2015-03-30 11:23       ` Peter Griffin
2015-03-30 11:37       ` Lee Jones
2015-03-30 11:37         ` Lee Jones
2015-03-30 11:43         ` Maxime Coquelin
2015-03-30 11:43           ` Maxime Coquelin
2015-03-30 11:43           ` Maxime Coquelin

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=54F58BED.4020900@st.com \
    --to=maxime.coquelin@st.com \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=patrice.chotard@st.com \
    --cc=peppe.cavallaro@st.com \
    --cc=peter.griffin@linaro.org \
    --cc=srinivas.kandagatla@gmail.com \
    --cc=ulf.hansson@linaro.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 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.