drivers: rkflash: Notice it when the storage device is not support

When the related print appears, it means that the SDK is too old
and the storage driver needs to be updated.

Change-Id: I63f45fba4cf52108c628f225ee23aa0819ca256f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2021-07-12 20:29:43 +08:00
parent 067686d494
commit 75b1344eee
3 changed files with 16 additions and 2 deletions
+6 -1
View File
@@ -2,6 +2,8 @@
/* Copyright (c) 2018 Rockchip Electronics Co. Ltd. */
#define pr_fmt(fmt) "nandc: " fmt
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -450,8 +452,11 @@ u32 nandc_flash_init(void __iomem *nandc_addr)
id_byte[0][1] != 0xA1 &&
id_byte[0][1] != 0xAA &&
id_byte[0][1] != 0xAC &&
id_byte[0][1] != 0x6A)
id_byte[0][1] != 0x6A) {
pr_err("The device not support yet!\n");
return FTL_UNSUPPORTED_FLASH;
}
}
}
if (id_byte[0][0] == 0x98 && (id_byte[0][4] & 0x80))
+6 -1
View File
@@ -2,6 +2,8 @@
/* Copyright (c) 2018 Rockchip Electronics Co. Ltd. */
#define pr_fmt(fmt) "sfc_nand: " fmt
#include <linux/bug.h>
#include <linux/delay.h>
#include <linux/kernel.h>
@@ -1037,8 +1039,11 @@ u32 sfc_nand_init(void)
p_nand_info = sfc_nand_get_info(id_byte);
if (!p_nand_info)
if (!p_nand_info) {
pr_err("The device not support yet!\n");
return (u32)FTL_UNSUPPORTED_FLASH;
}
gp_page_buf = (u32 *)__get_free_pages(GFP_KERNEL | GFP_DMA32, get_order(SFC_NAND_PAGE_MAX_SIZE));
if (!gp_page_buf)
+4
View File
@@ -2,6 +2,8 @@
/* Copyright (c) 2018 Rockchip Electronics Co. Ltd. */
#define pr_fmt(fmt) "sfc_nor: " fmt
#include <linux/bug.h>
#include <linux/delay.h>
#include <linux/kernel.h>
@@ -718,6 +720,8 @@ int snor_init(struct SFNOR_DEV *p_dev)
if (g_spi_flash_info) {
snor_parse_flash_table(p_dev, g_spi_flash_info);
} else {
pr_err("The device not support yet!\n");
p_dev->manufacturer = id_byte[0];
p_dev->mem_type = id_byte[1];
p_dev->capacity = 1 << (id_byte[2] - 9);