Commit graph

3807 commits

Author SHA1 Message Date
Gokul Sriram Palanisamy
8a3c619b47 ARM: env_nand: Updated env to use complete partition
nand env size was restricted to 256KB out of
the available 512KB to keep it compatible with
kernel. When a badblock is introduced,
env fails to save due to the restricted range.

With this patch, it can now use upto the end
of partition upon skipping any badblocks
but only saving 256KB.

Change-Id: I27f6932fe537fa4c63d890bfe583c48e45fe156b
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2017-09-13 15:48:06 +05:30
Aditya Kumar Patra S
d1afc220e5 common: nvedit: Support old format env default command
Change-Id: I5148f77bc4b616207ae1e8cf6e0cb2c04fdd5de3
Signed-off-by: Aditya Kumar Patra S <apatr@codeaurora.org>
2017-08-03 05:36:44 -07:00
Gokul Sriram Palanisamy
0255772918 ARM: env: Added support for variable env sizes
Kernel fw_env config has statically defined env size
to 256KB on NAND and eMMC and 64KB on NOR flash which
requires u-boot also to be configutred the same way.

This change configures env to support differnt env sizes
and preserves the APPSBLENV and avoids CRC mismatch.

Change-Id: I55f33c17953beb8e97ebe89f215549b6eefc1a48
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2017-06-28 12:21:20 +05:30
Jaiganesh Narayanan
67e7d1b728 ipq807x: Initialize ethernet only if it is needed
Initialize ethernet module only if network communication is needed.
This change is introduced to save the boot up time of the AP.

Change-Id: I318a3e897fe511accef37667af1a6c46ae31db6e
Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
2017-06-12 03:33:51 -07:00
smuthayy
0613a0b89c ipq807x: Enabled the PCIE
Change-Id: Iecd166a5a88ce563f02ebc0cae1b3b81ab5884ed
Signed-off-by: smuthayy <smuthayy@codeaurora.org>
2017-06-02 14:46:46 -07:00
Linux Build Service Account
da0d924ef5 Merge "ARM: qca: ipq807x: Enabled eMMC initialization" 2017-05-30 02:32:36 -07:00
Gokul Sriram Palanisamy
5500c77993 ARM: qca: ipq807x: Enabled eMMC initialization
Change-Id: I2322bf1011fcf39441e58fcd9695818108b697fd
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2017-05-29 23:25:14 -07:00
Jaiganesh Narayanan
6fe9db26ac ipq807x: enable net, qca8075 phy reset and link detection code
Change-Id: I978f5a16da7ecf56f006e0e7757a52c7d31b22cf
Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
2017-05-29 20:15:48 -07:00
smuthayy
c8d864ebd1 ipq807x: Disable PCI NAND EMMC and NET
Change-Id: Ifcb56a569f1bb68b816fc7bad15fe1b8ac9951f2
Signed-off-by: smuthayy <smuthayy@codeaurora.org>
2017-05-22 23:32:32 -07:00
Aditya Kumar Patra S
b55f8a1e4c ipq806x: Detach ubi on ubi volume read error.
Detach the ubi and the associated mtd device on error conditions.

Change-Id: I7b1fc798b5e03e4b2a39370697a4615139273c15
Signed-off-by: Aditya Kumar Patra S <apatr@codeaurora.org>
2017-03-01 22:40:37 -08:00
Prabhu Jayakumar
b0333e0960 MIPS: qca956x: Enable AP151 target support
The following features are enabled ,
1) AP151 target specific configs are added ( mainly ethernet )
2) AP151 and AP152 share a common configuration file & Makefile
with minimal changes between them. Support for avoiding the conflict
between them is implemented.

Change-Id: Ia71b20199d43cd29ff214c1258e4b15fcd55cb6b
Signed-off-by: Prabhu Jayakumar <pjayak@codeaurora.org>
2016-12-21 14:49:27 +05:30
Prabhu Jayakumar
d870612af5 qca: common: include the correct headers for global descriptor data size
The macro GENERATED_GBL_DATA_SIZE is available in "generic-asm-offsets.h"
which is already included from the file "include/asm-offsets.h". So ,
removing the unneccessary include from the common files.

Change-Id: Ib6a820357f5f830ab3cc12b5bced6c62a2016d95
Signed-off-by: Prabhu Jayakumar <pjayak@codeaurora.org>
2016-11-30 14:15:49 +05:30
Prabhu Jayakumar
c4c0122082 MIPS: qca956x: initial changes for the AP152 target
This change initializes the CPU PLL , configures the
timer, DRAM & enables the serial console for the
AP152 target.

Change-Id: If2a6884813250c09a856c3cb2e1783bf3940619c
Signed-off-by: Prabhu Jayakumar <pjayak@codeaurora.org>
2016-11-04 10:56:32 +05:30
Gokul Sriram Palanisamy
13e938b53d ipq806x: Added support for compressed dtb images
This commit lays a foundation for packing multiple dtb
images in a single itb image, by supporting compressed dtb
images. This is basically to support all boards across
different soc versions in a single itb image.
The plan is to compress the dtb images, so as to save flash space.

Change-Id: Iba81e311cfda55696209cf99c81e062980629871
Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
2016-10-26 17:04:12 +05:30
Gokul Sriram Palanisamy
fae4bc20ab ipq8064: Added mtd_node for qcom_nand and updated MTDPARTS_MAXLEN to 4096
In ft_board_setup,
1. Added ipq nand device qcom,qcom_nand to mtd nodes list.
2. The maximum size of mtdparts used is 4096. Hence,
   updating MTDPARTS_MAXLEN to match this value.

Change-Id: Iede752ddf72c410c6f4a6f828d8c2caef90cbf09
Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
2016-10-17 23:20:26 +05:30
Aditya Kumar Patra S
84d2f385fb qca: Modified board spcific Makefile to support CONFIG_ENV_IS_NOWHERE.
Modified board Makefile to avoid compilation of env.c when
"CONFIG_ENV_IS_NOWHERE" is enabled.

Change-Id: Ie694276c9071ad17f378a9926d78aa5a6e39a449
Signed-off-by: Aditya Kumar Patra S <apatr@codeaurora.org>
2016-10-07 01:41:05 -07:00
Akila N
39d25efe1d Adding support for imxtract command
Change-Id: I786b46f256592d8311c2f9e0f9a971b36436a3cb
Signed-off-by: Akila N <akilan@codeaurora.org>
2016-09-30 02:35:36 -07:00
Sham Muthayyan
b8cda662ff qcom: ipq: Fix relocation global data size
The board goes into hung state when the GD_SIZE more than
GENERATED_GLOBAL_DATA_SIZE. In this case, the stack poninter
address will be pointing to the unknown address which leads to
hung state. Fixed the hung state to point to correct address.

Change-Id: I0efc807ca07c16ae0b79ea6c606fde931f02a220
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2016-09-28 00:37:13 -07:00
Gowtham Siddarth Dhandapani
2a12ef637f qca: ipq40xx: Enabled full boot chain for eMMC
Change-Id: I5e795ff87d2c7a28ef5bd6cf2bbaabdc26cd48e7
Signed-off-by: Gowtham Siddarth Dhandapani <gdhandap@codeaurora.org>
2016-08-05 14:54:10 +05:30
Akila N
a69dc457ac qca: ipq40xx: Skip arm relocation
Change-Id: Ia2ddea65a97a256ea729e24a11d4800bdeeba385
Signed-off-by: Akila N <akilan@codeaurora.org>
2016-08-01 10:55:03 +05:30
Gokul Sriram Palanisamy
4a358cb07e ipq4019: Enabling qca common bootipq command
Change-Id: Ia5c3e996142dfdc194f0ed2f4bbe860b586a4139
Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
2016-07-18 19:36:18 +05:30
Akila N
da1841647b qca: ipq40xx: Configure u-boot environment in nand
Change-Id: Ic7849ca28adcebf24f376900abd22e409194cd3e
Signed-off-by: Akila N <akilan@codeaurora.org>
2016-04-18 03:11:51 -07:00
Vasudevan Murugesan
056b5702d2 ipq807x: Added MMC Kconfig options
Change-Id: Ia487c6e887137db937eef29d8947501fcd071090
Signed-off-by: Vasudevan Murugesan <vmuruges@codeaurora.org>
2016-04-01 02:24:46 -07:00
Manoharan Vijaya Raghavan
a538f6e602 qcom: ipq: disable relocation
Relocation is disabled as u-boot is loaded already in DDR

Change-Id: I087daf6e9a93b4ae3ff0236915474599359f3373
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2016-03-03 14:20:58 +05:30
Rasmus Villemoes
fea6730e1c fix always succesful memory test
Since 51209b1f42 ("Use common mtest iteration counting"),
do_mem_mtest has always reported 0 errors and hence returned 0, even
if errors were detected. Fix the helpers mem_test_alt() and
mem_test_quick() to return the number of errors found.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2016-01-08 10:15:47 -05:00
Przemyslaw Marczak
71105f50fe fdt: fix address cell count checking in fdt_translate_address()
Commit: dm: core: Enable optional use of fdt_translate_address()

Enables use of this function as default, but after this it's not
possible to get dev address for the case in which: '#size-cells == 0'

This causes errors when getting address for some GPIOs, for which
the '#size-cells' is set to 0.

Example error:
'__of_translate_address: Bad cell count for gpx0'

Allowing for that case by modifying the macro 'OF_CHECK_COUNTS',
(called from )__of_translate_address(), fixes the issue.

Now, this macro doesn't check, that '#size-cells' is greater than 0.

This is possible from the specification point of view, but I'm not sure
that it doesn't introduce a regression for other configs.

Please test and share the results.

Tested-on: Odroid U3, Odroid X2, Odroid XU3, Sandbox.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
2016-01-07 11:28:04 -07:00
Simon Glass
8a83487030 dm: usb: Add a remove() method for USB keyboards
At present USB keyboards are not properly removed with driver model. Add the
code to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2016-01-07 11:28:03 -07:00
Simon Glass
70caa97108 usb: Allow up to 7 storage devices
The current limit of 5 is not enough for the driver model USB tests. Really
we should not have a limit but the driver model code still uses the
usb_dev_desc[] array, which has a limit.

Increasing the limit by 2 should not bother anyone. Adjust it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2016-01-07 10:27:07 -07:00
Peng Fan
5d49b4cdf9 common: nvedit: use snprintf instead of sprintf
Use snprintf to replace sprintf.

Coverity log:
"
Unbounded source buffer (STRING_SIZE)
string_size: Passing string init_val of unknown size to sprintf.
"

Reported-by: Coverity
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-04 12:25:36 -05:00
Peng Fan
5a6894397a common: env: initialize scalar variable
Before calling hsearch_r, initialize callback entry to NULL.

Coverity log:
"
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.
Field e.callback is uninitialized when calling hsearch_r.
"

Reported-by: Coverity
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
2016-01-04 12:25:35 -05:00
Peng Fan
09a788624d common: cli: avoid memory leak
Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always
check to free 'buff' to avoid memory leak.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
2016-01-04 12:25:35 -05:00
Stefan Brüns
faa7db24a4 usb: Move determination of TT hub address/port into separate function
Start split and complete split tokens need the hub address and the
downstream port of the first HS hub (device view).

The core of the function was duplicated in both host/ehci_hcd and
musb-new/usb-compat.h.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
2015-12-31 16:16:29 +01:00
Stefan Brüns
c75f57fba4 usb: Alloc buffer for USB descriptor dynamically
The configuration descriptor includes all interface, endpoint and
auxiliary descriptors (e.g. report, union) so 512 bytes may not be enough.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-31 10:05:31 +01:00
Tom Rini
123b701779 Merge branch 'master' of git://git.denx.de/u-boot-usb 2015-12-17 21:46:04 -05:00
Stephen Warren
e4b70d8035 usb: kbd: don't use int xfers when polling via ctrl xfers
When CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP is enabled, use a
GET_REPORT control transfer to retrieve the initial state of the
keyboard. This matches the technique used to poll the keyboard state.
This is useful since it eliminates the remaining use of interrupt
transfers from the USB keyboard driver, which allows it to work with
USB HCD that don't support interrupt transfers.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-12-17 21:54:41 +01:00
Tom Rini
35065cdd94 Merge git://git.denx.de/u-boot-rockchip 2015-12-16 14:50:03 -05:00
Alexey Brodkin
52bc7c7e2b eeprom: fix eeprom write procedure
This fixes commit 1a37889b0a:
----------------------->8--------------------
eeprom: Pull out the RW loop

Unify the code for doing read/write into single function, since the
code for both the read and write is almost identical. This again
trims down the code duplication.
----------------------->8--------------------

where the same one routine is utilized for both EEPROM writing and
reading. The only difference was supposed to be a "read" flag which
in both cases was set with 1 somehow.

That lead to a missing delay in case of writing which lead to write
failure (in my case no data was written).

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
2015-12-16 10:31:31 -05:00
Tom Rini
e6e3faa5c2 Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2015-12-14 20:27:23 -05:00
Aneesh Bansal
9711f52806 armv8/ls1043ardb: add SECURE BOOT target for NOR
LS1043ARDB Secure Boot Target from NOR has been added.
- Configs defined to enable esbc_validate.
- ESBC Address in header is made 64 bit.
- SMMU is re-configured in Bypass mode.

Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-12-15 08:57:35 +08:00
York Sun
aabd7ddb88 common: Rewrite hiding the end of memory
As the name may be confusing, the CONFIG_SYS_MEM_TOP_HIDE reserves
some memory from the end of ram, tracked by gd->ram_size. It is not
always the top of u-boot visible memory. Rewrite the macro with a
weak function to provide flexibility for complex calcuation. Legacy
use of this macro is still supported.

Signed-off-by: York Sun <yorksun@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-15 08:57:33 +08:00
York Sun
e81495224f Reserve secure memory
Secure memory is at the end of memory, separated and reserved
from OS, tracked by gd->secure_ram. Secure memory can host
MMU tables, security monitor, etc. This is different from PRAM
used to reserve private memory. PRAM offers memory at the top
of u-boot memory, not necessarily the real end of memory for
systems with very large DDR. Using the end of memory simplifies
MMU setup and avoid memory fragmentation.

"bdinfo" command shows gd->secure_ram value if this memory is
marked as secured.

Signed-off-by: York Sun <yorksun@freescale.com>
2015-12-15 08:57:32 +08:00
Eric Nelson
5915517b7b spl: mmc: use block device number, not hard-coded 0
In order to support boot from multiple devices through board_boot_order,
it's necessary to use the block number of a device.

The use of a hard-coded 0 for the device number also creates a need
to re-order block devices for use in SPL like this:
	http://git.denx.de/?p=u-boot.git;a=blob;f=board/freescale/mx6slevk/mx6slevk.c;hb=HEAD#l195

Signed-off-by: Eric Nelson <eric@nelint.com>
2015-12-14 13:42:50 -05:00
Stephen Warren
653447b407 part: fix "part list ... -bootable varname" to use hex
Unfortunately U-Boot assumes that almost all numbers are in hex, including
partition numbers passed to e.g. "load". So, the command "part list mmc 0
-bootable devplist" should use hex when writing partition numbers into
$devplist, so they'll be correctly interpreted.

Change-Id: I9a70b19749643876baadb45efbc3decaef8bfee2
Fixes: 0798d6fd41 ("part: Add support for list filtering on bootable partitions")
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2015-12-13 20:22:01 -05:00
Sjoerd Simons
4363de63a8 spl: use panic_str instead of panic
For a simple static string, use panic_str() which prevents calling
printf needlessly.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-13 17:07:30 -07:00
Nishanth Menon
8405b8d98a common: cli_hush: Fix up simple typo
Correct the spelling for character..

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-12 15:56:10 -05:00
Miao Yan
b3b522f247 VxWorks: fixup MAC address for VxWorks
VxWorks 7 kernels retrieve 'local-mac-addr' from dtb and use
that for NIC MAC address. As a result, when booting the same
kernel image on multiple boards, there will be address
conflicts.

So fixup MAC address when booting VxWorks 7 kernels

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-12-12 15:56:08 -05:00
Bin Meng
2317cf0970 common: Remove timer_init() call for x86
With driver model timer support, there should not be an explict
call to timer_init(). Remove this call for x86.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-09 17:44:49 +08:00
Bin Meng
a0ae380b3c fdt: Change OF_BAD_ADDR to FDT_ADDR_T_NONE
Currently OF_BAD_ADDR is always -1ULL. When using OF_BAD_ADDR as the
return value of dev_get_addr(), it creates potential size mismatch
as dev_get_addr() uses FDT_ADDR_T_NONE as the return value which can
be either -1U or -1ULL depending on CONFIG_PHYS_64BIT. Now we change
OF_BAD_ADDR to FDT_ADDR_T_NONE to avoid such case.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2015-12-09 17:44:36 +08:00
Tom Rini
cbb2df2018 CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set
Now that we may compile (but not link) code calling fixup_cmdtable when
this is not set, we need to always have the declaration available.  We
should also make sure that anyone calling the function includes
<command.h> as that's where the function declaration is.

Signed-off-by: Tom Rini <trini@konsulko.com>
2015-12-07 08:35:23 -05:00
Michal Simek
e4099c8b80 i2c: cmd: Relocate subcommands when MANUAL_RELOC
Subcommands contain pointers to functions which are not updated when
MANUAL_RELOC is enabled. This patch fix it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-07 10:14:30 +01:00