ARC: Preparing to eliminate CONFIG_ARC_PLAT_SDRAM_SIZE

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: [DeviceTree] mem size now runtime configured

Gets rid of CONFIG_ARC_PLAT_SDRAM_SIZE

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: Preparing to eliminate CONFIG_ARC_PLAT_CLK

Abstracting references to core CPU clk to enable it runtime configurable

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
XXX: ide/emac to not use CONFIG_ARC_PLAT_CLK

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: [DeviceTree] core cpu clk now runtime configured

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: [DeviceTree] Allow dts to be user-defined

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: [DeviceTree] unflatten blob for DT core

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: [plat-arcfpga]: DeviceTree for Angel4 board

* DT contains the in-core intc and creation of corresponding irq-domain
  which is needed for interrupt requests by a DT probed device (e.g.
  arc-uart)
* This tree is still dormant, as we need the changes in arc-uart driver
  before populating it's nodes via DT

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
serial/arc-uart: Don't index with -ve platform_device->id

probe routine could index into port[] with -ve index. The check in
arc_uart_init_one() was too late.

This came to light when trying to port driver to CONFIG_OF, where
bydefault of-core code sets -ve platform dev id and in absence of
DT serial aliases, driver would use the -ve index.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
serial/arc-uart: split probe from probe_earlyprintk

This is in preparation for devicetree based probing, where earlyprintk
won't have access to DT serial aliases which the normal probe would
absolutely rely on.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
serial/arc-uart: platform_data order changed

* is_emulated is now 1st element, rather than last
* also tucked all platform data refs together

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
serial/arc-uart: supports DeviceTree based probing

Note that there's a bit of kludge right now because earlyprintk portion
of driver can't use the DT infrastrcuture to get resoures/plat_data.

This needs to be revisited.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Arnd Bergmann <arnd@arndb.de>
ARC: [plat-arcfpga] Populate platform devices via Devicetree

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: Remove unused perf stub function

This tracks e360adbe2 "irq_work: Add generic hardirq context callbacks"
which removed set_perf_event_pending() stubs across arches

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: RTSC sampling needs to be atomic

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: Timekeeping (clocksource) fixes for SMP

* Only enable RTSC in SMP if the platform gaurantees it is cross-core
  synchronized.
  (a) So sched_clock() falls back to jiffies based sampling.
  (b) ISS SMP model has coherent RTSC, hence use it safely.

* Don't setup local counter (for clocksource backend) in non-master CPU
  (a) For platforms with sync RTSC it was already a no-op.
  (b) For platform w/o sync RTSC, it would lead to local TIMER1
      based backend for the global clocksource and since TIMER1 are
      setup at differet points for master/other CPUs, this could cause
      wrong sched math.

* Register the RTSC/TIMER1 based clocksource only if counter meets the
  platform's sync needs
  (a) !SMP - either is usable
  (b) SMP  - Per 1st bullet, RTSC has to be cross-core sync, thus usable
           - Per 2nd bullet, TIMER1 is NOT sync, thus never allowed.
  From (a) and (b):  RTSC -> always usable, TIMER1 -> Only if !SMP

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: Event Timer (clockevent) fixes for SMP

Allow platforms to override local timer setup

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: SMP code consolidation for multi-platform image

A non boot CPU, fresh after reset, is almost always statically parked
(halted) waiting for Master CPU to kick start it (in platform specific
way). Thus we provide a common implementation.

For platforms w/o hardwae assist, such a CPU can't halt statically and
instead spin-wait on a token - set by Master at right time. These
platforms can override this "weak" implementation.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: [Review] Multi-platform image #1: Kconfig enablement

Older build system only supported one platform(soc) to build at a time
and further only board could be built for that platform.
This required choice .... endchoice blocks for each of these.

So the first step towards multi-platform (and multi-board) builds it to
allow build system to do that.
So choice .. endchoice =>> menu .. endmenu

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: Fold boards sub-menu into platform/SoC menu

This is more natural and is now doable since the choice constructs are
gone.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>