Commit 8083d69e authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into laptop.osdl.org:/home/torvalds/v2.5/linux
parents bdc37c4c fcfd7ef7
...@@ -213,198 +213,7 @@ config FORCE_MAX_ZONEORDER ...@@ -213,198 +213,7 @@ config FORCE_MAX_ZONEORDER
depends on SA1111 depends on SA1111
default "9" default "9"
comment "Processor Type" source arch/arm/mm/Kconfig
# Figure out whether this system uses 26-bit or 32-bit CPUs.
config CPU_32
bool
default y
# Select CPU types depending on the architecture selected. This selects
# which CPUs we support in the kernel image, and the compiler instruction
# optimiser behaviour.
# ARM610
config CPU_ARM610
bool "Support ARM610 processor"
depends on ARCH_RPC
help
The ARM610 is the successor to the ARM3 processor
and was produced by VLSI Technology Inc.
Say Y if you want support for the ARM610 processor.
Otherwise, say N.
# ARM710
config CPU_ARM710
bool "Support ARM710 processor" if !ARCH_CLPS7500 && ARCH_RPC
default y if ARCH_CLPS7500
help
A 32-bit RISC microprocessor based on the ARM7 processor core
designed by Advanced RISC Machines Ltd. The ARM710 is the
successor to the ARM610 processor. It was released in
July 1994 by VLSI Technology Inc.
Say Y if you want support for the ARM710 processor.
Otherwise, say N.
# ARM720T
config CPU_ARM720T
bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR
default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712
help
A 32-bit RISC processor with 8kByte Cache, Write Buffer and
MMU built around an ARM7TDMI core.
Say Y if you want support for the ARM720T processor.
Otherwise, say N.
# ARM920T
config CPU_ARM920T
bool "Support ARM920T processor"
depends on ARCH_INTEGRATOR
help
The ARM920T is licensed to be produced by numerous vendors,
and is used in the Maverick EP9312. More information at
<http://linuxdevices.com/products/PD2382866068.html>.
Say Y if you want support for the ARM920T processor.
Otherwise, say N.
# ARM922T
config CPU_ARM922T
bool
depends on ARCH_CAMELOT
default y
help
The ARM922T is a version of the ARM920T, but with smaller
instruction and data caches. It is used in Altera's
Excalibur XA device family.
Say Y if you want support for the ARM922T processor.
Otherwise, say N.
# ARM926T
config CPU_ARM926T
bool "Support ARM926T processor"
depends on ARCH_INTEGRATOR
help
This is a variant of the ARM920. It has slightly different
instruction sequences for cache and TLB operations. Curiously,
there is no documentation on it at the ARM corporate website.
Say Y if you want support for the ARM926T processor.
Otherwise, say N.
# ARM1020
config CPU_ARM1020
bool "Support ARM1020 processor"
depends on ARCH_INTEGRATOR
help
The ARM1020 is the cached version of the ARM10 processor,
with an addition of a floating-point unit.
Say Y if you want support for the ARM1020 processor.
Otherwise, say N.
# SA110
config CPU_SA110
bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && !ARCH_ANAKIN && ARCH_RPC
default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_ANAKIN
help
The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
is available at five speeds ranging from 100 MHz to 233 MHz.
More information is available at
<http://developer.intel.com/design/strong/sa110.htm>.
Say Y if you want support for the SA-110 processor.
Otherwise, say N.
# SA1100
config CPU_SA1100
bool
depends on ARCH_SA1100
default y
# XScale
config CPU_XSCALE
bool
depends on ARCH_IOP3XX || ARCH_ADIFCC || ARCH_PXA
default y
# Figure out what processor architecture version we should be using.
# This defines the compiler instruction set which depends on the machine type.
config CPU_32v3
bool
depends on ARCH_RPC || ARCH_CLPS7500
default y
config CPU_32v4
bool
depends on ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_CLPS711X || ARCH_INTEGRATOR || ARCH_SA1100 || ARCH_L7200 || ARCH_ANAKIN || ARCH_CAMELOT
default y
config CPU_32v5
bool
depends on ARCH_IOP3XX || ARCH_ADIFCC || ARCH_PXA
default y
comment "Processor Features"
config ARM_THUMB
bool "Support Thumb instructions (EXPERIMENTAL)"
depends on (CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020 || CPU_XSCALE) && EXPERIMENTAL
help
Say Y if you want to have kernel support for ARM Thumb instructions,
fault handlers, and system calls.
The Thumb instruction set is a compressed form of the standard ARM
instruction set resulting in smaller binaries at the expense of
slightly less efficient code.
If you don't know what this all is, saying Y is a safe choice.
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
depends on ARCH_SUPPORTS_BIG_ENDIAN
help
Say Y if you plan on running a kernel in big-endian mode.
Note that your board must be properly built and your board
port must properly enable and big-endian related features
of your chipset/board/processor.
config CPU_ICACHE_DISABLE
bool "Disable I-Cache"
depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
help
Say Y here to disable the processor instruction cache. Unless
you have a reason not to or are unsure, say N.
config CPU_DCACHE_DISABLE
bool "Disable D-Cache"
depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
help
Say Y here to disable the processor data cache. Unless
you have a reason not to or are unsure, say N.
config CPU_DCACHE_WRITETHROUGH
bool "Force write through D-cache"
depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE
help
Say Y here to use the data cache in writethough mode. Unless you
specifically require this or are unsure, say N.
config CPU_CACHE_ROUND_ROBIN
bool "Round robin I and D cache replacement algorithm"
depends on (CPU_ARM926T || CPU_ARM1020) && (!CPU_ICACHE_DISABLE || !CPU_DCACHE_DISABLE)
help
Say Y here to use the predictable round-robin cache replacement
policy. Unless you specifically require this or are unsure, say N.
config CPU_BPREDICT_DISABLE
bool "Disable branch prediction"
depends on CPU_ARM1020
help
Say Y here to disable branch prediction. If unsure, say N.
# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER # bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER
config XSCALE_PMU config XSCALE_PMU
...@@ -842,11 +651,6 @@ source "drivers/input/Kconfig" ...@@ -842,11 +651,6 @@ source "drivers/input/Kconfig"
source "drivers/char/Kconfig" source "drivers/char/Kconfig"
config KBDMOUSE
bool
depends on ARCH_ACORN && BUSMOUSE=y && !ARCH_RPC
default y
source "drivers/media/Kconfig" source "drivers/media/Kconfig"
source "fs/Kconfig" source "fs/Kconfig"
......
...@@ -34,7 +34,7 @@ __SA1100_start: ...@@ -34,7 +34,7 @@ __SA1100_start:
@ REVISIT_PFS168: Temporary until firmware updated to use assigned machine number @ REVISIT_PFS168: Temporary until firmware updated to use assigned machine number
mov r7, #MACH_TYPE_PFS168 mov r7, #MACH_TYPE_PFS168
#endif #endif
#ifdef CONFIG_SA1100_SIMPAD / #ifdef CONFIG_SA1100_SIMPAD
@ UNTIL we've something like an open bootldr @ UNTIL we've something like an open bootldr
mov r7, #MACH_TYPE_SIMPAD @should be 87 mov r7, #MACH_TYPE_SIMPAD @should be 87
#endif #endif
......
...@@ -51,7 +51,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */ ...@@ -51,7 +51,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
static inline const char *slot_name(const struct pci_pool *pool) static inline const char *slot_name(const struct pci_pool *pool)
{ {
const struct pci_dev *pdev = pool->dev; struct pci_dev *pdev = (struct pci_dev *)pool->dev;
if (pdev == 0) if (pdev == 0)
return "[0]"; return "[0]";
......
...@@ -54,87 +54,74 @@ struct sa1111 { ...@@ -54,87 +54,74 @@ struct sa1111 {
*/ */
static struct sa1111 *g_sa1111; static struct sa1111 *g_sa1111;
static struct sa1111_dev usb_dev = { struct sa1111_dev_info {
.skpcr_mask = SKPCR_UCLKEN, unsigned long offset;
.devid = SA1111_DEVID_USB, unsigned long skpcr_mask;
.irq = { unsigned int devid;
IRQ_USBPWR, unsigned int irq[6];
IRQ_HCIM,
IRQ_HCIBUFFACC,
IRQ_HCIRMTWKP,
IRQ_NHCIMFCIR,
IRQ_USB_PORT_RESUME
},
}; };
static struct sa1111_dev sac_dev = { static struct sa1111_dev_info sa1111_devices[] = {
.skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN, {
.devid = SA1111_DEVID_SAC, .offset = SA1111_USB,
.irq = { .skpcr_mask = SKPCR_UCLKEN,
AUDXMTDMADONEA, .devid = SA1111_DEVID_USB,
AUDXMTDMADONEB, .irq = {
AUDRCVDMADONEA, IRQ_USBPWR,
AUDRCVDMADONEB IRQ_HCIM,
IRQ_HCIBUFFACC,
IRQ_HCIRMTWKP,
IRQ_NHCIMFCIR,
IRQ_USB_PORT_RESUME
},
}, },
}; {
.offset = 0x0600,
static struct sa1111_dev ssp_dev = { .skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN,
.skpcr_mask = SKPCR_SCLKEN, .devid = SA1111_DEVID_SAC,
.devid = SA1111_DEVID_SSP, .irq = {
}; AUDXMTDMADONEA,
AUDXMTDMADONEB,
static struct sa1111_dev kbd_dev = { AUDRCVDMADONEA,
.skpcr_mask = SKPCR_PTCLKEN, AUDRCVDMADONEB
.devid = SA1111_DEVID_PS2, },
.irq = {
IRQ_TPRXINT,
IRQ_TPTXINT
}, },
}; {
.offset = 0x0800,
static struct sa1111_dev mse_dev = { .skpcr_mask = SKPCR_SCLKEN,
.skpcr_mask = SKPCR_PMCLKEN, .devid = SA1111_DEVID_SSP,
.devid = SA1111_DEVID_PS2,
.irq = {
IRQ_MSRXINT,
IRQ_MSTXINT
}, },
}; {
.offset = SA1111_KBD,
static struct sa1111_dev int_dev = { .skpcr_mask = SKPCR_PTCLKEN,
.skpcr_mask = 0, .devid = SA1111_DEVID_PS2,
.devid = SA1111_DEVID_INT, .irq = {
}; IRQ_TPRXINT,
IRQ_TPTXINT
static struct sa1111_dev pcmcia_dev = { },
.skpcr_mask = 0, },
.devid = SA1111_DEVID_PCMCIA, {
.irq = { .offset = SA1111_MSE,
IRQ_S0_READY_NINT, .skpcr_mask = SKPCR_PMCLKEN,
IRQ_S0_CD_VALID, .devid = SA1111_DEVID_PS2,
IRQ_S0_BVD1_STSCHG, .irq = {
IRQ_S1_READY_NINT, IRQ_MSRXINT,
IRQ_S1_CD_VALID, IRQ_MSTXINT
IRQ_S1_BVD1_STSCHG, },
},
{
.offset = 0x1800,
.skpcr_mask = 0,
.devid = SA1111_DEVID_PCMCIA,
.irq = {
IRQ_S0_READY_NINT,
IRQ_S0_CD_VALID,
IRQ_S0_BVD1_STSCHG,
IRQ_S1_READY_NINT,
IRQ_S1_CD_VALID,
IRQ_S1_BVD1_STSCHG,
},
}, },
};
static struct sa1111_dev *devs[] = {
&usb_dev,
&sac_dev,
&ssp_dev,
&kbd_dev,
&mse_dev,
&pcmcia_dev,
};
static unsigned int dev_offset[] = {
SA1111_USB,
0x0600,
0x0800,
SA1111_KBD,
SA1111_MSE,
0x1800,
}; };
/* /*
...@@ -372,44 +359,45 @@ static struct irqchip sa1111_high_chip = { ...@@ -372,44 +359,45 @@ static struct irqchip sa1111_high_chip = {
.wake = sa1111_wake_highirq, .wake = sa1111_wake_highirq,
}; };
static void __init sa1111_init_irq(struct sa1111_dev *sadev) static void sa1111_setup_irq(struct sa1111 *sachip)
{ {
void *irqbase = sachip->base + SA1111_INTC;
unsigned int irq; unsigned int irq;
/* /*
* We're guaranteed that this region hasn't been taken. * We're guaranteed that this region hasn't been taken.
*/ */
request_mem_region(sadev->res.start, 512, "irqs"); request_mem_region(sachip->phys + SA1111_INTC, 512, "irq");
/* disable all IRQs */ /* disable all IRQs */
sa1111_writel(0, sadev->mapbase + SA1111_INTEN0); sa1111_writel(0, irqbase + SA1111_INTEN0);
sa1111_writel(0, sadev->mapbase + SA1111_INTEN1); sa1111_writel(0, irqbase + SA1111_INTEN1);
sa1111_writel(0, sadev->mapbase + SA1111_WAKEEN0); sa1111_writel(0, irqbase + SA1111_WAKEEN0);
sa1111_writel(0, sadev->mapbase + SA1111_WAKEEN1); sa1111_writel(0, irqbase + SA1111_WAKEEN1);
/* /*
* detect on rising edge. Note: Feb 2001 Errata for SA1111 * detect on rising edge. Note: Feb 2001 Errata for SA1111
* specifies that S0ReadyInt and S1ReadyInt should be '1'. * specifies that S0ReadyInt and S1ReadyInt should be '1'.
*/ */
sa1111_writel(0, sadev->mapbase + SA1111_INTPOL0); sa1111_writel(0, irqbase + SA1111_INTPOL0);
sa1111_writel(SA1111_IRQMASK_HI(IRQ_S0_READY_NINT) | sa1111_writel(SA1111_IRQMASK_HI(IRQ_S0_READY_NINT) |
SA1111_IRQMASK_HI(IRQ_S1_READY_NINT), SA1111_IRQMASK_HI(IRQ_S1_READY_NINT),
sadev->mapbase + SA1111_INTPOL1); irqbase + SA1111_INTPOL1);
/* clear all IRQs */ /* clear all IRQs */
sa1111_writel(~0, sadev->mapbase + SA1111_INTSTATCLR0); sa1111_writel(~0, irqbase + SA1111_INTSTATCLR0);
sa1111_writel(~0, sadev->mapbase + SA1111_INTSTATCLR1); sa1111_writel(~0, irqbase + SA1111_INTSTATCLR1);
for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) { for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) {
set_irq_chip(irq, &sa1111_low_chip); set_irq_chip(irq, &sa1111_low_chip);
set_irq_chipdata(irq, sadev->mapbase); set_irq_chipdata(irq, irqbase);
set_irq_handler(irq, do_edge_IRQ); set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
} }
for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) { for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) {
set_irq_chip(irq, &sa1111_high_chip); set_irq_chip(irq, &sa1111_high_chip);
set_irq_chipdata(irq, sadev->mapbase); set_irq_chipdata(irq, irqbase);
set_irq_handler(irq, do_edge_IRQ); set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
} }
...@@ -417,9 +405,9 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev) ...@@ -417,9 +405,9 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev)
/* /*
* Register SA1111 interrupt * Register SA1111 interrupt
*/ */
set_irq_type(sadev->irq[0], IRQT_RISING); set_irq_type(sachip->irq, IRQT_RISING);
set_irq_data(sadev->irq[0], sadev->mapbase); set_irq_data(sachip->irq, irqbase);
set_irq_chained_handler(sadev->irq[0], sa1111_irq_handler); set_irq_chained_handler(sachip->irq, sa1111_irq_handler);
} }
/* /*
...@@ -529,37 +517,64 @@ sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac, ...@@ -529,37 +517,64 @@ sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac,
#endif #endif
static void static void sa1111_dev_release(struct device *_dev)
{
struct sa1111_dev *dev = SA1111_DEV(_dev);
release_resource(&dev->res);
kfree(dev);
}
static int
sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
struct sa1111_dev *sadev, unsigned int offset) struct sa1111_dev_info *info)
{ {
snprintf(sadev->dev.bus_id, sizeof(sadev->dev.bus_id), struct sa1111_dev *dev;
"%4.4x", offset); int ret;
dev = kmalloc(sizeof(struct sa1111_dev), GFP_KERNEL);
if (!dev) {
ret = -ENOMEM;
goto out;
}
memset(dev, 0, sizeof(struct sa1111_dev));
snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id),
"%4.4lx", info->offset);
/* /*
* If the parent device has a DMA mask associated with it, * If the parent device has a DMA mask associated with it,
* propagate it down to the children. * propagate it down to the children.
*/ */
if (sachip->dev->dma_mask) { if (sachip->dev->dma_mask) {
sadev->dma_mask = *sachip->dev->dma_mask; dev->dma_mask = *sachip->dev->dma_mask;
sadev->dev.dma_mask = &sadev->dma_mask; dev->dev.dma_mask = &dev->dma_mask;
} }
sadev->dev.parent = sachip->dev; dev->devid = info->devid;
sadev->dev.bus = &sa1111_bus_type; dev->dev.parent = sachip->dev;
sadev->res.start = sachip->phys + offset; dev->dev.bus = &sa1111_bus_type;
sadev->res.end = sadev->res.start + 511; dev->dev.release = sa1111_dev_release;
sadev->res.name = sadev->dev.bus_id; dev->res.start = sachip->phys + info->offset;
sadev->res.flags = IORESOURCE_MEM; dev->res.end = dev->res.start + 511;
sadev->mapbase = sachip->base + offset; dev->res.name = dev->dev.bus_id;
dev->res.flags = IORESOURCE_MEM;
if (request_resource(parent, &sadev->res)) { dev->mapbase = sachip->base + info->offset;
ret = request_resource(parent, &dev->res);
if (ret) {
printk("SA1111: failed to allocate resource for %s\n", printk("SA1111: failed to allocate resource for %s\n",
sadev->res.name); dev->res.name);
return; goto out;
} }
device_register(&sadev->dev); ret = device_register(&dev->dev);
if (ret) {
release_resource(&dev->res);
out:
kfree(dev);
}
return ret;
} }
/** /**
...@@ -655,11 +670,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) ...@@ -655,11 +670,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
* The interrupt controller must be initialised before any * The interrupt controller must be initialised before any
* other device to ensure that the interrupts are available. * other device to ensure that the interrupts are available.
*/ */
if (irq != NO_IRQ) { if (sachip->irq != NO_IRQ)
int_dev.irq[0] = irq; sa1111_setup_irq(sachip);
sa1111_init_one_child(sachip, mem, &int_dev, SA1111_INTC);
sa1111_init_irq(&int_dev);
}
g_sa1111 = sachip; g_sa1111 = sachip;
...@@ -670,9 +682,9 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) ...@@ -670,9 +682,9 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
else else
has_devs &= ~(1 << 1); has_devs &= ~(1 << 1);
for (i = 0; i < ARRAY_SIZE(devs); i++) for (i = 0; i < ARRAY_SIZE(sa1111_devices); i++)
if (has_devs & (1 << i)) if (has_devs & (1 << i))
sa1111_init_one_child(sachip, mem, devs[i], dev_offset[i]); sa1111_init_one_child(sachip, mem, &sa1111_devices[i]);
return 0; return 0;
...@@ -685,11 +697,26 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) ...@@ -685,11 +697,26 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
static void __sa1111_remove(struct sa1111 *sachip) static void __sa1111_remove(struct sa1111 *sachip)
{ {
int i; struct list_head *l, *n;
void *irqbase = sachip->base + SA1111_INTC;
list_for_each_safe(l, n, &sachip->dev->children) {
struct device *d = list_to_dev(l);
device_unregister(d);
}
/* disable all IRQs */
sa1111_writel(0, irqbase + SA1111_INTEN0);
sa1111_writel(0, irqbase + SA1111_INTEN1);
sa1111_writel(0, irqbase + SA1111_WAKEEN0);
sa1111_writel(0, irqbase + SA1111_WAKEEN1);
if (sachip->irq != NO_IRQ) {
set_irq_chained_handler(sachip->irq, NULL);
set_irq_data(sachip->irq, NULL);
for (i = 0; i < ARRAY_SIZE(devs); i++) { release_mem_region(sachip->phys + SA1111_INTC, 512);
put_device(&devs[i]->dev);
release_resource(&devs[i]->res);
} }
iounmap(sachip->base); iounmap(sachip->base);
......
...@@ -15,9 +15,6 @@ ...@@ -15,9 +15,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
/* /*
* Make sure that the compiler and target are compatible. * Make sure that the compiler and target are compatible.
*/ */
...@@ -58,19 +55,6 @@ int main(void) ...@@ -58,19 +55,6 @@ int main(void)
BLANK(); BLANK();
DEFINE(VM_EXEC, VM_EXEC); DEFINE(VM_EXEC, VM_EXEC);
BLANK(); BLANK();
DEFINE(HPTE_TYPE_SMALL, PTE_TYPE_SMALL);
DEFINE(HPTE_AP_READ, PTE_AP_READ);
DEFINE(HPTE_AP_WRITE, PTE_AP_WRITE);
BLANK();
DEFINE(LPTE_PRESENT, L_PTE_PRESENT);
DEFINE(LPTE_YOUNG, L_PTE_YOUNG);
DEFINE(LPTE_BUFFERABLE, L_PTE_BUFFERABLE);
DEFINE(LPTE_CACHEABLE, L_PTE_CACHEABLE);
DEFINE(LPTE_USER, L_PTE_USER);
DEFINE(LPTE_WRITE, L_PTE_WRITE);
DEFINE(LPTE_EXEC, L_PTE_EXEC);
DEFINE(LPTE_DIRTY, L_PTE_DIRTY);
BLANK();
DEFINE(PAGE_SZ, PAGE_SIZE); DEFINE(PAGE_SZ, PAGE_SIZE);
BLANK(); BLANK();
DEFINE(SYS_ERROR0, 0x9f0000); DEFINE(SYS_ERROR0, 0x9f0000);
......
...@@ -35,18 +35,17 @@ void pcibios_report_status(u_int status_mask, int warn) ...@@ -35,18 +35,17 @@ void pcibios_report_status(u_int status_mask, int warn)
continue; continue;
pci_read_config_word(dev, PCI_STATUS, &status); pci_read_config_word(dev, PCI_STATUS, &status);
if (status == 0xffff)
continue;
status &= status_mask; if ((status & status_mask) == 0)
if (status == 0)
continue; continue;
/* clear the status errors */ /* clear the status errors */
pci_write_config_word(dev, PCI_STATUS, status); pci_write_config_word(dev, PCI_STATUS, status & status_mask);
if (warn) if (warn)
printk("(%02x:%02x.%d: %04X) ", dev->bus->number, printk("(%s: %04X) ", pci_name(dev), status);
PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn),
status);
} }
} }
......
...@@ -798,7 +798,7 @@ static int c_show(struct seq_file *m, void *v) ...@@ -798,7 +798,7 @@ static int c_show(struct seq_file *m, void *v)
seq_printf(m, "Cache type\t: %s\n" seq_printf(m, "Cache type\t: %s\n"
"Cache clean\t: %s\n" "Cache clean\t: %s\n"
"Cache lockdown\t: %s\n" "Cache lockdown\t: %s\n"
"Cache unified\t: %s\n", "Cache format\t: %s\n",
cache_types[CACHE_TYPE(cache_info)], cache_types[CACHE_TYPE(cache_info)],
cache_clean[CACHE_TYPE(cache_info)], cache_clean[CACHE_TYPE(cache_info)],
cache_lockdown[CACHE_TYPE(cache_info)], cache_lockdown[CACHE_TYPE(cache_info)],
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Object file lists. # Object file lists.
obj-y := core.o time.o obj-y := core.o lm.o time.o
obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_LEDS) += leds.o
obj-$(CONFIG_PCI) += pci_v3.o pci.o obj-$(CONFIG_PCI) += pci_v3.o pci.o
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <asm/hardware/amba.h> #include <asm/hardware/amba.h>
#include <asm/hardware/amba_kmi.h> #include <asm/hardware/amba_kmi.h>
#include <asm/arch/lm.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
* just for now). * just for now).
*/ */
#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE) #define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
#define VA_SC_BASE IO_ADDRESS(INTEGRATOR_SC_BASE)
#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET #define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET
/* /*
...@@ -66,7 +69,7 @@ ...@@ -66,7 +69,7 @@
* f1a00000 1a000000 Debug LEDs * f1a00000 1a000000 Debug LEDs
* f1b00000 1b000000 GPIO * f1b00000 1b000000 GPIO
*/ */
static struct map_desc integrator_io_desc[] __initdata = { static struct map_desc integrator_io_desc[] __initdata = {
{ IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE },
{ IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE },
...@@ -89,7 +92,7 @@ static void __init integrator_map_io(void) ...@@ -89,7 +92,7 @@ static void __init integrator_map_io(void)
iotable_init(integrator_io_desc, ARRAY_SIZE(integrator_io_desc)); iotable_init(integrator_io_desc, ARRAY_SIZE(integrator_io_desc));
} }
#define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) ) #define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) )
static void sc_mask_irq(unsigned int irq) static void sc_mask_irq(unsigned int irq)
{ {
...@@ -161,6 +164,7 @@ static struct amba_device *amba_devs[] __initdata = { ...@@ -161,6 +164,7 @@ static struct amba_device *amba_devs[] __initdata = {
static int __init register_devices(void) static int __init register_devices(void)
{ {
unsigned long sc_dec;
int i; int i;
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
...@@ -169,6 +173,28 @@ static int __init register_devices(void) ...@@ -169,6 +173,28 @@ static int __init register_devices(void)
amba_device_register(d, &iomem_resource); amba_device_register(d, &iomem_resource);
} }
sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET);
for (i = 0; i < 4; i++) {
struct lm_device *lmdev;
if ((sc_dec & (16 << i)) == 0)
continue;
lmdev = kmalloc(sizeof(struct lm_device), GFP_KERNEL);
if (!lmdev)
continue;
memset(lmdev, 0, sizeof(struct lm_device));
lmdev->resource.start = 0xc0000000 + 0x10000000 * i;
lmdev->resource.end = lmdev->resource.start + 0x0fffffff;
lmdev->resource.flags = IORESOURCE_MEM;
lmdev->irq = IRQ_EXPINT0 + i;
lmdev->id = i;
lm_device_register(lmdev);
}
return 0; return 0;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* This file provides the core support for the IM-PD1 module. * This file provides the core support for the IM-PD1 module.
* *
* Module / boot parameters. * Module / boot parameters.
* id=n impd1.id=n - set the logic module position in stack to 'n' * lmid=n impd1.lmid=n - set the logic module position in stack to 'n'
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
...@@ -21,17 +21,15 @@ ...@@ -21,17 +21,15 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/icst525.h> #include <asm/hardware/icst525.h>
#include <asm/hardware/amba.h> #include <asm/hardware/amba.h>
#include <asm/arch/lm.h>
#include <asm/arch/impd1.h> #include <asm/arch/impd1.h>
#include <asm/sizes.h> #include <asm/sizes.h>
static int module_id; static int module_id;
module_param_named(lmid, module_id, int, 0); module_param_named(lmid, module_id, int, 0444);
MODULE_PARM_DESC(lmid, "logic module stack position"); MODULE_PARM_DESC(lmid, "logic module stack position");
#define ROM_OFFSET 0x0fffff00
#define ROM_SIZE 256
struct impd1_module { struct impd1_module {
void *base; void *base;
}; };
...@@ -142,17 +140,15 @@ static struct impd1_device impd1_devs[] = { ...@@ -142,17 +140,15 @@ static struct impd1_device impd1_devs[] = {
} }
}; };
static int impd1_probe(struct device *dev) static int impd1_probe(struct lm_device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev);
struct resource *res = &pdev->resource[0];
struct impd1_module *impd1; struct impd1_module *impd1;
int i, ret; int i, ret;
if (pdev->id != module_id) if (dev->id != module_id)
return -EINVAL; return -EINVAL;
if (!request_mem_region(res->start, SZ_4K, "LM registers")) if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
return -EBUSY; return -EBUSY;
impd1 = kmalloc(sizeof(struct impd1_module), GFP_KERNEL); impd1 = kmalloc(sizeof(struct impd1_module), GFP_KERNEL);
...@@ -162,22 +158,22 @@ static int impd1_probe(struct device *dev) ...@@ -162,22 +158,22 @@ static int impd1_probe(struct device *dev)
} }
memset(impd1, 0, sizeof(struct impd1_module)); memset(impd1, 0, sizeof(struct impd1_module));
impd1->base = ioremap(res->start, SZ_4K); impd1->base = ioremap(dev->resource.start, SZ_4K);
if (!impd1->base) { if (!impd1->base) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_impd1; goto free_impd1;
} }
dev_set_drvdata(dev, impd1); lm_set_drvdata(dev, impd1);
printk("IM-PD1 found at 0x%08lx\n", res->start); printk("IM-PD1 found at 0x%08lx\n", dev->resource.start);
for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) {
struct impd1_device *idev = impd1_devs + i; struct impd1_device *idev = impd1_devs + i;
struct amba_device *d; struct amba_device *d;
unsigned long pc_base; unsigned long pc_base;
pc_base = res->start + idev->offset; pc_base = dev->resource.start + idev->offset;
d = kmalloc(sizeof(struct amba_device), GFP_KERNEL); d = kmalloc(sizeof(struct amba_device), GFP_KERNEL);
if (!d) if (!d)
...@@ -186,16 +182,16 @@ static int impd1_probe(struct device *dev) ...@@ -186,16 +182,16 @@ static int impd1_probe(struct device *dev)
memset(d, 0, sizeof(struct amba_device)); memset(d, 0, sizeof(struct amba_device));
snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
"lm%x:%5.5lx", pdev->id, idev->offset >> 12); "lm%x:%5.5lx", dev->id, idev->offset >> 12);
d->dev.parent = &pdev->dev; d->dev.parent = &dev->dev;
d->res.start = res->start + idev->offset; d->res.start = dev->resource.start + idev->offset;
d->res.end = d->res.start + SZ_4K - 1; d->res.end = d->res.start + SZ_4K - 1;
d->res.flags = IORESOURCE_MEM; d->res.flags = IORESOURCE_MEM;
d->irq = pdev->resource[1].start; d->irq = dev->irq;
d->periphid = idev->id; d->periphid = idev->id;
ret = amba_device_register(d, res); ret = amba_device_register(d, &dev->resource);
if (ret) { if (ret) {
printk("unable to register device %s: %d\n", printk("unable to register device %s: %d\n",
d->dev.bus_id, ret); d->dev.bus_id, ret);
...@@ -211,47 +207,44 @@ static int impd1_probe(struct device *dev) ...@@ -211,47 +207,44 @@ static int impd1_probe(struct device *dev)
if (impd1) if (impd1)
kfree(impd1); kfree(impd1);
release_lm: release_lm:
release_mem_region(res->start, SZ_4K); release_mem_region(dev->resource.start, SZ_4K);
return ret; return ret;
} }
static int impd1_remove(struct device *dev) static void impd1_remove(struct lm_device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct impd1_module *impd1 = lm_get_drvdata(dev);
struct resource *res = &pdev->resource[0];
struct impd1_module *impd1 = dev_get_drvdata(dev);
struct list_head *l, *n; struct list_head *l, *n;
list_for_each_safe(l, n, &dev->children) { list_for_each_safe(l, n, &dev->dev.children) {
struct device *d = list_to_dev(l); struct device *d = list_to_dev(l);
device_unregister(d); device_unregister(d);
} }
dev_set_drvdata(dev, NULL); lm_set_drvdata(dev, NULL);
iounmap(impd1->base); iounmap(impd1->base);
kfree(impd1); kfree(impd1);
release_mem_region(res->start, SZ_4K); release_mem_region(dev->resource.start, SZ_4K);
return 0;
} }
static struct device_driver impd1_driver = { static struct lm_driver impd1_driver = {
.name = "lm", .drv = {
.bus = &platform_bus_type, .name = "impd1",
},
.probe = impd1_probe, .probe = impd1_probe,
.remove = impd1_remove, .remove = impd1_remove,
}; };
static int __init impd1_init(void) static int __init impd1_init(void)
{ {
return driver_register(&impd1_driver); return lm_driver_register(&impd1_driver);
} }
static void __exit impd1_exit(void) static void __exit impd1_exit(void)
{ {
driver_unregister(&impd1_driver); lm_driver_unregister(&impd1_driver);
} }
module_init(impd1_init); module_init(impd1_init);
......
/*
* linux/arch/arm/mach-integrator/lm.c
*
* Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/device.h>
#include <asm/arch/lm.h>
#define to_lm_device(d) container_of(d, struct lm_device, dev)
#define to_lm_driver(d) container_of(d, struct lm_driver, drv)
static int lm_match(struct device *dev, struct device_driver *drv)
{
return 1;
}
static struct bus_type lm_bustype = {
.name = "logicmodule",
.match = lm_match,
// .suspend = lm_suspend,
// .resume = lm_resume,
};
static int __init lm_init(void)
{
return bus_register(&lm_bustype);
}
postcore_initcall(lm_init);
static int lm_bus_probe(struct device *dev)
{
struct lm_device *lmdev = to_lm_device(dev);
struct lm_driver *lmdrv = to_lm_driver(dev->driver);
return lmdrv->probe(lmdev);
}
static int lm_bus_remove(struct device *dev)
{
struct lm_device *lmdev = to_lm_device(dev);
struct lm_driver *lmdrv = to_lm_driver(dev->driver);
lmdrv->remove(lmdev);
return 0;
}
int lm_driver_register(struct lm_driver *drv)
{
drv->drv.bus = &lm_bustype;
drv->drv.probe = lm_bus_probe;
drv->drv.remove = lm_bus_remove;
return driver_register(&drv->drv);
}
void lm_driver_unregister(struct lm_driver *drv)
{
driver_unregister(&drv->drv);
}
static void lm_device_release(struct device *dev)
{
struct lm_device *d = to_lm_device(dev);
kfree(d);
}
int lm_device_register(struct lm_device *dev)
{
int ret;
dev->dev.release = lm_device_release;
dev->dev.bus = &lm_bustype;
snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), "lm%d", dev->id);
dev->resource.name = dev->dev.bus_id;
ret = request_resource(&iomem_resource, &dev->resource);
if (ret == 0) {
ret = device_register(&dev->dev);
if (ret)
release_resource(&dev->resource);
}
return ret;
}
comment "Processor Type"
config CPU_32
bool
default y
# Select CPU types depending on the architecture selected. This selects
# which CPUs we support in the kernel image, and the compiler instruction
# optimiser behaviour.
# ARM610
config CPU_ARM610
bool "Support ARM610 processor"
depends on ARCH_RPC
select CPU_32v3
select CPU_CACHE_V3
select CPU_COPY_V3
select CPU_TLB_V3
help
The ARM610 is the successor to the ARM3 processor
and was produced by VLSI Technology Inc.
Say Y if you want support for the ARM610 processor.
Otherwise, say N.
# ARM710
config CPU_ARM710
bool "Support ARM710 processor" if !ARCH_CLPS7500 && ARCH_RPC
default y if ARCH_CLPS7500
select CPU_32v3
select CPU_CACHE_V3
select CPU_COPY_V3
select CPU_TLB_V3
help
A 32-bit RISC microprocessor based on the ARM7 processor core
designed by Advanced RISC Machines Ltd. The ARM710 is the
successor to the ARM610 processor. It was released in
July 1994 by VLSI Technology Inc.
Say Y if you want support for the ARM710 processor.
Otherwise, say N.
# ARM720T
config CPU_ARM720T
bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR
default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712
select CPU_32v4
select CPU_ABRT_LV4T
select CPU_CACHE_V4
select CPU_COPY_V4WT
select CPU_TLB_V4WT
help
A 32-bit RISC processor with 8kByte Cache, Write Buffer and
MMU built around an ARM7TDMI core.
Say Y if you want support for the ARM720T processor.
Otherwise, say N.
# ARM920T
config CPU_ARM920T
bool "Support ARM920T processor"
depends on ARCH_INTEGRATOR
select CPU_32v4
select CPU_ABRT_EV4T
select CPU_CACHE_V4WT
select CPU_COPY_V4WB
select CPU_TLB_V4WBI
help
The ARM920T is licensed to be produced by numerous vendors,
and is used in the Maverick EP9312. More information at
<http://linuxdevices.com/products/PD2382866068.html>.
Say Y if you want support for the ARM920T processor.
Otherwise, say N.
# ARM922T
config CPU_ARM922T
bool
depends on ARCH_CAMELOT
default y
select CPU_32v4
select CPU_ABRT_EV4T
select CPU_CACHE_V4WT
select CPU_COPY_V4WB
select CPU_TLB_V4WBI
help
The ARM922T is a version of the ARM920T, but with smaller
instruction and data caches. It is used in Altera's
Excalibur XA device family.
Say Y if you want support for the ARM922T processor.
Otherwise, say N.
# ARM926T
config CPU_ARM926T
bool "Support ARM926T processor"
depends on ARCH_INTEGRATOR
select CPU_32v5
select CPU_ABRT_EV5TJ
select CPU_COPY_V4WB
select CPU_TLB_V4WBI
help
This is a variant of the ARM920. It has slightly different
instruction sequences for cache and TLB operations. Curiously,
there is no documentation on it at the ARM corporate website.
Say Y if you want support for the ARM926T processor.
Otherwise, say N.
# ARM1020 - needs validating
config CPU_ARM1020
bool "Support ARM1020T (rev 0) processor"
depends on ARCH_INTEGRATOR
select CPU_32v5
select CPU_ABRT_EV4T
select CPU_CACHE_V4WT
select CPU_COPY_V4WB
select CPU_TLB_V4WBI
help
The ARM1020 is the 32K cached version of the ARM10 processor,
with an addition of a floating-point unit.
Say Y if you want support for the ARM1020 processor.
Otherwise, say N.
# ARM1020E - needs validating
config CPU_ARM1020E
bool "Support ARM1020E processor"
depends on ARCH_INTEGRATOR
select CPU_32v5
select CPU_ABRT_EV4T
select CPU_CACHE_V4WT
select CPU_COPY_V4WB
select CPU_TLB_V4WBI
depends on n
# ARM1022E
config CPU_ARM1022
bool "Support ARM1022E processor"
depends on ARCH_INTEGRATOR
select CPU_32v5
select CPU_ABRT_EV4T
select CPU_COPY_V4WB # can probably do better
select CPU_TLB_V4WBI
help
The ARM1022E is an implementation of the ARMv5TE architecture
based upon the ARM10 integer core with a 16KiB L1 Harvard cache,
embedded trace macrocell, and a floating-point unit.
Say Y if you want support for the ARM1022E processor.
Otherwise, say N.
# ARM1026EJ-S
config CPU_ARM1026
bool "Support ARM1026EJ-S processor"
depends on ARCH_INTEGRATOR
select CPU_32v5
select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10
select CPU_COPY_V4WB # can probably do better
select CPU_TLB_V4WBI
help
The ARM1026EJ-S is an implementation of the ARMv5TEJ architecture
based upon the ARM10 integer core.
Say Y if you want support for the ARM1026EJ-S processor.
Otherwise, say N.
# SA110
config CPU_SA110
bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && !ARCH_ANAKIN && ARCH_RPC
default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_ANAKIN
select CPU_32v3 if ARCH_RPC
select CPU_32v4 if !ARCH_RPC
select CPU_ABRT_EV4
select CPU_CACHE_V4WB
select CPU_COPY_V4WB
select CPU_TLB_V4WB
help
The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
is available at five speeds ranging from 100 MHz to 233 MHz.
More information is available at
<http://developer.intel.com/design/strong/sa110.htm>.
Say Y if you want support for the SA-110 processor.
Otherwise, say N.
# SA1100
config CPU_SA1100
bool
depends on ARCH_SA1100
default y
select CPU_32v4
select CPU_ABRT_EV4
select CPU_CACHE_V4WB
select CPU_TLB_V4WB
select CPU_MINICACHE
# XScale
config CPU_XSCALE
bool
depends on ARCH_IOP3XX || ARCH_ADIFCC || ARCH_PXA
default y
select CPU_32v5
select CPU_ABRT_EV5T
select CPU_TLB_V4WBI
select CPU_MINICACHE
# This defines the compiler instruction set which depends on the machine type.
config CPU_32v3
bool
config CPU_32v4
bool
config CPU_32v5
bool
# The abort model
config CPU_ABRT_EV4
bool
config CPU_ABRT_EV4T
bool
config CPU_ABRT_LV4T
bool
config CPU_ABRT_EV5T
bool
config CPU_ABRT_EV5TJ
bool
# The cache model
config CPU_CACHE_V3
bool
config CPU_CACHE_V4
bool
config CPU_CACHE_V4WT
bool
config CPU_CACHE_V4WB
bool
# The copy-page model
config CPU_COPY_V3
bool
config CPU_COPY_V4WT
bool
config CPU_COPY_V4WB
bool
# This selects the TLB model
config CPU_TLB_V3
bool
help
ARM Architecture Version 3 TLB.
config CPU_TLB_V4WT
bool
help
ARM Architecture Version 4 TLB with writethrough cache.
config CPU_TLB_V4WB
bool
help
ARM Architecture Version 4 TLB with writeback cache.
config CPU_TLB_V4WBI
bool
help
ARM Architecture Version 4 TLB with writeback cache and invalidate
instruction cache entry.
config CPU_TLB_V6
bool
config CPU_MINICACHE
bool
help
Processor has a minicache.
comment "Processor Features"
config ARM_THUMB
bool "Support Thumb user binaries"
depends on CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE
default y
help
Say Y if you want to have kernel support for ARM Thumb instructions,
fault handlers, and system calls.
The Thumb instruction set is a compressed form of the standard ARM
instruction set resulting in smaller binaries at the expense of
slightly less efficient code.
If you don't know what this all is, saying Y is a safe choice.
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
depends on ARCH_SUPPORTS_BIG_ENDIAN
help
Say Y if you plan on running a kernel in big-endian mode.
Note that your board must be properly built and your board
port must properly enable and big-endian related features
of your chipset/board/processor.
config CPU_ICACHE_DISABLE
bool "Disable I-Cache"
depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
help
Say Y here to disable the processor instruction cache. Unless
you have a reason not to or are unsure, say N.
config CPU_DCACHE_DISABLE
bool "Disable D-Cache"
depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
help
Say Y here to disable the processor data cache. Unless
you have a reason not to or are unsure, say N.
config CPU_DCACHE_WRITETHROUGH
bool "Force write through D-cache"
depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE
help
Say Y here to use the data cache in writethough mode. Unless you
specifically require this or are unsure, say N.
config CPU_CACHE_ROUND_ROBIN
bool "Round robin I and D cache replacement algorithm"
depends on (CPU_ARM926T || CPU_ARM1020) && (!CPU_ICACHE_DISABLE || !CPU_DCACHE_DISABLE)
help
Say Y here to use the predictable round-robin cache replacement
policy. Unless you specifically require this or are unsure, say N.
config CPU_BPREDICT_DISABLE
bool "Disable branch prediction"
depends on CPU_ARM1020
help
Say Y here to disable branch prediction. If unsure, say N.
...@@ -2,29 +2,48 @@ ...@@ -2,29 +2,48 @@
# Makefile for the linux arm-specific parts of the memory manager. # Makefile for the linux arm-specific parts of the memory manager.
# #
# Object file lists. obj-y := consistent.o extable.o fault-armv.o \
fault-common.o init.o ioremap.o mm-armv.o
obj-y := consistent.o extable.o fault-armv.o fault-common.o \ obj-$(CONFIG_MODULES) += proc-syms.o
init.o ioremap.o mm-armv.o
obj-$(CONFIG_MODULES) += proc-syms.o
obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
obj-$(CONFIG_DISCONTIGMEM) += discontig.o obj-$(CONFIG_DISCONTIGMEM) += discontig.o
# ARMv3 obj-$(CONFIG_CPU_ABRT_EV4) += abort-ev4.o
p-$(CONFIG_CPU_ARM610) += proc-arm6_7.o tlb-v3.o cache-v3.o copypage-v3.o obj-$(CONFIG_CPU_ABRT_EV4T) += abort-ev4t.o
p-$(CONFIG_CPU_ARM710) += proc-arm6_7.o tlb-v3.o cache-v3.o copypage-v3.o obj-$(CONFIG_CPU_ABRT_LV4T) += abort-lv4t.o
obj-$(CONFIG_CPU_ABRT_EV5T) += abort-ev5t.o
obj-$(CONFIG_CPU_ABRT_EV5TJ) += abort-ev5tj.o
# ARMv4 obj-$(CONFIG_CPU_CACHE_V3) += cache-v3.o
p-$(CONFIG_CPU_ARM720T) += proc-arm720.o tlb-v4.o cache-v4.o copypage-v4wt.o abort-lv4t.o obj-$(CONFIG_CPU_CACHE_V4) += cache-v4.o
p-$(CONFIG_CPU_ARM920T) += proc-arm920.o tlb-v4wbi.o cache-v4wt.o copypage-v4wb.o abort-ev4t.o obj-$(CONFIG_CPU_CACHE_V4WT) += cache-v4wt.o
p-$(CONFIG_CPU_ARM922T) += proc-arm922.o tlb-v4wbi.o cache-v4wt.o copypage-v4wb.o abort-ev4t.o obj-$(CONFIG_CPU_CACHE_V4WB) += cache-v4wb.o
p-$(CONFIG_CPU_ARM1020) += proc-arm1020.o tlb-v4wbi.o cache-v4wt.o copypage-v4wb.o abort-ev4t.o
p-$(CONFIG_CPU_SA110) += proc-sa110.o tlb-v4wb.o cache-v4wb.o copypage-v4wb.o abort-ev4.o
p-$(CONFIG_CPU_SA1100) += proc-sa1100.o tlb-v4wb.o cache-v4wb.o copypage-v4mc.o abort-ev4.o minicache.o
# ARMv5 obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o
p-$(CONFIG_CPU_ARM926T) += proc-arm926.o tlb-v4wbi.o copypage-v4wb.o abort-ev5tej.o obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o
p-$(CONFIG_CPU_XSCALE) += proc-xscale.o tlb-v4wbi.o copypage-xscale.o abort-xscale.o minicache.o obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o
obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o
obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o
obj-y += $(sort $(p-y)) obj-$(CONFIG_CPU_MINICACHE) += minicache.o
obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o
obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o
obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o
obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o
obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o
obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o
obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o
obj-$(CONFIG_CPU_ARM920T) += proc-arm920.o
obj-$(CONFIG_CPU_ARM922T) += proc-arm922.o
obj-$(CONFIG_CPU_ARM926T) += proc-arm926.o
obj-$(CONFIG_CPU_ARM1020) += proc-arm1020.o
obj-$(CONFIG_CPU_ARM1020E) += proc-arm1020e.o
obj-$(CONFIG_CPU_ARM1022) += proc-arm1022.o
obj-$(CONFIG_CPU_ARM1026) += proc-arm1026.o
obj-$(CONFIG_CPU_SA110) += proc-sa110.o
obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o
obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h> #include <asm/assembler.h>
/* /*
* Function: xscale_abort * Function: v5t_early_abort
* *
* Params : r2 = address of aborted instruction * Params : r2 = address of aborted instruction
* : r3 = saved SPSR * : r3 = saved SPSR
...@@ -16,12 +16,9 @@ ...@@ -16,12 +16,9 @@
* Note: we read user space. This means we might cause a data * Note: we read user space. This means we might cause a data
* abort here if the I-TLB and D-TLB aren't seeing the same * abort here if the I-TLB and D-TLB aren't seeing the same
* picture. Unfortunately, this does happen. We live with it. * picture. Unfortunately, this does happen. We live with it.
*
* Note: Xscale is contains non-standard architecture extensions.
* It requires its own early abort handler
*/ */
.align 5 .align 5
ENTRY(xscale_abort) ENTRY(v5t_early_abort)
mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r1, c5, c0, 0 @ get FSR
mrc p15, 0, r0, c6, c0, 0 @ get FAR mrc p15, 0, r0, c6, c0, 0 @ get FAR
tst r3, #PSR_T_BIT tst r3, #PSR_T_BIT
......
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h> #include <asm/assembler.h>
/* /*
* Function: v5tej_early_abort * Function: v5tj_early_abort
* *
* Params : r2 = address of aborted instruction * Params : r2 = address of aborted instruction
* : r3 = saved SPSR * : r3 = saved SPSR
...@@ -18,19 +18,19 @@ ...@@ -18,19 +18,19 @@
* picture. Unfortunately, this does happen. We live with it. * picture. Unfortunately, this does happen. We live with it.
*/ */
.align 5 .align 5
ENTRY(v5tej_early_abort) ENTRY(v5tj_early_abort)
mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r1, c5, c0, 0 @ get FSR
mrc p15, 0, r0, c6, c0, 0 @ get FAR mrc p15, 0, r0, c6, c0, 0 @ get FAR
bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR
tst r3, #PSR_J_BIT tst r3, #PSR_J_BIT @ Java?
orrne r1, r1, #1 << 11 @ always assume write orrne r1, r1, #1 << 11 @ always assume write
bne 1f movne pc, lr
tst r3, #PSR_T_BIT tst r3, #PSR_T_BIT @ Thumb?
ldrneh r3, [r2] @ read aborted thumb instruction ldrneh r3, [r2] @ read aborted thumb instruction
ldreq r3, [r2] @ read aborted ARM instruction ldreq r3, [r2] @ read aborted ARM instruction
movne r3, r3, lsl #(21 - 12) @ move thumb bit 11 to ARM bit 20 movne r3, r3, lsl #(21 - 12) @ move thumb bit 11 to ARM bit 20
tst r3, #1 << 20 @ L = 1 -> write tst r3, #1 << 20 @ L = 0 -> write
orreq r1, r1, #1 << 11 @ yes. orreq r1, r1, #1 << 11 @ yes.
1: mov pc, lr mov pc, lr
...@@ -14,9 +14,11 @@ ...@@ -14,9 +14,11 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/vmalloc.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
...@@ -127,6 +129,8 @@ do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) ...@@ -127,6 +129,8 @@ do_PrefetchAbort(unsigned long addr, struct pt_regs *regs)
do_translation_fault(addr, 0, regs); do_translation_fault(addr, 0, regs);
} }
static unsigned long shared_pte_mask = L_PTE_CACHEABLE;
/* /*
* We take the easy way out of this problem - we make the * We take the easy way out of this problem - we make the
* PTE uncacheable. However, we leave the write buffer on. * PTE uncacheable. However, we leave the write buffer on.
...@@ -157,9 +161,9 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) ...@@ -157,9 +161,9 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
* If this page isn't present, or is already setup to * If this page isn't present, or is already setup to
* fault (ie, is old), we can safely ignore any issues. * fault (ie, is old), we can safely ignore any issues.
*/ */
if (pte_present(entry) && pte_val(entry) & L_PTE_CACHEABLE) { if (pte_present(entry) && pte_val(entry) & shared_pte_mask) {
flush_cache_page(vma, address); flush_cache_page(vma, address);
pte_val(entry) &= ~L_PTE_CACHEABLE; pte_val(entry) &= ~shared_pte_mask;
set_pte(pte, entry); set_pte(pte, entry);
flush_tlb_page(vma, address); flush_tlb_page(vma, address);
ret = 1; ret = 1;
...@@ -297,3 +301,65 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) ...@@ -297,3 +301,65 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
make_coherent(vma, addr, page, dirty); make_coherent(vma, addr, page, dirty);
} }
} }
/*
* Check whether the write buffer has physical address aliasing
* issues. If it has, we need to avoid them for the case where
* we have several shared mappings of the same object in user
* space.
*/
static int __init check_writebuffer(unsigned long *p1, unsigned long *p2)
{
register unsigned long zero = 0, one = 1, val;
local_irq_disable();
mb();
*p1 = one;
mb();
*p2 = zero;
mb();
val = *p1;
mb();
local_irq_enable();
return val != zero;
}
void __init check_writebuffer_bugs(void)
{
struct page *page;
const char *reason;
unsigned long v = 1;
printk(KERN_INFO "CPU: Testing write buffer coherency: ");
page = alloc_page(GFP_KERNEL);
if (page) {
unsigned long *p1, *p2;
pgprot_t prot = __pgprot(L_PTE_PRESENT|L_PTE_YOUNG|
L_PTE_DIRTY|L_PTE_WRITE|
L_PTE_BUFFERABLE);
p1 = vmap(&page, 1, VM_IOREMAP, prot);
p2 = vmap(&page, 1, VM_IOREMAP, prot);
if (p1 && p2) {
v = check_writebuffer(p1, p2);
reason = "enabling work-around";
} else {
reason = "unable to map memory\n";
}
vunmap(p1);
vunmap(p2);
put_page(page);
} else {
reason = "unable to grab page\n";
}
if (v) {
printk("failed, %s\n", reason);
shared_pte_mask |= L_PTE_BUFFERABLE;
} else {
printk("ok\n");
}
}
...@@ -392,12 +392,19 @@ static void __init create_mapping(struct map_desc *md) ...@@ -392,12 +392,19 @@ static void __init create_mapping(struct map_desc *md)
long off; long off;
if (md->virtual != vectors_base() && md->virtual < PAGE_OFFSET) { if (md->virtual != vectors_base() && md->virtual < PAGE_OFFSET) {
printk(KERN_WARNING "MM: not creating mapping for " printk(KERN_WARNING "BUG: not creating mapping for "
"0x%08lx at 0x%08lx in user region\n", "0x%08lx at 0x%08lx in user region\n",
md->physical, md->virtual); md->physical, md->virtual);
return; return;
} }
if (md->type == MT_DEVICE &&
md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) {
printk(KERN_WARNING "BUG: mapping for 0x%08lx at 0x%08lx "
"overlaps vmalloc space\n",
md->physical, md->virtual);
}
domain = mem_types[md->type].domain; domain = mem_types[md->type].domain;
prot_pte = __pgprot(mem_types[md->type].prot_pte); prot_pte = __pgprot(mem_types[md->type].prot_pte);
prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain); prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain);
...@@ -409,7 +416,7 @@ static void __init create_mapping(struct map_desc *md) ...@@ -409,7 +416,7 @@ static void __init create_mapping(struct map_desc *md)
if (mem_types[md->type].prot_l1 == 0 && if (mem_types[md->type].prot_l1 == 0 &&
(virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) { (virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) {
printk(KERN_WARNING "MM: map for 0x%08lx at 0x%08lx can not " printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not "
"be mapped using pages, ignoring.\n", "be mapped using pages, ignoring.\n",
md->physical, md->virtual); md->physical, md->virtual);
return; return;
......
/* /*
* linux/arch/arm/mm/arm1020.S: MMU functions for ARM1020 * linux/arch/arm/mm/proc-arm1020.S: MMU functions for ARM1020
* *
* Copyright (C) 2000 ARM Limited * Copyright (C) 2000 ARM Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd. * Copyright (C) 2000 Deep Blue Solutions Ltd.
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/constants.h> #include <asm/constants.h>
#include <asm/pgtable.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/hardware.h> #include <asm/hardware.h>
...@@ -379,19 +380,19 @@ ENTRY(cpu_arm1020_switch_mm) ...@@ -379,19 +380,19 @@ ENTRY(cpu_arm1020_switch_mm)
ENTRY(cpu_arm1020_set_pte) ENTRY(cpu_arm1020_set_pte)
str r1, [r0], #-2048 @ linux version str r1, [r0], #-2048 @ linux version
eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #HPTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #LPTE_USER @ User? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #HPTE_AP_READ orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
orreq r2, r2, #HPTE_AP_WRITE orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young? tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young?
movne r2, #0 movne r2, #0
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
...@@ -410,7 +411,7 @@ ENTRY(cpu_arm1020_set_pte) ...@@ -410,7 +411,7 @@ ENTRY(cpu_arm1020_set_pte)
ENTRY(cpu_arm1020_name) ENTRY(cpu_arm1020_name)
.ascii "Arm1020" .ascii "ARM1020"
#ifndef CONFIG_CPU_ICACHE_DISABLE #ifndef CONFIG_CPU_ICACHE_DISABLE
.ascii "i" .ascii "i"
#endif #endif
...@@ -445,10 +446,8 @@ __arm1020_setup: ...@@ -445,10 +446,8 @@ __arm1020_setup:
/* /*
* Clear out 'unwanted' bits (then put them in if we need them) * Clear out 'unwanted' bits (then put them in if we need them)
*/ */
bic r0, r0, #0x0e00 @ ....??r......... bic r0, r0, #0x1e00 @ i...??r.........
bic r0, r0, #0x0002 @ ..............a. bic r0, r0, #0x000e @ ............wca.
bic r0, r0, #0x000c @ W,D
bic r0, r0, #0x1000 @ I
/* /*
* Turn on what we want * Turn on what we want
*/ */
...@@ -490,12 +489,12 @@ arm1020_processor_functions: ...@@ -490,12 +489,12 @@ arm1020_processor_functions:
.type cpu_arch_name, #object .type cpu_arch_name, #object
cpu_arch_name: cpu_arch_name:
.asciz "armv4t" .asciz "armv5t"
.size cpu_arch_name, . - cpu_arch_name .size cpu_arch_name, . - cpu_arch_name
.type cpu_elf_name, #object .type cpu_elf_name, #object
cpu_elf_name: cpu_elf_name:
.asciz "v4" .asciz "v5"
.size cpu_elf_name, . - cpu_elf_name .size cpu_elf_name, . - cpu_elf_name
.align .align
...@@ -503,8 +502,8 @@ cpu_elf_name: ...@@ -503,8 +502,8 @@ cpu_elf_name:
.type __arm1020_proc_info,#object .type __arm1020_proc_info,#object
__arm1020_proc_info: __arm1020_proc_info:
.long 0x4100a200 .long 0x4104a200 @ ARM 1020T (Architecture v5T)
.long 0xff00fff0 .long 0xff0ffff0
.long 0x00000c02 @ mmuflags .long 0x00000c02 @ mmuflags
b __arm1020_setup b __arm1020_setup
.long cpu_arch_name .long cpu_arch_name
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/constants.h> #include <asm/constants.h>
#include <asm/pgtable.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
...@@ -214,19 +215,19 @@ ENTRY(cpu_arm6_set_pte) ...@@ -214,19 +215,19 @@ ENTRY(cpu_arm6_set_pte)
ENTRY(cpu_arm7_set_pte) ENTRY(cpu_arm7_set_pte)
str r1, [r0], #-2048 @ linux version str r1, [r0], #-2048 @ linux version
eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #HPTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #LPTE_USER | LPTE_EXEC @ User or Exec? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #HPTE_AP_READ orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
orreq r2, r2, #HPTE_AP_WRITE orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young
movne r2, #0 movne r2, #0
str r2, [r0] @ hardware version str r2, [r0] @ hardware version
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/constants.h> #include <asm/constants.h>
#include <asm/pgtable.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/hardware.h> #include <asm/hardware.h>
...@@ -90,19 +91,19 @@ ENTRY(cpu_arm720_switch_mm) ...@@ -90,19 +91,19 @@ ENTRY(cpu_arm720_switch_mm)
ENTRY(cpu_arm720_set_pte) ENTRY(cpu_arm720_set_pte)
str r1, [r0], #-2048 @ linux version str r1, [r0], #-2048 @ linux version
eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #HPTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #LPTE_USER @ User? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #HPTE_AP_READ orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
orreq r2, r2, #HPTE_AP_WRITE orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young
movne r2, #0 movne r2, #0
str r2, [r0] @ hardware version str r2, [r0] @ hardware version
......
/* /*
* linux/arch/arm/mm/arm920.S: MMU functions for ARM920 * linux/arch/arm/mm/proc-arm920.S: MMU functions for ARM920
* *
* Copyright (C) 1999,2000 ARM Limited * Copyright (C) 1999,2000 ARM Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd. * Copyright (C) 2000 Deep Blue Solutions Ltd.
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/pgtable.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -333,19 +334,19 @@ ENTRY(cpu_arm920_switch_mm) ...@@ -333,19 +334,19 @@ ENTRY(cpu_arm920_switch_mm)
ENTRY(cpu_arm920_set_pte) ENTRY(cpu_arm920_set_pte)
str r1, [r0], #-2048 @ linux version str r1, [r0], #-2048 @ linux version
eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #HPTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #LPTE_USER @ User or Exec? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #HPTE_AP_READ orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
orreq r2, r2, #HPTE_AP_WRITE orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young? tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young?
movne r2, #0 movne r2, #0
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
...@@ -361,7 +362,7 @@ ENTRY(cpu_arm920_set_pte) ...@@ -361,7 +362,7 @@ ENTRY(cpu_arm920_set_pte)
ENTRY(cpu_arm920_name) ENTRY(cpu_arm920_name)
.ascii "Arm920T" .ascii "ARM920T"
#ifndef CONFIG_CPU_ICACHE_DISABLE #ifndef CONFIG_CPU_ICACHE_DISABLE
.ascii "i" .ascii "i"
#endif #endif
......
/* /*
* linux/arch/arm/mm/arm922.S: MMU functions for ARM922 * linux/arch/arm/mm/proc-arm922.S: MMU functions for ARM922
* *
* Copyright (C) 1999,2000 ARM Limited * Copyright (C) 1999,2000 ARM Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd. * Copyright (C) 2000 Deep Blue Solutions Ltd.
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/pgtable.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -337,19 +338,19 @@ ENTRY(cpu_arm922_switch_mm) ...@@ -337,19 +338,19 @@ ENTRY(cpu_arm922_switch_mm)
ENTRY(cpu_arm922_set_pte) ENTRY(cpu_arm922_set_pte)
str r1, [r0], #-2048 @ linux version str r1, [r0], #-2048 @ linux version
eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #HPTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #LPTE_USER @ User? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #HPTE_AP_READ orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
orreq r2, r2, #HPTE_AP_WRITE orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young? tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young?
movne r2, #0 movne r2, #0
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
...@@ -365,7 +366,7 @@ ENTRY(cpu_arm922_set_pte) ...@@ -365,7 +366,7 @@ ENTRY(cpu_arm922_set_pte)
ENTRY(cpu_arm922_name) ENTRY(cpu_arm922_name)
.ascii "Arm922T" .ascii "ARM922T"
#ifndef CONFIG_CPU_ICACHE_DISABLE #ifndef CONFIG_CPU_ICACHE_DISABLE
.ascii "i" .ascii "i"
#endif #endif
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/pgtable.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -337,19 +338,19 @@ ENTRY(cpu_arm926_switch_mm) ...@@ -337,19 +338,19 @@ ENTRY(cpu_arm926_switch_mm)
ENTRY(cpu_arm926_set_pte) ENTRY(cpu_arm926_set_pte)
str r1, [r0], #-2048 @ linux version str r1, [r0], #-2048 @ linux version
eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #HPTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #LPTE_USER @ User? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #HPTE_AP_READ orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
orreq r2, r2, #HPTE_AP_WRITE orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young? tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young?
movne r2, #0 movne r2, #0
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
...@@ -436,7 +437,7 @@ __arm926_setup: ...@@ -436,7 +437,7 @@ __arm926_setup:
*/ */
.type arm926_processor_functions, #object .type arm926_processor_functions, #object
arm926_processor_functions: arm926_processor_functions:
.word v5tej_early_abort .word v5tj_early_abort
.word cpu_arm926_proc_init .word cpu_arm926_proc_init
.word cpu_arm926_proc_fin .word cpu_arm926_proc_fin
.word cpu_arm926_reset .word cpu_arm926_reset
...@@ -461,8 +462,8 @@ cpu_elf_name: ...@@ -461,8 +462,8 @@ cpu_elf_name:
.type __arm926_proc_info,#object .type __arm926_proc_info,#object
__arm926_proc_info: __arm926_proc_info:
.long 0x41009260 .long 0x41069260 @ ARM926EJ-S (v5TEJ)
.long 0xff00fff0 .long 0xff0ffff0
.long 0x00000c1e @ mmuflags .long 0x00000c1e @ mmuflags
b __arm926_setup b __arm926_setup
.long cpu_arch_name .long cpu_arch_name
......
...@@ -163,11 +163,11 @@ ENTRY(cpu_sa110_set_pte) ...@@ -163,11 +163,11 @@ ENTRY(cpu_sa110_set_pte)
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #PTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #L_PTE_USER @ User or Exec? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #PTE_SMALL_AP_URO_SRW orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
......
/* /*
* linux/arch/arm/mm/proc-sa110.S * linux/arch/arm/mm/proc-sa1100.S
* *
* Copyright (C) 1997-2002 Russell King * Copyright (C) 1997-2002 Russell King
* *
...@@ -187,11 +187,11 @@ ENTRY(cpu_sa1100_set_pte) ...@@ -187,11 +187,11 @@ ENTRY(cpu_sa1100_set_pte)
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
bic r2, r1, #0xff0 bic r2, r1, #PTE_SMALL_AP_MASK
bic r2, r2, #3 bic r2, r2, #PTE_TYPE_MASK
orr r2, r2, #PTE_TYPE_SMALL orr r2, r2, #PTE_TYPE_SMALL
tst r1, #L_PTE_USER @ User or Exec? tst r1, #L_PTE_USER @ User?
orrne r2, r2, #PTE_SMALL_AP_URO_SRW orrne r2, r2, #PTE_SMALL_AP_URO_SRW
tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty? tst r1, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty?
......
...@@ -236,6 +236,9 @@ ENTRY(xscale_flush_user_cache_range) ...@@ -236,6 +236,9 @@ ENTRY(xscale_flush_user_cache_range)
* *
* - start - virtual start address * - start - virtual start address
* - end - virtual end address * - end - virtual end address
*
* Note: single I-cache line invalidation isn't used here since
* it also trashes the mini I-cache used by JTAG debuggers.
*/ */
ENTRY(xscale_coherent_kern_range) ENTRY(xscale_coherent_kern_range)
bic r0, r0, #CACHELINESIZE - 1 bic r0, r0, #CACHELINESIZE - 1
...@@ -612,7 +615,7 @@ __xscale_setup: ...@@ -612,7 +615,7 @@ __xscale_setup:
.type xscale_processor_functions, #object .type xscale_processor_functions, #object
ENTRY(xscale_processor_functions) ENTRY(xscale_processor_functions)
.word xscale_abort .word v5t_early_abort
.word cpu_xscale_proc_init .word cpu_xscale_proc_init
.word cpu_xscale_proc_fin .word cpu_xscale_proc_fin
.word cpu_xscale_reset .word cpu_xscale_reset
......
...@@ -34,7 +34,6 @@ ENTRY(v4_flush_user_tlb_range) ...@@ -34,7 +34,6 @@ ENTRY(v4_flush_user_tlb_range)
act_mm r3 @ get current->active_mm act_mm r3 @ get current->active_mm
eors r3, ip, r3 @ == mm ? eors r3, ip, r3 @ == mm ?
movne pc, lr @ no, we dont do anything movne pc, lr @ no, we dont do anything
vma_vm_flags ip, r2
.v4_flush_kern_tlb_range: .v4_flush_kern_tlb_range:
bic r0, r0, #0x0ff bic r0, r0, #0x0ff
bic r0, r0, #0xf00 bic r0, r0, #0xf00
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README, # To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk # or contact rmk@arm.linux.org.uk
# #
# Last update: Sun Aug 3 16:26:10 2003 # Last update: Sat Sep 13 00:22:34 2003
# #
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
# #
...@@ -367,3 +367,20 @@ cx861xx ARCH_CX861XX CX861XX 355 ...@@ -367,3 +367,20 @@ cx861xx ARCH_CX861XX CX861XX 355
ixp2000 ARCH_IXP2000 IXP2000 356 ixp2000 ARCH_IXP2000 IXP2000 356
xda SA1100_XDA XDA 357 xda SA1100_XDA XDA 357
csir_ims ARCH_CSIR_IMS CSIR_IMS 358 csir_ims ARCH_CSIR_IMS CSIR_IMS 358
ixp421_dnaeeth ARCH_IXP421_DNAEETH IXP421_DNAEETH 359
pocketserv9200 ARCH_POCKETSERV9200 POCKETSERV9200 360
toto ARCH_TOTO TOTO 361
s3c2440 ARCH_S3C2440 S3C2440 362
ks8695p ARCH_KS8695P KS8695P 363
se4000 ARCH_SE4000 SE4000 364
quadriceps ARCH_QUADRICEPS QUADRICEPS 365
bronco ARCH_BRONCO BRONCO 366
esl_wireless_tab ARCH_ESL_WIRELESS_TABLETESL_WIRELESS_TABLET 367
esl_sofcomp ARCH_ESL_SOFCOMP ESL_SOFCOMP 368
s5c7375 ARCH_S5C7375 S5C7375 369
spearhead ARCH_SPEARHEAD SPEARHEAD 370
pantera ARCH_PANTERA PANTERA 371
prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372
gumstik ARCH_GUMSTIK GUMSTIK 373
rcube ARCH_RCUBE RCUBE 374
rea_olv ARCH_REA_OLV REA_OLV 375
...@@ -26,7 +26,7 @@ static inline void arch_idle(void) ...@@ -26,7 +26,7 @@ static inline void arch_idle(void)
{ {
clps_writel(1, HALT); clps_writel(1, HALT);
__asm__ __volatile__( __asm__ __volatile__(
"mov r0, r0 "mov r0, r0\n\
mov r0, r0"); mov r0, r0");
} }
......
struct lm_device {
struct device dev;
struct resource resource;
unsigned int irq;
unsigned int id;
};
struct lm_driver {
struct device_driver drv;
int (*probe)(struct lm_device *);
void (*remove)(struct lm_device *);
int (*suspend)(struct lm_device *, u32);
int (*resume)(struct lm_device *);
};
int lm_driver_register(struct lm_driver *drv);
void lm_driver_unregister(struct lm_driver *drv);
int lm_device_register(struct lm_device *dev);
#define lm_get_drvdata(lm) dev_get_drvdata(&(lm)->dev)
#define lm_set_drvdata(lm,d) dev_set_drvdata(&(lm)->dev, d)
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __ASM_BUGS_H #ifndef __ASM_BUGS_H
#define __ASM_BUGS_H #define __ASM_BUGS_H
#define check_bugs() do { } while (0) extern void check_writebuffer_bugs(void);
#define check_bugs() check_writebuffer_bugs()
#endif #endif
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_ARM720T) #ifdef CONFIG_CPU_ABRT_LV4T
# ifdef CPU_ABORT_HANDLER # ifdef CPU_ABORT_HANDLER
# define MULTI_ABORT 1 # define MULTI_ABORT 1
# else # else
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_SA110) || defined(CONFIG_CPU_SA1100) #ifdef CONFIG_CPU_ABRT_EV4
# ifdef CPU_ABORT_HANDLER # ifdef CPU_ABORT_HANDLER
# define MULTI_ABORT 1 # define MULTI_ABORT 1
# else # else
...@@ -74,8 +74,7 @@ ...@@ -74,8 +74,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ #ifdef CONFIG_CPU_ABRT_EV4T
defined(CONFIG_CPU_ARM1020)
# ifdef CPU_ABORT_HANDLER # ifdef CPU_ABORT_HANDLER
# define MULTI_ABORT 1 # define MULTI_ABORT 1
# else # else
...@@ -83,19 +82,19 @@ ...@@ -83,19 +82,19 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_ARM926T) #ifdef CONFIG_CPU_ABRT_EV5TJ
# ifdef CPU_ABORT_HANDLER # ifdef CPU_ABORT_HANDLER
# define MULTI_ABORT 1 # define MULTI_ABORT 1
# else # else
# define CPU_ABORT_HANDLER v5tej_early_abort # define CPU_ABORT_HANDLER v5tj_early_abort
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_XSCALE) #ifdef CONFIG_CPU_ABORT_EV5T
# ifdef CPU_ABORT_HANDLER # ifdef CPU_ABORT_HANDLER
# define MULTI_ABORT 1 # define MULTI_ABORT 1
# else # else
# define CPU_ABORT_HANDLER xscale_abort # define CPU_ABORT_HANDLER v5t_early_abort
# endif # endif
#endif #endif
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#undef _USER #undef _USER
#undef MULTI_USER #undef MULTI_USER
#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) #ifdef CONFIG_CPU_COPY_V3
# ifdef _USER # ifdef _USER
# define MULTI_USER 1 # define MULTI_USER 1
# else # else
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_ARM720T) #ifdef CONFIG_CPU_COPY_V4WT
# ifdef _USER # ifdef _USER
# define MULTI_USER 1 # define MULTI_USER 1
# else # else
...@@ -60,9 +60,7 @@ ...@@ -60,9 +60,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ #ifdef CONFIG_CPU_COPY_V4WB
defined(CONFIG_CPU_ARM926T) || defined(CONFIG_CPU_SA110) || \
defined(CONFIG_CPU_ARM1020)
# ifdef _USER # ifdef _USER
# define MULTI_USER 1 # define MULTI_USER 1
# else # else
...@@ -70,7 +68,7 @@ ...@@ -70,7 +68,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_SA1100) #ifdef CONFIG_CPU_SA1100
# ifdef _USER # ifdef _USER
# define MULTI_USER 1 # define MULTI_USER 1
# else # else
...@@ -78,7 +76,7 @@ ...@@ -78,7 +76,7 @@
# endif # endif
#endif #endif
#if defined(CONFIG_CPU_XSCALE) #ifdef CONFIG_CPU_XSCALE
# ifdef _USER # ifdef _USER
# define MULTI_USER 1 # define MULTI_USER 1
# else # else
......
...@@ -106,6 +106,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); ...@@ -106,6 +106,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
/* /*
* - extended small page/tiny page * - extended small page/tiny page
*/ */
#define PTE_EXT_AP_MASK (3 << 4)
#define PTE_EXT_AP_UNO_SRO (0 << 4) #define PTE_EXT_AP_UNO_SRO (0 << 4)
#define PTE_EXT_AP_UNO_SRW (1 << 4) #define PTE_EXT_AP_UNO_SRW (1 << 4)
#define PTE_EXT_AP_URO_SRW (2 << 4) #define PTE_EXT_AP_URO_SRW (2 << 4)
...@@ -115,12 +116,11 @@ extern void __pgd_error(const char *file, int line, unsigned long val); ...@@ -115,12 +116,11 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
/* /*
* - small page * - small page
*/ */
#define PTE_SMALL_AP_MASK (0xff << 4)
#define PTE_SMALL_AP_UNO_SRO (0x00 << 4) #define PTE_SMALL_AP_UNO_SRO (0x00 << 4)
#define PTE_SMALL_AP_UNO_SRW (0x55 << 4) #define PTE_SMALL_AP_UNO_SRW (0x55 << 4)
#define PTE_SMALL_AP_URO_SRW (0xaa << 4) #define PTE_SMALL_AP_URO_SRW (0xaa << 4)
#define PTE_SMALL_AP_URW_SRW (0xff << 4) #define PTE_SMALL_AP_URW_SRW (0xff << 4)
#define PTE_AP_READ PTE_SMALL_AP_URO_SRW
#define PTE_AP_WRITE PTE_SMALL_AP_UNO_SRW
/* /*
* "Linux" PTE definitions. * "Linux" PTE definitions.
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
*/ */
#ifdef CONFIG_CPU_32 #ifdef CONFIG_CPU_32
# define CPU_INCLUDE_NAME "asm/cpu-multi32.h"
# ifdef CONFIG_CPU_ARM610 # ifdef CONFIG_CPU_ARM610
# ifdef CPU_NAME # ifdef CPU_NAME
# undef MULTI_CPU # undef MULTI_CPU
...@@ -99,6 +98,30 @@ ...@@ -99,6 +98,30 @@
# define CPU_NAME cpu_arm1020 # define CPU_NAME cpu_arm1020
# endif # endif
# endif # endif
# ifdef CONFIG_CPU_ARM1020E
# ifdef CPU_NAME
# undef MULTI_CPU
# define MULTI_CPU
# else
# define CPU_NAME cpu_arm1020e
# endif
# endif
# ifdef CONFIG_CPU_ARM1022
# ifdef CPU_NAME
# undef MULTI_CPU
# define MULTI_CPU
# else
# define CPU_NAME cpu_arm1022
# endif
# endif
# ifdef CONFIG_CPU_ARM1026
# ifdef CPU_NAME
# undef MULTI_CPU
# define MULTI_CPU
# else
# define CPU_NAME cpu_arm1026
# endif
# endif
# ifdef CONFIG_CPU_XSCALE # ifdef CONFIG_CPU_XSCALE
# ifdef CPU_NAME # ifdef CPU_NAME
# undef MULTI_CPU # undef MULTI_CPU
...@@ -110,11 +133,10 @@ ...@@ -110,11 +133,10 @@
#endif #endif
#ifndef MULTI_CPU #ifndef MULTI_CPU
#undef CPU_INCLUDE_NAME #include "asm/cpu-single.h"
#define CPU_INCLUDE_NAME "asm/cpu-single.h" #else
#include "asm/cpu-multi32.h"
#endif #endif
#include CPU_INCLUDE_NAME
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASM_PROCFNS_H */ #endif /* __ASM_PROCFNS_H */
...@@ -25,6 +25,8 @@ extern void * memchr(const void *, int, __kernel_size_t); ...@@ -25,6 +25,8 @@ extern void * memchr(const void *, int, __kernel_size_t);
#define __HAVE_ARCH_MEMSET #define __HAVE_ARCH_MEMSET
extern void * memset(void *, int, __kernel_size_t); extern void * memset(void *, int, __kernel_size_t);
#define __HAVE_ARCH_BCOPY
extern void __memzero(void *ptr, __kernel_size_t n); extern void __memzero(void *ptr, __kernel_size_t n);
#define memset(p,v,n) \ #define memset(p,v,n) \
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define CR_DT (1 << 16) #define CR_DT (1 << 16)
#define CR_IT (1 << 18) #define CR_IT (1 << 18)
#define CR_ST (1 << 19) #define CR_ST (1 << 19)
#define CR_FI (1 << 21) #define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */
#define CR_U (1 << 22) /* Unaligned access operation */ #define CR_U (1 << 22) /* Unaligned access operation */
#define CR_XP (1 << 23) /* Extended page tables */ #define CR_XP (1 << 23) /* Extended page tables */
#define CR_VE (1 << 24) /* Vectored interrupts */ #define CR_VE (1 << 24) /* Vectored interrupts */
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE) #define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE)
#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) #ifdef CONFIG_CPU_TLB_V3
# define v3_possible_flags v3_tlb_flags # define v3_possible_flags v3_tlb_flags
# define v3_always_flags v3_tlb_flags # define v3_always_flags v3_tlb_flags
# ifdef _TLB # ifdef _TLB
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE) #define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE)
#if defined(CONFIG_CPU_ARM720T) #ifdef CONFIG_CPU_TLB_V4WT
# define v4_possible_flags v4_tlb_flags # define v4_possible_flags v4_tlb_flags
# define v4_always_flags v4_tlb_flags # define v4_always_flags v4_tlb_flags
# ifdef _TLB # ifdef _TLB
...@@ -84,9 +84,7 @@ ...@@ -84,9 +84,7 @@
TLB_V4_I_FULL | TLB_V4_D_FULL | \ TLB_V4_I_FULL | TLB_V4_D_FULL | \
TLB_V4_I_PAGE | TLB_V4_D_PAGE) TLB_V4_I_PAGE | TLB_V4_D_PAGE)
#if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ #ifdef CONFIG_CPU_TLB_V4WBI
defined(CONFIG_CPU_ARM926T) || defined(CONFIG_CPU_ARM1020) || \
defined(CONFIG_CPU_XSCALE)
# define v4wbi_possible_flags v4wbi_tlb_flags # define v4wbi_possible_flags v4wbi_tlb_flags
# define v4wbi_always_flags v4wbi_tlb_flags # define v4wbi_always_flags v4wbi_tlb_flags
# ifdef _TLB # ifdef _TLB
...@@ -103,7 +101,7 @@ ...@@ -103,7 +101,7 @@
TLB_V4_I_FULL | TLB_V4_D_FULL | \ TLB_V4_I_FULL | TLB_V4_D_FULL | \
TLB_V4_D_PAGE) TLB_V4_D_PAGE)
#if defined(CONFIG_CPU_SA110) || defined(CONFIG_CPU_SA1100) #ifdef CONFIG_CPU_TLB_V4WB
# define v4wb_possible_flags v4wb_tlb_flags # define v4wb_possible_flags v4wb_tlb_flags
# define v4wb_always_flags v4wb_tlb_flags # define v4wb_always_flags v4wb_tlb_flags
# ifdef _TLB # ifdef _TLB
...@@ -121,7 +119,7 @@ ...@@ -121,7 +119,7 @@
TLB_V6_I_PAGE | TLB_V6_D_PAGE | \ TLB_V6_I_PAGE | TLB_V6_D_PAGE | \
TLB_V6_I_ASID | TLB_V6_D_ASID) TLB_V6_I_ASID | TLB_V6_D_ASID)
#if defined(CONFIG_CPU_V6) #ifdef CONFIG_CPU_TLB_V6
# define v6wbi_possible_flags v6wbi_tlb_flags # define v6wbi_possible_flags v6wbi_tlb_flags
# define v6wbi_always_flags v6wbi_tlb_flags # define v6wbi_always_flags v6wbi_tlb_flags
# ifdef _TLB # ifdef _TLB
......
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