Skip to contentSkip to conversation

microblaze: Fix unaligned.h for endians

PATCH New Michal Simek 1 participant 4 messages Feb 28, 2011

Subsystems (2)
lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

PATCH 1/1 microblaze: Fix unaligned.h for endians

Based on ARM unaligned.h.

---
 arch/microblaze/include/asm/unaligned.h |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
arch/microblaze/include/asm/unaligned.h +9 -9
index 785c2e9..faf1b02 100644
@@ -1,16 +1,16 @@
 #ifndef _ASM_MICROBLAZE_UNALIGNED_H
 #define _ASM_MICROBLAZE_UNALIGNED_H
 
-#ifdef __KERNEL__
-
-/*
- * The Microblaze can do unaligned accesses itself in big endian mode.
- */
-#include <linux/unaligned/access_ok.h>
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
 #include <linux/unaligned/generic.h>
 
-#define get_unaligned	__get_unaligned_be
-#define put_unaligned	__put_unaligned_be
+#ifdef __MICROBLAZEEL__
+# 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	/* __KERNEL__ */
 #endif	/* _ASM_MICROBLAZE_UNALIGNED_H */
Signature · 1 line
1.5.5.6
author maintainer
#1 lore raw

PATCH 1/1 microblaze: Do not select NFS for platforms without ethernet

Undefined network functionality for systems without ethernet and disable NFS support.

---
 include/configs/microblaze-generic.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +2 -0
index 090ab3b..8cdd72a 100644
@@ -60,6 +60,7 @@
 /*#define	CONFIG_SYS_RESET_ADDRESS	CONFIG_SYS_TEXT_BASE*/
 
 /* ethernet */
+#undef CONFIG_SYS_ENET
 #ifdef XILINX_EMACLITE_BASEADDR
 # define CONFIG_XILINX_EMACLITE		1
 # define CONFIG_SYS_ENET
@@ -243,6 +244,7 @@
 #ifndef CONFIG_SYS_ENET
 # undef CONFIG_CMD_NET
 # undef CONFIG_NET_MULTI
+# undef CONFIG_CMD_NFS
 #else
 # define CONFIG_CMD_PING
 # define CONFIG_CMD_DHCP
Signature · 1 line
1.5.5.6
author maintainer
#2 lore raw

PATCH 1/1 microblaze: Remove address offset for uart16550

U-Boot BSP handle 0x3 offset for big endian systems. Little endian Microblaze systems don't use any offset.

---
 include/configs/microblaze-generic.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/microblaze-generic.h +1 -1
index 8cdd72a..a334110 100644
@@ -44,7 +44,7 @@
 # define CONFIG_SYS_NS16550_REG_SIZE	-4
 # define CONFIG_CONS_INDEX		1
 # define CONFIG_SYS_NS16550_COM1 \
-			(XILINX_UART16550_BASEADDR + 0x1000 + 0x3)
+			(XILINX_UART16550_BASEADDR + 0x1000)
 # define CONFIG_SYS_NS16550_CLK	XILINX_UART16550_CLOCK_HZ
 # define CONFIG_BAUDRATE	115200
 
Signature · 1 line
1.5.5.6
author maintainer
#3 lore raw

PATCH 1/1 microblaze: Fix no return statement from microblaze-generic board

Remove compilation warning for systems without network support.

Warning log:
microblaze-generic.c: In function 'board_eth_init':
microblaze-generic.c:82: warning: no return statement in function returning non-void

---
 .../xilinx/microblaze-generic/microblaze-generic.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
board/xilinx/microblaze-generic/microblaze-generic.c +4 -6
index 183e4dc..5c07fdb 100644
@@ -71,12 +71,10 @@ int fsl_init2 (void) {
 
 int board_eth_init(bd_t *bis)
 {
-	/*
-	 * This board either has PCI NICs or uses the CPU's TSECs
-	 * pci_eth_init() will return 0 if no NICs found, so in that case
-	 * returning -1 will force cpu_eth_init() to be called.
-	 */
+	int ret = 0;
+
 #ifdef CONFIG_XILINX_EMACLITE
-	return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR);
+	ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR);
 #endif
+	return ret;
 }
Signature · 1 line
1.5.5.6