sunxi:cedar Rename sun4i_cedar to sunxi_cedar

Rename sun4i_cedar to sunxi_cedar, sun4i_avs to sunxi_avs,
and SUN4I_CEDAR to SUNXI_CEDAR.

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
sunxi:cedar Clean up dead code

VEPLLTable appears in the AW code drops for sun4i/5i but is never used, and
there is no description as to how it is related to the cedar driver.

According to Huang Benn, CHIP_VERSION_F23 is an old name for the sun4i.
The even older code it disables appears to be for an experimental or
FPGA cedarx implementation.

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
sunxi:cedar Move chip type test into save/restore_context

Identical code in ioctl is bracketed by save_context/restore_context
for the SUNXI_VER_A10A and not for the SUNXI_VER_A10B and SUNXI_VER_A10C.
Move the check for chip type into save_context and restore_context.  This
will make things much simpler when folding in sun5i and sun7i (and sun6i) code.

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
sunxi:cedar Clean up video decoder IOCTL_SET_VE_FREQ

Attempt to set the cedar clock rate based on the actual PLL4
clock rate, not some hard-coded rate.  Computes an integer
divisor of pll4clk_rate between 1 and 8 (inclusive) such that
the resulting VE clock rate is >= the requested rate but
within the the min/max speed range of 100MHz -- 320MHz.

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
sunxi:cedar Merge sun5i_cedar into sunxi_cedar

Merge sun5i cedar support into sunxi_cedar.
Remove drivers/media/video/sun5i.

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
sunxi:cedar Merge sun7i_cedar into sunxi_cedar

Merge sun7i cedar support into sunxi_cedar.
Code taken from AW sun7i_cedar.c: add IOCTL_SET_REFCOUNT,
IOCTL_READ_REG, and IOCTL_WRITE_REG ioctl commands; abstract
VE_IRQ_NO setting.

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
sunxi:cedar Make default config for cedar "m"

Make the default build config setting for cedarx "m"

Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
arm:configs:sunxi: savedefconfig

Signed-off-by: Alejandro Mery <amery@geeks.cl>