public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Devkit8000: Switch over to enable_gpmc_cs_config
@ 2011-12-07  9:38 Thomas Weber
  2011-12-07 17:14 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Weber @ 2011-12-07  9:38 UTC (permalink / raw)
  To: u-boot

Use enable_gpmc_cs_config instead of local writing
timing configuration for GPMC.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 board/timll/devkit8000/devkit8000.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index bcadfc4..dd46c35 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -48,6 +48,16 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static u32 gpmc_net_config[GPMC_MAX_REG] = {
+	NET_GPMC_CONFIG1,
+	NET_GPMC_CONFIG2,
+	NET_GPMC_CONFIG3,
+	NET_GPMC_CONFIG4,
+	NET_GPMC_CONFIG5,
+	NET_GPMC_CONFIG6,
+	NET_GPMC_CONFIG7,
+};
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -82,13 +92,8 @@ int misc_init_r(void)
 
 #ifdef CONFIG_DRIVER_DM9000
 	/* Configure GPMC registers for DM9000 */
-	writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[6].config1);
-	writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[6].config2);
-	writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[6].config3);
-	writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[6].config4);
-	writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[6].config5);
-	writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[6].config6);
-	writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[6].config7);
+	enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[6],
+			CONFIG_DM9000_BASE, GPMC_SIZE_16M);
 
 	/* Use OMAP DIE_ID as MAC address */
 	if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
-- 
1.7.8

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] Devkit8000: Switch over to enable_gpmc_cs_config
  2011-12-07  9:38 [U-Boot] [PATCH] Devkit8000: Switch over to enable_gpmc_cs_config Thomas Weber
@ 2011-12-07 17:14 ` Tom Rini
  2011-12-13  7:57   ` Thomas Weber
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2011-12-07 17:14 UTC (permalink / raw)
  To: u-boot

On Wed, Dec 7, 2011 at 2:38 AM, Thomas Weber <weber@corscience.de> wrote:
> Use enable_gpmc_cs_config instead of local writing
> timing configuration for GPMC.
>
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
> ?board/timll/devkit8000/devkit8000.c | ? 19 ++++++++++++-------
> ?1 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
> index bcadfc4..dd46c35 100644
> --- a/board/timll/devkit8000/devkit8000.c
> +++ b/board/timll/devkit8000/devkit8000.c
> @@ -48,6 +48,16 @@
>
> ?DECLARE_GLOBAL_DATA_PTR;
>
> +static u32 gpmc_net_config[GPMC_MAX_REG] = {
> + ? ? ? NET_GPMC_CONFIG1,
> + ? ? ? NET_GPMC_CONFIG2,
> + ? ? ? NET_GPMC_CONFIG3,
> + ? ? ? NET_GPMC_CONFIG4,
> + ? ? ? NET_GPMC_CONFIG5,
> + ? ? ? NET_GPMC_CONFIG6,
> + ? ? ? NET_GPMC_CONFIG7,
> +};

Value 7 is computed in enable_gpmc_cs_config() so it should be a 0 in
the struct (or just a comment for clarity, I've seen both I think).

-- 
Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] Devkit8000: Switch over to enable_gpmc_cs_config
  2011-12-07 17:14 ` Tom Rini
@ 2011-12-13  7:57   ` Thomas Weber
  2011-12-13 15:49     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Weber @ 2011-12-13  7:57 UTC (permalink / raw)
  To: u-boot

Hello Tom,

On 07.12.2011 18:14, Tom Rini wrote:
> On Wed, Dec 7, 2011 at 2:38 AM, Thomas Weber <weber@corscience.de> wrote:
>> Use enable_gpmc_cs_config instead of local writing
>> timing configuration for GPMC.
>>
>> Signed-off-by: Thomas Weber <weber@corscience.de>
>> ---
>>  board/timll/devkit8000/devkit8000.c |   19 ++++++++++++-------
>>  1 files changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
>> index bcadfc4..dd46c35 100644
>> --- a/board/timll/devkit8000/devkit8000.c
>> +++ b/board/timll/devkit8000/devkit8000.c
>> @@ -48,6 +48,16 @@
>>
>>  DECLARE_GLOBAL_DATA_PTR;
>>
>> +static u32 gpmc_net_config[GPMC_MAX_REG] = {
>> +       NET_GPMC_CONFIG1,
>> +       NET_GPMC_CONFIG2,
>> +       NET_GPMC_CONFIG3,
>> +       NET_GPMC_CONFIG4,
>> +       NET_GPMC_CONFIG5,
>> +       NET_GPMC_CONFIG6,
>> +       NET_GPMC_CONFIG7,
>> +};
> 
> Value 7 is computed in enable_gpmc_cs_config() so it should be a 0 in
> the struct (or just a comment for clarity, I've seen both I think).
> 

The calculated value in enable_gpmc_cs_config() is same as
NET_GPMC_CONFIG7. The gpmc_net_config[6] is ignored and not used in
enable_gpmc_cs_config(). If you want a 0 at this position I will send a
second version with a 0 for NET_GPMC_CONFIG7.

Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] Devkit8000: Switch over to enable_gpmc_cs_config
  2011-12-13  7:57   ` Thomas Weber
@ 2011-12-13 15:49     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2011-12-13 15:49 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 13, 2011 at 12:57 AM, Thomas Weber
<thomas.weber.linux@googlemail.com> wrote:
> Hello Tom,
>
> On 07.12.2011 18:14, Tom Rini wrote:
>> On Wed, Dec 7, 2011 at 2:38 AM, Thomas Weber <weber@corscience.de> wrote:
>>> Use enable_gpmc_cs_config instead of local writing
>>> timing configuration for GPMC.
>>>
>>> Signed-off-by: Thomas Weber <weber@corscience.de>
>>> ---
>>> ?board/timll/devkit8000/devkit8000.c | ? 19 ++++++++++++-------
>>> ?1 files changed, 12 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
>>> index bcadfc4..dd46c35 100644
>>> --- a/board/timll/devkit8000/devkit8000.c
>>> +++ b/board/timll/devkit8000/devkit8000.c
>>> @@ -48,6 +48,16 @@
>>>
>>> ?DECLARE_GLOBAL_DATA_PTR;
>>>
>>> +static u32 gpmc_net_config[GPMC_MAX_REG] = {
>>> + ? ? ? NET_GPMC_CONFIG1,
>>> + ? ? ? NET_GPMC_CONFIG2,
>>> + ? ? ? NET_GPMC_CONFIG3,
>>> + ? ? ? NET_GPMC_CONFIG4,
>>> + ? ? ? NET_GPMC_CONFIG5,
>>> + ? ? ? NET_GPMC_CONFIG6,
>>> + ? ? ? NET_GPMC_CONFIG7,
>>> +};
>>
>> Value 7 is computed in enable_gpmc_cs_config() so it should be a 0 in
>> the struct (or just a comment for clarity, I've seen both I think).
>>
>
> The calculated value in enable_gpmc_cs_config() is same as
> NET_GPMC_CONFIG7. The gpmc_net_config[6] is ignored and not used in
> enable_gpmc_cs_config(). If you want a 0 at this position I will send a
> second version with a 0 for NET_GPMC_CONFIG7.

Yes, please send a v2, thanks

-- 
Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-13 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07  9:38 [U-Boot] [PATCH] Devkit8000: Switch over to enable_gpmc_cs_config Thomas Weber
2011-12-07 17:14 ` Tom Rini
2011-12-13  7:57   ` Thomas Weber
2011-12-13 15:49     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox