[PATCH 4/9] ARM: OMAP2+: gpmc-tusb6010: Adapt to use gpmc driver
Tony Lindgren
tony at atomide.com
Wed Jun 13 08:27:48 EDT 2012
* Afzal Mohammed <afzal at ti.com> [120611 08:19]:
> @@ -106,7 +123,14 @@ static int tusb_set_async_mode(unsigned sysclk_ps, unsigned fclk_ps)
> tmp = t.cs_wr_off * 1000 + 7000 /* t_acsn_rdy_z */;
> t.wr_cycle = next_clk(t.cs_wr_off, tmp, fclk_ps);
>
> - return gpmc_cs_set_timings(async_cs, &t);
> + /* gpmc driver interface */
> + if (gpmc_tusb_data.pdata != NULL) {
> + gpmc_tusb_cs_data[CS_ASYNC_IDX].time_ctrl.type = has_period;
> + gpmc_tusb_cs_data[CS_ASYNC_IDX].time_ctrl.timings = t;
> + return 0;
> + /* old interface */
> + } else
> + return gpmc_cs_set_timings(async_cs, &t);
> }
>
> static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps)
> @@ -174,7 +198,16 @@ static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps)
> tmp = t.cs_wr_off * 1000 + 7000 /* t_scsn_rdy_z */;
> t.wr_cycle = next_clk(t.cs_wr_off, tmp, fclk_ps);
>
> - return gpmc_cs_set_timings(sync_cs, &t);
> + t.clk_activation = gpmc_ticks_to_ns(1);
> +
> + /* gpmc driver interface */
> + if (gpmc_tusb_data.pdata != NULL) {
> + gpmc_tusb_cs_data[CS_SYNC_IDX].time_ctrl.type = has_period;
> + gpmc_tusb_cs_data[CS_SYNC_IDX].time_ctrl.timings = t;
> + return 0;
> + /* old interface */
> + } else
> + return gpmc_cs_set_timings(sync_cs, &t);
> }
We can drop the old interface for non-mainline cases. In this case
tusb6010 is only used by board-n8x0.c, so it's best to just convert
it all to use the new interface.
Regards,
Tony
More information about the linux-arm-kernel
mailing list