[U-Boot] [PATCH] trab: rename spi_init()

Mike Frysinger vapier at gentoo.org
Thu Aug 13 06:32:14 CEST 2009


The local board-specific spi_init() function conflicts with the common SPI
layer, so rename it to something board-specific.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
Note: i've only semi-compile tested this because building for arm results
 in common math build/link failures related to libgcc math and i really
 have no interest in tracking those down

 board/trab/cmd_trab.c |    8 ++++----
 board/trab/trab_fkt.c |    2 +-
 board/trab/tsc2000.c  |    2 +-
 board/trab/tsc2000.h  |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/board/trab/cmd_trab.c b/board/trab/cmd_trab.c
index d0465fb..ae6f7c6 100644
--- a/board/trab/cmd_trab.c
+++ b/board/trab/cmd_trab.c
@@ -106,7 +106,7 @@ extern int i2c_write (uchar, uint, int , uchar* , int);
 extern int i2c_read (uchar, uint, int , uchar* , int);
 extern void tsc2000_reg_init (void);
 extern s32 tsc2000_contact_temp (void);
-extern void spi_init(void);
+extern void tsc2000_spi_init(void);
 
 /* function declarations */
 int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
@@ -175,7 +175,7 @@ int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	led_init ();
 	global_vars_init ();
 	test_function_table_init ();
-	spi_init ();
+	tsc2000_spi_init ();
 
 	if (global_vars_write_to_eeprom () != 0) {
 		printf ("%s: error writing global_vars to eeprom\n",
@@ -336,7 +336,7 @@ int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		return 1;
 	}
 
-	spi_init ();
+	tsc2000_spi_init ();
 
 	contact_temp = tsc2000_contact_temp();
 	printf ("%d degree C * 100\n", contact_temp) ;
@@ -859,7 +859,7 @@ int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		delay = simple_strtoul(argv[1], NULL, 10);
 	}
 
-	spi_init ();
+	tsc2000_spi_init ();
 	while (1) {
 
 #if defined(CONFIG_CMD_DATE)
diff --git a/board/trab/trab_fkt.c b/board/trab/trab_fkt.c
index 53cdb5a..74cdbfc 100644
--- a/board/trab/trab_fkt.c
+++ b/board/trab/trab_fkt.c
@@ -729,7 +729,7 @@ int do_dac (char **argv)
 	int brightness;
 
 	/* initialize SPI */
-	spi_init ();
+	tsc2000_spi_init ();
 
 	if  (((brightness = simple_strtoul (argv[2], NULL, 10)) < 0) ||
 	     (brightness > 255)) {
diff --git a/board/trab/tsc2000.c b/board/trab/tsc2000.c
index f13a5a9..986b6fb 100644
--- a/board/trab/tsc2000.c
+++ b/board/trab/tsc2000.c
@@ -42,7 +42,7 @@
  */
 #define MAX_DEVIATION	18	/* unit: DIGITs of adc; 18 DIGIT = 0.5 °C */
 
-void spi_init(void)
+void tsc2000_spi_init(void)
 {
 	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
 	S3C24X0_SPI * const spi = S3C24X0_GetBase_SPI();
diff --git a/board/trab/tsc2000.h b/board/trab/tsc2000.h
index af1b644..50c09c2 100644
--- a/board/trab/tsc2000.h
+++ b/board/trab/tsc2000.h
@@ -121,7 +121,7 @@ void tsc2000_set_range (unsigned int);
 void tsc2000_reg_init (void);
 s32 tsc2000_contact_temp (void);
 void spi_wait_transmit_done (void);
-void spi_init(void);
+void tsc2000_spi_init(void);
 int tsc2000_interpolate(long value, long data[][2], long *result);
 void adc_wait_conversion_done(void);
 
-- 
1.6.3.3



More information about the U-Boot mailing list