public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c
@ 2010-03-01  7:28 Thomas Chou
  2010-03-05 11:40 ` Mike Frysinger
  2010-03-16 16:24 ` Scott McNutt
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Chou @ 2010-03-01  7:28 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 include/asm-nios2/unaligned.h |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-nios2/unaligned.h

diff --git a/include/asm-nios2/unaligned.h b/include/asm-nios2/unaligned.h
new file mode 100644
index 0000000..483dd04
--- /dev/null
+++ b/include/asm-nios2/unaligned.h
@@ -0,0 +1,19 @@
+#ifndef _ASM_NIOS2_UNALIGNED_H
+#define _ASM_NIOS2_UNALIGNED_H
+
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
+#include <linux/unaligned/generic.h>
+
+/*
+ * Select endianness
+ */
+#ifndef __NIOS2EB__
+#define get_unaligned	__get_unaligned_le
+#define put_unaligned	__put_unaligned_le
+#else
+#define get_unaligned	__get_unaligned_be
+#define put_unaligned	__put_unaligned_be
+#endif
+
+#endif /* _ASM_NIOS2_UNALIGNED_H */
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c
  2010-03-01  7:28 [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c Thomas Chou
@ 2010-03-05 11:40 ` Mike Frysinger
  2010-03-07  3:42   ` Thomas Chou
  2010-03-16 16:24 ` Scott McNutt
  1 sibling, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2010-03-05 11:40 UTC (permalink / raw)
  To: u-boot

i posted an asm-generic version recently i think you should be able to
leverage ...
-mike

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c
  2010-03-05 11:40 ` Mike Frysinger
@ 2010-03-07  3:42   ` Thomas Chou
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Chou @ 2010-03-07  3:42 UTC (permalink / raw)
  To: u-boot

On 03/05/2010 07:40 PM, Mike Frysinger wrote:
> i posted an asm-generic version recently i think you should be able to
> leverage ...
> -mike
>
>
>    
Hi Mke,

Thanks. I will take it.

On the other side, I think it will be helpful if we have a generic 
bitops.h. We need it for ubifs/ubi support on nios2 boards.

/* copied from linux-2.6/include/asm-generic/bitops */
#include <asm-generic/bitops/atomic.h>
#include <asm-generic/bitops/non-atomic.h>
#include <asm-generic/bitops/ffs.h>

Cheers,
Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c
  2010-03-01  7:28 [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c Thomas Chou
  2010-03-05 11:40 ` Mike Frysinger
@ 2010-03-16 16:24 ` Scott McNutt
  1 sibling, 0 replies; 4+ messages in thread
From: Scott McNutt @ 2010-03-16 16:24 UTC (permalink / raw)
  To: u-boot

Thomas,

This patch ignored due to your subsequent patch (03/14/2010).

Regards,
--Scott

Thomas Chou wrote:
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>  include/asm-nios2/unaligned.h |   19 +++++++++++++++++++
>  1 files changed, 19 insertions(+), 0 deletions(-)
>  create mode 100644 include/asm-nios2/unaligned.h
> 
> diff --git a/include/asm-nios2/unaligned.h b/include/asm-nios2/unaligned.h
> new file mode 100644
> index 0000000..483dd04
> --- /dev/null
> +++ b/include/asm-nios2/unaligned.h
> @@ -0,0 +1,19 @@
> +#ifndef _ASM_NIOS2_UNALIGNED_H
> +#define _ASM_NIOS2_UNALIGNED_H
> +
> +#include <linux/unaligned/le_byteshift.h>
> +#include <linux/unaligned/be_byteshift.h>
> +#include <linux/unaligned/generic.h>
> +
> +/*
> + * Select endianness
> + */
> +#ifndef __NIOS2EB__
> +#define get_unaligned	__get_unaligned_le
> +#define put_unaligned	__put_unaligned_le
> +#else
> +#define get_unaligned	__get_unaligned_be
> +#define put_unaligned	__put_unaligned_be
> +#endif
> +
> +#endif /* _ASM_NIOS2_UNALIGNED_H */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-16 16:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01  7:28 [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c Thomas Chou
2010-03-05 11:40 ` Mike Frysinger
2010-03-07  3:42   ` Thomas Chou
2010-03-16 16:24 ` Scott McNutt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox