Commit Graph

449 Commits

Author SHA1 Message Date
Simon Glass
723806cc5b env: Rename some other getenv()-related functions
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>
2017-08-16 08:31:11 -04:00
Simon Glass
bfebc8c965 env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
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>
2017-08-16 08:30:32 -04:00
Simon Glass
00caae6d47 env: Rename getenv/_f() to env_get()
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>
2017-08-16 08:30:24 -04:00
Simon Glass
018f530323 env: Rename common functions related to setenv()
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>
2017-08-16 08:23:32 -04:00
Simon Glass
382bee57f1 env: Rename setenv() to env_set()
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>
2017-08-16 08:22:18 -04:00
Simon Glass
01510091de env: Drop saveenv() in favour of env_save()
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>
2017-08-15 20:50:30 -04:00
Siva Durga Prasad Paladugu
60873f736e common: board_f: Make reserve_mmu a weak function
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>
2017-08-02 09:11:52 +02:00
Cooper Jr., Franklin
af9e6ad4ab board_f: Add new function to allow runtime DTB selection
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>
2017-07-10 14:25:54 -04:00
Masahiro Yamada
49ddcf3e0e serial: make serial_stub_* to static functions
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>
2017-07-06 13:09:35 -04:00
Simon Glass
d757975737 common: microblaze: Drop arch-specific declarations
These are not needed and should not be in common.h. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 14:13:00 -04:00
Simon Glass
457e51cffd common: arm: freescale: layerscape: Move header files out of common.h
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>
2017-06-05 14:12:59 -04:00
Simon Glass
89f5eaa1ee common: arm: davinci: Move header file out of common
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>
2017-06-05 12:31:23 -04:00
Simon Glass
1c16d2e248 common: ep93xx: Move arch-specific declarations out of common
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>
2017-06-05 12:31:22 -04:00
Simon Glass
68994b98fc common: freescale: Move arch-specific imx code to arch-imx
These declarations should not be in common.h. Move them to an
arch-specific header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 12:31:22 -04:00
Simon Glass
6e2941d787 common: freescale: Move arch-specific declarations
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>
2017-06-05 12:30:55 -04:00
Simon Glass
850431590c common: powerpc: Move arch-specific headers
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>
2017-06-05 11:02:40 -04:00
Simon Glass
8fb69c1654 common: Move PPC4xx_SYS_INFO() et al to arch-specific header
These definitions should not be in common.h. Move them to an arch-specific
header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:40 -04:00
Simon Glass
a2038d7b1e common: Drop determine_sysper() and determine_pci_clock_per()
These arch-specific declarations should not be in common.h. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:39 -04:00
Simon Glass
e8c8f48dd2 common: Drop cpu_init_f() declarations
These arch-specific functions are not needed here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:39 -04:00
Simon Glass
b885d02e2c arm: Remove include files from common.h
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>
2017-06-05 11:02:38 -04:00
Simon Glass
3a53e99c7d nds32: Remove include files from common.h
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>
2017-06-05 11:02:36 -04:00
Simon Glass
3ff240c92f x86: Don't include asm/u-boot.h in common
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>
2017-06-05 11:02:35 -04:00
Simon Glass
587b6226aa sandbox: Don't include asm/u-boot.h in common
This is not actually needed anywhere, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:35 -04:00
Simon Glass
5c73f01218 mips: Don't include asm/u-boot.h in common
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>
2017-06-05 11:02:34 -04:00
Simon Glass
b5e7bd44e7 arc: Don't include asm/u-boot.h in common
This is not actually needed anywhere, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:34 -04:00
Simon Glass
e8d4fa9057 nds32: Make u-boot-nds32.h a private header
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>
2017-06-05 11:02:33 -04:00
Simon Glass
a320acc419 mips: Make u-boot-mips.h a private header
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>
2017-06-05 11:02:33 -04:00
Simon Glass
ac6a6bd64a arm: Make u-boot-arm.h a private header
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>
2017-06-05 11:02:33 -04:00
Simon Glass
6862b50f6e x86: Make u-boot-x86.h a private header
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>
2017-06-05 11:02:32 -04:00
Simon Glass
86e748d946 sandbox: Make u-boot-sandbox.h a private header
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>
2017-06-05 11:02:32 -04:00
Simon Glass
d6d2d0b5e2 arc: Make u-boot-arc.h a private header
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>
2017-06-05 11:02:31 -04:00
Simon Glass
7a7530afb8 samsung: usb: Drop ohci-s3c24xx driver
This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:30 -04:00
Simon Glass
12d738ae4c api: Add a header for api_init()
Put this in its own header instead of using common.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:29 -04:00
Simon Glass
4baf23e0be common: Move get_OPB_freq() and get_PCI_freq() to PPC header
These should not be in common.h. Move the to an arch-specific header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:28 -04:00
Simon Glass
58a8ec4cc0 common: Move pcie_setup_hoses() to PPC header
Only one board needs this definition. Move it to an arch-specific header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:28 -04:00
Simon Glass
787ea6e453 common: Drop pci_master_init()
This should not be in common.h. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:27 -04:00
Simon Glass
4fcc6a7b89 common: Move pci_target_init() to PPC header
Only one boards needs this definition. Move it to an arch-specific header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05 11:02:27 -04:00
Simon Glass
a55132bd6c common: Drop pci_pre_init() and is_pci_host()
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>
2017-06-05 11:02:26 -04:00
Simon Glass
f66f88f643 common: Drop inclusion of pci.h
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>
2017-06-05 11:02:26 -04:00
Simon Glass
eb5ba3aefd i2c: Drop use of CONFIG_I2C_HARD
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>
2017-05-15 06:17:09 +02:00
Simon Glass
f1683aa73c board_f: Rename initdram() to dram_init()
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>
2017-04-13 09:40:57 -04:00
Simon Glass
e5fb573f64 powerpc: Move setup_board_extra() into a PPC file
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>
2017-04-05 16:36:55 -04:00
Simon Glass
5e924a13e7 Move dram_init_banksize() to a common header
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>
2017-04-05 16:36:51 -04:00
Simon Glass
088454cde2 board_f: Drop return value from initdram()
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>
2017-04-05 13:59:20 -04:00
Simon Glass
52c411805c board_f: Drop board_type parameter from initdram()
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>
2017-04-05 13:58:44 -04:00
Simon Glass
8749fa6af3 board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private
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>
2017-04-05 13:55:08 -04:00
Simon Glass
d891ab95c2 board_f: powerpc: Move prt_83xx_rsr() to private code
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>
2017-04-05 13:55:06 -04:00
Simon Glass
70e2aaf380 board_f: powerpc: Use timer_init() instead of init_timebase()
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>
2017-04-05 13:54:29 -04:00
Simon Glass
75efc34bfa board_f: Remove adjust_sdram_tbs_8xx() from the init sequence
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>
2017-04-05 13:52:52 -04:00
Simon Glass
26345552d6 board_f: Remove sdram_adjust_866() from the init sequence
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>
2017-04-05 13:52:51 -04:00