aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini2019-01-02 14:20:29 -0500
committerTom Rini2019-01-02 14:20:29 -0500
commit695f67b5b3693232406a5cb3590d8fc5860c9f6c (patch)
tree0d45dc4ddd121e89665effc515c0091b288156dc /drivers
parentf97c49d6a2f504d0f0a8aab37c67aa314e006250 (diff)
parent689795242b1cb7de5a3d8c8bf1a9582a8924ff69 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/raw/nand_ids.c4
-rw-r--r--drivers/spi/sun4i_spi.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c
index 4009d641235..3104f879f66 100644
--- a/drivers/mtd/nand/raw/nand_ids.c
+++ b/drivers/mtd/nand/raw/nand_ids.c
@@ -61,6 +61,10 @@ struct nand_flash_dev nand_flash_ids[] = {
{"SDTNRGAMA 64G 3.3V 8-bit",
{ .id = {0x45, 0xde, 0x94, 0x93, 0x76, 0x50} },
SZ_16K, SZ_8K, SZ_4M, 0, 6, 1280, NAND_ECC_INFO(40, SZ_1K) },
+ {"H27UBG8T2BTR-BC 32G 3.3V 8-bit",
+ { .id = {0xad, 0xd7, 0x94, 0xda, 0x74, 0xc3} },
+ SZ_8K, SZ_4K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640,
+ NAND_ECC_INFO(40, SZ_1K), 0 },
{"H27UCG8T2ATR-BC 64G 3.3V 8-bit",
{ .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} },
SZ_8K, SZ_8K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640,
diff --git a/drivers/spi/sun4i_spi.c b/drivers/spi/sun4i_spi.c
index b86b5a00adb..38cc743c614 100644
--- a/drivers/spi/sun4i_spi.c
+++ b/drivers/spi/sun4i_spi.c
@@ -129,7 +129,8 @@ static inline void sun4i_spi_drain_fifo(struct sun4i_spi_priv *priv, int len)
while (len--) {
byte = readb(&priv->regs->rxdata);
- *priv->rx_buf++ = byte;
+ if (priv->rx_buf)
+ *priv->rx_buf++ = byte;
}
}