14 Feb, 2017
2 commits
-
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.Signed-off-by: Grygorii Strashko
-
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.Signed-off-by: Grygorii Strashko
01 Feb, 2017
1 commit
-
The default value for CONFIG_ENV_SPI_MODE is SPI_MODE_3. It makes more
sense to set it to CONFIG_SF_DEFAULT_MODE.Signed-off-by: Jean-Jacques Hiblot
31 Jan, 2017
2 commits
-
commit b3d2861eb20a795b99292b823c923935df26dfc6 upstream.
spl_init on some boards is called after stack and heap relocation, on
some platforms spl_relocate_stack_gd is called to handle setting the
limit to its value CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN when simple
SPL malloc is enabled during relocation. spl_init should then not
re-assign the old pre-relocation limit when this is defined.Signed-off-by: Andrew F. Davis
Reviewed-by: Tom Rini -
commit 1923d54bfc2261948448a821d284f10566fde7fe upstream.
Add debug statements to memalign_simple to match malloc_simple.
Signed-off-by: Andrew F. Davis
Reviewed-by: Tom Rini
23 Jan, 2017
2 commits
-
commit cf947da19aecd1b430f22d73ad109af64a6051b5 upstream.
Signed-off-by: Andrew F. Davis
Acked-by: Lokesh Vutla
Acked-by: Michal Simek -
commit 5d28b930f237540382a111b6b990a1738b2f3483 upstream.
These files are only included for build by the make system
when CONFIG_SPL_{EXT,FAT}_SUPPORT is enabled, remove the unneed
checks for these in the source files.Signed-off-by: Andrew F. Davis
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass
11 Jan, 2017
2 commits
-
Add support for enabling d-cache in SPL. The sequence in SPL tries to
replicate the sequence done in U-Boot except that MMU entries were added
for SRAM.Signed-off-by: Lokesh Vutla
-
Move the assignment of board info to global data a bit early which is safe,
so that ram details can be used to enable caches.Signed-off-by: Lokesh Vutla
03 Jan, 2017
1 commit
-
When we want to use Secure Boot with HAB from SPL over U-Boot.img,
we need to append the IVT to the image and leave space for the CSF.
Images generated as firmware_ivt can directly be signed using the
Freescale code signing tool. For creation of a CSF, mkimage outputs
the correct HAB Blocks for the image.
The changes to the usual firmware image class are quite small,
that is why I implemented that directly into the default_image.Cc: sbabic@denx.de
v2-Changes: None
Signed-off-by: Sven Ebenfeld
Reviewed-by: George McCollister
Tested-by: George McCollister
20 Dec, 2016
3 commits
-
Stop boot process if fpga programming fails.
Without this patch boot process continues even if fpga programming
failed.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
All sata based drivers are bind and corresponding block
device is created. Based on this find_scsi_device() is able
to get back block device based on scsi_curr_dev pointer.intr_scsi() is commented now but it can be replaced by calling
find_scsi_device() and scsi_scan().scsi_dev_desc[] is commented out but common/scsi.c heavily depends on
it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol
is reassigned to a block description allocated by uclass.
There is only one block description by device now but it doesn't need to
be correct when more devices are present.scsi_bind() ensures corresponding block device creation.
uclass post_probe (scsi_post_probe()) is doing low level init.SCSI/SATA DM based drivers requires to have 64bit base address as
the first entry in platform data structure to setup mmio_base.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
The most of ethernet drivers are using this mdio registration sequence.
strcpy(priv->bus->name, "emac");
mdio_register(priv->bus);
Where driver can be used only with one MDIO bus because only unique
name should be used.Other drivers are using unique device name for MDIO registration to
support multiple instances.
snprintf(priv->bus->name, sizeof(bus->name), "%s", name);With DM dev->seq is used more even in logs
(like random MAC address generation:
printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
dev->name, dev->seq, pdata->enetaddr);
)
where eth%d prefix is used.Simplify driver code to register mdio device with dev->seq number
to simplify mdio registration and reduce code duplication across
all drivers. With DM_SEQ_ALIAS enabled dev->seq reflects alias setting.Signed-off-by: Michal Simek
Acked-by: Joe Hershberger
Reviewed-by: Simon Glass
09 Dec, 2016
5 commits
-
This task can be handled by inline code now. Drop this function.
Signed-off-by: Simon Glass
-
Rather than have this function figure out the correct loader again, pass
it in as a parameter.Signed-off-by: Simon Glass
-
Create a boot_from_devices() function to handle trying each device. This
helps to reduce the size of the already-large board_init_r() function.Signed-off-by: Simon Glass
-
It is useful to name each method so that we can print out this name when
using the method. Currently this happens using a separate function. In
preparation for unifying this, add a name to each method.The name is only available if we have libcommon support (i.e can use
printf()).Signed-off-by: Simon Glass
-
This reverts commit 3edc0c252257e4afed163a3a74aba24a5509b198, reversing
changes made to bb135a0180c31fbd7456021fb9700b49bba7f533.
08 Dec, 2016
2 commits
-
The most of ethernet drivers are using this mdio registration sequence.
strcpy(priv->bus->name, "emac");
mdio_register(priv->bus);
Where driver can be used only with one MDIO bus because only unique
name should be used.Other drivers are using unique device name for MDIO registration to
support multiple instances.
snprintf(priv->bus->name, sizeof(bus->name), "%s", name);With DM dev->seq is used more even in logs
(like random MAC address generation:
printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
dev->name, dev->seq, pdata->enetaddr);
)
where eth%d prefix is used.Simplify driver code to register mdio device with dev->seq number
to simplify mdio registration and reduce code duplication across
all drivers. With DM_SEQ_ALIAS enabled dev->seq reflects alias setting.Signed-off-by: Michal Simek
---
For example:Board: Xilinx Zynq
Net: ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-idWarning: ethernet@e000b000 (eth0) using random MAC address -
7a:fc:90:53:6a:41
eth0: ethernet@e000b000ZYNQ GEM: e000c000, phyaddr ffffffff, interface
rgmii-idWarning: ethernet@e000c000 (eth3) using random MAC address -
1a:ff:d7:1a:a1:b2
, eth3: ethernet@e000c000
** Bad device size - mmc 0 **
Checking if uenvcmd is set ...
Hit any key to stop autoboot: 0
Zynq> mdio list
eth0:
17 - Marvell 88E1111S ethernet@e000b000
eth3:
17 - Marvell 88E1111S ethernet@e000c000
Zynq> -
All sata based drivers are bind and corresponding block
device is created. Based on this find_scsi_device() is able
to get back block device based on scsi_curr_dev pointer.intr_scsi() is commented now but it can be replaced by calling
find_scsi_device() and scsi_scan().scsi_dev_desc[] is commented out but common/scsi.c heavily depends on
it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol
is reassigned to a block description allocated by uclass.
There is only one block description by device now but it doesn't need to
be correct when more devices are present.scsi_bind() ensures corresponding block device creation.
uclass post_probe (scsi_post_probe()) is doing low level init.SCSI/SATA DM based drivers requires to have 64bit base address as
the first entry in platform data structure to setup mmio_base.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
Series-changes: 2
- Use CONFIG_DM_SCSI instead of mix of DM_SCSI and DM_SATA
Ceva sata has never used sata commands that's why keep it in
SCSI part only.
- Separate scsi_scan() for DM_SCSI and do not change cmd/scsi.c
- Extend platdataSeries-changes: 3
- Fix scsi_scan return path
- Fix header location uclass-internal.h
- Add scsi_max_devs under !DM_SCSI
- Add new header device-internal because of device_probe()
- Redesign block device creation algorithm
- Use device_unbind in error path
- Create block device with id and lun numbers (lun was there in v2)
- Cleanup dev_num initialization in block device description
with fixing parameters in blk_create_devicef
- Create new Kconfig menu for SATA/SCSI drivers
- Extend description for DM_SCSI
- Fix Kconfig dependencies
- Fix kernel doc format in scsi_platdata
- Fix ahci_init_one - vendor variableSeries-changes: 4
- Fix Kconfig entry
- Remove SPL ifdef around SCSI uclass
- Clean ahci_print_info() ifdef logic
06 Dec, 2016
1 commit
-
The patch
"dm: spl: mmc: Support CONFIG_BLK in SPL MMC"
(sha1: 87bce4e5c0b55452d70830928b2d7b98fa24d4e3)
converted FAT part of spl_mmc_do_fs_boot() but forget to update also EXT
part by 's/&mmc->block_dev/mmc_get_blk_desc(mmc)/'.
This patch is fixing compilation error when CONFIG_SPL_EXT_SUPPORT
is enabled.Signed-off-by: Michal Simek
Reviewed-by: Jaehoon Chung
Reviewed-by: Simon Glass
05 Dec, 2016
1 commit
-
After an image is selected out of a FIT blob for further processing we
run an optional, platform specific, post-processing function on this
component. This post-processing may modify the position and size of the
image, so after post-processing we update the location and size for this
image in the FIT header. This can cause problems as the position of
subsequent components in the FIT blob are only referenced by relative
position to the end of the last component. When we resize or move a
component the following components position will be calculated
incorrectly. To fix this, we do not update the FIT header but instead
only update our local understanding of the image data. This also allows
us to re-run post-processing steps if needed.Signed-off-by: Andrew F. Davis
Tested-by: Carlos Hernandez
Reviewed-by: Simon Glass
Reviewed-by: Lokesh Vutla
04 Dec, 2016
4 commits
-
Also convert MENU while we're in here.
Signed-off-by: Tom Rini
-
Add a new image type representing Trusted Execution Environment (TEE)
image types. For example, an OP-TEE OS binary image.Signed-off-by: Andrew F. Davis
Reviewed-by: Simon Glass -
To help automate the loading of custom image types we add the ability
to define custom handlers for the loadable section types. When we find
a compatible type while loading a "loadable" image from a FIT image we
run its associated handlers to perform any additional steps needed for
loading this image.Signed-off-by: Andrew F. Davis
Reviewed-by: Simon Glass
03 Dec, 2016
3 commits
-
Commit e2f88dfd2d96 ("libfdt: Introduce new ARCH_FIXUP_FDT option")
allows us to skip memory setup of DTB, but a problem for ARM is that
spin_table_update_dt() and psci_update_dt() are skipped as well if
CONFIG_ARCH_FIXUP_FDT is disabled.This commit allows us to skip only fdt_fixup_memory_banks() instead
of the whole of arch_fixup_fdt(). It will be useful when we want to
use a memory node from a kernel DTB as is, but need some fixups for
Spin-Table/PSCI.Signed-off-by: Masahiro Yamada
Acked-by: Alexey Brodkin
Acked-by: Simon Glass
Fixed build error for x86:
Signed-off-by: Simon Glass -
When CONFIG_SPL_STACK_R is enabled, and spl_init() is called before
board_init_r(), spl_relocate_stack_gd() will move global_data to a new
place in memory. This affects driver model since it uses a list for the
uclasses. Unless this is updated the list will become invalid. When
looking for a non-existent uclass, such as when adding a new one, the loop
in uclass_find() may continue forever, thus causing a hang.Add a function to correct this rather obscure bug.
Signed-off-by: Simon Glass
-
Since a platform conversion to generic board support has not been
accomplished some architecture specific bits are missing from board_f
init sequence, the change adds a number of basic expected callbacks
into early init sequence.Signed-off-by: Vladimir Zapolskiy
Reviewed-by: Simon Glass
02 Dec, 2016
10 commits
-
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
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass -
With DM_SCSI this function will return more than one return value to
cover errors.Suggested-by: Simon Glass
Signed-off-by: Michal Simek
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass -
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
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass -
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
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass -
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
Reviewed-by: Simon Glass -
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
Reviewed-by: Simon Glass -
Prepare LUN(Logical unit number) directly in block description structure
and reuse it.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
The patch enables running detection algorithm on block device
description structure.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
Extract block device initialization to specific function.
Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
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 resetU-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
Reviewed-by: Simon Glass
Acked-by: Joe Hershberger
01 Dec, 2016
1 commit
-
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
Cc: Tom Rini
Cc: Simon Glass
Cc: Jaehoon Chung