示例#1
0
void s3c_fimc0_cfg_gpio(struct platform_device *pdev)
{
	int i;

	s3c_gpio_cfgpin(S5PC11X_GPE0(0), S5PC11X_GPE0_0_CAM_A_PCLK);
	s3c_gpio_cfgpin(S5PC11X_GPE0(1), S5PC11X_GPE0_1_CAM_A_VSYNC);
	s3c_gpio_cfgpin(S5PC11X_GPE0(2), S5PC11X_GPE0_2_CAM_A_HREF);
	s3c_gpio_cfgpin(S5PC11X_GPE0(3), S5PC11X_GPE0_3_CAM_A_DATA_0);
	s3c_gpio_cfgpin(S5PC11X_GPE0(4), S5PC11X_GPE0_4_CAM_A_DATA_1);
	s3c_gpio_cfgpin(S5PC11X_GPE0(5), S5PC11X_GPE0_5_CAM_A_DATA_2);
	s3c_gpio_cfgpin(S5PC11X_GPE0(6), S5PC11X_GPE0_6_CAM_A_DATA_3);
	s3c_gpio_cfgpin(S5PC11X_GPE0(7), S5PC11X_GPE0_7_CAM_A_DATA_4);
	s3c_gpio_cfgpin(S5PC11X_GPE1(0), S5PC11X_GPE1_0_CAM_A_DATA_5);
	s3c_gpio_cfgpin(S5PC11X_GPE1(1), S5PC11X_GPE1_1_CAM_A_DATA_6);
	s3c_gpio_cfgpin(S5PC11X_GPE1(2), S5PC11X_GPE1_2_CAM_A_DATA_7);
	s3c_gpio_cfgpin(S5PC11X_GPE1(3), S5PC11X_GPE1_3_CAM_A_CLKOUT);
	s3c_gpio_cfgpin(S5PC11X_GPE1(4), S5PC11X_GPE1_4_CAM_A_FIELD);

	for (i = 0; i < 8; i++)
		s3c_gpio_setpull(S5PC11X_GPE0(i), S3C_GPIO_PULL_NONE);

	for (i = 0; i < 5; i++)
		s3c_gpio_setpull(S5PC11X_GPE1(i), S3C_GPIO_PULL_NONE);

	s3c_gpio_cfgpin(S5PC11X_GPJ0(0), S5PC11X_GPJ0_0_CAM_B_DATA_0);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(1), S5PC11X_GPJ0_1_CAM_B_DATA_1);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(2), S5PC11X_GPJ0_2_CAM_B_DATA_2);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(3), S5PC11X_GPJ0_3_CAM_B_DATA_3);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(4), S5PC11X_GPJ0_4_CAM_B_DATA_4);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(5), S5PC11X_GPJ0_5_CAM_B_DATA_5);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(6), S5PC11X_GPJ0_6_CAM_B_DATA_6);
	s3c_gpio_cfgpin(S5PC11X_GPJ0(7), S5PC11X_GPJ0_7_CAM_B_DATA_7);
	s3c_gpio_cfgpin(S5PC11X_GPJ1(0), S5PC11X_GPJ1_0_CAM_B_PCLK);
	s3c_gpio_cfgpin(S5PC11X_GPJ1(1), S5PC11X_GPJ1_1_CAM_B_VSYNC);
	s3c_gpio_cfgpin(S5PC11X_GPJ1(2), S5PC11X_GPJ1_2_CAM_B_HREF);
	s3c_gpio_cfgpin(S5PC11X_GPJ1(3), S5PC11X_GPJ1_3_CAM_B_FIELD);
	s3c_gpio_cfgpin(S5PC11X_GPJ1(4), S5PC11X_GPJ1_4_CAM_B_CLKOUT);

	for (i = 0; i < 8; i++)
		s3c_gpio_setpull(S5PC11X_GPJ0(i), S3C_GPIO_PULL_NONE);

	for (i = 0; i < 5; i++)
		s3c_gpio_setpull(S5PC11X_GPJ1(i), S3C_GPIO_PULL_NONE);

	/* drive strength to max */
	writel(0xc0, S5PC11X_VA_GPIO + 0x10c);
	writel(0x300, S5PC11X_VA_GPIO + 0x26c);
}
示例#2
0
			.ngpio	= S5PC11X_GPIO_H3_NR,
			.label	= "GPH3",
		},
	}, {
		.base	= S5PC11X_GPI_BASE,
		.config	= &gpio_cfg,
		.chip	= {
			.base	= S5PC11X_GPI(0),
			.ngpio	= S5PC11X_GPIO_I_NR,
			.label	= "GPI",
		},
	}, {
		.base	= S5PC11X_GPJ0_BASE,
		.config	= &gpio_cfg,
		.chip	= {
			.base	= S5PC11X_GPJ0(0),
			.ngpio	= S5PC11X_GPIO_J0_NR,
			.label	= "GPJ0",
		},
	}, {
		.base	= S5PC11X_GPJ1_BASE,
		.config	= &gpio_cfg,
		.chip	= {
			.base	= S5PC11X_GPJ1(0),
			.ngpio	= S5PC11X_GPIO_J1_NR,
			.label	= "GPJ1",
		},
	}, {
		.base	= S5PC11X_GPJ2_BASE,
		.config	= &gpio_cfg,
		.chip	= {