@@ -72,34 +72,6 @@ static void gpio_nand_dosync(struct gpiomtd *gpiomtd)
72
72
static inline void gpio_nand_dosync (struct gpiomtd * gpiomtd ) {}
73
73
#endif
74
74
75
- static void gpio_nand_cmd_ctrl (struct nand_chip * chip , int cmd ,
76
- unsigned int ctrl )
77
- {
78
- struct gpiomtd * gpiomtd = gpio_nand_getpriv (nand_to_mtd (chip ));
79
-
80
- gpio_nand_dosync (gpiomtd );
81
-
82
- if (ctrl & NAND_CTRL_CHANGE ) {
83
- if (gpiomtd -> nce )
84
- gpiod_set_value (gpiomtd -> nce , !(ctrl & NAND_NCE ));
85
- gpiod_set_value (gpiomtd -> cle , !!(ctrl & NAND_CLE ));
86
- gpiod_set_value (gpiomtd -> ale , !!(ctrl & NAND_ALE ));
87
- gpio_nand_dosync (gpiomtd );
88
- }
89
- if (cmd == NAND_CMD_NONE )
90
- return ;
91
-
92
- writeb (cmd , gpiomtd -> nand_chip .legacy .IO_ADDR_W );
93
- gpio_nand_dosync (gpiomtd );
94
- }
95
-
96
- static int gpio_nand_devready (struct nand_chip * chip )
97
- {
98
- struct gpiomtd * gpiomtd = gpio_nand_getpriv (nand_to_mtd (chip ));
99
-
100
- return gpiod_get_value (gpiomtd -> rdy );
101
- }
102
-
103
75
static int gpio_nand_exec_instr (struct nand_chip * chip ,
104
76
const struct nand_op_instr * instr )
105
77
{
@@ -365,21 +337,14 @@ static int gpio_nand_probe(struct platform_device *pdev)
365
337
ret = PTR_ERR (gpiomtd -> rdy );
366
338
goto out_ce ;
367
339
}
368
- /* Using RDY pin */
369
- if (gpiomtd -> rdy )
370
- chip -> legacy .dev_ready = gpio_nand_devready ;
371
340
372
341
nand_controller_init (& gpiomtd -> base );
373
342
gpiomtd -> base .ops = & gpio_nand_ops ;
374
343
375
344
nand_set_flash_node (chip , pdev -> dev .of_node );
376
- chip -> legacy .IO_ADDR_R = gpiomtd -> io ;
377
- chip -> legacy .IO_ADDR_W = chip -> legacy .IO_ADDR_R ;
378
345
chip -> ecc .mode = NAND_ECC_SOFT ;
379
346
chip -> ecc .algo = NAND_ECC_HAMMING ;
380
347
chip -> options = gpiomtd -> plat .options ;
381
- chip -> legacy .chip_delay = gpiomtd -> plat .chip_delay ;
382
- chip -> legacy .cmd_ctrl = gpio_nand_cmd_ctrl ;
383
348
chip -> controller = & gpiomtd -> base ;
384
349
385
350
mtd = nand_to_mtd (chip );
0 commit comments