Re: [PATCH 4/9] ARM: OMAP2+: gpmc-tusb6010: Adapt to use gpmc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Afzal Mohammed <afzal@xxxxxx> [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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux