int __init cardhu_pinmux_init(void)
{
	struct board_info board_info;

	cardhu_gpio_init_configure();

	tegra_pinmux_config_table(cardhu_pinmux_common, ARRAY_SIZE(cardhu_pinmux_common));
	tegra_drive_pinmux_config_table(cardhu_drive_pinmux,
					ARRAY_SIZE(cardhu_drive_pinmux));

	tegra_get_board_info(&board_info);
	switch (board_info.board_id) {
	case BOARD_E1198:
		tegra_pinmux_config_table(cardhu_pinmux_e1198,
					ARRAY_SIZE(cardhu_pinmux_e1198));
		tegra_pinmux_config_table(unused_pins_lowpower,
					ARRAY_SIZE(unused_pins_lowpower));
		if (board_info.fab >= BOARD_FAB_A02)
			tegra_pinmux_config_table(cardhu_pinmux_cardhu_a03,
					ARRAY_SIZE(cardhu_pinmux_cardhu_a03));
		break;
	case BOARD_E1291:
		if (board_info.fab < BOARD_FAB_A03) {
			tegra_pinmux_config_table(cardhu_pinmux_cardhu,
					ARRAY_SIZE(cardhu_pinmux_cardhu));
			tegra_pinmux_config_table(unused_pins_lowpower,
					ARRAY_SIZE(unused_pins_lowpower));
		} else {
			tegra_pinmux_config_table(cardhu_pinmux_cardhu_a03,
					ARRAY_SIZE(cardhu_pinmux_cardhu_a03));
		}
		if (board_info.fab >= BOARD_FAB_A04)
			tegra_pinmux_config_table(cardhu_pinmux_e1291_a04,
					ARRAY_SIZE(cardhu_pinmux_e1291_a04));
		break;

	case BOARD_PM269:
	case BOARD_PM305:
	case BOARD_PM311:
	case BOARD_E1257:
		if (board_info.board_id == BOARD_PM311 || board_info.board_id == BOARD_PM305) {
			tegra_pinmux_config_table(cardhu_pinmux_pm311,
					ARRAY_SIZE(cardhu_pinmux_pm311));
		} else {
			tegra_pinmux_config_table(cardhu_pinmux_e118x,
					ARRAY_SIZE(cardhu_pinmux_e118x));
		}
		tegra_pinmux_config_table(unused_pins_lowpower,
					ARRAY_SIZE(unused_pins_lowpower));
		tegra_pinmux_config_table(gmi_pins_269,
					ARRAY_SIZE(gmi_pins_269));
		break;
	default:
		tegra_pinmux_config_table(cardhu_pinmux_e118x,
					ARRAY_SIZE(cardhu_pinmux_e118x));
		break;
	}

	cardhu_pinmux_audio_init();

	return 0;
}
int __init cardhu_pinmux_init(void)
{
	struct board_info board_info;
	u32 project_info = tegra3_get_project_id();

	cardhu_gpio_init_configure();

	tegra_pinmux_config_table(cardhu_pinmux_common, ARRAY_SIZE(cardhu_pinmux_common));
	tegra_drive_pinmux_config_table(cardhu_drive_pinmux,
					ARRAY_SIZE(cardhu_drive_pinmux));

	tegra_get_board_info(&board_info);
	switch (board_info.board_id) {
	case BOARD_E1198:
		tegra_pinmux_config_table(cardhu_pinmux_e1198,
					ARRAY_SIZE(cardhu_pinmux_e1198));
		tegra_pinmux_config_table(unused_pins_lowpower,
					ARRAY_SIZE(unused_pins_lowpower));
		if (board_info.fab >= BOARD_FAB_A02)
			tegra_pinmux_config_table(cardhu_pinmux_cardhu_a03,
					ARRAY_SIZE(cardhu_pinmux_cardhu_a03));
		break;
	case BOARD_E1291:
		if (board_info.fab < BOARD_FAB_A03) {
			tegra_pinmux_config_table(cardhu_pinmux_cardhu,
					ARRAY_SIZE(cardhu_pinmux_cardhu));
			tegra_pinmux_config_table(unused_pins_lowpower,
					ARRAY_SIZE(unused_pins_lowpower));
		} else {
			tegra_pinmux_config_table(cardhu_pinmux_cardhu_a03,
					ARRAY_SIZE(cardhu_pinmux_cardhu_a03));
		}
		if (board_info.fab >= BOARD_FAB_A04)
			tegra_pinmux_config_table(cardhu_pinmux_e1291_a04,
					ARRAY_SIZE(cardhu_pinmux_e1291_a04));
		break;

	case BOARD_PM269:
	case BOARD_PM305:
	case BOARD_PM311:
	case BOARD_E1257:
		if (board_info.board_id == BOARD_PM311 || board_info.board_id == BOARD_PM305) {
			tegra_pinmux_config_table(cardhu_pinmux_pm311,
					ARRAY_SIZE(cardhu_pinmux_pm311));
		} else {
			tegra_pinmux_config_table(cardhu_pinmux_e118x,
					ARRAY_SIZE(cardhu_pinmux_e118x));
		}
		tegra_pinmux_config_table(unused_pins_lowpower,
					ARRAY_SIZE(unused_pins_lowpower));
		tegra_pinmux_config_table(gmi_pins_269,
					ARRAY_SIZE(gmi_pins_269));

		if (project_info == 0x4) {
			printk("Check TF700T pinmux \n");
			tegra_pinmux_config_table(gmi_pins_700T,
					ARRAY_SIZE(gmi_pins_700T));
		} else {
			tegra_pinmux_config_table(gmi_pins_not_700T,
					ARRAY_SIZE(gmi_pins_not_700T));
		}

		// Config the pinmux of 3G version
		if (project_info == TEGRA3_PROJECT_TF300TG) {
			printk("Check TF300TG pinmux\n");
			tegra_pinmux_config_table(pinmux_TF300TG,
					ARRAY_SIZE(pinmux_TF300TG));
		} else if (project_info == TEGRA3_PROJECT_TF300TL){
			printk("Check TF300TL pinmux\n");
			tegra_pinmux_config_table(pinmux_TF300TL,
					ARRAY_SIZE(pinmux_TF300TL));
		}

		break;
	default:
		tegra_pinmux_config_table(cardhu_pinmux_e118x,
					ARRAY_SIZE(cardhu_pinmux_e118x));
		break;
	}

	/* Asus: TEGRA_GPIO_PW3 is used in TF300TG for
		SIM detection */
	if (project_info != TEGRA3_PROJECT_TF300TG &&
			project_info != TEGRA3_PROJECT_TF300TL) {
		cardhu_pinmux_audio_init();
	}

	return 0;
}