コード例 #1
0
ファイル: control.c プロジェクト: 0-T-0/ps4-linux
/**
 * omap3_ctrl_setup_d2d_padconf - setup stacked modem pads for idle
 *
 * Sets up the pads controlling the stacked modem in such way that the
 * device can enter idle.
 */
static void __init omap3_ctrl_setup_d2d_padconf(void)
{
	u16 mask, padconf;

	/*
	 * In a stand alone OMAP3430 where there is not a stacked
	 * modem for the D2D Idle Ack and D2D MStandby must be pulled
	 * high. S CONTROL_PADCONF_SAD2D_IDLEACK and
	 * CONTROL_PADCONF_SAD2D_MSTDBY to have a pull up.
	 */
	mask = (1 << 4) | (1 << 3); /* pull-up, enabled */
	padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_MSTANDBY);
	padconf |= mask;
	omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_MSTANDBY);

	padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_IDLEACK);
	padconf |= mask;
	omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
}
コード例 #2
0
ファイル: mux.c プロジェクト: embest-tech/rowboat-kernel
static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg)
{
	u16 orig;
	u8 warn = 0, debug = 0;

	if (cpu_is_omap24xx())
		orig = omap_ctrl_readb(cfg->mux_reg);
	else
		orig = omap_ctrl_readw(cfg->mux_reg);

#ifdef	CONFIG_OMAP_MUX_DEBUG
	debug = cfg->debug;
#endif
	warn = (orig != reg);
	if (debug || warn)
		printk(KERN_WARNING
			"MUX: setup %s (0x%p): 0x%04x -> 0x%04x\n",
			cfg->name, omap_ctrl_base_get() + cfg->mux_reg,
			orig, reg);
}