aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/gpmc-onenand.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-onenand.c')
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index db52c4b28f8b..e175ceb0dc05 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -47,6 +47,15 @@ static struct platform_device gpmc_onenand_device = {
47 .resource = &gpmc_onenand_resource, 47 .resource = &gpmc_onenand_resource,
48}; 48};
49 49
50static struct gpmc_settings onenand_async = {
51 .mux_add_data = GPMC_MUX_AD,
52};
53
54static struct gpmc_settings onenand_sync = {
55 .burst_read = true,
56 .mux_add_data = GPMC_MUX_AD,
57};
58
50static void omap2_onenand_calc_async_timings(struct gpmc_timings *t) 59static void omap2_onenand_calc_async_timings(struct gpmc_timings *t)
51{ 60{
52 struct gpmc_device_timings dev_t; 61 struct gpmc_device_timings dev_t;
@@ -63,7 +72,6 @@ static void omap2_onenand_calc_async_timings(struct gpmc_timings *t)
63 72
64 memset(&dev_t, 0, sizeof(dev_t)); 73 memset(&dev_t, 0, sizeof(dev_t));
65 74
66 dev_t.mux = true;
67 dev_t.t_avdp_r = max_t(int, t_avdp, t_cer) * 1000; 75 dev_t.t_avdp_r = max_t(int, t_avdp, t_cer) * 1000;
68 dev_t.t_avdp_w = dev_t.t_avdp_r; 76 dev_t.t_avdp_w = dev_t.t_avdp_r;
69 dev_t.t_aavdh = t_aavdh * 1000; 77 dev_t.t_aavdh = t_aavdh * 1000;
@@ -75,7 +83,7 @@ static void omap2_onenand_calc_async_timings(struct gpmc_timings *t)
75 dev_t.t_wpl = t_wpl * 1000; 83 dev_t.t_wpl = t_wpl * 1000;
76 dev_t.t_wph = t_wph * 1000; 84 dev_t.t_wph = t_wph * 1000;
77 85
78 gpmc_calc_timings(t, &dev_t); 86 gpmc_calc_timings(t, &onenand_async, &dev_t);
79} 87}
80 88
81static int gpmc_set_async_mode(int cs, struct gpmc_timings *t) 89static int gpmc_set_async_mode(int cs, struct gpmc_timings *t)
@@ -235,10 +243,8 @@ static void omap2_onenand_calc_sync_timings(struct gpmc_timings *t,
235 /* Set synchronous read timings */ 243 /* Set synchronous read timings */
236 memset(&dev_t, 0, sizeof(dev_t)); 244 memset(&dev_t, 0, sizeof(dev_t));
237 245
238 dev_t.mux = true;
239 dev_t.sync_read = true;
240 if (onenand_flags & ONENAND_FLAG_SYNCWRITE) { 246 if (onenand_flags & ONENAND_FLAG_SYNCWRITE) {
241 dev_t.sync_write = true; 247 onenand_sync.sync_write = true;
242 } else { 248 } else {
243 dev_t.t_avdp_w = max(t_avdp, t_cer) * 1000; 249 dev_t.t_avdp_w = max(t_avdp, t_cer) * 1000;
244 dev_t.t_wpl = t_wpl * 1000; 250 dev_t.t_wpl = t_wpl * 1000;
@@ -261,7 +267,7 @@ static void omap2_onenand_calc_sync_timings(struct gpmc_timings *t,
261 dev_t.cyc_aavdh_oe = 1; 267 dev_t.cyc_aavdh_oe = 1;
262 dev_t.t_rdyo = t_rdyo * 1000 + min_gpmc_clk_period; 268 dev_t.t_rdyo = t_rdyo * 1000 + min_gpmc_clk_period;
263 269
264 gpmc_calc_timings(t, &dev_t); 270 gpmc_calc_timings(t, &onenand_sync, &dev_t);
265} 271}
266 272
267static int gpmc_set_sync_mode(int cs, struct gpmc_timings *t) 273static int gpmc_set_sync_mode(int cs, struct gpmc_timings *t)