Exemplo n.º 1
0
static void omap_mux_hpd_pull_up(bool on)
{
	struct omap_mux_partition *p = omap_mux_get("core");
	u16 mux;

	mux = omap_mux_read(p, OMAP4_CTRL_MODULE_PAD_HDMI_HPD_OFFSET);

	if (on) {
		omap_mux_write(p, mux | OMAP_PULL_UP,
			       OMAP4_CTRL_MODULE_PAD_HDMI_HPD_OFFSET);
	} else {
		omap_mux_write(p, mux & ~OMAP_PULL_UP,
			       OMAP4_CTRL_MODULE_PAD_HDMI_HPD_OFFSET);
	}
}
Exemplo n.º 2
0
/* Enable clock pull up or clock pull down */
static void omap5_clk_pull_up(struct device *dev, int slot, bool up)
{
	struct omap_mmc_platform_data *mmc = dev->platform_data;
	struct omap_mux_partition *p_mmc_clk = mmc->slots[0].p_mmc_clk;
	struct omap_mux *mux_mmc_clk = mmc->slots[0].mux_mmc_clk;
	u16 r_sdcard_clk = 0;

	if ((!p_mmc_clk) || (!mux_mmc_clk)) {
		printk(KERN_ERR "Unable to get SD Card Mux reference\n");
		return;
	}
	r_sdcard_clk = omap_mux_read(p_mmc_clk, mux_mmc_clk->reg_offset);
	if (up)
		r_sdcard_clk |= (0x1 << 4);
	else
		r_sdcard_clk &= ~(0x1 << 4);

	omap_mux_write(p_mmc_clk, r_sdcard_clk, mux_mmc_clk->reg_offset);
}