summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/setup.c
Commit message (Collapse)AuthorAgeFilesLines
* ARCv2: ioremap: Support dynamic peripheral address spaceVineet Gupta2016-03-191-12/+2
| | | | | | | | | | | | | | | | | | The peripheral address space is architectural address window which is uncached and typically used to wire up peripherals. For ARC700 cores (ARCompact ISA based) this was fixed to 1GB region 0xC000_0000 - 0xFFFF_FFFF. For ARCv2 based HS38 cores the start address is flexible and can be 0xC, 0xD, 0xE, 0xF 000_000 by programming AUX_NON_VOLATILE_LIMIT reg (typically done in bootloader) Further in cas of PAE, the physical address can extend beyond 4GB so need to confine this check, otherwise all pages beyond 4GB will be treated as uncached Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* arc: use of_platform_default_populate() to populate default busKefeng Wang2016-03-171-1/+1
| | | | | | | | | Use helper of_platform_default_populate() in linux/of_platform when possible, instead of calling of_platform_populate() with the default match table. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: LLSC: software backoff is NOT needed starting HS2.1cVineet Gupta2016-03-151-5/+0
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: boot report CCMs (Closely Coupled Memories)Vineet Gupta2016-02-181-28/+50
| | | | | | | | | - ARCv2 uses a seperate BCR for {I,D}CCM base address: ARCompact encoded both base/size in same BCR - Size encoding in common BCR is different for ARCompact/ARCv2 Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Assume multiplier is always presentVineet Gupta2016-02-181-2/+0
| | | | | | | | It is unlikely that designs running Linux will not have multiplier. Further the current support is not complete as tool don't generate a multilib w/o multiplier. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: Check for LL-SC livelock only if LLSC is enabledVineet Gupta2016-01-291-0/+1
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: shrink cpuinfo by not saving full timer BCRVineet Gupta2016-01-291-7/+12
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: dw2 unwind: Reinstante unwinding out of modulesVineet Gupta2015-12-171-1/+0
| | | | | | | | | | | | | | | | | The fix which removed linear searching of dwarf (because binary lookup data always exists) missed out on the fact that modules don't get the binary lookup tables info. This caused unwinding out of modules to stop working. So add binary lookup header setup (equivalent of eh_frame_hdr setup) to modules as well. While at it, confine the header setup to within unwinder code, reducing one API exposed out of unwinder code. Fixes: 2e22502c080f ARC: dw2 unwind: Remove falllback linear search thru FDE entries Cc: <stable@vger.kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: smp: Introduce smp hook @init_early_smp for Master coreVineet Gupta2015-10-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a platform agnostic early SMP init hook which is called on Master core before calling setup_processor() setup_arch() smp_init_cpus() smp_ops.init_early_smp() ... setup_processor() How this helps: - Used for one time init of certain SMP centric IP blocks, before calling setup_processor() which probes various bits of core, possibly including this block - Currently platforms need to call this IP block init from their init routines, which doesn't make sense as this is specific to ARC core and not platform and otherwise requires copy/paste in all (and hence a possible point of failure) e.g. MCIP init is called from 2 platforms currently (axs10x and sim) which will go away once we have this. This change only adds the hooks but they are empty for now. Next commit will populate them and remove the explicit init calls from platforms. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: boot log: move helper macros to header for reuseVineet Gupta2015-10-171-4/+0
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with ↵Vineet Gupta2015-08-041-0/+4
| | | | | | | | | | | | | | | | | | | | exponential backoff This is to workaround the llock/scond livelock HS38x4 could get into a LLOCK/SCOND livelock in case of multiple overlapping coherency transactions in the SCU. The exclusive line state keeps rotating among contenting cores leading to a never ending cycle. So break the cycle by deferring the retry of failed exclusive access (SCOND). The actual delay needed is function of number of contending cores as well as the unrelated coherency traffic from other cores. To keep the code simple, start off with small delay of 1 which would suffice most cases and in case of contention double the delay. Eventually the delay is sufficient such that the coherency pipeline is drained, thus a subsequent exclusive access would succeed. Link: http://lkml.kernel.org/r/1438612568-28265-1-git-send-email-vgupta@synopsys.com Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: Fix the peripheral address space detectionVineet Gupta2015-08-031-1/+7
| | | | | | | | With HS 2.1 release, the peripheral space register no longer contains the uncached space specifics, causing the kernel to panic early on. So read the newer NON VOLATILE AUX register to get that info. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: support HS38 releasesVineet Gupta2015-07-131-1/+5
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: slightly refactor macros for boot loggingVineet Gupta2015-07-091-4/+5
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: clocksource: Introduce 64bit local RTC counterVineet Gupta2015-06-221-2/+7
| | | | | | Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: STAR 9000793984: Handle return from intr to Delay SlotVineet Gupta2015-06-221-0/+2
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: Support for ARCv2 ISA and HS38x coresVineet Gupta2015-06-221-5/+40
| | | | | | | | | | | | | | | | | | The notable features are: - SMP configurations of upto 4 cores with coherency - Optional L2 Cache and IO-Coherency - Revised Interrupt Architecture (multiple priorites, reg banks, auto stack switch, auto regfile save/restore) - MMUv4 (PIPT dcache, Huge Pages) - Instructions for * 64bit load/store: LDD, STD * Hardware assisted divide/remainder: DIV, REM * Function prologue/epilogue: ENTER_S, LEAVE_S * IRQ enable/disable: CLRI, SETI * pop count: FFS, FLS * SETcc, BMSKN, XBFU... Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: uncached base is hard constant for ARC, don't save itVineet Gupta2015-06-221-2/+2
| | | | | | | ioremap already uses the hard define, just make sure BCR value matches that Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: explicit'ify uboot supportVineet Gupta2015-06-191-1/+4
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: RIP broken 64bit RTSCVineet Gupta2015-06-191-6/+2
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Fix RTT boot printingVineet Gupta2015-04-131-1/+4
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: fix /proc/cpuinfo for offline cpusVineet Gupta2015-02-021-1/+6
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: boot: cpu feature print enhancementsVineet Gupta2014-10-131-97/+110
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: boot: consolidate cross-checking of h/w and s/wVineet Gupta2014-10-131-29/+15
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: RIP @running_on_hwVineet Gupta2014-10-131-2/+0
| | | | | | | | | | * No active users of this flag anymore * flag itself was no longer usable with new simualtor which acts just like hardware, not providing the special chip-id = 0xffff which good old ISS used to do. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [plat*] move code out of .init_machine into commonVineet Gupta2014-10-131-1/+9
| | | | | | | All the platforms do the same thing in init_machine callback so move it out of callback into caller of callback Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Allow SMP kernel to build/boot on UP-only infrastructureVineet Gupta2014-09-271-12/+1
| | | | | | | | | | | | | In light of recent SNAFU with SMP build, allow simple platform to build as SMP but run UP. * Remove the dependence on simulation SMP extension to enable quick build/test iterations of SMP kernel. * In absence of platform SMP registration, prevent the NULL smp feature name from borkign the system Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [cmdline] support External Device Trees from u-bootVineet Gupta2014-01-161-3/+12
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [cmdline] uboot cmdline handling reworkVineet Gupta2014-01-161-12/+27
| | | | | | | | | | * Moved cmdline copy from asm to "C" - allows for more robust checking of pointer validity etc. * Remove the Kconfig option to do so, base it on a runtime value passed by u-boot Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* Merge tag 'devicetree-for-3.13' of ↵Linus Torvalds2013-11-121-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DeviceTree updates for 3.13. This is a bit larger pull request than usual for this cycle with lots of clean-up. - Cross arch clean-up and consolidation of early DT scanning code. - Clean-up and removal of arch prom.h headers. Makes arch specific prom.h optional on all but Sparc. - Addition of interrupts-extended property for devices connected to multiple interrupt controllers. - Refactoring of DT interrupt parsing code in preparation for deferred probe of interrupts. - ARM cpu and cpu topology bindings documentation. - Various DT vendor binding documentation updates" * tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits) powerpc: add missing explicit OF includes for ppc dt/irq: add empty of_irq_count for !OF_IRQ dt: disable self-tests for !OF_IRQ of: irq: Fix interrupt-map entry matching MIPS: Netlogic: replace early_init_devtree() call of: Add Panasonic Corporation vendor prefix of: Add Chunghwa Picture Tubes Ltd. vendor prefix of: Add AU Optronics Corporation vendor prefix of/irq: Fix potential buffer overflow of/irq: Fix bug in interrupt parsing refactor. of: set dma_mask to point to coherent_dma_mask of: add vendor prefix for PHYTEC Messtechnik GmbH DT: sort vendor-prefixes.txt of: Add vendor prefix for Cadence of: Add empty for_each_available_child_of_node() macro definition arm/versatile: Fix versatile irq specifications. of/irq: create interrupts-extended property microblaze/pci: Drop PowerPC-ism from irq parsing of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code. of/irq: Use irq_of_parse_and_map() ...
| * arc: remove unnecessary prom.h includesRob Herring2013-10-091-1/+0
| | | | | | | | | | | | | | | | Remove unnecessary prom.h includes in preparation to remove prom.h. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Grant Likely <grant.likely@linaro.org>
| * arc: use common of_flat_dt_match_machineRob Herring2013-10-091-1/+1
| | | | | | | | | | | | | | Convert arc to use the common of_flat_dt_match_machine function. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com>
| * arc: use unflatten_and_copy_device_treeRob Herring2013-10-091-2/+1
| | | | | | | | | | | | | | | | | | Use the common unflatten_and_copy_device_tree to copy the built-in FDT out of init section. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Grant Likely <grant.likely@linaro.org>
* | ARC: Annotate some functions as staticVineet Gupta2013-11-061-6/+5
|/ | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: SMP failed to boot due to missing IVT setupNoam Camus2013-09-121-3/+0
| | | | | | | | | | | | | | | | | | | | | Commit 05b016ecf5e7a "ARC: Setup Vector Table Base in early boot" moved the Interrupt vector Table setup out of arc_init_IRQ() which is called for all CPUs, to entry point of boot cpu only, breaking booting of others. Fix by adding the same to entry point of non-boot CPUs too. read_arc_build_cfg_regs() printing IVT Base Register didn't help the casue since it prints a synthetic value if zero which is totally bogus, so fix that to print the exact Register. [vgupta: Remove the now stale comment from header of arc_init_IRQ and also added the commentary for halt-on-reset] Cc: Gilad Ben-Yossef <gilad@benyossef.com> Cc: Cc: <stable@vger.kernel.org> #3.11 Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ARC: remove console_verbose() from setup_arch()Mischa Jonker2013-09-051-2/+0
| | | | | | | It prevents kernel parameters such as 'loglevel' from doing their job. Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* arc: delete __cpuinit usage from all arc filesPaul Gortmaker2013-06-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. Note that some harmless section mismatch warnings may result, since notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c) are flagged as __cpuinit -- so if we remove the __cpuinit from arch specific callers, we will also get section mismatch warnings. As an intermediate step, we intend to turn the linux/init.h cpuinit content into no-ops as early as possible, since that will get rid of these warnings. In any case, they are temporary and harmless. This removes all the arch/arc uses of the __cpuinit macros from all C files. Currently arc does not have any __CPUINIT used in assembly files. [1] https://lkml.org/lkml/2013/5/20/589 Cc: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Use kconfig helper IS_ENABLED() to get rid of defines.hVineet Gupta2013-06-221-4/+4
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [cmdline] Don't overwrite u-boot provided bootargsVineet Gupta2013-05-071-8/+10
| | | | | | | | | | | | The existing code was wrong on several counts: * uboot provided bootargs were copied into @boot_command_line, only to be over-written by setup_machine_fdt(), effectively lost * @cmdline_p returned by setup_arch() to start_kernel() didn't include the DT /bootargs Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [cmdline] Remove CONFIG_CMDLINEVineet Gupta2013-05-071-5/+0
| | | | | | | Given that DeviceTree /bootargs can provide similar functionality, no point in providing duplicate infrastructure. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [build] Fix warnings with CONFIG_DEBUG_SECTION_MISMATCHVineet Gupta2013-04-091-5/+5
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Remove duplicate inclusion of header filesSachin Kamat2013-04-091-1/+0
| | | | | | | Some header files were included twice in the same file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Use <linux/*> headers instead of <asm/*>Sachin Kamat2013-04-091-1/+1
| | | | | | | | | | | | Silences the following checkpatch warnings: WARNING: Use #include <linux/ptrace.h> instead of <asm/ptrace.h> WARNING: Use #include <linux/kprobes.h> instead of <asm/kprobes.h> WARNING: Use #include <linux/kgdb.h> instead of <asm/kgdb.h> WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> WARNING: Use #include <linux/cache.h> instead of <asm/cache.h> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: ABIv3: Print the correct ABI verVineet Gupta2013-03-111-3/+1
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: make a copy of flat DTVineet Gupta2013-02-261-0/+2
| | | | | | | | | | The flat DT (currently embedded in vmlinux) is in .init section. The unflattened/binary tree doesn't copy strings through and references them from orig flat DT - which could cause catestrohpy if of_* APIs are called post init, say from a driver which is a loadable module. Reported-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: [Review] Multi-platform image #3: switch to board callbackVineet Gupta2013-02-151-5/+0
| | | | | | | | -platform API is retired and instead callbacks are used Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
* ARC: [Review] Multi-platform image #2: Board callback InfrastructureVineet Gupta2013-02-151-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The orig platform code orgnaization was singleton design pattern - only one platform (and board thereof) would build at a time. Thus any platform/board specific code (e.g. irq init, early init ...) expected by ARC common code was exported as well defined set of APIs, with only ONE instance building ever. Now with multiple-platform build requirement, that design of code no longer holds - multiple board specific calls need to build at the same time - so ARC common code can't use the API approach, it needs a callback based design where each board registers it's specific set of functions, and at runtime, depending on board detection, the callbacks are used from the registry. This commit adds all the infrastructure, where board specific callbacks are specified as a "maThine description". All the hooks are placed in right spots, no board callbacks registered yet (with MACHINE_STARt/END constructs) so the hooks will not run. Next commit will actually convert the platform to this infrastructure. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
* ARC: Support for single cycle Close Coupled Mem (CCM)Vineet Gupta2013-02-151-1/+52
| | | | | | | | | * Includes mapping of CCMs in address space * Annotations to move arbitrary code/data into CCM * Moving some of the critical code/data into CCM * Runtime detection/reporting Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Boot #2: Verbose Boot reporting / feature verificationVineet Gupta2013-02-151-1/+222
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: DWARF2 .debug_frame based stack unwinderVineet Gupta2013-02-151-0/+3
| | | | | | | | -Originally written by Rajeshwar Ranga -Derived off of generic unwinder in 2.6.19 and adapted to ARC Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
OpenPOWER on IntegriCloud