sunxi: extend sw_get_ic_ver() to detect sun5i chips

based on Allwinner's mach-sun5i code to "magically" detect the chip

Signed-off-by: Alejandro Mery <amery@geeks.cl>
sunxi:soc-detect: print detected SoC the first time
sunxi: add sunxi_is_${soc_name}() macros

supporting all known sun4i and sun5i SoCs.
- sunxi_is_a10()
- sunxi_is_a13()
- sunxi_is_a12()
- sunxi_is_a10s()

Signed-off-by: Alejandro Mery <amery@geeks.cl>
sunxi: implement sw_get_chip_id()

from latest sun[45]i SDK

Signed-off-by: Alejandro Mery <amery@geeks.cl>
SUN5I GPIO EINT definition and fix to irq search function

This patch fix the break condition in "sunxi_find_gpio_irq" to prevent the early stop of the search in the "gpio_eint_list".
If the EINT enumeration is discontinuous it could happen that some elements in the list are empty, but the search must go on until the scan of the list is complete, without stopping at the first not-defined EINT.
For example, as defined in "gpio-sunxi.h" patch, SUN5I arch has only some of the 32 interrupts available, but the enumeration is not continuous. This is not a problem in the SUN4I which has all the 0-31 interrupts defined.

EINT_NUM definition in "gpio-sunxi.h" is 32 because there are 4 8-bit registers for interrupts configuration, so it should be reasonable that the interrupt layout of SUN5I is simlar to SUN4I with only some irqs enable.

Signed-off-by: Lorenzo Nava <lorenx4@gmail.com>
sunxi:soc-detect: mark sw_get_ic_ver() as const

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