[U-Boot] [PATCH][v3] ARMv8/sec_firmware : Update chosen/kaslr-seed with random number

2017-08-01 Thread Ruchika Gupta
kASLR support in kernel requires a random number to be passed via chosen/kaslr-seed propert. sec_firmware generates this random seed which can then be passed in the device tree node. sec_firmware reserves JR3 for it's own usage. Node for JR3 is removed from device-tree. Signed-off-by: Ruchika Gup

Re: [U-Boot] [RFC PATCH 0/6] rockchip: rk3368: remove secure timer usage and use DM timer

2017-08-01 Thread Kever Yang
Hi Philipp, Simon, I still think we should have a option to no involve so much framework thing in very early boot stage like TPL/SPL, for those chipset with very little sram onchip. Andy send some patches for rk3036 recently, because it get out of memory in SPL and not able to boot.

Re: [U-Boot] [PATCH v3 65/66] rockchip: board: puma-rk3399: fix warnings in puma_rk3399/fit_spl_atf.its

2017-08-01 Thread Kever Yang
Hi Philipp, rk3399 atf has 3 parts, sram.data, sram.text, pmu_fw for m0, and now the ATF project output with all 3 section in one bl31.elf, I use to abstract them into 3 separate bin file and package them with fit. Could you share some more detail about how you use the ATF in puma

Re: [U-Boot] [PATCH] vsprintf.c: add wide string (%ls) support

2017-08-01 Thread Heinrich Schuchardt
On 07/31/2017 02:42 PM, Rob Clark wrote: > This is convenient for efi_loader which deals a lot with utf16. > > Signed-off-by: Rob Clark > --- > lib/vsprintf.c | 39 +-- > 1 file changed, 37 insertions(+), 2 deletions(-) > > diff --git a/lib/vsprintf.c b/lib/v

Re: [U-Boot] [PATCH] efi_loader: make pool allocations cacheline aligned

2017-08-01 Thread Heinrich Schuchardt
On 08/01/2017 10:00 PM, Rob Clark wrote: > This avoids printf() spam about file reads (such as loading an image) > into unaligned buffers (and the associated memcpy()). And generally > seems like a good idea. > > Signed-off-by: Rob Clark > --- > lib/efi_loader/efi_memory.c | 5 +++-- > 1 file c

[U-Boot] [PATCH 2/2] Move PHY_MICREL and PHY_MICREL_KSZ90X1 to Kconfig

2017-08-01 Thread Alexandru Gagniuc
Signed-off-by: Alexandru Gagniuc --- configs/Cyrus_P5020_defconfig| 2 ++ configs/Cyrus_P5040_defconfig| 2 ++ configs/alt_defconfig| 1 + configs/apalis_imx6_defconfig| 2 ++ configs/apalis_imx6_nospl_com_defconfig | 2 ++ configs/apalis_i

Re: [U-Boot] Please pull u-boot-fsl-qoriq master

2017-08-01 Thread Bin Meng
Hi York, On Wed, Aug 2, 2017 at 6:56 AM, York Sun wrote: > Tom, > > The following changes since commit f19955a01482d118eac0fdaf530ec6e5b08cf414: > >Merge git://git.denx.de/u-boot-uniphier (2017-07-26 11:29:25 -0400) > > are available in the git repository at: > >git://git.denx.de/u-boot-f

[U-Boot] [PATCH 2/2] sandbox: Convert SANDBOX_BITS_PER_LONG to Kconfig

2017-08-01 Thread Bin Meng
Convert SANDBOX_BITS_PER_LONG to Kconfig and assign it a correct number depending on which host we are going to build and run. Signed-off-by: Bin Meng --- arch/sandbox/Kconfig | 5 + board/sandbox/README.sandbox | 7 +++ scripts/config_whitelist.txt | 1 - 3 files changed, 8 ins

[U-Boot] [PATCH 1/2] sandbox: Introduce Kconfig option for 32/64 bit host

2017-08-01 Thread Bin Meng
It seems most of the time we are building and running sandbox on 64-bit host. But we do support 32-bit host as well. Introduce Kconfig option for this. Signed-off-by: Bin Meng --- arch/sandbox/Kconfig | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/sandbox/Kconfig b/

[U-Boot] Please pull u-boot-fsl-qoriq master

2017-08-01 Thread York Sun
Tom, The following changes since commit f19955a01482d118eac0fdaf530ec6e5b08cf414: Merge git://git.denx.de/u-boot-uniphier (2017-07-26 11:29:25 -0400) are available in the git repository at: git://git.denx.de/u-boot-fsl-qoriq.git ec85721c8b94f9eb6807ebb15a223e4ec49a092a for you to fetch

Re: [U-Boot] [PATCH 2/2] sf: Preserve QE bit when clearing BP# bits for Macronix flash

2017-08-01 Thread Bin Meng
Hi Jagan, On Wed, Aug 2, 2017 at 12:01 AM, Jagan Teki wrote: > On Sun, Jul 23, 2017 at 8:14 PM, Bin Meng wrote: >> On some flash (like Macronix), QE (quad enable) bit is in the same >> status register as BP# bits, and we need preserve its original value >> during a reboot cycle as this is requir

[U-Boot] [PATCH] efi_loader: make pool allocations cacheline aligned

2017-08-01 Thread Rob Clark
This avoids printf() spam about file reads (such as loading an image) into unaligned buffers (and the associated memcpy()). And generally seems like a good idea. Signed-off-by: Rob Clark --- lib/efi_loader/efi_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib

[U-Boot] [PATCH v2] net: phy: micrel: add an option to disable gigabit for the KSZ9031

2017-08-01 Thread Sebastien Bourdelin
The environment variable "disable_giga" can now be used to disable 1000baseTx on the Micrel's KSZ9031. Signed-off-by: Sebastien Bourdelin --- Changes v1 -> v2: - move variables declaration in concern block and remove useless initialisation (suggested by Joe Hershberger - v1 acked by Joe H

Re: [U-Boot] [PATCH 3/5] configs: Replace deprecated Micrel defines with PHY_MICREL_KSZ90X1

2017-08-01 Thread Alexandru Gagniuc
On 08/01/2017 09:40 AM, Joe Hershberger wrote: On Thu, Jul 27, 2017 at 6:07 PM, Alex wrote: On 07/27/2017 03:12 PM, Joe Hershberger wrote: On Fri, Jul 7, 2017 at 1:36 PM, Alexandru Gagniuc wrote: These boards will now use the ksz90x1 driver instead of the mess in ksz8xxx. This change is

Re: [U-Boot] [PATCH 3/5] configs: Replace deprecated Micrel defines with PHY_MICREL_KSZ90X1

2017-08-01 Thread Joe Hershberger
On Fri, Jul 7, 2017 at 1:36 PM, Alexandru Gagniuc wrote: > These boards will now use the ksz90x1 driver instead of the mess in > ksz8xxx. This change is needed before the two drivers can be fully > separated. > > Signed-off-by: Alexandru Gagniuc Acked-by: Joe Hershberger ___

Re: [U-Boot] [PATCH 3/5] configs: Replace deprecated Micrel defines with PHY_MICREL_KSZ90X1

2017-08-01 Thread Joe Hershberger
On Thu, Jul 27, 2017 at 6:07 PM, Alex wrote: > On 07/27/2017 03:12 PM, Joe Hershberger wrote: >> >> On Fri, Jul 7, 2017 at 1:36 PM, Alexandru Gagniuc >> wrote: >>> >>> These boards will now use the ksz90x1 driver instead of the mess in >>> ksz8xxx. This change is needed before the two drivers can

Re: [U-Boot] [PATCH] Use packed structures for networking

2017-08-01 Thread Joe Hershberger
On Fri, Jul 21, 2017 at 11:28 AM, Denis Pynkin wrote: > PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled > by default for '-O2': > > BOOTP broadcast 1 > data abort > pc : [<8ff8bb30>] lr : [<4f1f>] > reloc pc : [<17832b30>]lr : [<878abf1f>] > sp : 8f558bc0 ip

Re: [U-Boot] [RFC PATCH v2 3/3] net: ag7xxx: No longer ignore link status

2017-08-01 Thread Joe Hershberger
On Tue, Jun 27, 2017 at 11:10 AM, Marek Vasut wrote: > On 06/27/2017 05:46 PM, Joe Hershberger wrote: >> On Tue, Jun 27, 2017 at 4:32 AM, Marek Vasut wrote: >>> On 06/26/2017 09:40 PM, Joe Hershberger wrote: In the case of the WAN port, pay attention to the link status. In the case of L

Re: [U-Boot] [PATCH] net: phy: micrel: add an option to disable gigabit for the KSZ9031

2017-08-01 Thread Joe Hershberger
On Fri, Jul 28, 2017 at 2:59 PM, Sebastien Bourdelin wrote: > The environment variable "disable_giga" can now be used to disable > 1000baseTx on the Micrel's KSZ9031. > > Signed-off-by: Sebastien Bourdelin Other than one nit below... Acked-by: Joe Hershberger > --- > drivers/net/phy/micrel.c

Re: [U-Boot] [PATCH 2/2] sf: Preserve QE bit when clearing BP# bits for Macronix flash

2017-08-01 Thread Jagan Teki
On Sun, Jul 23, 2017 at 8:14 PM, Bin Meng wrote: > On some flash (like Macronix), QE (quad enable) bit is in the same > status register as BP# bits, and we need preserve its original value > during a reboot cycle as this is required by some platforms (like > Intel ICH SPI controller working under

Re: [U-Boot] [PATCH] spl: add newline in debug output

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 10:17 PM, Anatolij Gustschin wrote: > With debug enabled, SPL output following these debug prints is on the > same line and it is hard to read. Fix it. > > Signed-off-by: Anatolij Gustschin > --- > common/spl/spl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-

[U-Boot] [PATCH] spl: add newline in debug output

2017-08-01 Thread Anatolij Gustschin
With debug enabled, SPL output following these debug prints is on the same line and it is hard to read. Fix it. Signed-off-by: Anatolij Gustschin --- common/spl/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index c56cc6f..f885ca

Re: [U-Boot] [PATCH 2/3] clk: zynqmp: Dont panic incase of mmio write/read failures

2017-08-01 Thread Michal Simek
On 31.7.2017 16:45, Simon Glass wrote: > On 20 July 2017 at 03:03, Michal Simek wrote: >> From: Siva Durga Prasad Paladugu >> >> Dont panic incase of mmio write/read failures instead return >> error and let the peripheral driver take care of clock get >> and set failures. >> >> Signed-off-by: Siv

Re: [U-Boot] [PATCH 1/3] clk: zynqmp: Add support for CCF driver

2017-08-01 Thread Michal Simek
On 31.7.2017 16:45, Simon Glass wrote: > Hi Michal, > > On 20 July 2017 at 03:03, Michal Simek wrote: >> From: Siva Durga Prasad Paladugu >> >> Add support for CCF, this CCF reads the ref clocks >> from dt and checks all the required clock control >> registers for its source , divisors and calcu

[U-Boot] [PATCH] imx-common: spl: return boot mode for asked MMC device in spl_boot_mode()

2017-08-01 Thread Anatolij Gustschin
Boards may extend or re-define the boot list in their board_boot_order() function by modifying spl_boot_list. E.g. a board might boot SPL from a slow SPI NOR flash and then load the U-Boot from an eMMC or SD-card. Or it might use additional MMC boot device in spl_boot_list for cases when the image

[U-Boot] [PATCH] imx6: fix SDn_CMD mux mode bitfield arguments

2017-08-01 Thread Anatolij Gustschin
For ALT0 function mux mode should be 0, not 16. Signed-off-by: Anatolij Gustschin --- arch/arm/include/asm/arch-mx6/mx6q_pins.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/arch-mx6/mx6q_pins.h b/arch/arm/include/asm/arch-mx6/mx6q_pins.h index

[U-Boot] [PATCH] cmd: mmc: add mmc partconf read capability

2017-08-01 Thread Anatolij Gustschin
From: Angelo Dureghello This patch allows to show the EXT_CSD[179] partition_config register info, just by specifying the dev param: U-Boot> mmc partconf 0 EXT_CSD[179], PARTITION_CONFIG: BOOT_ACK: 0x0 BOOT_PARTITION_ENABLE: 0x0 PARTITION_ACCESS: 0x0 Signed-off-by: Angelo Dureghello

Re: [U-Boot] [PATCH v2 3/4] x86: Convert MMC to driver model

2017-08-01 Thread Bin Meng
On Mon, Jul 31, 2017 at 10:24 AM, Bin Meng wrote: > From: Simon Glass > > Convert the pci_mmc driver over to driver model and migrate all x86 boards > that use it. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > Tested-by: Bin Meng > [bmeng: remove DM_MMC from edison_defconfig] > Sign

Re: [U-Boot] [PATCH v2 21/22] x86: kconfig: Move USB to platform Kconfig

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Like other peripheral drivers, move USB related drivers to platform >> Kconfig as well. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> --- >> >> Changes in v2: None >> >> arch/Kc

Re: [U-Boot] [PATCH 1/1] x86: ivybridge: remove unused uma_memory_size

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 13:17, Heinrich Schuchardt wrote: >> The value of uma_memory_size depends on an undefined value >> from the stack. The value of uma_memory_size is changed but >> never used. >> >> So simply remove this superfluous code. >> >>

Re: [U-Boot] [PATCH v2 12/22] x86: ivybridge: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Imply drivers that are working with Ivybridge platform in the >> platform Kconfig. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - imply ENV_IS_IN_SPI_FLASH for ivybridge >> >> ar

Re: [U-Boot] [PATCH v2 20/22] x86: kconfig: Let board select SPI flash

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Only a specific type of SPI flash exists on a board, having board >> Kconfig to select the SPI flash seems to make more sense. Other >> flash types are not necessary except coreboot, which implies al

Re: [U-Boot] [PATCH v2 03/22] x86: kconfig: Select PCI and DM_PCI

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> PCI is the de facto interconnect bus in an x86 system. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> --- >> >> Changes in v2: None >> >> arch/Kconfig

Re: [U-Boot] [PATCH v2 1/4] dm: scsi: Add a generic PCI-based AHCI driver

2017-08-01 Thread Bin Meng
On Mon, Jul 31, 2017 at 10:23 AM, Bin Meng wrote: > This adds support for PCI-based AHCI controller based on DM SCSI. > > Signed-off-by: Bin Meng > Reviewed-by: Simon Glass > Tested-by: Simon Glass > > --- > > Changes in v2: > - Fix unmet direct dependencies on BLK > > drivers/ata/Kconfig|

Re: [U-Boot] [PATCH v2 15/22] x86: queensbay: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Imply drivers that work with Intel Queensbay platform. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - imply ENV_IS_IN_SPI_FLASH for queensbay >> >> arch/x86/cpu/queensbay/Kconfig

Re: [U-Boot] [PATCH v2 08/22] x86: kconfig: Imply ENABLE_MRC_CACHE in the platform Kconfig

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Platform knows whether MRC cache is implemented, but using it can >> be a choice of a specific board. >> >> Signed-off-by: Bin Meng >> --- >> >> Changes in v2: None >> >> arch/x86/cpu/baytrail/Kcon

Re: [U-Boot] [PATCH v2 09/22] x86: kconfig: Select OF_CONTROL

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> This is a must have for all x86 boards. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> --- >> >> Changes in v2: None >> >> arch/Kconfig

Re: [U-Boot] [PATCH v2 01/22] x86: kconfig: Select TIMER and X86_TSC_TIMER

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Without a timer, U-Boot just doesn't boot. This is not something >> we can turn off. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> >> --- >> >> Changes in v2: >> - sync defconfig

Re: [U-Boot] [PATCH v2 16/22] x86: tangier: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Imply Tangier-specific drivers in the platform Kconfig. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> --- >> >> Changes in v2: None >> >> arch/x86/cpu/tangier/Kconfig | 7 ++

[U-Boot] Please pull u-boot-x86

2017-08-01 Thread Bin Meng
Hi Tom, The following changes since commit 6364a5d4bd55beeedc11171419acd0bdff17a599: Prepare v2017.09-rc1 (2017-07-31 20:37:25 -0400) are available in the git repository at: git://git.denx.de/u-boot-x86.git for you to fetch changes up to 24357dfd2aec4118b9178d8bf639fb8fc02e1859: x86: Sw

Re: [U-Boot] [PATCH v2 11/22] x86: baytrail: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> BayTrail integrates lots of peripherals that have U-Boot drivers. >> Imply those in the platform Kconfig. >> >> Signed-off-by: Bin Meng >> --- >> >> Changes in v2: None >> >> arch/x86/cpu/baytrail/

Re: [U-Boot] [PATCH v2 2/4] block: ide: Fix build error when CONFIG_BLK is on

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 20:24, Bin Meng wrote: >> Add missing #ifndef CONFIG_BLK to wrap dev_desc->block_read. >> >> Signed-off-by: Bin Meng >> --- >> >> Changes in v2: None >> >> drivers/block/ide.c | 2 ++ >> 1 file changed, 2 insertions(+) > >

Re: [U-Boot] [PATCH v2 18/22] x86: qemu: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Imply Qemu-specific drivers in the platform Kconfig. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - imply ENV_IS_NOWHERE for qemu >> >> arch/x86/cpu/qemu/Kconfig|

Re: [U-Boot] [PATCH v2 02/22] x86: kconfig: Select USE_PRIVATE_LIBGCC

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> x86 is using the built-in libgcc implementation and this cannot be >> turned off. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> --- >> >> Changes in v2: None >> >> arch/Kconfig

Re: [U-Boot] [PATCH v2 22/22] x86: Convert INTEL_ICH6_GPIO to Kconfig

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> This converts Intel ICH6 GPIO driver to Kconfig, and add it to the >> imply list of platform drivers. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - rebase on top of u-boot/master

Re: [U-Boot] [PATCH v2 4/4] x86: Switch all boards to use DM SCSI

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 20:24, Bin Meng wrote: >> After MMC is converted to DM, convert to use DM SCSI as well for all >> x86 boards and imply BLK for both MMC and SCSI drivers. >> >> CONFIG_SCSI_DEV_LIST is no longer used. Clean them up. >> >> Sign

Re: [U-Boot] [PATCH v2 14/22] x86: coreboot: kconfig: Imply drivers that are useful

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> U-Boot as coreboot payload can run on any x86 hardware ideally. >> Let's imply some common drivers that are useful. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - imply more commo

Re: [U-Boot] [PATCH 4/6] x86: tsc: Update comments and expand definitions in freq_desc_tables[]

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 25 July 2017 at 21:12, Bin Meng wrote: >> Some processor abbreviations in the comments of freq_desc_tables[] >> are obscure. This updates part of these to mention processors >> that are known to us. Also expand frequency definitions. >> >> T

Re: [U-Boot] [PATCH v2 13/22] x86: broadwell: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Imply Broadwell-specific drivers in the platform Kconfig. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - imply ENV_IS_IN_SPI_FLASH for broadwell >> >> arch/x86/cpu/broadwell/Kcon

Re: [U-Boot] [PATCH v2 17/22] x86: quark: kconfig: Imply platform specific drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Imply Quark-specific drivers in the platform Kconfig. >> >> Signed-off-by: Bin Meng >> >> --- >> >> Changes in v2: >> - imply ENV_IS_IN_SPI_FLASH for quark >> >> arch/x86/cpu/quark/Kconfig | 9

Re: [U-Boot] [PATCH v2 10/22] x86: kconfig: Imply DM uclass drivers

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Now that all x86 boards have been converted to use DM, we can imply >> these uclass drivers (DM_ETH, DM_RTC, DM_USB, DM_VIDEO) from the >> top level. >> >> Previously DM_GPIO, DM_KEYBOARD, DM_SERIAL,

Re: [U-Boot] [PATCH v2 06/22] x86: kconfig: Select ARCH_MISC_INIT in the platform Kconfig

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> arch_misc_init() is intended to do architecture-dependent stuff. >> This is required by each platform. > > It looks like some platforms don't require it? > >> >> Signed-off-by: Bin Meng >> --- >> >>

Re: [U-Boot] [PATCH v2 04/22] x86: kconfig: Imply HAVE_INTEL_ME in the platform Kconfig

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> Intel Management Engine is required by the platform, however it's >> not a must have when building a U-Boot image. For example, during >> development normally programming ME firmware is a one-time ef

Re: [U-Boot] [PATCH v2 19/22] x86: qemu: Remove SPI flash from defconfigs

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:12 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> QEMU does not support ICH SPI controller yet. It's meaningless to >> include SPI flash support. >> >> Signed-off-by: Bin Meng >> --- >> >> Changes in v2: None >> >> configs/qemu-x86_64_defconfig

Re: [U-Boot] [PATCH v1] x86: Make table address selectable

2017-08-01 Thread Bin Meng
On Sat, Jul 29, 2017 at 2:20 PM, Bin Meng wrote: > On Sat, Jul 29, 2017 at 1:02 AM, Andy Shevchenko > wrote: >> Some firmwares might have another window for generated tables. >> >> So, introduce two configuration options to select start address and >> maximum length for the generated tables. >> >

Re: [U-Boot] [PATCH v2 07/22] x86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 30 July 2017 at 07:23, Bin Meng wrote: >> This is architecture-dependent early initialization hence should >> be put in the platform Kconfig. >> >> Signed-off-by: Bin Meng >> Reviewed-by: Andy Shevchenko >> --- >> >> Changes in v2: None >>

Re: [U-Boot] [PATCH 6/6] x86: tsc: Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr()

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 25 July 2017 at 21:12, Bin Meng wrote: >> Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr(), as that >> better describes what the routine does. >> >> This keeps in sync with Linux kernel commit: >> 02c0cd2: x86/tsc_msr: Remove irqoff ar

Re: [U-Boot] [PATCH v2 05/22] x86: kconfig: Let board select BOARD_EARLY_INIT_F

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:17 PM, Bin Meng wrote: > Hi Simon, > > On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: >> On 30 July 2017 at 07:23, Bin Meng wrote: >>> CONFIG_BOARD_EARLY_INIT_F, by its mean is provided by board-specific >> >> What does 'by its mean' mean? > > Sorry, I mean "literall

Re: [U-Boot] [PATCH 5/6] x86: tsc: Correct Silvermont reference clock values

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 25 July 2017 at 21:12, Bin Meng wrote: >> Atom processors use a 19.2 MHz crystal oscillator. >> >> Early processors generate 100 MHz via 19.2 MHz * 26 / 5 = 99.84 MHz. >> >> Later processors generate 100 MHz via 19.2 MHz * 125 / 24 = 100 MHz

Re: [U-Boot] [PATCH 1/6] x86: tsc: Read all ratio bits from MSR_PLATFORM_INFO

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:10 PM, Simon Glass wrote: > On 25 July 2017 at 21:12, Bin Meng wrote: >> Currently we read the tsc radio like this: >> >> ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f; >> >> Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the >> Intel manual, the ratio

Re: [U-Boot] [PATCH 3/6] x86: tsc: Remove the fail handling in try_msr_calibrate_tsc()

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 25 July 2017 at 21:12, Bin Meng wrote: >> If either ratio or freq is zero, the return value is zero. There >> is no need to create a fail branch and return zero there. >> >> This keeps in sync with Linux kernel commit: >> 14bb4e3: x86/tsc_

Re: [U-Boot] [PATCH v2 2/2] x86: Enforce toolchain to generate 64-bit codes for 64-bit U-Boot

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 27 July 2017 at 07:12, Bin Meng wrote: >> 64-bit U-Boot image is a combination of 32-bit U-Boot (SPL) plus >> 64-bit U-Boot (proper). For the U-Boot proper, it has be compiled >> to 64-bit object codes. Attempting to use a toolchain to compi

Re: [U-Boot] [PATCH 2/6] x86: tsc: Identify Intel-specific code

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 25 July 2017 at 21:12, Bin Meng wrote: >> cpu_mhz_from_msr() is currently Intel-specific, and should not Fixed the commit message, and >> execute on any other vendor's parts. >> >> This keeps in sync with Linux kernel commit: >> ba82683:

Re: [U-Boot] [PATCH v2 1/2] x86: Use default stack boundary alignment

2017-08-01 Thread Bin Meng
On Tue, Aug 1, 2017 at 5:11 PM, Simon Glass wrote: > On 27 July 2017 at 07:12, Bin Meng wrote: >> At present U-Boot x86 build is using -mpreferred-stack-boundary=2 >> which is 4 bytes stack boundary alignment. With 64-bit U-Boot, the >> minimal required stack boundary alignment is 16 bytes. >> >>

Re: [U-Boot] [PATCH v3 50/66] rockchip: rk3368: add DRAM controller driver with DRAM initialisation

2017-08-01 Thread 汤云平
Dear Tomsich: see as below, diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c index fea96a5..d4cece5 100644 --- a/drivers/ram/rockchip/dmc-rk3368.c +++ b/drivers/ram/rockchip/dmc-rk3368.c @@ -333,17 +333,25 @@ static void ddrctl_reset(struct rk3368_cru *cru) {

Re: [U-Boot] [PATCH v3 62/66] armv8: TPL_STACK will always be defined, so test CONFIG_TPL_NEEDS_SEPARATE_STACK

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > Now that TPL_STACK has been moved off the whitelist (ok, I'm lying: > the 'moving off the whitelist' part comes in once moveconfig > runs... which will be a few commits down the line) and added to > Kconfig, we need to test CONFIG_TPL_NEEDS_SEPARA

Re: [U-Boot] [PATCH v2 29/56] rockchip: rk3368: grf: use shifted-constants

2017-08-01 Thread Dr. Philipp Tomsich
> On 01 Aug 2017, at 11:49, Simon Glass wrote: > > On 28 July 2017 at 02:53, Dr. Philipp Tomsich > wrote: >> >>> On 28 Jul 2017, at 05:38, Simon Glass wrote: >>> >>> Hi Philipp, >>> >>> On 26 July 2017 at 04:40, Philipp Tomsich >>> wrote: The RK3368 GRF header was still defines with a

Re: [U-Boot] [PATCH v3 11/24] env: Create a location driver for each location

2017-08-01 Thread Simon Glass
Hi Tom, On 26 July 2017 at 11:46, Tom Rini wrote: > On Wed, Jul 26, 2017 at 11:19:35AM -0600, Simon Glass wrote: > >> Set up a location driver for each supported environment locatoin. At >> present this just points to the global functions and is not used. A >> later patch will switch this over to

Re: [U-Boot] [PATCH v3 48/66] net: gmac_rockchip: Add support for the RK3368 GMAC

2017-08-01 Thread Dr. Philipp Tomsich
Simon, > On 01 Aug 2017, at 11:49, Simon Glass wrote: > > Hi Philipp, > > On 28 July 2017 at 13:22, Philipp Tomsich > wrote: >> The GMAC in the RK3368 once again is identical to the incarnation in >> the RK3288 and the RK3399, except for where some of the configuration >> and control registers

Re: [U-Boot] [PATCH v3 63/66] rockchip: rk3368: mark TPL as not inheriting its stack, text-base and size from SPL

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > The RK3368 needs to have a different base-address and stack-pointer > for its TPL stage. Now that we want to do this via Kconfig, we need > to tick the appropriate 'TPL_NEEDS_...' boxes. > > Signed-off-by: Philipp Tomsich > > --- > > Changes in

Re: [U-Boot] [PATCH 1/1] api: remove superfluous assignment

2017-08-01 Thread Simon Glass
On 30 July 2017 at 11:54, Heinrich Schuchardt wrote: > No need to assign a value to sig if the next statement using sig > is itself an assignment of a value to sig. > > Signed-off-by: Heinrich Schuchardt > --- > api/api.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Si

Re: [U-Boot] [PATCH v3 48/66] net: gmac_rockchip: Add support for the RK3368 GMAC

2017-08-01 Thread Simon Glass
Hi Philipp, On 28 July 2017 at 13:22, Philipp Tomsich wrote: > The GMAC in the RK3368 once again is identical to the incarnation in > the RK3288 and the RK3399, except for where some of the configuration > and control registers are located in the GRF. > > This adds the RK3368-specific logic neces

Re: [U-Boot] [PATCH v3 61/66] spl: support TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE via Kconfig

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > Let's clean up behind ourselves and move the (newly defined) > TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE into Kconfig. Given that > 0x0 might be considered to be valid values for TPL_TEXT_BASE and > TPL_STACK, we need to introduce helper config o

Re: [U-Boot] [PATCH v2 22/34] env: Add a new implementation of environment access

2017-08-01 Thread Simon Glass
Hi Tom, On 26 July 2017 at 14:13, Tom Rini wrote: > On Wed, Jul 26, 2017 at 12:02:55PM -0600, Simon Glass wrote: >> Hi Tom, >> >> On 26 July 2017 at 11:23, Tom Rini wrote: >> > On Wed, Jul 26, 2017 at 10:32:51AM -0600, Simon Glass wrote: >> >> Hi Tom, >> >> >> >> On 26 July 2017 at 10:04, Tom Ri

Re: [U-Boot] [PATCH v3 64/66] moveconfig: migrate TPL_STACK, TPL_TEXT_BASE and TPL_MAX_SIZE

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > We can finally drop TPL_STACK, TPL_TEXT_BASE and TPL_MAX_SIZE off the > whitelist (this time it's really happening!) and migrate the setting > (only used on the RK3368-uQ7 so far) into defconfig. > > One major caveat: other RK3368 boards that move

Re: [U-Boot] [PATCH v2 29/56] rockchip: rk3368: grf: use shifted-constants

2017-08-01 Thread Simon Glass
On 28 July 2017 at 02:53, Dr. Philipp Tomsich wrote: > >> On 28 Jul 2017, at 05:38, Simon Glass wrote: >> >> Hi Philipp, >> >> On 26 July 2017 at 04:40, Philipp Tomsich >> wrote: >>> The RK3368 GRF header was still defines with a shifted-mask but with >>> non-shifted function selectors for the I

Re: [U-Boot] [PATCH v3 16/66] armv8: move low-level assembly functions into function-sections

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:21, Philipp Tomsich wrote: > TPL builds today don't need to call into firmware or set up the MMU > (if this changes, it should be controlled through a config option > whether to include this or not), but include the needed support code > for this anyway. By moving these unus

Re: [U-Boot] [PATCH v3 31/66] rockchip: rk3368: syscon: SGRF support for OF_PLATDATA

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > In TPL we will need to configure security in the SGRF of the RK3368. > This change adds support for the SGRF as a syscon device, so we can > retrieve its address range through the syscon API in TPL (and can > avoid having to hard-code the address)

Re: [U-Boot] [PATCH v3 51/66] rockchip: rk3368: dts: add DMC node in rk3368.dtsi

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > For full SPL support, including DRAM initialisation, we need a few > nodes from the DTS: this commit adds the DMC (DRAM controller) node, > the service_msch (memory scheduler) node and marks GRF, PMUGRF and CRU > as 'u-boot,dm-pre-reloc'. In addi

Re: [U-Boot] [PATCH] mkimage: check environment for dtc binary location

2017-08-01 Thread Simon Glass
On 31 July 2017 at 14:17, Hauke Mehrtens wrote: > On 07/31/2017 04:45 PM, Simon Glass wrote: >> Hi, >> >> On 19 July 2017 at 14:30, Hauke Mehrtens wrote: >>> Currently mkimage assumes the dtc binary is in the path and fails >>> otherwise. This patch makes it check the DTC environment variable fir

Re: [U-Boot] [PATCH v3 33/66] rockchip: rk3368: dts: add sgrf node

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > We will to drop device security temporarily (until the ATF initialises > it fully) from the TPL/SPL stage: this requires access to some > registers in the SGRF. > > This adds the sgrf node to the rk3368.dtsi, so we can then bind a > syscon device

Re: [U-Boot] [PATCH 1/1] tpm: add missing va_end

2017-08-01 Thread Simon Glass
On 30 July 2017 at 13:40, Heinrich Schuchardt wrote: > va_start must always be matched by va_end. > > Signed-off-by: Heinrich Schuchardt > --- > lib/tpm.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > Reviewed-by: Simon Glass But don't you think it would be better to 'goto' th

Re: [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference

2017-08-01 Thread Simon Glass
On 30 July 2017 at 13:59, Heinrich Schuchardt wrote: > Do not dereference bmp before the check if it is NULL. > > The problem was indicated by cppcheck. > > Signed-off-by: Heinrich Schuchardt > --- > common/lcd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass

Re: [U-Boot] [PATCH v3 59/66] spl: Kconfig: migrate $(SPL_TPL_)LDSCRIPT to Kconfig

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > Now that we have split up SPL_LDSCRIPT into a SPL and TPL variant and > have started to use the TPL-variant for the RK3368, it's time to clean > up behind ourselves: move both variants into Kconfig and remove them > from the whitelist. > > Signed-

Re: [U-Boot] [PATCH v3 06/66] spl: adapts SYS_MALLOC_F_LEN for TPL

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:21, Philipp Tomsich wrote: > The (upstream) changes to break up SYS_MALLOC_F_LEN for the full > U-Boot and the SPL stage, break TPL (if simple malloc is enabled in > TPL). > > This adds support for a TPL-variant of SYS_MALLOC_F_LEN: > - adds TPL_SYS_MALLOC_F_LEN > - rewrites

Re: [U-Boot] [PATCH v3 18/66] spl: allow a separate TEXT_BASE, LDSCRIPT and MAX_SIZE for TPL

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:21, Philipp Tomsich wrote: > For the bringup of the RK3368, we need to support TPL and SPL running > from different addresses... which requires both stages to use a > distinct TEXT_BASE. > > This commit adds support for having a separate LDSCRIPT for TPL (which > is expected

Re: [U-Boot] [PATCH v3 53/66] rockchip: rk3368: spl: add TPL support

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:22, Philipp Tomsich wrote: > This adds the TPL support for the RK3368, including the u-boot-tpl.lds. > > Signed-off-by: Philipp Tomsich > > --- > > Changes in v3: > - removes the '#define DEBUG' > - uses the syscon API to access GRF and SGRF to avoid using hard-coded > add

Re: [U-Boot] [PATCH v3 07/66] spl: dm: Kconfig: fix help text for SPL/TPL confusion

2017-08-01 Thread Simon Glass
On 28 July 2017 at 13:21, Philipp Tomsich wrote: > TPL_NAND_SUPPORT, TPL_SERIAL_SUPPORT, TPL_SPI_FLASH_SUPPORT and > TPL_SPI_SUPPORT refer to SPL in their help text. This fixes up > the description to correctly reference TPL. > > Signed-off-by: Philipp Tomsich > > --- > > Changes in v3: > - (new

Re: [U-Boot] [RFC PATCH 6/6] rockchip: rk3368: remove setup of secure timer from TPL/SPL

2017-08-01 Thread Simon Glass
On 28 July 2017 at 10:31, Philipp Tomsich wrote: > When using DM timers w/ the timer0 block within the RK3368, we no > longer depend on the ARMv8 generic timer counting. This allows us to > drop the secure timer initialisation from the TPL and SPL stages. > > The secure timer will later be set up

Re: [U-Boot] [RFC PATCH 4/6] dts: rk3368: make timer0 accessible for SPL and TPL

2017-08-01 Thread Simon Glass
On 28 July 2017 at 10:31, Philipp Tomsich wrote: > To use it with the DM timer driver in SPL and TPL, timer0 needs to be > marked as pre-reloc. > > Signed-off-by: Philipp Tomsich > --- > > arch/arm/dts/rk3368-lion-u-boot.dtsi | 2 +- > arch/arm/dts/rk3368.dtsi | 2 +- > 2 files chang

Re: [U-Boot] [RFC PATCH 5/6] rockchip: lion-rk3368: defconfig: enable DM timer for all stages

2017-08-01 Thread Simon Glass
On 28 July 2017 at 10:31, Philipp Tomsich wrote: > There is no reasonably robust way (this will be needed so early that > diagnostics will be limited) to specify the base-address of the secure > timer through the DTS for TPL and SPL. In order to allow us a cleaner > way to structure our SPL and T

Re: [U-Boot] [RFC PATCH 3/6] rockchip: timer: add device-model timer driver for RK3368 (and similar)

2017-08-01 Thread Simon Glass
On 28 July 2017 at 10:31, Philipp Tomsich wrote: > This adds a device-model driver for the timer block in the RK3368 (and > similar devices that share the same timer block, such as the RK3288) for > the down-counting (i.e. non-secure) timers. > > This allows us to configure U-Boot for the RK3368 i

Re: [U-Boot] [RFC PATCH 2/6] dm: timer: normalise SPL and TPL support

2017-08-01 Thread Simon Glass
On 28 July 2017 at 10:31, Philipp Tomsich wrote: > To fully support DM timer in SPL and TPL, we need a few things cleaned > up and normalised: > - inclusion of the uclass and drivers should be an all-or-nothing > decision for each stage and under control of $(SPL_TPL_)TIMER > instead of having

Re: [U-Boot] [RFC PATCH 1/6] timer: add OF_PLATDATA support for timer-uclass

2017-08-01 Thread Simon Glass
On 28 July 2017 at 10:31, Philipp Tomsich wrote: > The timer-uclass depends on full OF_CONTROL through its interrogation > of /chosen and the code to determine the clock-frequency. > > For the OF_PLATDATA case, these code-paths are disabled and it becomes > the timer driver's responsibility to cor

Re: [U-Boot] [PATCH v2 11/22] x86: baytrail: kconfig: Imply platform specific drivers

2017-08-01 Thread Simon Glass
On 30 July 2017 at 07:23, Bin Meng wrote: > BayTrail integrates lots of peripherals that have U-Boot drivers. > Imply those in the platform Kconfig. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > arch/x86/cpu/baytrail/Kconfig | 11 ++- > configs/b

Re: [U-Boot] [PATCH v2 19/22] x86: qemu: Remove SPI flash from defconfigs

2017-08-01 Thread Simon Glass
On 30 July 2017 at 07:23, Bin Meng wrote: > QEMU does not support ICH SPI controller yet. It's meaningless to > include SPI flash support. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > configs/qemu-x86_64_defconfig| 5 - > configs/qemu-x86_defconfig

Re: [U-Boot] [PATCH v2 03/22] x86: kconfig: Select PCI and DM_PCI

2017-08-01 Thread Simon Glass
On 30 July 2017 at 07:23, Bin Meng wrote: > PCI is the de facto interconnect bus in an x86 system. > > Signed-off-by: Bin Meng > Reviewed-by: Andy Shevchenko > --- > > Changes in v2: None > > arch/Kconfig| 2 ++ > configs/bayleybay_defconfig

Re: [U-Boot] [PATCH v2 12/22] x86: ivybridge: kconfig: Imply platform specific drivers

2017-08-01 Thread Simon Glass
On 30 July 2017 at 07:23, Bin Meng wrote: > Imply drivers that are working with Ivybridge platform in the > platform Kconfig. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - imply ENV_IS_IN_SPI_FLASH for ivybridge > > arch/x86/cpu/ivybridge/Kconfig | 5 + > configs/chromebook

Re: [U-Boot] [PATCH v2 17/22] x86: quark: kconfig: Imply platform specific drivers

2017-08-01 Thread Simon Glass
On 30 July 2017 at 07:23, Bin Meng wrote: > Imply Quark-specific drivers in the platform Kconfig. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - imply ENV_IS_IN_SPI_FLASH for quark > > arch/x86/cpu/quark/Kconfig | 9 + > configs/galileo_defconfig | 9 - > 2 files cha

Re: [U-Boot] [PATCH v2 18/22] x86: qemu: kconfig: Imply platform specific drivers

2017-08-01 Thread Simon Glass
On 30 July 2017 at 07:23, Bin Meng wrote: > Imply Qemu-specific drivers in the platform Kconfig. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - imply ENV_IS_NOWHERE for qemu > > arch/x86/cpu/qemu/Kconfig| 4 > configs/qemu-x86_64_defconfig| 4 >

  1   2   >