public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MCI support for AT91 family processors.
Date: Sat, 5 Sep 2009 03:21:01 +0200	[thread overview]
Message-ID: <20090905012101.GI30118@game.jcrosoft.org> (raw)
In-Reply-To: <20090829183319.GA4150@pc-ras4041.res.insa>

> 
> diff --git a/cpu/arm926ejs/at91/at91cap9_devices.c b/cpu/arm926ejs/at91/at91cap9_devices.c
> index 39e405f..2dc1984 100644
> --- a/cpu/arm926ejs/at91/at91cap9_devices.c
> +++ b/cpu/arm926ejs/at91/at91cap9_devices.c
> @@ -79,6 +79,42 @@ void at91_serial_hw_init(void)
>  #endif
>  }
>  
> +#ifdef CONFIG_ATMEL_MCI
> +#ifdef CONFIG_AT91_MCI0
> +void at91_mci0_hw_init(int slot)
> +{
> +	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_MCI0);
please use correct SOC cloclk marco everywhere
> +	at91_set_A_periph(AT91_PIN_PA2, 0);
> +
> +	switch(slot) {
why switch slot?
you are already in mci0 and there is only one for the cap9
> +		case 0:
> +			at91_set_A_periph(AT91_PIN_PA0, 1);
> +			at91_set_A_periph(AT91_PIN_PA1, 1);
> +			at91_set_A_periph(AT91_PIN_PA3, 1);
> +			at91_set_A_periph(AT91_PIN_PA4, 1);
> +			at91_set_A_periph(AT91_PIN_PA5, 1);
you need to add an option to PA3,4,5 only in 4 wire mode
and it's will be also available for the other hw_init
> +			break;
> +	}
> +}
> +#elif defined(CONFIG_AT91_MCI1
miss a ')' and on some other
> +void at91_mci1_hw_init(int slot)
> +{
> +	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_MCI);
> +	at91_set_A_periph(AT91_PIN_PA16, 0);
> +
> +	switch(slot) {
why switch slot?
you are already in mci1 and there is only one for the cap9
> +		case 0:
> +			at91_set_A_periph(AT91_PIN_PA17, 1);
> +			at91_set_A_periph(AT91_PIN_PA18, 1);
> +			at91_set_A_periph(AT91_PIN_PA19, 1);
> +			at91_set_A_periph(AT91_PIN_PA20, 1);
> +			at91_set_A_periph(AT91_PIN_PA21, 1);
> +			break;
> +	}
> +}
> +#endif
> +#endif
> +
> diff --git a/include/asm-arm/arch-at91/hardware.h b/include/asm-arm/arch-at91/hardware.h
> index de06a10..6430ade 100644
> --- a/include/asm-arm/arch-at91/hardware.h
> +++ b/include/asm-arm/arch-at91/hardware.h
> @@ -20,6 +20,7 @@
>  #include <asm/arch/at91rm9200.h>
>  #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
>  #include <asm/arch/at91sam9260.h>
> +#define AT91_BASE_MCI	AT91SAM9260_BASE_MCI
please use MCI0_BASE and MCI1_BASE so we can detect if the soc support
multiple mci and please move it to soc header
I'll send a patch to clean the other
>  #define AT91_BASE_SPI	AT91SAM9260_BASE_SPI0
>  #define AT91_ID_UHP	AT91SAM9260_ID_UHP
>  #define AT91_PMC_UHP	AT91SAM926x_PMC_UHP

Best Regards,
J.

  reply	other threads:[~2009-09-05  1:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-29 17:18 [U-Boot] [PATCH] MCI support for AT91 family processors Sami Kantoluoto
2009-08-29 18:33 ` Albin Tonnerre
2009-09-05  1:21   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-09-05  9:03     ` Albin Tonnerre
2009-09-05 11:35       ` Jean-Christophe PLAGNIOL-VILLARD
     [not found] ` <20090829230827.GE4150@pc-ras4041.res.insa>
2009-08-31 11:22   ` Sami Kantoluoto
2009-08-31 11:39     ` Albin Tonnerre
2009-08-31 11:47       ` Sami Kantoluoto
2009-09-01 13:59       ` Sami Kantoluoto
2009-09-10 13:05 ` Albin Tonnerre

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=20090905012101.GI30118@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.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