summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/octeon/cvmx-bootmem.h
diff options
context:
space:
mode:
authorPaul Martin <paul.martin@codethink.co.uk>2015-03-30 16:00:56 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2015-04-01 15:22:14 (GMT)
commit11db04c8f3f2353b45848ceda2e6e3440520f7cb (patch)
tree1c2acd6c46f0444f0e3cb19e7051c3baf3a78ebf /arch/mips/include/asm/octeon/cvmx-bootmem.h
parent0a1cd2c5887cc87178adf9f58191a18cca8c55c0 (diff)
downloadlinux-11db04c8f3f2353b45848ceda2e6e3440520f7cb.tar.xz
MIPS: Octeon: Turn hardware bitfields and structures inside out.
Although the proper way to do this for bitfields would be to use the macro that Ralf has provided, this is a little easier to understand as a diff. Signed-off-by: Paul Martin <paul.martin@codethink.co.uk> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9628/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx-bootmem.h')
-rw-r--r--arch/mips/include/asm/octeon/cvmx-bootmem.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx-bootmem.h b/arch/mips/include/asm/octeon/cvmx-bootmem.h
index 352f1dc..3745625 100644
--- a/arch/mips/include/asm/octeon/cvmx-bootmem.h
+++ b/arch/mips/include/asm/octeon/cvmx-bootmem.h
@@ -95,6 +95,7 @@ struct cvmx_bootmem_named_block_desc {
* positions for backwards compatibility.
*/
struct cvmx_bootmem_desc {
+#if defined(__BIG_ENDIAN_BITFIELD) || defined(CVMX_BUILD_FOR_LINUX_HOST)
/* spinlock to control access to list */
uint32_t lock;
/* flags for indicating various conditions */
@@ -120,7 +121,20 @@ struct cvmx_bootmem_desc {
uint32_t named_block_name_len;
/* address of named memory block descriptors */
uint64_t named_block_array_addr;
+#else /* __LITTLE_ENDIAN */
+ uint32_t flags;
+ uint32_t lock;
+ uint64_t head_addr;
+ uint32_t minor_version;
+ uint32_t major_version;
+ uint64_t app_data_addr;
+ uint64_t app_data_size;
+
+ uint32_t named_block_name_len;
+ uint32_t named_block_num_blocks;
+ uint64_t named_block_array_addr;
+#endif
};
/**