diff options
Diffstat (limited to 'drivers/mtd/onenand/samsung.c')
-rw-r--r-- | drivers/mtd/onenand/samsung.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index 2750317cb58f..cb443af3d45f 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c | |||
@@ -630,6 +630,12 @@ normal: | |||
630 | return 0; | 630 | return 0; |
631 | } | 631 | } |
632 | 632 | ||
633 | static int s5pc110_chip_probe(struct mtd_info *mtd) | ||
634 | { | ||
635 | /* Now just return 0 */ | ||
636 | return 0; | ||
637 | } | ||
638 | |||
633 | static int s3c_onenand_bbt_wait(struct mtd_info *mtd, int state) | 639 | static int s3c_onenand_bbt_wait(struct mtd_info *mtd, int state) |
634 | { | 640 | { |
635 | unsigned int flags = INT_ACT | LOAD_CMP; | 641 | unsigned int flags = INT_ACT | LOAD_CMP; |
@@ -757,6 +763,7 @@ static void s3c_onenand_setup(struct mtd_info *mtd) | |||
757 | /* Use generic onenand functions */ | 763 | /* Use generic onenand functions */ |
758 | onenand->cmd_map = s5pc1xx_cmd_map; | 764 | onenand->cmd_map = s5pc1xx_cmd_map; |
759 | this->read_bufferram = s5pc110_read_bufferram; | 765 | this->read_bufferram = s5pc110_read_bufferram; |
766 | this->chip_probe = s5pc110_chip_probe; | ||
760 | return; | 767 | return; |
761 | } else { | 768 | } else { |
762 | BUG(); | 769 | BUG(); |
@@ -781,7 +788,6 @@ static int s3c_onenand_probe(struct platform_device *pdev) | |||
781 | struct mtd_info *mtd; | 788 | struct mtd_info *mtd; |
782 | struct resource *r; | 789 | struct resource *r; |
783 | int size, err; | 790 | int size, err; |
784 | unsigned long onenand_ctrl_cfg = 0; | ||
785 | 791 | ||
786 | pdata = pdev->dev.platform_data; | 792 | pdata = pdev->dev.platform_data; |
787 | /* No need to check pdata. the platform data is optional */ | 793 | /* No need to check pdata. the platform data is optional */ |
@@ -900,14 +906,6 @@ static int s3c_onenand_probe(struct platform_device *pdev) | |||
900 | } | 906 | } |
901 | 907 | ||
902 | onenand->phys_base = onenand->base_res->start; | 908 | onenand->phys_base = onenand->base_res->start; |
903 | |||
904 | onenand_ctrl_cfg = readl(onenand->dma_addr + 0x100); | ||
905 | if ((onenand_ctrl_cfg & ONENAND_SYS_CFG1_SYNC_WRITE) && | ||
906 | onenand->dma_addr) | ||
907 | writel(onenand_ctrl_cfg & ~ONENAND_SYS_CFG1_SYNC_WRITE, | ||
908 | onenand->dma_addr + 0x100); | ||
909 | else | ||
910 | onenand_ctrl_cfg = 0; | ||
911 | } | 909 | } |
912 | 910 | ||
913 | if (onenand_scan(mtd, 1)) { | 911 | if (onenand_scan(mtd, 1)) { |
@@ -915,10 +913,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) | |||
915 | goto scan_failed; | 913 | goto scan_failed; |
916 | } | 914 | } |
917 | 915 | ||
918 | if (onenand->type == TYPE_S5PC110) { | 916 | if (onenand->type != TYPE_S5PC110) { |
919 | if (onenand_ctrl_cfg && onenand->dma_addr) | ||
920 | writel(onenand_ctrl_cfg, onenand->dma_addr + 0x100); | ||
921 | } else { | ||
922 | /* S3C doesn't handle subpage write */ | 917 | /* S3C doesn't handle subpage write */ |
923 | mtd->subpage_sft = 0; | 918 | mtd->subpage_sft = 0; |
924 | this->subpagesize = mtd->writesize; | 919 | this->subpagesize = mtd->writesize; |