USB 3.0 hub port status has different bit position regarding to
port power, port speed, etc. But others are the same as 2.0 hubs.
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 98ba3d6c23)
Signed-off-by: Santan Kumar <santank@codeaurora.org>
Change-Id: I77b72af7669aa05070ebacd1d95123413761c11c
xHCI spec says: the values of the 'route string' field shall be
initialized by the first 'Address Device' command issued to a
device slot, and shall not be modified by any other command.
So far U-Boot does not program this field, and it does not prevent
SS device directly attached to root port, or HS device behind an HS
hub, from working, due to the fact that 'route string' is used by
the xHC to target SS packets. But in order to enumerate devices
behind an SS hub, this field must be programmed.
With this commit and along with previous commits, now SS & HS devices
attached to a USB 3.0 hub can be enumerated by U-Boot.
As usual, this new feature is only available when DM is on.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 493b8dd070)
Signed-off-by: Santan Kumar <santank@codeaurora.org>
Change-Id: I367a0f1fa5e310c1c6af2d4675a86a3293337d64
USB 3.0 hub uses a hub depth value multiplied by four as an offset
into the 'route string' to locate the bits it uses to determine the
downstream port number. We shall set the hub depth value of a USB
3.0 hub after it is configured.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit bbc6f06c00)
Signed-off-by: Santan Kumar <santank@codeaurora.org>
Conflicts:
include/usb.h
Change-Id: I7fa67c83c854c136fa9401201189e0597912e2a8
For future extension, change xhci_setup_addressable_virt_dev()
signature to accept a pointer to 'struct usb_device', instead
of its members slot_id & speed, as the struct already contains
these two plus some other useful information of the device.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit daec469144)
Signed-off-by: Santan Kumar <santank@codeaurora.org>
Change-Id: Ibd7991073f0de4a97babbd9a96270f53f77cb185
Use USB hub device's dev->uclass_priv to point to 'usb_hub_device'
so that with driver model usb_hub_reset() and usb_hub_allocate()
are no longer needed.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit dfa96e0676)
Signed-off-by: Santan Kumar <santank@codeaurora.org>
Conflicts:
common/usb_hub.c
Change-Id: I7a46a12c62aa7429ef2241c9543dd877abe6ac0b
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
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
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
Add environment variable in uboot and device-tree node
in kernel as "flash_type" to expose current boot mode.
Change-Id: I15d4547f135f187a157dd7b303fc31f2df77cec2
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
Get flash device ID based on partition to
extend grow partition support to NAND devices.
Change-Id: I332e4bb88d7506184ec0194cba34a1f69a80c76c
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
Make strlcat() and memscpy() function
as compilable by removing unnecessary
things.
Change-Id: I77759fbf7e150a169d9a756542c806493e85e183
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
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>
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>
This change adds the two new command secure_authenticate, is_sec_boot_enabled.
command secure_authenticate, helps to authenticate the given image before
writing into the flash. This command takes three arguments, which are sw_id,
img_addr and img_size. Each image has its own sw_id.
command is_sec_boot_enabled, helps to check if the secure fuse is enabled or
not.
Change-Id: I7c388cc7a25e66f2c5d16ff6439d143193ca305b
Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
When SPI nor initialization happens before SPI Nand, SPI nor gets
registered as the current nand device in nor+nand flash. This
results in ECC fail at uboot. Hence this patch changes the
initialization sequence .
Change-Id: I968f364b7dfa91571f24230f16f8d51a0971b254
Signed-off-by: Sasirekaa Madhesu <smadhesu@codeaurora.org>
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>
Currently NAND_CTRL register write generates error.
Register writes to operational registers should always be done
through command descriptors if BAM_MODE is already enabled.
For NAND boot, bootloader already enables BAM_MODE so read the
NAND_CTRL register value and write only if BAM_MODE is not set.
Change-Id: Iabc3e06dc7d8d8b36cdf35907217e1c4d7cc960a
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Handling stack corruption in bootipq path. Due stack corruption
after sysupgrade the kernel is not booting it is stoping at
uboot. This stack corruption is happening due to invalid address
assignement while updating boot argument in uboot.
Change-Id: Ic2ff9f2218b0d577ed36947cd7dc021a764b0c03
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
In case of NOR boot mount the rootfs based on device
name not based on UUID. Check the flash type based on rootfs
offset. In case of NOR plus eMMC the rootfs offset will be 0xBAD0FF5E.
This is bad offset. In NOR only boot rootfs have proper offset.
Change-Id: I7a7ecf0c1d0f2dcec13c71561568d1e16686316b
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
If nand id table has specified oobsize then use the same.
Change-Id: I58b19f8f9989c7332d103b83b6920d5b59b29a13
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Following error is coming during UBI mount for non ONFI nand
device since mtd->writebufsize is coming as zero
ubi0: attaching mtd2
UBI init error 22
The mtd->writebufsize is being assigned currently for ONFI
devices only so move this assigment to common place.
Change-Id: Idd22800dd65035952c1afd07ba375a28ffcf76ad
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
The ONFI NAND device specifies the required ECC correction in its
param page but for non ONFI device, we don't have such info.
The QPIC NAND contoller can use 8 bit ECC if the chip has required
number of spare bytes. This patch calculates the minimum required
spare bytes for using 8 bit ECC and select the same, if non ONFI
device has required number of spare bytes otherwise 4 bit ECC
will be used.
Change-Id: If7c718f4288eee16857171335897e3209a05fd0b
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Add the full description of the Toshiba TH58NYG3S0H NAND chip
in the nand_ids table since its spare bytes are coming as 128
instead of 256 with standard calculation. This device is non
ONFI/JEDEC device.
Change-Id: If1938fbcd0ebceb70aa9b620186cc92c6d504f75
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
This change is for mounting the rootfs partition in kernel based
on UUID(Universally Unique IDentifier). In embedded system it is
common to store rootfs on SD card or eMMC. Typically the kernel
command line has like: root=/dev/mmcblk0p20 to tell the kernel
where to look for rootfs partition. The problem in this approach
is the eMMC device number can vary based on wether the SD card
present or not in the SD card slot. Also depending on kernel version
the eMMC device number can vary. This means passing the eMMC device
for specifying the rootfs location is not robust approach.
If SD card first get detected then the base minor 0 is assigned to
SD card and kernel will try to mount rootfs from SD card and if
there is no rootfs present on SD card then kernel fail to mount the
rootfs.
Change-Id: Ia9e6dded61292bed8a10a40fd3cb86f4026393eb
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
Added support to boot the kernel from alternate partition
Change-Id: I90e09e61293581347f48b6bd4d00982c81d7d9a8
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>