Commit 557672cd authored by Deepak Saxena's avatar Deepak Saxena

Merge plexity.net:/home/dsaxena/src/linux-2.6-ixp2000

into plexity.net:/home/dsaxena/src/linux-2.6-for-rmk
parents 2f68dbbf f787fee2
......@@ -162,48 +162,6 @@ void __init ixp2000_map_io(void)
iotable_init(ixp2000_small_io_desc, ARRAY_SIZE(ixp2000_small_io_desc));
iotable_init(ixp2000_large_io_desc, ARRAY_SIZE(ixp2000_large_io_desc));
early_serial_setup(&ixp2000_serial_port);
#if defined(CONFIG_ARCH_IXDP2400) || defined (CONFIG_ARCH_IXDP2401)
/*
* Fixup up page table entries to deal with IXP2400 errata
* We first fix the small (page size) mappings and
* then the large (section size) ones.
*/
if (machine_is_ixdp2400() | machine_is_ixdp2401()) {
pmd_t *pmdp;
pte_t *ptep;
u32 virt, virt_end;
int i;
for (i = 0; i < ARRAY_SIZE(ixp2000_small_io_desc); i++) {
virt = ixp2000_small_io_desc[i].virtual;
virt_end = virt + ixp2000_small_io_desc[i].length;
do {
pmdp = pmd_offset(pgd_offset_k(virt), virt);
ptep = pte_offset_kernel(pmdp, virt);
set_pte(ptep, (pte_val(*ptep) | PTE_EXT_TEX(1) | L_PTE_BUFFERABLE));
virt += PAGE_SIZE;
} while (virt < virt_end);
}
for (i = 0; i < ARRAY_SIZE(ixp2000_large_io_desc); i++) {
virt = ixp2000_large_io_desc[i].virtual;
virt_end = virt + ixp2000_large_io_desc[i].length;
do {
pmdp = pmd_offset(pgd_offset_k(virt), virt);
set_pmd(pmdp, pmd_val(*pmdp) | (PMD_SECT_TEX(1) | PMD_SECT_BUFFERABLE));
virt += 0x100000;
} while (virt < virt_end);
}
}
#endif
}
/*************************************************************************
......
......@@ -65,6 +65,8 @@
#undef insw
#undef outsw
#include <asm/mach-types.h>
static inline void insw(u32 ptr, void *buf, int length)
{
register volatile u32 *port = (volatile u32 *)ptr;
......@@ -72,7 +74,7 @@ static inline void insw(u32 ptr, void *buf, int length)
/*
* Is this cycle meant for the CS8900?
*/
if (machine_is_ixdp2x01() &&
if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
((port >= IXDP2X01_CS8900_VIRT_BASE) &&
(port <= IXDP2X01_CS8900_VIRT_END))) {
u8 *buf8 = (u8*)buf;
......@@ -97,7 +99,7 @@ static inline void outsw(u32 ptr, void *buf, int length)
/*
* Is this cycle meant for the CS8900?
*/
if (machine_is_ixdp2x01() &&
if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
((port >= IXDP2X01_CS8900_VIRT_BASE) &&
(port <= IXDP2X01_CS8900_VIRT_END))) {
register u32 tmp32;
......@@ -121,7 +123,7 @@ static inline u16 inw(u32 ptr)
/*
* Is this cycle meant for the CS8900?
*/
if (machine_is_ixdp2x01() &&
if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
((port >= IXDP2X01_CS8900_VIRT_BASE) &&
(port <= IXDP2X01_CS8900_VIRT_END))) {
return (u16)(*port);
......@@ -134,7 +136,7 @@ static inline void outw(u16 value, u32 ptr)
{
register volatile u32 *port = (volatile u32 *)ptr;
if (machine_is_ixdp2x01() &&
if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
((port >= IXDP2X01_CS8900_VIRT_BASE) &&
(port <= IXDP2X01_CS8900_VIRT_END))) {
*port = value;
......
......@@ -50,10 +50,4 @@
#define IXDP2X01_UART_CLK 1843200
#ifndef __ASSEMBLY__
#include <asm/mach-types.h>
#define machine_is_ixdp2x01() (machine_is_ixdp2401() || \
machine_is_ixdp2801())
#endif
#endif /* __IXDP2x01_H__ */
......@@ -16,7 +16,7 @@
#ifndef __ASSEMBLY__
/*
* The IXP2400B0 silicon contains an errata that causes writes to
* The IXP2400 B0 silicon contains an errata that causes writes to
* on-chip I/O register to not complete fully. What this means is
* that if you have a write to on-chip I/O followed by a back-to-back
* read or write, the first write will happend twice. OR...if it's
......@@ -38,7 +38,7 @@ static inline void ixp2000_reg_write(volatile unsigned long *reg, unsigned long
local_irq_save(flags);
*reg = val;
__asm__ __volatile__("":::"memory");
barrier();
dummy = *reg;
local_irq_restore(flags);
}
......
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