[U-Boot] [PATCH v7 01/10] nds32: add header files support for nds32

macpaul at andestech.com macpaul at andestech.com
Fri Apr 8 09:21:13 CEST 2011


 Hi Wolfgang,

> This also triggers an erro-r from checkpatch, and indeed this is a
> strange define.
> 
> > +#define R0		uregs[1]	/* R0 */
> > +#define R1		uregs[2]
> > +#define R2		uregs[3]
> > +#define R3		uregs[4]
> 
> NAK.  Please use a C struct instead.

After discussed with the colledgue responsor for GDB and ptrace utils, we will fix this in Linux kernel later.
Ans, I'll fix it in the next patch v8. 

> 
> ...
> > diff --git a/arch/nds32/include/asm/u-boot.h 
> b/arch/nds32/include/asm/u-boot.h
> > new file mode 100644
> > index 0000000..fafe4e4
> > --- /dev/null
> > +++ b/arch/nds32/include/asm/u-boot.h
> > @@ -0,0 +1,63 @@
> > +/*
> > + * (C) Copyright 2002
> > + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
> > + * Marius Groeger <mgroeger at sysgo.de>
> > + *
> > + * Copyright (C) 2011 Andes Technology Corporation
> > + * Copyright (C) 2010 Shawn Lin (nobuhiro at andestech.com)
> > + * Copyright (C) 2011 Macpaul Lin (macpaul at andestech.com)
> ...
> > +#ifndef _U_BOOT_H_
> > +#define _U_BOOT_H_	1
> > +
> > +#include <environment.h>
> > +
> > +typedef struct bd_info {
> > +	int		bi_baudrate;	/* serial console baudrate */
> > +	unsigned long	bi_ip_addr;	/* IP Address */
> > +	unsigned char	bi_enetaddr[6]; /* Ethernet adress */
> > +
> > +	env_t		*bi_env;
> > +	unsigned long	bi_arch_number;	/* unique id for this board */
> > +	unsigned long	bi_boot_params;	/* where this board 
> expects params */
> > +
> > +	unsigned long	bi_memstart;	/* start of DRAM memory */
> > +	unsigned long	bi_memsize;	/* size	 of DRAM memory 
> in bytes */
> > +	unsigned long	bi_flashstart;	/* start of FLASH memory */
> > +	unsigned long	bi_flashsize;	/* size	 of FLASH memory */
> > +	unsigned long	bi_flashoffset; /* reserved area for 
> startup monitor */
> > +
> > +	struct				/* RAM configuration */
> > +	{
> > +		unsigned long start;
> > +		unsigned long size;
> > +	} bi_dram[CONFIG_NR_DRAM_BANKS];
> > +} bd_t;
> 
> I wonder which part of this file would be (C) by any of the folks
> listed above?
> 

The typedef struct bd_info comes from arch/i386/include/asm/u-boot.h
and arch/arm/include/asm/u-boot.h.

If you grep the author "Marius Groeger <mgroeger at sysgo.de>" then you can find the
the 2 files were in the grep result which was originally referenced.
Hence we put (C) listed above because we have referenced those 2 files.

If you have any suggestion, please let me know.


Best regards,
Macpaul Lin


More information about the U-Boot mailing list