public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Problem on mounting a jffs2 rootfs image
       [not found]     ` <4374F44A.7080807@de.bosch.com>
@ 2006-01-02 18:31       ` Tony Lindgren
  2006-01-02 20:35         ` Dirk Behme
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2006-01-02 18:31 UTC (permalink / raw)
  To: Dirk Behme; +Cc: 'Linux OMAP Open Source'

* Dirk Behme <dirk.behme@de.bosch.com> [051111 11:43]:
> Tony Lindgren wrote:
> >>Do you checked the thread "JFFS2 problem on OSK"
> >>
> >>http://linux.omap.com/pipermail/linux-omap-open-source/2005-July/004717.html
> >>
> >>?
> >
> >I wonder if there's any way to test for the OSK version? Then we could
> >check the timings.
> 
> Are there any OSKs out there which need different *CS3* timings? If not, 
> we only have to check for correct timings, something like:
> 
> --- ./arch/arm/mach-omap/omap1/board-osk.c_orig 2005-11-11 
> 20:22:40.628440008 +0100
> +++ ./arch/arm/mach-omap/omap1/board-osk.c      2005-11-11 
> 20:31:51.056762184 +0100
> @@ -192,8 +192,18 @@ static struct omap_board_config_kernel o
>         { OMAP_TAG_USB,           &osk_usb_config },
>  };
> 
> +#define EMFIS_CS3_VAL (0x30003361)
> +
>  static void __init osk_init(void)
>  {
> +        /* Workaround for wrong CS3 (NOR flash) timing
> +         * There are some U-Boot versions out there which configure
> +         * wrong CS3 memory timings. This mainly leads to CRC
> +         * or similiar errors if you use NOR flash (e.g. with JFFS2)
> +         */
> +        if(omap_readl(EMIFS_CS3_CONFIG) != EMFIS_CS3_VAL)
> +               omap_writel(EMFIS_CS3_VAL, EMIFS_CS3_CONFIG);
> +
>         osk_flash_resource.end = osk_flash_resource.start = 
> omap_cs3_phys();
>         osk_flash_resource.end += SZ_32M - 1;
>         platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
> 
> 0x30003361 is the value used by spectrum digital. Seems to work. But I 
> don't think it's the fastest possible timing. Anybody with a better CS3 
> timing?

I think we should push this to avoid postings on JFFS2 problems. How
about changing the patch to use the EMIFS_CCS macro instead?

Regards,

Tony

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

* Re: Problem on mounting a jffs2 rootfs image
  2006-01-02 18:31       ` Problem on mounting a jffs2 rootfs image Tony Lindgren
@ 2006-01-02 20:35         ` Dirk Behme
  2006-01-02 22:10           ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Dirk Behme @ 2006-01-02 20:35 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: 'Linux OMAP Open Source'

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Tony Lindgren wrote:
>>0x30003361 is the value used by spectrum digital. Seems to work. But I 
>>don't think it's the fastest possible timing. Anybody with a better CS3 
>>timing?
> 
> 
> I think we should push this to avoid postings on JFFS2 problems. How
> about changing the patch to use the EMIFS_CCS macro instead?

Something like this?

Nobody with a better timing?

Dirk


[-- Attachment #2: osk_flash_timing.patch --]
[-- Type: text/plain, Size: 910 bytes --]

--- ./arch/arm/mach-omap1/board-osk.c_orig	2006-01-02 21:27:12.609851688 +0100
+++ ./arch/arm/mach-omap1/board-osk.c	2006-01-02 21:29:10.204974512 +0100
@@ -254,8 +254,18 @@ static void __init osk_mistral_init(void
 static void __init osk_mistral_init(void) { }
 #endif
 
+#define EMFIS_CS3_VAL (0x30003361)
+
 static void __init osk_init(void)
 {
+        /* Workaround for wrong CS3 (NOR flash) timing
+         * There are some U-Boot versions out there which configure
+         * wrong CS3 memory timings. This mainly leads to CRC
+         * or similiar errors if you use NOR flash (e.g. with JFFS2)
+         */
+	if(omap_readl(EMIFS_CCS(3)) != EMFIS_CS3_VAL)
+               omap_writel(EMFIS_CS3_VAL, EMIFS_CCS(3));
+ 
 	osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
 	osk_flash_resource.end += SZ_32M - 1;
 	platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: Problem on mounting a jffs2 rootfs image
  2006-01-02 20:35         ` Dirk Behme
@ 2006-01-02 22:10           ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2006-01-02 22:10 UTC (permalink / raw)
  To: Dirk Behme; +Cc: 'Linux OMAP Open Source'

* Dirk Behme <dirk.behme@de.bosch.com> [060102 12:36]:
> Tony Lindgren wrote:
> >>0x30003361 is the value used by spectrum digital. Seems to work. But I 
> >>don't think it's the fastest possible timing. Anybody with a better CS3 
> >>timing?
> >
> >
> >I think we should push this to avoid postings on JFFS2 problems. How
> >about changing the patch to use the EMIFS_CCS macro instead?
> 
> Something like this?

This should do it:

if (EMIFS_CCS(3) != EMIFS_CS3_VAL)
	EMIFS_CCS(3) = EMIFS_CS3_VAL;

It's a REG32 define.
 
> Nobody with a better timing?

I guess not.

Tony

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

end of thread, other threads:[~2006-01-02 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <43741c56.6400405c.6f4c.ffff87c0@mx.gmail.com>
     [not found] ` <43743DC9.1090702@de.bosch.com>
     [not found]   ` <20051111173755.GC10822@atomide.com>
     [not found]     ` <4374F44A.7080807@de.bosch.com>
2006-01-02 18:31       ` Problem on mounting a jffs2 rootfs image Tony Lindgren
2006-01-02 20:35         ` Dirk Behme
2006-01-02 22:10           ` Tony Lindgren

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