nvmem: imx-ocotp: handling clock
authorPeng Fan <van.freenix@gmail.com>
Thu, 2 Jun 2016 11:05:11 +0000 (12:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2016 14:42:55 +0000 (07:42 -0700)
commitdeb319705e7eb60a870e24f75ff8d6452372e350
tree0b0ab9a66dc65f7b20b34d44ed955c9b4c3a7818
parent7d8867d71fba7604e5d6417e5cbd68a6ffd85bb4
nvmem: imx-ocotp: handling clock

Before access ocotp nvmem area, the clock should be enabled.
Or, `hexdump nvmem` will hang the system. So, use such flow:
"
  1. clock_enable_prepare
  2. read nvmem ocotp area
  3. clock_disable_unprepare
"

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/imx-ocotp.c