diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/mtd/lpddr | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/mtd/lpddr')
-rw-r--r-- | drivers/mtd/lpddr/lpddr_cmds.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 04fdfcca93f7..65655dd59e1f 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * erase, lock/unlock support for LPDDR flash memories | 3 | * erase, lock/unlock support for LPDDR flash memories |
4 | * (C) 2008 Korolev Alexey <akorolev@infradead.org> | 4 | * (C) 2008 Korolev Alexey <akorolev@infradead.org> |
5 | * (C) 2008 Vasiliy Leonenko <vasiliy.leonenko@gmail.com> | 5 | * (C) 2008 Vasiliy Leonenko <vasiliy.leonenko@gmail.com> |
6 | * Many thanks to Roman Borisov for intial enabling | 6 | * Many thanks to Roman Borisov for initial enabling |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
@@ -171,7 +171,7 @@ static int wait_for_ready(struct map_info *map, struct flchip *chip, | |||
171 | mutex_lock(&chip->mutex); | 171 | mutex_lock(&chip->mutex); |
172 | } | 172 | } |
173 | if (chip->erase_suspended || chip->write_suspended) { | 173 | if (chip->erase_suspended || chip->write_suspended) { |
174 | /* Suspend has occured while sleep: reset timeout */ | 174 | /* Suspend has occurred while sleep: reset timeout */ |
175 | timeo = reset_timeo; | 175 | timeo = reset_timeo; |
176 | chip->erase_suspended = chip->write_suspended = 0; | 176 | chip->erase_suspended = chip->write_suspended = 0; |
177 | } | 177 | } |
@@ -313,12 +313,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode) | |||
313 | if (ret) { | 313 | if (ret) { |
314 | /* Oops. something got wrong. */ | 314 | /* Oops. something got wrong. */ |
315 | /* Resume and pretend we weren't here. */ | 315 | /* Resume and pretend we weren't here. */ |
316 | map_write(map, CMD(LPDDR_RESUME), | 316 | put_chip(map, chip); |
317 | map->pfow_base + PFOW_COMMAND_CODE); | ||
318 | map_write(map, CMD(LPDDR_START_EXECUTION), | ||
319 | map->pfow_base + PFOW_COMMAND_EXECUTE); | ||
320 | chip->state = FL_ERASING; | ||
321 | chip->oldstate = FL_READY; | ||
322 | printk(KERN_ERR "%s: suspend operation failed." | 317 | printk(KERN_ERR "%s: suspend operation failed." |
323 | "State may be wrong \n", map->name); | 318 | "State may be wrong \n", map->name); |
324 | return -EIO; | 319 | return -EIO; |
@@ -383,7 +378,6 @@ static void put_chip(struct map_info *map, struct flchip *chip) | |||
383 | 378 | ||
384 | switch (chip->oldstate) { | 379 | switch (chip->oldstate) { |
385 | case FL_ERASING: | 380 | case FL_ERASING: |
386 | chip->state = chip->oldstate; | ||
387 | map_write(map, CMD(LPDDR_RESUME), | 381 | map_write(map, CMD(LPDDR_RESUME), |
388 | map->pfow_base + PFOW_COMMAND_CODE); | 382 | map->pfow_base + PFOW_COMMAND_CODE); |
389 | map_write(map, CMD(LPDDR_START_EXECUTION), | 383 | map_write(map, CMD(LPDDR_START_EXECUTION), |