Skip to contentSkip to conversation

changes to IDE driver for LSB machines

PATCH New Marc Singer 2 participants 2 messages Aug 14, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 changes to IDE driver for LSB machines

Aside from the ARM additions, there are changes to allow the IDE code to run on other little endian machines IA32, mips.

BTW, the macro names, WORDS_BIGENDIAN and BYTES_BIGENDIAN come from autoconf.

Also, the endianness of mips isn't clear. Like PPC, it can do either and as far as I can tell both are supported by Debian.

Cheers.

-------------- next part --------------

CHANGELOG +5 -0
diff -ruN --exclude '*.o' --exclude='*.map' --exclude '*~' --exclude '*-orig' --exclude=.depend --exclude=configx.mk --exclude='*.srec' --exclude='*.a' u-boot-0.4.5/CHANGELOG u-boot/CHANGELOG
@@ -2,6 +2,11 @@
 Changes for U-Boot 0.4.5:
 ======================================================================
 
+* Patch by Marc Singer, 14 Aug 2003
+  - New target, Sharp KEV7A400
+  - New configuration method using mkconfigx script
+  - IDE drivers changes to support little endian CPUs.
+
 * Update for TQM board defaults:
   disable clocks_in_mhz, enable boot count limit
 
common/cmd_ide.c +75 -20

151 lines not on this page · raw message

ppc_config.mk +1 -0
diff -ruN --exclude '*.o' --exclude='*.map' --exclude '*~' --exclude '*-orig' --exclude=.depend --exclude=configx.mk --exclude='*.srec' --exclude='*.a' u-boot-0.4.5/ppc_config.mk u-boot/ppc_config.mk
@@ -23,3 +23,4 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
+PLATFORM_CPPFLAGS += -DWORDS_BIGENDIAN -DBYTES_BIGENDIAN
#1 lore raw

PATCH 1/1 changes to IDE driver for LSB machines

Quoted 6 lines · In message <[email protected]> you wrote:

Aside from the ARM additions, there are changes to allow the IDE code to run on other little endian machines IA32, mips.

BTW, the macro names, WORDS_BIGENDIAN and BYTES_BIGENDIAN come from autoconf.

Maybe. But we don't use autoconf in U-Boot. I don;t like to invent new macro names if there is a working mechanism in place already. Please use <include/asm/byteorder.h>".

Quoted 2 lines

Also, the endianness of mips isn't clear. Like PPC, it can do either and as far as I can tell both are supported by Debian.

This is why I do not want to base such stuff on the name of the architecture. There is a generic way to solve this issue, so please let's use this.

CHANGELOG line 8

Quoted 4 lines
CHANGELOG +4 -0
+* Patch by Marc Singer, 14 Aug 2003
+  - New target, Sharp KEV7A400
+  - New configuration method using mkconfigx script
+  - IDE drivers changes to support little endian CPUs.

Please separate the new board support from the changes to the IDE driver.

BTW: I don't see any new board support stuff in this patch???

common/cmd_ide.c line 907

Quoted 8 lines
common/cmd_ide.c +8 -0
+input_data(int dev, ulong *sect_buf, int words)
+{
+	volatile u32* p = (volatile void*)(ATA_CURR_BASE (dev));
+	u16* rg = (void*) sect_buf;
+	while (words--)
+	  *rg++ = (*p)&0xffff;
+
+	  //	insw(ATA_DATA_REG, sect_buf, words << 1);

Please don't use C++ comments.

common/cmd_ide.c line 1280

Quoted 3 lines

{

common/cmd_ide.c +1 -1
-	int start,end;
+#if !defined (BYTES_BIGENDIAN) || defined (__PPC__)

...

I quote yourself::

"Also, the endianness of mips isn't clear. Like PPC, it can do either..."

And here you base an assumption on the architecture name? Please decide what you want.

And below you add BYTES_BIGENDIAN for PPC systems, so this makes really little sense to me.

Quoted 3 lines

PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -n
+PLATFORM_CPPFLAGS += -DWORDS_BIGENDIAN -DBYTES_BIGENDIAN

This just pollutes the namespace and is 100% redundand. Please use the existent macros.

Patch rejected.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
By the way, ALL software projects are done by iterative  prototyping.
Some companies call their prototypes "releases", that's all.