mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Tim Sander <tim.sander@hbm.com>
Cc: barebox@lists.infradead.org
Subject: Re: RFC: arm pcm043 1315.6 IM950 timing (Numonyx Axcell Errata)
Date: Tue, 23 Aug 2011 14:53:15 +0200	[thread overview]
Message-ID: <20110823125315.GN31404@pengutronix.de> (raw)
In-Reply-To: <201108231421.42868.tim.sander@hbm.com>

Teresa,

Can you provide some input to this one?

Sascha

On Tue, Aug 23, 2011 at 02:21:42PM +0200, Tim Sander wrote:
> Hi
> 
> I just found out that Phytec has some patches in its BSP and i think especially the patches
> IM590_cfi_workaround for "Numonyx Axcell P33/P30 Specification Update" make me a little nervous.
> 
> We had some Problems getting the latest HW Revision of PCM043 (1315.6) up and
> running and so i found these patches. I have ported some other patches i found
> (which i will send later today) but i don't know enough about CFI to apply this patch
> logically to the barebox tree nevertheless heres my educated guess:
> (I am not sure if the patch belongs into intel CFI but since Numonyx has been owned by
> intel partly...)
> 
> commit bfa486c0bd90055222b4a2702bfb0d6a0fe59d8e
> Author: Tim Sander <tim.sander@hbm.com>
> Date:   Tue Aug 23 14:03:49 2011 +0200
> 
>     IM590 cfi workaround
> 
> diff --git a/drivers/nor/cfi_flash_intel.c b/drivers/nor/cfi_flash_intel.c
> index c3cbad5..30a54e6 100644
> --- a/drivers/nor/cfi_flash_intel.c
> +++ b/drivers/nor/cfi_flash_intel.c
> @@ -132,12 +132,30 @@ static int intel_flash_status_check (struct flash_info *info, flash_sect_t secto
>  static int intel_flash_real_protect (struct flash_info *info, long sector, int prot)
>  {
>         flash_write_cmd (info, sector, 0, FLASH_CMD_CLEAR_STATUS);
> +       //flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
> +       /*
> +       * see errata called
> +       * "Numonyx Axcell P33/P30 Specification Update" :)
> +       */
> +       flash_write_cmd (info, sector, 0, FLASH_CMD_READ_ID);
> +       flash_isequal (info, sector, FLASH_OFFSET_PROTECT, prot);
> +       /*
> +       * cmd must come before FLASH_CMD_PROTECT + 20us
> +       * Disable interrupts which might cause a timeout here.
> +       */
> +#ifdef CONFIG_USE_IRQ
> +       int flag = disable_interrupts ();
> +#endif
>         flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
>         if (prot)
>                 flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT_SET);
>         else
>                 flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT_CLEAR);
> -
> +       
> +#ifdef CONFIG_USE_IRQ
> +       if(flag)
> +               enable_interrupts();
> +#endif
>         return 0;
>  }
> 
> 
> This patch is against u-boot-v2-rc10 *not* againts barebox as reference. It is taken from the 
> PD10.1.2 BSP for PCM043.
> Index: u-boot-2.0.0-rc10/drivers/nor/cfi_flash.c        
> ===================================================================
> --- u-boot-2.0.0-rc10.orig/drivers/nor/cfi_flash.c  2011-01-28 10:52:14.881458149 +0100
> +++ u-boot-2.0.0-rc10/drivers/nor/cfi_flash.c   2011-01-28 11:09:40.241981535 +0100
> @@ -599,14 +599,34 @@
>  static int flash_real_protect (flash_info_t * info, long sector, int prot)
>  {
>     int retcode = 0;
> +   unsigned short cmd;
> 
>     flash_write_cmd (info, sector, 0, FLASH_CMD_CLEAR_STATUS);
> -   flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
> +   /*
> +    * see errata called
> +    * "Numonyx Axcell P33/P30 Specification Update" :)
> +    */
> +   flash_write_cmd (info, sector, 0, FLASH_CMD_READ_ID);
> +   flash_isequal (info, sector, FLASH_OFFSET_PROTECT, prot);
> +   /*
> +    * cmd must come before FLASH_CMD_PROTECT + 20us
> +    * Disable interrupts which might cause a timeout here.
> +    */
> +#ifdef CONFIG_USE_IRQ
> +   int flag = disable_interrupts ();
> +#endif
>     if (prot)
> -       flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT_SET);
> +       cmd = FLASH_CMD_PROTECT_SET;
>     else
> -       flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT_CLEAR);
> +       cmd = FLASH_CMD_PROTECT_CLEAR;
> 
> +   flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
> +   flash_write_cmd (info, sector, 0, cmd);
> +#ifdef CONFIG_USE_IRQ
> +   /* re-enable interrupts if necessary */
> +   if (flag)
> +       enable_interrupts ();
> +#endif
>     if ((retcode =
>          flash_full_status_check (info, sector, info->erase_blk_tout,
>                       prot ? "protect" : "unprotect")) == 0) {
> 
> --
> Please CC as i'm not subscribed to the list.
> 
> Best regards
> Tim
> 
> Hottinger Baldwin Messtechnik GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany | www.hbm.com 
> 
> Registered as GmbH (German limited liability corporation) in the commercial register at the local court of Darmstadt, HRB 1147  
> Company domiciled in Darmstadt | CEO: Andreas Huellhorst | Chairman of the board: James Charles Webster
> 
> Als Gesellschaft mit beschraenkter Haftung eingetragen im Handelsregister des Amtsgerichts Darmstadt unter HRB 1147 
> Sitz der Gesellschaft: Darmstadt | Geschaeftsfuehrung: Andreas Huellhorst | Aufsichtsratsvorsitzender: James Charles Webster
> 
> The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email.
> 
> Die in dieser E-Mail enthaltene Information ist vertraulich und lediglich fur den Empfaenger bestimmt. Sollten Sie nicht der eigentliche Empfaenger sein, informieren Sie mich bitte kurz und loeschen diese E-Mail.
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-08-23 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 12:21 Tim Sander
2011-08-23 12:53 ` Sascha Hauer [this message]
2011-08-23 13:22 ` Teresa Gamez
2011-08-23 14:40   ` Tim Sander
2011-08-24  8:54     ` Teresa Gamez
2011-08-24 10:07       ` Tim Sander
2011-08-24 12:25         ` Teresa Gamez
     [not found] ` <201108231701.21401.tim.sander@hbm.com>
     [not found]   ` <1314270042.3389.608.camel@lws-gamez>
2011-08-25 14:57     ` Patch test results was (Re: RFC: arm pcm043 1315.6 IM950 timing (Numonyx Axcell Errata)) Tim Sander

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=20110823125315.GN31404@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=tim.sander@hbm.com \
    /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