[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] [PATCH] microblaze: Fix cramfs recognition (endianness)



This patch is relative to 2.6.30-rc6.

The cramfs driver in the mainline kernel supports only native-endian 
filesystems. The Microblaze startup code should do the same.

Signed-off-by: Steven J. Magnani <steve@xxxxxxxxxxxxxxx>
---
diff -uprN a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
--- a/arch/microblaze/kernel/setup.c	2009-05-20 10:34:52.000000000 -0500
+++ b/arch/microblaze/kernel/setup.c	2009-05-20 10:36:40.000000000 -0500
@@ -23,6 +23,7 @@
 #include <linux/bug.h>
 #include <linux/param.h>
 #include <linux/cache.h>
+#include <linux/cramfs_fs.h>
 #include <asm/cacheflush.h>
 #include <asm/entry.h>
 #include <asm/cpuinfo.h>
@@ -90,12 +91,12 @@ inline unsigned get_romfs_len(unsigned *
 #endif
 
 #ifdef CONFIG_CRAMFS
-	if (addr[0] == le32_to_cpu(0x28cd3d45)) /* cramfs */
-		return le32_to_cpu(addr[1]);
+	if (addr[0] == CRAMFS_MAGIC)
+		return addr[1];
 #endif
 	return 0;
 }
-#endif	/* CONFIG_MTD_UCLINUX_EBSS */
+#endif	/* CONFIG_MTD_UCLINUX */
 
 void __init machine_early_init(const char *cmdline, unsigned int ram,
 		unsigned int fdt)

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/