CLEANUP: Cleanup of include/ directory
cover CLEANUP: Cleanup of include/ directory
This series fixes the warnings generated by new debug() macro implementation, which will be merged after this series. This series fixes the problems before the macro is reworked to avoid smooth transition. Most of the problems fixed by this series are printf() formating related problems.
Marek Vasut (4):
GCC4.6: Squash warning in cmd_date.c
RFT GCC4.6: Fix muas3001 and IDS8247
GCC4.6: Squash GTREADREG related errors
GCC4.6: Squash warning in lcd.c
include/configs/IDS8247.h | 4 ++++ include/configs/PCIPPC2.h | 4 ++++ include/configs/PCIPPC6.h | 4 ++++ include/configs/mpc7448hpc2.h | 4 ++++ include/configs/muas3001.h | 4 ++++ include/configs/p3mx.h | 4 ++++ include/configs/ppmc7xx.h | 4 ++++ include/i2c.h | 32 +++++++++++++++++++++++--------- include/lcd.h | 4 ++-- 9 files changed, 53 insertions(+), 11 deletions(-)
Signature · 1 line
1.7.6.3
PATCH 1/4 GCC4.6: Squash warning in cmd_date.c
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]
--- include/i2c.h | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-)
include/i2c.h +23 -9
@@ -46,16 +46,16 @@*/ #define I2C_RXTX_LEN 128/* maximum tx/rx buffer length */ -#if defined(CONFIG_I2C_MULTI_BUS ) -#if !defined(CONFIG_SYS_MAX_I2C_BUS ) -#define CONFIG_SYS_MAX_I2C_BUS 2 -#endif -#define I2C_GET_BUS () i2c_get_bus_num() -#define I2C_SET_BUS (a) i2c_set_bus_num(a) +#ifdef CONFIG_I2C_MULTI_BUS +#define MAX_I2C_BUS 2 +#define I2C_MULTI_BUS 1#else -#define CONFIG_SYS_MAX_I2C_BUS 1 -#define I2C_GET_BUS () 0 -#define I2C_SET_BUS (a) +#define MAX_I2C_BUS 1 +#define I2C_MULTI_BUS 0 +#endif + +#if !defined(CONFIG_SYS_MAX_I2C_BUS ) +#define CONFIG_SYS_MAX_I2C_BUS MAX_I2C_BUS#endif /* define the I2C bus number for RTC and DTT if not already done */
@@ -236,4 +236,18 @@ int i2c_set_bus_speed(unsigned int);unsigned int i2c_get_bus_speed (void ); +/* NOTE: These two functions MUST be always_inline to avoid code growth! */ +static inline unsigned int I2C_GET_BUS (void ) __attribute__((always_inline)); +static inline unsigned int I2C_GET_BUS (void ) +{ +return I2C_MULTI_BUS ?i2c_get_bus_num () :0 ; +} + +static inline void I2C_SET_BUS (unsigned int bus) __attribute__((always_inline)); +static inline void I2C_SET_BUS (unsigned int bus) +{ +if (I2C_MULTI_BUS ) +i2c_set_bus_num (bus); +} +#endif /* _I2C_H_ */
Signature · 1 line
1.7.6.3
Wolfgang Denk
AppliedPATCH 1/4 GCC4.6: Squash warning in cmd_date.c
Dear Marek Vasut,
Quoted 11 lines · In message <[email protected]> you wrote:
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Mike Frysinger <[email protected]>--- include/i2c.h | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 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 365 Days of drinking Lo-Cal beer. = 1 Lite-year
PATCH 2/4 RFT GCC4.6: Fix muas3001 and IDS8247
In reply to Marek VasutThe boards suffer from the following error due to undefined configuration variables:
Configuring for IDS8247 board...
ether_fcc.c:75: error: 'CONFIG_SYS_CMXFCR_MASK1' undeclared here (not in a function)
ether_fcc.c:76: error: 'CONFIG_SYS_CMXFCR_VALUE1' undeclared here (not in a function)
--- include/configs/IDS8247.h | 4 ++++ include/configs/muas3001.h | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-)
include/configs/IDS8247.h +4 -0
@@ -147,6 +147,10 @@#define CONFIG_ETHER_INDEX 1/* which SCC/FCC channel for ethernet */ #define CONFIG_ETHER_ON_FCC1 #define FCC_ENET +#define CONFIG_SYS_CMXFCR_MASK1 \ + (CMXFCR_FC1 | CMXFCR_RF1CS_MSK | CMXFCR_TF1CS_MSK) +#define CONFIG_SYS_CMXFCR_VALUE1 \ + (CMXFCR_RF1CS_CLK11 | CMXFCR_TF1CS_CLK12)/* * - Rx-CLK is CLK10
include/configs/muas3001.h +4 -0
@@ -78,6 +78,10 @@#define CONFIG_ETHER_ON_FCC1 #define CONFIG_HAS_ETH0 #define FCC_ENET +#define CONFIG_SYS_CMXFCR_MASK1 \ + (CMXFCR_FC1 | CMXFCR_RF1CS_MSK | CMXFCR_TF1CS_MSK) +#define CONFIG_SYS_CMXFCR_VALUE1 \ + (CMXFCR_RF1CS_CLK11 | CMXFCR_TF1CS_CLK12)/* * - Rx-CLK is CLK11
Signature · 1 line
1.7.6.3
PATCH 2/4 RFT GCC4.6: Fix muas3001 and IDS8247
Dear Marek Vasut,
Quoted 14 lines · In message <[email protected]> you wrote:
The boards suffer from the following error due to undefined configuration variables:
Configuring for IDS8247 board...
ether_fcc.c:75: error: 'CONFIG_SYS_CMXFCR_MASK1' undeclared here (not in a function)
ether_fcc.c:76: error: 'CONFIG_SYS_CMXFCR_VALUE1' undeclared here (not in a function)Signed-off-by Marek Vasut <[email protected]>Cc Heiko Schocher <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Mike Frysinger <[email protected]>
Quoted 4 lines
--- include/configs/IDS8247.h | 4 ++++ include/configs/muas3001.h | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-)
Collission with commit d4590da4 by Mike Frysinger. Dropped.
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 Never ascribe to malice that which can adequately be explained by stupidity.
PATCH 3/4 GCC4.6: Squash GTREADREG related errors
In reply to Marek Vasutinterrupts.c: In function 'interrupt_init_cpu':
interrupts.c:37: warning: implicit declaration of function 'GTREGREAD' interrupts.c:37: error: 'LOW_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:37: error: (Each undeclared identifier is reported only once interrupts.c:37: error: for each function it appears in.) interrupts.c:37: error: 'HIGH_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:40: error: 'ETHERNET0_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:40: error: 'ETHERNET1_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:40: error: 'ETHERNET2_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:44: error: 'ETHERNET0_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
interrupts.c:44: error: 'ETHERNET1_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
interrupts.c:44: error: 'ETHERNET2_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
--- include/configs/PCIPPC2.h | 4 ++++ include/configs/PCIPPC6.h | 4 ++++ include/configs/mpc7448hpc2.h | 4 ++++ include/configs/p3mx.h | 4 ++++ include/configs/ppmc7xx.h | 4 ++++ 5 files changed, 20 insertions(+), 0 deletions(-)
include/configs/PCIPPC2.h +4 -0
@@ -55,6 +55,10 @@#define CONFIG_PREBOOT ""#define CONFIG_BOOTDELAY 5 +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif +/* * BOOTP options */
include/configs/PCIPPC6.h +4 -0
@@ -55,6 +55,10 @@#define CONFIG_PREBOOT ""#define CONFIG_BOOTDELAY 5 +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif +/* * BOOTP options */
include/configs/mpc7448hpc2.h +4 -0
@@ -54,6 +54,10 @@#undef CONFIG_ECC/* disable ECC support */ +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif +/* Board-specific Initialization Functions to be called */ #define CONFIG_SYS_BOARD_ASM_INIT #define CONFIG_BOARD_EARLY_INIT_F
include/configs/p3mx.h +4 -0
@@ -447,4 +447,8 @@#define L2_ENABLE (L2_INIT | L2CR_L2E) +#ifndef __ASSEMBLY__ +#include <../board/Marvell/include/core.h> +#endif +#endif /* __CONFIG_H */
include/configs/ppmc7xx.h +4 -0
@@ -51,6 +51,10 @@#define CONFIG_SYS_TEXT_BASE 0xFFF00000 +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif +/* * Monitor configuration *
Signature · 1 line
1.7.6.3
Wolfgang Denk
AppliedPATCH 3/4 GCC4.6: Squash GTREADREG related errors
Dear Marek Vasut,
Quoted 25 lines · In message <[email protected]> you wrote:
interrupts.c: In function 'interrupt_init_cpu':
interrupts.c:37: warning: implicit declaration of function 'GTREGREAD' interrupts.c:37: error: 'LOW_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:37: error: (Each undeclared identifier is reported only once interrupts.c:37: error: for each function it appears in.) interrupts.c:37: error: 'HIGH_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:40: error: 'ETHERNET0_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:40: error: 'ETHERNET1_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:40: error: 'ETHERNET2_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:44: error: 'ETHERNET0_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
interrupts.c:44: error: 'ETHERNET1_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
interrupts.c:44: error: 'ETHERNET2_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)Signed-off-by Marek Vasut <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Mike Frysinger <[email protected]>
Quoted 7 lines
--- include/configs/PCIPPC2.h | 4 ++++ include/configs/PCIPPC6.h | 4 ++++ include/configs/mpc7448hpc2.h | 4 ++++ include/configs/p3mx.h | 4 ++++ include/configs/ppmc7xx.h | 4 ++++ 5 files changed, 20 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 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 Women professionals do tend to over-compensate. -- Dr. Elizabeth Dehaver, "Where No Man Has Gone Before", stardate 1312.9.
PATCH 4/4 GCC4.6: Squash warning in lcd.c
In reply to Marek Vasutlcd.c: In function 'lcd_setmem':
lcd.c:446:2: warning: format '%d' expects type 'int', but argument 2 has type 'u_long'
lcd.c:446:2: warning: format '%d' expects type 'int', but argument 3 has type 'u_long'
--- include/lcd.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/lcd.h +2 -2
@@ -159,8 +159,8 @@ typedef struct vidinfo { #elif defined(CONFIG_ATMEL_LCD) typedef struct vidinfo { - u_long vl_col; /* Number of columns (i.e. 640) */ - u_long vl_row; /* Number of rows (i.e. 480) */ + ushort vl_col; /* Number of columns (i.e. 640) */ + ushort vl_row; /* Number of rows (i.e. 480) */ u_long vl_clk; /* pixel clock in ps */ /* LCD configuration register */
Signature · 1 line
1.7.6.3
Wolfgang Denk
AppliedPATCH 4/4 GCC4.6: Squash warning in lcd.c
Dear Marek Vasut,
Quoted 6 lines · In message <[email protected]> you wrote:
lcd.c: In function 'lcd_setmem':
lcd.c:446:2: warning: format '%d' expects type 'int', but argument 2 has type 'u_long'
lcd.c:446:2: warning: format '%d' expects type 'int', but argument 3 has type 'u_long'
Quoted 7 lines
Signed-off-by Marek Vasut <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Mike Frysinger <[email protected]>--- include/lcd.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
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 The only solution is ... a balance of power. We arm our side with exactly that much more. A balance of power -- the trickiest, most difficult, dirtiest game of them all. But the only one that preserves both sides. -- Kirk, "A Private Little War", stardate 4211.8