mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[brcm63xx] fix SPI register switch and prepare for UDC, thanks to Henk Vergonet (#4783)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14914 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -136,6 +136,26 @@ static struct clk clk_usbh = {
|
||||
.set = usbh_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* USB slave clock
|
||||
*/
|
||||
static void usbs_set(struct clk *clk, int enable)
|
||||
{
|
||||
u32 mask;
|
||||
|
||||
switch(bcm63xx_get_cpu_id()) {
|
||||
case BCM6338_CPU_ID: mask = CKCTL_6338_USBS_EN; break;
|
||||
case BCM6348_CPU_ID: mask = CKCTL_6348_USBS_EN; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
bcm_hwclock_set(mask, enable);
|
||||
}
|
||||
|
||||
static struct clk clk_usbs = {
|
||||
.set = usbs_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* SPI clock
|
||||
*/
|
||||
@@ -202,6 +222,8 @@ struct clk *clk_get(struct device *dev, const char *id)
|
||||
return &clk_ephy;
|
||||
if (!strcmp(id, "usbh"))
|
||||
return &clk_usbh;
|
||||
if (!strcmp(id, "usbs"))
|
||||
return &clk_usbs;
|
||||
if (!strcmp(id, "spi"))
|
||||
return &clk_spi;
|
||||
if (!strcmp(id, "periph"))
|
||||
|
||||
Reference in New Issue
Block a user