public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Re: FTL and Endianity
  2001-07-06 18:25 FTL and Endianity Alexandr Andreev
@ 2001-07-06 10:30 ` David Woodhouse
  2001-07-06 19:26   ` Alexandr Andreev
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2001-07-06 10:30 UTC (permalink / raw)
  To: Alexandr Andreev; +Cc: linux-mtd@lists.infrared.org

andreev@niisi.msk.ru said:
>  Did anybody test FTL with big  endian CPU? If no, we need to throw
> these macros out. In any case, we have to be  able to configure this
> behaviour.

I didn't test - I think others did though. FTL is defined to be 
little-endian. Why do you say the macros are unusable?

--
dwmw2

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

* Re: FTL and Endianity
  2001-07-06 19:26   ` Alexandr Andreev
@ 2001-07-06 11:35     ` David Woodhouse
  0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2001-07-06 11:35 UTC (permalink / raw)
  To: Alexandr Andreev; +Cc: linux-mtd

andreev@niisi.msk.ru said:
> But when the ftl_fromat utility creates an ftl partition, it doesn't
> swap any field of the header. So, it doesn't matter on which endianity
> the FTL driver and ftl_format works, it must be the same only. Am i
> wrong?

You're right - except that it does matter in theory. The FTL spec is 
defined as little-endian. So while it would _work_ if you do it all 
backwards, it's technically wrong. 

I'd be happier to fix ftl_format and ftl_check to do the byteswapping than 
to remove same from ftl.c.

--
dwmw2

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

* RE: FTL and Endianity
@ 2001-07-06 12:52 Siders, Keith
  2001-07-09  9:32 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Siders, Keith @ 2001-07-06 12:52 UTC (permalink / raw)
  To: linux-mtd

So since I'm using big-endian MIPS, does this effect JFFS2? That is, 
does FTL stand for Flash Translation Layer, or some such thing? 

Keith

-> -----Original Message-----
-> From: David Woodhouse [mailto:dwmw2@infradead.org]
-> Sent: Friday, July 06, 2001 6:35 AM
-> To: Alexandr Andreev
-> Cc: linux-mtd@lists.infradead.org
-> Subject: Re: FTL and Endianity 
-> 
-> 
-> 
-> andreev@niisi.msk.ru said:
-> > But when the ftl_fromat utility creates an ftl partition, 
-> it doesn't
-> > swap any field of the header. So, it doesn't matter on 
-> which endianity
-> > the FTL driver and ftl_format works, it must be the same only. Am i
-> > wrong?
-> 
-> You're right - except that it does matter in theory. The FTL spec is 
-> defined as little-endian. So while it would _work_ if you do it all 
-> backwards, it's technically wrong. 
-> 
-> I'd be happier to fix ftl_format and ftl_check to do the 
-> byteswapping than 
-> to remove same from ftl.c.
-> 
-> --
-> dwmw2
-> 
-> 
-> 
-> ______________________________________________________
-> Linux MTD discussion mailing list
-> http://lists.infradead.org/mailman/listinfo/linux-mtd/
-> 

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

* FTL and Endianity
@ 2001-07-06 18:25 Alexandr Andreev
  2001-07-06 10:30 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandr Andreev @ 2001-07-06 18:25 UTC (permalink / raw)
  To: dwmw2, linux-mtd@lists.infrared.org

Hi,
It is about FTL again.
I have got a MIPS big endian machine with CFI flash. And i obliged to 
hack ftl.c
to provide correct endianity working. I mean, i must undef all 
cpu_to_le32 and the
others macros. For little endian machines these macros do nothing, but 
for my big
endian MIPS these macros are unusable too. Did anybody test FTL with big 
endian CPU?
If no, we need to throw these macros out. In any case, we have to be 
able to
configure this behaviour.

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

* Re: FTL and Endianity
  2001-07-06 10:30 ` David Woodhouse
@ 2001-07-06 19:26   ` Alexandr Andreev
  2001-07-06 11:35     ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandr Andreev @ 2001-07-06 19:26 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd@lists.infrared.org

David Woodhouse wrote:

>
>I didn't test - I think others did though. FTL is defined to be 
>little-endian. Why do you say the macros are unusable?
>
As i can see, cpu_to_le32 and others macros, are usable only when FTL
reading the FTL header. But when the ftl_fromat utility creates an ftl
partition, it doesn't swap any field of the header.
So, it doesn't matter on which endianity the FTL driver and ftl_format
works, it must be the same only.
Am i wrong?

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

* Re: FTL and Endianity
  2001-07-06 12:52 Siders, Keith
@ 2001-07-09  9:32 ` David Woodhouse
  0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2001-07-09  9:32 UTC (permalink / raw)
  To: Siders, Keith; +Cc: linux-mtd

keith_siders@toshibatv.com said:
>  So since I'm using big-endian MIPS, does this effect JFFS2? That is,
> does FTL stand for Flash Translation Layer, or some such thing?  

JFFS2 is host-endian. It shouldn't affect you at all. You don't need to use 
FTL, JFFS works directly on the flash.

If you're making your JFFS2 filesystem images on a little-endian box for 
use on your target, make sure you use the appropriate arguments to 
mkfs.jffs2 to make it do the byteswapping.

--
dwmw2

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

end of thread, other threads:[~2001-07-09  9:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-06 18:25 FTL and Endianity Alexandr Andreev
2001-07-06 10:30 ` David Woodhouse
2001-07-06 19:26   ` Alexandr Andreev
2001-07-06 11:35     ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2001-07-06 12:52 Siders, Keith
2001-07-09  9:32 ` David Woodhouse

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