diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-06-27 20:20:11 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2011-06-27 20:20:11 +0000 |
commit | e439de144f0bd6dd3cdea921960bb5ae9a7be208 (patch) | |
tree | d891aa27a5c8e6557e4dca0a35f3f7c28d6ab7b6 /target/linux/brcm47xx/patches-3.0/230-flash_linux_3_0.patch | |
parent | c1873c46b86fd0bc0d2bc4177209404f0a614097 (diff) | |
download | master-31e0f0ae-e439de144f0bd6dd3cdea921960bb5ae9a7be208.tar.gz master-31e0f0ae-e439de144f0bd6dd3cdea921960bb5ae9a7be208.tar.bz2 master-31e0f0ae-e439de144f0bd6dd3cdea921960bb5ae9a7be208.zip |
brcm47xx: fix Linux-3.0 and fix clock rate detection.
SVN-Revision: 27294
Diffstat (limited to 'target/linux/brcm47xx/patches-3.0/230-flash_linux_3_0.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.0/230-flash_linux_3_0.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.0/230-flash_linux_3_0.patch b/target/linux/brcm47xx/patches-3.0/230-flash_linux_3_0.patch new file mode 100644 index 0000000000..c6328139c7 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.0/230-flash_linux_3_0.patch @@ -0,0 +1,68 @@ +--- a/drivers/mtd/maps/bcm47xx-flash.c ++++ b/drivers/mtd/maps/bcm47xx-flash.c +@@ -44,9 +44,7 @@ + #include <linux/wait.h> + #include <linux/mtd/mtd.h> + #include <linux/mtd/map.h> +-#ifdef CONFIG_MTD_PARTITIONS + #include <linux/mtd/partitions.h> +-#endif + #include <linux/crc32.h> + #ifdef CONFIG_SSB + #include <linux/ssb/ssb.h> +@@ -120,7 +118,6 @@ static struct map_info bcm47xx_map = { + phys: WINDOW_ADDR, + }; + +-#ifdef CONFIG_MTD_PARTITIONS + + static struct mtd_partition bcm47xx_parts[] = { + { name: "cfe", offset: 0, size: 0, mask_flags: MTD_WRITEABLE, }, +@@ -552,7 +549,6 @@ init_mtd_partitions(struct mtd_info *mtd + + return bcm47xx_parts; + } +-#endif + + int __init init_bcm47xx_map(void) + { +@@ -561,10 +557,8 @@ int __init init_bcm47xx_map(void) + #endif + size_t size; + int ret = 0; +-#ifdef CONFIG_MTD_PARTITIONS + struct mtd_partition *parts; + int i; +-#endif + + #ifdef CONFIG_SSB + u32 window = mcore->flash_window; +@@ -602,15 +596,13 @@ int __init init_bcm47xx_map(void) + + printk(KERN_NOTICE "Flash device: 0x%x at 0x%x\n", size, WINDOW_ADDR); + +-#ifdef CONFIG_MTD_PARTITIONS + parts = init_mtd_partitions(bcm47xx_mtd, size); + for (i = 0; parts[i].name; i++); +- ret = add_mtd_partitions(bcm47xx_mtd, parts, i); ++ ret = mtd_device_register(bcm47xx_mtd, parts, i); + if (ret) { +- printk(KERN_ERR "Flash: add_mtd_partitions failed\n"); ++ printk(KERN_ERR "Flash: mtd_device_register failed\n"); + goto fail; + } +-#endif + return 0; + + fail: +@@ -624,9 +616,7 @@ int __init init_bcm47xx_map(void) + + void __exit cleanup_bcm47xx_map(void) + { +-#ifdef CONFIG_MTD_PARTITIONS +- del_mtd_partitions(bcm47xx_mtd); +-#endif ++ mtd_device_unregister(bcm47xx_mtd); + map_destroy(bcm47xx_mtd); + iounmap((void *)bcm47xx_map.virt); + } |