Commit graph

35535 commits

Author SHA1 Message Date
Linux Build Service Account
71e72eff91 Merge "ipq807x: Device tree support in u-boot for HK08" 2018-06-07 09:36:04 -07:00
Linux Build Service Account
365124f20d Merge "ipq40xx: mmc: Added erase quirk for eMMC part" 2018-06-07 03:08:43 -07:00
Linux Build Service Account
e4fb3ba942 Merge "usb: hub: Add a new API to test if a hub device is root hub" 2018-06-07 03:08:42 -07:00
Nikhil Prakash V
a05866dad9 ipq807x: Device tree support in u-boot for HK08
Adding device tree support for HK08 in u-boot-2016.

Change-Id: I30d653e0dcb5a0f2da453360f7255edd153c6606
Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
2018-06-07 13:00:51 +05:30
Abhishek Sahu
961d3301a2 mtd: nand: qcom: support for non-page aligned read start address
Currently, the nand driver expects the start address to be page
aligned. This patch adds the support for reading data from
non-page aligned start address by using intermediate buffer.

1. Determine the number of pages with start address and
   length.
2. Do the full page read for all the pages. For first page,
   check the start address and determine the column. If column is
   non-zero then use the intermediate buffer for page data and copy
   the required number of bytes from this intermediate buffer to
   actual buffer.

Change-Id: I05a4b98547c83f785096027596cedd83a283edd8
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-06-06 23:02:13 -07:00
Vinoth Gnanasekaran
4dc439fee1 ipq40xx: mmc: Added erase quirk for eMMC part
eMMC part THGBMBG5D1KBAIT 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: Id4ecfde9585e112521863439f684feb5e0caaa51
Signed-off-by: Vinoth Gnanasekaran <vgnana@codeaurora.org>
2018-06-06 22:03:38 -07:00
Linux Build Service Account
9f318b6fca Merge "bootqca: Avoiding SPI NOR being read as psudo-NAND" 2018-06-06 10:07:48 -07:00
Gokul Sriram Palanisamy
65a407ecf8 bootqca: Avoiding SPI NOR being read as psudo-NAND
When SPI NOR is treated as psudo-nand,
SPI-NOR gets stuck in 3-byte mode
causing reads at incorrect offssets.

Change-Id: I062bce4755ee1b7be0d8dcc88ae9d5412143b6e1
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-06-06 18:14:21 +05:30
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
e3d876ddd3 Merge "ipq806x: Added multicore support" 2018-06-04 04:14:15 -07:00
Linux Build Service Account
a23ced2e22 Merge "Revert "Revert "qca: cache: Enabled dcache on board initialization""" 2018-06-03 23:09:55 -07:00
Gokul Sriram Palanisamy
98fb19b416 Revert "Revert "qca: cache: Enabled dcache on board initialization""
This reverts commit 37a47837a4.

Change-Id: I6be9a84f1c00d8576bb2a288caa8513697a17062
2018-05-31 16:52:00 +05:30
Gokul Sriram Palanisamy
4f3e17a9b3 Revert "Revert "runmulticore: Added cache flush before enabling""
This reverts commit 58a2a17f7b.
2018-05-31 16:52:00 +05:30
Gokul Sriram Palanisamy
f98c229172 Revert "Revert "qca: Disabling dcache before scheduling secondary cores""
This reverts commit 4bc21f9796.
2018-05-31 16:52:00 +05:30
Pavithra Palanisamy
8d670ad213 ipq807x: Increase drive strength of nand_gpio pins
This change increases Drive strength of nand-controller
GPIO pins from 2 MA to 8 MA to support all NAND flash.

Change-Id: I250deb47f0ddc770fe5c22dad1be32eb1a8f129d
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-05-30 15:00:32 +05:30
Pavithra Palanisamy
6ad227588f ipq: Add entry to expose boot mode
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>
2018-05-29 12:33:25 +05:30
Gokul Sriram Palanisamy
33fa51cf26 smem: Support for grow partition in NAND
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>
2018-05-24 17:23:31 +05:30
Linux Build Service Account
23082440f1 Merge "ipq806x: Added support to boot from alternate partition" 2018-05-21 11:43:27 -07:00
Linux Build Service Account
52685a2840 Merge "mmc: Added erase quirk for eMMC part" 2018-05-21 08:09:22 -07:00
Linux Build Service Account
94e7179ffe Merge "lib: string: compile strlcat() and memscpy()" 2018-05-21 08:09:20 -07:00
Antony Arun T
6b9613f59a ipq806x: Added support to boot from alternate partition
Change-Id: I965fc558247b240686aec15c7dc3dd48aa99321a
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-05-21 18:20:25 +05:30
Antony Arun T
a6c9a8b61b ipq806x: Added support to boot from alternate partition
Change-Id: Id98da8458e51bf7169f3648dc123d956bcf2cb13
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-05-21 12:07:19 +05:30
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
Linux Build Service Account
4f02132690 Merge "ipq: add support to validate the signed images before flashing" 2018-05-10 09:35:59 -07:00
Linux Build Service Account
48dd72d092 Merge "qca: Fixed build issue when appsbl_dload disabled" 2018-05-10 09:35:59 -07:00
Kathiravan T
de6e2b23cc ipq: add support to validate the signed images before flashing
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>
2018-05-10 06:42:04 -07:00
Gokul Sriram Palanisamy
57a20048f6 qca: Fixed build issue when appsbl_dload disabled
Change-Id: Iabc5be6146529db9a888d36854d5b2d7f6a4a14d
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-05-10 17:01:58 +05:30
Linux Build Service Account
6f578d7571 Merge "ipq807x: Add ACL support for edma" 2018-05-10 00:12:33 -07:00
Sasirekaa Madhesu
dce27eb584 ipq40xx: Changing the SPI initialization sequence
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>
2018-05-09 15:42:01 +05:30
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
Linux Build Service Account
750b3ca7ac Merge "qca: Enabled mmc partition protection" 2018-05-07 22:13:52 -07:00
Linux Build Service Account
03166ce101 Merge "board: qca: common: Stack corruption handling in bootipq path" 2018-05-04 10:10:23 -07:00
Linux Build Service Account
39fb368aa1 Merge "mtd: qcom: write NAND_CTRL only once" 2018-05-04 06:10:20 -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
Abhishek Sahu
3edd3544f0 mtd: qcom: write NAND_CTRL only once
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>
2018-05-04 14:55:07 +05:30
Md Sadre Alam
14187b9678 board: qca: common: Stack corruption handling in bootipq path
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>
2018-05-03 20:44:45 +05:30
Md Sadre Alam
ff3851d492 board: qca: common: Add condition for NOR boot
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>
2018-04-30 15:33:13 +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
Santan Kumar
9cb02c6c60 ipq807x: Move psci related multicore code to board file
PSCI is only supported in HK.

Change-Id: I83205697d4efdc74c9700b70d807d175b8d7f545
Signed-off-by: Santan Kumar <santank@codeaurora.org>
2018-04-27 11:45:34 +05:30
Linux Build Service Account
6e4d2c720d Merge "mtd: nand: qcom: use oobsize from nand id table" 2018-04-26 08:51:47 -07:00
Linux Build Service Account
34939e8453 Merge "mmc: Added device tree entry for sdhci" 2018-04-26 08:51:46 -07:00
Linux Build Service Account
13cc1f2773 Merge "mtd: nand: add Toshiba TH58NYG3S0H to nand_ids table" 2018-04-26 04:30:02 -07:00
Linux Build Service Account
d3ea2a049d Merge "ipq807x: board: Pass UUID of rootfs partion to kernel in bootargs" 2018-04-26 04:29:50 -07:00
Gokul Sriram Palanisamy
f9dff38ca8 mmc: Added device tree entry for sdhci
Change-Id: I9d567df69e1915a8780bb7b7859ffdefcd3c59c7
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-04-26 02:06:22 -07:00
Abhishek Sahu
8c71e56950 mtd: nand: qcom: use oobsize from nand id table
If nand id table has specified oobsize then use the same.

Change-Id: I58b19f8f9989c7332d103b83b6920d5b59b29a13
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-04-26 12:20:14 +05:30
Abhishek Sahu
a7ab5a19c2 mtd: nand: qcom: fix ubi mount error for non ONFI nand devices
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>
2018-04-26 12:20:14 +05:30