From 1a7e176d27eb54cf75b2c54dfe1a351cc434d1d5 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 29 Nov 2017 19:18:18 +0900 Subject: mtd: nand: denali: remove bogus __maybe_unused denali_setup_data_interface() is always used. I put __maybe_unused for a temporal use, then forgot to delete it. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index b116d3a..7a87adc 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -938,7 +938,7 @@ static int denali_erase(struct mtd_info *mtd, int page) return irq_status & INTR__ERASE_COMP ? 0 : NAND_STATUS_FAIL; } -static int __maybe_unused denali_setup_data_interface(struct mtd_info *mtd, int chipnr, +static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, const struct nand_data_interface *conf) { struct denali_nand_info *denali = mtd_to_denali(mtd); -- cgit v1.1 From 57f9bb9404e0578b4701ff900fdfa884d84c74b0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 29 Nov 2017 19:19:09 +0900 Subject: mtd: nand: denali: remove ad-hoc board_nand_init() entry This driver is highly dependent on the configuration from denali_dt.c Please enable CONFIG_NAND_DENALI_DT if you use this driver. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 7a87adc..8ff2d09 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1366,29 +1366,3 @@ free_buf: return ret; } - -#ifndef CONFIG_NAND_DENALI_DT -static int __board_nand_init(void) -{ - struct denali_nand_info *denali; - - denali = kzalloc(sizeof(*denali), GFP_KERNEL); - if (!denali) - return -ENOMEM; - - /* - * In the future, these base addresses should be taken from - * Device Tree or platform data. - */ - denali->reg = (void __iomem *)CONFIG_SYS_NAND_REGS_BASE; - denali->host = (void __iomem *)CONFIG_SYS_NAND_DATA_BASE; - - return denali_init(denali); -} - -void board_nand_init(void) -{ - if (__board_nand_init() < 0) - pr_warn("Failed to initialize Denali NAND controller.\n"); -} -#endif -- cgit v1.1 From 6ae3900a86b52429bf7a73ad832f0ad02acc2282 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 30 Nov 2017 13:45:24 +0900 Subject: mtd: nand: Rename nand.h into rawnand.h This header was renamed to rawnand.h in Linux. The following is the corresponding commit in Linux. commit d4092d76a4a4e57b65910899948a83cc8646c5a5 Author: Boris Brezillon Date: Fri Aug 4 17:29:10 2017 +0200 mtd: nand: Rename nand.h into rawnand.h We are planning to share more code between different NAND based devices (SPI NAND, OneNAND and raw NANDs), but before doing that we need to move the existing include/linux/mtd/nand.h file into include/linux/mtd/rawnand.h so we can later create a nand.h header containing all common structure and function prototypes. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/arasan_nfc.c | 2 +- drivers/mtd/nand/denali.h | 2 +- drivers/mtd/nand/denali_spl.c | 2 +- drivers/mtd/nand/fsl_elbc_nand.c | 2 +- drivers/mtd/nand/fsl_ifc_nand.c | 2 +- drivers/mtd/nand/fsl_ifc_spl.c | 2 +- drivers/mtd/nand/mxs_nand.c | 2 +- drivers/mtd/nand/nand_base.c | 2 +- drivers/mtd/nand/nand_bbt.c | 2 +- drivers/mtd/nand/nand_bch.c | 2 +- drivers/mtd/nand/nand_ids.c | 2 +- drivers/mtd/nand/nand_timings.c | 2 +- drivers/mtd/nand/pxa3xx_nand.c | 2 +- drivers/mtd/nand/sunxi_nand.c | 2 +- drivers/mtd/nand/vf610_nfc.c | 2 +- drivers/mtd/nand/zynq_nand.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/arasan_nfc.c b/drivers/mtd/nand/arasan_nfc.c index a8f795d..14b2733 100644 --- a/drivers/mtd/nand/arasan_nfc.c +++ b/drivers/mtd/nand/arasan_nfc.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h index 04b4ae2..bdaea71 100644 --- a/drivers/mtd/nand/denali.h +++ b/drivers/mtd/nand/denali.h @@ -9,7 +9,7 @@ #define __DENALI_H__ #include -#include +#include #include #define DEVICE_RESET 0x0 diff --git a/drivers/mtd/nand/denali_spl.c b/drivers/mtd/nand/denali_spl.c index 3cb9849..1a59b93 100644 --- a/drivers/mtd/nand/denali_spl.c +++ b/drivers/mtd/nand/denali_spl.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include "denali.h" #define DENALI_MAP01 (1 << 26) /* read/write pages in PIO */ diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index b3c23b0..fc3720b 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index a757a3b..d1165f7 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/mtd/nand/fsl_ifc_spl.c b/drivers/mtd/nand/fsl_ifc_spl.c index 4e49a4e..5946194 100644 --- a/drivers/mtd/nand/fsl_ifc_spl.c +++ b/drivers/mtd/nand/fsl_ifc_spl.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #ifdef CONFIG_CHAIN_OF_TRUST #include #endif diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c index d774ab8..bed9b65 100644 --- a/drivers/mtd/nand/mxs_nand.c +++ b/drivers/mtd/nand/mxs_nand.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index aca3231..eb9f121 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #ifdef CONFIG_MTD_PARTITIONS diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 74c4c9a..ba785c5 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c index 6c20d53..b7c1171 100644 --- a/drivers/mtd/nand/nand_bch.c +++ b/drivers/mtd/nand/nand_bch.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index d36f900..4009d64 100644 --- a/drivers/mtd/nand/nand_ids.c +++ b/drivers/mtd/nand/nand_ids.c @@ -7,7 +7,7 @@ * */ #include -#include +#include #include #define LP_OPTIONS NAND_SAMSUNG_LP_OPTIONS diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c index 9935557..c0545a4 100644 --- a/drivers/mtd/nand/nand_timings.c +++ b/drivers/mtd/nand/nand_timings.c @@ -10,7 +10,7 @@ */ #include #include -#include +#include static const struct nand_data_interface onfi_sdr_timings[] = { /* Mode 0 */ diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index cedbb23..a3ca337 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "pxa3xx_nand.h" diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index 8bc3828..532e03c 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c index f99bdaf..dd53f2b 100644 --- a/drivers/mtd/nand/vf610_nfc.c +++ b/drivers/mtd/nand/vf610_nfc.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/mtd/nand/zynq_nand.c b/drivers/mtd/nand/zynq_nand.c index 076b878..6494196 100644 --- a/drivers/mtd/nand/zynq_nand.c +++ b/drivers/mtd/nand/zynq_nand.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.1 From 681ed4d0d5096b16f81c54c3e5a5efdc9f5f0bc1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 30 Nov 2017 13:45:26 +0900 Subject: mtd: nand: denali_dt: replace printf() with pr_err() The Linux derived log functions can be used anywhere and easily turned on/off by CONFIG_LOGLEVEL. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali_dt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index 9d6cb09..c96512f 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd/nand/denali_dt.c @@ -5,11 +5,11 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include #include #include #include #include +#include #include "denali.h" @@ -118,6 +118,6 @@ void board_nand_init(void) DM_GET_DRIVER(denali_nand_dt), &dev); if (ret && ret != -ENODEV) - printf("Failed to initialize Denali NAND controller. (error %d)\n", + pr_err("Failed to initialize Denali NAND controller. (error %d)\n", ret); } -- cgit v1.1 From 0faef2eba946a95f9c78d2b3db47e15bac04b52e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 30 Nov 2017 13:45:27 +0900 Subject: mtd: nand: denali: consolidate include directives Include necessary headers explicitly without relying on indirect header inclusion. , are unneeded. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 8ff2d09..3a67653 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -6,14 +6,14 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include -#include -#include #include +#include #include #include #include #include +#include +#include #include "denali.h" -- cgit v1.1