示例#1
0
void
hal_hardware_init(void)
{
    hal_xscale_core_init();

    // all interrupt sources to IRQ and disabled
    *IXP425_INTR_SEL = 0;
    *IXP425_INTR_EN = 0;

    // Enable caches
    HAL_DCACHE_ENABLE();
    HAL_ICACHE_ENABLE();

    // Let the timer run at a default rate (for delays)
    hal_clock_initialize(CYGNUM_HAL_RTC_PERIOD);

    // Set up eCos/ROM interfaces
    hal_if_init();

    // Perform any platform specific initializations
    plf_hardware_init();

#ifdef CYGPKG_IO_PCI
    cyg_hal_plf_pci_init();
#endif
}
示例#2
0
void
hal_platform_init(void)
{
    // Init superIO before calling if_init (which will use UARTs)
    cyg_hal_init_superIO();

    hal_if_init();

#if defined(CYGPKG_REDBOOT) && defined(CYGPKG_IO_PCI)
    cyg_hal_plf_pci_init();
#endif

    // Set up interrupt arbiter
    cyg_drv_interrupt_create(CYGNUM_HAL_INTERRUPT_PCI, 1,
                             0, cyg_hal_plf_pci_arbiter, NULL,
                             &intr_handle, &intr);
    cyg_drv_interrupt_attach(intr_handle);
    cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_PCI);
}