i2c: ocores: rework clk code to handle NULL cookie
i2c: ocores: rework clk code to handle NULL cookie

For, !HAVE_CLK the clk API returns a NULL cookie. Rework the
initialization code to handle that. If clk_get_rate() delivers 0, we use
the fallback mechanisms. The patch is pretty easy when ignoring white
space issues (git diff -b).

Suggested-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>
Signed-off-by: Wolfram Sang <fd4ce474653598159cad06f3c83387a05cd53a44@the-dreams.de>
Tested-by: Max Filippov <8c5ea195856807f4f02a6e0749c87ea6b7375f38@gmail.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs