summaryrefslogtreecommitdiff
path: root/include/common.h
Commit message (Collapse)AuthorAgeFilesLines
* env: Rename some other getenv()-related functionsSimon Glass2017-08-161-1/+1
| | | | | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these other functions as well, for consistency: getenv_vlan() getenv_bootm_size() getenv_bootm_low() getenv_bootm_mapsize() env_get_default() Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()Simon Glass2017-08-161-4/+15
| | | | | | | | We are now using an env_ prefix for environment functions. Rename these for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-161-7/+25
| | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename common functions related to setenv()Simon Glass2017-08-161-5/+21
| | | | | | | | | We are now using an env_ prefix for environment functions. Rename these commonly used functions, for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename setenv() to env_set()Simon Glass2017-08-161-1/+13
| | | | | | | | We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Drop saveenv() in favour of env_save()Simon Glass2017-08-151-1/+0
| | | | | | | | | Use the env_save() function directly now that there is only one implementation of saveenv(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: board_f: Make reserve_mmu a weak functionSiva Durga Prasad Paladugu2017-08-021-0/+1
| | | | | | | | | Make reserve_mmu a weak so that it provides an option to customize this routine as per platform need Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board_f: Add new function to allow runtime DTB selectionCooper Jr., Franklin2017-07-101-0/+4
| | | | | | | | | | | | Runtime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on. Embedded_dtb_select handles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* serial: make serial_stub_* to static functionsMasahiro Yamada2017-07-061-5/+0
| | | | | | | | | | Add missing static to serial_stub_puts(). Unexport serial_stub_{getc,tstc} because they are used locally. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: microblaze: Drop arch-specific declarationsSimon Glass2017-06-051-5/+0
| | | | | | These are not needed and should not be in common.h. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: arm: freescale: layerscape: Move header files out of common.hSimon Glass2017-06-051-7/+0
| | | | | | | We should not have an arch-specific header file in common.h. Adjust the board files a little so it is not needed, and drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: arm: davinci: Move header file out of commonSimon Glass2017-06-051-3/+0
| | | | | | | | | We should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: ep93xx: Move arch-specific declarations out of commonSimon Glass2017-06-051-10/+0
| | | | | | | These declarations should not be in common. Remove those that are not needed and move the others to an arch-specific location. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: freescale: Move arch-specific imx code to arch-imxSimon Glass2017-06-051-9/+0
| | | | | | | These declarations should not be in common.h. Move them to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: freescale: Move arch-specific declarationsSimon Glass2017-06-051-95/+1
| | | | | | | | | The declarations should not be in common.h. Move them to the arch-specific headers. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Fixup thinko defined(FSL_LSCH3) -> defined(CONFIG_FSL_LSCH3)] Signed-off-by: Tom Rini <trini@konsulko.com>
* common: powerpc: Move arch-specific headersSimon Glass2017-06-051-43/+1
| | | | | | | | Set up a new asm/ppc.h header file to hold this arch-specific stuff. It should not be in common.h. It probably should be refactored to use asm/arch instead, but that is a job for the maintainer. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move PPC4xx_SYS_INFO() et al to arch-specific headerSimon Glass2017-06-051-6/+0
| | | | | | | These definitions should not be in common.h. Move them to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* 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>