summaryrefslogtreecommitdiffstats
path: root/cpu/bf533/serial.c
diff options
context:
space:
mode:
authorAubrey Li <aubrey.adi@gmail.com>2007-03-12 00:25:14 +0800
committerAubrey Li <aubrey.adi@gmail.com>2007-03-12 00:25:14 +0800
commit8440bb14581a294375c34b91b42512f9753d1130 (patch)
tree2af94c8cdb0bedf0501affd4db35d6c6faee317c /cpu/bf533/serial.c
parent8db13d63157811c839d15a313d9f2d2f5fd10af3 (diff)
downloadtalos-obmc-uboot-8440bb14581a294375c34b91b42512f9753d1130.tar.gz
talos-obmc-uboot-8440bb14581a294375c34b91b42512f9753d1130.zip
[Blackfin][PATCH] code cleanup
Diffstat (limited to 'cpu/bf533/serial.c')
-rw-r--r--cpu/bf533/serial.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/cpu/bf533/serial.c b/cpu/bf533/serial.c
index eb552056a4..11a46be964 100644
--- a/cpu/bf533/serial.c
+++ b/cpu/bf533/serial.c
@@ -49,8 +49,11 @@
#include <asm/bitops.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
+#include <asm/io.h>
#include "bf533_serial.h"
+DECLARE_GLOBAL_DATA_PTR;
+
unsigned long pll_div_fact;
void calc_baud(void)
@@ -84,29 +87,29 @@ void serial_setbrg(void)
/* Enable UART */
*pUART_GCTL |= UART_GCTL_UCEN;
- __builtin_bfin_ssync();
+ sync();
/* Set DLAB in LCR to Access DLL and DLH */
ACCESS_LATCH;
- __builtin_bfin_ssync();
+ sync();
*pUART_DLL = hw_baud_table[i].dl_low;
- __builtin_bfin_ssync();
+ sync();
*pUART_DLH = hw_baud_table[i].dl_high;
- __builtin_bfin_ssync();
+ sync();
/* Clear DLAB in LCR to Access THR RBR IER */
ACCESS_PORT_IER;
- __builtin_bfin_ssync();
+ sync();
/* Enable ERBFI and ELSI interrupts
* to poll SIC_ISR register*/
*pUART_IER = UART_IER_ELSI | UART_IER_ERBFI | UART_IER_ETBEI;
- __builtin_bfin_ssync();
+ sync();
/* Set LCR to Word Lengh 8-bit word select */
*pUART_LCR = UART_LCR_WLS8;
- __builtin_bfin_ssync();
+ sync();
return;
}
OpenPOWER on IntegriCloud