control.c (bbd36f9f03eceee5c208db83049142171e6338f6) control.c (ba12c24286296159a1271eb19f2fc5c2ef59fbde)
1/*
2 * OMAP2/3 System Control Module register access
3 *
4 * Copyright (C) 2007, 2012 Texas Instruments, Inc.
5 * Copyright (C) 2007 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 *

--- 550 unchanged lines hidden (view full) ---

559}
560
561/**
562 * omap3_ctrl_set_iva_bootmode_idle - sets the IVA2 bootmode to idle
563 *
564 * Sets the bootmode for IVA2 to idle. This is needed by the PM code to
565 * force disable IVA2 so that it does not prevent any low-power states.
566 */
1/*
2 * OMAP2/3 System Control Module register access
3 *
4 * Copyright (C) 2007, 2012 Texas Instruments, Inc.
5 * Copyright (C) 2007 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 *

--- 550 unchanged lines hidden (view full) ---

559}
560
561/**
562 * omap3_ctrl_set_iva_bootmode_idle - sets the IVA2 bootmode to idle
563 *
564 * Sets the bootmode for IVA2 to idle. This is needed by the PM code to
565 * force disable IVA2 so that it does not prevent any low-power states.
566 */
567void omap3_ctrl_set_iva_bootmode_idle(void)
567static void __init omap3_ctrl_set_iva_bootmode_idle(void)
568{
569 omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
570 OMAP343X_CONTROL_IVA2_BOOTMOD);
571}
572
573/**
574 * omap3_ctrl_setup_d2d_padconf - setup stacked modem pads for idle
575 *
576 * Sets up the pads controlling the stacked modem in such way that the
577 * device can enter idle.
578 */
568{
569 omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
570 OMAP343X_CONTROL_IVA2_BOOTMOD);
571}
572
573/**
574 * omap3_ctrl_setup_d2d_padconf - setup stacked modem pads for idle
575 *
576 * Sets up the pads controlling the stacked modem in such way that the
577 * device can enter idle.
578 */
579void omap3_ctrl_setup_d2d_padconf(void)
579static void __init omap3_ctrl_setup_d2d_padconf(void)
580{
581 u16 mask, padconf;
582
583 /*
584 * In a stand alone OMAP3430 where there is not a stacked
585 * modem for the D2D Idle Ack and D2D MStandby must be pulled
586 * high. S CONTROL_PADCONF_SAD2D_IDLEACK and
587 * CONTROL_PADCONF_SAD2D_MSTDBY to have a pull up.
588 */
589 mask = (1 << 4) | (1 << 3); /* pull-up, enabled */
590 padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_MSTANDBY);
591 padconf |= mask;
592 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_MSTANDBY);
593
594 padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_IDLEACK);
595 padconf |= mask;
596 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
597}
580{
581 u16 mask, padconf;
582
583 /*
584 * In a stand alone OMAP3430 where there is not a stacked
585 * modem for the D2D Idle Ack and D2D MStandby must be pulled
586 * high. S CONTROL_PADCONF_SAD2D_IDLEACK and
587 * CONTROL_PADCONF_SAD2D_MSTDBY to have a pull up.
588 */
589 mask = (1 << 4) | (1 << 3); /* pull-up, enabled */
590 padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_MSTANDBY);
591 padconf |= mask;
592 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_MSTANDBY);
593
594 padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_IDLEACK);
595 padconf |= mask;
596 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
597}
598
599/**
600 * omap3_ctrl_init - does static initializations for control module
601 *
602 * Initializes system control module. This sets up the sysconfig autoidle,
603 * and sets up modem and iva2 so that they can be idled properly.
604 */
605void __init omap3_ctrl_init(void)
606{
607 omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
608
609 omap3_ctrl_set_iva_bootmode_idle();
610
611 omap3_ctrl_setup_d2d_padconf();
612}
598#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
613#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */