Tidy up c2k_otp.h and mach/otp.h files

We had accidentally ended up with two files that defined the otp_write and
otp_read functions. Instead, put the prototypes in c2k_otp.h, and implementation
details in mach/otp.h

Change-Id: I768dccb86686acec7aab9d39164867db943389f2
diff --git a/arch/arm/mach-comcerto/include/mach/otp.h b/arch/arm/mach-comcerto/include/mach/otp.h
index 989c3ee..a915e67 100644
--- a/arch/arm/mach-comcerto/include/mach/otp.h
+++ b/arch/arm/mach-comcerto/include/mach/otp.h
@@ -34,9 +34,5 @@
 #define OTP_DATA_OUTPUT         (COMCERTO_OTP_BASE + 0x50)
 #define OTP_HW_SEC_MODE_STATUS  (COMCERTO_OTP_BASE + 0x54)
 
-void otp_wr(u32 s_addr, u8 *prog_data) ;
-
-int otp_read(u32 s_addr, u8 *read_data, int size) ;
-
 #endif
 
diff --git a/commands/otp_key.c b/commands/otp_key.c
index bd0d0c4..b9d0c3b 100644
--- a/commands/otp_key.c
+++ b/commands/otp_key.c
@@ -24,6 +24,7 @@
 
 #include <c2k_otp.h>
 #include <command.h>
+#include <common.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <fs.h>
diff --git a/drivers/otp/c2k_otp.c b/drivers/otp/c2k_otp.c
index 8dd2eed..74218a4 100644
--- a/drivers/otp/c2k_otp.c
+++ b/drivers/otp/c2k_otp.c
@@ -61,13 +61,17 @@
 }
 
 /*
- ****************************************
- *   otp_write()
+ * Writes to the OTP.
  *
- * PARAMETERS:
- *	s_addr -- Starting Address
- *	prog_data -- Source Data Buffer
- ****************************************
+ * Take care: although this method takes a u8 array for the
+ * data being written, each element represents only one bit
+ * in the OTP. If set to 1, the OTP is flashed at that bit.
+ * If set to 0, it is not. It is undefined what happens if it
+ * is set to a value other than 0 or 1.
+ *
+ * @offset:    The offset to write to, in bits.
+ * @prog_data: A *bit* array to write data from.
+ * @size:      The number of *bits* to write.
  */
 int otp_write(u32 offset, u8 *prog_data, int size)
 {
@@ -148,14 +152,13 @@
 }
 
 /*
- ****************************************
- *   otp_read ()
+ * Reads from the OTP.
  *
- * PARAMETERS:
- *	s_addr --Starting Address
- *	read_data --Destination Buffer
- *	size -- No of Bytes to read
- ****************************************
+ * @offset:    The offset to read from, in bits.
+ * @read_data: The buffer to read data into.
+ * @size:      The number of *bytes* to read.
+ *
+ * @return     0 if successful, non-zero otherwise
  */
 int otp_read(u32 offset, u8 *read_data, int size)
 {
diff --git a/include/c2k_otp.h b/include/c2k_otp.h
index 96c78b9..40d75ff 100644
--- a/include/c2k_otp.h
+++ b/include/c2k_otp.h
@@ -3,30 +3,7 @@
 
 #include <common.h>
 
-/*
- * Reads from the OTP.
- *
- * @offset:	The offset to read from, in bits.
- * @read_data:	The buffer to read data into.
- * @size:	The number of *bytes* to read.
- *
- * @return	0 if successful, non-zero otherwise
- */
-int otp_read(u32 offset, u8 *read_data, int size);
-
-/*
- * Writes to the OTP.
- *
- * Take care: although this method takes a u8 array for the
- * data being written, each element represents only one bit
- * in the OTP. If set to 1, the OTP is flashed at that bit.
- * If set to 0, it is not. It is unknown what happens if it
- * is set to a value other than 0 or 1.
- *
- * @offset:	The offset to write to, in bits.
- * @prog_data:	A *bit* array to write data from.
- * @size:	The number of *bits* to write.
- */
-void otp_write(u32 offset, u8 *prog_data, int size);
+int otp_read(u32 s_addr, u8 *read_data, int size) ;
+int otp_write(u32 offset, u8 *prog_data, int size);
 
 #endif