diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 15:36:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 15:37:15 -0500 |
commit | 7c51d57e9d7fbce89f79c41dc8da383101dbe9c6 (patch) | |
tree | 9f45a5ac5ce627b4c6138595b23ae7f02e1ee7fb /drivers/mtd/ssfdc.c | |
parent | a3a798c88a14b35e5d4ca30716dbc9eb9a1ddfe2 (diff) | |
parent | 85795dac740e63e81aeec8d49aada54ab07656b5 (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (67 commits)
[MTD] [MAPS] Fix printk format warning in nettel.c
[MTD] [NAND] add cmdline parsing (mtdparts=) support to cafe_nand
[MTD] CFI: remove major/minor version check for command set 0x0002
[MTD] [NAND] ndfc driver
[MTD] [TESTS] Fix some size_t printk format warnings
[MTD] LPDDR Makefile and KConfig
[MTD] LPDDR extended physmap driver to support LPDDR flash
[MTD] LPDDR added new pfow_base parameter
[MTD] LPDDR Command set driver
[MTD] LPDDR PFOW definition
[MTD] LPDDR QINFO records definitions
[MTD] LPDDR qinfo probing.
[MTD] [NAND] pxa3xx: convert from ns to clock ticks more accurately
[MTD] [NAND] pxa3xx: fix non-page-aligned reads
[MTD] [NAND] fix nandsim sched.h references
[MTD] [NAND] alauda: use USB API functions rather than constants
[MTD] struct device - replace bus_id with dev_name(), dev_set_name()
[MTD] fix m25p80 64-bit divisions
[MTD] fix dataflash 64-bit divisions
[MTD] [NAND] Set the fsl elbc ECCM according the settings in bootloader.
...
Fixed up trivial debug conflicts in drivers/mtd/devices/{m25p80.c,mtd_dataflash.c}
Diffstat (limited to 'drivers/mtd/ssfdc.c')
-rw-r--r-- | drivers/mtd/ssfdc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c index 33a5d6ed6f18..3f67e00d98e0 100644 --- a/drivers/mtd/ssfdc.c +++ b/drivers/mtd/ssfdc.c | |||
@@ -294,7 +294,8 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
294 | int cis_sector; | 294 | int cis_sector; |
295 | 295 | ||
296 | /* Check for small page NAND flash */ | 296 | /* Check for small page NAND flash */ |
297 | if (mtd->type != MTD_NANDFLASH || mtd->oobsize != OOB_SIZE) | 297 | if (mtd->type != MTD_NANDFLASH || mtd->oobsize != OOB_SIZE || |
298 | mtd->size > UINT_MAX) | ||
298 | return; | 299 | return; |
299 | 300 | ||
300 | /* Check for SSDFC format by reading CIS/IDI sector */ | 301 | /* Check for SSDFC format by reading CIS/IDI sector */ |
@@ -316,7 +317,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
316 | 317 | ||
317 | ssfdc->cis_block = cis_sector / (mtd->erasesize >> SECTOR_SHIFT); | 318 | ssfdc->cis_block = cis_sector / (mtd->erasesize >> SECTOR_SHIFT); |
318 | ssfdc->erase_size = mtd->erasesize; | 319 | ssfdc->erase_size = mtd->erasesize; |
319 | ssfdc->map_len = mtd->size / mtd->erasesize; | 320 | ssfdc->map_len = (u32)mtd->size / mtd->erasesize; |
320 | 321 | ||
321 | DEBUG(MTD_DEBUG_LEVEL1, | 322 | DEBUG(MTD_DEBUG_LEVEL1, |
322 | "SSFDC_RO: cis_block=%d,erase_size=%d,map_len=%d,n_zones=%d\n", | 323 | "SSFDC_RO: cis_block=%d,erase_size=%d,map_len=%d,n_zones=%d\n", |
@@ -327,7 +328,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
327 | ssfdc->heads = 16; | 328 | ssfdc->heads = 16; |
328 | ssfdc->sectors = 32; | 329 | ssfdc->sectors = 32; |
329 | get_chs(mtd->size, NULL, &ssfdc->heads, &ssfdc->sectors); | 330 | get_chs(mtd->size, NULL, &ssfdc->heads, &ssfdc->sectors); |
330 | ssfdc->cylinders = (unsigned short)((mtd->size >> SECTOR_SHIFT) / | 331 | ssfdc->cylinders = (unsigned short)(((u32)mtd->size >> SECTOR_SHIFT) / |
331 | ((long)ssfdc->sectors * (long)ssfdc->heads)); | 332 | ((long)ssfdc->sectors * (long)ssfdc->heads)); |
332 | 333 | ||
333 | DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: using C:%d H:%d S:%d == %ld sects\n", | 334 | DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: using C:%d H:%d S:%d == %ld sects\n", |