Skip to contentSkip to conversation

OMAP3: Remove unused board-types

PATCH Superseded Sanjeev Premi 4 participants 11 messages Apr 24, 2009 – Apr 26, 2009

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

This patch removes all uses of board-type, related definitions and functions.

---
 board/omap3/beagle/beagle.h            |    2 --
 board/omap3/evm/evm.h                  |    2 --
 board/omap3/overo/overo.h              |    2 --
 board/omap3/pandora/pandora.h          |    2 --
 board/omap3/zoom1/zoom1.h              |    2 --
 cpu/arm_cortexa8/omap3/board.c         |    5 +----
 cpu/arm_cortexa8/omap3/sys_info.c      |   19 +------------------
 include/asm-arm/arch-omap3/omap3.h     |    8 --------
 include/asm-arm/arch-omap3/sys_proto.h |    5 +----
 9 files changed, 3 insertions(+), 44 deletions(-)
board/omap3/beagle/beagle.h +0 -2
index d66f159..5d45f01 100644
@@ -24,8 +24,6 @@
 #define _BEAGLE_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"OMAP3 Beagle board",
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
board/omap3/evm/evm.h +0 -2
index 199824f..4a82a7f 100644
@@ -24,8 +24,6 @@
 #define _EVM_H_
 
 const omap3_sysinfo sysinfo = {
-	OMAP3EVM_V1,
-	OMAP3EVM_V2,
 	DDR_DISCRETE,
 	"OMAP3 EVM board",
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
board/omap3/overo/overo.h +0 -2
index e8ccc1d..b595f6a 100644
@@ -24,8 +24,6 @@
 #define _OVERO_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"Gumstix Overo board",
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
board/omap3/pandora/pandora.h +0 -2
index dd09f12..8f0838c 100644
@@ -24,8 +24,6 @@
 #define _PANDORA_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"OMAP3 Pandora",
 	"NAND",
board/omap3/zoom1/zoom1.h +0 -2
index bc8fba8..4f49a41 100644
@@ -28,8 +28,6 @@
 #define _BOARD_ZOOM1_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"OMAP3 Zoom MDK Rev 1",
 	"NAND",
cpu/arm_cortexa8/omap3/board.c +1 -4
index 15ea936..9318e22 100644
@@ -272,11 +272,8 @@ int dram_init(void)
 {
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
-	u32 btype;
 
-	btype = get_board_type();
-
-	display_board_info(btype);
+	display_board_info();
 
 	/*
 	 * If a second bank of DDR is attached to CS1 this is
cpu/arm_cortexa8/omap3/sys_info.c +1 -18
index b385b91..80f6e5e 100644
@@ -130,23 +130,6 @@ u32 get_sdr_cs_offset(u32 cs)
 	return offset;
 }
 
-/***********************************************************************
- * get_board_type() - get board type based on current production stats.
- *  - NOTE-1-: 2 I2C EEPROMs will someday be populated with proper info.
- *    when they are available we can get info from there.  This should
- *    be correct of all known boards up until today.
- *  - NOTE-2- EEPROMs are populated but they are updated very slowly.  To
- *    avoid waiting on them we will use ES version of the chip to get info.
- *    A later version of the FPGA migth solve their speed issue.
- ************************************************************************/
-u32 get_board_type(void)
-{
-	if (get_cpu_rev() == CPU_3430_ES2)
-		return sysinfo.board_type_v2;
-	else
-		return sysinfo.board_type_v1;
-}
-
 /***************************************************************************
  *  get_gpmc0_base() - Return current address hardware will be
  *     fetching from. The below effectively gives what is correct, its a bit
@@ -188,7 +171,7 @@ u32 get_board_rev(void)
 /*********************************************************************
  *  display_board_info() - print banner with board info.
  *********************************************************************/
-void display_board_info(u32 btype)
+void display_board_info(void)
 {
 	char *cpu_s, *mem_s, *sec_s;
 
include/asm-arm/arch-omap3/omap3.h +0 -8
index 8c9656f..d0d2737 100644
@@ -177,14 +177,6 @@ typedef struct gpio {
 #define WIDTH_8BIT		0x0000
 #define WIDTH_16BIT		0x1000	/* bit pos for 16 bit in gpmc */
 
-/* SDP definitions according to FPGA Rev. Is this OK?? */
-#define SDP_3430_V1		0x1
-#define SDP_3430_V2		0x2
-
-/* EVM definitions */
-#define OMAP3EVM_V1		0x1
-#define OMAP3EVM_V2		0x2
-
 /* I2C power management companion definitions */
 #define PWRMGT_ADDR_ID1		0x48
 #define PWRMGT_ADDR_ID2		0x49
include/asm-arm/arch-omap3/sys_proto.h +1 -4
index 8b554bb..1bcec04 100644
@@ -22,8 +22,6 @@
 #define _SYS_PROTO_H_
 
 typedef struct {
-	u32 board_type_v1;
-	u32 board_type_v2;
 	u32 mtype;
 	char *board_string;
 	char *nand_string;
@@ -46,8 +44,7 @@ u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
-u32 get_board_type(void);
-void display_board_info(u32);
+void display_board_info(void);
 u32 get_sdr_cs_size(u32);
 u32 get_sdr_cs_offset(u32);
 u32 is_running_in_sdram(void);
Signature · 1 line
1.6.2.1
#1 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Quoted 6 lines · Sanjeev Premi

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

This patch removes all uses of board-type, related definitions and functions.

I've forget to tell you this on the precedent patch but we have
print_cpuinfo for printing cpu/soc info and checkboard for board info

could you move the STD API

Tks

Best Regards,
J.

#2 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Dear Jean-Christophe,

Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 6 lines · Sanjeev Premi

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

This patch removes all uses of board-type, related definitions and functions.

I've forget to tell you this on the precedent patch but we have
print_cpuinfo

print_cpuinfo() is marked as 'test only' in lib_arm/board.c:

int print_cpuinfo (void); /* test-only */

Dirk

Quoted 13 lines

for printing cpu/soc info and checkboard for board info

could you move the STD API

Tks

Best Regards,
J.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Quoted 8 lines · Dirk Behme

Dear Jean-Christophe,

Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines · Sanjeev Premi

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

This patch removes all uses of board-type, related definitions and functions.

I've forget to tell you this on the precedent patch but we have
print_cpuinfo

print_cpuinfo() is marked as 'test only' in lib_arm/board.c:

int print_cpuinfo (void); /* test-only */

please remove the commet, as it does not apply anymore for years

Best Regards,
J.

#4 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

In reply to Jean-Christophe PLAGNIOL-VILLARD

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 6 lines · Sanjeev Premi

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

This patch removes all uses of board-type, related definitions and functions.

I've forget to tell you this on the precedent patch but we have
print_cpuinfo for printing cpu/soc info and checkboard for board info

could you move the STD API

What exactly do you mean by "move the STD API"?

In which way should the "STD API" be moved, and what exactly is the "STD API" you are referring to?

And please, could you *please* be clear about what your comments mean
- I have no idea if your comment above means that you reject the patch, or if you request it to be changed (in which case I don;t understand how it should be changed, or why), or if you are going to apply it.

Please make this clear.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
				 EARTH
			     smog  |   bricks
			 AIR  --  mud  --  FIRE
			soda water |   tequila
				 WATER
#5 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Quoted 13 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 6 lines · Sanjeev Premi

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

This patch removes all uses of board-type, related definitions and functions.

I've forget to tell you this on the precedent patch but we have
print_cpuinfo for printing cpu/soc info and checkboard for board info

Quoted 6 lines
Quoted 1 line

could you move the STD API

What exactly do you mean by "move the STD API"?

In which way should the "STD API" be moved, and what exactly is the "STD API" you are referring to?

extract of arm init function

#if defined(CONFIG_DISPLAY_CPUINFO)
print_cpuinfo, /* display cpu info (and speed) */
#endif
#if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */
#endif

I want we use the current API and not re-invent a new API for an arch only

so Sanjeev please use it

Quoted 7 lines

And please, could you *please* be clear about what your comments mean
- I have no idea if your comment above means that you reject the patch, or if you request it to be changed (in which case I don;t understand how it should be changed, or why), or if you are going to apply it.

Change requested

Best Regards,
J.

#6 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 5 lines

What exactly do you mean by "move the STD API"?

In which way should the "STD API" be moved, and what exactly is the "STD API" you are referring to?

extract of arm init function

Quoted 8 lines

#if defined(CONFIG_DISPLAY_CPUINFO)
print_cpuinfo, /* display cpu info (and speed) */
#endif
#if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */
#endif

I want we use the current API and not re-invent a new API for an arch only

Well, if you conside rthis the "standard API", this should (1) be documented somewhere, and (2) it must be fixed - at the moment, the code reads:

lib_arm/board.c:int print_cpuinfo (void); /* test-only */

I would not dare to use such a function in my code given the "test-only" comment.

Quoted 6 lines
Quoted 5 lines

And please, could you *please* be clear about what your comments mean
- I have no idea if your comment above means that you reject the patch, or if you request it to be changed (in which case I don;t understand how it should be changed, or why), or if you are going to apply it.

Change requested

That's much better. Now at least we know where we are.

Thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It is better to have tried and failed than to have  failed  to  try,
but the result's the same."                           - Mike Dennison
#7 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Quoted 20 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 5 lines

What exactly do you mean by "move the STD API"?

In which way should the "STD API" be moved, and what exactly is the "STD API" you are referring to?

extract of arm init function

Quoted 8 lines

#if defined(CONFIG_DISPLAY_CPUINFO)
print_cpuinfo, /* display cpu info (and speed) */
#endif
#if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */
#endif

I want we use the current API and not re-invent a new API for an arch only

Quoted 8 lines

Well, if you conside rthis the "standard API", this should (1) be documented somewhere, and (2) it must be fixed - at the moment, the code reads:

lib_arm/board.c:int print_cpuinfo (void); /* test-only */

I would not dare to use such a function in my code given the "test-only" comment.

sorry I've no time to clean every part of the arm as noone else are interrested in old code

so yes it will be cleanup but later asI work on other part of the arm actually which I will finish first

Best Regards,
J.

#8 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Quoted 24 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 23 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 4 lines

What exactly do you mean by "move the STD API"?

In which way should the "STD API" be moved, and what exactly is the "STD API" you are referring to?

extract of arm init function

Quoted 8 lines

#if defined(CONFIG_DISPLAY_CPUINFO)
print_cpuinfo, /* display cpu info (and speed) */
#endif
#if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */
#endif

I want we use the current API and not re-invent a new API for an arch only

Well, if you conside rthis the "standard API", this should (1) be documented somewhere, and (2) it must be fixed - at the moment, the code reads:

lib_arm/board.c:int print_cpuinfo (void); /* test-only */

Quoted 7 lines
Quoted 2 lines

I would not dare to use such a function in my code given the "test-only" comment.

sorry I've no time to clean every part of the arm as noone else are interrested in old code

so yes it will be cleanup but later asI work on other part of the arm actually which I will finish first

Uups :( And this is what I really have a problem with.

We sent a patch which removes only dead code, i.e. which consist only of '-' lines (well, except for the removal of a parameter passed by a function ;) ).

http://lists.denx.de/pipermail/u-boot/2009-April/051338.html

Then we are asked to change other stuff which is touched by this removal, too, to get the patch applied (One could argue that a better way to deal with this would be to apply the code removal patch and ask for sending an *additional* patch to clean up API usage. And not make it dependent. But that's an other topic...)

Then we find that the changes we are asked to do rely on code that is marked with 'test only' and needs documentation.

And the request for this documentation (would it take more than 0.5h?) get the answer above.

And now? What are we supposed to do?

Change our patch based on 'test only' undocumented code?

Or will a trivial 'remove dead code only' patch delayed until e.g. the Kconfig framework or e.g. the new clock framework or e.g. <add what you want> will be ready? And when will this be?

A confused

Dirk

#9 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

Dear Dirk Behme,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 8 lines
Quoted 3 lines

I would not dare to use such a function in my code given the "test-only" comment.

sorry I've no time to clean every part of the arm as noone else are interrested in old code

so yes it will be cleanup but later asI work on other part of the arm actually which I will finish first

Uups :( And this is what I really have a problem with.

Problem solved.

I removed this comment. The patch has been checked into mainline,

Quoted 2 lines

Then we find that the changes we are asked to do rely on code that is marked with 'test only' and needs documentation.

Actualy I removed only the comment. I left the documentation for those who know better than me what's going on.

Quoted 3 lines

And now? What are we supposed to do?

Change our patch based on 'test only' undocumented code?

The test-only has been removed, and the documentation will be added ASAP. Please base your patch on this code as is now (even though the documentation is still missing).

Quoted 3 lines

Or will a trivial 'remove dead code only' patch delayed until e.g. the Kconfig framework or e.g. the new clock framework or e.g. <add what you want> will be ready? And when will this be?

No, it will not be delayed. I will take personal care that it goes into this release. If needed I will apply it myself.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A committee is a group that keeps the minutes and loses hours.
                                                      -- Milton Berle
#10 lore raw

PATCH 1/2 OMAP3: Remove unused board-types

In reply to Sanjeev Premi
Quoted 8 lines · Sanjeev Premi

The board-types defined in struct omap3_sysinfo seem to be unused. The function display_board_info() is passed board type as an argument; which is ignored.

This patch removes all uses of board-type, related definitions and functions.

Quoted 173 lines
---
 board/omap3/beagle/beagle.h            |    2 --
 board/omap3/evm/evm.h                  |    2 --
 board/omap3/overo/overo.h              |    2 --
 board/omap3/pandora/pandora.h          |    2 --
 board/omap3/zoom1/zoom1.h              |    2 --
 cpu/arm_cortexa8/omap3/board.c         |    5 +----
 cpu/arm_cortexa8/omap3/sys_info.c      |   19 +------------------
 include/asm-arm/arch-omap3/omap3.h     |    8 --------
 include/asm-arm/arch-omap3/sys_proto.h |    5 +----
 9 files changed, 3 insertions(+), 44 deletions(-)
board/omap3/beagle/beagle.h +0 -2
index d66f159..5d45f01 100644
@@ -24,8 +24,6 @@
 #define _BEAGLE_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"OMAP3 Beagle board",
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
board/omap3/evm/evm.h +0 -2
index 199824f..4a82a7f 100644
@@ -24,8 +24,6 @@
 #define _EVM_H_
 
 const omap3_sysinfo sysinfo = {
-	OMAP3EVM_V1,
-	OMAP3EVM_V2,
 	DDR_DISCRETE,
 	"OMAP3 EVM board",
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
board/omap3/overo/overo.h +0 -2
index e8ccc1d..b595f6a 100644
@@ -24,8 +24,6 @@
 #define _OVERO_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"Gumstix Overo board",
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
board/omap3/pandora/pandora.h +0 -2
index dd09f12..8f0838c 100644
@@ -24,8 +24,6 @@
 #define _PANDORA_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"OMAP3 Pandora",
 	"NAND",
board/omap3/zoom1/zoom1.h +0 -2
index bc8fba8..4f49a41 100644
@@ -28,8 +28,6 @@
 #define _BOARD_ZOOM1_H_
 
 const omap3_sysinfo sysinfo = {
-	SDP_3430_V1,
-	SDP_3430_V2,
 	DDR_STACKED,
 	"OMAP3 Zoom MDK Rev 1",
 	"NAND",
cpu/arm_cortexa8/omap3/board.c +1 -4
index 15ea936..9318e22 100644
@@ -272,11 +272,8 @@ int dram_init(void)
 {
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
-	u32 btype;
 
-	btype = get_board_type();
-
-	display_board_info(btype);
+	display_board_info();
 
 	/*
 	 * If a second bank of DDR is attached to CS1 this is
cpu/arm_cortexa8/omap3/sys_info.c +1 -18
index b385b91..80f6e5e 100644
@@ -130,23 +130,6 @@ u32 get_sdr_cs_offset(u32 cs)
 	return offset;
 }
 
-/***********************************************************************
- * get_board_type() - get board type based on current production stats.
- *  - NOTE-1-: 2 I2C EEPROMs will someday be populated with proper info.
- *    when they are available we can get info from there.  This should
- *    be correct of all known boards up until today.
- *  - NOTE-2- EEPROMs are populated but they are updated very slowly.  To
- *    avoid waiting on them we will use ES version of the chip to get info.
- *    A later version of the FPGA migth solve their speed issue.
- ************************************************************************/
-u32 get_board_type(void)
-{
-	if (get_cpu_rev() == CPU_3430_ES2)
-		return sysinfo.board_type_v2;
-	else
-		return sysinfo.board_type_v1;
-}
-
 /***************************************************************************
  *  get_gpmc0_base() - Return current address hardware will be
  *     fetching from. The below effectively gives what is correct, its a bit
@@ -188,7 +171,7 @@ u32 get_board_rev(void)
 /*********************************************************************
  *  display_board_info() - print banner with board info.
  *********************************************************************/
-void display_board_info(u32 btype)
+void display_board_info(void)
 {
 	char *cpu_s, *mem_s, *sec_s;
 
include/asm-arm/arch-omap3/omap3.h +0 -8
index 8c9656f..d0d2737 100644
@@ -177,14 +177,6 @@ typedef struct gpio {
 #define WIDTH_8BIT		0x0000
 #define WIDTH_16BIT		0x1000	/* bit pos for 16 bit in gpmc */
 
-/* SDP definitions according to FPGA Rev. Is this OK?? */
-#define SDP_3430_V1		0x1
-#define SDP_3430_V2		0x2
-
-/* EVM definitions */
-#define OMAP3EVM_V1		0x1
-#define OMAP3EVM_V2		0x2
-
 /* I2C power management companion definitions */
 #define PWRMGT_ADDR_ID1		0x48
 #define PWRMGT_ADDR_ID2		0x49
include/asm-arm/arch-omap3/sys_proto.h +1 -4
index 8b554bb..1bcec04 100644
@@ -22,8 +22,6 @@
 #define _SYS_PROTO_H_
 
 typedef struct {
-	u32 board_type_v1;
-	u32 board_type_v2;
 	u32 mtype;
 	char *board_string;
 	char *nand_string;
@@ -46,8 +44,7 @@ u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
-u32 get_board_type(void);
-void display_board_info(u32);
+void display_board_info(void);
 u32 get_sdr_cs_size(u32);
 u32 get_sdr_cs_offset(u32);
 u32 is_running_in_sdram(void);