Skip to content

Commit

Permalink
MIPS: Alchemy: use IS_ENABLED() macro
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3331/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Florian Fainelli authored and Ralf Baechle committed Jul 23, 2012
1 parent 889a4c7 commit 4bd5a57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions arch/mips/alchemy/board-mtx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ static void mtx1_power_off(void)

void __init board_setup(void)
{
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
/* Enable USB power switch */
alchemy_gpio_direction_output(204, 0);
#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */

/* Initialize sys_pinfunc */
au_writel(SYS_PF_NI2, SYS_PINFUNC);
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/alchemy/devboards/pb1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void __init board_setup(void)
alchemy_gpio1_input_enable();
udelay(100);

#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
{
u32 pin_func, sys_freqctrl, sys_clksrc;

Expand Down Expand Up @@ -93,7 +93,7 @@ void __init board_setup(void)
pin_func |= SYS_PF_USB;
au_writel(pin_func, SYS_PINFUNC);
}
#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */

/* Enable sys bus clock divider when IDLE state or no bus activity. */
au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/alchemy/devboards/pb1500.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void __init board_setup(void)
alchemy_gpio_direction_input(201);
alchemy_gpio_direction_input(203);

#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
#if IS_ENABLED(CONFIG_USB_OHCI_HCD)

/* Zero and disable FREQ2 */
sys_freqctrl = au_readl(SYS_FREQCTRL0);
Expand Down Expand Up @@ -87,7 +87,7 @@ void __init board_setup(void)
/* 2nd USB port is USB host */
pin_func |= SYS_PF_USB;
au_writel(pin_func, SYS_PINFUNC);
#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */

#ifdef CONFIG_PCI
{
Expand Down

0 comments on commit 4bd5a57

Please sign in to comment.