Commit ca36f40d authored by Russell King's avatar Russell King

[ARM] Resurect EBSA110 machine class.

This fixes build errors in EBSA110, and updates the default
configuration.
parent efe00e6a
...@@ -581,7 +581,7 @@ config LEDS_CPU ...@@ -581,7 +581,7 @@ config LEDS_CPU
config ALIGNMENT_TRAP config ALIGNMENT_TRAP
bool bool
depends on CPU_32 depends on CPU_32
default y default y if !ARCH_EBSA110
help help
ARM processors can not fetch/store information which is not ARM processors can not fetch/store information which is not
naturally aligned on the bus, i.e., a 4 byte fetch must start at an naturally aligned on the bus, i.e., a 4 byte fetch must start at an
......
This diff is collapsed.
...@@ -67,9 +67,9 @@ u8 __readb(void *addr) ...@@ -67,9 +67,9 @@ u8 __readb(void *addr)
u32 ret, a = __isamem_convert_addr(addr); u32 ret, a = __isamem_convert_addr(addr);
if ((int)addr & 1) if ((int)addr & 1)
ret = __raw_getl(a); ret = __raw_readl(a);
else else
ret = __raw_getb(a); ret = __raw_readb(a);
return ret; return ret;
} }
...@@ -80,7 +80,7 @@ u16 __readw(void *addr) ...@@ -80,7 +80,7 @@ u16 __readw(void *addr)
if ((int)addr & 1) if ((int)addr & 1)
BUG(); BUG();
return __raw_getw(a); return __raw_readw(a);
} }
u32 __readl(void *addr) u32 __readl(void *addr)
...@@ -90,8 +90,8 @@ u32 __readl(void *addr) ...@@ -90,8 +90,8 @@ u32 __readl(void *addr)
if ((int)addr & 3) if ((int)addr & 3)
BUG(); BUG();
ret = __raw_getw(a); ret = __raw_readw(a);
ret |= __raw_getw(a + 4) << 16; ret |= __raw_readw(a + 4) << 16;
return ret; return ret;
} }
...@@ -104,9 +104,9 @@ void __writeb(u8 val, void *addr) ...@@ -104,9 +104,9 @@ void __writeb(u8 val, void *addr)
u32 a = __isamem_convert_addr(addr); u32 a = __isamem_convert_addr(addr);
if ((int)addr & 1) if ((int)addr & 1)
__raw_putl(val, a); __raw_writel(val, a);
else else
__raw_putb(val, a); __raw_writeb(val, a);
} }
void __writew(u16 val, void *addr) void __writew(u16 val, void *addr)
...@@ -116,7 +116,7 @@ void __writew(u16 val, void *addr) ...@@ -116,7 +116,7 @@ void __writew(u16 val, void *addr)
if ((int)addr & 1) if ((int)addr & 1)
BUG(); BUG();
__raw_putw(val, a); __raw_writew(val, a);
} }
void __writel(u32 val, void *addr) void __writel(u32 val, void *addr)
...@@ -126,8 +126,8 @@ void __writel(u32 val, void *addr) ...@@ -126,8 +126,8 @@ void __writel(u32 val, void *addr)
if ((int)addr & 3) if ((int)addr & 3)
BUG(); BUG();
__raw_putw(val, a); __raw_writew(val, a);
__raw_putw(val >> 16, a + 4); __raw_writew(val >> 16, a + 4);
} }
EXPORT_SYMBOL(__writeb); EXPORT_SYMBOL(__writeb);
...@@ -147,7 +147,7 @@ u8 __inb(int port) ...@@ -147,7 +147,7 @@ u8 __inb(int port)
* The SuperIO registers use sane addressing techniques... * The SuperIO registers use sane addressing techniques...
*/ */
if (SUPERIO_PORT(port)) if (SUPERIO_PORT(port))
ret = __raw_getb(ISAIO_BASE + (port << 2)); ret = __raw_readb(ISAIO_BASE + (port << 2));
else { else {
u32 a = ISAIO_BASE + ((port & ~1) << 1); u32 a = ISAIO_BASE + ((port & ~1) << 1);
...@@ -155,9 +155,9 @@ u8 __inb(int port) ...@@ -155,9 +155,9 @@ u8 __inb(int port)
* Shame nothing else does * Shame nothing else does
*/ */
if (port & 1) if (port & 1)
ret = __raw_getl(a); ret = __raw_readl(a);
else else
ret = __raw_getb(a); ret = __raw_readb(a);
} }
return ret; return ret;
} }
...@@ -170,7 +170,7 @@ u16 __inw(int port) ...@@ -170,7 +170,7 @@ u16 __inw(int port)
* The SuperIO registers use sane addressing techniques... * The SuperIO registers use sane addressing techniques...
*/ */
if (SUPERIO_PORT(port)) if (SUPERIO_PORT(port))
ret = __raw_getw(ISAIO_BASE + (port << 2)); ret = __raw_readw(ISAIO_BASE + (port << 2));
else { else {
u32 a = ISAIO_BASE + ((port & ~1) << 1); u32 a = ISAIO_BASE + ((port & ~1) << 1);
...@@ -180,7 +180,7 @@ u16 __inw(int port) ...@@ -180,7 +180,7 @@ u16 __inw(int port)
if (port & 1) if (port & 1)
BUG(); BUG();
ret = __raw_getw(a); ret = __raw_readw(a);
} }
return ret; return ret;
} }
...@@ -201,7 +201,7 @@ void __outb(u8 val, int port) ...@@ -201,7 +201,7 @@ void __outb(u8 val, int port)
* The SuperIO registers use sane addressing techniques... * The SuperIO registers use sane addressing techniques...
*/ */
if (SUPERIO_PORT(port)) if (SUPERIO_PORT(port))
__raw_putb(val, ISAIO_BASE + (port << 2)); __raw_writeb(val, ISAIO_BASE + (port << 2));
else { else {
u32 a = ISAIO_BASE + ((port & ~1) << 1); u32 a = ISAIO_BASE + ((port & ~1) << 1);
...@@ -209,9 +209,9 @@ void __outb(u8 val, int port) ...@@ -209,9 +209,9 @@ void __outb(u8 val, int port)
* Shame nothing else does * Shame nothing else does
*/ */
if (port & 1) if (port & 1)
__raw_putl(val, a); __raw_writel(val, a);
else else
__raw_putb(val, a); __raw_writeb(val, a);
} }
} }
...@@ -230,7 +230,7 @@ void __outw(u16 val, int port) ...@@ -230,7 +230,7 @@ void __outw(u16 val, int port)
BUG(); BUG();
} }
__raw_putw(val, ISAIO_BASE + off); __raw_writew(val, ISAIO_BASE + off);
} }
void __outl(u32 val, int port) void __outl(u32 val, int port)
......
...@@ -53,25 +53,31 @@ static const char version[] = ...@@ -53,25 +53,31 @@ static const char version[] =
#ifdef __arm__ #ifdef __arm__
static void write_rreg(u_long base, u_int reg, u_int val) static void write_rreg(u_long base, u_int reg, u_int val)
{ {
__asm__("str%?h %1, [%2] @ NET_RAP __asm__(
str%?h %0, [%2, #-4] @ NET_RDP "str%?h %1, [%2] @ NET_RAP\n\t"
" : : "r" (val), "r" (reg), "r" (ISAIO_BASE + 0x0464)); "str%?h %0, [%2, #-4] @ NET_RDP"
:
: "r" (val), "r" (reg), "r" (ISAIO_BASE + 0x0464));
} }
static inline unsigned short read_rreg(u_long base_addr, u_int reg) static inline unsigned short read_rreg(u_long base_addr, u_int reg)
{ {
unsigned short v; unsigned short v;
__asm__("str%?h %1, [%2] @ NET_RAP __asm__(
ldr%?h %0, [%2, #-4] @ NET_RDP "str%?h %1, [%2] @ NET_RAP\n\t"
" : "=r" (v): "r" (reg), "r" (ISAIO_BASE + 0x0464)); "ldr%?h %0, [%2, #-4] @ NET_RDP"
: "=r" (v)
: "r" (reg), "r" (ISAIO_BASE + 0x0464));
return v; return v;
} }
static inline void write_ireg(u_long base, u_int reg, u_int val) static inline void write_ireg(u_long base, u_int reg, u_int val)
{ {
__asm__("str%?h %1, [%2] @ NET_RAP __asm__(
str%?h %0, [%2, #8] @ NET_IDP "str%?h %1, [%2] @ NET_RAP\n\t"
" : : "r" (val), "r" (reg), "r" (ISAIO_BASE + 0x0464)); "str%?h %0, [%2, #8] @ NET_IDP"
:
: "r" (val), "r" (reg), "r" (ISAIO_BASE + 0x0464));
} }
static inline unsigned short read_ireg(u_long base_addr, u_int reg) static inline unsigned short read_ireg(u_long base_addr, u_int reg)
...@@ -101,15 +107,15 @@ am_writebuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigne ...@@ -101,15 +107,15 @@ am_writebuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigne
} }
while (length > 8) { while (length > 8) {
unsigned int tmp, tmp2; unsigned int tmp, tmp2;
__asm__ __volatile__(" __asm__ __volatile__(
ldm%?ia %1!, {%2, %3} "ldm%?ia %1!, {%2, %3}\n\t"
str%?h %2, [%0], #4 "str%?h %2, [%0], #4\n\t"
mov%? %2, %2, lsr #16 "mov%? %2, %2, lsr #16\n\t"
str%?h %2, [%0], #4 "str%?h %2, [%0], #4\n\t"
str%?h %3, [%0], #4 "str%?h %3, [%0], #4\n\t"
mov%? %3, %3, lsr #16 "mov%? %3, %3, lsr #16\n\t"
str%?h %3, [%0], #4 "str%?h %3, [%0], #4"
" : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2) : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2)
: "0" (offset), "1" (buf)); : "0" (offset), "1" (buf));
length -= 8; length -= 8;
} }
...@@ -128,36 +134,36 @@ am_readbuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigned ...@@ -128,36 +134,36 @@ am_readbuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigned
length = (length + 1) & ~1; length = (length + 1) & ~1;
if ((int)buf & 2) { if ((int)buf & 2) {
unsigned int tmp; unsigned int tmp;
__asm__ __volatile__(" __asm__ __volatile__(
ldr%?h %2, [%0], #4 "ldr%?h %2, [%0], #4\n\t"
str%?b %2, [%1], #1 "str%?b %2, [%1], #1\n\t"
mov%? %2, %2, lsr #8 "mov%? %2, %2, lsr #8\n\t"
str%?b %2, [%1], #1 "str%?b %2, [%1], #1"
" : "=&r" (offset), "=&r" (buf), "=r" (tmp): "0" (offset), "1" (buf)); : "=&r" (offset), "=&r" (buf), "=r" (tmp): "0" (offset), "1" (buf));
length -= 2; length -= 2;
} }
while (length > 8) { while (length > 8) {
unsigned int tmp, tmp2, tmp3; unsigned int tmp, tmp2, tmp3;
__asm__ __volatile__(" __asm__ __volatile__(
ldr%?h %2, [%0], #4 "ldr%?h %2, [%0], #4\n\t"
ldr%?h %3, [%0], #4 "ldr%?h %3, [%0], #4\n\t"
orr%? %2, %2, %3, lsl #16 "orr%? %2, %2, %3, lsl #16\n\t"
ldr%?h %3, [%0], #4 "ldr%?h %3, [%0], #4\n\t"
ldr%?h %4, [%0], #4 "ldr%?h %4, [%0], #4\n\t"
orr%? %3, %3, %4, lsl #16 "orr%? %3, %3, %4, lsl #16\n\t"
stm%?ia %1!, {%2, %3} "stm%?ia %1!, {%2, %3}"
" : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2), "=r" (tmp3) : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2), "=r" (tmp3)
: "0" (offset), "1" (buf)); : "0" (offset), "1" (buf));
length -= 8; length -= 8;
} }
while (length > 0) { while (length > 0) {
unsigned int tmp; unsigned int tmp;
__asm__ __volatile__(" __asm__ __volatile__(
ldr%?h %2, [%0], #4 "ldr%?h %2, [%0], #4\n\t"
str%?b %2, [%1], #1 "str%?b %2, [%1], #1\n\t"
mov%? %2, %2, lsr #8 "mov%? %2, %2, lsr #8\n\t"
str%?b %2, [%1], #1 "str%?b %2, [%1], #1"
" : "=&r" (offset), "=&r" (buf), "=r" (tmp) : "0" (offset), "1" (buf)); : "=&r" (offset), "=&r" (buf), "=r" (tmp) : "0" (offset), "1" (buf));
length -= 2; length -= 2;
} }
} }
...@@ -618,6 +624,7 @@ am79c961_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -618,6 +624,7 @@ am79c961_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (status & CSR0_CERR) { if (status & CSR0_CERR) {
handled = 1; handled = 1;
mod_timer(&priv->timer, jiffies); mod_timer(&priv->timer, jiffies);
}
} while (--n && status & (CSR0_RINT | CSR0_TINT)); } while (--n && status & (CSR0_RINT | CSR0_TINT));
return IRQ_RETVAL(handled); return IRQ_RETVAL(handled);
......
...@@ -50,7 +50,7 @@ void __writel(u32 val, void *addr); ...@@ -50,7 +50,7 @@ void __writel(u32 val, void *addr);
#define writew(v,b) __writew(v,b) #define writew(v,b) __writew(v,b)
#define writel(v,b) __writel(v,b) #define writel(v,b) __writel(v,b)
#define __arch_ioremap(cookie,sz,c) ((void *)(cookie)) #define __arch_ioremap(cookie,sz,c,a) ((void *)(cookie))
#define __arch_iounmap(cookie) do { } while (0) #define __arch_iounmap(cookie) do { } while (0)
#endif #endif
...@@ -25,13 +25,13 @@ static inline void arch_idle(void) ...@@ -25,13 +25,13 @@ static inline void arch_idle(void)
const char *irq_stat = (char *)0xff000000; const char *irq_stat = (char *)0xff000000;
/* disable clock switching */ /* disable clock switching */
asm volatile ("mcr%? p15, 0, ip, c15, c2, 2"); asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
/* wait for an interrupt to occur */ /* wait for an interrupt to occur */
while (!*irq_stat); while (!*irq_stat);
/* enable clock switching */ /* enable clock switching */
asm volatile ("mcr%? p15, 0, ip, c15, c1, 2"); asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
} }
#define arch_reset(mode) cpu_reset(0x80000000) #define arch_reset(mode) cpu_reset(0x80000000)
......
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
* This is therefore not used to calculate the * This is therefore not used to calculate the
* divisor. * divisor.
*/ */
//#define CLOCK_TICK_RATE 2000000 #define CLOCK_TICK_RATE 47894000
...@@ -13,26 +13,26 @@ ...@@ -13,26 +13,26 @@
*/ */
static void puts(const char *s) static void puts(const char *s)
{ {
__asm__ __volatile__(" __asm__ __volatile__(
ldrb %0, [%2], #1 "ldrb %0, [%2], #1\n"
teq %0, #0 " teq %0, #0\n"
beq 3f " beq 3f\n"
1: strb %0, [%3] "1: strb %0, [%3]\n"
2: ldrb %1, [%3, #0x14] "2: ldrb %1, [%3, #0x14]\n"
and %1, %1, #0x60 " and %1, %1, #0x60\n"
teq %1, #0x60 " teq %1, #0x60\n"
bne 2b " bne 2b\n"
teq %0, #'\n' " teq %0, #'\n'\n"
moveq %0, #'\r' " moveq %0, #'\r'\n"
beq 1b " beq 1b\n"
ldrb %0, [%2], #1 " ldrb %0, [%2], #1\n"
teq %0, #0 " teq %0, #0\n"
bne 1b " bne 1b\n"
3: ldrb %1, [%3, #0x14] "3: ldrb %1, [%3, #0x14]\n"
and %1, %1, #0x60 " and %1, %1, #0x60\n"
teq %1, #0x60 " teq %1, #0x60\n"
bne 3b " bne 3b"
" : : "r" (0), "r" (0), "r" (s), "r" (0xf0000be0) : "cc"); : : "r" (0), "r" (0), "r" (s), "r" (0xf0000be0) : "cc");
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment