static int setup_openiboot() { arm_setup(); mmu_setup(); tasks_setup(); setup_devices(); LeaveCriticalSection(); clock_set_sdiv(0); aes_setup(); nor_setup(); images_setup(); nvram_setup(); lcd_setup(); framebuffer_setup(); audiohw_init(); camera_setup(); return 0; }
static int setup_openiboot() { arm_setup(); mmu_setup(); tasks_setup(); setup_devices(); LeaveCriticalSection(); #ifndef CONFIG_IPHONE_4 clock_set_sdiv(0); aes_setup(); nor_setup(); syscfg_setup(); images_setup(); nvram_setup(); lcd_setup(); framebuffer_setup(); audiohw_init(); #endif isMultitouchLoaded = 0; return 0; }
void platform_init() { arm_setup(); mmu_setup(); tasks_setup(); // Basic prerequisites for everything else miu_setup(); power_setup(); clock_setup(); // Need interrupts for everything afterwards interrupt_setup(); gpio_setup(); // For scheduling/sleeping niceties timer_setup(); event_setup(); // Other devices usb_shutdown(); uart_setup(); i2c_setup(); // DMA currently f***s up. Need to check why. -- Bluerise // dma_setup(); LeaveCriticalSection(); framebuffer_hook(); // TODO: Remove once LCD implemented -- Ricky26 framebuffer_setdisplaytext(TRUE); }
void platform_init() { arm_setup(); mmu_setup(); tasks_setup(); // Basic prerequisites for everything else miu_setup(); power_setup(); clock_setup(); // Need interrupts for everything afterwards interrupt_setup(); gpio_setup(); // For scheduling/sleeping niceties timer_setup(); event_setup(); wdt_setup(); // Other devices // uart_setup(); i2c_setup(); // dma_setup(); spi_setup(); LeaveCriticalSection(); aes_setup(); nor_setup(); syscfg_setup(); images_setup(); nvram_setup(); // lcd_setup(); framebuffer_hook(); // TODO: Remove once LCD implemented framebuffer_setup(); // audiohw_init(); framebuffer_setdisplaytext(TRUE); gpio_register_interrupt(BUTTONS_HOLD_IRQ, BUTTONS_HOLD_IRQTYPE, BUTTONS_HOLD_IRQLEVEL, BUTTONS_HOLD_IRQAUTOFLIP, gpio_test_handler, 0); gpio_interrupt_enable(BUTTONS_HOLD_IRQ); gpio_register_interrupt(BUTTONS_HOME_IRQ, BUTTONS_HOME_IRQTYPE, BUTTONS_HOME_IRQLEVEL, BUTTONS_HOME_IRQAUTOFLIP, gpio_test_handler, 1); gpio_interrupt_enable(BUTTONS_HOME_IRQ); gpio_register_interrupt(BUTTONS_VOLUP_IRQ, BUTTONS_VOLUP_IRQTYPE, BUTTONS_VOLUP_IRQLEVEL, BUTTONS_VOLUP_IRQAUTOFLIP, gpio_test_handler, 2); gpio_interrupt_enable(BUTTONS_VOLUP_IRQ); gpio_register_interrupt(BUTTONS_VOLDOWN_IRQ, BUTTONS_VOLDOWN_IRQTYPE, BUTTONS_VOLDOWN_IRQLEVEL, BUTTONS_VOLDOWN_IRQAUTOFLIP, gpio_test_handler, 3); gpio_interrupt_enable(BUTTONS_VOLDOWN_IRQ); }
void platform_init() { arm_setup(); mmu_setup(); tasks_setup(); // Basic prerequisites for everything else miu_setup(); power_setup(); clock_setup(); // Need interrupts for everything afterwards interrupt_setup(); gpio_setup(); // For scheduling/sleeping niceties timer_setup(); event_setup(); wdt_setup(); // Other devices uart_setup(); i2c_setup(); // dma_setup(); spi_setup(); LeaveCriticalSection(); aes_setup(); displaypipe_init(); framebuffer_setup(); framebuffer_setdisplaytext(TRUE); lcd_set_backlight_level(186); // audiohw_init(); //TODO: remove task_init(&iboot_loader_task, "iboot loader", TASK_DEFAULT_STACK_SIZE); task_start(&iboot_loader_task, &iboot_loader_run, NULL); }
void platform_init() { arm_setup(); mmu_setup(); tasks_setup(); // Basic prerequisites for everything else miu_setup(); power_setup(); clock_setup(); // Need interrupts for everything afterwards interrupt_setup(); gpio_setup(); // For scheduling/sleeping niceties timer_setup(); event_setup(); wdt_setup(); // Other devices uart_setup(); i2c_setup(); dma_setup(); spi_setup(); LeaveCriticalSection(); clock_set_sdiv(0); aes_setup(); lcd_setup(); framebuffer_setup(); audiohw_init(); framebuffer_setdisplaytext(TRUE); }
boot2() { set_pll(); // pio_op_for_lcd(); arm_setup(); powerdown_usb0(CCMU_REGS_BASE); cli(); pic_startup0(INTC_REGS_BASE); // sti(); int i; printk("boot2 starting.... & hello world :-)\r\n"); // __sclk_coreclk_freq_cfg(CCMU_REGS_BASE, 192000000); printk("initialize uart module: %d\n",kmsg_uart_setup0(UART0_REGS_BASE)); // kmsg_80020000h_setup(); ccmu_info(); gpio_twi0(); powerup_twi0(CCMU_REGS_BASE); printk("twic_startup: %d\n", twic_startup(TWIC0_REGS_BASE)); twic_clk_cfg(TWIC0_REGS_BASE, 0, __sclk_apbclk_freq(CCMU_REGS_BASE)); // standard clk mode printk("axp182: supply_status = %02xh\n", axp182_query_status()); axp182_lcd_open(); // i = nand_startup0(); // if (i) printk("nands are connected, the number of chips(CEs#) = %d.\n", i); // else printk("cannot detect nand flash chip, error?\n"); DE_LCDC_Init(); printk("disp module startup : %d \n",disp_startup()); kmsg_disp_setup0(0x80030000,0, 1); key_startup(); i=0; // while(i<1000) printk("%d\n", i++); // boo21(); // while(1); int ret; __asm__ volatile("swi #7; mov %0, r0":"=r"(ret)::"r0","lr"); printk("syscall: %08x\n",ret); // 不恢复原状态关闭模块 sti(); extern volatile unsigned keycount; while(keycount<1000); // powerdown_lcd(CCMU_REGS_BASE); kmsg_uart_pulldown0(); powerdown_usb0(CCMU_REGS_BASE); nand_shutdown0(); pic_shutdown0(); arm_pulldown0(); // 因为usb驱动(和其他东西)已被我们关闭,所以只能这样回fel gotofel(); return 0; }