diff options
author | Stefan Roese <sr@denx.de> | 2008-01-13 15:04:37 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2008-01-13 15:04:37 +0100 |
commit | 8d79953d03e6c5b24215609997dafe4daa623cd6 (patch) | |
tree | cb9a4246cde2d32fa600461da008c7d59b57cf4b /cpu/mpc8xx/serial.c | |
parent | 47cc23cbe9a669c510183f4f049bf703ef445f3b (diff) | |
parent | 2b2f43ed6a30ece77f76191c845ac95267daa31a (diff) | |
download | u-boot-imx-8d79953d03e6c5b24215609997dafe4daa623cd6.zip u-boot-imx-8d79953d03e6c5b24215609997dafe4daa623cd6.tar.gz u-boot-imx-8d79953d03e6c5b24215609997dafe4daa623cd6.tar.bz2 |
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
Diffstat (limited to 'cpu/mpc8xx/serial.c')
-rw-r--r-- | cpu/mpc8xx/serial.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpu/mpc8xx/serial.c b/cpu/mpc8xx/serial.c index 68804cc..ad02299 100644 --- a/cpu/mpc8xx/serial.c +++ b/cpu/mpc8xx/serial.c @@ -124,6 +124,12 @@ static int smc_init (void) sp = (smc_t *) &(cp->cp_smc[SMC_INDEX]); up = (smc_uart_t *) &cp->cp_dparam[PROFF_SMC]; +#ifdef CFG_SMC_UCODE_PATCH + up = (smc_uart_t *) &cp->cp_dpmem[up->smc_rpbase]; +#else + /* Disable relocation */ + up->smc_rpbase = 0; +#endif /* Disable transmitter/receiver. */ @@ -212,6 +218,12 @@ static int smc_init (void) up->smc_tbase = dpaddr+sizeof(cbd_t); up->smc_rfcr = SMC_EB; up->smc_tfcr = SMC_EB; +#if defined (CFG_SMC_UCODE_PATCH) + up->smc_rbptr = up->smc_rbase; + up->smc_tbptr = up->smc_tbase; + up->smc_rstate = 0; + up->smc_tstate = 0; +#endif #if defined(CONFIG_MBX) board_serial_init(); @@ -288,6 +300,9 @@ smc_putc(const char c) smc_putc ('\r'); up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC]; +#ifdef CFG_SMC_UCODE_PATCH + up = (smc_uart_t *) &cpmp->cp_dpmem[up->smc_rpbase]; +#endif tbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; @@ -326,6 +341,9 @@ smc_getc(void) unsigned char c; up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC]; +#ifdef CFG_SMC_UCODE_PATCH + up = (smc_uart_t *) &cpmp->cp_dpmem[up->smc_rpbase]; +#endif rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; @@ -351,6 +369,9 @@ smc_tstc(void) volatile cpm8xx_t *cpmp = &(im->im_cpm); up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC]; +#ifdef CFG_SMC_UCODE_PATCH + up = (smc_uart_t *) &cpmp->cp_dpmem[up->smc_rpbase]; +#endif rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; |