]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
MIPS: Octeon: Move cvmx_fuse_read_byte()
authorAaro Koskinen <aaro.koskinen@nsn.com>
Mon, 8 Sep 2014 15:25:40 +0000 (18:25 +0300)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 24 Nov 2014 06:45:32 +0000 (07:45 +0100)
Move cvmx_fuse_read_byte() into a .c file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: Aaro Koskinen <aaro.koskinen@nsn.com>
Patchwork: https://patchwork.linux-mips.org/patch/7666/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/cavium-octeon/executive/octeon-model.c
arch/mips/include/asm/octeon/cvmx.h

index f4c1b36fdf65d503a13e23de6e2c88a1b8a7bae0..e1878723efd88e4e76ca65d07e0185d58178c7b0 100644 (file)
 
 #include <asm/octeon/octeon.h>
 
+/**
+ * Read a byte of fuse data
+ * @byte_addr:  address to read
+ *
+ * Returns fuse value: 0 or 1
+ */
+uint8_t cvmx_fuse_read_byte(int byte_addr)
+{
+       union cvmx_mio_fus_rcmd read_cmd;
+
+       read_cmd.u64 = 0;
+       read_cmd.s.addr = byte_addr;
+       read_cmd.s.pend = 1;
+       cvmx_write_csr(CVMX_MIO_FUS_RCMD, read_cmd.u64);
+       while ((read_cmd.u64 = cvmx_read_csr(CVMX_MIO_FUS_RCMD))
+              && read_cmd.s.pend)
+               ;
+       return read_cmd.s.dat;
+}
+
 /**
  * Given the chip processor ID from COP0, this function returns a
  * string representing the chip model number. The string is of the
index f991e7701d3d3d4a908af18377d363e10ae6a04c..6852dfa50010df7ac59c022076b540e2af5b05e8 100644 (file)
@@ -451,25 +451,7 @@ static inline uint32_t cvmx_octeon_num_cores(void)
        return cvmx_pop(ciu_fuse);
 }
 
-/**
- * Read a byte of fuse data
- * @byte_addr:  address to read
- *
- * Returns fuse value: 0 or 1
- */
-static uint8_t cvmx_fuse_read_byte(int byte_addr)
-{
-       union cvmx_mio_fus_rcmd read_cmd;
-
-       read_cmd.u64 = 0;
-       read_cmd.s.addr = byte_addr;
-       read_cmd.s.pend = 1;
-       cvmx_write_csr(CVMX_MIO_FUS_RCMD, read_cmd.u64);
-       while ((read_cmd.u64 = cvmx_read_csr(CVMX_MIO_FUS_RCMD))
-              && read_cmd.s.pend)
-               ;
-       return read_cmd.s.dat;
-}
+uint8_t cvmx_fuse_read_byte(int byte_addr);
 
 /**
  * Read a single fuse bit