summaryrefslogtreecommitdiffstats
path: root/arch/nios2/cpu/cpu.c
Commit message (Collapse)AuthorAgeFilesLines
* dm: Use uclass_first_device_err() where it is usefulSimon Glass2016-03-141-3/+1
| | | | | | Use this new function in places where it simplifies the code. Signed-off-by: Simon Glass <sjg@chromium.org>
* nios2: display altera sysid at startupThomas Chou2015-12-191-0/+8
| | | | | | | | Display altera sysid at startup, which was once removed during the move. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: change virt_to_phys to use physaddr_mask in global dataThomas Chou2015-11-061-0/+1
| | | | | | | | | As virt_to_phys() is used a lot in DMA transfer, change it to use physaddr_mask in global data. This will save an "if" statement and get a little faster. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: fix map_physmem to do real cache mappingThomas Chou2015-11-061-1/+2
| | | | | | | Fix the map_physmem() to do real cache mapping. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: convert copy_exception_trampoline to use dm cpu dataThomas Chou2015-10-231-0/+24
| | | | | | Convert copy_exception_trampoline() to use dm cpu data. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: convert cache flush to use dm cpu dataThomas Chou2015-10-231-15/+0
| | | | | | | | | | | | | | | Convert cache flush to use dm cpu data. The original cache flush functions are written in assembly and use CONFIG_SYS_{I,D}CACHE_SIZE... macros. It is difficult to convert to use cache configuration in dm cpu data which is extracted from device tree. The cacheflush.c of Linux nios2 arch uses cpuinfo structure, which is very close to our dm cpu data. So we copy and modify it to arch/nios2/lib/cache.c to replace the old cache.S. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: convert do_reset to use dm cpu dataThomas Chou2015-10-231-1/+1
| | | | | | | Convert do_reset to use dm cpu data. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org>
* nios2: convert altera sysid to driver modelThomas Chou2015-10-231-11/+2
| | | | | | | | Convert altera sysid to driver model with misc uclass. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Chin Liang See <clsee@altera.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* nios2: convert nios2 cpu to driver modelThomas Chou2015-10-231-3/+87
| | | | | | | | | Convert nios2 cpu to driver model. The cpu parameters are extracted from device tree and saved to global data structure. We will use them to replace the custom_fpga.h . Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org>
* nios2: move nios2.h to arch asm directoryThomas Chou2014-08-301-1/+1
| | | | | | | The nios2.h is nios2 cpu specific, and should go arch asm directory. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: divide nios2-io.h into each specific drivers and remove itThomas Chou2014-08-301-1/+0
| | | | | | | | | | The nios2-io.h defines hardware registers and bits of several FPGA IP cores. It could be divided in to the specific drivers, including altera timer, altera sysid, altera uart and altera jtag uart. The altera pio and altera spi drivers use their own hardware definitions. The removal of nios2-io.h will help modularity and maintenance. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: add generic board supportThomas Chou2014-08-241-1/+13
| | | | | | | | | This patch implements the generic board init as described in doc/README.generic-board. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com> Reviewed-by: Stefan Roese <sr@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* nios2: Pseudo implement dcache_status/enable/disable()Joachim Foerster2011-10-281-0/+16
| | | | | | | | | | | AFAIK the NIOS2 architecture does not have any possibility to dynamically switch off the data cache. So _status() always reports 1 and _enable/_disable() just issue a flush of everything. For example, common/cmd_elf.c depends on these symbols. Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* do_reset: unify duplicate prototypesMike Frysinger2010-11-281-1/+1
| | | | | | | The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nios2: fix out of reach case for do_resetThomas Chou2010-08-191-6/+5
| | | | | | | | | | | | | | | | | There is a limitation (or bug?) of nios2 toolchain. The nios2 gcc didn't generate correct code when the reset vector is passed as a constant. It just generated a direct "call", which was wrong when the reset vector was not located in the same 256MB span as u-boot. The "Nios II Processor Reference Handbook" said, "call can transfer execution anywhere within the 256 MByte range determined by PC31..28. The Nios II GNU linker does not automatically handle cases in which the address is out of this range." So we have to use registered "callr" instruction to do the job. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* nios2: Move cpu/nios2/* to arch/nios2/cpu/*Peter Tyser2010-04-131-0/+50
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud