This change adds the correct Sbl_Hdr instead of Mbn_Hdr, since
sbl header is different than normal Mbn_Hdr, and adds the sbl
header size as 80.
SBL in nand starts with preamble before the sbl header, so here
it adds the preamble for header start address as well as
src, sig and cert offset values.
Change-Id: I9a56d7b4a51890b74a5ee5fe3047a38801d23803
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
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>
This patch makes mmc driver dcache aware to keep
the mmc functionality intact, with or without dcache
is enabled.
flush_cache used here does both clean and invalidate
cache thus preventing data loss during unaligned access,
if any.
Change-Id: I0910bd17678d3855bba27e9f8f7c08606774b28d
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
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>
Disabling dcache before scheduling secondary cores
and enabling it back after the cores are down.
Change-Id: I73011db903a0da1113d09fb8306b8d3f940ece60
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
In case of 11ad dock (AK01), 8033 phy needs to be reset,
before switch initialization. GPIO32 is configured to
reset phy.
Change-Id: I18a7f05b57c9a02adb27d58d8b4098d44edb49bd
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
Some of the newer nand parts can have bit flips in an erased
page due to the process technology used. In this case, ipq
nand controller is not able to identify that page as an erased
page. In case of bitflips, the ECC engine tries to correct the
data and then it generates the uncorrectable error. Now, this
data is not equal to original raw data.
Following logic is being added to identify the erased
codeword bitflips.
1. Maintain the bitmasks for the codewords which generated
uncorrectable error.
2. Read the raw data again in temp buffer and count the
number of zeros. Since spare bytes are unused in ECC layout and
won’t affect ECC correctability so no need to count number of
zero in spare bytes.
3. If the number of zero is below ECC correctability then it
can be treated as erased CW. In this case, make all the data/oob
of actual user buffers as 0xff.
Change-Id: I5a80cd371a926efa36c40b4db68e78ed78c30536
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Following are the major issues in current implementation
1. The mtd layer expects the driver to return non-negative
integer representing the maximum number of bitflips that were
corrected on any one ecc region. The mtd layer takes care of
returning EUCLEAN based on returned number.
2. The read should return the complete data in case of
EBADMSG so move the EBADMSG check in the main read function.
Change-Id: Iab3a28427e8350e8c99368762373f2cbce918786
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
1. assign ecc strength in mtd structure which will be used by
mtd layer
2. Initialize bitflip_threshold with 3*4 of ecc strength so
that MTD layer will return EUCLEAN if number of ecc correction
are more than bitflip_threshold.
Change-Id: I81cfe6059375117ced7888b877705919287a7be2
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
This patch is to support DK01-C3 dts which is required
for standard profile in linux 4.4 kernel.Linux 3.14 kernel
does not have DK01-C3, hence it uses DK01-C1 config.
Change-Id: I4afa8c4511e55f093b573cf42e04b0917ce7d0b4
Signed-off-by: Sasirekaa Madhesu <smadhesu@codeaurora.org>
1. Added pci entries in AP160 and AP160_2xx dts
2. The wifi pcie card requires to be powered on from GPIO
pins. This patch also adds the same in AP160 dts file and
enable it during PCIe configuration.
Change-Id: Icd8f5741d5df38d46640c78a7475853e77b873a9
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
This change will look for existence of file /sys/sec_upgrade/sec_auth
if the file exists, it performs image authentication with the new
approach i.e TZ enabled mechanism.
It reads all the sections of the single image and writes each
section's type and image file path in /sys/sec_upgrade/sec_auth.
If a written section image is a proper signed image, then it will
return success else will cause the failure.
Change-Id: I649581e0ab74a66d677e5bfbf1c34fd83cb2465d
Signed-off-by: Avinash Pandey <avinasv@codeaurora.org>
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>