diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
commit | 7bf7e370d5919112c223a269462cd0b546903829 (patch) | |
tree | 03ccc715239df14ae168277dbccc9d9cf4d8a2c8 /drivers/mtd/onenand/omap2.c | |
parent | 68b1a1e786f29c900fa1c516a402e24f0ece622a (diff) | |
parent | d39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits)
[media] rc: update for bitop name changes
fs: simplify iget & friends
fs: pull inode->i_lock up out of writeback_single_inode
fs: rename inode_lock to inode_hash_lock
fs: move i_wb_list out from under inode_lock
fs: move i_sb_list out from under inode_lock
fs: remove inode_lock from iput_final and prune_icache
fs: Lock the inode LRU list separately
fs: factor inode disposal
fs: protect inode->i_state with inode->i_lock
lib, arch: add filter argument to show_mem and fix private implementations
SLUB: Write to per cpu data when allocating it
slub: Fix debugobjects with lockless fastpath
autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
autofs4 - remove autofs4_lock
autofs4 - fix d_manage() return on rcu-walk
autofs4 - fix autofs4_expire_indirect() traversal
autofs4 - fix dentry leak in autofs4_expire_direct()
autofs4 - reinstate last used update on access
vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
...
NOTE!
This merge commit was created to fix compilation error. The block
tree was merged upstream and removed the 'elv_queue_empty()'
function which the new 'mtdswap' driver is using. So a simple
merge of the mtd tree with upstream does not compile. And the
mtd tree has already be published, so re-basing it is not an option.
To fix this unfortunate situation, I had to merge upstream into the
mtd-2.6.git tree without committing, put the fixup patch on top of
this, and then commit this. The result is that we do not have commits
which do not compile.
In other words, this merge commit "merges" 3 things: the MTD tree, the
upstream tree, and the fixup patch.
Diffstat (limited to 'drivers/mtd/onenand/omap2.c')
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index ea32c2fc4622..f591f615d3f6 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -63,7 +63,7 @@ struct omap2_onenand { | |||
63 | struct completion dma_done; | 63 | struct completion dma_done; |
64 | int dma_channel; | 64 | int dma_channel; |
65 | int freq; | 65 | int freq; |
66 | int (*setup)(void __iomem *base, int freq); | 66 | int (*setup)(void __iomem *base, int *freq_ptr); |
67 | struct regulator *regulator; | 67 | struct regulator *regulator; |
68 | }; | 68 | }; |
69 | 69 | ||
@@ -148,11 +148,9 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) | |||
148 | wait_err("controller error", state, ctrl, intr); | 148 | wait_err("controller error", state, ctrl, intr); |
149 | return -EIO; | 149 | return -EIO; |
150 | } | 150 | } |
151 | if ((intr & intr_flags) != intr_flags) { | 151 | if ((intr & intr_flags) == intr_flags) |
152 | wait_err("timeout", state, ctrl, intr); | 152 | return 0; |
153 | return -EIO; | 153 | /* Continue in wait for interrupt branch */ |
154 | } | ||
155 | return 0; | ||
156 | } | 154 | } |
157 | 155 | ||
158 | if (state != FL_READING) { | 156 | if (state != FL_READING) { |
@@ -581,7 +579,7 @@ static int __adjust_timing(struct device *dev, void *data) | |||
581 | 579 | ||
582 | /* DMA is not in use so this is all that is needed */ | 580 | /* DMA is not in use so this is all that is needed */ |
583 | /* Revisit for OMAP3! */ | 581 | /* Revisit for OMAP3! */ |
584 | ret = c->setup(c->onenand.base, c->freq); | 582 | ret = c->setup(c->onenand.base, &c->freq); |
585 | 583 | ||
586 | return ret; | 584 | return ret; |
587 | } | 585 | } |
@@ -674,7 +672,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) | |||
674 | } | 672 | } |
675 | 673 | ||
676 | if (pdata->onenand_setup != NULL) { | 674 | if (pdata->onenand_setup != NULL) { |
677 | r = pdata->onenand_setup(c->onenand.base, c->freq); | 675 | r = pdata->onenand_setup(c->onenand.base, &c->freq); |
678 | if (r < 0) { | 676 | if (r < 0) { |
679 | dev_err(&pdev->dev, "Onenand platform setup failed: " | 677 | dev_err(&pdev->dev, "Onenand platform setup failed: " |
680 | "%d\n", r); | 678 | "%d\n", r); |
@@ -719,8 +717,8 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) | |||
719 | } | 717 | } |
720 | 718 | ||
721 | dev_info(&pdev->dev, "initializing on CS%d, phys base 0x%08lx, virtual " | 719 | dev_info(&pdev->dev, "initializing on CS%d, phys base 0x%08lx, virtual " |
722 | "base %p\n", c->gpmc_cs, c->phys_base, | 720 | "base %p, freq %d MHz\n", c->gpmc_cs, c->phys_base, |
723 | c->onenand.base); | 721 | c->onenand.base, c->freq); |
724 | 722 | ||
725 | c->pdev = pdev; | 723 | c->pdev = pdev; |
726 | c->mtd.name = dev_name(&pdev->dev); | 724 | c->mtd.name = dev_name(&pdev->dev); |
@@ -757,24 +755,6 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) | |||
757 | if ((r = onenand_scan(&c->mtd, 1)) < 0) | 755 | if ((r = onenand_scan(&c->mtd, 1)) < 0) |
758 | goto err_release_regulator; | 756 | goto err_release_regulator; |
759 | 757 | ||
760 | switch ((c->onenand.version_id >> 4) & 0xf) { | ||
761 | case 0: | ||
762 | c->freq = 40; | ||
763 | break; | ||
764 | case 1: | ||
765 | c->freq = 54; | ||
766 | break; | ||
767 | case 2: | ||
768 | c->freq = 66; | ||
769 | break; | ||
770 | case 3: | ||
771 | c->freq = 83; | ||
772 | break; | ||
773 | case 4: | ||
774 | c->freq = 104; | ||
775 | break; | ||
776 | } | ||
777 | |||
778 | #ifdef CONFIG_MTD_PARTITIONS | 758 | #ifdef CONFIG_MTD_PARTITIONS |
779 | r = parse_mtd_partitions(&c->mtd, part_probes, &c->parts, 0); | 759 | r = parse_mtd_partitions(&c->mtd, part_probes, &c->parts, 0); |
780 | if (r > 0) | 760 | if (r > 0) |