[U-Boot] [PATCH 1/2] Add an architecture specific config.h for common defines

We have common defines that we duplicate in various ways. Having an arch specific config.h gives us a common location for those defines.
Eventually we should be able to relace this when we have proper Kconfig support.
Signed-off-by: Kumar Gala galak@kernel.crashing.org --- include/asm-arm/config.h | 24 ++++++++++++++++++++++++ include/asm-avr32/config.h | 24 ++++++++++++++++++++++++ include/asm-blackfin/config.h | 24 ++++++++++++++++++++++++ include/asm-i386/config.h | 24 ++++++++++++++++++++++++ include/asm-m68k/config.h | 24 ++++++++++++++++++++++++ include/asm-microblaze/config.h | 24 ++++++++++++++++++++++++ include/asm-mips/config.h | 24 ++++++++++++++++++++++++ include/asm-nios/config.h | 24 ++++++++++++++++++++++++ include/asm-nios2/config.h | 24 ++++++++++++++++++++++++ include/asm-ppc/config.h | 24 ++++++++++++++++++++++++ include/asm-sh/config.h | 24 ++++++++++++++++++++++++ include/asm-sparc/config.h | 24 ++++++++++++++++++++++++ mkconfig | 1 + 13 files changed, 289 insertions(+), 0 deletions(-) create mode 100644 include/asm-arm/config.h create mode 100644 include/asm-avr32/config.h create mode 100644 include/asm-blackfin/config.h create mode 100644 include/asm-i386/config.h create mode 100644 include/asm-m68k/config.h create mode 100644 include/asm-microblaze/config.h create mode 100644 include/asm-mips/config.h create mode 100644 include/asm-nios/config.h create mode 100644 include/asm-nios2/config.h create mode 100644 include/asm-ppc/config.h create mode 100644 include/asm-sh/config.h create mode 100644 include/asm-sparc/config.h
diff --git a/include/asm-arm/config.h b/include/asm-arm/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-arm/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-avr32/config.h b/include/asm-avr32/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-avr32/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-blackfin/config.h b/include/asm-blackfin/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-blackfin/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-i386/config.h b/include/asm-i386/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-i386/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-m68k/config.h b/include/asm-m68k/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-m68k/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-microblaze/config.h b/include/asm-microblaze/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-microblaze/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-mips/config.h b/include/asm-mips/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-mips/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-nios/config.h b/include/asm-nios/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-nios/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-nios2/config.h b/include/asm-nios2/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-nios2/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-ppc/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-sh/config.h b/include/asm-sh/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-sh/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/include/asm-sparc/config.h b/include/asm-sparc/config.h new file mode 100644 index 0000000..049c44e --- /dev/null +++ b/include/asm-sparc/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#ifndef _ASM_CONFIG_H_ +#define _ASM_CONFIG_H_ + +#endif diff --git a/mkconfig b/mkconfig index c3e4cea..b6b0a80 100755 --- a/mkconfig +++ b/mkconfig @@ -82,6 +82,7 @@ else > config.h # Create new config file fi echo "/* Automatically generated - do not edit */" >>config.h +echo "#include <asm/config.h>" >>config.h echo "#include <configs/$1.h>" >>config.h
exit 0

Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent between the two current users (lib_ppc/board.c, 44x SPD DDR2).
Signed-off-by: Kumar Gala galak@kernel.crashing.org --- cpu/ppc4xx/44x_spd_ddr2.c | 3 --- include/asm-ppc/config.h | 8 ++++++++ lib_ppc/board.c | 3 --- 3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c index b40e4b1..1e49571 100644 --- a/cpu/ppc4xx/44x_spd_ddr2.c +++ b/cpu/ppc4xx/44x_spd_ddr2.c @@ -160,9 +160,6 @@ * SDRAM. This is because we only map the first 2GB on such systems, and therefore * the ECC parity byte of the remaining area can't be written. */ -#ifndef CONFIG_MAX_MEM_MAPPED -#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30) -#endif
/* * Board-specific Platform code can reimplement spd_ddr_init_hang () if needed diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h index 049c44e..6d27cb1 100644 --- a/include/asm-ppc/config.h +++ b/include/asm-ppc/config.h @@ -21,4 +21,12 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
+#ifndef CONFIG_MAX_MEM_MAPPED +#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2) && defined(CONFIG_SPD_EEPROM) +#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30) +#else +#define CONFIG_MAX_MEM_MAPPED (256 << 20) +#endif +#endif + #endif diff --git a/lib_ppc/board.c b/lib_ppc/board.c index df1cf13..c83eb00 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -352,9 +352,6 @@ init_fnc_t *init_sequence[] = { NULL, /* Terminate this list */ };
-#ifndef CONFIG_MAX_MEM_MAPPED -#define CONFIG_MAX_MEM_MAPPED (256 << 20) -#endif ulong get_effective_memsize(void) { #ifndef CONFIG_VERY_BIG_RAM

On Friday 06 February 2009, Kumar Gala wrote:
Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent between the two current users (lib_ppc/board.c, 44x SPD DDR2).
Signed-off-by: Kumar Gala galak@kernel.crashing.org
Looks good, so:
Acked-by: Stefan Roese sr@denx.de
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Dear Kumar Gala,
In message 1233888058-21503-2-git-send-email-galak@kernel.crashing.org you wrote:
Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent between the two current users (lib_ppc/board.c, 44x SPD DDR2).
Signed-off-by: Kumar Gala galak@kernel.crashing.org
cpu/ppc4xx/44x_spd_ddr2.c | 3 --- include/asm-ppc/config.h | 8 ++++++++ lib_ppc/board.c | 3 --- 3 files changed, 8 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

On 20:40 Thu 05 Feb , Kumar Gala wrote:
We have common defines that we duplicate in various ways. Having an arch specific config.h gives us a common location for those defines.
Eventually we should be able to relace this when we have proper Kconfig support.
I've already propose this to Wolfgang when handling FIT and FDT problem and he NACK it
Best Regards, J.

Dear Kumar Gala,
In message 1233888058-21503-1-git-send-email-galak@kernel.crashing.org you wrote:
We have common defines that we duplicate in various ways. Having an arch specific config.h gives us a common location for those defines.
Eventually we should be able to relace this when we have proper Kconfig support.
Signed-off-by: Kumar Gala galak@kernel.crashing.org
include/asm-arm/config.h | 24 ++++++++++++++++++++++++ include/asm-avr32/config.h | 24 ++++++++++++++++++++++++ include/asm-blackfin/config.h | 24 ++++++++++++++++++++++++ include/asm-i386/config.h | 24 ++++++++++++++++++++++++ include/asm-m68k/config.h | 24 ++++++++++++++++++++++++ include/asm-microblaze/config.h | 24 ++++++++++++++++++++++++ include/asm-mips/config.h | 24 ++++++++++++++++++++++++ include/asm-nios/config.h | 24 ++++++++++++++++++++++++ include/asm-nios2/config.h | 24 ++++++++++++++++++++++++ include/asm-ppc/config.h | 24 ++++++++++++++++++++++++ include/asm-sh/config.h | 24 ++++++++++++++++++++++++ include/asm-sparc/config.h | 24 ++++++++++++++++++++++++ mkconfig | 1 + 13 files changed, 289 insertions(+), 0 deletions(-) create mode 100644 include/asm-arm/config.h create mode 100644 include/asm-avr32/config.h create mode 100644 include/asm-blackfin/config.h create mode 100644 include/asm-i386/config.h create mode 100644 include/asm-m68k/config.h create mode 100644 include/asm-microblaze/config.h create mode 100644 include/asm-mips/config.h create mode 100644 include/asm-nios/config.h create mode 100644 include/asm-nios2/config.h create mode 100644 include/asm-ppc/config.h create mode 100644 include/asm-sh/config.h create mode 100644 include/asm-sparc/config.h
Applied, thanks.
Best regards,
Wolfgang Denk
participants (4)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Kumar Gala
-
Stefan Roese
-
Wolfgang Denk