projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flash size was reported incorrectly
[openwrt.git]
/
target
/
linux
/
ifxmips
/
files
/
drivers
/
mtd
/
maps
/
ifxmips.c
diff --git
a/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
b/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
index
a2d30cd
..
ef256f9
100644
(file)
--- a/
target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
+++ b/
target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
@@
-29,9
+29,9
@@
#include <linux/magic.h>
#include <linux/platform_device.h>
#include <linux/magic.h>
#include <linux/platform_device.h>
-#include <
asm/ifxmips/
ifxmips.h>
-#include <
asm/ifxmips/
ifxmips_prom.h>
-#include <
asm/ifxmips/
ifxmips_ebu.h>
+#include <ifxmips.h>
+#include <ifxmips_prom.h>
+#include <ifxmips_ebu.h>
#ifndef CONFIG_MTD_PARTITIONS
#error Please enable CONFIG_MTD_PARTITIONS
#ifndef CONFIG_MTD_PARTITIONS
#error Please enable CONFIG_MTD_PARTITIONS
@@
-134,8
+134,8
@@
int find_uImage_size(unsigned long start_offset)
unsigned long magic;
unsigned long temp;
ifxmips_copy_from(&ifxmips_map, &magic, start_offset, 4);
unsigned long magic;
unsigned long temp;
ifxmips_copy_from(&ifxmips_map, &magic, start_offset, 4);
- if (
!(ntohl(magic) == 0x27051956)
) {
- printk(KERN_INFO "ifxmips_mtd: invalid magic (0x%08X) of kernel at 0x%08lx \n",
ntohl
(magic), start_offset);
+ if (
le32_to_cpu(magic) != 0x56190527
) {
+ printk(KERN_INFO "ifxmips_mtd: invalid magic (0x%08X) of kernel at 0x%08lx \n",
le32_to_cpu
(magic), start_offset);
return 0;
}
ifxmips_copy_from(&ifxmips_map, &temp, start_offset + 12, 4);
return 0;
}
ifxmips_copy_from(&ifxmips_map, &temp, start_offset + 12, 4);
@@
-159,7
+159,7
@@
int detect_squashfs_partition(unsigned long start_offset)
{
unsigned long temp;
ifxmips_copy_from(&ifxmips_map, &temp, start_offset, 4);
{
unsigned long temp;
ifxmips_copy_from(&ifxmips_map, &temp, start_offset, 4);
- return
temp
== SQUASHFS_MAGIC;
+ return
le32_to_cpu(temp)
== SQUASHFS_MAGIC;
}
static int ifxmips_mtd_probe(struct platform_device *dev)
}
static int ifxmips_mtd_probe(struct platform_device *dev)
@@
-244,7
+244,7
@@
static int ifxmips_mtd_probe(struct platform_device *dev)
add_mtd_partitions(ifxmips_mtd, &ifxmips_meta_partition, 1);
printk(KERN_INFO "ifxmips_mtd: added %s flash with %dMB\n",
add_mtd_partitions(ifxmips_mtd, &ifxmips_meta_partition, 1);
printk(KERN_INFO "ifxmips_mtd: added %s flash with %dMB\n",
- ifxmips_map.name,
ifxmips_mtd->size
>> 20);
+ ifxmips_map.name,
((int)ifxmips_mtd->size)
>> 20);
return 0;
}
return 0;
}
This page took
0.023664 seconds
and
4
git commands to generate.