int board_init(void) { gd->bd->bi_arch_number=MACH_TYPE_MESON6_SKT; gd->bd->bi_boot_params=BOOT_PARAMS_OFFSET; #if CONFIG_JERRY_NAND_TEST //temp test nand_init(); #endif #ifdef CONFIG_AML_I2C board_i2c_init(); #endif /*CONFIG_AML_I2C*/ #ifdef CONFIG_IR_REMOTE board_ir_init(); #endif #ifdef CONFIG_USB_DWC_OTG_HCD board_usb_init(&g_usb_config_m6_skt_b,BOARD_USB_MODE_HOST); board_usb_init(&g_usb_config_m6_skt_h,BOARD_USB_MODE_CHARGER); #endif /*CONFIG_USB_DWC_OTG_HCD*/ key_init(); wifi_power_init(); run_command("magic_checkstatus", 0); return 0; }
int board_init(void) { #ifdef CONFIG_UART_A_FUNCTION_ADD unsigned a_uart = (159375000/(115200*4) -1) | UART_STP_BIT | UART_PRTY_BIT | UART_CHAR_LEN | UART_CNTL_MASK_TX_EN | UART_CNTL_MASK_RX_EN | UART_CNTL_MASK_RST_TX | UART_CNTL_MASK_RST_RX | UART_CNTL_MASK_CLR_ERR ; serial_init_uart_a(a_uart); #endif #if KSZ8091 CLEAR_CBUS_REG_MASK(PREG_PAD_GPIO1_EN_N, 1 << 31); CLEAR_CBUS_REG_MASK(PREG_PAD_GPIO1_O, 1 << 31); #endif gd->bd->bi_arch_number=MACH_TYPE_MESON6_SKT; gd->bd->bi_boot_params=BOOT_PARAMS_OFFSET; #if CONFIG_JERRY_NAND_TEST //temp test nand_init(); #endif // LED clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 15)); clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 31)); #ifdef CONFIG_AML_I2C board_i2c_init(); #endif /*CONFIG_AML_I2C*/ #ifdef CONFIG_IR_REMOTE board_ir_init(); #endif #ifdef CONFIG_USB_DWC_OTG_HCD board_usb_init(&g_usb_config_m6_skt_b,BOARD_USB_MODE_HOST); board_usb_init(&g_usb_config_m6_skt_h,BOARD_USB_MODE_CHARGER); #endif /*CONFIG_USB_DWC_OTG_HCD*/ #ifdef CONFIG_NET_WIFI wifi_power_init(); #endif key_init(); return 0; }
int board_init(void) { #ifdef CONFIG_M201_COSTDOWN /* pull up Linux rx/tx */ writel(readl(P_AO_RTI_PULL_UP_REG) | (3 << 0 | 3 << 16), P_AO_RTI_PULL_UP_REG); #endif borad_power_init(); gd->bd->bi_arch_number=MACH_TYPE_MESON6_SKT; gd->bd->bi_boot_params=BOOT_PARAMS_OFFSET; #if CONFIG_JERRY_NAND_TEST //temp test nand_init(); #endif #ifdef CONFIG_AML_I2C board_i2c_init(); #endif /*CONFIG_AML_I2C*/ #ifdef CONFIG_IR_REMOTE board_ir_init(); #endif #ifdef CONFIG_USB_DWC_OTG_HCD board_usb_init(&g_usb_config_m6_skt_b,BOARD_USB_MODE_HOST); board_usb_init(&g_usb_config_m6_skt_h,BOARD_USB_MODE_CHARGER); #endif /*CONFIG_USB_DWC_OTG_HCD*/ #ifdef CONFIG_M201_COSTDOWN /* 32k clock init */ printf("init 32k clock\n"); aml_set_reg32_mask(P_PERIPHS_PIN_MUX_9,0x1<<19);//set mode GPIOX_10-->CLK_OUT3 WRITE_CBUS_REG(PWM_PWM_E, 0x16d016d); WRITE_CBUS_REG(PWM_MISC_REG_EF, 0x8001); /* init led out put */ //red off gpio_amlogic_requst(NULL, GPIOAO_2); gpio_amlogic_direction_output(NULL, GPIOAO_2, 1); //green on gpio_amlogic_requst(NULL, GPIOAO_13); gpio_amlogic_direction_output(NULL, GPIOAO_13, 0); #endif return 0; }
int board_init(void) { gd->bd->bi_arch_number=MACH_TYPE_MESON6_SKT; gd->bd->bi_boot_params=BOOT_PARAMS_OFFSET; #ifdef CONFIG_UBOOT_BUILD_VERSION_INFO print_build_version_info(); #endif #if CONFIG_JERRY_NAND_TEST //temp test nand_init(); #endif #ifdef CONFIG_AML_I2C board_i2c_init(); #endif /*CONFIG_AML_I2C*/ #ifdef CONFIG_IR_REMOTE board_ir_init(); #endif #ifdef CONFIG_USB_XHCI_AMLOGIC board_usb_init(&g_usb_config_g9TV_skt,BOARD_USB_MODE_HOST); #endif /*CONFIG_USB_XHCI_AMLOGIC*/ #if defined(CONFIG_VLSI_EMULATOR) run_command("video dev open 1080p", 0); #endif #ifdef CONFIG_PWM_E_OUT_32K printf("init pwm_e out 32k clock.\n"); writel(readl(P_PERIPHS_PIN_MUX_9) | (0x1 << 19), P_PERIPHS_PIN_MUX_9); //set mode GPIOX_10-->CLK_OUT3 writel(0x16d016d, P_PWM_PWM_E); writel((readl(P_PWM_MISC_REG_EF) & ~(0xFF << 8)) | 0x8001, P_PWM_MISC_REG_EF); #endif //default power on 24M writel(readl(P_PERIPHS_PIN_MUX_10)&~(1 << 11),P_PERIPHS_PIN_MUX_10); writel(readl(P_AO_GPIO_O_EN_N)&~(1 << 18),P_AO_GPIO_O_EN_N); writel(readl(P_AO_GPIO_O_EN_N)&~(1 << 2),P_AO_GPIO_O_EN_N); return 0; }