summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* nios2: fix virt_to_phys for nios2 with MMUThomas Chou2015-10-231-1/+5
| | | | | | | | | As the virtual address and physical address mapping of nios2 with MMU are different. Add a check of MMU, and fix the mapping. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Ley Foon Tan <lftan@altera.com>
* nios2: zap nios2-generic board dirThomas Chou2015-10-231-10/+6
| | | | | | | As we use device tree to control u-boot now, the generic board can be removed. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: convert dma_alloc_coherent to use malloc_cache_alignedThomas Chou2015-10-231-13/+14
| | | | | | | Convert dma_alloc_coherent to use memalign. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
* nios2: convert copy_exception_trampoline to use dm cpu dataThomas Chou2015-10-232-24/+25
| | | | | | 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-235-98/+133
| | | | | | | | | | | | | | | 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: set default cache configuration in start.SThomas Chou2015-10-231-7/+15
| | | | | | | | | | | | | | | | | | | Set default icache and dcache configuration for start.S. We want to remove the CONFIG_SYS_{I,D}CACHE_SIZE... configuration macros. As we are just barely starting from reset, there is no luxury of device tree. We will set some maximum cache configuration so that it will work for most configurations. This is used only in this start.S. The speed penalty is only once here. After start up, during board initialization, cpu information will be extracted from device tree. Then cache flush operations will have correct cache configurations. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: clean up comments style in start.SThomas Chou2015-10-231-31/+30
| | | | | | Clean up comments style in start.S. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: convert ioremap to use dm cpu dataThomas Chou2015-10-231-5/+2
| | | | | | | | | Convert ioremap() to use io_region_base in dm cpu global data. Also remove three unused io functions, which have style issue and are replaced by macros already. 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: remove asm/psr.hThomas Chou2015-10-233-27/+0
| | | | | | | | Remove asm/psr.h, which is not used. Also clean up asm/sections.h and unaligned.h. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
* nios2: convert altera sysid to driver modelThomas Chou2015-10-235-58/+11
| | | | | | | | 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 altera timer to driver modelThomas Chou2015-10-232-66/+1
| | | | | | | Convert altera timer to driver model. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Chin Liang See <clsee@altera.com>
* nios2: convert nios2 cpu to driver modelThomas Chou2015-10-233-3/+99
| | | | | | | | | 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 : convert altera_pio to driver modelThomas Chou2015-10-232-79/+42
| | | | | | | | Convert altera_pio to driver model. 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: add clear and set bits macrosThomas Chou2015-10-231-0/+55
| | | | | | | | | These macros can be used to clear and set multiple bits in a register using a single call. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Chin Liang See <clsee@altera.com>
* nios2: convert altera_jtag_uart to driver modelThomas Chou2015-10-231-0/+1
| | | | | | | | Convert altera_jtag_uart to driver model. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* nios2: map physical address to uncached virtual addressThomas Chou2015-10-232-2/+7
| | | | | | | | | | | | | | | | | | Add ioremap() to map physical address to uncached virtual address. We need this to convert the reg address from the device tree. The order of headers inclusion in interrupts.c is changed because common.h will include board header that contains IO_REGION_BASE. In the future, the IO_REGION_BASE should be decided from the device tree. tree Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* nios2: call board_init_f_memThomas Chou2015-10-232-2/+10
| | | | | | | | | | We will need CONFIG_SYS_MALLOC_F_LEN to use serial uclass. So we shall undefine CONFIG_SYS_GENERIC_GLOBAL_DATA, and call board_init_f_mem() to allocates early malloc() memory with size of CONFIG_SYS_MALLOC_F_LEN in board_f.c. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
* nios2: zap version_stringThomas Chou2015-10-231-6/+0
| | | | | | | | There is a weak version_string[] at common/cmd_version.c . Remove the one in start.S. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: zap dly_clksThomas Chou2015-10-231-33/+0
| | | | | | | | The dly_clks() in start.S is no use after switching to generic timer. Remove it. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: Split timer code into timer.cThomas Chou2015-10-233-84/+67
| | | | | | | | Move the timer code from interrupts.c into timer.c . Eliminate the installation of timer interrupt handler, which is no longer used. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: Switch to generic timerThomas Chou2015-10-233-117/+38
| | | | | | | | Zap almost all of the ad-hoc timer code from interrupts.c and use the code in lib/time.c instead. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: enable device tree control of U-BootThomas Chou2015-10-234-0/+166
| | | | | | | | | This patch adds device tree control of U-Boot to nios2 boards. The example dts is taken from Linux kernel. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* nios2: define _end in link scriptThomas Chou2015-10-231-0/+6
| | | | | | | | | | | | | Since commit 44c6e6591cb451ae606f8bde71dd5fb7b4002544 "rename _end to __bss_end__" , the _end was removed. But we need it now for separated device tree control, ie, CONFIG_OF_SEPARATE . The _end is used by fdtdec_setup() to find the blob. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* nios2: remove gp assignments in link scriptThomas Chou2015-10-231-3/+5
| | | | | | | | | | | | | Since we don't use gp for small data with option "-G0", we use gp as global data pointer. The _gp location is not needed. The ALIGN(16) was for gp only. It is removed, so that we can get correct address of dtb in u-boot-dtb.bin image. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* nios2: enlarge the code relocation rangeThomas Chou2015-10-231-2/+3
| | | | | | | | | As we will use u-boot-dtb.bin, the code relocation range should be adjusted to accommodate the additional dtb. It might be overkilled to look into dtb header to find the dtb size, so we will simply use CONFIG_SYS_MONITOR_LEN. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: BSS should be cleared only after board_init_fThomas Chou2015-10-231-14/+16
| | | | | | | | | As dtb in u-boot-dtb.bin overlapped the BSS section, we should delay the clearing of BSS until dtb is relocated in board_init_f(). Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: permit device tree control of U-BootThomas Chou2015-10-231-0/+1
| | | | | | | | | Enable this in the Kconfig so that nios2 boards can use device tree to configure U-Boot. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* am437x: Add am57xx_evm_defconfig using CONFIG_DMMugunthan V N2015-10-222-0/+700
| | | | | | | | | Import various DT files for am57xx-beagle-x15 from Linux Kernel v4.2 Add config file for this board, enable DM, DM_GPIO, DM_SERIAL and DM_MMC. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
* am437x: Add am437x_sk_evm_defconfig using CONFIG_DMMugunthan V N2015-10-222-1/+705
| | | | | | | | | Import various DT files for am437x-sk-evm from Linux Kernel v4.2 Add config file for this board, enable DM, DM_GPIO, DM_SERIAL and DM_MMC. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* am437x: Add am437x_gp_evm_defconfig using CONFIG_DMMugunthan V N2015-10-224-0/+2554
| | | | | | | | | | Import various DT files for am4372, an43xx pinctrl and am437x-gp-evm from Linux Kernel v4.2 Add config file for this board, enable DM, DM_GPIO, DM_SERIAL and DM_MMC. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* omap_hsmmc: update struct hsmmc to accomodate base address from DTMugunthan V N2015-10-221-0/+3
| | | | | | | | | | Existing driver gets the actual omap hammc base address + 0x100 bytes as the first 0x100 bytes is not used by the driver. But with DM conversion the base address from DT is different, to accommodate the offset adding res0[0x100] to struct hsmmc. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* dra7xx: Add dra74_evm_defconfig using CONFIG_DMMugunthan V N2015-10-223-1/+784
| | | | | | | | Import various DT files for dra7-evm from Linux Kernel v4.2 Add config file for this board, enable DM and DM_GPIO Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: dts: k2g: Add DT supportLokesh Vutla2015-10-223-1/+95
| | | | | | Add basic DT support for k2g evm. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: add SD card and eMMC supportRoger Quadros2015-10-221-0/+22
| | | | | | | | Add MMC support for k2g Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
* driver: net: keystone_net: add support for rgmii phyVitaly Andrianov2015-10-221-0/+5
| | | | | | | | | In K2G, Ethernet doesn't support SGMII instead it support RGMII, adding support to the driver to connect to RGMII phy. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* driver: net: keystone_net: fix phy mode configurationMugunthan V N2015-10-221-0/+2
| | | | | | | | | | Phy mode is a board property and it can be different between multiple board and ports, so it should not be hardcoded in driver to one specific mode. So adding a field in eth_priv_t structure to pass phy mode to driver. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: update keystone nav rx queue numbersVitaly Andrianov2015-10-221-0/+5
| | | | | | | | update K2G nav rx queue number Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Correct base addressesVitaly Andrianov2015-10-223-0/+57
| | | | | | | | Coreect base addresses for SPI, Queue Manager, Ethernet, GPIO, and MSMC segments. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add support for pin mux configurationVitaly Andrianov2015-10-221-0/+58
| | | | | | | Add api for configuring pin mux. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add ddr3 infoVitaly Andrianov2015-10-222-1/+15
| | | | | | | Add ddr3 related info Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add PSC infoVitaly Andrianov2015-10-222-0/+55
| | | | | | | Add psc information for k2g Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add clock informationVitaly Andrianov2015-10-225-2/+14
| | | | | | | | Add clock information for Galileo Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
* ARM: k2g: Add pll dataVitaly Andrianov2015-10-224-0/+31
| | | | | | | Add pll data for k2g Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add kconfig supportLokesh Vutla2015-10-221-0/+3
| | | | | | Add Kconfig support Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add support for CPU detectionLokesh Vutla2015-10-222-0/+9
| | | | | | Adding CPU detection support for Keystone2 Galileo. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: keystone2: Use dtb images by defaultLokesh Vutla2015-10-221-2/+2
| | | | | | | Now that OF_CONTROL is enabled on all keystone2 platforms, build the default images with DT. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: dts: k2e: Enable OF_CONTROL and DMLokesh Vutla2015-10-225-1/+586
| | | | | | | Import k2e specific DT files from Linux Kernel and enable OF_CONTROL, DM, DM_SERIAL. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: dts: k2l: Enable OF_CONTROL and DMLokesh Vutla2015-10-225-1/+696
| | | | | | | Import k2l specific DT files from Linux Kernel and enable OF_CONTROL, DM, DM_SERIAL. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: dts: k2hk: Enable OF_CONTROL and DMLokesh Vutla2015-10-226-0/+935
| | | | | | | Import k2hk specific DT files from Linux Kernel and enable OF_CONTROL, DM, DM_SERIAL. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
OpenPOWER on IntegriCloud