OSDN Git Service

mtd: rawnand: denali_dt: add more clocks based on IP datasheet
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 22 Jun 2018 16:06:37 +0000 (01:06 +0900)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 07:24:14 +0000 (09:24 +0200)
commit6f1fe97bec349a1fd6c5a8c7c5998d759fe721d5
treeee295cf203f1276a9c627e8b116cb8c7d68afa38
parentd91e8a3eec69a9767a6efa17543a12e1bfcbe099
mtd: rawnand: denali_dt: add more clocks based on IP datasheet

Currently, denali_dt.c requires a single anonymous clock, but
the Denali User's Guide requires three clocks for this IP:

 - clk: controller core clock

 - clk_x: bus interface clock

 - ecc_clk: clock at which ECC circuitry is run

This commit supports these named clocks to represent the real hardware.

For the backward compatibility, the driver still accepts a single clock
just as before.  The clk_x_rate is taken from the clock driver again if
the named clock "clk_x" is available.  This will happen only for future
DT, hence the existing DT files are not affected.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Tested-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/denali_dt.c