summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/misc.c
Commit message (Collapse)AuthorAgeLines
* arm: socfpga: misc: Add support for printing FPGA typeDinh Nguyen2015-08-08-0/+63
| | | | | | | | | | Add code which uses the new functions for obtaining FPGA ID from the scan manager. This new code prints the FPGA model attached to the SoCFPGA during boot and sets environment variable "fpgatype", which can be used to determine the FPGA model in U-Boot scripts. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: Marek Vasut <marex@denx.de>
* arm: socfpga: Add temporary workaround for missing SD/MMC patchesMarek Vasut2015-08-08-0/+6
| | | | | | | | | | | | Add a small workaround into the platform code which forces the SDMMC into 8-bit mode (the default configuration for all socfpga platforms) to work around breakage caused by missing patches in mainline which switch the probing of SD/MMC to OF instead of static configuraiton. The patches will hit mainline after the SPL series, so to avoid build issues, add this small temporary workaround. Signed-off-by: Marek Vasut <marex@denx.de>
* arm: socfpga: misc: Reset ethernet from OFMarek Vasut2015-08-08-19/+49
| | | | | | | | | | | Reset the GMAC ethernets based on the "resets" OF node instead of ad-hoc hardcoded values in the U-Boot code. Since we don't have a proper reset framework in place yet, we have to do this slightly ad-hoc parsing of the OF tree instead. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
* arm: socfpga: misc: Probe ethernet GMAC from OFMarek Vasut2015-08-08-3/+1
| | | | | | | | | The GMAC can now be probed from OF, so enable DM ethernet and remove the old ad-hoc designware_initialize() invocation. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
* arm: socfpga: misc: Export bootmode into environment variableMarek Vasut2015-08-08-11/+23
| | | | | | | | setenv an environment variable called "bootmode" , which contains the board boot mode. This can be in turn used in scripts to determine from where to load kernel and such. Signed-off-by: Marek Vasut <marex@denx.de>
* arm: socfpga: misc: Add support for printing boot modeMarek Vasut2015-08-08-0/+13
| | | | | | | Add support for printing from which device the SoCFPGA board booted. This decodes the BSEL settings and prints it in human readable form. Signed-off-by: Marek Vasut <marex@denx.de>
* arm: socfpga: misc: Fix warm resetMarek Vasut2015-08-08-0/+10
| | | | | | | | | | | | | | Write necessary magic value into the Warm Boot from ON-Chip RAM group Enable register to enable Warm reset support. Instead of doing this in the reset_cpu() function, we do it in arch early init to avoid breaking old kernel code which expects this magic value to be already written into this register. This magic is originally excavated from common/spl/spl.c in the u-boot port from altera, where this value was written just before the SPL jumped to actual U-Boot in the RAM. Signed-off-by: Marek Vasut <marex@denx.de>
* arm: socfpga: reset: Replace ad-hoc reset functionsMarek Vasut2015-08-08-4/+10
| | | | | | | | Replace all those ad-hoc reset functions, which were all copies of the same invocation of clrbits_le32() anyway, with one single unified function, socfpga_per_reset(), with necessary parameters. Signed-off-by: Marek Vasut <marex@denx.de>
* ARM: socfpga: move SoC sources to mach-socfpgaMasahiro Yamada2015-05-07-0/+289
Our recent trend is to collect SoC files into arch/arm/mach-(SOC). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>