mtd: nand: Patch remaining places where nand_to_mtd() should be used
Some drivers are still directly accessing the chip->mtd field. Patch them to use nand_to_mtd() instead. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
parent
caad0d00a8
commit
30780f9483
|
|
@ -137,7 +137,7 @@ Configuration Options:
|
||||||
init:
|
init:
|
||||||
|
|
||||||
/* chip is struct nand_chip, and is now provided by the driver. */
|
/* chip is struct nand_chip, and is now provided by the driver. */
|
||||||
mtd = &chip.mtd;
|
mtd = nand_to_mtd(&chip);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill in appropriate values if this driver uses these fields,
|
* Fill in appropriate values if this driver uses these fields,
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ void nand_init(void)
|
||||||
/*
|
/*
|
||||||
* Init board specific nand support
|
* Init board specific nand support
|
||||||
*/
|
*/
|
||||||
mtd = &nand_chip.mtd;
|
mtd = nand_to_mtd(&nand_chip);
|
||||||
nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W =
|
nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W =
|
||||||
(void __iomem *)CONFIG_SYS_NAND_BASE;
|
(void __iomem *)CONFIG_SYS_NAND_BASE;
|
||||||
board_nand_init(&nand_chip);
|
board_nand_init(&nand_chip);
|
||||||
|
|
|
||||||
|
|
@ -1448,7 +1448,7 @@ int board_nand_init(struct nand_chip *nand)
|
||||||
|
|
||||||
void nand_init(void)
|
void nand_init(void)
|
||||||
{
|
{
|
||||||
mtd = &nand_chip.mtd;
|
mtd = nand_to_mtd(&nand_chip);
|
||||||
mtd->writesize = CONFIG_SYS_NAND_PAGE_SIZE;
|
mtd->writesize = CONFIG_SYS_NAND_PAGE_SIZE;
|
||||||
mtd->oobsize = CONFIG_SYS_NAND_OOBSIZE;
|
mtd->oobsize = CONFIG_SYS_NAND_OOBSIZE;
|
||||||
nand_chip.IO_ADDR_R = (void __iomem *)CONFIG_SYS_NAND_BASE;
|
nand_chip.IO_ADDR_R = (void __iomem *)CONFIG_SYS_NAND_BASE;
|
||||||
|
|
|
||||||
|
|
@ -541,7 +541,7 @@ static struct nand_chip lpc32xx_chip;
|
||||||
|
|
||||||
void board_nand_init(void)
|
void board_nand_init(void)
|
||||||
{
|
{
|
||||||
struct mtd_info *mtd = &lpc32xx_chip.mtd;
|
struct mtd_info *mtd = nand_to_mtd(&lpc32xx_chip);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Set all BOARDSPECIFIC (actually core-specific) fields */
|
/* Set all BOARDSPECIFIC (actually core-specific) fields */
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ static int mxs_nand_init(void)
|
||||||
|
|
||||||
/* init mxs nand driver */
|
/* init mxs nand driver */
|
||||||
board_nand_init(&nand_chip);
|
board_nand_init(&nand_chip);
|
||||||
mtd = &nand_chip.mtd;
|
mtd = nand_to_mtd(&nand_chip);
|
||||||
/* set mtd functions */
|
/* set mtd functions */
|
||||||
nand_chip.cmdfunc = mxs_nand_command;
|
nand_chip.cmdfunc = mxs_nand_command;
|
||||||
nand_chip.numchips = 1;
|
nand_chip.numchips = 1;
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ void nand_init(void)
|
||||||
/*
|
/*
|
||||||
* Init board specific nand support
|
* Init board specific nand support
|
||||||
*/
|
*/
|
||||||
mtd = &nand_chip.mtd;
|
mtd = nand_to_mtd(&nand_chip);
|
||||||
nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W =
|
nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W =
|
||||||
(void __iomem *)CONFIG_SYS_NAND_BASE;
|
(void __iomem *)CONFIG_SYS_NAND_BASE;
|
||||||
board_nand_init(&nand_chip);
|
board_nand_init(&nand_chip);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue