aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index e492804b3d98..af174054656e 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -293,7 +293,7 @@ static struct pxa3xx_nand_flash *builtin_flash_types[] = {
293#define ns2cycle(ns, clk) (int)(((ns) * (clk / 1000000) / 1000) + 1) 293#define ns2cycle(ns, clk) (int)(((ns) * (clk / 1000000) / 1000) + 1)
294 294
295static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info, 295static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info,
296 struct pxa3xx_nand_timing *t) 296 const struct pxa3xx_nand_timing *t)
297{ 297{
298 unsigned long nand_clk = clk_get_rate(info->clk); 298 unsigned long nand_clk = clk_get_rate(info->clk);
299 uint32_t ndtr0, ndtr1; 299 uint32_t ndtr0, ndtr1;
@@ -336,7 +336,7 @@ static int prepare_read_prog_cmd(struct pxa3xx_nand_info *info,
336 uint16_t cmd, int column, int page_addr) 336 uint16_t cmd, int column, int page_addr)
337{ 337{
338 struct pxa3xx_nand_flash *f = info->flash_info; 338 struct pxa3xx_nand_flash *f = info->flash_info;
339 struct pxa3xx_nand_cmdset *cmdset = f->cmdset; 339 const struct pxa3xx_nand_cmdset *cmdset = f->cmdset;
340 340
341 /* calculate data size */ 341 /* calculate data size */
342 switch (f->page_size) { 342 switch (f->page_size) {
@@ -387,7 +387,7 @@ static int prepare_erase_cmd(struct pxa3xx_nand_info *info,
387 387
388static int prepare_other_cmd(struct pxa3xx_nand_info *info, uint16_t cmd) 388static int prepare_other_cmd(struct pxa3xx_nand_info *info, uint16_t cmd)
389{ 389{
390 struct pxa3xx_nand_cmdset *cmdset = info->flash_info->cmdset; 390 const struct pxa3xx_nand_cmdset *cmdset = info->flash_info->cmdset;
391 391
392 info->ndcb0 = cmd | ((cmd & 0xff00) ? NDCB0_DBC : 0); 392 info->ndcb0 = cmd | ((cmd & 0xff00) ? NDCB0_DBC : 0);
393 info->ndcb1 = 0; 393 info->ndcb1 = 0;
@@ -623,7 +623,7 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
623{ 623{
624 struct pxa3xx_nand_info *info = mtd->priv; 624 struct pxa3xx_nand_info *info = mtd->priv;
625 struct pxa3xx_nand_flash *flash_info = info->flash_info; 625 struct pxa3xx_nand_flash *flash_info = info->flash_info;
626 struct pxa3xx_nand_cmdset *cmdset = flash_info->cmdset; 626 const struct pxa3xx_nand_cmdset *cmdset = flash_info->cmdset;
627 int ret; 627 int ret;
628 628
629 info->use_dma = (use_dma) ? 1 : 0; 629 info->use_dma = (use_dma) ? 1 : 0;
@@ -843,7 +843,7 @@ static int pxa3xx_nand_ecc_correct(struct mtd_info *mtd,
843static int __readid(struct pxa3xx_nand_info *info, uint32_t *id) 843static int __readid(struct pxa3xx_nand_info *info, uint32_t *id)
844{ 844{
845 struct pxa3xx_nand_flash *f = info->flash_info; 845 struct pxa3xx_nand_flash *f = info->flash_info;
846 struct pxa3xx_nand_cmdset *cmdset = f->cmdset; 846 const struct pxa3xx_nand_cmdset *cmdset = f->cmdset;
847 uint32_t ndcr; 847 uint32_t ndcr;
848 uint8_t id_buff[8]; 848 uint8_t id_buff[8];
849 849