[U-Boot-Users] [PATCH 06/17] ds1722: Fix mutliple warnings and errors and active the ssi for SC520 boards
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Sun May 18 19:09:48 CEST 2008
ds1722.c:6:17: error: ssi.h: No such file or directory
ds1722.c:6:17: error: ssi.h: No such file or directory
cc1: warnings being treated as errors
ds1722.c: In function 'ds1722_select':
ds1722.c:10: warning: implicit declaration of function 'ssi_set_interface'
ds1722.c:11: warning: implicit declaration of function 'ssi_chip_select'
ds1722.c: In function 'ds1722_read':
ds1722.c:24: warning: implicit declaration of function 'ssi_tx_byte'
ds1722.c:25: warning: implicit declaration of function 'ssi_rx_byte'
ds1722.c: In function 'ds1722_probe':
ds1722.c:137: error: 'DS1722_RESOLUTION_12BIT' undeclared (first use in this function)
ds1722.c:137: error: (Each undeclared identifier is reported only once
ds1722.c:137: error: for each function it appears in.)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
drivers/hwmon/ds1722.c | 1 +
include/configs/sc520_cdp.h | 1 +
include/configs/sc520_spunk.h | 1 +
include/ds1722.h | 32 ++++++++++++++++++++++++++++++++
include/ssi.h | 29 +++++++++++++++++++++++++++++
5 files changed, 64 insertions(+), 0 deletions(-)
create mode 100644 include/ds1722.h
create mode 100644 include/ssi.h
diff --git a/drivers/hwmon/ds1722.c b/drivers/hwmon/ds1722.c
index c19ee01..1033a47 100644
--- a/drivers/hwmon/ds1722.c
+++ b/drivers/hwmon/ds1722.c
@@ -4,6 +4,7 @@
#ifdef CONFIG_DS1722
#include <ssi.h>
+#include <ds1722.h>
static void ds1722_select(int dev)
{
diff --git a/include/configs/sc520_cdp.h b/include/configs/sc520_cdp.h
index 4df461d..a810d72 100644
--- a/include/configs/sc520_cdp.h
+++ b/include/configs/sc520_cdp.h
@@ -36,6 +36,7 @@
#define CONFIG_X86 1 /* This is a X86 CPU */
#define CONFIG_SC520 1 /* Include support for AMD SC520 */
#define CONFIG_ALI152X 1 /* Include support for Ali 152x SIO */
+#define CONFIG_SC520_SSI 1
#define CFG_SDRAM_PRECHARGE_DELAY 6 /* 6T */
#define CFG_SDRAM_REFRESH_RATE 78 /* 7.8uS (choices are 7.8, 15.6, 31.2 or 62.5uS) */
diff --git a/include/configs/sc520_spunk.h b/include/configs/sc520_spunk.h
index c6f7f15..cbb3863 100644
--- a/include/configs/sc520_spunk.h
+++ b/include/configs/sc520_spunk.h
@@ -35,6 +35,7 @@
#define CONFIG_X86 1 /* This is a X86 CPU */
#define CONFIG_SC520 1 /* Include support for AMD SC520 */
+#define CONFIG_SC520_SSI 1
#define CFG_SDRAM_PRECHARGE_DELAY 6 /* 6T */
#define CFG_SDRAM_REFRESH_RATE 78 /* 7.8uS (choices are 7.8, 15.6, 31.2 or 62.5uS) */
diff --git a/include/ds1722.h b/include/ds1722.h
new file mode 100644
index 0000000..44f0830
--- /dev/null
+++ b/include/ds1722.h
@@ -0,0 +1,32 @@
+/*
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 _DS1722_H_
+#define _DS1722_H_
+
+#define DS1722_RESOLUTION_8BIT 0x0
+#define DS1722_RESOLUTION_9BIT 0x1
+#define DS1722_RESOLUTION_10BIT 0x2
+#define DS1722_RESOLUTION_11BIT 0x3
+#define DS1722_RESOLUTION_12BIT 0x4
+
+int ds1722_probe(int dev);
+
+#endif /* _DS1722_H_ */
diff --git a/include/ssi.h b/include/ssi.h
new file mode 100644
index 0000000..ec3912b
--- /dev/null
+++ b/include/ssi.h
@@ -0,0 +1,29 @@
+/*
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+#ifdef CONFIG_SC520_SSI
+
+int ssi_set_interface(int freq, int lsb_first, int inv_clock, int inv_phase);
+u8 ssi_txrx_byte(u8 data);
+void ssi_tx_byte(u8 data);
+u8 ssi_rx_byte(void);
+void ssi_chip_select(int dev);
+
+#endif
--
1.5.5.1
More information about the U-Boot
mailing list