X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-arm%2Farch-s3c2410%2Fregs-serial.h;h=b8dce8a1a622a80d94f10c2d650976123a9b8098;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=56455c34eda1531d54ae5bdf264c19f8fa0631fd;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 56455c34e..b8dce8a1a 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h @@ -106,8 +106,23 @@ /* fifo size information */ -#define S3C2410_UFCON_RXC(fcon) (((fcon) & S3C2410_UFSTAT_RXMASK) >> S3C2410_UFSTAT_RXSHIFT) -#define S3C2410_UFCON_TXC(fcon) (((fcon) & S3C2410_UFSTAT_TXMASK) >> S3C2410_UFSTAT_TXSHIFT) +#ifndef __ASSEMBLY__ +static inline int S3C2410_UFCON_RXC(int fcon) +{ + if (fcon & S3C2410_UFSTAT_RXFULL) + return 16; + + return ((fcon) & S3C2410_UFSTAT_RXMASK) >> S3C2410_UFSTAT_RXSHIFT; +} + +static inline int S3C2410_UFCON_TXC(int fcon) +{ + if (fcon & S3C2410_UFSTAT_TXFULL) + return 16; + + return ((fcon) & S3C2410_UFSTAT_TXMASK) >> S3C2410_UFSTAT_TXSHIFT; +} +#endif /* __ASSEMBLY__ */ #define S3C2410_UMSTAT_CTS (1<<0) #define S3C2410_UMSTAT_DeltaCTS (1<<2)