Commit Graph

41058 Commits

Author SHA1 Message Date
York Sun f4325b47a8 powerpc: mpc86xx: Move CONFIG_FSL_LAW to Kconfig
Clean up existing definitions and drop from white list.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 12:38:42 -08:00
York Sun 05cb79a72c powerpc: mpc85xx: Move CONFIG_FSL_LAW to Kconfig
Some header files have this macro defined conditionally and
redefined unconditionally. Remove all existing definitions.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 12:38:42 -08:00
York Sun c6e6bda3a8 powerpc: mpc85xx: Move SECURE_BOOT to Kconfig
Move from CONFIG_SYS_EXTRA_OPTIONS to Kconfig option.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 12:38:41 -08:00
York Sun 01f65d974a armv8: fsl-layerscape: Move SECURE_BOOT to Kconfig
Move from CONFIG_SYS_EXTRA_OPTIONS to Kconfig option.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 12:38:41 -08:00
York Sun 72ccd31e64 armv7: ls1021a: Move SECURE_BOOT option to Kconfig
Move from CONFIG_SYS_EXTRA_OPTIONS to Kconfig option.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 12:38:41 -08:00
Simon Glass 960421ecb3 buildman: Clean up odd characters on the terminal
At present buildman leaves behind a few characters during its progress
updates, which looks odd. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Simon Glass b464f8e7de buildman: Squash useless output from -K
When using #define CONFIG_SOME_OPTION, the value it set to '1'. When using
defconfig (i.e. CONFIG_SOME_OPTION=y) the value is set to 'y'. This results
in differences showing up with -K. These differences are seldom useful.

Adjust buildman to suppress these differences by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Simon Glass 94d2ebe5bc buildman: Add documentation for CONFIG checking
The -K option is not mentioned in the README at present. Add some notes
to describe how this is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Simon Glass b50113f373 buildman: Add an option to just create the config
Normally buildman does a full build of a board. This includes creating the
u-boot.cfg file which contains all the configuration options. Buildman uses
this file with the -K option, to show differences in effective configuration
for each commit.

Doing a full build of U-Boot just to create the u-boot.cfg file is wasteful.
Add a -D option which causes buildman to only create the configuration. This
is enough to support use of -K and can be done much more quickly (typically
5-10 times faster).

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Simon Glass 1bd876301b Makefile: Add a target to create the .cfg files
A common requirement when converting CONFIG options to Kconfig is to check
that the effective configuration has not changed due to the conversion. Add
a target which creates this configuration (in the form of u-boot.cfg) but
does not build U-Boot. This speeds up the checking.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Tom Rini 0317724e6c sandboxfs: Fix resource leak
Now that we free resources in sandbox_fs_ls Coverity is letting us know
that in some cases we might leak.  So in case of error we should still
let os_dirent_free free anything that was allocated.

Fixes: 86167089b7 ("sandbox/fs: Free memory allocated by os_dirent_ls")
Reported-by: Coverity (CID: 153450)
Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
George McCollister a982b6f514 tpm: tpm_tis_lpc: Add support for AT97SC3204
The Atmel AT97SC3204 is also TIS compliant.
Modify the tpm_tis_lpc driver to check for the vid/did used by the
Atmel AT97SC3204 and report an appropriate description.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
Stefan Brüns 0427b9c525 cmd/tpm_test: Fix misleading code indentation
GCC 6.2 reasonably complains about the current code:

../cmd/tpm_test.c: In function ‘do_tpmtest’:
../cmd/tpm_test.c:540:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
   for (i = 0; i < argc; i++)
   ^~~
../cmd/tpm_test.c:542:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
    printf("\n------\n");
    ^~~~~~

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Updated to remove C99 variable decl:
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02 10:37:47 -07:00
York Sun 86d8000f10 script: remove CONFIG_SYS_CCSRBAR_DEFAULT from white list
Now all mpc85xx and mpc86xx have converted to use SYS_CCSRBAR_DEFAULT
in Kconfig. Drop this macro for LSCH2 and remove from white list.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 08:52:34 -08:00
York Sun 4a1e6810a2 powerpc: mpc86xx: Convert CONFIG_SYS_CCSRBAR_DEFAULT to Kconfig option
Move default value definitions to Kconfig SYS_CCSRBAR_DEFAULT.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 08:52:34 -08:00
York Sun 830fc1bfe7 powerpc: mpc85xx: Convert CONFIG_SYS_CCSRBAR_DEFAULT to Kconfig option
Move default value definitions to to Kconfig SYS_CCSRBAR_DEFAULT.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 08:52:34 -08:00
York Sun 22a1b99a1d powerpc: cyrus: Separate P5020/P5040 config options
Instead of using EXTRA options in defconfig, use two targets
in Kconfig to select correct SoC.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-12-02 08:52:34 -08:00
Michal Simek 861fe6503e cmd: scsi: Make private functions static
Two functions should be static because they are not exported to any
other file.
Warnings were reported by sparse C=1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:32 +01:00
Michal Simek 0b3a58eeee scsi: Separate SCSI private block description initialization
When blk_create_device() is called some parameters in blk_desc are
automatically filled. Separate SCSI private initialization and SCSI full
block device initialization not to rewrite already prepared data.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:27 +01:00
Michal Simek c002e39ae6 scsi: Change scsi_scan() to be able to return value
With DM_SCSI this function will return more than one return value to
cover errors.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:26 +01:00
Michal Simek 545a284711 scsi: Make private functions static
Several functions should be static because they are not exported to any
other file.
Warnings were reported by sparse C=1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:26 +01:00
Michal Simek 182ec15307 scsi: Remove completely unused functions
These functions are not called for any location.
This patch removes them scsi_trim_trail(), scsi_get_disk_count()
and scsi_setup_read6().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:26 +01:00
Michal Simek cdb93b276b scsi: Simplify scsi_read/scsi_write()
There is no reason to directly point to static allocated array
when we have proper block_dev pointer available via parameter
in !CONFIG_BLK. For CONFIG_BLK this is read directly from uclass
platdata.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:22 +01:00
Michal Simek bccfd9e967 scsi: Move pccb buffer initalization directly to scsi_detect_dev
pccb is pointer to temporary buffer which is used only for sending
command. Make it local as is done in scsi_read/scsi_write.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:21 +01:00
Michal Simek 4dbee176f8 scsi: Take lun from device block description
Prepare LUN(Logical unit number) directly in block description structure
and reuse it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:21 +01:00
Michal Simek 570712f4bc scsi: Extract device detection algorithm
The patch enables running detection algorithm on block device
description structure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:37:16 +01:00
Michal Simek 92ca476c3a scsi: Extract block device initialization
Extract block device initialization to specific function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02 14:36:10 +01:00
Michal Simek 15a2acdf85 common: miiphyutil: Work and report phy address in hex in mdio cmd
It is confusing that mdio commands work and report phy id as
decimal value when mii is working with hex values.

For example:
ZynqMP> mdio list
gem:
21 - TI DP83867 <--> ethernet@ff0e0000
ZynqMP> mdio read ethernet@ff0e0000 0
Reading from bus gem
PHY at address 21:
0 - 0x1140
ZynqMP> mii dump 21 0
Incorrect PHY address. Range should be 0-31
...
ZynqMP> mii dump 15
0.     (1140)                 -- PHY control register --
  (8000:0000) 0.15    =     0    reset

U-Boot normally takes hex values that's why this patch is changing mdio
command to handle hex instead of changing mii command to handle decimal
values.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02 14:36:02 +01:00
Siva Durga Prasad Paladugu 20ca67900f ARM: zynq: Enable SD1 and qspi for picozed board
Enable SD1 and qspi for picozed board.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02 14:36:01 +01:00
Masahiro Yamada e3e18bea64 ARM: zynq(mp): remove unneeded CONFIG_USB_MAX_CONTROLLER_COUNT defines
ARCH_ZYNQ(MP) selects DM_USB, where CONFIG_USB_MAX_CONTROLLER_COUNT
is not used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02 14:36:01 +01:00
Michal Simek 2661081c30 ARM64: zynqmp: List secondary software boot modes
Using alternative bootmode field to support automatic secondary boot
modes. It is purely software setting where SW modes are using free
bootmode combinations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02 14:35:57 +01:00
Michal Simek fde6cacde2 ARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPL
CONFIG_SYS_CONFIG_NAME is not proper config option for different low
level init files because different board revisions requires different
psu_init_gpl* files.

Also at the end of moving drivers to DM all board specific configuration
files should be removed.

The same changes was done for Zynq.
"ARM: zynq: Simplify zynq configuration"
(sha1: ad5b580126)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02 14:35:50 +01:00
Michal Simek e367240a54 ARM64: zynqmp: Force certain bootmode for SPL
ZynqMP provides an option to overwrite bootmode setting which
can change SPL behavior.
For example: boot SPL via JTAG and then SPL loads images from SD.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02 14:34:37 +01:00
Tom Rini 9ae0e14350 Merge git://www.denx.de/git/u-boot-marvell 2016-12-01 09:24:02 -05:00
Chris Packham 2611c05e84 tools/kwbimage: add DEBUG option
Offset 0x1 in the generated kwb image file is a set of flags, bit 0
enables debug output from the BootROM firmware.  Allow a DEBUG option in
the kwb configuration to request debug output from the BootROM firmware.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2016-12-01 09:10:49 +01:00
Chris Packham 4bdb547978 tools/kwbimage: add BAUDRATE option
Offset 0x18 in some Marvell datasheets this field is redacted as
"reserved". This offset is actually a set of options and bits 2:0 allow
the selection of the UART baudrate.

Allow a BAUDRATE option to set the UART baudrate for any messages coming
from the BootROM firmware.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2016-12-01 09:10:43 +01:00
Chris Packham a53d97ae85 arm: mvebu: move SYS_MVEBU_PLL_CLOCK to Kconfig
The main PLL frequency is 2GHz for Armada-XP and 1GHZ for Armada 375,
38x and 39x.

[ Linux commit ae142bd9976532aa5232ab0b00e621690d8bfe6a ]

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2016-12-01 09:09:20 +01:00
Chris Packham eb1f7784f4 mvebu: db-88f6820-amc: Enable FIT support
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2016-12-01 09:06:17 +01:00
Marek Vasut 09410c6572 SPL: mmc: Make spl_mmc_load_image available
Make the spl_mmc_load_image() available globally, so it can be
invoked directly by SPL on extremely space-constrained systems.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2016-12-01 14:06:41 +09:00
Marek Vasut b5b838f1a7 mmc: Tinification of the mmc code
Add new configuration option CONFIG_MMC_TINY which strips away all
memory allocation within the MMC code and code for handling multiple
cards. This allows extremely space-constrained SPL code use the MMC
framework.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2016-12-01 13:51:57 +09:00
Marek Vasut ce9eca9438 mmc: Fix warning if debug() is not used
If debug() is not used, then the whole content of debug(...) will
be removed by the preprocessor, which will result in the following
warning. This patch adds __maybe_unused annotation to fix this.

drivers/mmc/mmc.c: In function ‘mmc_init’:
drivers/mmc/mmc.c:1685:11: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]
  unsigned start;

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2016-12-01 13:51:08 +09:00
Tomas Melin cd3d48807d mmc: add bkops-enable command
Add new command that provides possibility to enable the
background operations handshake functionality
(BKOPS_EN, EXT_CSD byte [163]) on eMMC devices.

This is an optional feature of eMMCs, the setting is write-once.
The command must be explicitly taken into use with
CONFIG_CMD_BKOPS_ENABLE.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
2016-12-01 11:09:44 +09:00
Seung-Woo Kim f0ecfc5e7e mmc: s5p_sdhci: fix to check proper pinmux id
At sdhci_get_config(), there was wrong condition to check pimux
id, so this patch fixes to check proper pinmux id.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2016-12-01 11:09:44 +09:00
Tom Rini 38c4f0bdce ts4600: Disable CONFIG_DISPLAY_CPUINFO
Without this change we see:
../arch/arm/cpu/arm926ejs/mxs/mxs.c: In function ‘print_cpuinfo’:
../arch/arm/cpu/arm926ejs/mxs/mxs.c:181:23: warning: unused variable ‘data’ [-Wunused-variable]
../arch/arm/cpu/arm926ejs/mxs/mxs.c:180:6: warning: variable ‘cpurev’ set but not used [-Wunused-but-set-variable]

So the easy solution is to disable CONFIG_DISPLAY_CPUINFO

Reviewed-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-11-30 19:31:18 -05:00
Tom Rini a2cb31086f Merge branch 'master' of git://git.denx.de/u-boot-mips 2016-11-30 19:31:17 -05:00
Tom Rini bb417f1c90 travis.yml: Split Freescale ARM job up more
In order to avoid running into the time limit, split the 32bit and 64bit
Freescale boards into separate jobs.  We could either pass
"freescale & armv8" to buildman or exclude all of the 32bit CPUs.  While
the former is shorter I fear the amount of possible escaping required
would make things less readable.

Signed-off-by: Tom Rini <trini@konsulko.com>
2016-11-30 19:31:10 -05:00
Paul Burton 6fd596a1aa MIPS: Fix map_physmem for cached mappings
map_physmem should return a pointer that can be used by the CPU to
access the given memory - on MIPS simply returning the physical address
as it does prior to this patch doesn't achieve that. Instead return a
pointer to the memory within (c)kseg0, which matches up consistently
with the (c)kseg1 pointer that uncached mappings return via ioremap.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2016-11-30 16:18:19 +01:00
Paul Burton 7a3e0f74a7 MIPS: Use ram_top, not bi_memsize, in arch_lmb_reserve
When calculating the region to reserve for the stack in
arch_lmb_reserve, make use of ram_top instead of adding bi_memsize to
CONFIG_SYS_SDRAM_BASE. This avoids overflow if the system has enough
memory to reach the end of the address space.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2016-11-30 16:15:51 +01:00
Marek Vasut e7e0469c88 mips: Let cache.h be included from assembly source
Add ifdef __ASSEMBLY__ around the function prototype to let cache.h
be included from assembly code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
2016-11-30 16:13:17 +01:00
Daniel Schwierzeck 4c2cb11516 common/board_f: enable initr_trap for MIPS
Enable initr_trap hook also for MIPS to install and enable
U-Boot's specific MIPS exception handlers.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-11-30 16:13:05 +01:00