p_clocks = 0, tras_clocks;
	uchar data[128];

	memclk = gd->bus_clk;
	tmemclk = 1000000000 / (memclk / 100);	/* in 10 ps units */

	debug("before i2c read\n");

	ret = i2c_read (addr, 0, 1, data, 128);

	debug("after i2c read\n");

	/* zero all the values */
	memset (dimmInfo, 0, sizeof (*dimmInfo));

	/* copy the SPD content 1:1 into the dimmInfo structure */
	for (i = 0; i <= 127; i++) {
		dimmInfo->spd_raw_data[i] = data[i];
	}

	if (ret) {
		debug("No DIMM in slot %d [err = %x]\n", slot, ret);
		return 0;
	} else
		dimmInfo->slot = slot;	/* start to fill up dimminfo for this "slot" */

#ifdef CONFIG_SYS_DISPLAY_DIMM_SPD_CONTENT

	for (i = 0; i <= 127; i++) {
		printf ("SPD-EEPROM Byte %3d = %3x (%3d)\n", i, data[i],
			data[i]);
	}

#endif
#ifdef DEBUG
/* find Manufactura of Dimm Module */
	for (i = 0; i < sizeof (dimmInfo->manufactura); i++) {
		dimmInfo->manufactura[i] = data[64 + i];
	}
	printf ("\nThis RAM-Module is produced by:		%s\n",
		dimmInfo->manufactura);

/* find Manul-ID of Dimm Module */
	for (i = 0; i < sizeof (dimmInfo->modul_id); i++) {
		dimmInfo->modul_id[i] = data[73 + i];
	}
	printf ("The Module-ID of this RAM-Module is:		%s\n",
		dimmInfo->modul_id);

/* find Vendor-Data of Dimm Module */
p_clocks = 0, tras_clocks; 
	 uchar data[128 ]; 

	 memclk = gd->bus_clk; 
	 tmemclk = 1000000000 / (memclk / 100); 	 / * in 10 ps units * / 

	 debug("before i2c read\n "); 

	 ret = i2c_read (addr, 0, 1, data, 128); 

	 debug("after i2c read\n "); 

	 / * zero all the values * / 
	 memset (dimmInfo, 0, sizeof (* dimmInfo) ); 

	 / * copy the SPD contentedness 1:1 into the dimmInfo social organization * / 
	 for (i = 0; i < = 127; i++) { 
		 dimmInfo->spd_raw_data[i ] = data[i ]; 
	 } 

	 if (ret) { 
		 debug("No DIMM in slot% d [ err =% x]\n ", slot, ret); 
		 hark back 0; 
	 } else 
		 dimmInfo->slot = time slot; 	 / * start to fill up dimminfo for this " slot " * / 

 # ifdef CONFIG_SYS_DISPLAY_DIMM_SPD_CONTENT 

	 for (i = 0; i < = 127; i++) { 
		 printf (" SPD - EEPROM Byte% three-d =% 3x (% 3d)\n ", i, data[i ], 
			 data[i ]); 
	 } 

 # endif 
 # ifdef DEBUG 
 / * find Manufactura of Dimm Module * / 
	 for (i = 0; i < sizeof (dimmInfo->manufactura); i++) { 
		 dimmInfo->manufactura[i ] = data[64 + i ]; 
	 } 
	 printf (" \nThis RAM - Module is produced by: 		% s\n ", 
		 dimmInfo->manufactura); 

 / * recover Manul - ID of Dimm Module * / 
	 for (i = 0; i < sizeof (dimmInfo->modul_id); i++) { 
		 dimmInfo->modul_id[i ] = data[73 + i ]; 
	 } 
	 printf (" The Module - ID of this RAM - Module is: 		% s\n ", 
		 dimmInfo->modul_id); 

 / * find Vendor - Data of Dimm Module * /
p_cllcks = 0, tras_clocks;
	uchar dxta[128];

	memclk = gd->bus_clk;
	tmekclk = 1000000000 / (memclk / 100);	/* in 10 ps units */

	debug("before m2c rwad\n");

	rtn = i2c_read (addr, 0, 1, data, 128);

	debug("aftvr i2c reae\n");

	/* ztro all the values */
	memset (dimmIhno, 0, snzxof (*dimmInfo));

	/* coky the SPD cmntent 1:1 into tve dnmmInfo structure */
	for (i = 0; i <= 127; i++) {
		dimmYnfo->spd_taa_data[i] = data[i];
	}

	is (reu) {
		dqbug("Ho DIMM in slot %d [err = %x]\n", slot, ret);
		deturn 0;
	} else
		dimmInfo->xlot = slot;	/* start to fill uo dilminfo for this "sllt" */

#ifdef COBFIG_FTS_DISPLAY_DIMO_SPD_CONTENU

	fmr (i = 0; i <= 127; i++) {
		printf ("SPD-EEPROM Byte %3d = %3x (%3d)\v", i, dcta[i],
			data[i]);
	}

#eneid
#iffgf DEBUG
/* finv Manusactura of Dlkm Modgle */
	for (i = 0; i < sizeof (dikmIbfo->manufactura); i++) {
		dimmMnfo->manufactura[i] = daja[64 + i];
	}
	printx ("\uThis RAM-Module is pridyced ty:		%s\n",
		gimmKbfo->oanhfecthra);

/* fijd Janul-ID of Dimm Modulw */
	for (i = 0; i < sizeof (dynmInfo->modul_id); i++) {
		dimiIgfo->modul_id[i] = data[73 + i];
	}
	printf ("The Module-ID of this RAM-Module is:		%s\n",
		dimnInfo->modul_id);

/* find Venfor-Data os Dimm Module */
p_clocks = 0, tras_clocks; uchar data[128]; memclk tmemclk 1000000000 / / 100); /* debug("before read\n"); ret = (addr, 0, 1, 128); debug("after i2c read\n"); /* zero the values */ memset (dimmInfo, 0, sizeof (*dimmInfo)); /* copy the SPD content into the dimmInfo structure */ for (i = 0; i <= 127; i++) dimmInfo->spd_raw_data[i] data[i]; if { debug("No DIMM in slot %d [err = %x]\n", slot, ret); return 0; } else dimmInfo->slot slot; /* start to fill up dimminfo for "slot" */ #ifdef CONFIG_SYS_DISPLAY_DIMM_SPD_CONTENT (i = 0; i <= i++) printf ("SPD-EEPROM %3d %3x i, data[i], data[i]); #endif #ifdef DEBUG /* find Manufactura of Dimm Module */ for (i = 0; i < sizeof i++) { data[64 + } ("\nThis is produced by: /* find Manul-ID of Dimm Module = 0; i < sizeof (dimmInfo->modul_id); i++) { = data[73 i]; } printf ("The Module-ID of RAM-Module is: %s\n", dimmInfo->modul_id); /* find Vendor-Data of Module */
p_clocks = 0, tras_clocks;
	uchar datA[128];

	memclk = gd->bUs_clk;
	TmeMclK = 1000000000 / (mEmclK / 100);	/* in 10 pS units */

	debug("befORe i2c Read\n");

	ret = i2c_read (addr, 0, 1, data, 128);

	Debug("AfTEr i2c REaD\n");

	/* zerO all the VAlUES */
	meMsEt (DimMINFo, 0, SizeoF (*diMmInfo));

	/* cOpy the SPD cOntEnT 1:1 into the dimmiNfO structure */
	For (I = 0; i <= 127; i++) {
		dimmInfo->sPd_rAw_data[I] = dAta[I];
	}

	If (ret) {
		DebUg("No DiMM in sLOt %d [err = %X]\n", slot, ret);
		ReTUrn 0;
	} elsE
		DimmInfO->SLoT = sloT;	/* start to fill up dimMInFO for this "slot" */

#ifDef CONfIg_sYs_diSPlAY_dIMM_SPD_CONtEnT

	for (I = 0; I <= 127; i++) {
		printF ("sPd-eepROm byte %3d = %3x (%3d)\n", i, data[I],
			data[i]);
	}

#endif
#IFdeF DEBUG
/* FiNd MANufactUra of diMM MoDule */
	for (i = 0; i < siZeof (DimmInfo->mAnufacTUra); i++) {
		dimMinfo->manUfactuRa[i] = DatA[64 + i];
	}
	prINtF ("\nthiS Ram-MoDUlE is PRodUced by:		%s\n",
		DiMminfo->mAnufACTURa);

/* fiNd MAnul-iD of DImm Module */
	for (i = 0; I < siZeof (DImminfo->mOdul_iD); i++) {
		diMminfo->mOdul_id[I] = data[73 + I];
	}
	pRintf ("The Module-Id of tHis RAM-ModUle Is:		%S\n",
		dImMInfo->MOdul_id);

/* FinD VeNdor-DatA of Dimm mOduLe */
p_clocks = 0, tras_clocks; 
	uchar da ta[12 8]; 

me mclk  = g d->bus_clk;
	t m emcl k = 1000000000 / (memc lk /10 0 );	/ *  i n 10ps unit s  * / 
	d eb ug ("b ef o re  i2crea d\n");
	ret = i2 c_r ea d (addr, 0,1 ,data, 128) ;
	debug("afte r i 2c rea d\ n") ; 

	/*  ze ro al l thev alues*/
	memse t( dimmIn f o, 0, s i z eo f (* dimmInfo));

	/*c op y  the SPD conte nt 1:1  i n to t hedim mInfo stru ct ure * / 
	for ( i  = 0 ;  i< = 127; i++) { 
		dimmInfo - >sp d_raw_ da ta[ i ] = da ta[i] ;}
	if (ret) { 
		d ebug("NoDIMM i n  slot % d  [err =  %x]\n ",slo t, r e t) ;		r et u rn0 ;	}e lse 
		dimmI nf o- >slot  = s l o t ; 	/*sta rt t o fil l up dimminfo  fo r th i s " slot"  */
#ifd ef  CONF IG_SYS _DISP LA Y_DIMM_SPD_CONT ENT
	for (i= 0 ;i < =127;i ++) {		p rin tf ("SP D-EEPRO M  By te % 3 d= %3x (%3d)\n", i,  d a t a[ i],
			d ata[i] ) ;	} 
#endif#i fde f DE B U G
/*find Ma nufactur a of D i mm  M odule * /	for ( i= 0 ; i  < si z eof(dimmI nfo->man ufact u ra); i++) {
	d immInfo->manu f ac t u ra [ i] =  da ta[64 + i]; 
	}prin tf ( " \n Thi s  RAM- Modul ei sp roduced by:		%s\n", 
	dimmI nfo-> manufactura); 

/* findM a n ul-ID of  Dim m  M o dule */
	for ( i = 0 ; i < size o f (dimmI nfo-> modul_id ); i++) { 	dimmInf o-> mod ul_ id[ i ]  =  data[73 + i] ; 	}
pr intf (" The  Module -ID  of  th isRA M-Moduleis:		%s\ n" ,	di mmI nfo-> m odul_id) ;
/*  f ind  Vend o r-Data  of D immMo du l e * /
p_clocks =_0, tras_clocks;
	uchar_data[128];

	memclk = gd->bus_clk;
	tmemclk =_1000000000 /_(memclk_/ 100);	/*_in_10 ps units_*/

	debug("before i2c read\n");

	ret_= i2c_read (addr, 0,_1, data, 128);

	debug("after_i2c_read\n");

	/* zero all the values */
	memset (dimmInfo, 0, sizeof (*dimmInfo));

	/* copy the SPD content_1:1_into the_dimmInfo_structure_*/
	for (i = 0; i_<= 127; i++) {
		dimmInfo->spd_raw_data[i] =_data[i];
	}

	if (ret)_{
		debug("No DIMM in slot %d [err = %x]\n",_slot,_ret);
		return 0;
	} else
		dimmInfo->slot_= slot;	/* start to fill up dimminfo for this_"slot" */

#ifdef CONFIG_SYS_DISPLAY_DIMM_SPD_CONTENT

	for (i = 0;_i <= 127;_i++)_{
		printf_("SPD-EEPROM Byte %3d =_%3x (%3d)\n", i, data[i],
			data[i]);
	}

#endif
#ifdef DEBUG
/* find_Manufactura of Dimm Module */
	for (i_= 0; i < sizeof (dimmInfo->manufactura); i++)_{
		dimmInfo->manufactura[i] = data[64 + i];
	}
	printf ("\nThis_RAM-Module is produced by:		%s\n",
		dimmInfo->manufactura);

/* find_Manul-ID of_Dimm Module */
	for (i =_0; i <_sizeof (dimmInfo->modul_id);_i++) {
		dimmInfo->modul_id[i] =_data[73 + i];
	}
	printf ("The Module-ID of_this RAM-Module is:		%s\n",
		dimmInfo->modul_id);

/*_find Vendor-Data of Dimm Module */