Skip to content

Commit 02bfc4e

Browse files
shiraz-zzDavid Woodhouse
authored andcommitted
mtd: fsmc: Move ALE, CLE defines to their respective platform
Address Latch Enable (ALE) and Command Latch Enable (CLE) defines are platform specific and were wrongly put in driver specific fsmc.h file. Move such defines to their respective platform. Also instead of relying on fsmc driver, pass ALE, CLE offsets explicitly from individual platform. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
1 parent b2acc92 commit 02bfc4e

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

‎arch/arm/mach-u300/core.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,8 @@ static struct fsmc_nand_platform_data nand_platform_data = {
15741574
.nr_partitions = ARRAY_SIZE(u300_partitions),
15751575
.options = NAND_SKIP_BBTSCAN,
15761576
.width = FSMC_NAND_BW8,
1577+
.ale_off = PLAT_NAND_ALE,
1578+
.cle_off = PLAT_NAND_CLE,
15771579
};
15781580

15791581
static struct platform_device nand_device = {

‎arch/arm/mach-u300/include/mach/u300-regs.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
/* NFIF */
3131
#define U300_NAND_IF_PHYS_BASE 0x9f800000
3232

33+
/* ALE, CLE offset for FSMC NAND */
34+
#define PLAT_NAND_CLE (1 << 16)
35+
#define PLAT_NAND_ALE (1 << 17)
36+
37+
3338
/* AHB Peripherals */
3439
#define U300_AHB_PER_PHYS_BASE 0xa0000000
3540
#define U300_AHB_PER_VIRT_BASE 0xff010000

‎include/linux/mtd/fsmc.h‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@
2626
#define FSMC_NAND_BW8 1
2727
#define FSMC_NAND_BW16 2
2828

29-
/*
30-
* The placement of the Command Latch Enable (CLE) and
31-
* Address Latch Enable (ALE) is twisted around in the
32-
* SPEAR310 implementation.
33-
*/
34-
#if defined(CONFIG_MACH_SPEAR310)
35-
#define PLAT_NAND_CLE (1 << 17)
36-
#define PLAT_NAND_ALE (1 << 16)
37-
#else
38-
#define PLAT_NAND_CLE (1 << 16)
39-
#define PLAT_NAND_ALE (1 << 17)
40-
#endif
41-
4229
#define FSMC_MAX_NOR_BANKS 4
4330
#define FSMC_MAX_NAND_BANKS 4
4431

0 commit comments

Comments
 (0)