diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2013-10-27 20:51:47 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-01-08 12:49:35 -0500 |
commit | d0020cc6384eb7edd56ba4769115c9497694e303 (patch) | |
tree | c3e967b04da9b56429622543895a90e0e1a019a3 /arch | |
parent | e2e699b193ab1ff2d635fb4989695e791264e01e (diff) |
ARM: OMAP2+: gpmc: Introduce gpmc_set_legacy()
Introduce a helper function to complete the setting of some GPMC
parameters, only used when the gpmc is probed from a board file.
As such, it will go away once the DT conversion is completed.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/gpmc-nand.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index d66b85692a58..9dd40e70aca3 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -65,6 +65,17 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) | |||
65 | return 1; | 65 | return 1; |
66 | } | 66 | } |
67 | 67 | ||
68 | /* This function will go away once the device-tree convertion is complete */ | ||
69 | static void gpmc_set_legacy(struct omap_nand_platform_data *gpmc_nand_data, | ||
70 | struct gpmc_settings *s) | ||
71 | { | ||
72 | /* Enable RD PIN Monitoring Reg */ | ||
73 | if (gpmc_nand_data->dev_ready) { | ||
74 | s->wait_on_read = true; | ||
75 | s->wait_on_write = true; | ||
76 | } | ||
77 | } | ||
78 | |||
68 | int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, | 79 | int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, |
69 | struct gpmc_timings *gpmc_t) | 80 | struct gpmc_timings *gpmc_t) |
70 | { | 81 | { |
@@ -100,15 +111,10 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, | |||
100 | } | 111 | } |
101 | } | 112 | } |
102 | 113 | ||
103 | if (gpmc_nand_data->of_node) { | 114 | if (gpmc_nand_data->of_node) |
104 | gpmc_read_settings_dt(gpmc_nand_data->of_node, &s); | 115 | gpmc_read_settings_dt(gpmc_nand_data->of_node, &s); |
105 | } else { | 116 | else |
106 | /* Enable RD PIN Monitoring Reg */ | 117 | gpmc_set_legacy(gpmc_nand_data, &s); |
107 | if (gpmc_nand_data->dev_ready) { | ||
108 | s.wait_on_read = true; | ||
109 | s.wait_on_write = true; | ||
110 | } | ||
111 | } | ||
112 | 118 | ||
113 | s.device_nand = true; | 119 | s.device_nand = true; |
114 | 120 | ||