summaryrefslogtreecommitdiffstats
path: root/include/common.h
Commit message (Collapse)AuthorAgeFilesLines
* common: Update comment to show progressSimon Glass2020-01-171-3/+2
| | | | | | | This file doesn't include any declarations anymore but it does include other headers. Update the header comment to mention this. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Collect all the header files togetherSimon Glass2020-01-171-24/+0
| | | | | | | There are many header files included here. Put them all together since the blank lines are not useful. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move and rename CONFIG_SYS_SUPPORT_64BIT_DATASimon Glass2020-01-171-4/+0
| | | | | | | | This is not really a CONFIG since it is not intended to be set by boards. Move it into the compiler header with other similar defines, and rename it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move ROUND() into kernel.hSimon Glass2020-01-171-2/+0
| | | | | | Move this macro in with all the other rounding macros. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move check_member() to kernel.hSimon Glass2020-01-171-11/+0
| | | | | | | The kernel.h file has a number of useful macros including a few related to structures. Move check_member() there too. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move hang() to the same header as panic()Simon Glass2020-01-171-5/+0
| | | | | | | | | | At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
* common: Move testdram() into init.hSimon Glass2020-01-171-4/+0
| | | | | | This function is called during init so move it to the init header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move RAM-sizing functions to init.hSimon Glass2020-01-171-4/+0
| | | | | | | These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Rename and move source()Simon Glass2020-01-171-3/+0
| | | | | | | | This function has a very generic name which does not adequately describe its purpose. Rename it and move it to image.h, since it relates to reading a script from an image. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move the image globals into image.hSimon Glass2020-01-171-4/+0
| | | | | | | These three globals relate to image handling. Move them to the image header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Rename load_addr, save_addr, save_sizeSimon Glass2020-01-171-3/+3
| | | | | | | | | These global variables are quite short and generic. In fact the same name is more often used locally for struct members and function arguments. Add a image_ prefix to make them easier to distinguish. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_cpu() to the CPU headerSimon Glass2020-01-171-2/+0
| | | | | | Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_misc() function to arch headerSimon Glass2020-01-171-1/+0
| | | | | | | This function is only used on ARM devices. Move it out of the common file and to a arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move get_tbclk() to time.hSimon Glass2020-01-171-1/+0
| | | | | | | This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move clock functions into a new fileSimon Glass2020-01-171-5/+0
| | | | | | | These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move upmconfig() to ppc.hSimon Glass2020-01-171-1/+0
| | | | | | | This file is only used by PowerPC so move it to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move ll_boot_init() to init.hSimon Glass2020-01-171-7/+0
| | | | | | This is an init-related function so belongs in that file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: arm: Move s_init() to an ARM-specific headerSimon Glass2020-01-171-2/+0
| | | | | | | This function is only used on ARM devices so does not belong in the global common header file. Move it to an ARM header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move device-tree setup functions to fdt_support.hSimon Glass2020-01-171-12/+0
| | | | | | | | These functions relate to setting up the device tree for booting the OS. The fdt_support.h header file supports similar functions, so move these there. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move type declarations to linux/types.hSimon Glass2020-01-171-4/+0
| | | | | | | | | This file already has lots of type declarations so it seems better to put all of them there. Move them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop the symbol_lookup() declarationSimon Glass2020-01-171-3/+0
| | | | | | | This function is not called anywhere so we can drop the declaration. If it is needed one day, it should be added in its own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop CONFIG_HAS_POSTSimon Glass2020-01-171-4/+0
| | | | | | | | This only exists to control whether the post/ directory is build. It is just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use an ifdef in the Makefile instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop CONFIG_POST_STD/ALT_LISTSimon Glass2020-01-171-3/+0
| | | | | | | | These CONFIG options are not used anymore. CONFIG_POST_ALT_LIST just causes CONFIG_POST_STD_LIST to be set and it causes tests.c to be compiled. So just make compiling tests.c unconditional. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move CONFIG_SYS_DEF_EEPROM_ADDR out of common.hSimon Glass2020-01-171-4/+0
| | | | | | | | | This define seems better suited to the eeprom header file, particularly as it is only used in the eeprom.c file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_phy() to net.hSimon Glass2020-01-171-3/+0
| | | | | | This is a network function so let's move it into that header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop floppy disk supportSimon Glass2020-01-171-1/+0
| | | | | | | | | This seems pretty old now. It has not been converted to driver model and is not used by any boards. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move jumptable_init() out of common.hSimon Glass2020-01-171-3/+0
| | | | | | | This function is defined in exports.c so move it to its header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* common: Move relocate_code() to init.hSimon Glass2020-01-171-6/+0
| | | | | | | | | This is an init function so move it out of the common header. Avoid using the typedef so that we don't have to include the global_data header file. Also tidy up the function style in comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move functions for loading from fat/ext2 to fs.hSimon Glass2020-01-171-6/+0
| | | | | | | These are filesystem functions and belong in the filesystem header file. Move them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move do_tftpb() to net.hSimon Glass2020-01-171-3/+0
| | | | | | This function belongs in the network header file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move embedded fdt location to fdtdec.hSimon Glass2020-01-171-3/+0
| | | | | | | These declarations are only used in fdtdec.c so move them to its header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop checkflash() and checkdram()Simon Glass2020-01-171-2/+0
| | | | | | These functions are not used in U-Boot. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move flash_perror() to flash.hSimon Glass2020-01-171-3/+0
| | | | | | | | This function belongs more in flash.h than common.h so move it. Also remove the space before the bracket in some calls. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move main_loop() to init.hSimon Glass2020-01-171-3/+0
| | | | | | | Move this function out of common.h and into a better place. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* common: Drop mdm_init()Simon Glass2020-01-171-1/+0
| | | | | | | This is not used in U-Boot. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* common: remove duplicate typedef for ucharHeinrich Schuchardt2019-12-131-1/+0
| | | | | | | | | | With commit 37db55b7e9db ("linux/types.h: fix typo unchar") we have a duplicate typedef for uchar. As linux/types.h is included in common.h we don't need another typedef for uchar there. Fixes: 37db55b7e9db ("linux/types.h: fix typo unchar") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* common: Move old EEPROM functions into a new headerSimon Glass2019-12-021-15/+0
| | | | | | | | These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Drop get_endaddr()Simon Glass2019-12-021-1/+0
| | | | | | | This is not used in U-Boot. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move trap_init() out of common.hSimon Glass2019-12-021-1/+0
| | | | | | | | Move this function into the init.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* common: Move pci_init_board() out of common.hSimon Glass2019-12-021-2/+0
| | | | | | | | This function can be dropped when all boards use driver model for PCI. For now, move it into init.h with a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move some board functions out of common.hSimon Glass2019-12-021-7/+0
| | | | | | | A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move board_get_usable_ram_top() out of common.hSimon Glass2019-12-021-11/+0
| | | | | | | | | Move this function into init.h which seems to be designed for this sort of thing. Also update the header to declare struct global_data so that it can be included without global_data.h being needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Drop board_show_dram()Simon Glass2019-12-021-9/+0
| | | | | | | | This function is not defined by any boards so the feature is not used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move command functions out of common.hSimon Glass2019-12-021-16/+1
| | | | | | | Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move enable/disable_interrupts out of common.hSimon Glass2019-12-021-6/+0
| | | | | | | | Move these two functions into the irq_funcs.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move interrupt functions into a new headerSimon Glass2019-12-021-7/+0
| | | | | | | | | | | | These functions do not use driver model but are fairly widely used in U-Boot. But it is not clear that they will use driver model anytime soon, so we don't want to label them as 'legacy'. Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it is widely used in U-Boot already. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move ARM cache operations out of common.hSimon Glass2019-12-021-24/+0
| | | | | | | | | These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Drop checkicache() and checkdcache()Simon Glass2019-12-021-2/+0
| | | | | | | | These are used by only one arch and only within a single file. Drop the declarations from the common file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move some cache and MMU functions out of common.hSimon Glass2019-12-021-9/+1
| | | | | | | | | | | | These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm: powerpc: Tidy up code style for cache functionsSimon Glass2019-12-021-1/+1
| | | | | | | Remove the unwanted space before the bracket. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>