| @@ -28,6 +28,7 @@ · 27 unmodified lines |
| 28 | #include <linux/mtd/nand_bch.h> | 28 | #include <linux/mtd/nand_bch.h> |
| 29 | #include <linux/platform_data/elm.h> | 29 | #include <linux/platform_data/elm.h> |
| 30 | | 30 | |
| | 31 | #include <linux/omap-gpmc.h> |
| 31 | #include <linux/platform_data/mtd-nand-omap2.h> | 32 | #include <linux/platform_data/mtd-nand-omap2.h> |
| 32 | | 33 | |
| 33 | #define DRIVER_NAME "omap2-nand" | 34 | #define DRIVER_NAME "omap2-nand" |
| @@ -168,7 +169,9 @@ struct omap_nand_info { · 134 unmodified lines |
| 168 | } iomode; | 169 | } iomode; |
| 169 | u_char *buf; | 170 | u_char *buf; |
| 170 | int buf_len; | 171 | int buf_len; |
| | 172 | /* Interface to GPMC */ |
| 171 | struct gpmc_nand_regs reg; | 173 | struct gpmc_nand_regs reg; |
| | 174 | struct gpmc_nand_ops *ops; |
| 172 | /* generated at runtime depending on ECC algorithm and layout selected */ | 175 | /* generated at runtime depending on ECC algorithm and layout selected */ |
| 173 | struct nand_ecclayout oobinfo; | 176 | struct nand_ecclayout oobinfo; |
| 174 | /* fields specific for BCHx_HW ECC scheme */ | 177 | /* fields specific for BCHx_HW ECC scheme */ |
| @@ -1665,9 +1668,13 @@ static int omap_nand_probe(struct platform_device *pdev) · 1490 unmodified lines |
| 1665 | | 1668 | |
| 1666 | platform_set_drvdata(pdev, info); | 1669 | platform_set_drvdata(pdev, info); |
| 1667 | | 1670 | |
| | 1671 | info->ops = gpmc_omap_get_nand_ops(&info->reg, info->gpmc_cs); |
| | 1672 | if (!info->ops) { |
| | 1673 | dev_err(&pdev->dev, "Failed to get GPMC->NAND interface\n"); |
| | 1674 | return -ENODEV; |
| | 1675 | } |
| 1668 | info->pdev = pdev; | 1676 | info->pdev = pdev; |
| 1669 | info->gpmc_cs = pdata->cs; | 1677 | info->gpmc_cs = pdata->cs; |
| 1670 | info->reg = pdata->reg; | | |
| 1671 | info->of_node = pdata->of_node; | 1678 | info->of_node = pdata->of_node; |
| 1672 | info->ecc_opt = pdata->ecc_opt; | 1679 | info->ecc_opt = pdata->ecc_opt; |
| 1673 | nand_chip = &info->nand; | 1680 | nand_chip = &info->nand; |