Skip to content

Commit

Permalink
USB: musb: blackfin: push clkin value to platform resources
Browse files Browse the repository at this point in the history
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: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Bob Liu authored and Felipe Balbi committed Nov 5, 2010
1 parent 68f6471 commit 9c75646
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/musb/blackfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions include/linux/usb/musb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

};
Expand Down

0 comments on commit 9c75646

Please sign in to comment.