[U-Boot-Users] [Patch 1/3] U-Boot-V2:Board:OMAP common board.h

Introduce a common board header for functions required by platform.S This will prevent redundancies of multiple board-xyz.h files all doing the same thing.
This deletes the redundant board-sdp343x.h and fixes the corresponding .c for the change.
Signed-off-by: Raghavendra KH r-khandenahally@ti.com
--- board/omap/board-sdp343x.c | 2 +- board/omap/board-sdp343x.h | 33 --------------------------------- board/omap/board.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 34 deletions(-)
Index: u-boot-v2/board/omap/board.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ u-boot-v2/board/omap/board.h 2008-06-24 02:17:57.000000000 +0200 @@ -0,0 +1,35 @@ +/** + * @file + * @brief exported generic APIs which various board files implement + * + * FileName: board/omap/board.h + * + * This file will not contain any board specific implementations. + */ +/* + * (C) Copyright 2008 + * Texas Instruments, <www.ti.com> + * Raghavendra KH r-khandenahally@ti.com + * + * 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 __BOARD_OMAP_H_ +#define __BOARD_OMAP_H_ + +/** Generic Board initialization called from platform.S */ +void board_init(void); + +#endif /* __BOARD_OMAP_H_ */ Index: u-boot-v2/board/omap/board-sdp343x.h =================================================================== --- u-boot-v2.orig/board/omap/board-sdp343x.h 2008-06-24 02:17:03.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/** - * @file - * @brief exported APIs for board header. - * - * FileName: board/omap/board-sdp343x.h - * - * We may choose to add board specific defines here at a later point of time - */ -/* - * (C) Copyright 2006-2008 - * Texas Instruments, <www.ti.com> - * Nishanth Menon x0nishan@ti.com - * - * 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 __BOARD_SDP343X_H_ -#define __BOARD_SDP343X_H_ - -void board_init(void); -#endif /* __BOARD_SDP343X_H_ */ Index: u-boot-v2/board/omap/board-sdp343x.c =================================================================== --- u-boot-v2.orig/board/omap/board-sdp343x.c 2008-06-24 02:17:03.000000000 +0200 +++ u-boot-v2/board/omap/board-sdp343x.c 2008-06-24 02:17:57.000000000 +0200 @@ -54,7 +54,7 @@ #include <asm/arch/syslib.h> #include <asm/arch/control.h> #include <asm/arch/omap3-mux.h> -#include "board-sdp343x.h" +#include "board.h"
/******************** Board Boot Time *******************/ static void sdrc_init(void);

Hi,
On Mon, Jul 21, 2008 at 07:15:31PM -0500, Khandenahally, Raghavendra wrote:
Introduce a common board header for functions required by platform.S This will prevent redundancies of multiple board-xyz.h files all doing the same thing.
I would prefer another patch. I didn't watch out when board/omap was introduced. In fact, omap is not a board and it's gonna be a mess when all omap boards are going into this directory. So please move the beagle board to board/beagle. We should remove the generic name board/omap sooner or later.
Regards, Sascha

Sascha, Sascha Hauer said the following on 07/22/2008 02:21 AM:
Hi,
On Mon, Jul 21, 2008 at 07:15:31PM -0500, Khandenahally, Raghavendra wrote:
I would prefer another patch. I didn't watch out when board/omap was introduced. In fact, omap is not a board and it's gonna be a mess when
I beg to differ on this, we have so many development platforms on various versions of OMAP all sharing so much board characteristics that it makes more sense to put all omap boards together in the same directory. This is to recover from the mess we have had on other versions where duplication of code was forced due to splitting files accross. Nothing OMAP specific is put there. it is pure board only information over here. Regards, Nishanth Menon

On Tue, Jul 22, 2008 at 06:32:17AM -0500, Nishanth Menon wrote:
Sascha, Sascha Hauer said the following on 07/22/2008 02:21 AM:
Hi,
On Mon, Jul 21, 2008 at 07:15:31PM -0500, Khandenahally, Raghavendra wrote:
I would prefer another patch. I didn't watch out when board/omap was introduced. In fact, omap is not a board and it's gonna be a mess when
I beg to differ on this, we have so many development platforms on various versions of OMAP all sharing so much board characteristics that it makes more sense to put all omap boards together in the same directory. This is to recover from the mess we have had on other versions where duplication of code was forced due to splitting files accross. Nothing OMAP specific is put there.
And this is exactly the problem I have with this name. I don't have a problem with putting multiple boards in one directory, it's only the name which makes people think, hm, my board is omap based, I'll put mine there, too. Besides, I still think it's better to put one board in one directory and once we realize that code would be useful for more than one board move it one level up, arch/arm/mach-omap in this case. The only code shared between omap boards so far is 10 lines of assembly code. Is there more to come?
Regards, Sascha
participants (3)
-
Khandenahally, Raghavendra
-
Nishanth Menon
-
Sascha Hauer