public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* RE: Big Endian/Little Endian headache in cfi_cmdset_0002.c
@ 2000-11-16 19:41 mark.langsdorf
  2000-11-16 22:09 ` Nicolas Pitre
  2000-11-16 22:45 ` Alice Hennessy
  0 siblings, 2 replies; 9+ messages in thread
From: mark.langsdorf @ 2000-11-16 19:41 UTC (permalink / raw)
  To: ahennessy; +Cc: mtd

> In data writes and reads, endianness should not be a concern 
> except for the unaligned bytes which should follow the
> cfi_cmdset_0001.c code example instead of the assumption of
> a particular endianness that exists now in cfi_amdext_write_bytes_32.

	I'm not sure what you mean - as far as I can tell,
cfi_cmdset_0001.c does deal with endianness except in 3
specific incidences, two of which cfi_cmdset_0002.c doesn't
use and the third which we don't currently implement (but
should, and probably could trivially).
	Is there something else I am missing, or can I take
all these endian references out of my code with a clear
conscience?

Mark Langsdorf
Advanced Micro Devices, Inc             Tel: 512.602.3756
5204 E. Ben White Blvd. M/S 590         Fax: 512.602.5051
Austin, TX 78741                        mark.langsdorf@amd.com
	



To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Big Endian/Little Endian headache in cfi_cmdset_0002.c
@ 2000-11-16 22:15 mark.langsdorf
  0 siblings, 0 replies; 9+ messages in thread
From: mark.langsdorf @ 2000-11-16 22:15 UTC (permalink / raw)
  To: nico; +Cc: ahennessy, mtd

> On Thu, 16 Nov 2000 mark.langsdorf@amd.com wrote:
> 
> > > In data writes and reads, endianness should not be a concern
> > > except for the unaligned bytes which should follow the
> > > cfi_cmdset_0001.c code example instead of the assumption of
> > > a particular endianness that exists now in 
> cfi_amdext_write_bytes_32.
> >
> > 	I'm not sure what you mean - as far as I can tell,
> > cfi_cmdset_0001.c does deal with endianness except in 3
> > specific incidences, ...
> 
> Could you please point them out so I could fix them please?
> AFAIK cfi_cmdset_0001.c is completely endian aware.

	My mistake.  That should say "cfi_cmdset_001.c
doesn't deal with endianness except in 3 specific
incidences": setting the erase size (which cfi_cmdset_0002.c
does not currently do correctly right now) and setting 
the Feature Support and BlkStatusRegMask (which 
cfi_cmdset_0002.c doesn't support).
	AFAIK, cfi_cmdset_0001.c handles endianness
appropriately.  It doesn't do much with it, though, and
I wanted to be sure that we should take the same 
approach for cfi_cmdset_0002.c.  Which it looks like
we should - the correct patch is to remove all the
references to endianness.

Mark Langsdorf
Advanced Micro Devices, Inc             Tel: 512.602.3756
5204 E. Ben White Blvd. M/S 590         Fax: 512.602.5051
Austin, TX 78741                        mark.langsdorf@amd.com



To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Big Endian/Little Endian headache in cfi_cmdset_0002.c
@ 2000-11-14 17:23 mark.langsdorf
  2000-11-14 21:50 ` Alice Hennessy
  0 siblings, 1 reply; 9+ messages in thread
From: mark.langsdorf @ 2000-11-14 17:23 UTC (permalink / raw)
  To: mtd

	The write code in cfi_amdext_write_bytes_32 uses
be32_to_cpu and cpu_to_be32 to make the last four or 
less bytes of a buffer Big Endian.  However, none of 
the other write or read code in cfi_cmdset_002 is 
concerned with Endianess, so it looks like (on my 
x86 chip) that the first x bytes of a write are
little endian, and then the last 3 or 4 are reversed.
	Is there some reason for handling things this
way, or is this a bug in the code?

Mark Langsdorf
Advanced Micro Devices, Inc             Tel: 512.602.3756
5204 E. Ben White Blvd. M/S 590         Fax: 512.602.5051
Austin, TX 78741                        mark.langsdorf@amd.com


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

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

end of thread, other threads:[~2000-11-29  2:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-16 19:41 Big Endian/Little Endian headache in cfi_cmdset_0002.c mark.langsdorf
2000-11-16 22:09 ` Nicolas Pitre
2000-11-16 22:45 ` Alice Hennessy
2000-11-28 23:44   ` Big Endian issues Alice Hennessy
2000-11-29  2:59     ` Nicolas Pitre
  -- strict thread matches above, loose matches on Subject: below --
2000-11-16 22:15 Big Endian/Little Endian headache in cfi_cmdset_0002.c mark.langsdorf
2000-11-14 17:23 mark.langsdorf
2000-11-14 21:50 ` Alice Hennessy
2000-11-15 22:36   ` Alice Hennessy

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