Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c756462 authored by Bob Liu's avatar Bob Liu Committed by Felipe Balbi
Browse files

USB: musb: blackfin: push clkin value to platform resources



In order to not touch the driver file for different xtal usage,
push the clkin value to board file and calculate the register
value instead of hardcoding it.

Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 68f64714
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -337,7 +337,8 @@ static void musb_platform_reg_init(struct musb *musb)
	}

	/* Configure PLL oscillator register */
	bfin_write_USB_PLLOSC_CTRL(0x30a8);
	bfin_write_USB_PLLOSC_CTRL(0x3080 |
			((480/musb->config->clkin) << 1));
	SSYNC();

	bfin_write_USB_SRP_CLKDIV((get_sclk()/1000) / 32 - 1);
+2 −0
Original line number Diff line number Diff line
@@ -89,6 +89,8 @@ struct musb_hdrc_config {
	/* A GPIO controlling VRSEL in Blackfin */
	unsigned int	gpio_vrsel;
	unsigned int	gpio_vrsel_active;
	/* musb CLKIN in Blackfin in MHZ */
	unsigned char   clkin;
#endif

};