Commit graph

13593 commits

Author SHA1 Message Date
Bin Meng
b09471d0e0 usb: hub: Add a new API to test if a hub device is root hub
Sometimes we need know if a given hub device is root hub or not.
Add a new API to test this. This removes the xHCI driver's own
version is_root_hub() and change to use the new API.

While we are here, remove the unused/commented out get_usb_device()
in the xHCI driver too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
(cherry picked from commit 46c1d49330)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Change-Id: Ia27ee3b541f936e3eebf6ecb57c3499c08da3781
2018-06-05 15:21:48 +05:30
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
Linux Build Service Account
52685a2840 Merge "mmc: Added erase quirk for eMMC part" 2018-05-21 08:09:22 -07:00
Md Sadre Alam
94028baeb5 lib: string: compile strlcat() and memscpy()
Make strlcat() and memscpy() function
as compilable by removing unnecessary
things.

Change-Id: I77759fbf7e150a169d9a756542c806493e85e183
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2018-05-21 10:06:44 +05:30
Md Sadre Alam
9cdab51feb lib: string: Add strlcat() and memscpy()
Add strlcat() and memscpy() currently its not
present in uboot. make these function available
in uboot.

Update function declaration also in headers as
avoid warnings.

strlcat(): Append a length limited string to another.

memscpy(): Copy data between buffer. The main aim of memscpy
is to prevent buffer overflows by taking in both the
destination size and copy size.

Change-Id: Icfc4cb4f8d668c0cace02af97617ccc3eecc5651
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2018-05-21 10:02:43 +05:30
Pradeep Das
dc6c6754c7 mmc: Added erase quirk for eMMC part
eMMC part SDIN8DE1-8G is taking long time for the secure trim.
This leads to erase timeout. Manufacturer ID based quirk is added
for the specific part to use trim instead of secure trim for block erase.

Change-Id: I13d5a9f19edf5daf9c1f4d5c2ec16b4f3b680159
Signed-off-by: Pradeep Das <pkdas@codeaurora.org>
2018-05-14 00:03:37 -07:00
Sham Muthayyan
039b3c19d5 ipq807x: Add ACL support for edma
Change-Id: I9102709f2a744e8434cc8d96d8a396766c4fc6c0
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-05-08 04:27:50 -07:00
Gokul Sriram Palanisamy
319ae005c3 qca: Enabled mmc partition protection
Enables mmc partition protection based on read-only
attribute in GPT on ipq4019 and ip8064 platforms.

Change-Id: Ifd459eb2964a056806ce23100a7f205b46fffdb3
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-05-04 16:55:13 +05:30
Antony Arun T
18a5aed789 Revert "ipq806x: Enabled HW Watchdog"
This reverts commit a87141b204.

Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-04-06 14:54:05 +05:30
speriaka
2802f9f1ec ipq807x: uboot: Updated FDT_HIGH value
This change is necessary as an additional 2 MB is
allocated as reserved memory for TZ_APPS exposed
in qseecom driver and we must notify the same
boundary as FDT_HIGH to uboot.

Without this change, the board gets stuck in uboot
with starting kernel message during boot up.

Change-Id: I6653d3c3dbac97cdf38a41d84d0b401d462cf5ce
Signed-off-by: speriaka <speriaka@codeaurora.org>
2018-04-04 23:36:30 -07:00
Linux Build Service Account
e29cf10dc6 Merge "ipq807x: Enable 4-byte address mode for flash W25Q256JW" 2018-04-04 03:16:31 -07:00
Sasirekaa Madhesu
e44601f1f7 ipq40xx: Removing CONFIG_SYS_DCACHE_OFF macro to enable dcache
During kernel bootup, dcache is enabled to reduce boot time.
When CONFIG_SYS_DCACHE_OFF macro is defined, dcache will not
be enabled.

Change-Id: I1830b467f2948250f5e7a676dd0f16a025e7b229
Signed-off-by: Sasirekaa Madhesu <smadhesu@codeaurora.org>
2018-04-02 11:42:14 +05:30
Santan Kumar
98b37b1dd8 ipq807x: Enable 4-byte address mode for flash W25Q256JW
Software SPI reset mode can be trigger from 4-Byte Address mode
in flash W25Q256JW.

Change-Id: I3f8ec46c2732c07a7af0cc7331102334413067ba
Signed-off-by: Santan Kumar <santank@codeaurora.org>
2018-03-30 17:44:43 +05:30
Linux Build Service Account
89d6ac669e Merge "mmc protect: Handled invalid GPT" 2018-03-21 13:01:09 -07:00
Antony Arun T
0ecdac3fea ipq806x: enabled dcache support
Change-Id: Ibfb0cfeb2e6b1919f4debc4d689426ee3ba29702
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-03-21 17:22:32 +05:30
Gokul Sriram Palanisamy
17e842fd9b mmc protect: Handled invalid GPT
Change-Id: Ie68e278230cb3ccfbd60cc03a7936ff1e226d47a
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-03-21 04:44:14 -07:00
Linux Build Service Account
103305720e Merge "ipq807x: spi: Enable 4K sector size support" 2018-03-14 07:02:10 -07:00
Pavithra Palanisamy
51bcbfd276 ipq807x: spi: Enable 4K sector size support
Change-Id: I82f04a93b889b59bb076a947334db816426c1cf1
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-03-13 20:03:58 +05:30
Balaji Jagadeesan
6086a41473 ipq40xx: Support for SPI NOR not listed in vendor ID table
Do generic flash structure initialization, for the devices
not listed in the SPI NOR flash lookup table, so that
we can access the flash even before the support is added.
Block size and density are obtained from smem.

Change-Id: I568eb538615bb36124c43a2509bcfce2e4a1188a
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
2018-03-13 11:49:29 +05:30
Linux Build Service Account
6ef13d4878 Merge "Revert "qca: Disabling dcache before scheduling secondary cores"" 2018-03-12 10:49:59 -07:00
Gokul Sriram Palanisamy
37a47837a4 Revert "qca: cache: Enabled dcache on board initialization"
This reverts commit 19a90604e9.

Change-Id: I7f8056f24854e9df9338384ee73e516517bb8175
2018-03-12 19:43:16 +05:30
Gokul Sriram Palanisamy
735b05f59c ARM: qca: mmc protection based on gpt attribute
If readonly bit of gpt attribute is set,
power-on write protection will be enabled.

Change-Id: I7dd9250fd592988626e889f92f07c6839585eb7d
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-03-12 05:26:08 -07:00
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
Rajkumar Ayyasamy
0effee2f25 ipq40xx: mmc: Enabled SDHCI ADMA support
This patch enables SDHCI mode and also supports
data transfer using ADMA method.

Change-Id: Idafb0ecd6cb3ddf28e18681f8823134be99574cd
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-03-08 17:57:03 +05:30
Linux Build Service Account
f46ee781bf Merge "ipq806x: spi: Enable 4K sector size support" 2018-03-07 12:38:07 -08:00
Balaji Jagadeesan
72b7f8a6fb ipq806x: spi: Enable 4K sector size support
Change-Id: I0faecf5c7aa67854752ff51aed90114c6238428f
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
2018-03-07 04:13:31 -08:00
Balaji Jagadeesan
3cbda7c5d5 ipq40xx: spi: Enable 4K sector size support
Change-Id: Ibb1c2a444f3d6167504f94624824f0dae0a1cb82
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
2018-03-07 04:13:15 -08:00
Linux Build Service Account
5f9bb09d0d Merge "ipq806x: Enabled DEVICE_NULLDEV" 2018-03-02 13:51:54 -08:00
Rajkumar Ayyasamy
29c1a71b49 ipq806x: Enabled DEVICE_NULLDEV
Enabled DEVICE_NULLDEV to redirect unwanted console prints.

Change-Id: Ic6f7527ced1adb635a41c4f293f3fc06c5d4b623
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-03-02 14:32:27 +05:30
Rajkumar Ayyasamy
a94cce3a6d ipq40xx: Enabled DEVICE_NULLDEV
Enabled DEVICE_NULLDEV to redirect unwanted console prints.

Change-Id: I0248ba05b959171a534e4ecd8441e6462968813f
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-03-02 14:28:04 +05:30
Linux Build Service Account
98f2ad5788 Merge "ipq40xx: Add support for Micron 1GB NAND flash" 2018-03-01 06:00:38 -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
Linux Build Service Account
0c2dda72a5 Merge "ipq807x: Enabled dcache" 2018-02-20 08:31:03 -08:00
Linux Build Service Account
9e50bbd593 Merge "ipq806x: Customized environment size handling" 2018-02-20 02:38:09 -08:00
Gokul Sriram Palanisamy
bfabe17cdf ipq807x: Enabled dcache
Change-Id: I6b574801e56ae3c5b6ceccb20981813160ca699e
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-02-20 11:23:34 +05:30
Linux Build Service Account
4f4928b94d Merge "ipq40xx: Added support for spansion SPI NOR" 2018-02-19 06:04:03 -08:00
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
Gokul Sriram Palanisamy
19a90604e9 qca: cache: Enabled dcache on board initialization
dcache is enabled only during boot from flash.
During JTAG recovery, dcache_enable is skipped
to avoid cache issues in recovery environment.

Change-Id: Ie3003f67c787cbc6b88dc42017aeb2a9508d2ff9
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-02-18 22:15:40 -08:00
Gokul Sriram Palanisamy
a0ff1642d4 ipq807x: dcache support for nand driver
This patch adds the support on nand driver to work
when dcache is on.
flush_dcache_range will do both clean and invalidate.
To avoid any data loss when an un-aligned buffer used
in RX path, before giving buffer to bam and after bam
updates the data in buffer, buffer will be flushed.

Change-Id: Ib38d68726efe1692ae94c2be1af61cf29d1c2e50
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-02-18 22:15:23 -08:00
Sasirekaa Madhesu
6924926bbd ipq40xx: Added support for spansion SPI NOR
Change-Id: Ifac5a550715836c439563b848de11fb26d28aa5c
Signed-off-by: Sasirekaa Madhesu <smadhesu@codeaurora.org>
2018-02-16 10:36:41 +05:30
Linux Build Service Account
bfa4e09dd3 Merge "ipq806x: Enabled HW Watchdog" 2018-02-12 10:12:15 -08:00
Linux Build Service Account
164f621923 Merge "ipq806x: Add run command support" 2018-02-12 10:12:12 -08:00
Linux Build Service Account
bb13bb1878 Merge "ipq40xx: Add run command support" 2018-02-12 07:18:32 -08:00
Antony Arun T
a87141b204 ipq806x: Enabled HW Watchdog
Change-Id: I0850c1082be7dcbd1301acca5ed345d6db72aa2e
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-02-12 16:18:59 +05:30
Balaji Jagadeesan
99baf3f2c0 ipq806x: Add run command support
Change-Id: I6c7d338b7a98a8d85eff16d3fd683b5f48397aa3
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
2018-02-12 12:57:23 +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
Linux Build Service Account
abdb324398 Merge "ipq40xx: Update emmc pin configs" 2018-02-08 05:06:22 -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