static void setup_sdhci0_irq_cd (void)
{
	/* init GPIO as a ext irq */
	s3c_gpio_cfgpin(S5P64XX_GPN(13), S3C_GPIO_SFN(2));
	s3c_gpio_setpull(S5P64XX_GPN(13), S3C_GPIO_PULL_NONE);

	set_irq_type(S3C_EINT(13), IRQ_TYPE_EDGE_BOTH);
}
Exemple #2
0
static void s5p64xx_pm_configure_extint(void)
{
#if 0 
	s3c_gpio_cfgpin(S5P64XX_GPN(10), S5P64XX_GPN10_EINT10);
	s3c_gpio_setpull(S5P64XX_GPN(10), S3C_GPIO_PULL_UP);
#else
	__raw_writel((__raw_readl(S5P64XX_GPNCON) & ~(0x3 << 20)) |
		     (0x2 << 20), S5P64XX_GPNCON);
	__raw_writel((__raw_readl(S5P64XX_GPNPUD) & ~(0x3 << 20)) |
		     (0x2 << 20), S5P64XX_GPNPUD);
#endif
	udelay(50);

	__raw_writel((__raw_readl(S5P64XX_EINT0CON0) & ~(0x7 << 20)) |
		     (0x2 << 20), S5P64XX_EINT0CON0);

	__raw_writel(1UL << (IRQ_EINT(10) - IRQ_EINT(0)), S5P64XX_EINT0PEND);
	__raw_writel(__raw_readl(S5P64XX_EINT0MASK)&~(1UL << (IRQ_EINT(10) - IRQ_EINT(0))), S5P64XX_EINT0MASK);
}
Exemple #3
0
int s3cfb_set_gpio(void)
{
	int i, err;

	int val;
	val = readl(S5P64XX_SPC_BASE);
	val &= ~0x3;
	val |= (1 << 0);
	writel(val, S5P64XX_SPC_BASE);

	/* LCD_HSYNC, LCD_VSYNC, LCD_VDEN, LCD_VCLK, VD[23:0] */
	for (i = 0; i < 16; i++)
		s3c_gpio_cfgpin(S5P64XX_GPI(i), S3C_GPIO_SFN(2));

	for (i = 0; i < 12; i++)
		s3c_gpio_cfgpin(S5P64XX_GPJ(i), S3C_GPIO_SFN(2));

#ifndef CONFIG_BACKLIGHT_PWM
	/* backlight ON */
	if (gpio_is_valid(S5P64XX_GPF(15))) {
		err = gpio_request(S5P64XX_GPF(15), "GPF");

		if (err) {
			printk(KERN_ERR "failed to request GPD for "
				"lcd backlight control\n");
			return err;
		}

		gpio_direction_output(S5P64XX_GPF(15), 1);
	}
#endif
	/* module reset */
	if (gpio_is_valid(S5P64XX_GPN(5))) {
		err = gpio_request(S5P64XX_GPN(5), "GPN");

		if (err) {
			printk(KERN_ERR "failed to request GPH0 for "
				"lcd reset control\n");
			return err;
		}

		gpio_direction_output(S5P64XX_GPN(5), 1);
	}

	mdelay(100);

	gpio_set_value(S5P64XX_GPN(5), 0);
	mdelay(10);

	gpio_set_value(S5P64XX_GPN(5), 1);
	mdelay(10);

	gpio_free(S5P64XX_GPN(5));
	gpio_free(S5P64XX_GPF(15));

	return 0;
}
Exemple #4
0
	}, {
		.base		= S5P64XX_GPJ_BASE,
		.config		= &gpio_2bit_cfg_noint,
		.config_slp	= &gpio_cfg_slp,
		.chip	= {
			.base	= S5P64XX_GPJ(0),
			.ngpio	= S5P64XX_GPIO_J_NR,
			.label	= "GPJ",
		},
	}, {
		.base		= S5P64XX_GPN_BASE,
		.config		= &gpio_2bit_cfg_eint10,
		.config_slp	= NULL,
		.chip	= {
			.to_irq	= s3c_gpn_to_irq,
			.base	= S5P64XX_GPN(0),
			.ngpio	= S5P64XX_GPIO_N_NR,
			.label	= "GPN",
		},
	}, {
		.base		= S5P64XX_GPP_BASE,
		.config		= &gpio_2bit_cfg_eint11,
		.config_slp	= &gpio_cfg_slp,
		.chip	= {
			.base	= S5P64XX_GPP(0),
			.ngpio	= S5P64XX_GPIO_P_NR,
			.to_irq	= s3c_gpp_to_irq,
			.label	= "GPP",
		},
	},
};