summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-09 15:15:55 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-10 10:17:17 -0500
commite160e41361105109a12edd6dfe04058ddcefac84 (patch)
tree7b3c1e8c6401bc3e4e48588cc9ae9c534fbc42e8 /c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
parentpowerpc/ep1a: Fix multiple warnings (diff)
downloadrtems-e160e41361105109a12edd6dfe04058ddcefac84.tar.bz2
powerpc/ep1a: Remove if 0 sections
There may be useful nuggets for debug and alternate configurations in this code. There may be methods directly called by the application which are beyond normal APIs. We have no way of knowing this based on the comments in these files. There were no public prototypes so the routines and code in question should have be unused private methods. These will always be in the source code control system as a deletion. If some of the code is needed, justify it and provide a patch to restore it along with a prototype in a public place if needed and a better name.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c')
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c71
1 files changed, 2 insertions, 69 deletions
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c b/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
index 641c74f096..ad9b5700fe 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
@@ -25,9 +25,7 @@
#include <rtems/bspIo.h>
#include <string.h>
-#if 0
-#define DEBUG_360
-#endif
+/* #define DEBUG_360 */
#if 1 /* XXX */
int EP1A_READ_LENGTH_GREATER_THAN_1 = 0;
@@ -35,19 +33,6 @@ int EP1A_READ_LENGTH_GREATER_THAN_1 = 0;
#define MC68360_LENGTH_SIZE 400
int mc68360_length_array[ MC68360_LENGTH_SIZE ];
int mc68360_length_count=0;
-
-#if 0
-/*
- * This is a debug method which is not currently used.
- */
-static void mc68360_Show_length_array(void)
-{
- int i;
- for (i=0; i<MC68360_LENGTH_SIZE; i++)
- printf(" %d", mc68360_length_array[i] );
- printf("\n\n");
-}
-#endif
#endif
@@ -57,29 +42,6 @@ M68360_t M68360_chips = NULL;
#define mc68360_scc_Is_422( _minor ) \
(Console_Port_Tbl[minor]->sDeviceName[7] == '4' )
-#if 0
-/*
- * This method is included for completeness but not currently used.
- */
-static uint8_t scc_read8(
- const char *name,
- volatile uint8_t *address
-)
-{
- uint8_t value;
-
-#ifdef DEBUG_360
- printk( "RD8 %s 0x%08x ", name, address );
-#endif
- value = *address;
-#ifdef DEBUG_360
- printk( "0x%02x\n", value );
-#endif
-
- return value;
-}
-#endif
-
static void scc_write8(
const char *name,
volatile uint8_t *address,
@@ -152,21 +114,6 @@ static void scc_write32(
*address = value;
}
-#if 0
-/*
- * This is a debug method which is not currently used.
- */
-static void mc68360_sccShow_Regs(int minor)
-{
- M68360_serial_ports_t ptr;
- ptr = Console_Port_Tbl[minor]->pDeviceParams;
-
- printk( "scce 0x%08x", &ptr->pSCCR->scce );
- printk( " 0x%04x\n", ptr->pSCCR->scce );
-
-}
-#endif
-
#define TX_BUFFER_ADDRESS( _ptr ) \
((char *)ptr->txBuf - (char *)ptr->chip->board_data->baseaddr)
#define RX_BUFFER_ADDRESS( _ptr ) \
@@ -194,21 +141,7 @@ static void mc68360_sccShow_Regs(int minor)
static int
mc68360_sccBRGC(int baud, int m360_clock_rate)
{
- int data;
-#if 0
- int divisor;
- int div16;
-
- div16 = 0;
- divisor = ((m360_clock_rate / 16) + (baud / 2)) / baud;
- if (divisor > 4096)
- {
- div16 = 1;
- divisor = (divisor + 8) / 16;
- }
- return(M360_BRG_EN | M360_BRG_EXTC_BRGCLK |
- ((divisor - 1) << 1) | div16);
-#endif
+ int data;
/*
* configure baud rate generator for 16x bit rate, where.....