[U-Boot] [PATCH v2] crc32: Impl. linux optimized crc32()

Mike Frysinger vapier at gentoo.org
Tue Nov 17 05:06:02 CET 2009


On Monday 16 November 2009 23:01:59 Mike Frysinger wrote:
> On Friday 13 November 2009 03:52:05 Joakim Tjernlund wrote:
> > --- a/lib_generic/crc32.c
> > +++ b/lib_generic/crc32.c
> > @@ -13,6 +13,8 @@
> >  #else
> >  #include <stdint.h>
> >  #endif
> > +#include <asm/byteorder.h>
> > +#include <u-boot/crc.h>
> 
> the target system improvements are awesome, but this breaks cross-compiling
> crc32 code for anything other than linux hosts (and even that is spotty).
> 
> i'd suggest these changes
> 
> @@ -10,10 +10,10 @@
> 
>  #ifndef USE_HOSTCC	/* Shut down "ANSI does not permit..." warnings */
>  #include <common.h>
> +#include <asm/byteorder.h>
>  #else
> -#include <stdint.h>
> +#include <compiler.h>
>  #endif
> -#include <asm/byteorder.h>
>  #include <u-boot/crc.h>

actually, now that i re-read what i put into compiler.h, even this header 
logic is more complex than it needs to be.  you should be able to have it 
simply read

#include <compiler.h>
#include <u-boot/crc.h>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091116/9c250500/attachment.pgp 


More information about the U-Boot mailing list