Re: [U-Boot] [U-Boot, v2] board: add support for Vision System's Baltos Industrial PC

2015-06-12 Thread Tom Rini
On Fri, May 29, 2015 at 07:27:29PM +0200, Yegor Yefremov wrote:

> Vision Systems's Baltos is based on AM335x SoC
> from Texas Instruments. This patch adds support
> such Industrial PCs in mainline u-boot.
> 
> [ ba...@ti.com: updated original patch to current u-boot ]
> 
> Signed-off-by: Yegor Yefremov 
> Signed-off-by: Felipe Balbi 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] avr32: move CONFIG_SYS_GENERIC_BOARD to Kconfig

2015-06-12 Thread Tom Rini
On Thu, Jun 11, 2015 at 07:14:50PM +0900, Masahiro Yamada wrote:

> Now all the AVR32 boards have been converted into Generic Board.
> Select it in Kconfig and clean up defines in header files.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Andreas Bießmann 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: AM43x: Fix MAX_RAM_BANK_SIZE

2015-06-12 Thread Tom Rini
On Wed, Jun 10, 2015 at 03:54:50PM +0530, Lokesh Vutla wrote:

> On AM437x-GP Evm there is 2GB of DDR3 memory available as stated in
> AM437x GP EVM HardwareUser's guide 
> http://www.ti.com/lit/ug/spruhw7/spruhw7.pdf.
> But MAX_RAM_BANK_SIZE is defined as 1GB.
> Fixing MAX_RAM_BANK_SIZE to 2GB on AM43xx.
> 
> Reported-by: Shivasharan Nagalikar 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 4/8] ahci: support LBA48 data reads for 2+TB drives

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:45AM +0100, Andre Przywara wrote:

> From: Mark Langsdorf 
> 
> Enable full 48-bit LBA48 data reads by passing the upper word of the
> LBA block pointer in bytes 9 and 10 of the FIS.
> 
> This allows uboot to load data from any arbitrary sector on a drive
> with 2 or more TB of available data connected to an AHCI controller.
> 
> Signed-off-by: Mark Langsdorf 
> Signed-off-by: Andre Przywara 

With some changes to make use of CONFIG_SYS_64BIT_LBA in a few areas to
allow the common parts to compile without warning on systems that
don't set this:

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: BeagleBoard-x15: Enable i2c5 clocks

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 03:19:21PM +0530, Lokesh Vutla wrote:

> On AM57xx evm I2C5 is used to detect the LCD board by reading the
> EEPROM present on the bus.
> Enable i2c5 clocks to help that.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] am33xx: Re-enable SW levelling for DDR2

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 03:51:11PM +0530, Lokesh Vutla wrote:

> From: Tom Rini 
> 
> The recent changes for hw leveling on am33xx were not intended for
> DDR2 boards, only DDR3. Update emif_sdram_type to take a sdram_config
> value to check against. This lets us pass in the value we would use to
> configure, when we have not yet configured the board yet.  In other cases
> update the call to be as functional as before and check an already
> programmed value in.
> 
> Tested-by: Yan Liu 
> Signed-off-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] configs: am43xx_evm: Enable NAND

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 11:09:02AM +0300, Roger Quadros wrote:

> AM43xx EVMs have NAND so enable it.
> 
> Signed-off-by: Roger Quadros 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,u-boot,3/3] am43xx_evm: Enable NAND boot

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:43:46PM +0300, Roger Quadros wrote:

> From: Tom Rini 
> 
> Enable booting from NAND on the am437xx-evm.
> 
> Signed-off-by: Tom Rini 
> Signed-off-by: Roger Quadros 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, u-boot, 2/3] am335x_evm: nand: Fix boot from NAND

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:42:21PM +0300, Roger Quadros wrote:

> Use the correct partition names from with the Device Tree blob
> and the kernel is picked up. Also use partition name instead of
> number for the root filesystem in the kernel boot arguments.
> 
> Signed-off-by: Roger Quadros 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 8/8] highbank: add custom ahci_link_up function

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:49AM +0100, Andre Przywara wrote:

> From: Mark Langsdorf 
> 
> The Calxeda highbank SOC needs a custom sequence to bring up SATA links,
> so override ahci_link_up with custom function to handle combophy setup.
> 
> Signed-off-by: Mark Langsdorf 
> Signed-off-by: Richard Gibbs
> Signed-off-by: Rob Herring 
> Signed-off-by: Andre Przywara 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, u-boot, 1/3] am335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition name

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:42:20PM +0300, Roger Quadros wrote:

> We almost always use UBIFS for user accessible NAND file systems and
> the UBIFS file system might contain more than one volume within the
> single NAND partition. The last NAND partition is therefore more
> appropriately named as "NAND.file-system" instead of "NAND.rootfs"
> 
> The Linux kernel (as of v3.16) also uses "NAND.file-system" to name the
> last NAND partition. This patch makes the partition name consistent
> between u-boot and the kernel.
> 
> Signed-off-by: Roger Quadros 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,7/8] ARM: highbank: remove DRAM bank setup

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:48AM +0100, Andre Przywara wrote:

> From: Rob Herring 
> 
> On the highbank platform the SoC's management controller firmware
> will probe the DRAM modules and populates the initial device tree with
> the correct values. Therefore the memory sizes in are already correct,
> so remove U-Boot's DRAM bank setup so the memory node is not "fixed
> up" by u-boot.
> 
> Signed-off-by: Rob Herring 
> Signed-off-by: Andre Przywara 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 3/8] cmd_scsi: use lbaint_t for LBA values instead of u32

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:44AM +0100, Andre Przywara wrote:

> From: Mark Langsdorf 
> 
> Signed-off-by: Mark Langsdorf 
> Signed-off-by: Andre Przywara 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/8] ARM: highbank: add missing SCU register setup for reset

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:42AM +0100, Andre Przywara wrote:

> From: Rob Herring 
> 
> Andre: assign names to the magic values
> 
> Signed-off-by: Rob Herring 
> Signed-off-by: Andre Przywara 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,10/10] ARM: BeagleBoard-x15: Add mux data

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:42PM +0530, Lokesh Vutla wrote:

> Adding the mux data, manual and virtual mode
> settings for BeagleBoard-X15.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Tomi Valkeinen 
> Signed-off-by: Nishanth Menon 
> Signed-off-by: Roger Quadros 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 09/10] ARM: BeagleBoard-x15: Enable IO delay recalibration sequence

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:41PM +0530, Lokesh Vutla wrote:

> Enable IO delay recalibration sequence.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,5/8] ahci: extend data io wait to 10s

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:46AM +0100, Andre Przywara wrote:

> From: Mark Langsdorf 
> 
> The AHCI driver currently waits 5s before timing out when sending a
> data command to a drive. Some drives take upwards of 8s to respond to
> the initial data command while they're spinning up. Increase the
> data io timeout to 10s so that those drives can be found on initial
> scsi scan.
> 
> Signed-off-by: Mark Langsdorf 
> Signed-off-by: Andre Przywara 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/8] ARM: highbank: add reset support for Calxeda Midway machine

2015-06-12 Thread Tom Rini
On Fri, Jun 05, 2015 at 12:58:43AM +0100, Andre Przywara wrote:

> From: Mark Langsdorf 
> 
> The Calxeda Midway part has A15 cores, which do not have the Highbank
> A9's SCU used there for resetting the chip.
> Add code to distinguish between the A9 and the A15 and invoke the
> appropriate register writes to support the newer part.
> 
> Andre: rework detection of Highbank vs. Midway
> Rob: fix Andre's reworked detection
> 
> Signed-off-by: Mark Langsdorf 
> Signed-off-by: Andre Przywara 
> Signed-off-by: Rob Herring 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,08/10] ARM: DRA7: CPSW: Remove IO delay hack

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:40PM +0530, Lokesh Vutla wrote:

> Now all manual mode configurations are done as part of
> IO delay recalibration sequence, remove the hack done for
> CPSW.
> 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 06/10] ARM: DRA7-evm: Enable IO delay recalibration sequence

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:38PM +0530, Lokesh Vutla wrote:

> Enabling IO delay recalibration sequence for DRA7 EVM.
> UART and I2C are configured before IO delay recalibration sequence
> as these are used earlier and safe to use.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 02/10] ARM: DRA7: Add pinctrl register definitions

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:34PM +0530, Lokesh Vutla wrote:

> Adopting the pinctrl register definitions from Linux kernel
> to be consistent.
> Old definitions will be removed once all the pinctrl data
> is adapted to new definitions.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 03/10] ARM: DRA7: Add support for virtual mode configuration

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:35PM +0530, Lokesh Vutla wrote:

> In addition to the regular mux configuration, certain pins of DRA7
> require to have "virtual mode" also programmed.
> This allows for predefined delay characteristics to be used by the SoC
> to meet timing characterstics needed for the interface.
> 
> Provide easy to use macro to do the same.
> 
> For configuring virtual mode, along with normal pad configuration add
> the following two steps:
> - Select MODESELECT field of each assocaited PAD.
>   CTRL_CORE_PAD_XXX[8]:MODESELECT = 1
> - DELAYMODE filed should be configured with value given in DATA Manual.
>   CTRL_CORE_PAD_XXX[7:4]:DELAYMODE =[0-15] (as given in DATA manual).
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 04/10] ARM: DRA7: Add support for IO delay configuration

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:36PM +0530, Lokesh Vutla wrote:

> On DRA7, in addition to the regular muxing of pins, an additional
> hardware module called IODelay which is also expected to be
> configured. This "IODelay" module has it's own register space that is
> independent of the control module.
> 
> It is advocated strongly in TI's official documentation considering
> the existing design of the DRA7 family of processors during mux or
> IODelay recalibration, there is a potential for a significant glitch
> which may cause functional impairment to certain hardware. It is
> hence recommended to do muxing as part of IOdelay recalibration.
> 
> IODELAY recalibration sequence:
> - Complete AVS voltage change on VDD_CORE_L
> - Unlock IODLAY config registers.
> - Perform IO delay calibration with predefined values.
> - Isolate all the IOs
> - Update the delay mechanism for each IO with new calibrated values.
> - Configure PAD configuration registers
> - De-isolate all the IOs.
> - Relock IODELAY config registers.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,07/10] ARM: DRA7-evm: Add mux data

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:39PM +0530, Lokesh Vutla wrote:

> From: Nishanth Menon 
> 
> Adding the mux data, manual and virtual mode
> settings for DRA7-evm.
> 
> Signed-off-by: Nishanth Menon 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Peter Ujfalusi 
> Signed-off-by: Tomi Valkeinen 
> Signed-off-by: Vishal Mahaveer 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,01/10] ARM: DRA7: Make do_set_mux32() generic

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:33PM +0530, Lokesh Vutla wrote:

> do_set_mux32() is redefined in dra7xx and beagle_x15 boards.
> IO delay recalibration sequence also needs this.
> Making it generic to avoid duplication.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 05/10] ARM: DRA7: Add support for manual mode configuration

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 04:42:37PM +0530, Lokesh Vutla wrote:

> In addition to the regular mux configuration, certain pins of DRA7
> require to have "manual mode" also programmed, when predefined
> delay characteristics cannot be used for the interface.
> 
> struct iodelay_cfg_entry is introduced for populating
> manual mode IO timings.
> For configuring manual mode, along with the normal pad
> configuration do the following steps:
> - Select MODESELECT field of each assocaited PAD.
>   CTRL_CORE_PAD_XXX[8]:MODESELECT = 1(Enable MANUAL_MODE macro along with mux)
> - Populate A_DELAY, G_DELAY values that are specified in DATA MANUAL.
>   And pass the offset of the CFG_XXX register in iodelay_cfg_entry.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] ARM: DRA7xx: EMIF: Fix DLL_CALIB_CTRL register

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 04:57:47PM +0530, Lokesh Vutla wrote:

> When DLL_CALIB_INTERVAL is set, an extra delay is added
> which is not required and it consumes EMIF bandwidth.
> So making the DLL_CALIB_CTRL[8:0]DLL_CALIB_INTERVAL bits to 0.
> 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,6/7] ARM: DRA7: Update DDR IO configuration

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:26PM +0530, Lokesh Vutla wrote:

> DDRIO_2 and LPDDR2CH1_1 registers are not present
> for DRA7. So not configuring these registers for DRA7xx
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 5/7] ARM: DRA7: Add is_dra72x cpu check definition

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:25PM +0530, Lokesh Vutla wrote:

> A generic is_dra72x cpu check is useful for grouping
> all the revisions under that. This is used in the
> subsequent patches.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: DRA7: emif: Fix DDR init sequence during warm reset

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 10:08:50AM +0530, Lokesh Vutla wrote:

> Unlike OMAP5, EMIF PHY used in DRA7 will be left in unknown state after
> warm reset, emif needs to be configured to bring it back to a known
> state. So configure EMIF during warm reset.
> 
> Reported-by: Roger Quadros 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,7/7] ARM: DRA7: Update DDR IO registers

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:27PM +0530, Lokesh Vutla wrote:

> Update DDR IO register values.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,2/7] ARM: BeagleBoard-X15: Enable HW leveling

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:22PM +0530, Lokesh Vutla wrote:

> Updating EMIF registers to enable HW leveling
> on BeagleBoard-X15.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,3/7] ARM: DRA7-evm: Enable HW leveling

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:23PM +0530, Lokesh Vutla wrote:

> Updating EMIF registers to enable HW leveling
> on DRA7-evm.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,4/7] ARM: DRA72-evm: Enable HW leveling

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:24PM +0530, Lokesh Vutla wrote:

> Updating EMIF registers to enable HW leveling
> on DRA72-evm.
> Also updating the timing registers.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] omap5: Exclude more environment from SPL builds

2015-06-12 Thread Tom Rini
On Fri, Jun 12, 2015 at 08:52:29PM -0400, Tom Rini wrote:

> In the cases where we make use of environment in SPL we do not need
> these defaults compiled in and available.  These are taking up space
> that in some cases now prevent linking, so drop.
> 
> Signed-off-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/7] ARM: DRA7: DDR3: Add support for HW leveling

2015-06-12 Thread Tom Rini
On Wed, Jun 03, 2015 at 02:43:21PM +0530, Lokesh Vutla wrote:

> DRA7 EMIF supports Full leveling for DDR3.
> Adding support for the Full leveling sequence.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] kconfiglib: sync with the latest in Kconfiglib project

2015-06-12 Thread Tom Rini
On Wed, May 27, 2015 at 11:39:22AM +0900, Masahiro Yamada wrote:

> This commit imports some updates of kconfiglib.py from
> https://github.com/ulfalizer/Kconfiglib
> 
>  - Warn about and ignore the "allnoconfig_y" Kconfig option
>  - Statements in choices inherit menu/if deps
>  - Add Symbol.is_allnoconfig_y()
>  - Hint that modules are still supported despite warnings.
>  - Add warning related to get_defconfig_filename().
>  - Fix typo in docs.
>  - Allow digits in $-references to symbols.
> 
> Signed-off-by: Ulf Magnusson 
> Signed-off-by: Philip Craig 
> Signed-off-by: Jakub Sitnicki 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] omap5: Exclude more environment from SPL builds

2015-06-12 Thread Tom Rini
In the cases where we make use of environment in SPL we do not need
these defaults compiled in and available.  These are taking up space
that in some cases now prevent linking, so drop.

Signed-off-by: Tom Rini 
---
 include/configs/dra7xx_evm.h  |2 ++
 include/configs/omap5_uevm.h  |2 ++
 include/configs/ti_omap5_common.h |2 ++
 3 files changed, 6 insertions(+)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index edd51a2..24fe123 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -42,6 +42,7 @@
 
 #define CONFIG_SYS_OMAP_ABE_SYSCK
 
+#ifndef CONFIG_SPL_BUILD
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
"uuid_disk=${uuid_gpt_disk};" \
@@ -95,6 +96,7 @@
 #define CONFIG_USB_FASTBOOT_BUF_SIZE0x2F00
 #define CONFIG_FASTBOOT_FLASH
 #define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
+#endif
 
 #include 
 
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index 4215156..cb12c6c 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -12,10 +12,12 @@
 #ifndef __CONFIG_OMAP5_EVM_H
 #define __CONFIG_OMAP5_EVM_H
 
+#ifndef CONFIG_SPL_BUILD
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
"uuid_disk=${uuid_gpt_disk};" \
"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
+#endif
 
 #include 
 
diff --git a/include/configs/ti_omap5_common.h 
b/include/configs/ti_omap5_common.h
index 4faffef..3da7816 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -71,6 +71,7 @@
 #define DFUARGS
 #endif
 
+#ifndef CONFIG_SPL_BUILD
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
@@ -146,6 +147,7 @@
"setenv mmcroot /dev/mmcblk0p2 rw; " \
"run mmcboot;" \
""
+#endif
 
 
 /*
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 5/9] x86: kconfig: Make MAX_CPUS and AP_STACK_SIZE depend on SMP

2015-06-12 Thread Simon Glass
On 12 June 2015 at 00:52, Bin Meng  wrote:
> MAX_CPUS and AP_STACK_SIZE are only meaningful when SMP is on.
>
> Signed-off-by: Bin Meng 
> Acked-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  arch/x86/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/9] dm: cpu: Fix undefined ENOSYS build error

2015-06-12 Thread Simon Glass
On 12 June 2015 at 00:52, Bin Meng  wrote:
> Include  otherwise ENOSYS is undefined.
>
> Signed-off-by: Bin Meng 
> Acked-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  common/cmd_cpu.c | 1 +
>  drivers/cpu/cpu-uclass.c | 1 +
>  2 files changed, 2 insertions(+)

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/9] x86: kconfig: Fix minor nits in MAX_CPUS

2015-06-12 Thread Simon Glass
On 12 June 2015 at 00:52, Bin Meng  wrote:
> Move MAX_CPUS definition after SMP so that it shows below SMP in the
> menuconfig. Also replace the leading spaces in the MAX_CPUS section
> with tabs to conform coding standard.
>
> Signed-off-by: Bin Meng 
> Acked-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  arch/x86/Kconfig | 24 
>  1 file changed, 12 insertions(+), 12 deletions(-)

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/9] dm: cpu: Test against cpu_ops->get_info in cpu_get_info()

2015-06-12 Thread Simon Glass
On 12 June 2015 at 13:10, Simon Glass  wrote:
> Hi Bin,
>
> On 12 June 2015 at 00:52, Bin Meng  wrote:
>> In cpu_get_info() it wrongly tests against cpu_ops->get_desc to see
>> if it is NULL. It should test against cpu_ops->get_info.
>>
>> Signed-off-by: Bin Meng 
>> ---
>>
>> Changes in v2: None
>>
>>  drivers/cpu/cpu-uclass.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> I have the same commit locally - I thought I sent it but obviously not.
>
> Acked-by: Simon Glass 

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/9] x86: dm: Clean up cpu drivers

2015-06-12 Thread Simon Glass
On 12 June 2015 at 00:52, Bin Meng  wrote:
> This commit does the following to clean up x86 cpu dm drivers:
> - Move cpu_x86 driver codes from arch/x86/cpu/cpu.c to a dedicated
>   file arch/x86/cpu/cpu_x86.c
> - Rename x86_cpu_get_desc() to cpu_x86_get_desc() to keep consistent
>   naming with other dm drivers
> - Add a new cpu_x86_bind() in the cpu_x86 driver which does exactly
>   the same as the one in the intel baytrail cpu driver
> - Update intel baytrail cpu driver to use cpu_x86_get_desc() and
>   cpu_x86_bind()
>
> Signed-off-by: Bin Meng 
> Acked-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/Makefile  |  2 +-
>  arch/x86/cpu/baytrail/cpu.c| 15 +++--
>  arch/x86/cpu/cpu.c | 28 
>  arch/x86/cpu/cpu_x86.c | 48 
> ++
>  arch/x86/include/asm/cpu.h | 14 
>  arch/x86/include/asm/cpu_x86.h | 34 ++
>  6 files changed, 86 insertions(+), 55 deletions(-)
>  create mode 100644 arch/x86/cpu/cpu_x86.c
>  create mode 100644 arch/x86/include/asm/cpu_x86.h

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/11] dm: spi: Correct minor nits in ICH driver

2015-06-12 Thread Simon Glass
On 8 June 2015 at 11:50, Jagan Teki  wrote:
> On 8 June 2015 at 06:58, Bin Meng  wrote:
>> On Sun, Jun 7, 2015 at 10:50 PM, Simon Glass  wrote:
>>> Tidy up three minor problems in this file.
>>>
>>> Signed-off-by: Simon Glass 
>>> ---
>>>
>>>  drivers/spi/ich.c | 5 ++---
>>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
>>> index 50354fd..6b6cfbf 100644
>>> --- a/drivers/spi/ich.c
>>> +++ b/drivers/spi/ich.c
>>> @@ -422,7 +422,7 @@ static int ich_spi_xfer(struct udevice *dev, unsigned 
>>> int bitlen,
>>> int using_cmd = 0;
>>> int ret;
>>>
>>> -   /* Ee don't support writing partial bytes. */
>>> +   /* We don't support writing partial bytes */
>>> if (bitlen % 8) {
>>> debug("ICH SPI: Accessing partial bytes not supported\n");
>>> return -EPROTONOSUPPORT;
>>> @@ -601,7 +601,7 @@ static int ich_spi_xfer(struct udevice *dev, unsigned 
>>> int bitlen,
>>> return status;
>>>
>>> if (status & SPIS_FCERR) {
>>> -   debug("ICH SPI: Data transaction error\n");
>>> +   debug("ICH SPI: Data transaction error %x\n", 
>>> status);
>>> return -EIO;
>>> }
>>>
>>> @@ -619,7 +619,6 @@ static int ich_spi_xfer(struct udevice *dev, unsigned 
>>> int bitlen,
>>> return 0;
>>>  }
>>>
>>> -
>>>  /*
>>>   * This uses the SPI controller from the Intel Cougar Point and Panther 
>>> Point
>>>   * PCH to write-protect portions of the SPI flash until reboot. The changes
>>> --
>>
>> Reviewed-by: Bin Meng 
>
> Reviewed-by: Jagan Teki 

Since this is part of a bug-fix series I'll apply it now.

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/11] spi: sf: Print the error code on failure

2015-06-12 Thread Simon Glass
On 8 June 2015 at 11:49, Jagan Teki  wrote:
> On 8 June 2015 at 13:55, Marek Vasut  wrote:
>> On Sunday, June 07, 2015 at 04:50:32 PM, Simon Glass wrote:
>>> Rather than just 'ERROR', display the error code, which may be useful, at
>>> least with driver model.
>>>
>>> Signed-off-by: Simon Glass 
>>
>> Acked-by: Marek Vasut 
>
> Reviewed-by: Jagan Teki 

Since this is part of a bug-fix series I'll apply it now.

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming

2015-06-12 Thread Lukasz Majewski
On Fri, 12 Jun 2015 19:59:22 +0200
Paul Kocialkowski  wrote:

> Le vendredi 12 juin 2015 à 16:10 +0200, Lukasz Majewski a écrit :
> > Hi Paul,
> > 
> > > Le lundi 18 mai 2015 à 15:01 +0200, Lukasz Majewski a écrit :
> > > > Hi Paul,
> > > > 
> > > > > This introduces a coherent scheme for naming USB download
> > > > > gadget and functions config options. The download USB gadget
> > > > > config option is moved to CONFIG_USB_GADGET_DOWNLOAD for
> > > > > better consistency with other gadgets and each function's
> > > > > config option is moved to a CONFIG_USB_FUNCTION_ prefix.
> > > > > 
> > > > > Signed-off-by: Paul Kocialkowski 
> > > > > ---
> > > 
> > > [snip]
> > > 
> > > > Acked-by: Lukasz Majewski 
> > > > 
> > > > I will test this patch on my devices and then pull it to
> > > > u-boot-dfu tree.
> > > 
> > > Is there anything holding back this patch set at this point?
> > > 
> > 
> > Sorry to say, but:
> > 
> > ./tools/buildman/buildman.py --branch=HEAD samsung --detail
> > --verbose --show_errors --force-build --count=4
> > --output-dir=./BUILD/
> > 
> > run on top of the newest u-boot-denx-usb/master
> > 
> > SHA1: b2d0495b16e9e2fdaa1c04f5a43bf60f4ad3a5ea
> > 
> > Caused build errors on the Odroix-XU3 board (attached to this
> > e-mail).
> 
> Heh, I guess the patches were just too old. I just sent out v2 that
> includes the Odroid XU3.

Thanks :-).

One more thing - in the future please add me to CC (as you didn't do
that for v2).

In u-boot you can use ./tools/patman tool to generate list of e-mail
receivers.

> 
> Thanks for pointing this out.
> 

No problem :-). You were first "victim" of my automated building and
testing setup :-).

Best regards,
Łukasz Majewski


pgpqFmnRxxs3F.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fastboot: Dynamic controller index for usb_gadget_handle_interrupts

2015-06-12 Thread Simon Glass
Hi Paul,

On 7 June 2015 at 08:48, Simon Glass  wrote:
> On 25 May 2015 at 08:50, Lukasz Majewski  wrote:
>> Hi Paul,
>>
>>> Since we're now using a dynamic controller index for fastboot too,
>>> usb_gadget_handle_interrupts should be using it instead of 0 (despite
>>> the fact that it's currently not being used at all in the musb-new
>>> implementation).
>>>
>>> Signed-off-by: Paul Kocialkowski 
>>> ---
>>>  common/cmd_fastboot.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
>>> index 86fbddf..b9d1c8c 100644
>>> --- a/common/cmd_fastboot.c
>>> +++ b/common/cmd_fastboot.c
>>> @@ -47,7 +47,7 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag,
>>> int argc, char *const argv[]) break;
>>>   if (ctrlc())
>>>   break;
>>> - usb_gadget_handle_interrupts(0);
>>> + usb_gadget_handle_interrupts(controller_index);
>>>   }
>>>
>>>   ret = CMD_RET_SUCCESS;
>>
>> Reviewed-by: Lukasz Majewski 
>
> This is in my queue and looks like a fix, so I'm picking it up.
>
> Applied to u-boot-x86, thanks!

Unfortunately in my final build test this breaks a number of boards, including:

am335x_boneblack_vboot

common/cmd_fastboot.c:36:32: error: ‘controller_index’ undeclared
(first use in this function)
   usb_gadget_handle_interrupts(controller_index);

Can you please take a look and respin it?

For now I've dropped it from u-boot-x86.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] build: create time and date independent binary

2015-06-12 Thread Paul Kocialkowski
Le vendredi 12 juin 2015 à 17:31 +0200, Heiko Schocher a écrit :
> With this option enabled each compilation creates the exact
> same binary. There are no timestamps, with which a U-Boot
> binary can be identified.
> 
> This option is disabled by default.

I think a bit more is needed to get truly reproducible builds in U-Boot,
but this is a first good step!

I have been thinking about bringing reproducible builds to U-Boot for a
little while, but never got around actually doing it. Are you interested
in helping me on that? I have some free time these days, so I could do
some work on this.

It would certainly be relevant to get in touch with the people working
on reproducing builds for Debian (I know Lunar is involved with this),
since Debian packages U-Boot for many devices and they're apparently
willing to help upstream with automated tests, as they're doing with
coreboot and OpenWRT!

> Signed-off-by: Heiko Schocher 
> ---
> 
>  Kconfig  | 9 +
>  Makefile | 8 
>  2 files changed, 17 insertions(+)
> 
> diff --git a/Kconfig b/Kconfig
> index 15e15af..c0c7eb8 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -81,6 +81,15 @@ menuconfig EXPERT
> Only use this if you really know what you are doing.
>  
>  if EXPERT
> + config SYS_EXACT_BINARY
> + bool "Create time and date independent binary"
> + default n
> + help
> +   With this option enabled each compilation creates the exact
> +   same binary. There are no timestamps, with which a U-Boot
> +   binary can be identified.
> +   This option is disabled by default.
> +
>   config SYS_MALLOC_CLEAR_ON_INIT
>   bool "Init with zeros the memory reserved for malloc (slow)"
>   default y
> diff --git a/Makefile b/Makefile
> index 0a674bf..4ae2701 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1230,11 +1230,19 @@ define filechk_version.h
>   echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; )
>  endef
>  
> +ifeq ($(CONFIG_SYS_EXACT_BINARY),y)
> +define filechk_timestamp.h
> + (LC_ALL=C date +'#define U_BOOT_DATE "NODATE"'; \
> + LC_ALL=C date +'#define U_BOOT_TIME "NOTIME"'; \
> + LC_ALL=C date +'#define U_BOOT_TZ "NOTZ"')
> +endef
> +else
>  define filechk_timestamp.h
>   (LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \
>   LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
>   LC_ALL=C date +'#define U_BOOT_TZ "%z"')
>  endef
> +endif
>  
>  $(version_h): include/config/uboot.release FORCE
>   $(call filechk,version.h)

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming

2015-06-12 Thread Paul Kocialkowski
Le vendredi 12 juin 2015 à 22:06 +0200, Lukasz Majewski a écrit :
> On Fri, 12 Jun 2015 19:59:22 +0200
> Paul Kocialkowski  wrote:
> 
> > Le vendredi 12 juin 2015 à 16:10 +0200, Lukasz Majewski a écrit :
> > > Hi Paul,
> > > 
> > > > Le lundi 18 mai 2015 à 15:01 +0200, Lukasz Majewski a écrit :
> > > > > Hi Paul,
> > > > > 
> > > > > > This introduces a coherent scheme for naming USB download
> > > > > > gadget and functions config options. The download USB gadget
> > > > > > config option is moved to CONFIG_USB_GADGET_DOWNLOAD for
> > > > > > better consistency with other gadgets and each function's
> > > > > > config option is moved to a CONFIG_USB_FUNCTION_ prefix.
> > > > > > 
> > > > > > Signed-off-by: Paul Kocialkowski 
> > > > > > ---
> > > > 
> > > > [snip]
> > > > 
> > > > > Acked-by: Lukasz Majewski 
> > > > > 
> > > > > I will test this patch on my devices and then pull it to
> > > > > u-boot-dfu tree.
> > > > 
> > > > Is there anything holding back this patch set at this point?
> > > > 
> > > 
> > > Sorry to say, but:
> > > 
> > > ./tools/buildman/buildman.py --branch=HEAD samsung --detail
> > > --verbose --show_errors --force-build --count=4
> > > --output-dir=./BUILD/
> > > 
> > > run on top of the newest u-boot-denx-usb/master
> > > 
> > > SHA1: b2d0495b16e9e2fdaa1c04f5a43bf60f4ad3a5ea
> > > 
> > > Caused build errors on the Odroix-XU3 board (attached to this
> > > e-mail).
> > 
> > Heh, I guess the patches were just too old. I just sent out v2 that
> > includes the Odroid XU3.
> 
> Thanks :-).
> 
> One more thing - in the future please add me to CC (as you didn't do
> that for v2).

Well, I added: Lukasz Majewski 
Is your correct address: Lukasz Majewski  now?

> In u-boot you can use ./tools/patman tool to generate list of e-mail
> receivers.

Good to know :)

> > Thanks for pointing this out.
> > 
> 
> No problem :-). You were first "victim" of my automated building and
> testing setup :-).

Heh, good to see things like that in place.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/9] x86: Move MP initialization codes into a common place

2015-06-12 Thread Simon Glass
Hi Bin,

On 11 June 2015 at 20:07, Bin Meng  wrote:
> Hi Simon,
>
> On Fri, Jun 12, 2015 at 7:39 AM, Simon Glass  wrote:
>> Hi Bin,
>>
>> On 9 June 2015 at 01:45, Bin Meng  wrote:
>>> Most of the MP initialization codes in arch/x86/cpu/baytrail/cpu.c is
>>> common to all x86 processors, except detect_num_cpus() which varies
>>> from cpu to cpu. Move these to arch/x86/cpu/cpu.c and declare a weak
>>> detect_num_cpus() which just returns 2 which is minimally required.
>>>
>>> Signed-off-by: Bin Meng 
>>> ---
>>>
>>>  arch/x86/cpu/baytrail/cpu.c | 44 +-
>>>  arch/x86/cpu/cpu.c  | 47 
>>> +
>>>  2 files changed, 48 insertions(+), 43 deletions(-)
>>>
>>> diff --git a/arch/x86/cpu/baytrail/cpu.c b/arch/x86/cpu/baytrail/cpu.c
>>> index 05156a5..7805056 100644
>>> --- a/arch/x86/cpu/baytrail/cpu.c
>>> +++ b/arch/x86/cpu/baytrail/cpu.c
>>> @@ -12,23 +12,11 @@
>>>  #include 
>>>  #include 
>>>  #include 
>>> -#include 
>>>  #include 
>>>  #include 
>>>
>>>  #ifdef CONFIG_SMP
>>> -static int enable_smis(struct udevice *cpu, void *unused)
>>> -{
>>> -   return 0;
>>> -}
>>> -
>>> -static struct mp_flight_record mp_steps[] = {
>>> -   MP_FR_BLOCK_APS(mp_init_cpu, NULL, mp_init_cpu, NULL),
>>> -   /* Wait for APs to finish initialization before proceeding. */
>>> -   MP_FR_BLOCK_APS(NULL, NULL, enable_smis, NULL),
>>> -};
>>> -
>>> -static int detect_num_cpus(void)
>>> +int detect_num_cpus(void)
>>>  {
>>> int ecx = 0;
>>>
>>> @@ -52,38 +40,8 @@ static int detect_num_cpus(void)
>>> ecx++;
>>> }
>>>  }
>>> -
>>> -static int baytrail_init_cpus(void)
>>> -{
>>> -   struct mp_params mp_params;
>>> -
>>> -   lapic_setup();
>>> -
>>> -   mp_params.num_cpus = detect_num_cpus();
>>> -   mp_params.parallel_microcode_load = 0,
>>> -   mp_params.flight_plan = &mp_steps[0];
>>> -   mp_params.num_records = ARRAY_SIZE(mp_steps);
>>> -   mp_params.microcode_pointer = 0;
>>> -
>>> -   if (mp_init(&mp_params)) {
>>> -   printf("Warning: MP init failure\n");
>>> -   return -EIO;
>>> -   }
>>> -
>>> -   return 0;
>>> -}
>>>  #endif
>>>
>>> -int x86_init_cpus(void)
>>> -{
>>> -#ifdef CONFIG_SMP
>>> -   debug("Init additional CPUs\n");
>>> -   baytrail_init_cpus();
>>> -#endif
>>> -
>>> -   return 0;
>>> -}
>>> -
>>>  static void set_max_freq(void)
>>>  {
>>> msr_t perf_ctl;
>>> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
>>> index ffb6e43..ddc7dc3 100644
>>> --- a/arch/x86/cpu/cpu.c
>>> +++ b/arch/x86/cpu/cpu.c
>>> @@ -21,10 +21,13 @@
>>>
>>>  #include 
>>>  #include 
>>> +#include 
>>>  #include 
>>>  #include 
>>>  #include 
>>>  #include 
>>> +#include 
>>> +#include 
>>>  #include 
>>>  #include 
>>>  #include 
>>> @@ -601,8 +604,52 @@ int last_stage_init(void)
>>>  }
>>>  #endif
>>>
>>> +#ifdef CONFIG_SMP
>>> +static int enable_smis(struct udevice *cpu, void *unused)
>>> +{
>>> +   return 0;
>>> +}
>>> +
>>> +static struct mp_flight_record mp_steps[] = {
>>> +   MP_FR_BLOCK_APS(mp_init_cpu, NULL, mp_init_cpu, NULL),
>>> +   /* Wait for APs to finish initialization before proceeding */
>>> +   MP_FR_BLOCK_APS(NULL, NULL, enable_smis, NULL),
>>> +};
>>> +
>>> +__weak int detect_num_cpus(void)
>>
>> Does this need to be weak? We could perhaps require that the function exists?
>>
>
> Yes, since I don't see there is a common way to detect number of cpu
> cores. Or maybe I am not aware of one. If we want to remove the weak,
> maybe we can just switch to count the number of cpu nodes in /cpus
> from device tree, which should be generic for all cases. I believe we
> discussed this during the review when you added MP stuff.

I worry what might happen if the device tree says 4 but there are only
2 CPUs. There should be a way to detect the number of CPUs gracefully
in each arch.

Can you add get_cpu_count() as a method to the UCLASS_CPU ops perhaps?
Then baytrail can use it.

mp_init() can make the get_cpu_count() call after finding the first
CPU, and we can remove num_cpus from struct mp_params.

To me that seams cleaner than creating a weak function.

>
>>> +{
>>> +   /* We need at least 2 cores to perform mp_init() */
>>> +   return 2;
>>> +}
>>> +
>>> +static int x86_mp_init(void)
>>> +{
>>> +   struct mp_params mp_params;
>>> +
>>> +   lapic_setup();
>>> +
>>> +   mp_params.num_cpus = detect_num_cpus();
>>> +   mp_params.parallel_microcode_load = 0,
>>> +   mp_params.flight_plan = &mp_steps[0];
>>> +   mp_params.num_records = ARRAY_SIZE(mp_steps);
>>> +   mp_params.microcode_pointer = 0;
>>> +
>>> +   if (mp_init(&mp_params)) {
>>> +   printf("Warning: MP init failure\n");
>>> +   return -EIO;
>>> +   }
>>> +
>>> +   return 0;
>>> +}
>>> +#endif
>>> +
>>>  __weak int x86_init_cpus(void)
>>>  {
>>> +#ifdef CONFIG_SMP
>>> +

Re: [U-Boot] [PATCH v2 2/9] dm: cpu: Test against cpu_ops->get_info in cpu_get_info()

2015-06-12 Thread Simon Glass
Hi Bin,

On 12 June 2015 at 00:52, Bin Meng  wrote:
> In cpu_get_info() it wrongly tests against cpu_ops->get_desc to see
> if it is NULL. It should test against cpu_ops->get_info.
>
> Signed-off-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  drivers/cpu/cpu-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I have the same commit locally - I thought I sent it but obviously not.

Acked-by: Simon Glass 

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC] sunxi: driver model breaks netconsole

2015-06-12 Thread Bernhard Nortmann
The switch to DM in
http://git.denx.de/?p=u-boot.git;a=commit;h=b6006baf9c2553543e3384983d23d95efbf24fa6
causes u-boot compilation to fail when CONFIG_NETCONSOLE is enabled:

  CC  common/bootm.o
common/bootm.c: In function 'bootm_disable_interrupts':
common/bootm.c:472:2: warning: implicit declaration of function
'eth_unregister' [-Wimplicit-function-declaration]
  eth_unregister(eth_get_dev());
  ^
drivers/net/netconsole.c: In function 'nc_send_packet':
drivers/net/netconsole.c:181:6: warning: assignment from incompatible
pointer type [enabled by default]
  eth = eth_get_dev();
  ^
  CC  drivers/net/netconsole.o
drivers/net/netconsole.c:186:10: error: dereferencing pointer to incomplete type
   if (eth->state == ETH_STATE_ACTIVE)
  ^
drivers/net/netconsole.c:197:9: error: dereferencing pointer to incomplete type
  if (eth->state != ETH_STATE_ACTIVE) {
 ^
drivers/net/netconsole.c: In function 'nc_stdio_tstc':
drivers/net/netconsole.c:303:6: warning: assignment from incompatible
pointer type [enabled by default]
  eth = eth_get_dev();
  ^
drivers/net/netconsole.c:304:16: error: dereferencing pointer to incomplete type
  if (eth && eth->state == ETH_STATE_ACTIVE)
^
scripts/Makefile.build:276: recipe for target 'drivers/net/netconsole.o' failed
make[1]: *** [drivers/net/netconsole.o] Error 1
Makefile:1156: recipe for target 'drivers/net' failed


I suspect that netconsole.c needs to be reworked, and this problem might
affect other platforms than sunxi, too.

Regards, B. Nortmann

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming

2015-06-12 Thread Paul Kocialkowski
Le vendredi 12 juin 2015 à 16:10 +0200, Lukasz Majewski a écrit :
> Hi Paul,
> 
> > Le lundi 18 mai 2015 à 15:01 +0200, Lukasz Majewski a écrit :
> > > Hi Paul,
> > > 
> > > > This introduces a coherent scheme for naming USB download gadget
> > > > and functions config options. The download USB gadget config
> > > > option is moved to CONFIG_USB_GADGET_DOWNLOAD for better
> > > > consistency with other gadgets and each function's config option
> > > > is moved to a CONFIG_USB_FUNCTION_ prefix.
> > > > 
> > > > Signed-off-by: Paul Kocialkowski 
> > > > ---
> > 
> > [snip]
> > 
> > > Acked-by: Lukasz Majewski 
> > > 
> > > I will test this patch on my devices and then pull it to u-boot-dfu
> > > tree.
> > 
> > Is there anything holding back this patch set at this point?
> > 
> 
> Sorry to say, but:
> 
> ./tools/buildman/buildman.py --branch=HEAD samsung --detail --verbose
> --show_errors --force-build --count=4 --output-dir=./BUILD/
> 
> run on top of the newest u-boot-denx-usb/master
> 
> SHA1: b2d0495b16e9e2fdaa1c04f5a43bf60f4ad3a5ea
> 
> Caused build errors on the Odroix-XU3 board (attached to this e-mail).

Heh, I guess the patches were just too old. I just sent out v2 that
includes the Odroid XU3.

Thanks for pointing this out.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 3/4] usb: board_usb_init and board_usb_cleanup calls in the fastboot command

2015-06-12 Thread Paul Kocialkowski
Each USB download function command calls board_usb_init before registering the
USB gadget and board_usb_cleanup after de-registering it. On devices currently
using fasboot, musb-new is usually initialized earlier, but some other boards
might need the board_usb_init call to properly initialize musb-new.

This requires adding an argument (the USB controller index) to the fastboot
command, as it is currently done with other USB download gadget functions.

Signed-off-by: Paul Kocialkowski 
---
 common/cmd_fastboot.c | 31 +--
 include/configs/ti_omap5_common.h |  2 +-
 2 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index d52ccfb..86fbddf 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -10,11 +10,26 @@
 #include 
 #include 
 #include 
+#include 
 
 static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const 
argv[])
 {
+   int controller_index;
+   char *usb_controller;
int ret;
 
+   if (argc < 2)
+   return CMD_RET_USAGE;
+
+   usb_controller = argv[1];
+   controller_index = simple_strtoul(usb_controller, NULL, 0);
+
+   ret = board_usb_init(controller_index, USB_INIT_DEVICE);
+   if (ret) {
+   error("USB init failed: %d", ret);
+   return CMD_RET_FAILURE;
+   }
+
g_dnl_clear_detach();
ret = g_dnl_register("usb_dnl_fastboot");
if (ret)
@@ -23,9 +38,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, 
char *const argv[])
if (!g_dnl_board_usb_cable_connected()) {
puts("\rUSB cable not detected.\n" \
 "Command exit.\n");
-   g_dnl_unregister();
-   g_dnl_clear_detach();
-   return CMD_RET_FAILURE;
+   ret = CMD_RET_FAILURE;
+   goto exit;
}
 
while (1) {
@@ -36,14 +50,19 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int 
argc, char *const argv[])
usb_gadget_handle_interrupts(0);
}
 
+   ret = CMD_RET_SUCCESS;
+
+exit:
g_dnl_unregister();
g_dnl_clear_detach();
-   return CMD_RET_SUCCESS;
+   board_usb_cleanup(controller_index, USB_INIT_DEVICE);
+
+   return ret;
 }
 
 U_BOOT_CMD(
-   fastboot,   1,  0,  do_fastboot,
+   fastboot, 2, 1, do_fastboot,
"use USB Fastboot protocol",
-   "\n"
+   "\n"
"- run as a fastboot usb device"
 );
diff --git a/include/configs/ti_omap5_common.h 
b/include/configs/ti_omap5_common.h
index 4faffef..4fd5669 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -137,7 +137,7 @@
"if test ${dofastboot} -eq 1; then " \
"echo Boot fastboot requested, resetting dofastboot ...;" \
"setenv dofastboot 0; saveenv;" \
-   "echo Booting into fastboot ...; fastboot;" \
+   "echo Booting into fastboot ...; fastboot 0;" \
"fi;" \
"run findfdt; " \
"run mmcboot;" \
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/4] usb: USB download gadget and functions config options coherent naming

2015-06-12 Thread Paul Kocialkowski
This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski 
---
 README| 2 +-
 board/samsung/common/Makefile | 2 +-
 board/siemens/common/factoryset.c | 4 ++--
 doc/README.android-fastboot   | 2 +-
 drivers/dfu/Makefile  | 2 +-
 drivers/usb/gadget/Makefile   | 8 
 include/configs/am335x_evm.h  | 4 ++--
 include/configs/am43xx_evm.h  | 4 ++--
 include/configs/bav335x.h | 6 +++---
 include/configs/colibri_vf.h  | 6 +++---
 include/configs/dra7xx_evm.h  | 4 ++--
 include/configs/exynos4-common.h  | 8 
 include/configs/gw_ventana.h  | 4 ++--
 include/configs/mx6sabre_common.h | 4 ++--
 include/configs/nitrogen6x.h  | 4 ++--
 include/configs/odroid_xu3.h  | 8 
 include/configs/omap3_beagle.h| 2 +-
 include/configs/s5p_goni.h| 8 
 include/configs/siemens-am33x-common.h| 4 ++--
 include/configs/socfpga_common.h  | 6 +++---
 include/configs/tbs2910.h | 4 ++--
 include/configs/tegra-common-usb-gadget.h | 6 +++---
 include/configs/warp.h| 6 +++---
 include/configs/zynq-common.h | 6 +++---
 24 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/README b/README
index 119bbc9..f404812 100644
--- a/README
+++ b/README
@@ -1675,7 +1675,7 @@ The following options need to be configured:
key for the Replay Protection Memory Block partition in eMMC.
 
 - USB Device Firmware Update (DFU) class support:
-   CONFIG_DFU_FUNCTION
+   CONFIG_USB_FUNCTION_DFU
This enables the USB portion of the DFU USB class
 
CONFIG_CMD_DFU
diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile
index 93347ef..5fb01ce 100644
--- a/board/samsung/common/Makefile
+++ b/board/samsung/common/Makefile
@@ -6,7 +6,7 @@
 #
 
 obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
-obj-$(CONFIG_USBDOWNLOAD_GADGET) += gadget.o
+obj-$(CONFIG_USB_GADGET_DOWNLOAD) += gadget.o
 obj-$(CONFIG_MISC_COMMON) += misc.o
 
 ifndef CONFIG_SPL_BUILD
diff --git a/board/siemens/common/factoryset.c 
b/board/siemens/common/factoryset.c
index d81f548..6c869ed 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -144,7 +144,7 @@ int factoryset_read_eeprom(int i2c_addr)
unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH];
unsigned char *cp, *cp1;
 
-#if defined(CONFIG_DFU_FUNCTION)
+#if defined(CONFIG_USB_FUNCTION_DFU)
factory_dat.usb_vendor_id = CONFIG_G_DNL_VENDOR_NUM;
factory_dat.usb_product_id = CONFIG_G_DNL_PRODUCT_NUM;
 #endif
@@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr)
cp1 += 3;
}
 
-#if defined(CONFIG_DFU_FUNCTION)
+#if defined(CONFIG_USB_FUNCTION_DFU)
/* read vid and pid for dfu mode */
if (0 <= get_factory_record_val(cp, size, (uchar *)"USBD1",
(uchar *)"vid", buf,
diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot
index 04411e9..c2a2418 100644
--- a/doc/README.android-fastboot
+++ b/doc/README.android-fastboot
@@ -33,7 +33,7 @@ Board specific
 The fastboot gadget relies on the USB download gadget, so the following
 options must be configured:
 
-CONFIG_USBDOWNLOAD_GADGET
+CONFIG_USB_GADGET_DOWNLOAD
 CONFIG_G_DNL_VENDOR_NUM
 CONFIG_G_DNL_PRODUCT_NUM
 CONFIG_G_DNL_MANUFACTURER
diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
index 5cc535e..cebea30 100644
--- a/drivers/dfu/Makefile
+++ b/drivers/dfu/Makefile
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-obj-$(CONFIG_DFU_FUNCTION) += dfu.o
+obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
 obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
 obj-$(CONFIG_DFU_NAND) += dfu_nand.o
 obj-$(CONFIG_DFU_RAM) += dfu_ram.o
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 70bb550..46d7d94 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -15,10 +15,10 @@ obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
 obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG_PHY) += s3c_udc_otg_phy.o
 obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
 obj-$(CONFIG_CI_UDC)   += ci_udc.o
-obj-$(CONFIG_THOR_FUNCTION) += f_thor.o
-obj-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
-obj-$(CONFIG_DFU_FUNCTION) += f_dfu.o
-obj-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
+obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
+obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
+obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
+obj-$(CONFIG_USB_FUNCTION_MASS_STORAG

[U-Boot] [PATCH v2 4/4] usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code

2015-06-12 Thread Paul Kocialkowski
Weak versions of board_usb_init and board_usb_cleanup are defined in common USB
host code, but it is also used for USB device gadgets, so we also need a weak
definition of it when there is no USB host enabled.
Both weak definitions do not conflict.

Signed-off-by: Paul Kocialkowski 
---
 drivers/usb/gadget/g_dnl.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index ee52a29..ad89a0d 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -12,6 +12,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -148,6 +149,18 @@ static int g_dnl_config_register(struct usb_composite_dev 
*cdev)
 }
 
 __weak
+int board_usb_init(int index, enum usb_init_type init)
+{
+   return 0;
+}
+
+__weak
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+   return 0;
+}
+
+__weak
 int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 {
return 0;
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 2/4] usb: Fastboot function config for better consistency with other functions

2015-06-12 Thread Paul Kocialkowski
USB download gadget functions such as thor and dfu have a separate config option
for the USB gadget part of the code, independent from the command part.
This switches the fastboot USB gadget to the same scheme, for better
consistency.

Signed-off-by: Paul Kocialkowski 
---
 README   | 3 +++
 arch/arm/cpu/armv7/omap-common/boot-common.c | 2 +-
 doc/README.android-fastboot  | 4 ++--
 drivers/usb/gadget/Makefile  | 2 +-
 include/configs/am335x_evm.h | 1 +
 include/configs/bav335x.h| 1 +
 include/configs/dra7xx_evm.h | 1 +
 include/configs/nitrogen6x.h | 1 +
 include/configs/omap3_beagle.h   | 1 +
 9 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/README b/README
index f404812..2aa0cea 100644
--- a/README
+++ b/README
@@ -1720,6 +1720,9 @@ The following options need to be configured:
sending again an USB request to the device.
 
 - USB Device Android Fastboot support:
+   CONFIG_USB_FUNCTION_FASTBOOT
+   This enables the USB part of the fastboot gadget
+
CONFIG_CMD_FASTBOOT
This enables the command "fastboot" which enables the Android
fastboot mode for the platform's USB device. Fastboot is a USB
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c 
b/arch/arm/cpu/armv7/omap-common/boot-common.c
index bbc6bed..7fc0a56 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -163,7 +163,7 @@ void arch_preboot_os(void)
 }
 #endif
 
-#if defined(CONFIG_CMD_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
+#if defined(CONFIG_USB_FUNCTION_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
 int fb_set_reboot_flag(void)
 {
printf("Setting reboot to fastboot flag ...\n");
diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot
index c2a2418..92f2897 100644
--- a/doc/README.android-fastboot
+++ b/doc/README.android-fastboot
@@ -42,8 +42,8 @@ NOTE: The CONFIG_G_DNL_VENDOR_NUM must be one of the numbers 
supported by
 the fastboot client. The list of vendor IDs supported can be found in the
 fastboot client source code (fastboot.c) mentioned above.
 
-The fastboot function is enabled by defining CONFIG_CMD_FASTBOOT and
-CONFIG_ANDROID_BOOT_IMAGE.
+The fastboot function is enabled by defining CONFIG_USB_FUNCTION_FASTBOOT,
+CONFIG_CMD_FASTBOOT and CONFIG_ANDROID_BOOT_IMAGE.
 
 The fastboot protocol requires a large memory buffer for downloads. This
 buffer should be as large as possible for a platform. The location of the
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 46d7d94..4e15323 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -19,7 +19,7 @@ obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
 obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
 obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
 obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
-obj-$(CONFIG_CMD_FASTBOOT) += f_fastboot.o
+obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
 endif
 ifdef CONFIG_USB_ETHER
 obj-y += ether.o
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index b94e4b5..8aa3fd7 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -298,6 +298,7 @@
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index 7ce568b..99e3a00 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -455,6 +455,7 @@ DEFAULT_LINUX_BOOT_ENV \
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 1804cc0..fc8de70 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -85,6 +85,7 @@
DFU_ALT_INFO_RAM
 
 /* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDRCONFIG_SYS_LOAD_ADDR
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 1c2eb47..191c0dd 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -347,6 +347,7 @@
 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
 #define CONFIG_G_DNL_MANUFACTURER "Boundary"
 
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 46c0680..9089876 100644
--- a/include/configs

Re: [U-Boot] [PATCHv3 1/1] board: Add Toby-Churchill SL50 board support.

2015-06-12 Thread Tom Rini
On Thu, Jun 04, 2015 at 10:42:48AM +0200, Enric Balletbo i Serra wrote:

> Add support for Lightwriter SL50 series board, a small, robust and portable
> Voice Output Communication Aids (VOCA) designed to meet the particular and
> changing needs of people with speech loss resulting from a wide range of
> acquired, progressive and congenital conditions.
> 
> Signed-off-by: Enric Balletbo i Serra 
[snip]
> +config DM
> + default y
> +
> +config DM_GPIO
> + default y if DM
> +
> +config DM_SERIAL
> + default y if DM

You don't need 'config DM' now (that causes warnings) nor ' if DM' on
the other two options now.

And once I fix that I see:
+(am335x_sl50) drivers/serial/serial-uclass.c:27:2: error: #error "Serial is 
required before relocation - define CONFIG_SYS_MALLOC_F_LEN to make this work"
+(am335x_sl50) drivers/serial/serial-uclass.c: In function 
‘serial_find_console_or_panic’:
+(am335x_sl50) drivers/serial/serial-uclass.c:51:25: error: ‘gd_t’ has no 
member named ‘dm_root’
+(am335x_sl50) make[2]: *** [drivers/serial/serial-uclass.o] Error 1
+(am335x_sl50) make[1]: *** [drivers/serial] Error 2
+(am335x_sl50) make[1]: *** wait: No child processes.  Stop.
+(am335x_sl50) make: *** [sub-make] Error 2

Please rebase to v2015.07-rc2 and re-submit, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] build: create time and date independent binary

2015-06-12 Thread Heiko Schocher
With this option enabled each compilation creates the exact
same binary. There are no timestamps, with which a U-Boot
binary can be identified.

This option is disabled by default.

Signed-off-by: Heiko Schocher 
---

 Kconfig  | 9 +
 Makefile | 8 
 2 files changed, 17 insertions(+)

diff --git a/Kconfig b/Kconfig
index 15e15af..c0c7eb8 100644
--- a/Kconfig
+++ b/Kconfig
@@ -81,6 +81,15 @@ menuconfig EXPERT
  Only use this if you really know what you are doing.
 
 if EXPERT
+   config SYS_EXACT_BINARY
+   bool "Create time and date independent binary"
+   default n
+   help
+ With this option enabled each compilation creates the exact
+ same binary. There are no timestamps, with which a U-Boot
+ binary can be identified.
+ This option is disabled by default.
+
config SYS_MALLOC_CLEAR_ON_INIT
bool "Init with zeros the memory reserved for malloc (slow)"
default y
diff --git a/Makefile b/Makefile
index 0a674bf..4ae2701 100644
--- a/Makefile
+++ b/Makefile
@@ -1230,11 +1230,19 @@ define filechk_version.h
echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; )
 endef
 
+ifeq ($(CONFIG_SYS_EXACT_BINARY),y)
+define filechk_timestamp.h
+   (LC_ALL=C date +'#define U_BOOT_DATE "NODATE"'; \
+   LC_ALL=C date +'#define U_BOOT_TIME "NOTIME"'; \
+   LC_ALL=C date +'#define U_BOOT_TZ "NOTZ"')
+endef
+else
 define filechk_timestamp.h
(LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \
LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
LC_ALL=C date +'#define U_BOOT_TZ "%z"')
 endef
+endif
 
 $(version_h): include/config/uboot.release FORCE
$(call filechk,version.h)
-- 
2.1.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming

2015-06-12 Thread Lukasz Majewski
Hi Paul,

> Le lundi 18 mai 2015 à 15:01 +0200, Lukasz Majewski a écrit :
> > Hi Paul,
> > 
> > > This introduces a coherent scheme for naming USB download gadget
> > > and functions config options. The download USB gadget config
> > > option is moved to CONFIG_USB_GADGET_DOWNLOAD for better
> > > consistency with other gadgets and each function's config option
> > > is moved to a CONFIG_USB_FUNCTION_ prefix.
> > > 
> > > Signed-off-by: Paul Kocialkowski 
> > > ---
> 
> [snip]
> 
> > Acked-by: Lukasz Majewski 
> > 
> > I will test this patch on my devices and then pull it to u-boot-dfu
> > tree.
> 
> Is there anything holding back this patch set at this point?
> 

Sorry to say, but:

./tools/buildman/buildman.py --branch=HEAD samsung --detail --verbose
--show_errors --force-build --count=4 --output-dir=./BUILD/

run on top of the newest u-boot-denx-usb/master

SHA1: b2d0495b16e9e2fdaa1c04f5a43bf60f4ad3a5ea

Caused build errors on the Odroix-XU3 board (attached to this e-mail).


-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
   arm:  +   odroid-xu3
+common/built-in.o: In function `do_usb_mass_storage':
+build/../common/cmd_usb_mass_storage.c:99: undefined reference to `fsg_init'
+build/../common/cmd_usb_mass_storage.c:105: undefined reference to 
`g_dnl_register'
+build/../common/cmd_usb_mass_storage.c:114: undefined reference to 
`g_dnl_board_usb_cable_connected'
+build/../common/cmd_usb_mass_storage.c:121: undefined reference to 
`g_dnl_board_usb_cable_connected'
+build/../common/cmd_usb_mass_storage.c:142: undefined reference to 
`fsg_main_thread'
+build/../common/cmd_usb_mass_storage.c:156: undefined reference to 
`g_dnl_unregister'
+common/built-in.o: In function `do_thor_down':
+build/../common/cmd_thordown.c:29: undefined reference to 
`dfu_init_env_entities'
+build/../common/cmd_thordown.c:41: undefined reference to `g_dnl_register'
+build/../common/cmd_thordown.c:43: undefined reference to `thor_init'
+build/../common/cmd_thordown.c:50: undefined reference to `thor_handle'
+build/../common/cmd_thordown.c:58: undefined reference to `g_dnl_unregister'
+build/../common/cmd_thordown.c:61: undefined reference to `dfu_free_entities'
+common/built-in.o: In function `do_dfu':
+build/../common/cmd_dfu.c:30: undefined reference to `dfu_init_env_entities'
+build/../common/cmd_dfu.c:36: undefined reference to `dfu_show_entities'
+build/../common/cmd_dfu.c:42: undefined reference to `g_dnl_clear_detach'
+build/../common/cmd_dfu.c:43: undefined reference to `g_dnl_register'
+build/../common/cmd_dfu.c:45: undefined reference to `g_dnl_detach'
+build/../common/cmd_dfu.c:51: undefined reference to `dfu_usb_get_reset'
+build/../common/cmd_dfu.c:72: undefined reference to `g_dnl_unregister'
+build/../common/cmd_dfu.c:75: undefined reference to `dfu_free_entities'
+build/../common/cmd_dfu.c:80: undefined reference to `g_dnl_clear_detach'
+arm-v7a-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion fail 
/home/lukma/work/ptxdist/OSELAS.Toolchain-2013.12.0/platform-arm-v7a-linux-gnueabi-gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/binutils-2.24/bfd/elf32-arm.c:7696
+arm-v7a-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not found in 
the linker script
+arm-v7a-linux-gnueabi-ld.bfd: final link failed: Invalid operation
+make[1]: *** [u-boot] Error 1
+make: *** [sub-make] Error 2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/8] omap-common: Common boot code OMAP3 support and SYS_BOOT-based fallback boot device

2015-06-12 Thread Paul Kocialkowski
Le vendredi 12 juin 2015 à 15:10 +0200, Pali Rohár a écrit :
> On Friday 12 June 2015 15:01:47 Paul Kocialkowski wrote:
> > Le vendredi 12 juin 2015 à 13:56 +0200, Pali Rohár a écrit :
> > > On Friday 12 June 2015 13:32:56 Paul Kocialkowski wrote:
> > > > Le mercredi 10 juin 2015 à 13:35 +0200, Pali Rohár a écrit :
> > > > > On Wednesday 10 June 2015 12:58:11 Paul Kocialkowski wrote:
> > > > > > Le mercredi 10 juin 2015 à 12:42 +0200, Pali Rohár a écrit :
> > > > > > > On Wednesday 10 June 2015 12:34:39 Pali Rohár wrote:
> > > > > > > > On Wednesday 10 June 2015 11:54:00 Paul Kocialkowski wrote:
> > > > > > > > > Le mardi 09 juin 2015 à 20:34 +0200, Pali Rohár a écrit :
> > > > > > > > > > On Tuesday 09 June 2015 18:28:29 Pali Rohár wrote:
> > > > > > > > > > > On Monday 08 June 2015 23:24:18 Paul Kocialkowski wrote:
> > > > > > > > > > > > I would be very glad to see board maintainers give a go
> > > > > > > > > > > > at the changeset before it gets merged, especially on 
> > > > > > > > > > > > devices like
> > > > > > > > > > > > the Nokia RX-51 (N900) where some specific adaptation 
> > > > > > > > > > > > was needed.
> > > > > > > > > > > 
> > > > > > > > > > > So U-Boot is broken since 
> > > > > > > > > > > e11c6c279d823dc0d2f470c5c2e3c0a9854a640f
> > > > > > > > > > > (see other email thread). Until somebody fix that broken 
> > > > > > > > > > > commit, I
> > > > > > > > > > > cannot test your new patches in qemu or on (real) Nokia 
> > > > > > > > > > > N900.
> > > > > > > > > > 
> > > > > > > > > > Now I tested this patch series on top of u-boot master with 
> > > > > > > > > > applied my 
> > > > > > > > > > patch "Nokia RX-51: Fix calculating return address in 
> > > > > > > > > > save_boot_params".
> > > > > > > > > >
> > > > > > > > > > And it really as I thought broke booting U-Boot on Nokia 
> > > > > > > > > > N900 in qemu.
> > > > > > > > > 
> > > > > > > > > I'm confused here -- did you try booting on the actual device 
> > > > > > > > > or in
> > > > > > > > > qemu?
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > I tested your changes only in qemu. But because you removed (or 
> > > > > > > > better
> > > > > > > > masked) required lowlevel asm code, it will not work on real 
> > > > > > > > n900 too.
> > > > > > > > 
> > > > > > > > > > So this patch series is NAK from my side.
> > > > > > > > > 
> > > > > > > > > Thanks for testing. Of course, the point is to make another 
> > > > > > > > > version of
> > > > > > > > > the patch set that fits the N900 too, since we really need to 
> > > > > > > > > integrate
> > > > > > > > > the omap3 to the common omap boot mechanism anyways.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > Make sure that asm function in rx51 lowlevel asm file is called
> > > > > > > > immediately from start.S. It is required. Basically no 
> > > > > > > > modification to
> > > > > > > > that function should be needed (maybe just fixing return 
> > > > > > > > address in lr).
> > > > > > 
> > > > > > The problem is that this declaration conflicts with the one from
> > > > > > omap-common's lowlevel_init.S. I understand that it is not needed 
> > > > > > for
> > > > > > the RX-51 since it is not loaded by the U-Boot SPL or by the 
> > > > > > bootrom.
> > > > > > 
> > > > > 
> > > > > Yes.
> > > > > 
> > > > > > Perhaps the best way to do things here would be to have a config 
> > > > > > option
> > > > > > clearly stating that it should not expect the booting device 
> > > > > > information
> > > > > > structure in r0. This situation is not specific to the RX-51 
> > > > > > anyways.
> > > > > 
> > > > > Sounds good.
> > > > 
> > > > I just sent out v3 that fixes n900 support the way I suggested. I was
> > > > able to get my hands on the device and along with the patch you sent out
> > > > earlier this week, everything seems to work fine.
> > > > 
> > > 
> > > Hello,
> > > 
> > > have you also tested that "combined" image of u-boot and linux kernel
> > > (in uImage format) is working fine? That u-boot can boot that "attached"
> > > kernel image without problem.
> > > 
> > > Script for generating "combined" image from u-boot.bin and uImage kernel:
> > > https://gitorious.org/u-boot-shr/u-boot/source/maemo:debian/u-boot-gen-combined
> > > 
> > > You can boot "attached" kernel via u-boot command "run attachboot".
> > 
> > I haven't tried that, but since I have removed the changes I added to
> > the rx51-specific lowlevel_init.S, I expect that nothing should have
> > changed on this side.
> > 
> > I do not have serial on the device, so it's harder for me to figure out
> > whether a kernel will run fine (I would need a graphical indication on
> > the screen).
> > 
> > You're welcome to test that it still works, though.
> > 
> 
> If you compile fbdev into kernel image then you should see something on
> screen... But I will try to test new patch series at the weekend.

Of course, I could always do that, but as far as I'm concerned, this
patch set works as expected 

Re: [U-Boot] [PATCH v2 0/8] omap-common: Common boot code OMAP3 support and SYS_BOOT-based fallback boot device

2015-06-12 Thread Pali Rohár
On Friday 12 June 2015 15:01:47 Paul Kocialkowski wrote:
> Le vendredi 12 juin 2015 à 13:56 +0200, Pali Rohár a écrit :
> > On Friday 12 June 2015 13:32:56 Paul Kocialkowski wrote:
> > > Le mercredi 10 juin 2015 à 13:35 +0200, Pali Rohár a écrit :
> > > > On Wednesday 10 June 2015 12:58:11 Paul Kocialkowski wrote:
> > > > > Le mercredi 10 juin 2015 à 12:42 +0200, Pali Rohár a écrit :
> > > > > > On Wednesday 10 June 2015 12:34:39 Pali Rohár wrote:
> > > > > > > On Wednesday 10 June 2015 11:54:00 Paul Kocialkowski wrote:
> > > > > > > > Le mardi 09 juin 2015 à 20:34 +0200, Pali Rohár a écrit :
> > > > > > > > > On Tuesday 09 June 2015 18:28:29 Pali Rohár wrote:
> > > > > > > > > > On Monday 08 June 2015 23:24:18 Paul Kocialkowski wrote:
> > > > > > > > > > > I would be very glad to see board maintainers give a go
> > > > > > > > > > > at the changeset before it gets merged, especially on 
> > > > > > > > > > > devices like
> > > > > > > > > > > the Nokia RX-51 (N900) where some specific adaptation was 
> > > > > > > > > > > needed.
> > > > > > > > > > 
> > > > > > > > > > So U-Boot is broken since 
> > > > > > > > > > e11c6c279d823dc0d2f470c5c2e3c0a9854a640f
> > > > > > > > > > (see other email thread). Until somebody fix that broken 
> > > > > > > > > > commit, I
> > > > > > > > > > cannot test your new patches in qemu or on (real) Nokia 
> > > > > > > > > > N900.
> > > > > > > > > 
> > > > > > > > > Now I tested this patch series on top of u-boot master with 
> > > > > > > > > applied my 
> > > > > > > > > patch "Nokia RX-51: Fix calculating return address in 
> > > > > > > > > save_boot_params".
> > > > > > > > >
> > > > > > > > > And it really as I thought broke booting U-Boot on Nokia N900 
> > > > > > > > > in qemu.
> > > > > > > > 
> > > > > > > > I'm confused here -- did you try booting on the actual device 
> > > > > > > > or in
> > > > > > > > qemu?
> > > > > > > > 
> > > > > > > 
> > > > > > > I tested your changes only in qemu. But because you removed (or 
> > > > > > > better
> > > > > > > masked) required lowlevel asm code, it will not work on real n900 
> > > > > > > too.
> > > > > > > 
> > > > > > > > > So this patch series is NAK from my side.
> > > > > > > > 
> > > > > > > > Thanks for testing. Of course, the point is to make another 
> > > > > > > > version of
> > > > > > > > the patch set that fits the N900 too, since we really need to 
> > > > > > > > integrate
> > > > > > > > the omap3 to the common omap boot mechanism anyways.
> > > > > > > > 
> > > > > > > 
> > > > > > > Make sure that asm function in rx51 lowlevel asm file is called
> > > > > > > immediately from start.S. It is required. Basically no 
> > > > > > > modification to
> > > > > > > that function should be needed (maybe just fixing return address 
> > > > > > > in lr).
> > > > > 
> > > > > The problem is that this declaration conflicts with the one from
> > > > > omap-common's lowlevel_init.S. I understand that it is not needed for
> > > > > the RX-51 since it is not loaded by the U-Boot SPL or by the bootrom.
> > > > > 
> > > > 
> > > > Yes.
> > > > 
> > > > > Perhaps the best way to do things here would be to have a config 
> > > > > option
> > > > > clearly stating that it should not expect the booting device 
> > > > > information
> > > > > structure in r0. This situation is not specific to the RX-51 anyways.
> > > > 
> > > > Sounds good.
> > > 
> > > I just sent out v3 that fixes n900 support the way I suggested. I was
> > > able to get my hands on the device and along with the patch you sent out
> > > earlier this week, everything seems to work fine.
> > > 
> > 
> > Hello,
> > 
> > have you also tested that "combined" image of u-boot and linux kernel
> > (in uImage format) is working fine? That u-boot can boot that "attached"
> > kernel image without problem.
> > 
> > Script for generating "combined" image from u-boot.bin and uImage kernel:
> > https://gitorious.org/u-boot-shr/u-boot/source/maemo:debian/u-boot-gen-combined
> > 
> > You can boot "attached" kernel via u-boot command "run attachboot".
> 
> I haven't tried that, but since I have removed the changes I added to
> the rx51-specific lowlevel_init.S, I expect that nothing should have
> changed on this side.
> 
> I do not have serial on the device, so it's harder for me to figure out
> whether a kernel will run fine (I would need a graphical indication on
> the screen).
> 
> You're welcome to test that it still works, though.
> 

If you compile fbdev into kernel image then you should see something on
screen... But I will try to test new patch series at the weekend.

-- 
Pali Rohár
pali.ro...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/8] omap-common: Common boot code OMAP3 support and SYS_BOOT-based fallback boot device

2015-06-12 Thread Paul Kocialkowski
Le vendredi 12 juin 2015 à 13:56 +0200, Pali Rohár a écrit :
> On Friday 12 June 2015 13:32:56 Paul Kocialkowski wrote:
> > Le mercredi 10 juin 2015 à 13:35 +0200, Pali Rohár a écrit :
> > > On Wednesday 10 June 2015 12:58:11 Paul Kocialkowski wrote:
> > > > Le mercredi 10 juin 2015 à 12:42 +0200, Pali Rohár a écrit :
> > > > > On Wednesday 10 June 2015 12:34:39 Pali Rohár wrote:
> > > > > > On Wednesday 10 June 2015 11:54:00 Paul Kocialkowski wrote:
> > > > > > > Le mardi 09 juin 2015 à 20:34 +0200, Pali Rohár a écrit :
> > > > > > > > On Tuesday 09 June 2015 18:28:29 Pali Rohár wrote:
> > > > > > > > > On Monday 08 June 2015 23:24:18 Paul Kocialkowski wrote:
> > > > > > > > > > I would be very glad to see board maintainers give a go
> > > > > > > > > > at the changeset before it gets merged, especially on 
> > > > > > > > > > devices like
> > > > > > > > > > the Nokia RX-51 (N900) where some specific adaptation was 
> > > > > > > > > > needed.
> > > > > > > > > 
> > > > > > > > > So U-Boot is broken since 
> > > > > > > > > e11c6c279d823dc0d2f470c5c2e3c0a9854a640f
> > > > > > > > > (see other email thread). Until somebody fix that broken 
> > > > > > > > > commit, I
> > > > > > > > > cannot test your new patches in qemu or on (real) Nokia N900.
> > > > > > > > 
> > > > > > > > Now I tested this patch series on top of u-boot master with 
> > > > > > > > applied my 
> > > > > > > > patch "Nokia RX-51: Fix calculating return address in 
> > > > > > > > save_boot_params".
> > > > > > > >
> > > > > > > > And it really as I thought broke booting U-Boot on Nokia N900 
> > > > > > > > in qemu.
> > > > > > > 
> > > > > > > I'm confused here -- did you try booting on the actual device or 
> > > > > > > in
> > > > > > > qemu?
> > > > > > > 
> > > > > > 
> > > > > > I tested your changes only in qemu. But because you removed (or 
> > > > > > better
> > > > > > masked) required lowlevel asm code, it will not work on real n900 
> > > > > > too.
> > > > > > 
> > > > > > > > So this patch series is NAK from my side.
> > > > > > > 
> > > > > > > Thanks for testing. Of course, the point is to make another 
> > > > > > > version of
> > > > > > > the patch set that fits the N900 too, since we really need to 
> > > > > > > integrate
> > > > > > > the omap3 to the common omap boot mechanism anyways.
> > > > > > > 
> > > > > > 
> > > > > > Make sure that asm function in rx51 lowlevel asm file is called
> > > > > > immediately from start.S. It is required. Basically no modification 
> > > > > > to
> > > > > > that function should be needed (maybe just fixing return address in 
> > > > > > lr).
> > > > 
> > > > The problem is that this declaration conflicts with the one from
> > > > omap-common's lowlevel_init.S. I understand that it is not needed for
> > > > the RX-51 since it is not loaded by the U-Boot SPL or by the bootrom.
> > > > 
> > > 
> > > Yes.
> > > 
> > > > Perhaps the best way to do things here would be to have a config option
> > > > clearly stating that it should not expect the booting device information
> > > > structure in r0. This situation is not specific to the RX-51 anyways.
> > > 
> > > Sounds good.
> > 
> > I just sent out v3 that fixes n900 support the way I suggested. I was
> > able to get my hands on the device and along with the patch you sent out
> > earlier this week, everything seems to work fine.
> > 
> 
> Hello,
> 
> have you also tested that "combined" image of u-boot and linux kernel
> (in uImage format) is working fine? That u-boot can boot that "attached"
> kernel image without problem.
> 
> Script for generating "combined" image from u-boot.bin and uImage kernel:
> https://gitorious.org/u-boot-shr/u-boot/source/maemo:debian/u-boot-gen-combined
> 
> You can boot "attached" kernel via u-boot command "run attachboot".

I haven't tried that, but since I have removed the changes I added to
the rx51-specific lowlevel_init.S, I expect that nothing should have
changed on this side.

I do not have serial on the device, so it's harder for me to figure out
whether a kernel will run fine (I would need a graphical indication on
the screen).

You're welcome to test that it still works, though.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] common/cmd_bdinfo: show gd->board_type

2015-06-12 Thread Tom Rini
On Thu, Jun 11, 2015 at 12:27:09PM +0200, Hannes Schmelzer wrote:

> sometimes it is usefull to know if board-detection has
> written the correct value into gd->board_type.
> 
> For this we add some output to the bdinfo command.
> 
> Signed-off-by: Hannes Schmelzer 
> 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params

2015-06-12 Thread Tom Rini
On Tue, Jun 09, 2015 at 07:05:00PM +0200, Pali Rohár wrote:

> Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating lr register
> in function save_boot_params() and caused U-Boot to crash at early boot time
> on Nokia N900 board.
> 
> This patch fix calculating return address in lr register and make Nokia N900
> board bootable again. Patch was tested in qemu and also on real N900 HW.
> 
> Reviewed-by: Simon Glass 
> Signed-off-by: Pali Rohár 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please pull u-boot-dm

2015-06-12 Thread Tom Rini
On Thu, Jun 11, 2015 at 05:34:53PM -0600, Simon Glass wrote:

> Hi Tom,
> 
> These are mostly the pre-work to enable device tree/driver model in SPL.
> They were originally sent as part of a rockchip series. I've applied these
> now since they've been sitting for a while, but unfortunately the rockchip
> work has expanded considerably and in any case is not ready to send.
> Hopefully later this month, but not for this release.
> 
> 
> The following changes since commit b2016133edec9ece02dca7881e2e0c059d2b421c:
> 
>   Merge branch 'master' of http://git.denx.de/u-boot-sunxi (2015-06-10
> 10:55:49 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-dm.git
> 
> for you to fetch changes up to 257bfd2e215ff02aacce23e14bf17b61524a723f:
> 
>   dm: usb: tegra: Drop legacy USB code (2015-06-10 19:26:55 -0600)
> 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: AM43x: Fix MAX_RAM_BANK_SIZE

2015-06-12 Thread Tom Rini
On Wed, Jun 10, 2015 at 03:54:50PM +0530, Lokesh Vutla wrote:

> On AM437x-GP Evm there is 2GB of DDR3 memory available as stated in
> AM437x GP EVM HardwareUser's guide 
> http://www.ti.com/lit/ug/spruhw7/spruhw7.pdf.
> But MAX_RAM_BANK_SIZE is defined as 1GB.
> Fixing MAX_RAM_BANK_SIZE to 2GB on AM43xx.
> 
> Reported-by: Shivasharan Nagalikar 
> Signed-off-by: Lokesh Vutla 

Reviewed-by: Tom Rini 

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] blackfin: fix undefined reference to srand and rand

2015-06-12 Thread Tom Rini
On Thu, Jun 11, 2015 at 07:16:43PM +0900, Masahiro Yamada wrote:

> Commit 9ba9e85f3f1c (net: Fix NET_RANDOM_ETHADDR dependencies)
> accidentally dropped CONFIG_LIB_RAND defines for 14 Blackfin boards.
> 
> Prior to that commit, those boards defined CONFIG_LIB_RAND, but not
> CONFIG_NET_RANDOM_ETHADDR.  So, commit 9ba9e85f3f1c should not have
> touched them, but in fact it ripped CONFIG_LIB_RAND off from all the
> header files, which caused undefined reference to srand and rand.
> CONFIG_LIB_RAND=y must be revived for such boards.
> 
> BTW, this commit indeed makes it better, but even with this fix,
> three boards (bf533-stamp, bf538f-ezkit, cm-bf548) still can not
> build due to region 'ram' overflowed error.  This was cause by
> commit 6eed3786c68c (net: Move the CMD_NET config to defconfigs)
> because CMD_NET selects NET, and NET selects REGEX.  Eventually,
> some boards were newly enabled with CONFIG_REGEX, increasing the
> memory footprint.  A patch is expected to fix the build error.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/3] spi: cadence_qspi: sram depth from DT & fix for FIFO width

2015-06-12 Thread Stefan Roese

Hi Vikas,

On 11.06.2015 21:16, Vikas MANOCHA wrote:

Any comments on the patchset.


I'll test them next week on a SoCFPGA based board and will comment then 
again.


Thanks,
Stefan

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Select CONFIG_CMD_NET and CONFIG_CMD_SETEXPR by default

2015-06-12 Thread Tom Rini
On Thu, Jun 11, 2015 at 11:12:43AM -0500, Joe Hershberger wrote:
> Hi Tom,
> 
> On Thu, Jun 11, 2015 at 10:12 AM, Tom Rini  wrote:
> > On Thu, Jun 11, 2015 at 09:14:33AM -0500, Joe Hershberger wrote:
> >> Hi Tom,
> >>
> >> On Wed, Jun 3, 2015 at 5:12 PM, Tom Rini  wrote:
> >> > On Wed, Jun 03, 2015 at 08:12:16PM +0200, Hans de Goede wrote:
> >> >
> >> >> Select CONFIG_CMD_NET and CONFIG_CMD_SETEXPR by default rather then
> >> >> needing to have this in every sunxi defconfig file.
> >> >>
> >> >> This also fixes the Merrii_A80_Optimus defconfig no longer building.
> >> >>
> >> >> Cc: Maxin B. John 
> >> >> Reported-by: Maxin B. John 
> >> >> Signed-off-by: Hans de Goede 
> >> >
> >> > Joe? Masahiro?  It feels like something has gone wrong with the
> >> > conversion here.  Or do people need to get used to the defconfig files
> >> > being a non-trivial size?  Or do we need some more default y if ...
> >> > lines around things?  Or a few of the above?  Thanks!
> >>
> >> I'm surprised you pulled this in for -rc2. I guess we can always revert it.
> >
> > OK, so where did we end up again exactly?  Ah yes, (a) we can't
> > unexpectedly break peoples build.  So I took this for now.
> 
> This isn't fixing a breakage... it simply reduced the size of the
> sunxi boards' defconfig and caused defconfig noise in every other
> board when running savedefconfig.
> 
> > (b) I'm being stubborn here and saying that if it was in
> > include/config_cmd_default.h as a #define it needs to get converted to
> > Kconfig as a "default y" (with text so that it's a question and not a
> > silently enforced option).
> 
> Agreed... but this doesn't do that either... only for sunxi.
> 
> > That doesn't preclude boards from setting it
> > to N in their defconfig and savedefconfig capturing it.  That's in fact
> > what I want.  So I'm expecting (or hunting for time to make) a patch
> > that updates CMD_NET/etc to match that behavour.
> 
> OK... I can take a stab at it if you want it for this release.

Yes please, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/8] omap-common: Common boot code OMAP3 support and SYS_BOOT-based fallback boot device

2015-06-12 Thread Pali Rohár
On Friday 12 June 2015 13:32:56 Paul Kocialkowski wrote:
> Le mercredi 10 juin 2015 à 13:35 +0200, Pali Rohár a écrit :
> > On Wednesday 10 June 2015 12:58:11 Paul Kocialkowski wrote:
> > > Le mercredi 10 juin 2015 à 12:42 +0200, Pali Rohár a écrit :
> > > > On Wednesday 10 June 2015 12:34:39 Pali Rohár wrote:
> > > > > On Wednesday 10 June 2015 11:54:00 Paul Kocialkowski wrote:
> > > > > > Le mardi 09 juin 2015 à 20:34 +0200, Pali Rohár a écrit :
> > > > > > > On Tuesday 09 June 2015 18:28:29 Pali Rohár wrote:
> > > > > > > > On Monday 08 June 2015 23:24:18 Paul Kocialkowski wrote:
> > > > > > > > > I would be very glad to see board maintainers give a go
> > > > > > > > > at the changeset before it gets merged, especially on devices 
> > > > > > > > > like
> > > > > > > > > the Nokia RX-51 (N900) where some specific adaptation was 
> > > > > > > > > needed.
> > > > > > > > 
> > > > > > > > So U-Boot is broken since 
> > > > > > > > e11c6c279d823dc0d2f470c5c2e3c0a9854a640f
> > > > > > > > (see other email thread). Until somebody fix that broken 
> > > > > > > > commit, I
> > > > > > > > cannot test your new patches in qemu or on (real) Nokia N900.
> > > > > > > 
> > > > > > > Now I tested this patch series on top of u-boot master with 
> > > > > > > applied my 
> > > > > > > patch "Nokia RX-51: Fix calculating return address in 
> > > > > > > save_boot_params".
> > > > > > >
> > > > > > > And it really as I thought broke booting U-Boot on Nokia N900 in 
> > > > > > > qemu.
> > > > > > 
> > > > > > I'm confused here -- did you try booting on the actual device or in
> > > > > > qemu?
> > > > > > 
> > > > > 
> > > > > I tested your changes only in qemu. But because you removed (or better
> > > > > masked) required lowlevel asm code, it will not work on real n900 too.
> > > > > 
> > > > > > > So this patch series is NAK from my side.
> > > > > > 
> > > > > > Thanks for testing. Of course, the point is to make another version 
> > > > > > of
> > > > > > the patch set that fits the N900 too, since we really need to 
> > > > > > integrate
> > > > > > the omap3 to the common omap boot mechanism anyways.
> > > > > > 
> > > > > 
> > > > > Make sure that asm function in rx51 lowlevel asm file is called
> > > > > immediately from start.S. It is required. Basically no modification to
> > > > > that function should be needed (maybe just fixing return address in 
> > > > > lr).
> > > 
> > > The problem is that this declaration conflicts with the one from
> > > omap-common's lowlevel_init.S. I understand that it is not needed for
> > > the RX-51 since it is not loaded by the U-Boot SPL or by the bootrom.
> > > 
> > 
> > Yes.
> > 
> > > Perhaps the best way to do things here would be to have a config option
> > > clearly stating that it should not expect the booting device information
> > > structure in r0. This situation is not specific to the RX-51 anyways.
> > 
> > Sounds good.
> 
> I just sent out v3 that fixes n900 support the way I suggested. I was
> able to get my hands on the device and along with the patch you sent out
> earlier this week, everything seems to work fine.
> 

Hello,

have you also tested that "combined" image of u-boot and linux kernel
(in uImage format) is working fine? That u-boot can boot that "attached"
kernel image without problem.

Script for generating "combined" image from u-boot.bin and uImage kernel:
https://gitorious.org/u-boot-shr/u-boot/source/maemo:debian/u-boot-gen-combined

You can boot "attached" kernel via u-boot command "run attachboot".

-- 
Pali Rohár
pali.ro...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/8] omap-common: Common boot code OMAP3 support and SYS_BOOT-based fallback boot device

2015-06-12 Thread Paul Kocialkowski
Le mercredi 10 juin 2015 à 13:35 +0200, Pali Rohár a écrit :
> On Wednesday 10 June 2015 12:58:11 Paul Kocialkowski wrote:
> > Le mercredi 10 juin 2015 à 12:42 +0200, Pali Rohár a écrit :
> > > On Wednesday 10 June 2015 12:34:39 Pali Rohár wrote:
> > > > On Wednesday 10 June 2015 11:54:00 Paul Kocialkowski wrote:
> > > > > Le mardi 09 juin 2015 à 20:34 +0200, Pali Rohár a écrit :
> > > > > > On Tuesday 09 June 2015 18:28:29 Pali Rohár wrote:
> > > > > > > On Monday 08 June 2015 23:24:18 Paul Kocialkowski wrote:
> > > > > > > > I would be very glad to see board maintainers give a go
> > > > > > > > at the changeset before it gets merged, especially on devices 
> > > > > > > > like
> > > > > > > > the Nokia RX-51 (N900) where some specific adaptation was 
> > > > > > > > needed.
> > > > > > > 
> > > > > > > So U-Boot is broken since e11c6c279d823dc0d2f470c5c2e3c0a9854a640f
> > > > > > > (see other email thread). Until somebody fix that broken commit, I
> > > > > > > cannot test your new patches in qemu or on (real) Nokia N900.
> > > > > > 
> > > > > > Now I tested this patch series on top of u-boot master with applied 
> > > > > > my 
> > > > > > patch "Nokia RX-51: Fix calculating return address in 
> > > > > > save_boot_params".
> > > > > >
> > > > > > And it really as I thought broke booting U-Boot on Nokia N900 in 
> > > > > > qemu.
> > > > > 
> > > > > I'm confused here -- did you try booting on the actual device or in
> > > > > qemu?
> > > > > 
> > > > 
> > > > I tested your changes only in qemu. But because you removed (or better
> > > > masked) required lowlevel asm code, it will not work on real n900 too.
> > > > 
> > > > > > So this patch series is NAK from my side.
> > > > > 
> > > > > Thanks for testing. Of course, the point is to make another version of
> > > > > the patch set that fits the N900 too, since we really need to 
> > > > > integrate
> > > > > the omap3 to the common omap boot mechanism anyways.
> > > > > 
> > > > 
> > > > Make sure that asm function in rx51 lowlevel asm file is called
> > > > immediately from start.S. It is required. Basically no modification to
> > > > that function should be needed (maybe just fixing return address in lr).
> > 
> > The problem is that this declaration conflicts with the one from
> > omap-common's lowlevel_init.S. I understand that it is not needed for
> > the RX-51 since it is not loaded by the U-Boot SPL or by the bootrom.
> > 
> 
> Yes.
> 
> > Perhaps the best way to do things here would be to have a config option
> > clearly stating that it should not expect the booting device information
> > structure in r0. This situation is not specific to the RX-51 anyways.
> 
> Sounds good.

I just sent out v3 that fixes n900 support the way I suggested. I was
able to get my hands on the device and along with the patch you sent out
earlier this week, everything seems to work fine.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Nokia RX-51: Fix calculating return address in save_boot_params

2015-06-12 Thread Pali Rohár
On Tuesday 09 June 2015 20:27:19 Pali Rohár wrote:
> On Tuesday 09 June 2015 20:11:22 Simon Glass wrote:
> > On 9 June 2015 at 10:05, Pali Rohár  wrote:
> > > Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating
> > > lr register in function save_boot_params() and caused U-Boot to
> > > crash at early boot time on Nokia N900 board.
> > > 
> > > This patch fix calculating return address in lr register and make
> > > Nokia N900 board bootable again. Patch was tested in qemu and also
> > > on real N900 HW.
> > > 
> > > Signed-off-by: Pali Rohár 
> > > ---
> > > 
> > >  board/nokia/rx51/lowlevel_init.S |4 
> > >  1 file changed, 4 deletions(-)
> > 
> > Reviewed-by: Simon Glass 
> 
> Tom, can you please apply this patch for 2015.07?
> 

Hello, can you apply this patch? Without it Nokia N900 code is broken!

-- 
Pali Rohár
pali.ro...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 8/8] omap5: Definitions for SYS_BOOT-based fallback boot device selection

2015-06-12 Thread Paul Kocialkowski
This introduces code to read the value of the SYS_BOOT pins on the OMAP5, as
well as the memory-preferred scheme for the interpretation of each value.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/cpu/armv7/omap5/Makefile |  1 +
 arch/arm/cpu/armv7/omap5/boot.c   | 45 +++
 2 files changed, 46 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/omap5/boot.c

diff --git a/arch/arm/cpu/armv7/omap5/Makefile 
b/arch/arm/cpu/armv7/omap5/Makefile
index 64c6879..6b8c683 100644
--- a/arch/arm/cpu/armv7/omap5/Makefile
+++ b/arch/arm/cpu/armv7/omap5/Makefile
@@ -5,6 +5,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
+obj-y  += boot.o
 obj-y  += hwinit.o
 obj-y  += emif.o
 obj-y  += sdram.o
diff --git a/arch/arm/cpu/armv7/omap5/boot.c b/arch/arm/cpu/armv7/omap5/boot.c
new file mode 100644
index 000..eb7fee2
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap5/boot.c
@@ -0,0 +1,45 @@
+/*
+ * OMAP5 boot
+ *
+ * Copyright (C) 2015 Paul Kocialkowski 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+static u32 boot_devices[] = {
+   /* AM57XX */
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_SATA,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_SPI,
+   BOOT_DEVICE_SPI,
+   /* OMAP5 */
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_SATA,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_XIPWAIT,
+};
+
+u32 omap_sys_boot_device(void)
+{
+   u32 sys_boot;
+
+   /* Grab the first 4 bits of the status register for SYS_BOOT. */
+   sys_boot = readl((u32 *) (*ctrl)->control_status) & ((1 << 4) - 1);
+
+   if (sys_boot >= (sizeof(boot_devices) / sizeof(u32)))
+   return BOOT_DEVICE_NONE;
+
+   return boot_devices[sys_boot];
+}
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 7/8] omap4: Definitions for SYS_BOOT-based fallback boot device selection

2015-06-12 Thread Paul Kocialkowski
This introduces code to read the value of the SYS_BOOT pins on the OMAP4, as
well as the memory-preferred scheme for the interpretation of each value.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/cpu/armv7/omap4/Makefile|  1 +
 arch/arm/cpu/armv7/omap4/boot.c  | 60 
 arch/arm/cpu/armv7/omap4/prcm-regs.c |  1 +
 3 files changed, 62 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/omap4/boot.c

diff --git a/arch/arm/cpu/armv7/omap4/Makefile 
b/arch/arm/cpu/armv7/omap4/Makefile
index 76a032a..564f1f6 100644
--- a/arch/arm/cpu/armv7/omap4/Makefile
+++ b/arch/arm/cpu/armv7/omap4/Makefile
@@ -5,6 +5,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
+obj-y  += boot.o
 obj-y  += sdram_elpida.o
 obj-y  += hwinit.o
 obj-y  += emif.o
diff --git a/arch/arm/cpu/armv7/omap4/boot.c b/arch/arm/cpu/armv7/omap4/boot.c
new file mode 100644
index 000..4b5aa77
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap4/boot.c
@@ -0,0 +1,60 @@
+/*
+ * OMAP4 boot
+ *
+ * Copyright (C) 2015 Paul Kocialkowski 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+static u32 boot_devices[] = {
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_MMC2_2,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_MMC2_2,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_MMC2_2,
+   BOOT_DEVICE_MMC2_2,
+   BOOT_DEVICE_NONE,
+   BOOT_DEVICE_XIPWAIT,
+};
+
+u32 omap_sys_boot_device(void)
+{
+   u32 sys_boot;
+
+   /* Grab the first 5 bits of the status register for SYS_BOOT. */
+   sys_boot = readl((u32 *) (*ctrl)->control_status) & ((1 << 5) - 1);
+
+   if (sys_boot >= (sizeof(boot_devices) / sizeof(u32)))
+   return BOOT_DEVICE_NONE;
+
+   return boot_devices[sys_boot];
+}
diff --git a/arch/arm/cpu/armv7/omap4/prcm-regs.c 
b/arch/arm/cpu/armv7/omap4/prcm-regs.c
index 1ed146b..8698ec7 100644
--- a/arch/arm/cpu/armv7/omap4/prcm-regs.c
+++ b/arch/arm/cpu/armv7/omap4/prcm-regs.c
@@ -279,6 +279,7 @@ struct prcm_regs const omap4_prcm = {
 };
 
 struct omap_sys_ctrl_regs const omap4_ctrl = {
+   .control_status = 0x4A0022C4,
.control_id_code= 0x4A002204,
.control_std_fuse_opp_bgap  = 0x4a002260,
.control_status = 0x4a0022c4,
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 6/8] omap3: Definitions for SYS_BOOT-based fallback boot device selection

2015-06-12 Thread Paul Kocialkowski
This introduces code to read the value of the SYS_BOOT pins on the OMAP3, as
well as the memory-preferred scheme for the interpretation of each value.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/cpu/armv7/omap3/Makefile |  1 +
 arch/arm/cpu/armv7/omap3/boot.c   | 58 +++
 2 files changed, 59 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/omap3/boot.c

diff --git a/arch/arm/cpu/armv7/omap3/Makefile 
b/arch/arm/cpu/armv7/omap3/Makefile
index cf86046..b2fce96 100644
--- a/arch/arm/cpu/armv7/omap3/Makefile
+++ b/arch/arm/cpu/armv7/omap3/Makefile
@@ -8,6 +8,7 @@
 obj-y  := lowlevel_init.o
 
 obj-y  += board.o
+obj-y  += boot.o
 obj-y  += clock.o
 obj-y  += sys_info.o
 ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/cpu/armv7/omap3/boot.c b/arch/arm/cpu/armv7/omap3/boot.c
new file mode 100644
index 000..66576b2
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap3/boot.c
@@ -0,0 +1,58 @@
+/*
+ * OMAP3 boot
+ *
+ * Copyright (C) 2015 Paul Kocialkowski 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+static u32 boot_devices[] = {
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_ONENAND,
+   BOOT_DEVICE_MMC2,
+   BOOT_DEVICE_MMC1,
+   BOOT_DEVICE_XIP,
+   BOOT_DEVICE_XIPWAIT,
+   BOOT_DEVICE_NAND,
+   BOOT_DEVICE_MMC2_2,
+};
+
+u32 omap_sys_boot_device(void)
+{
+   struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+   u32 sys_boot;
+
+   /* Grab the first 5 bits of the status register for SYS_BOOT. */
+   sys_boot = readl(&ctrl_base->status) & ((1 << 5) - 1);
+
+   if (sys_boot >= (sizeof(boot_devices) / sizeof(u32)))
+   return BOOT_DEVICE_NONE;
+
+   return boot_devices[sys_boot];
+}
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 5/8] omap-common: SYS_BOOT-based fallback boot device selection for peripheral boot

2015-06-12 Thread Paul Kocialkowski
OMAP devices might boot from peripheral devices, such as UART or USB.
When that happens, the U-Boot SPL tries to boot the next stage (complete U-Boot)
from that peripheral device, but in most cases, this is not a valid boot device.

This introduces a fallback option that reads the SYS_BOOT pins, that are used by
the bootrom to determine which device to boot from. It is intended for the
SYS_BOOT value to be interpreted in the memory-preferred scheme, so that the
U-Boot SPL can load the next stage from a valid location.

Practically, this options allows loading the U-Boot SPL through USB and have it
load the next stage according to the memory device selected by SYS_BOOT instead
of stalling.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/cpu/armv7/omap-common/boot-common.c | 51 
 arch/arm/include/asm/omap_common.h   |  4 +++
 2 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c 
b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 38fa640..7950b6a 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -21,6 +21,11 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+__weak u32 omap_sys_boot_device(void)
+{
+   return BOOT_DEVICE_NONE;
+}
+
 void save_omap_boot_params(void)
 {
u32 boot_params = *((u32 *)OMAP_SRAM_SCRATCH_BOOT_PARAMS);
@@ -34,9 +39,10 @@ void save_omap_boot_params(void)
 
omap_boot_params = (struct omap_boot_parameters *)boot_params;
 
-   /* Boot device */
-
boot_device = omap_boot_params->boot_device;
+   boot_mode = MMCSD_MODE_UNDEFINED;
+
+   /* Boot device */
 
 #ifdef BOOT_DEVICE_NAND_I2C
/*
@@ -58,16 +64,38 @@ void save_omap_boot_params(void)
if (boot_device == BOOT_DEVICE_QSPI_4)
boot_device = BOOT_DEVICE_SPI;
 #endif
+#if (defined(BOOT_DEVICE_UART) && !defined(CONFIG_SPL_YMODEM_SUPPORT)) || \
+(defined(BOOT_DEVICE_USB) && !defined(CONFIG_SPL_USB_SUPPORT))
+   /*
+* When booting from peripheral booting, the boot device is not usable
+* as-is (unless there is support for it), so the boot device is instead
+* figured out using the SYS_BOOT pins.
+*/
+   switch (boot_device) {
+#ifdef BOOT_DEVICE_UART
+   case BOOT_DEVICE_UART:
+#endif
+#ifdef BOOT_DEVICE_USB
+   case BOOT_DEVICE_USB:
+#endif
+   boot_device = omap_sys_boot_device();
+
+   /* MMC raw mode will fallback to FS mode. */
+   if ((boot_device >= MMC_BOOT_DEVICES_START) &&
+   (boot_device <= MMC_BOOT_DEVICES_END))
+   boot_mode = MMCSD_MODE_RAW;
+
+   break;
+   }
+#endif
 
gd->arch.omap_boot_device = boot_device;
 
/* Boot mode */
 
-   boot_mode = MMCSD_MODE_UNDEFINED;
-
+#ifdef CONFIG_OMAP34XX
if ((boot_device >= MMC_BOOT_DEVICES_START) &&
(boot_device <= MMC_BOOT_DEVICES_END)) {
-#ifdef CONFIG_OMAP34XX
switch (boot_device) {
case BOOT_DEVICE_MMC1:
boot_mode = MMCSD_MODE_FS;
@@ -76,7 +104,16 @@ void save_omap_boot_params(void)
boot_mode = MMCSD_MODE_RAW;
break;
}
+   }
 #else
+   /*
+* If the boot device was dynamically changed and doesn't match what
+* the bootrom initially booted, we cannot use the boot device
+* descriptor to figure out te boot mode.
+*/
+   if ((boot_device == omap_boot_params->boot_device) &&
+   (boot_device >= MMC_BOOT_DEVICES_START) &&
+   (boot_device <= MMC_BOOT_DEVICES_END)) {
boot_params = omap_boot_params->boot_device_descriptor;
if ((boot_params < NON_SECURE_SRAM_START) ||
(boot_params > NON_SECURE_SRAM_END))
@@ -92,12 +129,12 @@ void save_omap_boot_params(void)
if (boot_mode != MMCSD_MODE_FS &&
boot_mode != MMCSD_MODE_RAW)
 #ifdef CONFIG_SUPPORT_EMMC_BOOT
-   boot_mode = MMCSD_MODE_EMMCBOOT
+   boot_mode = MMCSD_MODE_EMMCBOOT;
 #else
boot_mode = MMCSD_MODE_UNDEFINED;
 #endif
-#endif
}
+#endif
 
gd->arch.omap_boot_mode = boot_mode;
 
diff --git a/arch/arm/include/asm/omap_common.h 
b/arch/arm/include/asm/omap_common.h
index e8c502c..7733311 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -682,4 +682,8 @@ static inline u8 is_dra7xx(void)
 #define CH_FLAGS_CHFLASH   (1 << 2)
 #define CH_FLAGS_CHMMCSD   (1 << 3)
 
+#ifndef __ASSEMBLY__
+u32 omap_sys_boot_device(void);
+#endif
+
 #endif /* _OMAP_COMMON_H_ */
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 1/8] omap-common: Common boot code OMAP3 support and cleanup

2015-06-12 Thread Paul Kocialkowski
This introduces OMAP3 support for the common omap boot code, as well as a
major cleanup of the common omap boot code.

First, the omap_boot_parameters structure becomes platform-specific, since its
definition differs a bit across omap platforms. The offsets are removed as well
since it is U-Boot's coding style to use structures for mapping such kind of
data (in the sense that it is similar to registers). It is correct to assume
that romcode structure encoding is the same as U-Boot, given the description
of these structures in the TRMs.

The original address provided by the bootrom is passed to the U-Boot binary
instead of a duplicate of the structure stored in global data. This allows to
have only the relevant (boot device and mode) information stored in global data.
It is also expected that the address where the bootrom stores that information
is not overridden by the U-Boot SPL or U-Boot.

The save_omap_boot_params is expected to handle all special cases where the data
provided by the bootrom cannot be used as-is, so that spl_boot_device and
spl_boot_mode only return the data from global data.

All of this is only relevant when the U-Boot SPL is used. In cases it is not,
save_boot_params should fallback to its weak (or board-specific) definition.
save_omap_boot_params should not be called in that context either.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/cpu/armv7/omap-common/Makefile|   2 -
 arch/arm/cpu/armv7/omap-common/boot-common.c   | 124 ++---
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |   2 +
 arch/arm/cpu/armv7/omap-common/lowlevel_init.S |   3 +-
 arch/arm/cpu/armv7/omap3/board.c   |  59 
 arch/arm/cpu/armv7/omap3/lowlevel_init.S   |  10 --
 arch/arm/include/asm/arch-am33xx/omap.h|  11 +++
 arch/arm/include/asm/arch-am33xx/sys_proto.h   |   1 -
 arch/arm/include/asm/arch-omap3/omap.h |  13 +++
 arch/arm/include/asm/arch-omap3/sys_proto.h|   2 +
 arch/arm/include/asm/arch-omap4/omap.h |  11 +++
 arch/arm/include/asm/arch-omap5/omap.h |  12 +++
 arch/arm/include/asm/global_data.h |  10 +-
 arch/arm/include/asm/omap_boot.h   |  34 ---
 arch/arm/include/asm/omap_common.h |   9 ++
 arch/arm/include/asm/ti-common/sys_proto.h |   2 +-
 board/compulab/cm_t54/cm_t54.c |   2 +-
 include/configs/ti_omap4_common.h  |   1 +
 18 files changed, 141 insertions(+), 167 deletions(-)
 delete mode 100644 arch/arm/include/asm/omap_boot.h

diff --git a/arch/arm/cpu/armv7/omap-common/Makefile 
b/arch/arm/cpu/armv7/omap-common/Makefile
index f3725b2..464a5d1 100644
--- a/arch/arm/cpu/armv7/omap-common/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/Makefile
@@ -26,9 +26,7 @@ ifeq ($(CONFIG_SYS_DCACHE_OFF),)
 obj-y  += omap-cache.o
 endif
 
-ifeq ($(CONFIG_OMAP34XX),)
 obj-y  += boot-common.o
-endif
 obj-y  += lowlevel_init.o
 
 obj-y  += mem-common.o
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c 
b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 7fc0a56..d7e2e59 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -17,27 +17,28 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
 void save_omap_boot_params(void)
 {
-   u32 rom_params = *((u32 *)OMAP_SRAM_SCRATCH_BOOT_PARAMS);
-   u8 boot_device;
-   u32 dev_desc, dev_data;
+   u32 boot_params = *((u32 *)OMAP_SRAM_SCRATCH_BOOT_PARAMS);
+   struct omap_boot_parameters *omap_boot_params;
+   u32 boot_device;
+   u32 boot_mode;
 
-   if ((rom_params <  NON_SECURE_SRAM_START) ||
-   (rom_params > NON_SECURE_SRAM_END))
+   if ((boot_params < NON_SECURE_SRAM_START) ||
+   (boot_params > NON_SECURE_SRAM_END))
return;
 
-   /*
-* rom_params can be type casted to omap_boot_parameters and
-* used. But it not correct to assume that romcode structure
-* encoding would be same as u-boot. So use the defined offsets.
-*/
-   boot_device = *((u8 *)(rom_params + BOOT_DEVICE_OFFSET));
+   omap_boot_params = (struct omap_boot_parameters *)boot_params;
+
+   /* Boot device */
 
-#if defined(BOOT_DEVICE_NAND_I2C)
+   boot_device = omap_boot_params->boot_device;
+
+#ifdef BOOT_DEVICE_NAND_I2C
/*
 * Re-map NAND&I2C boot-device to the "normal" NAND boot-device.
 * Otherwise the SPL boot IF can't handle this device correctly.
@@ -47,29 +48,6 @@ void save_omap_boot_params(void)
if (boot_device == BOOT_DEVICE_NAND_I2C)
boot_device = BOOT_DEVICE_NAND;
 #endif
-   gd->arch.omap_boot_params.omap_bootdevice = boot_device;
-
-   gd->arch.omap_boot_params.ch_flags =
-   *((u8 *)(rom_params + CH_FLAGS_OFFSET));
-
-   if ((boot_device >= MMC_BOOT_DEVICES_START) &&
-   (boot_device <= MMC_BOOT_DEVICES_END)) {
-#if !defined(CO

[U-Boot] [PATCH v3 4/8] siemens-am33x-common: Hardcoded value instead of non-included define

2015-06-12 Thread Paul Kocialkowski
The config file for the siemens-am33x-common was using OMAP_I2C_STANDARD, which
is defined in a header that is not included in the config header. In most cases,
it was being included by the code using CONFIG_SYS_OMAP24_I2C_SPEED, but it
might not always be the case.

In particular, when introducing I2C SPL support in omap-common's boot-common.c,
the header is missing and including it breaks other devices.

Signed-off-by: Paul Kocialkowski 
---
 include/configs/siemens-am33x-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/siemens-am33x-common.h 
b/include/configs/siemens-am33x-common.h
index a086d60..e60b5c2 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -134,7 +134,7 @@
 #define CONFIG_I2C
 #define CONFIG_CMD_I2C
 #define CONFIG_SYS_I2C
-#define CONFIG_SYS_OMAP24_I2C_SPEEDOMAP_I2C_STANDARD
+#define CONFIG_SYS_OMAP24_I2C_SPEED10
 #define CONFIG_SYS_OMAP24_I2C_SLAVE1
 #define CONFIG_SYS_I2C_OMAP24XX
 
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/8] omap: SPL boot devices cleanup and completion

2015-06-12 Thread Paul Kocialkowski
This cleans up the SPL boot devices for omap platforms and introduces support
for missing boot devices.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/include/asm/arch-am33xx/spl.h | 94 +++---
 arch/arm/include/asm/arch-omap3/spl.h  | 18 ---
 arch/arm/include/asm/arch-omap4/spl.h  | 20 
 arch/arm/include/asm/arch-omap5/spl.h  | 23 +
 4 files changed, 88 insertions(+), 67 deletions(-)

diff --git a/arch/arm/include/asm/arch-am33xx/spl.h 
b/arch/arm/include/asm/arch-am33xx/spl.h
index e756418..4ed8597 100644
--- a/arch/arm/include/asm/arch-am33xx/spl.h
+++ b/arch/arm/include/asm/arch-am33xx/spl.h
@@ -7,51 +7,65 @@
 #ifndef_ASM_ARCH_SPL_H_
 #define_ASM_ARCH_SPL_H_
 
-#if defined(CONFIG_TI816X)
-#define BOOT_DEVICE_XIP2
-#define BOOT_DEVICE_NAND   3
-#define BOOT_DEVICE_MMC1   6
-#define BOOT_DEVICE_MMC2   5
+#define BOOT_DEVICE_NONE   0x00
+#define BOOT_DEVICE_MMC2_2 0xFF
+
+#if defined(CONFIG_TI814X)
+#define BOOT_DEVICE_XIP0x01
+#define BOOT_DEVICE_XIPWAIT0x02
+#define BOOT_DEVICE_NAND   0x05
+#define BOOT_DEVICE_NAND_I2C   0x06
+#define BOOT_DEVICE_MMC2   0x08 /* ROM only supports 2nd instance. */
+#define BOOT_DEVICE_MMC1   0x09
+#define BOOT_DEVICE_SPI0x15
+#define BOOT_DEVICE_UART   0x41
+#define BOOT_DEVICE_USBETH 0x44
+#define BOOT_DEVICE_CPGMAC 0x46
+
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC2
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC1
+#elif defined(CONFIG_TI816X)
+#define BOOT_DEVICE_XIP0x01
+#define BOOT_DEVICE_XIPWAIT0x02
+#define BOOT_DEVICE_NAND   0x03
+#define BOOT_DEVICE_ONENAD 0x04
+#define BOOT_DEVICE_MMC2   0x05 /* ROM only supports 2nd instance. */
+#define BOOT_DEVICE_MMC1   0x06
 #define BOOT_DEVICE_UART   0x43
-#elif defined(CONFIG_AM43XX)
-#define BOOT_DEVICE_NOR1
-#define BOOT_DEVICE_NAND   5
-#define BOOT_DEVICE_MMC1   7
-#define BOOT_DEVICE_MMC2   8
-#define BOOT_DEVICE_SPI10
-#define BOOT_DEVICE_USB 13
-#define BOOT_DEVICE_UART   65
-#define BOOT_DEVICE_CPGMAC 71
-#else
-#define BOOT_DEVICE_XIP2
-#define BOOT_DEVICE_NAND   5
-#define BOOT_DEVICE_NAND_I2C   6
-#if defined(CONFIG_AM33XX)
-#define BOOT_DEVICE_MMC1   8
-#define BOOT_DEVICE_MMC2   9   /* eMMC or daughter card */
-#elif defined(CONFIG_TI814X)
-#define BOOT_DEVICE_MMC1   9
-#define BOOT_DEVICE_MMC2   8   /* ROM only supports 2nd instance */
-#endif
-#define BOOT_DEVICE_SPI11
-#define BOOT_DEVICE_UART   65
-#define BOOT_DEVICE_USBETH 68
-#define BOOT_DEVICE_CPGMAC 70
-#endif
-#define BOOT_DEVICE_MMC2_2  0xFF
+#define BOOT_DEVICE_USB0x45
 
-#if defined(CONFIG_AM33XX)
-#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
-#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC2
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC1
+#elif defined(CONFIG_AM33XX)
+#define BOOT_DEVICE_XIP0x01
+#define BOOT_DEVICE_XIPWAIT0x02
+#define BOOT_DEVICE_NAND   0x05
+#define BOOT_DEVICE_NAND_I2C   0x06
+#define BOOT_DEVICE_MMC1   0x08
+#define BOOT_DEVICE_MMC2   0x09
+#define BOOT_DEVICE_SPI0x15
+#define BOOT_DEVICE_UART   0x41
+#define BOOT_DEVICE_USBETH 0x44
+#define BOOT_DEVICE_CPGMAC 0x46
+
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
 #elif defined(CONFIG_AM43XX)
-#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#define BOOT_DEVICE_NOR0x01
+#define BOOT_DEVICE_NAND   0x05
+#define BOOT_DEVICE_MMC1   0x07
+#define BOOT_DEVICE_MMC2   0x08
+#define BOOT_DEVICE_SPI0x0A
+#define BOOT_DEVICE_UART   0x41
+#define BOOT_DEVICE_USB0x45
+#define BOOT_DEVICE_CPGMAC 0x47
+
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
 #ifdef CONFIG_SPL_USB_SUPPORT
-#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_USB
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_USB
 #else
-#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
 #endif
-#elif defined(CONFIG_TI81XX)
-#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC2
-#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC1
 #endif
+
 #endif
diff --git a/arch/arm/include/asm/arch-omap3/spl.h 
b/arch/arm/include/asm/arch-omap3/spl.h
index 8350532..a31b4ea 100644
--- a/arch/arm/include/asm/arch-omap3/spl.h
+++ b/arch/arm/include/asm/arch-omap3/spl.h
@@ -7,14 +7,16 @@
 #ifndef_ASM_ARCH_SPL_H_
 #define_ASM_ARCH_SPL_H_
 
-#define BOOT_DEVICE_NONE   0
-#define BOOT_DEVICE_XIP1
-#define BOOT_DEVICE_NAND   2
-#define BOOT_DEVICE_ONENAND3
-#define BOOT_DEVICE_MMC2   5 /*emmc*/
-#define BOOT_DEVICE_MMC1   6
-#define BOOT_DEVICE_XIPWAIT7
-#define BOOT_DEVICE_MMC2_2  0xFF
+#define BOOT

[U-Boot] [PATCH v3 3/8] omap-common: Boot device define instead of hardcoded value

2015-06-12 Thread Paul Kocialkowski
Now that SPL boot devices are clearly defined, we can use BOOT_DEVICE_QSPI_4
instead of a hardcoded value.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/cpu/armv7/omap-common/boot-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c 
b/arch/arm/cpu/armv7/omap-common/boot-common.c
index d7e2e59..38fa640 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -48,14 +48,14 @@ void save_omap_boot_params(void)
if (boot_device == BOOT_DEVICE_NAND_I2C)
boot_device = BOOT_DEVICE_NAND;
 #endif
-#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
+#ifdef BOOT_DEVICE_QSPI_4
/*
 * We get different values for QSPI_1 and QSPI_4 being used, but
 * don't actually care about this difference.  Rather than
 * mangle the later code, if we're coming in as QSPI_4 just
 * change to the QSPI_1 value.
 */
-   if (boot_device == 11)
+   if (boot_device == BOOT_DEVICE_QSPI_4)
boot_device = BOOT_DEVICE_SPI;
 #endif
 
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 0/8] omap-common: Common boot code OMAP3 support and SYS_BOOT-based fallback boot device

2015-06-12 Thread Paul Kocialkowski
Changes since v2:
* ifdef save_boot_params definition and save_omap_boot_params calls with
  CONFIG_SPL to only use all this when U-Boot is loaded from the U-Boot SPL.
  This was always the case on != omap3 omap platforms, but is no longer the
  case with omap3 support (since some devices like the RX-51 are OMAP HS and
  have proprietary bootloaders loading U-Boot, and might even need some specific
  code instead).

The first part of this changeset introduces OMAP3 support for the common omap
boot code, as well as a major cleanup of the common omap boot code.

First, the omap_boot_parameters structure becomes platform-specific, since its
definition differs a bit across omap platforms. The offsets are removed as well
since it is U-Boot's coding style to use structures for mapping such kind of
data (in the sense that it is similar to registers). It is correct to assume
that romcode structure encoding is the same as U-Boot, given the description
of these structures in the TRMs.

The original address provided by the bootrom is passed to the U-Boot binary
instead of a duplicate of the structure stored in global data. This allows to
have only the relevant (boot device and mode) information stored in global data.
It is also expected that the address where the bootrom stores that information
is not overridden by the U-Boot SPL or U-Boot.

The save_omap_boot_params is expected to handle all special cases where the data
provided by the bootrom cannot be used as-is, so that spl_boot_device and
spl_boot_mode only return the data from global data.

The second part of this changeset adds support for reading the SYS_BOOT pins on
omap devices (no am33xx support yet) in order to fallback to the
memory-preferred boot device described by the pins when peripheral booting is
used. In particular, this allows loading the U-Boot SPL through either UART or
USB and still having it to load U-Boot from memory when UART or USB are not
valid boot devices.

This whole changeset was build-tested on all omap boards (omap3, omap4, omap5,
am33xx) and tested at run-time on a single omap3 device only. I would be very
glad to see board maintainers give a go at the changeset before it gets merged,
especially on devices like the Nokia RX-51 (N900) where some specific adaptation
was needed.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming

2015-06-12 Thread Paul Kocialkowski
Le lundi 18 mai 2015 à 15:01 +0200, Lukasz Majewski a écrit :
> Hi Paul,
> 
> > This introduces a coherent scheme for naming USB download gadget and
> > functions config options. The download USB gadget config option is
> > moved to CONFIG_USB_GADGET_DOWNLOAD for better consistency with other
> > gadgets and each function's config option is moved to a
> > CONFIG_USB_FUNCTION_ prefix.
> > 
> > Signed-off-by: Paul Kocialkowski 
> > ---

[snip]

> Acked-by: Lukasz Majewski 
> 
> I will test this patch on my devices and then pull it to u-boot-dfu
> tree.

Is there anything holding back this patch set at this point?

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] dtoverlay for mx6 ARM

2015-06-12 Thread Michal Suchanek
Hello,

On 12 June 2015 at 00:14, Johann Obermayr  wrote:
> Am 11.06.2015 um 22:13 schrieb Jakub Kiciński:
>>
>> On Thu, 11 Jun 2015 21:49:57 +0200, Johann Obermayr wrote:
>>>
>>> Hello,
>>
>> Hi there,
>>
>>>
>>> for raspberyy pi there are some "features" available.
>>> dtoverlay, dtparam, ...
>>> we have a Freescale mx6 CPU.
>>> How we can add/enable this features ?
>>
>> I'm new to U-Boot but on RPi the "features" are provided by their
>> proprietary firmware/bootloader.   AFAIK U-Boot doesn't support DT
>> overlays.
>>
>> Kuba
>>
> Thank you for this information.
>
> Is there a way to change a loaded devicetree configuration ?
>
> Because we have many boards with small differents. but less memory on disk.
> at this time one DTB file need ~150kb. we have 1MB free, but we have > 20
> different boards and
> every month 1 or 2 new boards.

This depends on the changes you want.

If the change is in a part of the DT which you do not need to boot you
can just leave that part out and build overlay bits which you load at
runtime in your init scripts (needs kernel and dtc patches).

If the changes are required to boot there is some support in u-boot to
modify DTs but I am not sure how much functionality is desirable and
already implemented. Currently simplefb depends on u-boot modifying
pre-made DT nodes.

Thanks

Michal
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] dtoverlay for mx6 ARM

2015-06-12 Thread Jakub Kiciński
On Fri, 12 Jun 2015 00:14:17 +0200, Johann Obermayr wrote:
> Am 11.06.2015 um 22:13 schrieb Jakub Kiciński:
> > On Thu, 11 Jun 2015 21:49:57 +0200, Johann Obermayr wrote:
> >> Hello,
> > Hi there,
> >   
> >> for raspberyy pi there are some "features" available.
> >> dtoverlay, dtparam, ...
> >> we have a Freescale mx6 CPU.
> >> How we can add/enable this features ?
> > I'm new to U-Boot but on RPi the "features" are provided by their
> > proprietary firmware/bootloader.   AFAIK U-Boot doesn't support DT
> > overlays.
> Thank you for this information.
> 
> Is there a way to change a loaded devicetree configuration ?
> 
> Because we have many boards with small differents. but less memory on disk.
> at this time one DTB file need ~150kb. we have 1MB free, but we have > 
> 20 different boards and
> every month 1 or 2 new boards.

Ugh, nothing comes to my mind, but as I said, I'm a newbie.  Maybe
someone else can chime in.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Select CONFIG_CMD_NET and CONFIG_CMD_SETEXPR by default

2015-06-12 Thread Hans de Goede

Hi,

On 11-06-15 18:12, Joe Hershberger wrote:

Hi Tom,

On Thu, Jun 11, 2015 at 10:12 AM, Tom Rini  wrote:

On Thu, Jun 11, 2015 at 09:14:33AM -0500, Joe Hershberger wrote:

Hi Tom,

On Wed, Jun 3, 2015 at 5:12 PM, Tom Rini  wrote:

On Wed, Jun 03, 2015 at 08:12:16PM +0200, Hans de Goede wrote:


Select CONFIG_CMD_NET and CONFIG_CMD_SETEXPR by default rather then
needing to have this in every sunxi defconfig file.

This also fixes the Merrii_A80_Optimus defconfig no longer building.

Cc: Maxin B. John 
Reported-by: Maxin B. John 
Signed-off-by: Hans de Goede 


Joe? Masahiro?  It feels like something has gone wrong with the
conversion here.  Or do people need to get used to the defconfig files
being a non-trivial size?  Or do we need some more default y if ...
lines around things?  Or a few of the above?  Thanks!


I'm surprised you pulled this in for -rc2. I guess we can always revert it.


OK, so where did we end up again exactly?  Ah yes, (a) we can't
unexpectedly break peoples build.  So I took this for now.


This isn't fixing a breakage...


It does fix breakage as stated i the commit message the Merrii_A80_Optimus
target was broken by your patch, likely because your patch was generated
against a tree which did not have that one yet.


it simply reduced the size of the sunxi boards' defconfig


That is because I choose a solution were I do not need to fix this over
and over again and one were something which comes pretty close to
pure noise was poluting all the sunxi defconfigs.

> and caused defconfig noise in every other

board when running savedefconfig.


I did not realize that, sorry about that.

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mmc_write.c: Make mmc_berase do 32bit safe 64bit math

2015-06-12 Thread Bernhard Nortmann
Tom Rini  konsulko.com> writes:
> 
> We want to see if the requested start or total block count are
> unaligned.  We discard the whole numbers and only care about the
> remainder.  Update the code to use div_u64_rem here and add a comment.
> 
> ---
>  drivers/mmc/mmc_write.c |   12 +++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
> index 3db9669..7aea7e9 100644

Hi Tom!

I can confirm that this patch solves the CONFIG_SYS_64BIT_LBA compilation
issue with armhf for me (gcc 4.8.3 armv7a-hardfloat-linux-gnueabi, on a
Banana Pi = sun7i/A20).

So I'll add a
Tested-by: Bernhard Nortmann 

BTW: There's a small typo you also might want to fix: "The erase range would
be change to " -> "The erase range would be changed to "

Regards, B. Nortmann

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MinnowBoard Max uboot

2015-06-12 Thread Bin Meng
Hi Tom,

On Thu, Jun 11, 2015 at 11:02 PM, Beaman, Thomas
 wrote:
> Hi Simon,
>
> I have enclosed both kernel boot files
>
> Thanks,
> Tom
>

Please stop top-posting.

> -Original Message-
> From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
> Sent: Wednesday, June 10, 2015 9:15 PM
> To: Beaman, Thomas
> Cc: u-boot@lists.denx.de
> Subject: Re: MinnowBoard Max uboot
>
> Hi Thomas,
>
> On 10 June 2015 at 12:38, Beaman, Thomas  wrote:
>> Hi Simon,
>>
>> I have just picked up u-boot-2015.07-rc2 with your support for multiple CPUs 
>> on the minnowboard max. I can see using the uboot cpu list command that both 
>> CPUs now show up.  But the kernel does not see 2 CPUs in /proc/cpuinfo. If I 
>> boot the same kernel using an EFI BIOS I do see 2 CPUs in /proc/cpuinfo. Is 
>> there some uboot to kernel hand off I do not have configured properly ? I am 
>> not sure how the number of CPUs gets transferred from the boot to the kernel.
>>
>> Thanks for any input you may have.
>> Tom
>>
>> => cpu list
>>   0: cpu@0  Intel(R) Atom(TM) CPU  E3825  @ 1.33GHz
>>   1: cpu@1  Intel(R) Atom(TM) CPU  E3825  @ 1.33GHz
>>
>> ## minnow max when booted from uboot 2015-07.rc2 root@atom_230:~# cat
>> /proc/cpuinfo | grep processor
>> processor   : 0
>>
>> ## minnow max when booted from BIOS
>> root@atom_230:~# cat /proc/cpuinfo | grep processor
>> processor   : 0
>> processor   : 1
>
> Do you have the output from the kernel boot please?
>
> Regards,
> Simon
>
>>
>>
>>
>> -Original Message-
>> From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
>> Sent: Tuesday, March 10, 2015 1:21 PM
>> To: Beaman, Thomas
>> Cc: u-boot@lists.denx.de; Bin Meng; gabriel huau
>> Subject: Re: MinnowBoard Max uboot
>>
>> Hi Tom,
>>
>> On 10 March 2015 at 05:24, Beaman, Thomas  wrote:
>>> Hi Simon,
>>>
>>> Do you know what will be the timeframe of when someone may be able to
>>> look at this in more detail. I will be able to help test any updates
>>> if needed
>>>
>>
>> I will take a look once I have things lined up for the next release, likely 
>> mid April.
>>
>> Regards,
>> Simon
>>
>>> Thanks,
>>> Tom
>>>
>>> -Original Message-
>>> From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
>>> Sent: Monday, March 09, 2015 11:49 AM
>>> To: Beaman, Thomas
>>> Cc: u-boot@lists.denx.de; Bin Meng; gabriel huau
>>> Subject: Re: MinnowBoard Max uboot
>>>
>>> +Bin and Gabriel
>>>
>>> Hi Tom,
>>>
>>> On 9 March 2015 at 08:08, Beaman, Thomas  wrote:


 Hi Simon,



 I see you have put support for the MinnowBoard Max in the u-boot mainline.
 Thanks this is a very useful addition.  I have been able to follow
 your readme and build a working bare metal uboot. Using the built
 uboot I can load and bring up a Linux Kernel.



 What I noticed from the running kernel is that only one of the two
 cores on the E3825 is running. In the power PC uboots I usually see
 a section for the multiple cores in the .dts file. My questions is
 how do I get both CPUs running on this board. Is it a uboot .dts
 file setup that will enable this, or is something in the kernel start up 
 that does this.



 As a test I boot the same kernel using the EFI BIOS on the minnow
 board and both CPUs are running.



 Any suggestions or comments you have would be welcomed.


>>>
>>> My guess is that the LAPIC CPU start-up is missing. It isn't 100% clear 
>>> what the FSP does and does not do, but perhaps it does not do that.
>>>
>>> I did make something of a start on this with ivybridge but it isn't 
>>> complete, and it seems to be needed here.
>>>
>>> Regards,
>>> Simon
>

I've checked your kernel log, and it turns out that you did not turn
on CONFIG_SFI in your kernel build. Please make sure CONFIG_SFI=y to
build the kernel and have a try.

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot