This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FCR register doesn't exist in AEB-1


Hi, I'm having a little question regarding this code (on the bottom)
in packages/devs/serial/arm/aeb/current/src/aeb_serial.c

I was reading the LH77790 v1.0 Embedded mC user guide and I can't see any 
register named FCR (or FIFO control register). As aeb_serial.h defines it it 
should be in 0xFFFF0008 and I can only see a IIR0 (Interrupt Identification) 
that is only 8 bits long and R, not R/W. So, unless the SH77790B latest 
revision has changed or the manual is wrong, the code shouldn't exist.
I tried using gdb with jtag and it doesn't allow me to write a new value. 
0x01 is always present.

Maybe a minor typo and I know the aeb board is a old one, but its the one I'm 
trying to repair the boot and I was trying to play with its serial port so 
see if it has any serious damage or if its just the boot that got corrupted.

With best regards
Carlos Sobrinho

--------------------------------------------------------------------------
static bool
aeb_serial_config_port(serial_channel *chan, cyg_serial_info_t *new_config, 
bool init)
{
    aeb_serial_info *aeb_chan = (aeb_serial_info *)chan->dev_priv;
    volatile struct serial_port *port = (volatile struct serial_port 
*)aeb_chan->base;
    unsigned short baud_divisor = select_baud[new_config->baud];
    unsigned char _lcr, _ier;
    if (baud_divisor == 0) return false;
    _ier = port->REG_IER;
    port->REG_IER = 0;  // Disable port interrupts while changing hardware
    _lcr = select_word_length[new_config->word_length - 
CYGNUM_SERIAL_WORD_LENGTH_5] | 
        select_stop_bits[new_config->stop] |
        select_parity[new_config->parity];
    port->REG_LCR = _lcr;
    port->REG_LCR |= LCR_DL;
    port->REG_MDL = baud_divisor >> 8;
    port->REG_LDL = baud_divisor & 0xFF;
    port->REG_LCR &= ~LCR_DL;
    if (init) {
        port->REG_FCR = 0x07;  // Enable and clear FIFO
        ^^^^^^^^^^^^^^^^^^^^^
        if (chan->out_cbuf.len != 0) {
            port->REG_IER = IER_RCV;
        } else {
            port->REG_IER = 0;
        }
        port->REG_MCR = MCR_INT|MCR_DTR|MCR_RTS;  // Master interrupt enable
    } else {
        port->REG_IER = _ier;
    }
    if (new_config != &chan->config) {
        chan->config = *new_config;
    }
    return true;
}

-- 
#############################################################################
# O muito torna-se pouco com desejar um pouco mais. -- Francisco de Quevedo #
#############################################################################

Attachment: pgp00000.pgp
Description: signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]