Exemple #1
0
static void __init tosa_init(void)
{
	int dummy;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
	gpio_set_wake(MFP_PIN_GPIO1, 1);
	/* We can't pass to gpio-keys since it will drop the Reset altfunc */

	init_gpio_reset(TOSA_GPIO_ON_RESET, 0);

	pm_power_off = tosa_poweroff;
	arm_pm_restart = tosa_restart;

	PCFR |= PCFR_OPDE;

	/* enable batt_fault */
	PMCR = 0x01;

	dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12);
	dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12);
	dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16);

	pxa_set_mci_info(&tosa_mci_platform_data);
	pxa_set_udc_info(&udc_info);
	pxa_set_ficp_info(&tosa_ficp_platform_data);
	pxa_set_i2c_info(NULL);
	platform_scoop_config = &tosa_pcmcia_config;

	clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL);

	platform_add_devices(devices, ARRAY_SIZE(devices));
}
Exemple #2
0
static void __init tosa_init(void)
{
	int dummy;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));

	pxa_set_ffuart_info(NULL);
	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);

	gpio_set_wake(MFP_PIN_GPIO1, 1);
	

	init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);

	pm_power_off = tosa_poweroff;

	PCFR |= PCFR_OPDE;

	
	PMCR = 0x01;

	dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12);
	dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12);
	dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16);

	pxa_set_mci_info(&tosa_mci_platform_data);
	pxa_set_ficp_info(&tosa_ficp_platform_data);
	pxa_set_i2c_info(NULL);
	pxa_set_ac97_info(NULL);
	platform_scoop_config = &tosa_pcmcia_config;

	pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
	spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));

	clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);

	platform_add_devices(devices, ARRAY_SIZE(devices));
}
static int __init msm7x30_ssbi_pmic_init(void)
{
	int ret;

	pr_info("%s()\n", __func__);
	msm_gpiomux_write(MSM7X30_GPIO_PMIC_INT_N, 0,
			  GPIOMUX_FUNC_GPIO |
			  GPIOMUX_PULL_NONE |
			  GPIOMUX_DIR_INPUT |
			  GPIOMUX_DRV_2MA | GPIOMUX_VALID);
	ret = gpiochip_reserve(msm7x30_pm8058_pdata.gpio_base,
			       PM8058_NUM_GPIOS);
	WARN(ret, "can't reserve pm8058 gpios. badness will ensue...\n");
	msm_device_ssbi_pmic.dev.platform_data = &msm7x30_ssbi_pmic_pdata;
	return platform_device_register(&msm_device_ssbi_pmic);
}