Example #1
0
static void __init mioa701_machine_init(void)
{
	PSLR  = 0xff100000; /* SYSDEL=125ms, PWRDEL=125ms, PSLR_SL_ROD=1 */
	PCFR = PCFR_DC_EN | PCFR_GPR_EN | PCFR_OPDE;
	RTTR = 32768 - 1; /* Reset crazy WinCE value */
	UP2OCR = UP2OCR_HXOE;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
	pxa_set_ffuart_info(NULL);
	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);
	mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
	bootstrap_init();
	pxa_set_fb_info(NULL, &mioa701_pxafb_info);
	pxa_set_mci_info(&mioa701_mci_info);
	pxa_set_keypad_info(&mioa701_keypad_info);
	pxa_set_udc_info(&mioa701_udc_info);
	pxa_set_ac97_info(&mioa701_ac97_info);
	pm_power_off = mioa701_poweroff;
	arm_pm_restart = mioa701_restart;
	platform_add_devices(devices, ARRAY_SIZE(devices));
	gsm_init();

	i2c_register_board_info(1, ARRAY_AND_SIZE(mioa701_pi2c_devices));
	pxa_set_i2c_info(&i2c_pdata);
	pxa27x_set_i2c_power_info(NULL);
	pxa_set_camera_info(&mioa701_pxacamera_platform_data);
}
Example #2
0
/**
 * The card detect interrupt isn't debounced so we delay it by 250ms
 * to give the card a chance to fully insert/eject.
 */
static int mci_init(struct device *dev, irq_handler_t detect_int, void *data)
{
	int rc;
	int irq = gpio_to_irq(GPIO15_SDIO_INSERT);

	rc = mio_gpio_request(ARRAY_AND_SIZE(mci_gpios));
	if (rc)
		goto err_gpio;
	/* enable RE/FE interrupt on card insertion and removal */
	rc = request_irq(irq, detect_int,
			 IRQF_DISABLED | IRQF_TRIGGER_RISING |
			 IRQF_TRIGGER_FALLING,
			 "MMC card detect", data);
	if (rc)
		goto err_irq;

	mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
	return 0;

err_irq:
	dev_err(dev, "mioa701_mci_init: MMC/SD:"
		" can't request MMC card detect IRQ\n");
	mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
err_gpio:
	return rc;
}
Example #3
0
File: mioa701.c Project: E-LLP/n900
static void __init mioa701_machine_init(void)
{
	PSLR  = 0xff100000; /* SYSDEL=125ms, PWRDEL=125ms, PSLR_SL_ROD=1 */
	PCFR = PCFR_DC_EN | PCFR_GPR_EN | PCFR_OPDE;
	RTTR = 32768 - 1; /* Reset crazy WinCE value */
	UP2OCR = UP2OCR_HXOE;

	pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
	mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
	bootstrap_init();
	set_pxa_fb_info(&mioa701_pxafb_info);
	pxa_set_mci_info(&mioa701_mci_info);
	pxa_set_keypad_info(&mioa701_keypad_info);
	udc_init();
	pm_power_off = mioa701_poweroff;
	arm_pm_restart = mioa701_restart;
	platform_add_devices(devices, ARRAY_SIZE(devices));
	gsm_init();
	mioa701_battery_init();
}
Example #4
0
static int __init gsm_init(void)
{
	int rc;

	rc = mio_gpio_request(ARRAY_AND_SIZE(gsm_gpios));
	if (rc)
		goto err_gpio;
	rc = request_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), gsm_on_irq,
			 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
			 "GSM XS200 Power Irq", NULL);
	if (rc)
		goto err_irq;

	gpio_set_wake(GPIO113_GSM_EVENT, 1);
	return 0;

err_irq:
	printk(KERN_ERR "Mioa701: Can't request GSM_ON irq\n");
	mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios));
err_gpio:
	printk(KERN_ERR "Mioa701: gsm not available\n");
	return rc;
}
Example #5
0
static int __init udc_init(void)
{
	pxa_set_udc_info(&mioa701_udc_info);
	return mio_gpio_request(ARRAY_AND_SIZE(udc_gpios));
}