sunxi: clock: guard against missing event handler

If we kexec the kernel, we are more likely to get an IRQ handle
request without a valid handler pointer set up. Make sure the
pointer is valid before running it.

This happens just one time on kexec boot, so use likely to hint
the compiler adequately.

arch/arm/mach-msm/timer.c takes the same approach.

Signed-off-by: Emilio López <turl@linux-sunxi.org>
arm: configs: sun5i nuclear (android devkit) defconfigs

imported from A13-SDK
touchscreen: import fixes from A13-SDK
touchscreen: gt818: import driver from A13-SDK
net: wemac driver style cleanup

This commit cleans up most of the wemac driver style issues,
including but not limited to C99-style comments and incorrect
spacing between operators. scripts/checkpatch.pl -f was used
to check for errors.

There are some remaining issues, mainly too long lines, but
I feel they would be better handled on a separate patch.

Signed-off-by: Emilio López <turl@linux-sunxi.org>
sunxi: clock: fix sata problem

Based on the previous patch, i have work around a version of the patch with
the A10 User Manual v1.2.

I don't know why they have previously put PLL6 to 1.2Ghz with sourcing the
apb1 to hosc.
Seems from the document it should be simply sourced to the PLL6 when set to
1.2Ghz.

This patch propagate the clock change to all IC versions like the previous
cubieteam patch and it is far more cleaner like that.
It's following the specs from the document.
Still don't know why this mess around the IC VersC / PLL4 and why not
simply let it on and keep the whole code more straightforward.

For the cedar patch, i'm using it in my test but it's around PLL4 so it
should have no link with the sata problem i think.
I should definitvely be tested on a mele a2000 with an active mali driver
to validate it. Not my case here.

This patch is working on mine. Seems finaly more a sub PLL6 clock (PLL6M)
to be the reason of the sata problem.
sunxi: fix mali memory reserving hack

fix to work when the first mem tag has a size different than 512MB
sunxi: fix typo in refactored sw_core_fixup()

closes #84
touchscreen: ft5x_ts: add missed part of the fix from A13-SDK

Reported-By: Alexsey Shestacov <wingrime@gmail.com>
video: sunxi-disp: fix crash when DISP_INIT_MODE_TWO_DIFF_SCREEN_SAME_CONTENTS is used

Earlier fb_para.primary_screen_id was uninitialized which caused that array index was wrong.
This hard codes primary_screen_id to 0 which is logical.
block: sunxi_nand: accept type 1 partitions too

We don't know the meaning of the values, but they are usually 0 or 2.
Except for lundman who has 1s instead of 2s, So we will accept both.
video: sun4i: modify csc;
video: sunxi-hdmi: modify hdmi avi packet for hd; (problem with green screen effect)
video: sunxi-hdmi: fix green screen effect

Fix green screen effect.
Added enumeration to explain csc.
Added documentation to HDMI AVI header.
video: sunxi: disp-ump: Add support for buf2
sun4i: clock: fix PLL4 initialization for non-revC

Based on a patch by Andreas Baierl <list@imkreisrum.de> to fix a problem
initializing Mali's clock on a revB board.
touchscreen:ft5x_ts: fix driver release Fixes bug, that make impossible to re-insmod driver after release
arm: sun4i: Rework cpufreq scaling

Previously we used a block of if cases, this patch cleans up
the code and lets us use a simple set of tables to handle this
on a loop.

The tables are fetched at runtime, so this will also make it
trivial to support newer sunxi chips in the event they require
different clock settings.

Signed-off-by: Emilio López <turl@linux-sunxi.org>
arm: sun4i: fix cpufreq dependency on Makefile

We will always need the tables, so it should depend on CPU_FREQ
instead of CPU_FREQ_TABLE

Signed-off-by: Emilio López <turl@linux-sunxi.org>
arm: sunxi: fix some whitespace issues on cpu-freq.c

Signed-off-by: Emilio López <turl@linux-sunxi.org>