Commit graph

3879 commits

Author SHA1 Message Date
Bin Meng
28468cd710 usb: hub: Change USB hub descriptor to match USB 3.0 hubs
USB 3.0 hubs have a slightly different hub descriptor than USB 2.0
hubs, with a fixed (rather than variable length) size. Change the
host controller drivers that access those last two fields
(DeviceRemovable and PortPowerCtrlMask) to use the union.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
(cherry picked from commit 337fc7e665)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Change-Id: I4ee4c866f4d35fea3ecf6431b90cec1af121fe29
2018-06-05 15:21:39 +05:30
Bin Meng
0fb9d498ff usb: hub: Send correct wValue to get hub descriptor of a USB 3.0 hub
Testing a USB 3.0 hub by connecting it to the xHCI port on Intel
MinnowMax, when issuing 'get hub descriptor' to the hub, xHCI
reports a transfer event TRB with a completion code 6 which means
'Stall Error'.

In fact super speed USB hub descriptor type is 0x2a, not 0x29.
Sending correct SETUP packet to the hub makes it not stall anymore.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
(cherry picked from commit f342119602)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Change-Id: I105e81557ec4097e6fafafdd2e2b5ecffb75b56b
2018-06-05 15:21:17 +05:30
Santan Kumar
c90a856ac3 ipq806x: Added multicore support
-Device IO commands are not supported
-CPU down is temporary supported by WFE instruction
-Need reboot to execute bootipq command

Change-Id: Ic7f1dece29e29f75b984018bcf1fc5f724282567
Signed-off-by: Santan Kumar <santank@codeaurora.org>
2018-04-27 11:47:47 +05:30
Gokul Sriram Palanisamy
201def52b9 ARM: mmc: Added power-on write protection support
Change-Id: Iba7e4bfcbee3f5106ef7d0ecc64e8af175732f7c
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-03-12 05:25:56 -07:00
Gokul Sriram Palanisamy
ee2ddf9dc2 env_nand: Updated erase size to partition size
erase complete partiton size, board_env_size.

Change-Id: Ib0f7e65f49fbd29cd265f5ff12cd03424db61227
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-03-08 18:46:30 +05:30
Nikhil Prakash V
e47694ebe8 ipq807x: Changes for fixing kw issues
Adding nullpointer condition checks before the pointer
is accessed or passed to a function as argument.

Change-Id: I6848c132076708f69fad00a75e42a1c2f33b6215
Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
2018-03-06 14:06:48 +05:30
Linux Build Service Account
9dbc4f95f1 Merge "ipq40xx: nand: Initialize nand flash device before flashing" 2018-02-27 02:16:52 -08:00
Antony Arun T
4ca40fa90d SF: Bulk Erase command support for spansion
Change-Id: Ida70d167cafc6af823f31c660d108cc25be6edff
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-02-23 13:10:34 +05:30
Balaji Jagadeesan
23dfc73b5b ipq40xx: nand: Initialize nand flash device before flashing
The DK01 board will be bricked if a nand image is flashed onto it.
Because it supports only nor and nor_plus_nand flash types.
So, this patch detects the nand flash before flashing.

Change-Id: I0e0ce2f4d72bcd6724847729170562068a00394d
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
2018-02-22 15:47:51 +05:30
Antony Arun T
1279dad923 ipq806x: Customized environment size handling
To save space in NOR flash, environment loading from flash is
handled differently for NOR and NAND. The size for NOR flash
environment is taken from partition size itself.

Change-Id: I588471b679fad0e96b836d43dc1a0136c5400fc1
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-02-19 16:11:21 +05:30
Linux Build Service Account
58f99d4204 Merge "qca: Add logic to restrict runmulticore command on secondary cores" 2018-02-08 18:36:15 -08:00
Linux Build Service Account
3221496969 Merge "qca: spi-nor: Store the probe information to avoid unnecessary probes" 2018-02-08 15:43:34 -08:00
Santan Kumar
a0dd6f4332 qca: spi-nor: Store the probe information to avoid unnecessary probes
Change-Id: If7260e4a4065d6406d9a8554f43853663f0e8f3b
Signed-off-by: Santan Kumar <santank@codeaurora.org>
2018-02-08 15:58:22 +05:30
Santan Kumar
bf90754ab4 qca: Add logic to restrict runmulticore command on secondary cores
Change-Id: Ibe1bf89614ddadb770cda2216b696152534daaf7
Signed-off-by: Santan Kumar <santank@codeaurora.org>
2018-02-08 01:37:20 -08:00
Nirmala Devi Mal Nadar
0f24b749d6 ipq806x: Skip adding mtdid for invalid mtd device
Modified function to skip adding mtdid list if mtd device is
not found rather than completely returning error.

Change-Id: I515db87802721c1fa1d87b3422eb17eff049e345
Signed-off-by: Nirmala Devi Mal Nadar <nmalna@codeaurora.org>
Signed-off-by: Kirthik Srinivasan <kirthik@codeaurora.org>
Signed-off-by: Nisar Ahamed Khan <nkhan@codeaurora.org>
(cherry picked from commit 4b0ccfab10)
Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
2018-02-06 23:55:50 -08:00
Gokul Sriram Palanisamy
3ad3c2e50c QCA: Enable board reset after crashdump to flash
Added board reset command after crashdump to flash. Also,
updated with valid return values in do_dumpqca_flash_data function.

Change-Id: Ib89ee06cd6e34c0a56090284983534f107c97ea7
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-01-31 19:49:35 -08:00
Gokul Sriram Palanisamy
ebfe553da8 QCA: Crashdump data to flash
If the dump_to_flash environment variable is set with the proper
offset in u-boot, crashdump data will be stored to flash memory.
Otherwise it will be stored in tftp server.

Change-Id: I10ac1016e3dfe6a2fa11a0a67c5774b29c3df67a
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-01-29 13:18:16 +05:30
Gokul Sriram Palanisamy
e1b9106107 ARM: qca: Skipping u-boot prompt during crashdump
If crashdump magic is found, should not allow user
to access u-boot prompt as tz will be in unsecure state.

Change-Id: Icdc94c33fb87664857bafa981950f9768794cf11
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-01-10 04:27:44 -08:00
Gokul Sriram Palanisamy
a23d322ca1 eth: Moved eth_initialize to end of autoboot
If autoboot command fails, it returns to prompt
without ethernet initialized. Hence, moved it to
the end of autoboot to make sure ethrernet is
initialized before entering the prompt.

Change-Id: I79ea6f51842c544e9eb3b97bf7658c45feb34f0b
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2017-12-28 10:51:35 +05:30
Sham Muthayyan
a60121fe0a ipq807x: Add SF env support
Change-Id: I4ddf96b965e22c980a4c4ea02307afb361d639ec
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2017-12-13 18:37:34 +05:30
Vasudevan Murugesan
46632823a3 Revert "ARM: qca: Skipping u-boot prompt during crashdump"
This reverts commit 7e12e80ba8.

Change-Id: Ib5b47336577e84a4033e8bdb079f34939e5045df
Signed-off-by: Vasudevan Murugesan <vmuruges@codeaurora.org>
2017-12-12 16:03:12 +05:30
Gokul Sriram Palanisamy
7e12e80ba8 ARM: qca: Skipping u-boot prompt during crashdump
If crashdump magic is found, should not allow user
to access u-boot prompt as tz will be in unsecure state.

Change-Id: I081e84eceada7ffe72d9b4fa4f0425535e4aabde
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2017-11-19 20:30:28 -08:00
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