odroid: remove CONFIG_DM_I2C_COMPAT config
[platform/kernel/u-boot.git] / arch / powerpc / cpu / mpc8xx / serial.c
index 9321411..b6e12d0 100644 (file)
@@ -173,32 +173,10 @@ static int smc_init (void)
 # endif
 #endif
 
-#if defined(CONFIG_FADS)
-       /* Enable RS232 */
-#if defined(CONFIG_8xx_CONS_SMC1)
-       *((uint *) BCSR1) &= ~BCSR1_RS232EN_1;
-#else
-       *((uint *) BCSR1) &= ~BCSR1_RS232EN_2;
-#endif
-#endif /* CONFIG_FADS */
-
-#if defined(CONFIG_RPXLITE)
-       /* Enable Monitor Port Transceiver */
-       *((uchar *) BCSR0) |= BCSR0_ENMONXCVR ;
-#endif /* CONFIG_RPXLITE */
-
        /* Set the physical address of the host memory buffers in
         * the buffer descriptors.
         */
-
-#ifdef CONFIG_SYS_ALLOC_DPRAM
-       /* allocate
-        * size of struct serialbuffer with bd rx/tx, buffer rx/tx and rx index
-        */
-       dpaddr = dpram_alloc_align((sizeof(serialbuffer_t)), 8);
-#else
-       dpaddr = CPM_SERIAL_BASE ;
-#endif
+       dpaddr = CPM_SERIAL_BASE;
 
        rtx = (serialbuffer_t *)&cp->cp_dpmem[dpaddr];
        /* Allocate space for two buffer descriptors in the DP ram.
@@ -282,11 +260,6 @@ smc_putc(const char c)
        volatile cpm8xx_t       *cpmp = &(im->im_cpm);
        volatile serialbuffer_t *rtx;
 
-#ifdef CONFIG_MODEM_SUPPORT
-       if (gd->be_quiet)
-               return;
-#endif
-
        if (c == '\n')
                smc_putc ('\r');
 
@@ -419,22 +392,6 @@ static int scc_init (void)
        sp = (scc_t *) &(cp->cp_scc[SCC_INDEX]);
        up = (scc_uart_t *) &cp->cp_dparam[PROFF_SCC];
 
-#if defined(CONFIG_LWMON) && defined(CONFIG_8xx_CONS_SCC2)
-    {  /* Disable Ethernet, enable Serial */
-       uchar c;
-
-       c = pic_read  (0x61);
-       c &= ~0x40;     /* enable COM3 */
-       c |=  0x80;     /* disable Ethernet */
-       pic_write (0x61, c);
-
-       /* enable RTS2 */
-       cp->cp_pbpar |=  0x2000;
-       cp->cp_pbdat |=  0x2000;
-       cp->cp_pbdir |=  0x2000;
-    }
-#endif /* CONFIG_LWMON */
-
        /* Disable transmitter/receiver. */
        sp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
 
@@ -446,27 +403,17 @@ static int scc_init (void)
        cp->cp_pbdir &= ~0x06;
        cp->cp_pbodr &= ~0x06;
 
-#elif (SCC_INDEX < 2) || !defined(CONFIG_IP860)
+#elif (SCC_INDEX < 2)
        /*
         * Standard configuration for SCC's is on Part A
         */
        ip->iop_papar |=  ((3 << (2 * SCC_INDEX)));
        ip->iop_padir &= ~((3 << (2 * SCC_INDEX)));
        ip->iop_paodr &= ~((3 << (2 * SCC_INDEX)));
-#else
-       /*
-        * The IP860 has SCC3 and SCC4 on Port D
-        */
-       ip->iop_pdpar |=  ((3 << (2 * SCC_INDEX)));
 #endif
 
        /* Allocate space for two buffer descriptors in the DP ram. */
-
-#ifdef CONFIG_SYS_ALLOC_DPRAM
-       dpaddr = dpram_alloc_align (sizeof(cbd_t)*2 + 2, 8) ;
-#else
-       dpaddr = CPM_SERIAL2_BASE ;
-#endif
+       dpaddr = dpram_alloc_align(sizeof(cbd_t)*2 + 2, 8);
 
        /* Enable SDMA. */
        im->im_siu_conf.sc_sdcr = 0x0001;
@@ -562,11 +509,6 @@ scc_putc(const char c)
        volatile immap_t        *im = (immap_t *)CONFIG_SYS_IMMR;
        volatile cpm8xx_t       *cpmp = &(im->im_cpm);
 
-#ifdef CONFIG_MODEM_SUPPORT
-       if (gd->be_quiet)
-               return;
-#endif
-
        if (c == '\n')
                scc_putc ('\r');
 
@@ -672,18 +614,6 @@ void mpc8xx_serial_initialize(void)
 #endif
 }
 
-#ifdef CONFIG_MODEM_SUPPORT
-void disable_putc(void)
-{
-       gd->be_quiet = 1;
-}
-
-void enable_putc(void)
-{
-       gd->be_quiet = 0;
-}
-#endif
-
 #if defined(CONFIG_CMD_KGDB)
 
 void