亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sb_common.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? C
字號:
/* *  Copyright (C) 2005 Sandburst Corporation * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */#include <config.h>#include <common.h>#include <command.h>#include <asm/processor.h>#include <asm/io.h>#include <spd_sdram.h>#include <i2c.h>#include "ppc440gx_i2c.h"#include "sb_common.h"DECLARE_GLOBAL_DATA_PTR;long int fixed_sdram (void);/************************************************************************* *  metrobox_get_master * *  PRI_N - active low signal.	If the GPIO pin is low we are the master * ************************************************************************/int sbcommon_get_master(void){	ppc440_gpio_regs_t *gpio_regs;	gpio_regs = (ppc440_gpio_regs_t *)CFG_GPIO_BASE;	if (gpio_regs->in & SBCOMMON_GPIO_PRI_N) {		return 0;	}	else {		return 1;	}}/************************************************************************* *  metrobox_secondary_present * *  Figure out if secondary/slave board is present * ************************************************************************/int sbcommon_secondary_present(void){	ppc440_gpio_regs_t *gpio_regs;	gpio_regs = (ppc440_gpio_regs_t *)CFG_GPIO_BASE;	if (gpio_regs->in & SBCOMMON_GPIO_SEC_PRES)		return 0;	else		return 1;}/************************************************************************* *  sbcommon_get_serial_number * *  Retrieve the board serial number via the mac address in eeprom * ************************************************************************/unsigned short sbcommon_get_serial_number(void){	unsigned char buff[0x100];	unsigned short sernum;	/* Get the board serial number from eeprom */	/* Initialize I2C */	i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);	/* Read 256 bytes in EEPROM */	i2c_read (0x50, 0, 1, buff, 0x100);	memcpy(&sernum, &buff[0xF4], 2);	sernum /= 32;	return (sernum);}/************************************************************************* *  sbcommon_fans * *  Spin up fans 2 & 3 to get some air moving.	OS will take care *  of the rest.  This is mostly a precaution... * *  Assumes i2c bus 1 is ready. * ************************************************************************/void sbcommon_fans(void){	/*	 * Attempt to turn on 2 of the fans...	 * Need to go through the bridge	 */	puts ("FANS:  ");	/* select fan4 through the bridge */	i2c_reg_write1(0x73, /* addr */		       0x00, /* reg */		       0x08); /* val = bus 4 */	/* Turn on FAN 4 */	i2c_reg_write1(0x2e,		       1,		       0x80);	i2c_reg_write1(0x2e,		       0,		       0x19);	/* Deselect bus 4 on the bridge */	i2c_reg_write1(0x73,		       0x00,		       0x00);	/* select fan3 through the bridge */	i2c_reg_write1(0x73, /* addr */		       0x00, /* reg */		       0x04); /* val = bus 3 */	/* Turn on FAN 3 */	i2c_reg_write1(0x2e,		       1,		       0x80);	i2c_reg_write1(0x2e,		       0,		       0x19);	/* Deselect bus 3 on the bridge */	i2c_reg_write1(0x73,		       0x00,		       0x00);	/* select fan2 through the bridge */	i2c_reg_write1(0x73, /* addr */		       0x00, /* reg */		       0x02); /* val = bus 4 */	/* Turn on FAN 2 */	i2c_reg_write1(0x2e,		       1,		       0x80);	i2c_reg_write1(0x2e,		       0,		       0x19);	/* Deselect bus 2 on the bridge */	i2c_reg_write1(0x73,		       0x00,		       0x00);	/* select fan1 through the bridge */	i2c_reg_write1(0x73, /* addr */		       0x00, /* reg */		       0x01); /* val = bus 0 */	/* Turn on FAN 1 */	i2c_reg_write1(0x2e,		       1,		       0x80);	i2c_reg_write1(0x2e,		       0,		       0x19);	/* Deselect bus 1 on the bridge */	i2c_reg_write1(0x73,		       0x00,		       0x00);	puts ("on\n");	return;}/************************************************************************* *  initdram * *  Initialize sdram * ************************************************************************/long int initdram (int board_type){	long dram_size = 0;#if defined(CONFIG_SPD_EEPROM)	dram_size = spd_sdram ();#else	dram_size = fixed_sdram ();#endif	return dram_size;}/************************************************************************* *  testdram * * ************************************************************************/#if defined(CFG_DRAM_TEST)int testdram (void){	uint *pstart = (uint *) CFG_MEMTEST_START;	uint *pend = (uint *) CFG_MEMTEST_END;	uint *p;	printf("Testing SDRAM: ");	for (p = pstart; p < pend; p++)		*p = 0xaaaaaaaa;	for (p = pstart; p < pend; p++) {		if (*p != 0xaaaaaaaa) {			printf ("SDRAM test fails at: %08x\n", (uint) p);			return 1;		}	}	for (p = pstart; p < pend; p++)		*p = 0x55555555;	for (p = pstart; p < pend; p++) {		if (*p != 0x55555555) {			printf ("SDRAM test fails at: %08x\n", (uint) p);			return 1;		}	}	printf("OK\n");	return 0;}#endif#if !defined(CONFIG_SPD_EEPROM)/************************************************************************* *  fixed sdram init -- doesn't use serial presence detect. * *  Assumes:	128 MB, non-ECC, non-registered *		PLB @ 133 MHz * ************************************************************************/long int fixed_sdram (void){	uint reg;	/*--------------------------------------------------------------------	 * Setup some default	 *------------------------------------------------------------------*/	mtsdram (mem_uabba, 0x00000000);	/* ubba=0 (default)		*/	mtsdram (mem_slio, 0x00000000);		/* rdre=0 wrre=0 rarw=0		*/	mtsdram (mem_devopt, 0x00000000);	/* dll=0 ds=0 (normal)		*/	mtsdram (mem_wddctr, 0x00000000);	/* wrcp=0 dcd=0			*/	mtsdram (mem_clktr, 0x40000000);	/* clkp=1 (90 deg wr) dcdt=0	*/	/*--------------------------------------------------------------------	 * Setup for board-specific specific mem	 *------------------------------------------------------------------*/	/*	 * Following for CAS Latency = 2.5 @ 133 MHz PLB	 */	mtsdram (mem_b0cr, 0x000a4001); /* SDBA=0x000 128MB, Mode 3, enabled */	mtsdram (mem_tr0, 0x410a4012);	/* WR=2	 WD=1 CL=2.5 PA=3 CP=4 LD=2 */	/* RA=10 RD=3			    */	mtsdram (mem_tr1, 0x8080082f);	/* SS=T2 SL=STAGE 3 CD=1 CT=0x02f   */	mtsdram (mem_rtr, 0x08200000);	/* Rate 15.625 ns @ 133 MHz PLB	    */	mtsdram (mem_cfg1, 0x00000000); /* Self-refresh exit, disable PM    */	udelay (400);			/* Delay 200 usecs (min)	    */	/*--------------------------------------------------------------------	 * Enable the controller, then wait for DCEN to complete	 *------------------------------------------------------------------*/	mtsdram (mem_cfg0, 0x86000000); /* DCEN=1, PMUD=1, 64-bit	    */	for (;;) {		mfsdram (mem_mcsts, reg);		if (reg & 0x80000000)			break;	}	return (128 * 1024 * 1024);	/* 128 MB			    */}#endif	/* !defined(CONFIG_SPD_EEPROM) *//************************************************************************* *  pci_pre_init * *  This routine is called just prior to registering the hose and gives *  the board the opportunity to check things. Returning a value of zero *  indicates that things are bad & PCI initialization should be aborted. * *	Different boards may wish to customize the pci controller structure *	(add regions, override default access routines, etc) or perform *	certain pre-initialization actions. * ************************************************************************/#if defined(CONFIG_PCI)int pci_pre_init(struct pci_controller * hose ){	unsigned long strap;	/*--------------------------------------------------------------------------+	 *	The metrobox is always configured as the host & requires the	 *	PCI arbiter to be enabled.	 *--------------------------------------------------------------------------*/	mfsdr(sdr_sdstp1, strap);	if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){		printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);		return 0;	}	return 1;}#endif /* defined(CONFIG_PCI) *//************************************************************************* *  pci_target_init * *	The bootstrap configuration provides default settings for the pci *	inbound map (PIM). But the bootstrap config choices are limited and *	may not be sufficient for a given board. * ************************************************************************/#if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)void pci_target_init(struct pci_controller * hose ){	/*--------------------------------------------------------------------------+	 * Disable everything	 *--------------------------------------------------------------------------*/	out32r( PCIX0_PIM0SA, 0 ); /* disable */	out32r( PCIX0_PIM1SA, 0 ); /* disable */	out32r( PCIX0_PIM2SA, 0 ); /* disable */	out32r( PCIX0_EROMBA, 0 ); /* disable expansion rom */	/*--------------------------------------------------------------------------+	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping	 * options to not support sizes such as 128/256 MB.	 *--------------------------------------------------------------------------*/	out32r( PCIX0_PIM0LAL, CFG_SDRAM_BASE );	out32r( PCIX0_PIM0LAH, 0 );	out32r( PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1 );	out32r( PCIX0_BAR0, 0 );	/*--------------------------------------------------------------------------+	 * Program the board's subsystem id/vendor id	 *--------------------------------------------------------------------------*/	out16r( PCIX0_SBSYSVID, CFG_PCI_SUBSYS_VENDORID );	out16r( PCIX0_SBSYSID, CFG_PCI_SUBSYS_DEVICEID );	out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY );}#endif /* defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) *//************************************************************************* *  is_pci_host * * ************************************************************************/#if defined(CONFIG_PCI)int is_pci_host(struct pci_controller *hose){    /* The metrobox is always configured as host. */    return(1);}#endif /* defined(CONFIG_PCI) *//************************************************************************* *  board_get_enetaddr * *  Get the ethernet MAC address for the management ethernet from the *  strap EEPROM.  Note that is the BASE address for the range of *  external ethernet MACs on the board.  The base + 31 is the actual *  mgmt mac address. * ************************************************************************/static int macaddr_idx = 0;void board_get_enetaddr (uchar * enet){	int i;	unsigned short tmp;	unsigned char buff[0x100], *cp;	if (0 == macaddr_idx) {		/* Initialize I2C */		i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);		/* Read 256 bytes in EEPROM */		i2c_read (0x50, 0, 1, buff, 0x100);		cp = &buff[0xF0];		for (i = 0; i < 6; i++,cp++)			enet[i] = *cp;		memcpy(&tmp, &enet[4], 2);		tmp += 31;		memcpy(&enet[4], &tmp, 2);		macaddr_idx++;	} else {		enet[0] = 0x02;		enet[1] = 0x00;		enet[2] = 0x00;		enet[3] = 0x00;		enet[4] = 0x00;		if (1 == sbcommon_get_master() ) {			/* Master/Primary card */			enet[5] = 0x01;		} else {			/* Slave/Secondary card */			enet [5] = 0x02;		}	}	return;}#ifdef CONFIG_POST/* * Returns 1 if keys pressed to start the power-on long-running tests * Called from board_init_f(). */int post_hotkeys_pressed(void){	return (ctrlc());}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线精品免费| 国产精品素人一区二区| 福利视频网站一区二区三区| 精品国精品自拍自在线| 在线亚洲一区观看| 秋霞影院一区二区| 亚洲电影一区二区三区| 久久综合狠狠综合| 色综合视频一区二区三区高清| 亚洲第一福利视频在线| 国产精品少妇自拍| 欧美三级电影精品| 在线看国产一区| 色悠悠久久综合| 91免费视频大全| 91麻豆文化传媒在线观看| 99久久99久久久精品齐齐| 国产二区国产一区在线观看| 青青草国产精品亚洲专区无| 日韩一区欧美小说| 亚洲精品欧美激情| 一区二区三区日韩在线观看| 亚洲理论在线观看| 亚洲一卡二卡三卡四卡| 天天综合色天天综合| 日韩精品一级中文字幕精品视频免费观看 | 国产亚洲福利社区一区| 日韩三级视频中文字幕| 欧美成va人片在线观看| 久久只精品国产| 欧美韩国日本不卡| 亚洲精品成人悠悠色影视| 亚洲制服丝袜av| 蜜桃一区二区三区在线观看| 精品无码三级在线观看视频| 国产成人无遮挡在线视频| 北条麻妃一区二区三区| 色婷婷亚洲综合| 欧美日本一区二区在线观看| 欧美一级日韩免费不卡| 久久久久国产免费免费| 26uuu欧美| 国产欧美精品国产国产专区| 久久综合一区二区| 欧美极品美女视频| 又紧又大又爽精品一区二区| 亚洲综合色在线| 日韩专区欧美专区| 日本免费新一区视频| 亚洲成a人片在线观看中文| 久久99久久精品| av一二三不卡影片| 国产精品三级电影| 蜜臀av性久久久久蜜臀aⅴ | 国产乱人伦精品一区二区在线观看| 蜜桃av噜噜一区| 成人黄色777网| 欧美色综合久久| 国产欧美精品一区二区色综合朱莉| 亚洲人成小说网站色在线| 免费三级欧美电影| 91一区在线观看| 日韩欧美的一区二区| 亚洲女人小视频在线观看| 韩日精品视频一区| 欧美在线短视频| 欧美—级在线免费片| 青青草91视频| 欧美四级电影网| 国产精品大尺度| 国产精品一区免费视频| 欧美精品一二三| 亚洲综合在线观看视频| 国产精品一卡二卡| 日韩欧美区一区二| 亚洲第一激情av| 欧美三级一区二区| 亚洲免费观看高清完整版在线观看 | 亚洲乱码国产乱码精品精的特点| 激情综合网av| 欧美电影免费观看高清完整版| 亚洲伦在线观看| 91偷拍与自偷拍精品| 国产欧美精品一区| 国产成人免费视频精品含羞草妖精| 欧美二区三区的天堂| 亚洲一区二区在线免费看| k8久久久一区二区三区| 欧美国产国产综合| 高清国产一区二区三区| 日韩精品在线网站| 久国产精品韩国三级视频| 欧美美女视频在线观看| 亚洲成a人在线观看| 在线亚洲+欧美+日本专区| 国产精品久久久一本精品| 国产成人在线视频网站| 国产欧美一区二区三区鸳鸯浴| 国产一区二区女| 国产亚洲美州欧州综合国| 激情五月婷婷综合| 久久久久97国产精华液好用吗 | 欧美精品视频www在线观看| 亚洲丝袜制服诱惑| 国产一区激情在线| 久久精品人人做人人综合| 成熟亚洲日本毛茸茸凸凹| 777精品伊人久久久久大香线蕉| 亚洲乱码一区二区三区在线观看| 国产精品1区2区3区| 国产精品乱人伦一区二区| jvid福利写真一区二区三区| 亚洲人成电影网站色mp4| 91免费观看视频| 五月婷婷另类国产| 日韩美女视频一区二区在线观看| 国产一区二区三区在线观看精品 | 精品无码三级在线观看视频| 久久午夜色播影院免费高清 | 欧美成人精品1314www| 极品少妇一区二区| 日韩码欧中文字| 精品视频1区2区| 韩国三级在线一区| 亚洲人成亚洲人成在线观看图片| 在线观看91av| 免费人成黄页网站在线一区二区| 国产色综合一区| 国产成人午夜视频| 亚洲国产精品传媒在线观看| 波多野结衣在线一区| 亚洲成人av中文| 日本一区二区三区电影| 日本大香伊一区二区三区| 亚洲午夜激情网站| 日韩三级电影网址| 91免费在线视频观看| 麻豆91小视频| 亚洲精品国久久99热| 2021中文字幕一区亚洲| 在线视频欧美区| 激情综合网最新| 夜夜操天天操亚洲| 欧美大胆人体bbbb| 日本韩国精品在线| 久久aⅴ国产欧美74aaa| 国产精品国产三级国产aⅴ中文 | 日韩av一级片| 综合激情成人伊人| 久久精品一区八戒影视| 精品视频一区二区三区免费| 成人午夜视频免费看| 老司机精品视频线观看86 | av在线不卡网| 国产一区视频网站| 麻豆精品视频在线| 午夜精品久久久久久久| 亚洲免费看黄网站| 国产精品―色哟哟| 久久精品综合网| 欧美不卡一区二区三区| 91麻豆精品国产无毒不卡在线观看| av亚洲精华国产精华精华| 国产一区二区久久| 国内精品免费**视频| 蜜桃一区二区三区四区| 视频在线在亚洲| 午夜伊人狠狠久久| 午夜不卡在线视频| 亚洲成人av在线电影| 亚洲6080在线| 偷窥国产亚洲免费视频| 一区二区三区免费| 中文一区二区完整视频在线观看 | 欧美性videosxxxxx| 91国产丝袜在线播放| 91国产视频在线观看| 在线观看视频91| 欧美日韩精品一区二区天天拍小说| 91黄色激情网站| 欧美日韩国产电影| 91精品啪在线观看国产60岁| 99久久婷婷国产精品综合| 国产精品一区二区久激情瑜伽| 午夜一区二区三区在线观看| 亚洲一区二区三区视频在线 | 波多野结衣亚洲一区| 欧美日本韩国一区二区三区视频| 日韩欧美在线综合网| 自拍偷拍亚洲欧美日韩| 日韩精品三区四区| 99国产精品久久久| 日韩一区二区麻豆国产| 亚洲天堂av一区| 国模套图日韩精品一区二区| 色综合久久天天| 国产欧美日韩中文久久| 午夜精品福利在线| 91亚洲国产成人精品一区二三| 日韩三级视频在线看|