Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11197
b: refs/heads/master
c: e607d6c
h: refs/heads/master
i:
  11195: c780571
v: v3
  • Loading branch information
Pete Popov authored and Ralf Baechle committed Oct 29, 2005
1 parent 34f9d84 commit 540f228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 77 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fabffc13ed720eea986f80f432cedb4550f464ed
refs/heads/master: e607d6c8b8dd684936fda4b2cc37ad9f9104bed4
77 changes: 1 addition & 76 deletions trunk/arch/mips/au1000/common/puts.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#define TIMEOUT 0xffffff
#define SLOW_DOWN

static const char digits[16] = "0123456789abcdef";
static volatile unsigned long * const com1 = (unsigned long *)SERIAL_BASE;


Expand All @@ -54,7 +53,7 @@ static inline void slow_down(void)
#endif

void
putch(const unsigned char c)
prom_putchar(const unsigned char c)
{
unsigned char ch;
int i = 0;
Expand All @@ -69,77 +68,3 @@ putch(const unsigned char c)
} while (0 == (ch & TX_BUSY));
com1[SER_DATA] = c;
}

void
puts(unsigned char *cp)
{
unsigned char ch;
int i = 0;

while (*cp) {
do {
ch = com1[SER_CMD];
slow_down();
i++;
if (i>TIMEOUT) {
break;
}
} while (0 == (ch & TX_BUSY));
com1[SER_DATA] = *cp++;
}
putch('\r');
putch('\n');
}

void
fputs(const char *cp)
{
unsigned char ch;
int i = 0;

while (*cp) {

do {
ch = com1[SER_CMD];
slow_down();
i++;
if (i>TIMEOUT) {
break;
}
} while (0 == (ch & TX_BUSY));
com1[SER_DATA] = *cp++;
}
}


void
put64(uint64_t ul)
{
int cnt;
unsigned ch;

cnt = 16; /* 16 nibbles in a 64 bit long */
putch('0');
putch('x');
do {
cnt--;
ch = (unsigned char)(ul >> cnt * 4) & 0x0F;
putch(digits[ch]);
} while (cnt > 0);
}

void
put32(unsigned u)
{
int cnt;
unsigned ch;

cnt = 8; /* 8 nibbles in a 32 bit long */
putch('0');
putch('x');
do {
cnt--;
ch = (unsigned char)(u >> cnt * 4) & 0x0F;
putch(digits[ch]);
} while (cnt > 0);
}

0 comments on commit 540f228

Please sign in to comment.