コード例 #1
0
static void __init tegra_aruba_init(void)
{
	char serial[20];

	tegra_common_init();
	tegra_clk_init_from_table(aruba_clk_init_table);
	aruba_pinmux_init();

	snprintf(serial, sizeof(serial), "%llx", tegra_chip_uid());
	andusb_plat.serial_number = kstrdup(serial, GFP_KERNEL);
	tegra_i2s_device1.dev.platform_data = &tegra_i2s_pdata[0];
	platform_add_devices(aruba_devices, ARRAY_SIZE(aruba_devices));

	aruba_sdhci_init();
	aruba_i2c_init();
	aruba_regulator_init();
	aruba_touch_init();
	aruba_keys_init();
	aruba_usb_init();
	aruba_panel_init();
	aruba_sensors_init();
	aruba_bt_rfkill();
	aruba_sata_init();
	tegra_release_bootloader_fb();
}
コード例 #2
0
static void __init tegra_ventana_init(void)
{
#if defined(CONFIG_TOUCHSCREEN_PANJIT_I2C) || \
	defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9)
	struct board_info BoardInfo;
#endif

	tegra_common_init();
	tegra_clk_init_from_table(ventana_clk_init_table);
	ventana_pinmux_init();
	ventana_i2c_init();
	snprintf(usb_serial_num, sizeof(usb_serial_num), "%llx", tegra_chip_uid());
	andusb_plat.serial_number = kstrdup(usb_serial_num, GFP_KERNEL);
	tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata[0];
	tegra_i2s_device2.dev.platform_data = &tegra_audio_pdata[1];
	tegra_spdif_device.dev.platform_data = &tegra_spdif_pdata;
	tegra_das_device.dev.platform_data = &tegra_das_pdata;
	tegra_ehci2_device.dev.platform_data
		= &ventana_ehci2_ulpi_platform_data;
	platform_add_devices(ventana_devices, ARRAY_SIZE(ventana_devices));

	ventana_sdhci_init();
	ventana_charge_init();
	ventana_regulator_init();

#if defined(CONFIG_TOUCHSCREEN_PANJIT_I2C) || \
	defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9)

	tegra_get_board_info(&BoardInfo);

	/* boards with sku > 0 have atmel touch panels */
	if (BoardInfo.sku) {
		pr_info("Initializing Atmel touch driver\n");
		ventana_touch_init_atmel();
	} else {
		pr_info("Initializing Panjit touch driver\n");
		ventana_touch_init_panjit();
	}
#endif

#ifdef CONFIG_KEYBOARD_GPIO
	ventana_keys_init();
#endif
#ifdef CONFIG_KEYBOARD_TEGRA
	ventana_kbc_init();
#endif

	ventana_wired_jack_init();
	ventana_usb_init();
	ventana_gps_init();
	ventana_panel_init();
	ventana_sensors_init();
	ventana_bt_rfkill();
	ventana_power_off_init();
	ventana_emc_init();
#ifdef CONFIG_BT_BLUESLEEP
	tegra_setup_bluesleep();
#endif
}
コード例 #3
0
static void __init tegra_harmony_init(void)
{
	tegra_common_init();

	tegra_clk_init_from_table(harmony_clk_init_table);

	harmony_pinmux_init();

	platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
}
コード例 #4
0
static void __init do_system_init(bool standard_i2c, bool standard_spi)
{
	unsigned int chip_id[2];
	char serial[17];

	tegra_common_init();
	tegra_setup_nvodm(true, true);
	tegra_register_socdev();

	NvRmQueryChipUniqueId(s_hRmGlobal, sizeof(chip_id), (void*)chip_id);
	snprintf(serial, sizeof(serial), "%08x%08x", chip_id[1], chip_id[0]);
	tegra_android_platform.serial_number = kstrdup(serial, GFP_KERNEL);
	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
}
コード例 #5
0
ファイル: board-generic.c プロジェクト: Ateeq72/lge-kernel-gb
static void __init do_system_init(bool standard_i2c, bool standard_spi)
{
	unsigned int chip_id[2];
	char serial[17];

	tegra_common_init();
	tegra_setup_nvodm(true, true);
	tegra_register_socdev();

	NvRmQueryChipUniqueId(s_hRmGlobal, sizeof(chip_id), (void*)chip_id);
	snprintf(serial, sizeof(serial), "%08x%08x", chip_id[1], chip_id[0]);
#ifdef CONFIG_HACKFEST
#ifdef CONFIG_USB_G_ANDROID
    tegra_android_platform.serial_number = kstrdup(serial, GFP_KERNEL);
#endif /* CONFIG_USB_G_ANDROID */
#else
	tegra_android_platform.serial_number = kstrdup(serial, GFP_KERNEL);
#endif /* CONFIG_HACKFEST */
	system_serial_low = chip_id[1];
	system_serial_high = chip_id[0];
	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
}
コード例 #6
0
static void __init tegra_ventana_init(void)
{
#if defined(CONFIG_TOUCHSCREEN_PANJIT_I2C) || \
	defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9) || defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9_EP102)
	struct board_info BoardInfo;
#endif
	tegra_booting_info();
	tegra_common_init();
	ventana_setup_misc();
	tegra_clk_init_from_table(ventana_clk_init_table);
	ventana_pinmux_init();
	ventana_i2c_init();
        ventana_uart_init();
	snprintf(ventana_chipid, sizeof(ventana_chipid), "%016llx",
	    tegra_chip_uid());
	snprintf(usb_serial_num, sizeof(usb_serial_num), "%llx", tegra_chip_uid());
	andusb_plat.serial_number = kstrdup(usb_serial_num, GFP_KERNEL);
	if (ASUSGetProjectID() == 102) {
		andusb_plat.products[0].product_id = USB_SL101_PRODUCT_ID_MTP;
		andusb_plat.products[1].product_id = USB_SL101_PRODUCT_ID_MTP_ADB;
		andusb_plat.products[2].product_id = USB_SL101_PRODUCT_ID_RNDIS;
		andusb_plat.products[3].product_id = USB_SL101_PRODUCT_ID_RNDIS_ADB;
	}

	tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata[0];
	tegra_i2s_device2.dev.platform_data = &tegra_audio_pdata[1];
	tegra_spdif_device.dev.platform_data = &tegra_spdif_pdata;
	tegra_das_device.dev.platform_data = &tegra_das_pdata;

	//disable for wifi sku
	if (ASUS3GAvailable()) {
               tegra_ehci2_device.dev.platform_data
                       = &ventana_ehci2_ulpi_platform_data;
	}

	platform_add_devices(ventana_devices, ARRAY_SIZE(ventana_devices));

	if ((ASUSGetProjectID() != 103) && (!console_none_on_cmdline)) {
		//register debug uart resource only if
		//"console=ttyXX" is specified and running target platform
		//is not JN101(EP103)
		platform_device_register(&debug_uart);
		tegra_gpio_enable(TEGRA_GPIO_PB0);
		gpio_request(TEGRA_GPIO_PB0, "UART4_RXD");
		//limit RXD of UART debug console.
		gpio_direction_output(TEGRA_GPIO_PB0, 1);
	}

	ventana_sdhci_init();
	//ventana_charge_init();
	ventana_regulator_init();

#if defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9) || defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9_EP102)
       pr_info("Initializing Atmel touch driver\n");
       ventana_touch_init_atmel();
#elif defined(CONFIG_TOUCHSCREEN_PANJIT_I2C)
       pr_info("Initializing Panjit touch driver\n");
       ventana_touch_init_panjit();
#endif

#ifdef CONFIG_TOUCHSCREEN_CYTTSP_I2C
ventana_touch_init();
#endif
#ifdef CONFIG_KEYBOARD_GPIO
	ventana_keys_init();
#endif
#ifdef CONFIG_KEYBOARD_TEGRA
	ventana_kbc_init();
#endif
#ifdef CONFIG_DSP_FM34
	ventana_dsp_init();
#endif

	ventana_wired_jack_init();
	ventana_usb_init();
	ventana_gps_init();
	ventana_panel_init();
	ventana_sensors_init();
	ventana_bt_rfkill();
	ventana_power_off_init();
	ventana_emc_init();
#ifdef CONFIG_BT_BLUESLEEP
	tegra_setup_bluesleep();
#endif
}
コード例 #7
0
static void __init tegra_mot_init(void)
{
	tegra_common_init();
	tegra_setup_nvodm(true, true);
	tegra_register_socdev();

#ifdef CONFIG_APANIC_RAM
	apanic_ram_init();
#endif
#ifdef CONFIG_APANIC_MMC
	apanic_mmc_init();
#endif

	mot_setup_power();
	mot_setup_lights(&tegra_i2c_bus0_board_info[BACKLIGHT_DEV]);
	mot_setup_touch(&tegra_i2c_bus0_board_info[TOUCHSCREEN_DEV]);

	mot_sec_init();
	mot_tcmd_init();

	mot_setup_gadget();

	if(machine_is_olympus()) {
		tegra_uart_platform[UART_IPC_OLYMPUS].uart_ipc = 1;
		tegra_uart_platform[UART_IPC_OLYMPUS].uart_wake_host = TEGRA_GPIO_PA0;
		tegra_uart_platform[UART_IPC_OLYMPUS].uart_wake_request = TEGRA_GPIO_PF1;
		tegra_uart_platform[UART_IPC_OLYMPUS].peer_register = mot_mdm_ctrl_peer_register;
	}
	else if(machine_is_etna()) {
		if (HWREV_TYPE_IS_BRASSBOARD(system_rev)) {
			/* The modem is dead on S2, which makes the UART angry. */
			tegra_uart_platform[UART_IPC_ETNA].uart_ipc = 0;
			tegra_uart_platform[UART_IPC_ETNA].p.irq = ~0;
		} else {
			tegra_uart_platform[UART_IPC_ETNA].uart_ipc = 1;
			tegra_uart_platform[UART_IPC_ETNA].uart_wake_host = TEGRA_GPIO_PA0;
			tegra_uart_platform[UART_IPC_ETNA].uart_wake_request = TEGRA_GPIO_PF1;
			tegra_uart_platform[UART_IPC_ETNA].peer_register = mot_mdm_ctrl_peer_register;
		}
	}
	else if(machine_is_tegra_daytona()) {
		tegra_uart_platform[UART_IPC_DAYTONA].uart_ipc = 1;
		tegra_uart_platform[UART_IPC_DAYTONA].uart_wake_host = TEGRA_GPIO_PA0;
		tegra_uart_platform[UART_IPC_DAYTONA].uart_wake_request = TEGRA_GPIO_PF1;
		tegra_uart_platform[UART_IPC_DAYTONA].peer_register = mot_mdm_ctrl_peer_register;
	}
	else if(machine_is_sunfire()) {
		tegra_uart_platform[UART_IPC_SUNFIRE].uart_ipc = 1;
		tegra_uart_platform[UART_IPC_SUNFIRE].uart_wake_host = TEGRA_GPIO_PA0;
		tegra_uart_platform[UART_IPC_SUNFIRE].uart_wake_request = TEGRA_GPIO_PF1;
		tegra_uart_platform[UART_IPC_SUNFIRE].peer_register = mot_mdm_ctrl_peer_register;
	}

	if( (bi_powerup_reason() & PWRUP_FACTORY_CABLE) &&
	    (bi_powerup_reason() != PWRUP_INVALID) ){
#ifdef NEED_FACT_BUSY_HINT
		FactoryBusyHint(); //factory workaround no longer needed
#endif
	}

	mot_modem_init();

	(void) platform_driver_register(&cpcap_usb_connected_driver);

#ifdef CONFIG_MOT_WIMAX
	mot_wimax_gpio_init();
#endif
	mot_wlan_init();
	mot_sensors_init();

	mot_nvodmcam_init();

	printk("%s: registering i2c devices...\n", __func__);

	if(!(bi_powerup_reason() & PWRUP_BAREBOARD)) {
		printk("bus 0: %d devices\n", ARRAY_SIZE(tegra_i2c_bus0_board_info));
		i2c_register_board_info(0, tegra_i2c_bus0_board_info, 
								ARRAY_SIZE(tegra_i2c_bus0_board_info));
	}
	if (machine_is_etna() || machine_is_tegra_daytona() || machine_is_sunfire()) {
		printk("bus 2: %d devices\n", ARRAY_SIZE(tegra_i2c_bus2_board_info));
		i2c_register_board_info(2, tegra_i2c_bus2_board_info,
								ARRAY_SIZE(tegra_i2c_bus2_board_info));
	}
	printk("bus 3: %d devices\n", ARRAY_SIZE(tegra_i2c_bus3_board_info));
	i2c_register_board_info(3, tegra_i2c_bus3_board_info, 
							ARRAY_SIZE(tegra_i2c_bus3_board_info));

	if (machine_is_olympus()){
		/* console UART can be routed to 'headset jack by setting HSJ mux to 0*/
		short hsj_mux_gpio=1;

		if ( HWREV_TYPE_IS_DEBUG(system_rev) ){
			printk("%s: Enabling console on headset jack\n", __FUNCTION__);
			hsj_mux_gpio=0;
		}
		mot_set_hsj_mux( hsj_mux_gpio );
	}

	pm_power_off = mot_system_power_off;
	tegra_setup_bluesleep();

	/* Configure SPDIF_OUT as GPIO by default, it can be later controlled
	   as needed. When SPDIF_OUT is enabled and if HDMI is connected, it
	   can interefere with CPCAP ID pin, as SPDIF_OUT and ID are coupled.
	*/
	tegra_gpio_enable(TEGRA_GPIO_PD4);
	gpio_request(TEGRA_GPIO_PD4, "spdif_enable");
	gpio_direction_output(TEGRA_GPIO_PD4, 0);
	gpio_export(TEGRA_GPIO_PD4, false);

	if (machine_is_olympus() && (HWREV_TYPE_IS_PORTABLE(system_rev) || HWREV_TYPE_IS_FINAL(system_rev)))
	{
		if (HWREV_REV(system_rev) >= HWREV_REV_1 && HWREV_REV(system_rev) < HWREV_REV_2)
		{
			// Olympus P1
			config_unused_pins(oly_unused_pins_p1, ARRAY_SIZE(oly_unused_pins_p1));
		}
		else if (HWREV_REV(system_rev) >= HWREV_REV_2 && HWREV_REV(system_rev) < HWREV_REV_3)
		{
			// Olympus P2
			config_unused_pins(oly_unused_pins_p2, ARRAY_SIZE(oly_unused_pins_p2));
		}
		else if (HWREV_REV(system_rev) >= HWREV_REV_3 || HWREV_TYPE_IS_FINAL(system_rev))
		{
			// Olympus P3 and newer
			config_unused_pins(oly_unused_pins_p3, ARRAY_SIZE(oly_unused_pins_p3));
		}
	}

	if (machine_is_etna())
	{
		if (HWREV_TYPE_IS_PORTABLE(system_rev) && (HWREV_REV(system_rev) >= HWREV_REV_2) && (HWREV_REV(system_rev) < HWREV_REV_2C))
		{
			config_unused_pins(etna_unused_pins_p2a, ARRAY_SIZE(etna_unused_pins_p2a));
		}
		else if ((HWREV_TYPE_IS_PORTABLE(system_rev) && HWREV_REV(system_rev) >= HWREV_REV_2C) ||
			(HWREV_TYPE_IS_MORTABLE(system_rev) && HWREV_REV(system_rev) >= HWREV_REV_3) ||
 			HWREV_TYPE_IS_FINAL(system_rev))
		{
			config_unused_pins(etna_unused_pins_p2c, ARRAY_SIZE(etna_unused_pins_p2c));
		}
	}

        if (machine_is_tegra_daytona())
                config_unused_pins(daytona_unused_pins_p1, ARRAY_SIZE(daytona_unused_pins_p1));


	if (machine_is_etna() || machine_is_tegra_daytona() || machine_is_sunfire())
		// UTS tool support
		mot_keymap_update_init();
}
コード例 #8
0
static void __init tegra_mot_init(void)
{
	get_gpio_settings();
	tegra_common_init();
	get_gpio_settings();
	tegra_setup_nvodm(true, true);
	get_gpio_settings();
	tegra_register_socdev();
	get_gpio_settings();
#if 0
#ifdef CONFIG_APANIC_RAM
	apanic_ram_init();
#endif
#endif

#ifdef CONFIG_APANIC_MMC
	apanic_mmc_init();
#endif
	get_gpio_settings();
	mot_setup_power();
/*	mot_setup_lights(&tegra_i2c_bus0_board_info[BACKLIGHT_DEV]);
	mot_setup_touch(&tegra_i2c_bus0_board_info[TOUCHSCREEN_DEV]);*/
/*	mot_sec_init();
	mot_tcmd_init();*/
	get_gpio_settings();
	mot_setup_gadget();

	tegra_uart_platform[UART_IPC_OLYMPUS].uart_ipc = 1;
	tegra_uart_platform[UART_IPC_OLYMPUS].uart_wake_host = TEGRA_GPIO_PA0;
	tegra_uart_platform[UART_IPC_OLYMPUS].uart_wake_request = TEGRA_GPIO_PF1;
#ifdef CONFIG_MDM_CTRL
	tegra_uart_platform[UART_IPC_OLYMPUS].peer_register = mot_mdm_ctrl_peer_register;
#endif
#ifdef CONFIG_BOOTINFO
	if( (bi_powerup_reason() & PWRUP_FACTORY_CABLE) &&
	    (bi_powerup_reason() != PWRUP_INVALID) ){
#ifdef NEED_FACT_BUSY_HINT
		FactoryBusyHint(); //factory workaround no longer needed
#endif
	}
#endif
/*	mot_modem_init();*/

	(void) platform_driver_register(&cpcap_usb_connected_driver);

/*	mot_wlan_init();
	mot_sensors_init();

	mot_nvodmcam_init();*/

	printk("%s: registering i2c devices...\n", __func__);
#ifdef CONFIG_BOOTINFO
	if(!(bi_powerup_reason() & PWRUP_BAREBOARD)) {
		printk("bus 0: %d devices\n", ARRAY_SIZE(tegra_i2c_bus0_board_info));
		i2c_register_board_info(0, tegra_i2c_bus0_board_info, 
								ARRAY_SIZE(tegra_i2c_bus0_board_info));
	}
#else 
	printk("bus 0: %d devices\n", ARRAY_SIZE(tegra_i2c_bus0_board_info));
		i2c_register_board_info(0, tegra_i2c_bus0_board_info, 
								ARRAY_SIZE(tegra_i2c_bus0_board_info));
#endif
	printk("bus 3: %d devices\n", ARRAY_SIZE(tegra_i2c_bus3_board_info));
	i2c_register_board_info(3, tegra_i2c_bus3_board_info, 
							ARRAY_SIZE(tegra_i2c_bus3_board_info));

	/* console UART can be routed to 'headset jack by setting HSJ mux to 0*/
	short hsj_mux_gpio=1;

	if ( HWREV_TYPE_IS_DEBUG(system_rev) || ENABLE_JACK_UART ){
		printk("%s: Enabling console on headset jack\n", __FUNCTION__);
		hsj_mux_gpio=0;
	}
	mot_set_hsj_mux( hsj_mux_gpio );

	pm_power_off = mot_system_power_off;
	tegra_setup_bluesleep();

	/* Configure SPDIF_OUT as GPIO by default, it can be later controlled
	   as needed. When SPDIF_OUT is enabled and if HDMI is connected, it
	   can interefere with CPCAP ID pin, as SPDIF_OUT and ID are coupled.
	*/

	tegra_gpio_enable(TEGRA_GPIO_PD4);
	gpio_request(TEGRA_GPIO_PD4, "spdif_enable");
	gpio_direction_output(TEGRA_GPIO_PD4, 0);
	gpio_export(TEGRA_GPIO_PD4, false);

	if ((HWREV_TYPE_IS_PORTABLE(system_rev) || HWREV_TYPE_IS_FINAL(system_rev)))
	{
		if (HWREV_REV(system_rev) >= HWREV_REV_1 && HWREV_REV(system_rev) < HWREV_REV_2)
		{
			// Olympus P1
			config_unused_pins(oly_unused_pins_p1, ARRAY_SIZE(oly_unused_pins_p1));
		}
		else if (HWREV_REV(system_rev) >= HWREV_REV_2 && HWREV_REV(system_rev) < HWREV_REV_3)
		{
			// Olympus P2
			config_unused_pins(oly_unused_pins_p2, ARRAY_SIZE(oly_unused_pins_p2));
		}
		else if (HWREV_REV(system_rev) >= HWREV_REV_3 || HWREV_TYPE_IS_FINAL(system_rev))
		{
			// Olympus P3 and newer
			config_unused_pins(oly_unused_pins_p3, ARRAY_SIZE(oly_unused_pins_p3));
		}
	}
	get_gpio_settings();
}
コード例 #9
0
static void __init tegra_ventana_init(void)
{
#if defined(CONFIG_TOUCHSCREEN_PANJIT_I2C) || \
	defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9)
	struct board_info BoardInfo;
#endif

	tegra_common_init();
	tegra_clk_init_from_table(ventana_clk_init_table);
	ventana_pinmux_init();
	ventana_i2c_init();
	snprintf(usb_serial_num, sizeof(usb_serial_num), "%llx", tegra_chip_uid());
	andusb_plat.serial_number = kstrdup(usb_serial_num, GFP_KERNEL);
	tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata[0];
	tegra_i2s_device2.dev.platform_data = &tegra_audio_pdata[1];
	tegra_spdif_device.dev.platform_data = &tegra_spdif_pdata;
#ifdef CONFIG_BUILDTYPE_SHIP
	if (console_set_none == 1)
	{
		tegra_pinmux_set_tristate(TEGRA_PINGROUP_IRRX,
					TEGRA_TRI_TRISTATE);
		tegra_pinmux_set_tristate(TEGRA_PINGROUP_IRTX,
					TEGRA_TRI_TRISTATE);
	}
	else
	{
		if (is_tegra_debug_uartport_hs() == true)
			platform_device_register(&tegra_uartd_device);
		else
			platform_device_register(&debug_uart);
	}
#else
	if (is_tegra_debug_uartport_hs() == true)
		platform_device_register(&tegra_uartd_device);
	else
		platform_device_register(&debug_uart);
#endif
	tegra_das_device.dev.platform_data = &tegra_das_pdata;
	
	
	platform_add_devices(ventana_devices, ARRAY_SIZE(ventana_devices));

	ventana_sdhci_init();
	
	ventana_regulator_init();

#if defined(CONFIG_TOUCHSCREEN_PANJIT_I2C) || \
	defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9)

	tegra_get_board_info(&BoardInfo);

	/* boards with sku > 0 have atmel touch panels */
/*	if (BoardInfo.sku) {
		pr_info("Initializing Atmel touch driver\n");
		ventana_touch_init_atmel();
	} else {
		pr_info("Initializing Panjit touch driver\n");
		ventana_touch_init_panjit();
	}*/ 
#endif


#ifdef CONFIG_TOUCHSCREEN_ATMEL_mXT224 
	ventana_touch_init_atmel();
#endif



#ifdef CONFIG_ATA2538_CAPKEY
	ventana_capkey_init();
#endif


#ifdef CONFIG_TEGRA_KEYPAD
	tegra_keypad_init();
#endif

#ifdef CONFIG_KEYBOARD_GPIO
	
#endif
#ifdef CONFIG_KEYBOARD_TEGRA
	
#endif

	
	ventana_datacards_init();
	ventana_usb_init();
	ventana_gps_init();
	ventana_panel_init();
	ventana_sensors_init();
	ventana_bt_rfkill();
	ventana_power_off_init();
	
	tegra_setup_bluesleep();
}
コード例 #10
0
static void __init tegra_smba1002_init(void)
{
	struct clk *clk;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)	
	tegra_common_init();
#endif

	/* force consoles to stay enabled across suspend/resume */
	// console_suspend_enabled = 0;	

	/* Init the suspend information */
	tegra_init_suspend(&smba1002_suspend);

	/* Set the SDMMC1 (wifi) tap delay to 6.  This value is determined
	 * based on propagation delay on the PCB traces. */
	clk = clk_get_sys("sdhci-tegra.0", NULL);
	if (!IS_ERR(clk)) {
		tegra_sdmmc_tap_delay(clk, 6);
		clk_put(clk);
	} else {
		pr_err("Failed to set wifi sdmmc tap delay\n");
	}

	/* Initialize the clocks */
	smba1002_clks_init();

	/* Initialize the pinmux */
	smba1002_pinmux_init();

	/* Register i2c devices - required for Power management and MUST be done before the power register */
	smba1002_i2c_register_devices();

	/* Register the power subsystem - Including the poweroff handler - Required by all the others */
	smba1002_power_register_devices();
	
	/* Register the USB device */
	smba1002_usb_register_devices();

	/* Register UART devices */
	smba1002_uart_register_devices();
	
	/* Register SPI devices */
	smba1002_spi_register_devices();

	/* Register GPU devices */
	smba1002_gpu_register_devices();

	/* Register Audio devices */
	// smba1002_audio_register_devices();

	/* Register AES encryption devices */
	smba1002_aes_register_devices();

	/* Register Watchdog devices */
	smba1002_wdt_register_devices();

	/* Register all the keyboard devices */
	smba1002_keyboard_register_devices();
	
	/* Register touchscreen devices */
	smba1002_touch_register_devices();
	
	/* Register SDHCI devices */
	smba1002_sdhci_register_devices();

	/* Register accelerometer device */
	smba1002_sensors_register_devices();
	
	/* Register wlan powermanagement devices */
//	smba1002_wlan_pm_register_devices();
	
	/* Register gps powermanagement devices */
	smba1002_gps_pm_register_devices();

	/* Register gsm powermanagement devices */
	smba1002_gsm_pm_register_devices();
	
	/* Register Bluetooth powermanagement devices */
	smba1002_bt_pm_register_devices();

	/* Register Camera powermanagement devices */
//	smba1002_camera_register_devices();

	/* Register NAND flash devices */
	smba1002_nand_register_devices();
	
	smba1002_gps_mag_init();
	smba1002_gps_mag_poweron();
#if 0
	/* Finally, init the external memory controller and memory frequency scaling
   	   NB: This is not working on SMBA1002. And seems there is no point in fixing it,
	   as the EMC clock is forced to the maximum speed as soon as the 2D/3D engine
	   starts.*/
	smba1002_init_emc();
#endif
	
}