Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'sa11x0-mtd' into sa11x0

-112
-112
drivers/mtd/maps/sa1100-flash.c
··· 23 23 #include <asm/sizes.h> 24 24 #include <asm/mach/flash.h> 25 25 26 - #if 0 27 - /* 28 - * This is here for documentation purposes only - until these people 29 - * submit their machine types. It will be gone January 2005. 30 - */ 31 - static struct mtd_partition consus_partitions[] = { 32 - { 33 - .name = "Consus boot firmware", 34 - .offset = 0, 35 - .size = 0x00040000, 36 - .mask_flags = MTD_WRITABLE, /* force read-only */ 37 - }, { 38 - .name = "Consus kernel", 39 - .offset = 0x00040000, 40 - .size = 0x00100000, 41 - .mask_flags = 0, 42 - }, { 43 - .name = "Consus disk", 44 - .offset = 0x00140000, 45 - /* The rest (up to 16M) for jffs. We could put 0 and 46 - make it find the size automatically, but right now 47 - i have 32 megs. jffs will use all 32 megs if given 48 - the chance, and this leads to horrible problems 49 - when you try to re-flash the image because blob 50 - won't erase the whole partition. */ 51 - .size = 0x01000000 - 0x00140000, 52 - .mask_flags = 0, 53 - }, { 54 - /* this disk is a secondary disk, which can be used as 55 - needed, for simplicity, make it the size of the other 56 - consus partition, although realistically it could be 57 - the remainder of the disk (depending on the file 58 - system used) */ 59 - .name = "Consus disk2", 60 - .offset = 0x01000000, 61 - .size = 0x01000000 - 0x00140000, 62 - .mask_flags = 0, 63 - } 64 - }; 65 - 66 - /* Frodo has 2 x 16M 28F128J3A flash chips in bank 0: */ 67 - static struct mtd_partition frodo_partitions[] = 68 - { 69 - { 70 - .name = "bootloader", 71 - .size = 0x00040000, 72 - .offset = 0x00000000, 73 - .mask_flags = MTD_WRITEABLE 74 - }, { 75 - .name = "bootloader params", 76 - .size = 0x00040000, 77 - .offset = MTDPART_OFS_APPEND, 78 - .mask_flags = MTD_WRITEABLE 79 - }, { 80 - .name = "kernel", 81 - .size = 0x00100000, 82 - .offset = MTDPART_OFS_APPEND, 83 - .mask_flags = MTD_WRITEABLE 84 - }, { 85 - .name = "ramdisk", 86 - .size = 0x00400000, 87 - .offset = MTDPART_OFS_APPEND, 88 - .mask_flags = MTD_WRITEABLE 89 - }, { 90 - .name = "file system", 91 - .size = MTDPART_SIZ_FULL, 92 - .offset = MTDPART_OFS_APPEND 93 - } 94 - }; 95 - 96 - static struct mtd_partition jornada56x_partitions[] = { 97 - { 98 - .name = "bootldr", 99 - .size = 0x00040000, 100 - .offset = 0, 101 - .mask_flags = MTD_WRITEABLE, 102 - }, { 103 - .name = "rootfs", 104 - .size = MTDPART_SIZ_FULL, 105 - .offset = MTDPART_OFS_APPEND, 106 - } 107 - }; 108 - 109 - static void jornada56x_set_vpp(int vpp) 110 - { 111 - if (vpp) 112 - GPSR = GPIO_GPIO26; 113 - else 114 - GPCR = GPIO_GPIO26; 115 - GPDR |= GPIO_GPIO26; 116 - } 117 - 118 - /* 119 - * Machine Phys Size set_vpp 120 - * Consus : SA1100_CS0_PHYS SZ_32M 121 - * Frodo : SA1100_CS0_PHYS SZ_32M 122 - * Jornada56x: SA1100_CS0_PHYS SZ_32M jornada56x_set_vpp 123 - */ 124 - #endif 125 - 126 26 struct sa_subdev_info { 127 27 char name[16]; 128 28 struct map_info map; ··· 273 373 return 0; 274 374 } 275 375 276 - #ifdef CONFIG_PM 277 - static void sa1100_mtd_shutdown(struct platform_device *dev) 278 - { 279 - struct sa_info *info = platform_get_drvdata(dev); 280 - if (info && mtd_suspend(info->mtd) == 0) 281 - mtd_resume(info->mtd); 282 - } 283 - #else 284 - #define sa1100_mtd_shutdown NULL 285 - #endif 286 - 287 376 static struct platform_driver sa1100_mtd_driver = { 288 377 .probe = sa1100_mtd_probe, 289 378 .remove = __exit_p(sa1100_mtd_remove), 290 - .shutdown = sa1100_mtd_shutdown, 291 379 .driver = { 292 380 .name = "sa1100-mtd", 293 381 .owner = THIS_MODULE,