clocksource: dw_apb_timer: add infrastructure to handle quirks

The dw_apb_timer as Synopsis-Designware component is prone to
the licensees modifying the IP to their needs.

Therefore add infrastructure to handle notify the driver of
hardware-quirks.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
clocksource: dw_apb_timer: make registers flexible

There exists variants of the apb-timer that use slightly different
register position. To accomodate this, add elements to the timer struct
to hold the actual register offsets.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
clocksource: dw_apb_timer: add quirk for variants with two value registers

This adds a quirk for IP variants containing two load_count and value
registers that are used to provide for example 64bit accuracy on 32bit
systems.
The added accuracy is currently not used, the driver is only adapted to
handle the different register layout and make it work on affected devices.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
clocksource: dw_apb_timer_of: add quirk handling

timer_get_base_and_rate now also can extract informations about present
hardware-quirks from the devicetree node and transmit it to the
clocksource / clockevent init function.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
clocksource: dw_apb_timer: add special variant for rockchip rk3188 timers

The rk3188 uses a variant of the timer containing two registers for load_count
and current_values.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
add debug output to verify what if the two registers behave as expected
Merge branch 'topgit/devel' of github.com:mmind/linux-rockchip into topgit/devel
Add in timer midifications from mmind00
ARM: RK3188 SOC required dts related files added.
clk: divider: replace bitfield width with mask

The forthcoming Device Tree binding for the divider clock type will use
a bitfield mask instead of bitfield width, which is what the current
basic divider implementation uses.

This patch replaces the u8 width in struct clk_divider with a u32 mask.
The divider code is updated to use the bit mask internally but the two
registration functions still accept the width to maintain compatibility
with existing users.

Also updated in this patch is the clk-private.h divider macro and two
Freescale clock divider implementations that are based on struct
clk_divider.

Cc: Sascha Hauer <kernel@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
clk: of: helper for determining number of parent clocks

Walks the "clocks" array of parent clock phandles and returns the
number.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
clk: dt: binding for basic multiplexer clock

Device Tree binding for the basic clock multiplexer, plus the setup
function to register the clock.  Based on the existing fixed-clock
binding.

Includes minor beautification of clk-provider.h where some whitespace is
added and of_fixed_factor_clock_setup is relocated to maintain a
consistent style.

Tero Kristo contributed helpful bug fixes to this patch.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
clk: dt: binding for basic divider clock

Devicetree binding for the basic clock divider, plus the setup function
to register the clock.  Based on the existing fixed-clock binding.

Tero Kristo contributed helpful bug fixes to this patch.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
clk: dt: binding for basic gate clock

Device Tree binding for the basic clock gate, plus the setup function to
register the clock.  Based on the existing fixed-clock binding.

A different approach to this was proposed in 2012[1] and a similar
binding was proposed more recently[2] if anyone wants some extra
reading.

[1] http://article.gmane.org/gmane.linux.documentation/5679
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-December/137878.html

Tero Kristo contributed helpful bug fixes to this patch.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
temp move to dt clock bindings