예제 #1
0
static void __init mop500_init_machine(void)
{
	int i2c0_devs;

	/*
	 * The HREFv60 board removed a GPIO expander and routed
	 * all these GPIO pins to the internal GPIO controller
	 * instead.
	 */
	if (machine_is_hrefv60())
		mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
	else
		mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

	u8500_init_devices();

	mop500_pins_init();

	platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));

	mop500_i2c_init();
	mop500_sdi_init();
	mop500_spi_init();
	mop500_uart_init();

	platform_device_register(&ab8500_device);

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
	if (machine_is_hrefv60())
		i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));
}
예제 #2
0
static void __init mop500_init_machine(void)
{
	struct device *parent = NULL;
	int i2c0_devs;
	int i;

	mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

	mop500_pinmaps_init();
	parent = u8500_init_devices(&ab8500_platdata);

	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
		mop500_platform_devs[i]->dev.parent = parent;

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init(parent);
	mop500_sdi_init(parent);
	mop500_spi_init(parent);
	mop500_audio_init(parent);
	mop500_uart_init(parent);

	u8500_cryp1_hash1_init(parent);

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
예제 #3
0
static void __init mop500_init_machine(void)
{
	struct device *parent = NULL;
	int i;

	platform_device_register(&db8500_prcmu_device);
	mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

	sdi0_reg_info.enable_gpio = GPIO_SDMMC_EN;
	sdi0_reg_info.gpios[0].gpio = GPIO_SDMMC_1V8_3V_SEL;

	mop500_pinmaps_init();
	parent = u8500_init_devices();

	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
		mop500_platform_devs[i]->dev.parent = parent;

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init(parent);
	mop500_sdi_init(parent);
	mop500_spi_init(parent);
	mop500_audio_init(parent);
	mop500_uart_init(parent);
	u8500_cryp1_hash1_init(parent);

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
예제 #4
0
static void __init mop500_init_machine(void)
{
	int i2c0_devs;

	mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

	u8500_init_devices();

	mop500_pins_init();

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init();
	mop500_sdi_init();
	mop500_spi_init();
	mop500_uart_init();

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
예제 #5
0
static void __init u8500_init_machine(void)
{
	int i;

	u8500_init_devices();

	nmk_config_pins(mop500_pins, ARRAY_SIZE(mop500_pins));

	u8500_i2c0_device.dev.platform_data = &u8500_i2c0_data;
	ux500_i2c1_device.dev.platform_data = &u8500_i2c1_data;
	ux500_i2c2_device.dev.platform_data = &u8500_i2c2_data;
	ux500_i2c3_device.dev.platform_data = &u8500_i2c3_data;

	u8500_ssp0_device.dev.platform_data = &ssp0_platform_data;

	/* Register the active AMBA devices on this board */
	for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
		amba_device_register(amba_devs[i], &iomem_resource);

	platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));

	mop500_sdi_init();

	/* If HW is early drop (ED) or V1.0 then use SPI to access AB8500 */
	if (cpu_is_u8500ed() || cpu_is_u8500v10())
		spi_register_board_info(ab8500_spi_devices,
			ARRAY_SIZE(ab8500_spi_devices));
	else /* If HW is v.1.1 or later use I2C to access AB8500 */
		platform_device_register(&ab8500_device);
}
예제 #6
0
파일: board-mop500.c 프로젝트: 08opt/linux
static void __init hrefv60_init_machine(void)
{
	int i2c0_devs;

	/*
	 * The HREFv60 board removed a GPIO expander and routed
	 * all these GPIO pins to the internal GPIO controller
	 * instead.
	 */
	mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;

	u8500_init_devices();

	hrefv60_pins_init();

	platform_add_devices(mop500_platform_devs,
			ARRAY_SIZE(mop500_platform_devs));

	mop500_i2c_init();
	mop500_sdi_init();
	mop500_spi_init();
	mop500_uart_init();

	i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

	i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;

	i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
	i2c_register_board_info(2, mop500_i2c2_devices,
				ARRAY_SIZE(mop500_i2c2_devices));

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}
예제 #7
0
static void __init u8500_init_machine(void)
{
	struct device *parent = NULL;
	int i2c0_devs;
	int i;

	/* Pinmaps must be in place before devices register */
	if (of_machine_is_compatible("st-ericsson,mop500"))
		mop500_pinmaps_init();
	else if (of_machine_is_compatible("calaosystems,snowball-a9500"))
		snowball_pinmaps_init();
	else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
		hrefv60_pinmaps_init();

	parent = u8500_of_init_devices();

	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
		mop500_platform_devs[i]->dev.parent = parent;

	/* automatically probe child nodes of db8500 device */
	of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);

	if (of_machine_is_compatible("st-ericsson,mop500")) {
		mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

		platform_add_devices(mop500_platform_devs,
				ARRAY_SIZE(mop500_platform_devs));

		mop500_sdi_init(parent);
		mop500_audio_init(parent);
		i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
		i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
		i2c_register_board_info(2, mop500_i2c2_devices,
					ARRAY_SIZE(mop500_i2c2_devices));

		mop500_uib_init();

	} else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
		mop500_of_audio_init(parent);
	} else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
		/*
		 * The HREFv60 board removed a GPIO expander and routed
		 * all these GPIO pins to the internal GPIO controller
		 * instead.
		 */
		mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
		platform_add_devices(mop500_platform_devs,
				ARRAY_SIZE(mop500_platform_devs));

		mop500_uib_init();
	}

	/* This board has full regulator constraints */
	regulator_has_full_constraints();
}