summaryrefslogtreecommitdiffstats
path: root/include/common.h
Commit message (Collapse)AuthorAgeFilesLines
...
* common: Drop determine_sysper() and determine_pci_clock_per()Simon Glass2017-06-051-6/+0
| | | | | | These arch-specific declarations should not be in common.h. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop cpu_init_f() declarationsSimon Glass2017-06-051-11/+0
| | | | | | These arch-specific functions are not needed here. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: Remove include files from common.hSimon Glass2017-06-051-6/+0
| | | | | | | With a small tweak we can avoid including these files for all boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* nds32: Remove include files from common.hSimon Glass2017-06-051-5/+0
| | | | | | | With a few tweaks we can avoid including these files, which are only needed by two C files. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Don't include asm/u-boot.h in commonSimon Glass2017-06-051-3/+0
| | | | | | | With a small fixup to u-boot-x86.h, this is not actually needed anywhere, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Don't include asm/u-boot.h in commonSimon Glass2017-06-051-3/+0
| | | | | | This is not actually needed anywhere, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* mips: Don't include asm/u-boot.h in commonSimon Glass2017-06-051-3/+0
| | | | | | | This is not actually needed anywhere, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* arc: Don't include asm/u-boot.h in commonSimon Glass2017-06-051-3/+0
| | | | | | This is not actually needed anywhere, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* nds32: Make u-boot-nds32.h a private headerSimon Glass2017-06-051-1/+1
| | | | | | | Rather than including this arch-specific header file in common.h, include it from within nds32's u-boot.h header. Signed-off-by: Simon Glass <sjg@chromium.org>
* mips: Make u-boot-mips.h a private headerSimon Glass2017-06-051-1/+1
| | | | | | | | Rather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* arm: Make u-boot-arm.h a private headerSimon Glass2017-06-051-1/+1
| | | | | | | | | | Rather than including this arch-specific header file in common.h, include it from within arm's u-boot.h header. Also drop the comment about something to be fixed. It has been there forever and it is not clear what it means. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Make u-boot-x86.h a private headerSimon Glass2017-06-051-2/+2
| | | | | | | | | | Rather than including this arch-specific header file in common.h, include it from within x86's u-boot.h header. Also drop the comment about something to be fixed. It is not clear what needs fixing. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Make u-boot-sandbox.h a private headerSimon Glass2017-06-051-1/+1
| | | | | | | | | Rather than including this arch-specific header file in common.h, include it from within sandbox's u-boot.h header. Also drop the comment about something to be fixed. Signed-off-by: Simon Glass <sjg@chromium.org>
* arc: Make u-boot-arc.h a private headerSimon Glass2017-06-051-1/+1
| | | | | | | Rather than including this arch-specific header file in common.h, include it from within arc's u-boot.h header. Signed-off-by: Simon Glass <sjg@chromium.org>
* samsung: usb: Drop ohci-s3c24xx driverSimon Glass2017-06-051-2/+1
| | | | | | This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* api: Add a header for api_init()Simon Glass2017-06-051-3/+0
| | | | | | Put this in its own header instead of using common.h. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move get_OPB_freq() and get_PCI_freq() to PPC headerSimon Glass2017-06-051-4/+0
| | | | | | These should not be in common.h. Move the to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move pcie_setup_hoses() to PPC headerSimon Glass2017-06-051-8/+0
| | | | | | Only one board needs this definition. Move it to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop pci_master_init()Simon Glass2017-06-051-3/+0
| | | | | | This should not be in common.h. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move pci_target_init() to PPC headerSimon Glass2017-06-051-3/+0
| | | | | | Only one boards needs this definition. Move it to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop pci_pre_init() and is_pci_host()Simon Glass2017-06-051-5/+0
| | | | | | | These should not be in common.h. They are used in some legacy PowerPC code. Just drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop inclusion of pci.hSimon Glass2017-06-051-3/+0
| | | | | | | This should not be in common.h - remove it and update the only file that needs it. Signed-off-by: Simon Glass <sjg@chromium.org>
* i2c: Drop use of CONFIG_I2C_HARDSimon Glass2017-05-151-0/+10
| | | | | | | | | This option is pretty old. It predates CONFIG_SYS_I2C which is itself deprecated in favour of driver model. Disable it for all boards. Also drop I2C options which depend on this. Signed-off-by: Simon Glass <sjg@chromium.org>
* board_f: Rename initdram() to dram_init()Simon Glass2017-04-131-3/+0
| | | | | | | | | This allows us to use the same DRAM init function on all archs. Add a dummy function for arc, which does not use DRAM init here. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Dummy function on nios2] Signed-off-by: Tom Rini <trini@konsulko.com>
* powerpc: Move setup_board_extra() into a PPC fileSimon Glass2017-04-051-0/+7
| | | | | | | | We don't need this PPC-specific function in generic code. Move it to the powerpc directory. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* Move dram_init_banksize() to a common headerSimon Glass2017-04-051-0/+17
| | | | | | | | This is an weak function present on all archs so we should have it in the common header file. Remove it from arch-specific headers and add a function comment. Signed-off-by: Simon Glass <sjg@chromium.org>
* board_f: Drop return value from initdram()Simon Glass2017-04-051-1/+1
| | | | | | | | | At present we cannot use this function as an init sequence call without a wrapper, since it returns the RAM size. Adjust it to set the RAM size in global_data instead, and return 0 on success. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: Drop board_type parameter from initdram()Simon Glass2017-04-051-1/+1
| | | | | | | | | It looks like only cm5200 and tqm8xx use this feature, so we don't really need it in generic code. Drop it and have the users access gd->board_type directly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() privateSimon Glass2017-04-051-6/+1
| | | | | | | | Move these two function calls into checkcpu(), which is called on this arch immediately after these two. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: powerpc: Move prt_83xx_rsr() to private codeSimon Glass2017-04-051-2/+0
| | | | | | | This function is called just before checkcpu() on MPX83xx. Move it to the code for that arch. Signed-off-by: Simon Glass <sjg@chromium.org>
* board_f: powerpc: Use timer_init() instead of init_timebase()Simon Glass2017-04-051-1/+0
| | | | | | | | | There is no good reason to use a different name on PowerPC. Change it to timer_init() like the others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: Remove adjust_sdram_tbs_8xx() from the init sequenceSimon Glass2017-04-051-1/+0
| | | | | | | We can just call this from the only place that needs it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: Remove sdram_adjust_866() from the init sequenceSimon Glass2017-04-051-1/+0
| | | | | | | We can just call this from the only function that needs it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: powerpc: Rename get_clocks_866() to get_clocks()Simon Glass2017-04-051-1/+0
| | | | | | | | | | We really don't need to have a name like this in the generic init sequence. Use the generic get_clocks() name so that we can merge these two at some point. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
* board_f: x86: Rename x86_fsp_init() to arch_fsp_init()Simon Glass2017-04-051-0/+9
| | | | | | | | | | | | While x86 is the only user and this could in principle be moved to arch_cpu_init() there is some justification for this being a separate call. It provides a way to handle init which is not CPU-specific, but must happen before the CPU can be set up. Rename the function to be more generic. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* Blackfin: RemoveTom Rini2017-04-051-3/+0
| | | | | | | | | | | | | | | | | | | The architecture is currently unmaintained, remove. Cc: Benjamin Matthews <mben12@gmail.com> Cc: Chong Huang <chuang@ucrobotics.com> Cc: Dimitar Penev <dpn@switchfin.org> Cc: Haitao Zhang <hzhang@ucrobotics.com> Cc: I-SYST Micromodule <support@i-syst.com> Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de> Cc: Marek Vasut <marex@denx.de> Cc: Martin Strubel <strubel@section5.ch> Cc: Peter Meerwald <devel@bct-electronic.com> Cc: Sonic Zhang <sonic.adi@gmail.com> Cc: Valentin Yakovenkov <yakovenkov@niistt.ru> Cc: Wojtek Skulski <info@skutek.com> Cc: Wojtek Skulski <skulski@pas.rochester.edu> Signed-off-by: Tom Rini <trini@konsulko.com>
* dm: Add callback to modify the device treemario.six@gdsys.cc2017-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Certain boards come in different variations by way of utilizing daughter boards, for example. These boards might contain additional chips, which are added to the main board's busses, e.g. I2C. The device tree support for such boards would either, quite naturally, employ the overlay mechanism to add such chips to the tree, or would use one large default device tree, and delete the devices that are actually not present. Regardless of approach, even on the U-Boot level, a modification of the device tree is a prerequisite to have such modular families of boards supported properly. Therefore, we add an option to make the U-Boot device tree (the actual copy later used by the driver model) writeable, and add a callback method that allows boards to modify the device tree at an early stage, at which, hopefully, also the application of device tree overlays will be possible. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Roese <sr@denx.de>
* Drop CONFIG_CMD_DOCSimon Glass2017-01-251-3/+0
| | | | | | | This is not used in U-Boot, and the only usage calls a non-existent function. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* Drop the static inline print_cpuinfo()Simon Glass2017-01-251-7/+0
| | | | | | | This is only called from one place and the function cannot be inlined. Convert it to a normal function. Signed-off-by: Simon Glass <sjg@chromium.org>
* powerpc: Drop probecpu() in favour of arch_cpu_init()Simon Glass2017-01-251-1/+11
| | | | | | | To avoid an unnecessary arch-specific call in board_init_f(), rename this function. Signed-off-by: Simon Glass <sjg@chromium.org>
* status_led: Kconfig migrationUri Mashiach2017-01-211-1/+1
| | | | | | | | | | | | | Move all of the status LED feature to drivers/led/Kconfig. The LED status definitions were moved from the board configuration files to the defconfig files. TBD: Move all of the definitions in the include/status_led.h to the relevant board's defconfig files. Tested boards: CL-SOM-AM57x, CM-T335 Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
* time: move timer APIs to include/time.hMasahiro Yamada2017-01-141-7/+1
| | | | | | | | | | | The include/common.h is a collection of unrelated declarations, macros, etc. It is horrible to include such a cluttered header just for some timer functions. Split out timer functions into include/time.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* delay: collect {m, n, u}delay declarations to include/linux/delay.hMasahiro Yamada2017-01-141-5/+1
| | | | | | | | | | | | | Currently, mdelay() and udelay() are declared in include/common.h, while ndelay() in include/linux/compat.h. It would be nice to collect them into include/linux/delay.h like Linux. While we are here, fix the ndelay() implementation; I used the DIV_ROUND_UP() instead of (x)/1000 because it must wait *longer* than the given period of time. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* move UL() macro from armv8/mmu.h into common.hAndre Przywara2017-01-041-1/+12
| | | | | | | | | | | The UL() macro is pretty useful in sharing constants between assembly and C files while still being able to specify a type for C. Move the macro from an armv8 specific header into a common header file to be able to use it by arm code (for instance) as well. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Jagan Teki <jagan@openedev.com>
* Use separate options for TPL supportSimon Glass2016-09-161-6/+9
| | | | | | | | | | | | | | | At present TPL uses the same options as SPL support. In a few cases the board config enables or disables the SPL options depending on whether CONFIG_TPL_BUILD is defined. With the move to Kconfig, options are determined for the whole build and (without a hack like an #undef in a header file) cannot be controlled in this way. Create new TPL options for these and update users. This will allow Kconfig conversion to proceed for these boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add warn_non_spl() to show a message in U-Boot properSimon Glass2016-07-141-0/+10
| | | | | | | | | SPL tends to be more space-constrained that U-Boot proper. Some error messages are best suppressed in SPL. Add a macros to make this easy. warn_non_spl() does nothing when built in SPL code. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add comments for debug() and pr_fmtSimon Glass2016-07-141-0/+2
| | | | | | Add a note to each of these so it is more obvious how they work. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Always include errno.h in common.hJoe Hershberger2016-07-061-0/+1
| | | | | | | | We want people using errnos for errors instead of -1, so make it easy by always including the definition of all the errnos. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-03-141-1/+1
|\
| * dm: Drop the block_dev_desc_t typedefSimon Glass2016-03-141-1/+1
| | | | | | | | | | | | | | | | | | Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>