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>
1. Added emmc clk reset during mmc deinitialization to
avoid the mmc init failure in kernal bootup.
2. Clock has been configured to 192 Mhz for SDHCI mode
3. Proper register is used for disabling emmc clock
Change-Id: Id21e294380ee904027e5d6d2b2929acbd7bac672
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
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>
Using of Dcache invalidate all resulted in stack which
was dirty being invalidated. Hence the return address stored
in stack wasn't flushed and this caused issues. Reverting to
invalidate_dcache_range.
Change-Id: I382e07a3a81885ab02c9eae38196d3aa3ba8b086
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>