Lines Matching +full:enable +full:- +full:mask

33 	if (clk->set && (clk->usage++) == 0)  in clk_enable_unlocked()
34 clk->set(clk, 1); in clk_enable_unlocked()
39 if (clk->set && (--clk->usage) == 0) in clk_disable_unlocked()
40 clk->set(clk, 0); in clk_disable_unlocked()
43 static void bcm_hwclock_set(u32 mask, int enable) in bcm_hwclock_set() argument
48 if (enable) in bcm_hwclock_set()
49 reg |= mask; in bcm_hwclock_set()
51 reg &= ~mask; in bcm_hwclock_set()
58 static void enet_misc_set(struct clk *clk, int enable) in enet_misc_set() argument
60 u32 mask; in enet_misc_set() local
63 mask = CKCTL_6338_ENET_EN; in enet_misc_set()
65 mask = CKCTL_6345_ENET_EN; in enet_misc_set()
67 mask = CKCTL_6348_ENET_EN; in enet_misc_set()
70 mask = CKCTL_6358_EMUSB_EN; in enet_misc_set()
71 bcm_hwclock_set(mask, enable); in enet_misc_set()
79 * Ethernet MAC clocks: only revelant on 6358, silently enable misc
82 static void enetx_set(struct clk *clk, int enable) in enetx_set() argument
84 if (enable) in enetx_set()
90 u32 mask; in enetx_set() local
92 if (clk->id == 0) in enetx_set()
93 mask = CKCTL_6358_ENET0_EN; in enetx_set()
95 mask = CKCTL_6358_ENET1_EN; in enetx_set()
96 bcm_hwclock_set(mask, enable); in enetx_set()
113 static void ephy_set(struct clk *clk, int enable) in ephy_set() argument
116 bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable); in ephy_set()
127 static void swpkt_sar_set(struct clk *clk, int enable) in swpkt_sar_set() argument
130 bcm_hwclock_set(CKCTL_6368_SWPKT_SAR_EN, enable); in swpkt_sar_set()
142 static void swpkt_usb_set(struct clk *clk, int enable) in swpkt_usb_set() argument
145 bcm_hwclock_set(CKCTL_6368_SWPKT_USB_EN, enable); in swpkt_usb_set()
157 static void enetsw_set(struct clk *clk, int enable) in enetsw_set() argument
160 bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable); in enetsw_set()
162 bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable); in enetsw_set()
164 if (enable) { in enetsw_set()
171 bcm_hwclock_set(CKCTL_6368_ROBOSW_EN, enable); in enetsw_set()
176 if (enable) { in enetsw_set()
192 static void pcm_set(struct clk *clk, int enable) in pcm_set() argument
195 bcm_hwclock_set(CKCTL_3368_PCM_EN, enable); in pcm_set()
197 bcm_hwclock_set(CKCTL_6358_PCM_EN, enable); in pcm_set()
207 static void usbh_set(struct clk *clk, int enable) in usbh_set() argument
210 bcm_hwclock_set(CKCTL_6328_USBH_EN, enable); in usbh_set()
212 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable); in usbh_set()
214 bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); in usbh_set()
216 bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); in usbh_set()
226 static void usbd_set(struct clk *clk, int enable) in usbd_set() argument
229 bcm_hwclock_set(CKCTL_6328_USBD_EN, enable); in usbd_set()
231 bcm_hwclock_set(CKCTL_6362_USBD_EN, enable); in usbd_set()
233 bcm_hwclock_set(CKCTL_6368_USBD_EN, enable); in usbd_set()
243 static void spi_set(struct clk *clk, int enable) in spi_set() argument
245 u32 mask; in spi_set() local
248 mask = CKCTL_6338_SPI_EN; in spi_set()
250 mask = CKCTL_6348_SPI_EN; in spi_set()
252 mask = CKCTL_6358_SPI_EN; in spi_set()
254 mask = CKCTL_6362_SPI_EN; in spi_set()
257 mask = CKCTL_6368_SPI_EN; in spi_set()
258 bcm_hwclock_set(mask, enable); in spi_set()
268 static void hsspi_set(struct clk *clk, int enable) in hsspi_set() argument
270 u32 mask; in hsspi_set() local
273 mask = CKCTL_6328_HSSPI_EN; in hsspi_set()
275 mask = CKCTL_6362_HSSPI_EN; in hsspi_set()
279 bcm_hwclock_set(mask, enable); in hsspi_set()
294 static void xtm_set(struct clk *clk, int enable) in xtm_set() argument
299 if (enable) in xtm_set()
304 bcm_hwclock_set(CKCTL_6368_SAR_EN, enable); in xtm_set()
306 if (enable) { in xtm_set()
323 static void ipsec_set(struct clk *clk, int enable) in ipsec_set() argument
326 bcm_hwclock_set(CKCTL_6362_IPSEC_EN, enable); in ipsec_set()
328 bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable); in ipsec_set()
339 static void pcie_set(struct clk *clk, int enable) in pcie_set() argument
342 bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable); in pcie_set()
344 bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable); in pcie_set()
389 return clk->rate; in clk_get_rate()
428 CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
504 CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),