void enable_caches(void) { icache_enable(); #ifndef CONFIG_SYS_DCACHE_OFF dcache_enable(); #endif }
int board_init( void ) { DECLARE_GLOBAL_DATA_PTR; /* Active BBUS modules */ *get_bbus_reg_addr( NS9750_BBUS_MASTER_RESET ) = 0; #warning Please register your machine at http://www.arm.linux.org.uk/developer/machines/?action=new /* arch number of OMAP 1510-Board */ /* to be changed for OMAP 1610 Board */ gd->bd->bi_arch_number = 234; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x10000100; /* this speeds up your boot a quite a bit. However to make it * work, you need make sure your kernel startup flush bug is fixed. * ... rkw ... */ icache_enable(); flash__init(); ether__init(); return 0; }
phys_size_t initdram (int board_type) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; volatile memctl8260_t *memctl = &immap->im_memctl; long psize; #ifndef CONFIG_SYS_RAMBOOT long sizelittle, sizebig; #endif memctl->memc_psrt = CONFIG_SYS_PSRT; memctl->memc_mptpr = CONFIG_SYS_MPTPR; #ifndef CONFIG_SYS_RAMBOOT /* 60x SDRAM setup: */ sizelittle = try_init (memctl, CONFIG_SYS_PSDMR_LITTLE, CONFIG_SYS_OR1_LITTLE, (uchar *) CONFIG_SYS_SDRAM_BASE); sizebig = try_init (memctl, CONFIG_SYS_PSDMR_BIG, CONFIG_SYS_OR1_BIG, (uchar *) CONFIG_SYS_SDRAM_BASE); if (sizelittle < sizebig) { psize = sizebig; } else { psize = try_init (memctl, CONFIG_SYS_PSDMR_LITTLE, CONFIG_SYS_OR1_LITTLE, (uchar *) CONFIG_SYS_SDRAM_BASE); } #endif /* CONFIG_SYS_RAMBOOT */ icache_enable (); return (psize); }
int spr_post_test (int flags) { int ret = 0; int ic = icache_status (); int i; unsigned long code[] = { 0x7c6002a6, /* mfspr r3,SPR */ 0x4e800020 /* blr */ }; unsigned long (*get_spr) (void) = (void *) code; if (ic) icache_disable (); for (i = 0; i < spr_test_list_size; i++) { int num = spr_test_list[i].number; /* mfspr r3,num */ code[0] = 0x7c6002a6 | ((num & 0x1F) << 16) | ((num & 0x3E0) << 6); if ((get_spr () & spr_test_list[i].mask) != (spr_test_list[i].value & spr_test_list[i].mask)) { post_log ("The value of %s special register " "is incorrect: 0x%08X\n", spr_test_list[i].name, get_spr ()); ret = -1; } } if (ic) icache_enable (); return ret; }
int board_init (void) { volatile unsigned int tmp = 0; DECLARE_GLOBAL_DATA_PTR; gd->bd->bi_arch_number = MACH_TYPE_NS115_PAD_REF; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x80000100; // gd->flags = 0; icache_enable (); rvpb_timer_init(); writel(0x1,0x05042c00); writel(0x10000000,0x05042c04); //set lcd pinmux writel(0x0,0x05822004); writel(0x01000000,0x05822008); #ifdef CONFIG_FASTBOOT_RECOVERY unsigned int hdmi_soft_update; hdmi_soft_update = nufront_get_gpio_value(26); if(hdmi_soft_update == 0x0){ fastboot_flag = 1; } #endif return 0; }
int board_init(void) { DECLARE_GLOBAL_DATA_PTR; u32 reg; dm9000_pre_init(); /* set GPIO for Display Controller */ reg = readl(MIFPCON); reg &= ~(1 << 3); writel(reg, MIFPCON); reg = readl(SPCON); reg &= ~(3 << 0); writel(reg | 0x1, SPCON); writel(0xaaaaaaaa, GPICON); writel(0xaaaaaa, GPJCON); gd->bd->bi_arch_number = MACH_TYPE; gd->bd->bi_boot_params = (PHYS_SDRAM_1+0x100); #if 0 icache_enable(); dcache_enable(); #endif return 0; }
uint32_t cpudep_ap_bootstrap() { uint32_t msr, sp, csr; /* Enable L1 caches */ csr = mfspr(SPR_L1CSR0); if ((csr & L1CSR0_DCE) == 0) { dcache_inval(); dcache_enable(); } csr = mfspr(SPR_L1CSR1); if ((csr & L1CSR1_ICE) == 0) { icache_inval(); icache_enable(); } /* Set MSR */ msr = PSL_ME; mtmsr(msr); /* Assign pcpu fields, return ptr to this AP's idle thread kstack */ pcpup->pc_curthread = pcpup->pc_idlethread; pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; sp = pcpup->pc_curpcb->pcb_sp; /* XXX shouldn't the pcb_sp be checked/forced for alignment here?? */ return (sp); }
int arch_cpu_init(void) { icache_enable(); __asm_invalidate_dcache_all(); __asm_invalidate_tlb_all(); return 0; }
int board_init(void) { struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE; icache_enable(); #ifdef USE_920T_MMU dcache_enable(); #endif /* * set UARTBAUD bit to drive UARTs with 14.7456MHz instead of * 14.7456/2 MHz */ uint32_t value = readl(&syscon->pwrcnt); value |= SYSCON_PWRCNT_UART_BAUD; writel(value, &syscon->pwrcnt); /* Enable the uart in devicecfg */ value = readl(&syscon->devicecfg); value |= 1<<18 /* U1EN */; writel(0xAA, &syscon->sysswlock); writel(value, &syscon->devicecfg); /* Machine number, as defined in linux/arch/arm/tools/mach-types */ gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* adress of boot parameters */ gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR; /* We have a console */ gd->have_console = 1; return 0; }
int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { switch (argc) { case 2: /* on / off */ switch (on_off(argv[1])) { #if 0 /* prevented by varargs handling; FALLTROUGH is harmless, too */ default: printf ("Usage:\n%s\n", cmdtp->usage); return; #endif case 0: icache_disable(); break; case 1: icache_enable (); break; } /* FALL TROUGH */ case 1: /* get status */ printf ("Instruction Cache is %s\n", icache_status() ? "ON" : "OFF"); return 0; default: printf ("Usage:\n%s\n", cmdtp->usage); return 1; } return 0; }
/* * Breathe some life into the CPU... * * Set up the memory map, * initialize a bunch of registers, * initialize the UPM's */ void cpu_init_f(void) { /* * if we come from RAM we assume the CPU is * already initialized. */ #ifndef CONFIG_MONITOR_IS_IN_RAM volatile wdog_t *wdog_reg = (wdog_t *) (MMAP_WDOG); volatile gpio_t *gpio_reg = (gpio_t *) (MMAP_GPIO); /* Kill watchdog so we can initialize the PLL */ wdog_reg->wcr = 0; /* FlexBus Chipselect */ init_fbcs(); #endif /* #ifndef CONFIG_MONITOR_IS_IN_RAM */ #ifdef CONFIG_FSL_I2C CONFIG_SYS_I2C_PINMUX_REG &= CONFIG_SYS_I2C_PINMUX_CLR; CONFIG_SYS_I2C_PINMUX_REG |= CONFIG_SYS_I2C_PINMUX_SET; #endif /* enable instruction cache now */ icache_enable(); }
int arch_cpu_init(void) { struct pxa1978accu_registers *accu = (struct pxa1978accu_registers *)PXA1978_ACCU_BASE; writel(UARTCLK14745KHZ, &accu->uart1); /* Set timer clock CONFIG_SYS_HZ_CLOCK = 26MHz */ writel(TIMERCLK_26MHZ, &accu->timer1); #ifdef CONFIG_I2C_MV /* Enable I2C clock */ /* TODO */ #endif #ifdef CONFIG_MMP_DISP /* TODO */ #endif #ifdef CONFIG_MV_SDHCI /* Enable mmc clock */ /* TODO */ #endif #ifdef CONFIG_MV_UDC /* Enable usb clock */ /* TODO */ #endif icache_enable(); return 0; }
int board_init(void) { /* temporary hack to clear pending irqs before Linux as it will hang Linux */ XIo_Out32(0xe0001014, 0x26d); /* temporary hack to take USB out of reset til the is fixed in Linux */ XIo_Out32(0xe000a204, 0x80); XIo_Out32(0xe000a208, 0x80); XIo_Out32(0xe000a040, 0x80); XIo_Out32(0xe000a040, 0x00); XIo_Out32(0xe000a040, 0x80); icache_enable(); #ifdef CONFIG_FPGA fpga_init(); fpga_add(fpga_xilinx, &fpga); #endif return 0; }
int board_init (void) { if (machine_is_omap_h2()) gd->bd->bi_arch_number = MACH_TYPE_OMAP_H2; else if (machine_is_omap_innovator()) gd->bd->bi_arch_number = MACH_TYPE_OMAP_INNOVATOR; else gd->bd->bi_arch_number = MACH_TYPE_OMAP_GENERIC; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x10000100; /* Configure MUX settings */ set_muxconf_regs (); peripheral_power_enable (); /* this speeds up your boot a quite a bit. However to make it * work, you need make sure your kernel startup flush bug is fixed. * ... rkw ... */ icache_enable (); flash__init (); ether__init (); return 0; }
/* * Set up the memory map and initialize registers */ void cpu_init_f(void) { sim_t *sim = (sim_t *)(MMAP_SIM); out_8(&sim->sypcr, 0x00); out_8(&sim->swivr, 0x0f); out_8(&sim->swsr, 0x00); out_8(&sim->mpark, 0x00); intctrl_t *icr = (intctrl_t *)(MMAP_INTC); /* timer 2 not masked */ out_be32(&icr->imr, 0xfffffbff); out_8(&icr->icr0, 0x00); /* sw watchdog */ out_8(&icr->icr1, 0x00); /* timer 1 */ out_8(&icr->icr2, 0x88); /* timer 2 */ out_8(&icr->icr3, 0x00); /* i2c */ out_8(&icr->icr4, 0x00); /* uart 0 */ out_8(&icr->icr5, 0x00); /* uart 1 */ out_8(&icr->icr6, 0x00); /* dma 0 */ out_8(&icr->icr7, 0x00); /* dma 1 */ out_8(&icr->icr8, 0x00); /* dma 2 */ out_8(&icr->icr9, 0x00); /* dma 3 */ /* Chipselect Init */ init_csm(); /* enable data/instruction cache now */ icache_enable(); }
int board_init(void) { #ifdef CONFIG_FPGA u32 idcode; idcode = zynq_slcr_get_idcode(); switch (idcode) { case XILINX_ZYNQ_7010: fpga = fpga010; break; case XILINX_ZYNQ_7020: fpga = fpga020; break; case XILINX_ZYNQ_7030: fpga = fpga030; break; case XILINX_ZYNQ_7045: fpga = fpga045; break; } #endif icache_enable(); #ifdef CONFIG_FPGA fpga_init(); fpga_add(fpga_xilinx, &fpga); #endif return 0; }
int board_mmc_init(bd_t *bis) { int err; struct davinci_gpio *gpio23_base = (struct davinci_gpio *)DAVINCI_GPIO_BANK23; /* GIO42 (~eMMC_RESET) pinmux setting */ writel((readl(PINMUX4) & 0x3FFFFFFF), PINMUX4); /* set GIO42 (~eMMC_RESET) output */ writel((readl(&gpio23_base->dir) & ~(1 << 10)), &gpio23_base->dir); /* GIO42 (~eMMC_RESET) output High */ writel((readl(&gpio23_base->set_data) | (1 << 10)), &gpio23_base->set_data); /* * enabling cache make mmc read faster * but tftp doesn't work */ icache_enable (); dcache_enable (); /* Add slot-0 to mmc subsystem */ err = davinci_mmc_init(bis, &mmc_sd0); if (err) return err; return err; }
int board_init (void) { S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); /* to reduce PLL lock time, adjust the LOCKTIME register */ clk_power->LOCKTIME = 0xFFFFFF; /* FCLK:HCLK:PCLK = 1:4:8 */ clk_power->CLKDIVN = 0x05; /* Change to Asynchronous bus mode */ __asm__( "mrc p15, 0, r1, c1, c0, 0\n" /* read ctrl register */ "orr r1, r1, #0xc0000000\n" /* Asynchronous */ "mcr p15, 0, r1, c1, c0, 0\n" /* write ctrl register */ :::"r1" ); /* configure MPLL */ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); /* some delay between MPLL and UPLL */ delay (4000); /* configure UPLL */ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); /* some delay between MPLL and UPLL */ delay (8000); /* set up the I/O ports */ gpio->GPACON = 0x007FFFFF; gpio->GPBCON = 0x00044554; gpio->GPBUP = 0x000007FF; gpio->GPCCON = 0xAAAAAAAA; gpio->GPCUP = 0x0000FFFF; gpio->GPDCON = 0xAAAAAAAA; gpio->GPDUP = 0x0000FFFF; gpio->GPECON = 0xAAAAAAAA; gpio->GPEUP = 0x0000FFFF; gpio->GPFCON = 0x000055AA; gpio->GPFUP = 0x000000FF; gpio->GPGCON = 0xFF95FFBA; gpio->GPGUP = 0x0000FFFF; gpio->GPHCON = 0x002AFAAA; gpio->GPHUP = 0x000007FF; /* arch number of SMDK2410-Board */ gd->bd->bi_arch_number = MACH_TYPE_MINI2440; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x30000100; icache_enable(); dcache_enable(); return 0; }
int board_init (void) { S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); clk_power->CLKDIVN = S3C2410_CLKDIV; /* change to asynchronous bus mod */ __asm__( "mrc p15, 0, r1, c1, c0, 0\n" /* read ctrl register */ "orr r1, r1, #0xc0000000\n" /* Asynchronous */ "mcr p15, 0, r1, c1, c0, 0\n" /* write ctrl register */ :::"r1" ); /* to reduce PLL lock time, adjust the LOCKTIME register */ clk_power->LOCKTIME = 0xFFFFFF; /* configure MPLL */ clk_power->MPLLCON = S3C2410_MPLL_200MHZ; /* some delay between MPLL and UPLL */ delay (4000); /* configure UPLL */ clk_power->UPLLCON = S3C2410_UPLL_48MHZ; /* some delay between MPLL and UPLL */ delay (8000); /* set up the I/O ports */ gpio->GPACON = 0x007FFFFF; gpio->GPBCON = 0x00045555; gpio->GPBDAT &= (~(1<<6)); gpio->GPBUP = 0x000007FF; gpio->GPCCON = 0xAAAAAAAA; gpio->GPCUP = 0x0000FFFF; gpio->GPDCON = 0xAAAAAAAA; gpio->GPDUP = 0x0000FFFF; gpio->GPECON = 0xAAAAAAAA; gpio->GPEUP = 0x0000FFFF; gpio->GPFCON = 0x000055AA; gpio->GPFUP = 0x000000FF; gpio->GPGCON = 0xFF95FFBA; gpio->GPGUP = 0x0000FFFF; gpio->GPHCON = 0x002AFAAA; gpio->GPHUP = 0x000007FF; /* arch number of SMDK2410-Board */ gd->bd->bi_arch_number = MACH_TYPE_SMDK2410; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x30000100; icache_enable(); dcache_enable(); return 0; }
/********************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks. * - Called path is with sram stack. **********************************************************/ void s_init(void) { watchdog_init(); set_muxconf_regs(); delay(100); peripheral_enable(); icache_enable(); }
/* * Breath some life into the CPU... * * Set up the memory map, * initialize a bunch of registers, * initialize the UPM's */ void cpu_init_f(void) { /* * NOTE: by setting the GPIO_FUNCTION registers, we ensure that the UART pins * (UART0: gpio 30,27, UART1: gpio 31, 28) will be used as UART pins * which is their primary function. * ~Jeremy */ mbar2_writeLong(MCFSIM_GPIO_FUNC, CONFIG_SYS_GPIO_FUNC); mbar2_writeLong(MCFSIM_GPIO1_FUNC, CONFIG_SYS_GPIO1_FUNC); mbar2_writeLong(MCFSIM_GPIO_EN, CONFIG_SYS_GPIO_EN); mbar2_writeLong(MCFSIM_GPIO1_EN, CONFIG_SYS_GPIO1_EN); mbar2_writeLong(MCFSIM_GPIO_OUT, CONFIG_SYS_GPIO_OUT); mbar2_writeLong(MCFSIM_GPIO1_OUT, CONFIG_SYS_GPIO1_OUT); /* * dBug Compliance: * You can verify these values by using dBug's 'ird' * (Internal Register Display) command * ~Jeremy * */ mbar_writeByte(MCFSIM_MPARK, 0x30); /* 5249 Internal Core takes priority over DMA */ mbar_writeByte(MCFSIM_SYPCR, 0x00); mbar_writeByte(MCFSIM_SWIVR, 0x0f); mbar_writeByte(MCFSIM_SWSR, 0x00); mbar_writeLong(MCFSIM_IMR, 0xfffffbff); mbar_writeByte(MCFSIM_SWDICR, 0x00); mbar_writeByte(MCFSIM_TIMER1ICR, 0x00); mbar_writeByte(MCFSIM_TIMER2ICR, 0x88); mbar_writeByte(MCFSIM_I2CICR, 0x00); mbar_writeByte(MCFSIM_UART1ICR, 0x00); mbar_writeByte(MCFSIM_UART2ICR, 0x00); mbar_writeByte(MCFSIM_ICR6, 0x00); mbar_writeByte(MCFSIM_ICR7, 0x00); mbar_writeByte(MCFSIM_ICR8, 0x00); mbar_writeByte(MCFSIM_ICR9, 0x00); mbar_writeByte(MCFSIM_QSPIICR, 0x00); mbar2_writeLong(MCFSIM_GPIO_INT_EN, 0x00000080); mbar2_writeByte(MCFSIM_INTBASE, 0x40); /* Base interrupts at 64 */ mbar2_writeByte(MCFSIM_SPURVEC, 0x00); mbar2_writeLong(MCFSIM_IDECONFIG1, 0x00000020); /* Enable a 1 cycle pre-drive cycle on CS1 */ /* Setup interrupt priorities for gpio7 */ /* mbar2_writeLong(MCFSIM_INTLEV5, 0x70000000); */ /* IDE Config registers */ mbar2_writeLong(MCFSIM_IDECONFIG1, 0x00000020); mbar2_writeLong(MCFSIM_IDECONFIG2, 0x00000000); /* FlexBus Chipselect */ init_fbcs(); /* enable instruction cache now */ icache_enable(); }
/* * Miscellaneous platform dependent initialisations */ int board_init (void) { S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); /* set up the I/O ports */ /* gpio->GPACON = 0x007FFFFF; gpio->GPBCON = 0x00055555; gpio->GPBUP = 0x000007FF; gpio->GPCCON = 0xAAAAAAAA; gpio->GPCUP = 0x0000FFFF; gpio->GPDCON = 0xAAAAAAAA; gpio->GPDUP = 0x0000FFFF; gpio->GPECON = 0xAAAAAAAA; gpio->GPEUP = 0x0000FFFF; gpio->GPFCON = 0x000055AA; gpio->GPFUP = 0x000000FF; gpio->GPGCON = 0xFF94FFBA; gpio->GPGUP = 0x0000FFEF; gpio->GPGDAT = gpio->GPGDAT & ((~(1<<4)) | (1<<4)) ; gpio->GPHCON = 0x002AFAAA; gpio->GPHUP = 0x000007FF; gpio->GPJCON = 0x02aaaaaa; gpio->GPJUP = 0x00001fff; */ gpio->GPACON = 0x007FFFFF; //每个 pin的设置取决于原理图,从原理图可知 GPA的每个IO都是使用的其特殊功能 gpio->GPBCON = 0x00044555; //每组GPIO的配置方式不一致,需要结合主控的数据手册和板子的原理图来进行配置 gpio->GPBUP = 0x000007FF; gpio->GPCCON = 0xAAAAAAAA; gpio->GPCUP = 0x0000FFFF; gpio->GPDCON = 0xAAAAAAAA; gpio->GPDUP = 0x0000FFFF; gpio->GPECON = 0xAAAAAAAA; gpio->GPEUP = 0x0000FFFF; gpio->GPFCON = 0x000055AA; gpio->GPFUP = 0x000000FF; gpio->GPGCON = 0xFF95FFBA; gpio->GPGUP = 0x0000FFFF; gpio->GPHCON = 0x002AFAAA; gpio->GPHUP = 0x000007FF; // S3C24X0_I2S * const i2s = S3C24X0_GetBase_I2S(); //HJ_add 屏蔽IIS, // i2s->IISCON = 0x00; //HJ_add 屏蔽IIS, /* arch number of TQ2440-Board */ gd->bd->bi_arch_number = MACH_TYPE_JZ2440; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x30000100; icache_enable(); dcache_enable(); return 0; }
int board_init (void) { DECLARE_GLOBAL_DATA_PTR; volatile unsigned int tmp; mc9328sid = SIDR; GPCR = 0x000003AB; /* I/O pad driving strength */ /* MX1_CS1U = 0x00000A00; */ /* SRAM initialization */ /* MX1_CS1L = 0x11110601; */ MPCTL0 = 0x04632410; /* setting for 150 MHz MCU PLL CLK */ /* set FCLK divider 1 (i.e. FCLK to MCU PLL CLK) and * BCLK divider to 2 (i.e. BCLK to 48 MHz) */ CSCR = 0xAF000403; CSCR |= 0x00200000; /* Trigger the restart bit(bit 21) */ CSCR &= 0xFFFF7FFF; /* Program PRESC bit(bit 15) to 0 to divide-by-1 */ /* setup cs4 for cs8900 ethernet */ CS4U = 0x00000F00; /* Initialize CS4 for CS8900 ethernet */ CS4L = 0x00001501; GIUS(0) &= 0xFF3FFFFF; GPR(0) &= 0xFF3FFFFF; tmp = *(unsigned int *)(0x1500000C); tmp = *(unsigned int *)(0x1500000C); SetAsynchMode(); gd->bd->bi_arch_number = MACH_TYPE_MX1ADS; gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */ icache_enable(); dcache_enable(); /* set PERCLKs */ PCDR = 0x00000055; /* set PERCLKS */ /* PERCLK3 is only used by SSI so the SSI driver can set it any value it likes * PERCLK1 and PERCLK2 are shared so DO NOT change it in any other place * all sources selected as normal interrupt */ /* MX1_INTTYPEH = 0; MX1_INTTYPEL = 0; */ return 0; }
int arch_cpu_init(void) { u32 val; struct armd1cpu_registers *cpuregs = (struct armd1cpu_registers *) ARMD1_CPU_BASE; struct armd1apb1_registers *apb1clkres = (struct armd1apb1_registers *) ARMD1_APBC1_BASE; struct armd1mpmu_registers *mpmu = (struct armd1mpmu_registers *) ARMD1_MPMU_BASE; /* set SEL_MRVL_ID bit in ARMADA100_CPU_CONF register */ val = readl(&cpuregs->cpu_conf); val = val | SET_MRVL_ID; writel(val, &cpuregs->cpu_conf); /* Enable Clocks for all hardware units */ writel(0xFFFFFFFF, &mpmu->acgr); /* Turn on AIB and AIB-APB Functional clock */ writel(APBC_APBCLK | APBC_FNCLK, &apb1clkres->aib); /* ensure L2 cache is not mapped as SRAM */ val = readl(&cpuregs->cpu_conf); val = val & ~(L2C_RAM_SEL); writel(val, &cpuregs->cpu_conf); /* Enable GPIO clock */ writel(APBC_APBCLK, &apb1clkres->gpio); #ifdef CONFIG_I2C_MV /* Enable general I2C clock */ writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0); writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0); /* Enable power I2C clock */ writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1); writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1); #endif /* * Enable Functional and APB clock at 14.7456MHz * for configured UART console */ #if (CONFIG_SYS_NS16550_COM1 == ARMD1_UART3_BASE) writel(UARTCLK14745KHZ, &apb1clkres->uart3); #elif (CONFIG_SYS_NS16550_COM1 == ARMD1_UART2_BASE) writel(UARTCLK14745KHZ, &apb1clkres->uart2); #else writel(UARTCLK14745KHZ, &apb1clkres->uart1); #endif icache_enable(); return 0; }
int board_init (void) { u32 val; /* arch number of Integrator Board */ #ifdef CONFIG_ARCH_CINTEGRATOR gd->bd->bi_arch_number = MACH_TYPE_CINTEGRATOR; #else gd->bd->bi_arch_number = MACH_TYPE_INTEGRATOR; #endif /* adress of boot parameters */ gd->bd->bi_boot_params = 0x00000100; gd->flags = 0; #ifdef CONFIG_CM_REMAP extern void cm_remap(void); cm_remap(); /* remaps writeable memory to 0x00000000 */ #endif #ifdef CONFIG_ARCH_CINTEGRATOR /* * Flash protection on the Integrator/CP is in a simple register */ val = readl(CP_FLASHPROG); val |= (CP_FLASHPROG_FLVPPEN | CP_FLASHPROG_FLWREN); writel(val, CP_FLASHPROG); #else /* * The Integrator/AP has some special protection mechanisms * for the external memories, first the External Bus Interface (EBI) * then the system controller (SC). * * The system comes up with the flash memory non-writable and * configuration locked. If we want U-Boot to be used for flash * access we cannot have the flash memory locked. */ writel(EBI_UNLOCK_MAGIC, EBI_BASE + EBI_LOCK_REG); val = readl(EBI_BASE + EBI_CSR1_REG); val &= EBI_CSR_WREN_MASK; val |= EBI_CSR_WREN_ENABLE; writel(val, EBI_BASE + EBI_CSR1_REG); writel(0, EBI_BASE + EBI_LOCK_REG); /* * Set up the system controller to remove write protection from * the flash memory and enable Vpp */ writel(SC_CTRL_FLASHVPP | SC_CTRL_FLASHWP, SC_CTRLS); #endif icache_enable (); return 0; }
void kgdb_flush_cache_all(void) { if (dcache_status()) { dcache_disable(); dcache_enable(); } if (icache_status()) { icache_disable(); icache_enable(); } }
int cleanup_before_linux (void) { /* cache memory should be enabled before calling Linux to make the kernel uncompression faster */ icache_enable(); disable_interrupts (); return 0; }
void s_init(void) { /* Configure MUX settings */ set_muxconf_regs (); peripheral_power_enable (); /* this speeds up your boot a quite a bit. However to make it * work, you need make sure your kernel startup flush bug is fixed. * ... rkw ... */ icache_enable (); }
int board_init(void) { /* arch number of MINI2440-Board */ gd->bd->bi_arch_number = MACH_TYPE_MINI2440; /* adress of boot parameters */ gd->bd->bi_boot_params = 0x30000100; icache_enable(); dcache_enable(); return 0; }
/* * Miscellaneous platform dependent initialisations */ int board_init (void) { volatile unsigned int test; icache_enable (); ether__init (); lcd__init(); gd->bd->bi_arch_number = MACH_TYPE_LF1000; gd->bd->bi_boot_params = CONFIG_LF1000_BOOT_PARAMS_ADDR; return 0; }