[U-Boot] Serial Com1 port not working

pc.ramachandra pc.ramachandra at gmail.com
Fri Jun 3 10:36:48 CEST 2016


I am using Custom IBM PowerPC 440GX Board.After Dumping the BIN file It is
not Display any thing in TeraTerm  
Mainly i am refereed Ocotea Board. ocotea.c file i am not initialized FPGA
because in board we are not using.(Com1 port address also i am changed 
#define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_PERIPHERAL_UART0_BASE) 
(#define CONFIG_SYS_PERIPHERAL_UART0_BASE	0xa1080000) 
-->Ocotea.c file Details
int board_early_init_f (void)
{
	unsigned long mfr;
 	unsigned char *UartPtr;
  	int i;
	
	UartPtr = (unsigned char *)(0xA1080000);
    /* Basically i am sending one character to UART*/
    *(UartPtr + 3) = 0x83;
   for(i=0;i<100000;i++);
    *(UartPtr + 0) = 0x1b;
     for(i=0;i<100000;i++);
    *(UartPtr + 1) = 0x00;
     for(i=0;i<100000;i++);
    *(UartPtr + 3) = 0x03;
    for(i=0;i<100000;i++);
    *(UartPtr + 0) = 0x41;

	

/*-------------------------------------------------------------------------+
	  | Initialize EBC CONFIG
	 
+-------------------------------------------------------------------------*/
	mtebc(EBC0_CFG, EBC_CFG_LE_UNLOCK |
	      EBC_CFG_PTD_ENABLE | EBC_CFG_RTC_64PERCLK |
	      EBC_CFG_ATC_PREVIOUS | EBC_CFG_DTC_PREVIOUS |
	      EBC_CFG_CTC_PREVIOUS | EBC_CFG_EMC_NONDEFAULT |
	      EBC_CFG_PME_DISABLE | EBC_CFG_PR_32);

	

/*-------------------------------------------------------------------------+
	  | 1 MB FLASH / 1 MB SRAM. Initialize bank 0 with default values.
	 
+-------------------------------------------------------------------------*/
	mtebc(PB0AP, EBC_BXAP_BME_DISABLED|EBC_BXAP_TWT_ENCODE(cs0_twt)|
	      EBC_BXAP_BCE_DISABLE|
	      EBC_BXAP_CSN_ENCODE(1)|EBC_BXAP_OEN_ENCODE(1)|
	      EBC_BXAP_WBN_ENCODE(1)|EBC_BXAP_WBF_ENCODE(1)|
	      EBC_BXAP_TH_ENCODE(1)|EBC_BXAP_RE_DISABLED|
	      EBC_BXAP_BEM_WRITEONLY|
	      EBC_BXAP_PEN_DISABLED);
	mtebc(PB0CR, EBC_BXCR_BAS_ENCODE(cs0_base)|
	      cs0_size|EBC_BXCR_BU_RW|EBC_BXCR_BW_8BIT);

	
/*-------------------------------------------------------------------------+
	  | 4 MB FLASH. Initialize bank 2 with default values.
	 
+-------------------------------------------------------------------------*/
	mtebc(PB2AP, EBC_BXAP_BME_DISABLED|EBC_BXAP_TWT_ENCODE(cs2_twt)|
	      EBC_BXAP_BCE_DISABLE|
	      EBC_BXAP_CSN_ENCODE(1)|EBC_BXAP_OEN_ENCODE(1)|
	      EBC_BXAP_WBN_ENCODE(1)|EBC_BXAP_WBF_ENCODE(1)|
	      EBC_BXAP_TH_ENCODE(1)|EBC_BXAP_RE_DISABLED|
	      EBC_BXAP_BEM_WRITEONLY|
	      EBC_BXAP_PEN_DISABLED);
	mtebc(PB2CR, EBC_BXCR_BAS_ENCODE(cs2_base)|
	      cs2_size|EBC_BXCR_BU_RW|EBC_BXCR_BW_8BIT);

	mtdcr(UIC0SR, 0xffffffff);	/* clear all */
	mtdcr(UIC0ER, 0x00000000);	/* disable all */
	mtdcr(UIC0CR, 0x00000009);	/* SMI & UIC1 crit are critical */
	mtdcr(UIC0PR, 0xfffffe13);	/* per ref-board manual */
	mtdcr(UIC0TR, 0x01c00008);	/* per ref-board manual */
	mtdcr(UIC0VR, 0x00000001);	/* int31 highest, base=0x000 */
	mtdcr(UIC0SR, 0xffffffff);	/* clear all */

	mtdcr(UIC1SR, 0xffffffff);	/* clear all */
	mtdcr(UIC1ER, 0x00000000);	/* disable all */
	mtdcr(UIC1CR, 0x00000000);	/* all non-critical */
	mtdcr(UIC1PR, 0xffffe0ff);	/* per ref-board manual */
	mtdcr(UIC1TR, 0x00ffc000);	/* per ref-board manual */
	mtdcr(UIC1VR, 0x00000001);	/* int31 highest, base=0x000 */
	mtdcr(UIC1SR, 0xffffffff);	/* clear all */

	mfsdr (SDR0_MFR, mfr);
	mfr &= ~SDR0_MFR_ECS_MASK;
    
    UartPtr = (unsigned char *)(0xA1080000);
      /* Basically i am sending one character to UART*/
    *(UartPtr + 3) = 0x83;
   for(i=0;i<100000;i++);
    *(UartPtr + 0) = 0x1b;
     for(i=0;i<100000;i++);
    *(UartPtr + 1) = 0x00;
     for(i=0;i<100000;i++);
    *(UartPtr + 3) = 0x03;
    for(i=0;i<100000;i++);
    *(UartPtr + 0) = 0x42;

return 0;
}

   



--
View this message in context: http://u-boot.10912.n7.nabble.com/Serial-Com1-port-not-working-tp257248.html
Sent from the U-Boot mailing list archive at Nabble.com.


More information about the U-Boot mailing list