• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ icache_enable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中icache_enable函数的典型用法代码示例。如果您正苦于以下问题:C++ icache_enable函数的具体用法?C++ icache_enable怎么用?C++ icache_enable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了icache_enable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: enable_caches

void enable_caches(void)
{
	icache_enable();
#ifndef CONFIG_SYS_DCACHE_OFF
	dcache_enable();
#endif
}
开发者ID:OpenHUE,项目名称:bsb002-boot_u-boot,代码行数:7,代码来源:ipq806x_cdp.c


示例2: board_init

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;
}
开发者ID:AvengerMoJo,项目名称:apc-8750,代码行数:26,代码来源:ns9750dev.c


示例3: initdram

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);
}
开发者ID:haitend,项目名称:u-boot-for-mpc8315,代码行数:31,代码来源:muas3001.c


示例4: spr_post_test

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;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:35,代码来源:spr.c


示例5: board_init

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;
}
开发者ID:alessandroste,项目名称:Nufront_uboot,代码行数:33,代码来源:ns115_hdmi_stick.c


示例6: board_init

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;
}
开发者ID:baobao-skl,项目名称:famint-uboot,代码行数:28,代码来源:mini6410.c


示例7: cpudep_ap_bootstrap

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);
}
开发者ID:DangerDexter,项目名称:FreeBSD-8.0-dyntick,代码行数:31,代码来源:mp_cpudep.c


示例8: arch_cpu_init

int arch_cpu_init(void)
{
	icache_enable();
	__asm_invalidate_dcache_all();
	__asm_invalidate_tlb_all();
	return 0;
}
开发者ID:96boards-bubblegum,项目名称:u-boot,代码行数:7,代码来源:cpu.c


示例9: board_init

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;
}
开发者ID:247a,项目名称:lenovo_b6000-8000_kernel_source,代码行数:35,代码来源:edb93xx.c


示例10: do_icache

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;
}
开发者ID:8devices,项目名称:Caraboot,代码行数:25,代码来源:cmd_cache.c


示例11: cpu_init_f

/*
 * 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();
}
开发者ID:Demeterp,项目名称:w732_kernel_src,代码行数:33,代码来源:cpu_init.c


示例12: arch_cpu_init

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;
}
开发者ID:acorn-marvell,项目名称:brillo_iap140_uboot,代码行数:33,代码来源:cpu.c


示例13: board_init

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;
}
开发者ID:aliandy,项目名称:u-boot-digilent,代码行数:25,代码来源:board.c


示例14: board_init

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;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:26,代码来源:omap1610innovator.c


示例15: cpu_init_f

/*
 * 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();
}
开发者ID:CogSystems,项目名称:u-boot,代码行数:34,代码来源:cpu_init.c


示例16: board_init

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;
}
开发者ID:bbbLinux,项目名称:u_boot,代码行数:32,代码来源:board.c


示例17: board_init

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;
}
开发者ID:holinux,项目名称:embedded-linux,代码行数:58,代码来源:Rain2440.c


示例18: s_init

/**********************************************************
 * 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();
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:14,代码来源:apollon.c


示例19: board_init

/*
 * 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;
}
开发者ID:joe3501,项目名称:u-boot-1.3.4-jz2440,代码行数:59,代码来源:jz2440.c


示例20: board_init

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;
}
开发者ID:BillTheBest,项目名称:pandorabox,代码行数:56,代码来源:mx1ads.c



注:本文中的icache_enable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ icalcomponent_add_property函数代码示例发布时间:2022-05-30
下一篇:
C++ icache_disable函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap