[U-Boot-Users] [PATCH] support for CF/IDE on PCMCIA for PXA25X

Wolfgang Denk wd at denx.de
Fri Apr 16 00:37:41 CEST 2004


Dear Christian,

in message <1080814283.1850.24.camel at absolute> you wrote:
> 
> Hi, I tried this with some different CFs with FAT file-systems
> on them. There is a README in the patch itself that goes in
> documentation directory.


Added, thanks.


But next time please provide a proper CHANGELOG entry, and  stick  to
the coding style and patch rules, for example:

...
> diff -u -b -B -N -r -X dodiff.not u-boot.orig/common/cmd_pcmcia.c u-boot/common/cmd_pcmcia.c
> --- u-boot.orig/common/cmd_pcmcia.c	2004-03-25 20:29:40.000000000 +0100
> +++ u-boot/common/cmd_pcmcia.c	2004-04-01 11:49:15.594458134 +0200
> @@ -48,8 +48,6 @@
>   * They are maximum 64KByte each...
>   */
>  
> -/* #define DEBUG	1	*/
> -
>  /*
>   * PCMCIA support
>   */

Don't change stuff that you don't understand and that doesn't hurt you.


> +static int hardware_enable (int slot)
> +{
> +	return 0;	/* No hardware to enable */
> +}
...
etc.
...
> +int pcmcia_on (void)
> +{
> +  unsigned int reg_arr[] = {
> +    0x48000028, CFG_MCMEM0_VAL,
> +    0x4800002c, CFG_MCMEM1_VAL,
> +    0x48000030, CFG_MCATT0_VAL,
> +    0x48000034, CFG_MCATT1_VAL,
> +    0x48000038, CFG_MCIO0_VAL,
> +    0x4800003c, CFG_MCIO1_VAL,
> +    
> +    0,0
> +  };
> +  int i, rc;
> +#ifdef CONFIG_EXADRON1
> +  int cardDetect;
> +  volatile unsigned int *v_pBCRReg = (volatile unsigned int *) 0x08000000; 
> +#endif
> +  
> +  debug("%s\n", __FUNCTION__);
...
etc.

Please use standard indentation!!!
Don't add trailing white space!
Don't use C++ comments.


> diff -u -b -B -N -r -X dodiff.not u-boot.orig/include/fat.h u-boot/include/fat.h
> --- u-boot.orig/include/fat.h	2004-02-23 20:31:01.000000000 +0100
> +++ u-boot/include/fat.h	2004-03-31 15:15:46.000000000 +0200
> @@ -210,4 +210,11 @@
>  const char *file_getfsname(int idx);
>  int fat_register_device(block_dev_desc_t *dev_desc, int part_no);
>  
> +#ifdef CONFIG_PXA250
> +#undef FAT2CPU16
> +#define FAT2CPU16(x) x
> +#undef FAT2CPU32
> +#define FAT2CPU32(x) x
> +#endif
> +
>  #endif /* _FAT_H_ */


I added this as is, but I ask you to provide an additional  patch  to
clean  this  up.  If  the  definitions of FAT2CPU16 and FAT2CPU32 are
wrong they must be changed where they are defined. Otherwise you  may
run  into problems, for example your code relies heavily on a certain
order of the #include statements. This must be fixed ASAP.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"They that can give up essential liberty to obtain a little temporary
saftey deserve neither liberty not saftey." - Benjamin Franklin, 1759




More information about the U-Boot mailing list