/* Work out how long the sync pulse lasts Value is 1/(time in seconds)  */
static void calc_hsync(struct w100fb_par *par)
/* Work out how long the sync pulse lasts Value is 1/(time in seconds)  */
static void calc_hsync(struct w100fb_par *par)
{
	unsigned long hsync;
	struct w100_mode *mode = par->mode;
	union crtc_ss_u crtc_ss;
	if (mode->pixclk_src == CLK_SRC_XTAL)
		hsync=par->mach->xtal_freq;
	else
		hsync=((par->fastpll_mode && mode->fast_pll_freq) ? mode->fast_pll_freq : mode->pll_freq)*100000;
	hsync /= (w100_pwr_state.pclk_cntl.f.pclk_post_div + 1);
	crtc_ss.val = readl(remapped_regs + mmCRTC_SS);
	if (crtc_ss.val)
		par->hsync_len = hsync / (crtc_ss.f.ss_end-crtc_ss.f.ss_start);
	else
		par->hsync_len = 0;
}