Fix the size of the buffer allocated to store the in-memory BBT.
This bug was previously hidden by a different bug, that was fixed in
commit e4fd10db8b8 ("mtd: nand: Fix nanddev_neraseblocks()").
Fixes: ed99f7731 ("mtd: nand: Add core infrastructure to deal with NAND devices")
Change-Id: I365fdfe053ef352661a832b33a232cbb18e81be6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
nanddev_neraseblocks() currently returns the number pages per LUN
instead of the total number of eraseblocks.
Change-Id: Id5ec7cd7170dae28acbfa568941ffea8e8907361
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
rk3399_miniloader_v1.25 read ImageSize from ComponentData first now.
So copy ImageSize to ComponentData (named LoadSize).
For other chips, ComponentDate->LoadSize is reserved area, it no
inflence on other chips.
Signed-off-by: zain wang <wzz@rock-chips.com>
Change-Id: I51468aa3fad90d8999c1943ab9c720f7c90cefc1
rk3399_miniloader_v1.25 read ImageSize from ComponentData first now.
So copy ImageSize to ComponentData (named LoadSize).
For other chips, ComponentDate->LoadSize is reserved area, it no
inflence on other chips.
Signed-off-by: zain wang <wzz@rock-chips.com>
Change-Id: I51468aa3fad90d8999c1943ab9c720f7c90cefc1
1.SPI Nand MTD partition bad block will not be detected if the address
isn't begin with the partition first block.
2.To avoid this problem, we should use map partition block address to
get right data.
3.It's compatible if the map table isn't initialed.
Change-Id: I11858b9b30a8fffecdbad804b1bad7b247b51d23
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
ioctl() should return error code but not data.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ica1242619ed59728acbeda7db493e5710f410a17
1.SPI Nand MTD partition bad block will not be detected if the address
isn't begin with the partition first block.
2.To avoid this problem, we should use map partition block address to
get right data.
3.It's compatible if the map table isn't initialed.
Change-Id: I11858b9b30a8fffecdbad804b1bad7b247b51d23
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
ioctl() should return error code but not data.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ica1242619ed59728acbeda7db493e5710f410a17
The device do not initialize the cache and mmu in bootrom and ddr,
so the spl do not need to clear the cache and disable mmu in function
arm_init_before_mmu.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: If7b19fa762c4803dcfc58c7b16fd8236a2262729
fix: ioctl() should return error code but not capability.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8030a1842692697f32f87e765ce3d68d1adb1c11
Puting the generic function declaration together that the
caller don't need care too much about different header file.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib37d1550e5a747d8f18e30c428ea8f613f9cc006
Now the nand device is attached to mtd block, so change its dectecting
strategy.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I7b5063ad1d1ba2d8305c84e4d67e09932b30574b
This patch updates the RC driver to accommodate the new framework
Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I3ff2b5844ce5f1776ac2f94b3cbd42eb5d73cc41
That snor_info_packet is SPI Nor information placed in IDB header
area, each progress can parse it to get flash information.
Change-Id: I63621a5b92c2fb85b588365d9415fbb40eece8a3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Switch to the device model and support mtd.
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Idfb60cec7a375254a423677b1c3f1da4be954eb5
The misc attach different device. We use the misc_mode to show
different device's capability.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibce5bb0465e452a7e783c5859f1e8ab2bfd8b0c5
SPL is the stage early than atf/op-tee that psci sysreset
is not supported.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I46b988b3776638265bf8f374a10f9027d1ebc90f
Key read can be access with key uclass or a tiny key read interface,
such as CONFIG_SPL_ADC_KEY.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic1abdee3f778fd1d0d57ab270d5cead81a580fa9
Providing a mininum adc key driver for SPL, which does not
depend on key uclass, but ADC uclass is still required.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I80f861780acd9c47d345b95762a4dd39d19ea6fc