/* ssp_set_clkdiv - set SSP clock divider @div: serial clock rate divider  */
static void ssp_set_scr(struct ssp_device *ssp, u32 div)
/* ssp_set_clkdiv - set SSP clock divider @div: serial clock rate divider  */
static void ssp_set_scr(struct ssp_device *ssp, u32 div)
{
	u32 sscr0 = ssp_read_reg(ssp, SSCR0);
	if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) {
		sscr0 &= ~0x0000ff00;
		sscr0 |= ((div - 2)/2) << 8;
	} else {
		sscr0 &= ~0x000fff00;
		sscr0 |= (div - 1) << 8;
	}
	ssp_write_reg(ssp, SSCR0, sscr0);
}