~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/mtd/onenand/samsung.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        struct resource *dma_res;
148
148
        unsigned long   phys_base;
149
149
        struct completion       complete;
150
 
#ifdef CONFIG_MTD_PARTITIONS
151
150
        struct mtd_partition *parts;
152
 
#endif
153
151
};
154
152
 
155
153
#define CMD_MAP_00(dev, addr)           (dev->cmd_map(MAP_00, ((addr) << 1)))
159
157
 
160
158
static struct s3c_onenand *onenand;
161
159
 
162
 
#ifdef CONFIG_MTD_PARTITIONS
163
160
static const char *part_probes[] = { "cmdlinepart", NULL, };
164
 
#endif
165
161
 
166
162
static inline int s3c_read_reg(int offset)
167
163
{
1021
1017
        if (s3c_read_reg(MEM_CFG_OFFSET) & ONENAND_SYS_CFG1_SYNC_READ)
1022
1018
                dev_info(&onenand->pdev->dev, "OneNAND Sync. Burst Read enabled\n");
1023
1019
 
1024
 
#ifdef CONFIG_MTD_PARTITIONS
1025
1020
        err = parse_mtd_partitions(mtd, part_probes, &onenand->parts, 0);
1026
1021
        if (err > 0)
1027
 
                add_mtd_partitions(mtd, onenand->parts, err);
 
1022
                mtd_device_register(mtd, onenand->parts, err);
1028
1023
        else if (err <= 0 && pdata && pdata->parts)
1029
 
                add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
 
1024
                mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
1030
1025
        else
1031
 
#endif
1032
 
                err = add_mtd_device(mtd);
 
1026
                err = mtd_device_register(mtd, NULL, 0);
1033
1027
 
1034
1028
        platform_set_drvdata(pdev, mtd);
1035
1029