diff options
-rw-r--r-- | include/asm-arm/arch-s3c2410/debug-macro.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index c37d3474179b..9c8cd9abb82b 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -58,6 +58,12 @@ | |||
58 | /* fifo level reading */ | 58 | /* fifo level reading */ |
59 | 59 | ||
60 | .macro fifo_level_s3c24xx rd, rx | 60 | .macro fifo_level_s3c24xx rd, rx |
61 | @ check for arm920 vs arm926. currently assume all arm926 | ||
62 | @ devices have an 64 byte FIFO identical to the s3c2440 | ||
63 | mrc p15, 0, \rd, c0, c0 | ||
64 | and \rd, \rd, #0xff0 | ||
65 | teq \rd, #0x260 | ||
66 | beq 10000f | ||
61 | mrc p15, 0, \rd, c1, c0 | 67 | mrc p15, 0, \rd, c1, c0 |
62 | tst \rd, #1 | 68 | tst \rd, #1 |
63 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) | 69 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
@@ -67,6 +73,7 @@ | |||
67 | and \rd, \rd, #0x00ff0000 | 73 | and \rd, \rd, #0x00ff0000 |
68 | teq \rd, #0x00440000 @ is it 2440? | 74 | teq \rd, #0x00440000 @ is it 2440? |
69 | 75 | ||
76 | 10000: | ||
70 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | 77 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
71 | andne \rd, \rd, #S3C2410_UFSTAT_TXMASK | 78 | andne \rd, \rd, #S3C2410_UFSTAT_TXMASK |
72 | andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK | 79 | andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK |