diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-10-11 18:23:02 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-11-15 08:37:47 -0500 |
commit | db6364a650edcb076786092c7f85f1e1cdae8b20 (patch) | |
tree | f7bd44c6086f7ce768ccef95c27ef6a5145538cf /arch/arm/mach-nomadik | |
parent | 6d7b42a447f92eb3e7e410bbf62042693eb040f7 (diff) |
ARM: nomadik: fixup some FSMC merge problems
Due to a clash between refactoring and due to loss of a header
file that remained in my working tree the Nomadik stopped
compiling after switching to the FSMC driver. This patch fixes
it up.
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'arch/arm/mach-nomadik')
-rw-r--r-- | arch/arm/mach-nomadik/board-nhk8815.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index a105d1b79758..3f97ef40ce6b 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -37,14 +37,15 @@ | |||
37 | #include <plat/mtu.h> | 37 | #include <plat/mtu.h> |
38 | #include <plat/pincfg.h> | 38 | #include <plat/pincfg.h> |
39 | 39 | ||
40 | #include <mach/fsmc.h> | ||
41 | |||
42 | #include "cpu-8815.h" | 40 | #include "cpu-8815.h" |
43 | 41 | ||
44 | /* Initial value for SRC control register: all timers use MXTAL/8 source */ | 42 | /* Initial value for SRC control register: all timers use MXTAL/8 source */ |
45 | #define SRC_CR_INIT_MASK 0x00007fff | 43 | #define SRC_CR_INIT_MASK 0x00007fff |
46 | #define SRC_CR_INIT_VAL 0x2aaa8000 | 44 | #define SRC_CR_INIT_VAL 0x2aaa8000 |
47 | 45 | ||
46 | #define ALE_OFF 0x1000000 | ||
47 | #define CLE_OFF 0x800000 | ||
48 | |||
48 | /* These addresses span 16MB, so use three individual pages */ | 49 | /* These addresses span 16MB, so use three individual pages */ |
49 | static struct resource nhk8815_nand_resources[] = { | 50 | static struct resource nhk8815_nand_resources[] = { |
50 | { | 51 | { |
@@ -53,6 +54,16 @@ static struct resource nhk8815_nand_resources[] = { | |||
53 | .end = 0x40000000 + SZ_16K - 1, | 54 | .end = 0x40000000 + SZ_16K - 1, |
54 | .flags = IORESOURCE_MEM, | 55 | .flags = IORESOURCE_MEM, |
55 | }, { | 56 | }, { |
57 | .name = "nand_addr", | ||
58 | .start = 0x40000000 + ALE_OFF, | ||
59 | .end = 0x40000000 +ALE_OFF + SZ_16K - 1, | ||
60 | .flags = IORESOURCE_MEM, | ||
61 | }, { | ||
62 | .name = "nand_cmd", | ||
63 | .start = 0x40000000 + CLE_OFF, | ||
64 | .end = 0x40000000 + CLE_OFF + SZ_16K - 1, | ||
65 | .flags = IORESOURCE_MEM, | ||
66 | }, { | ||
56 | .name = "fsmc_regs", | 67 | .name = "fsmc_regs", |
57 | .start = NOMADIK_FSMC_BASE, | 68 | .start = NOMADIK_FSMC_BASE, |
58 | .end = NOMADIK_FSMC_BASE + SZ_4K - 1, | 69 | .end = NOMADIK_FSMC_BASE + SZ_4K - 1, |
@@ -105,8 +116,6 @@ static struct fsmc_nand_platform_data nhk8815_nand_platform_data = { | |||
105 | .partitions = nhk8815_partitions, | 116 | .partitions = nhk8815_partitions, |
106 | .nr_partitions = ARRAY_SIZE(nhk8815_partitions), | 117 | .nr_partitions = ARRAY_SIZE(nhk8815_partitions), |
107 | .width = FSMC_NAND_BW8, | 118 | .width = FSMC_NAND_BW8, |
108 | .ale_off = 0x1000000, | ||
109 | .cle_off = 0x800000, | ||
110 | }; | 119 | }; |
111 | 120 | ||
112 | static struct platform_device nhk8815_nand_device = { | 121 | static struct platform_device nhk8815_nand_device = { |
@@ -171,6 +180,10 @@ static struct platform_device nhk8815_onenand_device = { | |||
171 | .num_resources = ARRAY_SIZE(nhk8815_onenand_resource), | 180 | .num_resources = ARRAY_SIZE(nhk8815_onenand_resource), |
172 | }; | 181 | }; |
173 | 182 | ||
183 | /* bus control reg. and bus timing reg. for CS0..CS3 */ | ||
184 | #define FSMC_BCR(x) (NOMADIK_FSMC_VA + (x << 3)) | ||
185 | #define FSMC_BTR(x) (NOMADIK_FSMC_VA + (x << 3) + 0x04) | ||
186 | |||
174 | static void __init nhk8815_onenand_init(void) | 187 | static void __init nhk8815_onenand_init(void) |
175 | { | 188 | { |
176 | #ifdef CONFIG_MTD_ONENAND | 189 | #ifdef CONFIG_MTD_ONENAND |