Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201698
b: refs/heads/master
c: 7b70c42
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Jul 31, 2010
1 parent 25b935b commit 96e2667
Show file tree
Hide file tree
Showing 297 changed files with 4,887 additions and 3,097 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a20df564d15bd28e3df24e1c65b885bd74d23f17
refs/heads/master: 7b70c4275f28702b76b273c8534c38f8313812e9
8 changes: 7 additions & 1 deletion trunk/Documentation/arm/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ ffff0000 ffff0fff CPU vector page.

fffe0000 fffeffff XScale cache flush area. This is used
in proc-xscale.S to flush the whole data
cache. Free for other usage on non-XScale.
cache. (XScale does not have TCM.)

fffe8000 fffeffff DTCM mapping area for platforms with
DTCM mounted inside the CPU.

fffe0000 fffe7fff ITCM mapping area for platforms with
ITCM mounted inside the CPU.

fff00000 fffdffff Fixmap mapping region. Addresses provided
by fix_to_virt() will be located here.
Expand Down
30 changes: 19 additions & 11 deletions trunk/Documentation/arm/tcm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ defines a CPUID_TCM register that you can read out from the
system control coprocessor. Documentation from ARM can be found
at http://infocenter.arm.com, search for "TCM Status Register"
to see documents for all CPUs. Reading this register you can
determine if ITCM (bit 0) and/or DTCM (bit 16) is present in the
machine.
determine if ITCM (bits 1-0) and/or DTCM (bit 17-16) is present
in the machine.

There is further a TCM region register (search for "TCM Region
Registers" at the ARM site) that can report and modify the location
Expand All @@ -35,7 +35,15 @@ The TCM memory can then be remapped to another address again using
the MMU, but notice that the TCM if often used in situations where
the MMU is turned off. To avoid confusion the current Linux
implementation will map the TCM 1 to 1 from physical to virtual
memory in the location specified by the machine.
memory in the location specified by the kernel. Currently Linux
will map ITCM to 0xfffe0000 and on, and DTCM to 0xfffe8000 and
on, supporting a maximum of 32KiB of ITCM and 32KiB of DTCM.

Newer versions of the region registers also support dividing these
TCMs in two separate banks, so for example an 8KiB ITCM is divided
into two 4KiB banks with its own control registers. The idea is to
be able to lock and hide one of the banks for use by the secure
world (TrustZone).

TCM is used for a few things:

Expand Down Expand Up @@ -65,18 +73,18 @@ in <asm/tcm.h>. Using this interface it is possible to:
memory. Such a heap is great for things like saving
device state when shutting off device power domains.

A machine that has TCM memory shall select HAVE_TCM in
arch/arm/Kconfig for itself, and then the
rest of the functionality will depend on the physical
location and size of ITCM and DTCM to be defined in
mach/memory.h for the machine. Code that needs to use
TCM shall #include <asm/tcm.h> If the TCM is not located
at the place given in memory.h it will be moved using
the TCM Region registers.
A machine that has TCM memory shall select HAVE_TCM from
arch/arm/Kconfig for itself. Code that needs to use TCM shall
#include <asm/tcm.h>

Functions to go into itcm can be tagged like this:
int __tcmfunc foo(int bar);

Since these are marked to become long_calls and you may want
to have functions called locally inside the TCM without
wasting space, there is also the __tcmlocalfunc prefix that
will make the call relative.

Variables to go into dtcm can be tagged like this:
int __tcmdata foo;

Expand Down
69 changes: 33 additions & 36 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config ARM
default y
select HAVE_AOUT
select HAVE_IDE
select HAVE_MEMBLOCK
select RTC_LIB
select SYS_SUPPORTS_APM_EMULATION
select GENERIC_ATOMIC64 if (!CPU_32v6K)
Expand All @@ -24,6 +25,7 @@ config ARM
select HAVE_KERNEL_LZMA
select HAVE_PERF_EVENTS
select PERF_USE_VMALLOC
select HAVE_REGS_AND_STACK_ACCESS_API
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
Expand Down Expand Up @@ -55,7 +57,7 @@ config GENERIC_CLOCKEVENTS
config GENERIC_CLOCKEVENTS_BROADCAST
bool
depends on GENERIC_CLOCKEVENTS
default y if SMP && !LOCAL_TIMERS
default y if SMP

config HAVE_TCM
bool
Expand Down Expand Up @@ -440,21 +442,6 @@ config ARCH_IXP4XX
help
Support for Intel's IXP4XX (XScale) family of processors.

config ARCH_L7200
bool "LinkUp-L7200"
select CPU_ARM720T
select FIQ
select ARCH_USES_GETTIMEOFFSET
help
Say Y here if you intend to run this kernel on a LinkUp Systems
L7200 Software Development Board which uses an ARM720T processor.
Information on this board can be obtained at:

<http://www.linkupsys.com/>

If you have any questions or comments about the Linux kernel port
to this board, send e-mail to <sjhill@cotw.com>.

config ARCH_DOVE
bool "Marvell Dove"
select PCI
Expand Down Expand Up @@ -734,7 +721,6 @@ config ARCH_SHARK
config ARCH_LH7A40X
bool "Sharp LH7A40X"
select CPU_ARM922T
select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM
select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM
select ARCH_USES_GETTIMEOFFSET
help
Expand Down Expand Up @@ -1048,11 +1034,6 @@ endmenu

source "arch/arm/common/Kconfig"

config FORCE_MAX_ZONEORDER
int
depends on SA1111
default "9"

menu "Bus support"

config ARM_AMBA
Expand Down Expand Up @@ -1189,9 +1170,10 @@ config HOTPLUG_CPU
config LOCAL_TIMERS
bool "Use local timer interrupts"
depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \
REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500)
REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
default y
select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500)
select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_VEXPRESS || ARCH_OMAP4 || ARCH_U8500)
help
Enable support for local timers on SMP platforms, rather then the
legacy IPI broadcast method. Local timers allows the system
Expand All @@ -1202,10 +1184,10 @@ source kernel/Kconfig.preempt

config HZ
int
default 128 if ARCH_L7200
default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
default AT91_TIMER_HZ if ARCH_AT91
default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE
default 100

config THUMB2_KERNEL
Expand Down Expand Up @@ -1258,24 +1240,14 @@ config OABI_COMPAT
config ARCH_HAS_HOLES_MEMORYMODEL
bool

# Discontigmem is deprecated
config ARCH_DISCONTIGMEM_ENABLE
bool

config ARCH_SPARSEMEM_ENABLE
bool

config ARCH_SPARSEMEM_DEFAULT
def_bool ARCH_SPARSEMEM_ENABLE

config ARCH_SELECT_MEMORY_MODEL
def_bool ARCH_DISCONTIGMEM_ENABLE && ARCH_SPARSEMEM_ENABLE

config NODES_SHIFT
int
default "4" if ARCH_LH7A40X
default "2"
depends on NEED_MULTIPLE_NODES
def_bool ARCH_SPARSEMEM_ENABLE

config HIGHMEM
bool "High Memory Support (EXPERIMENTAL)"
Expand Down Expand Up @@ -1307,8 +1279,33 @@ config HW_PERF_EVENTS
Enable hardware performance counter support for perf events. If
disabled, perf events will use software events only.

config SPARSE_IRQ
def_bool n
help
This enables support for sparse irqs. This is useful in general
as most CPUs have a fairly sparse array of IRQ vectors, which
the irq_desc then maps directly on to. Systems with a high
number of off-chip IRQs will want to treat this as
experimental until they have been independently verified.

source "mm/Kconfig"

config FORCE_MAX_ZONEORDER
int "Maximum zone order" if ARCH_SHMOBILE
range 11 64 if ARCH_SHMOBILE
default "9" if SA1111
default "11"
help
The kernel memory allocator divides physically contiguous memory
blocks into "zones", where each zone is a power of two number of
pages. This option selects the largest power of two that the kernel
keeps in the memory allocator. If you need to allocate very large
blocks of physically contiguous memory, then you may need to
increase this value.

This config option is actually maximum order plus one. For example,
a value of 11 means that the largest free memory block is 2^10 pages.

config LEDS
bool "Timer and CPU usage LEDs"
depends on ARCH_CDB89712 || ARCH_EBSA110 || \
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
machine-$(CONFIG_ARCH_KS8695) := ks8695
machine-$(CONFIG_ARCH_L7200) := l7200
machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
machine-$(CONFIG_ARCH_LOKI) := loki
machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/arm/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y)
OBJS += head-shark.o ofw-shark.o
endif

ifeq ($(CONFIG_ARCH_L7200),y)
OBJS += head-l7200.o
endif

ifeq ($(CONFIG_ARCH_P720T),y)
# Borrow this code from SA1100
OBJS += head-sa1100.o
Expand Down
29 changes: 0 additions & 29 deletions trunk/arch/arm/boot/compressed/head-l7200.S

This file was deleted.

46 changes: 46 additions & 0 deletions trunk/arch/arm/common/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,51 @@ static void gic_unmask_irq(unsigned int irq)
spin_unlock(&irq_controller_lock);
}

static int gic_set_type(unsigned int irq, unsigned int type)
{
void __iomem *base = gic_dist_base(irq);
unsigned int gicirq = gic_irq(irq);
u32 enablemask = 1 << (gicirq % 32);
u32 enableoff = (gicirq / 32) * 4;
u32 confmask = 0x2 << ((gicirq % 16) * 2);
u32 confoff = (gicirq / 16) * 4;
bool enabled = false;
u32 val;

/* Interrupt configuration for SGIs can't be changed */
if (gicirq < 16)
return -EINVAL;

if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING)
return -EINVAL;

spin_lock(&irq_controller_lock);

val = readl(base + GIC_DIST_CONFIG + confoff);
if (type == IRQ_TYPE_LEVEL_HIGH)
val &= ~confmask;
else if (type == IRQ_TYPE_EDGE_RISING)
val |= confmask;

/*
* As recommended by the spec, disable the interrupt before changing
* the configuration
*/
if (readl(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) {
writel(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff);
enabled = true;
}

writel(val, base + GIC_DIST_CONFIG + confoff);

if (enabled)
writel(enablemask, base + GIC_DIST_ENABLE_SET + enableoff);

spin_unlock(&irq_controller_lock);

return 0;
}

#ifdef CONFIG_SMP
static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val)
{
Expand Down Expand Up @@ -161,6 +206,7 @@ static struct irq_chip gic_chip = {
.ack = gic_ack_irq,
.mask = gic_mask_irq,
.unmask = gic_unmask_irq,
.set_type = gic_set_type,
#ifdef CONFIG_SMP
.set_affinity = gic_set_cpu,
#endif
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/arm/common/sa1111.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,10 @@ static struct sa1111_dev_info sa1111_devices[] = {
},
};

void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes)
void __init sa1111_adjust_zones(unsigned long *size, unsigned long *holes)
{
unsigned int sz = SZ_1M >> PAGE_SHIFT;

if (node != 0)
sz = 0;

size[1] = size[0] - sz;
size[0] = sz;
}
Expand Down
23 changes: 0 additions & 23 deletions trunk/arch/arm/configs/lusl7200_defconfig

This file was deleted.

1 change: 1 addition & 0 deletions trunk/arch/arm/include/asm/hwcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define HWCAP_NEON 4096
#define HWCAP_VFPv3 8192
#define HWCAP_VFPv3D16 16384
#define HWCAP_TLS 32768

#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#define irq_canonicalize(i) (i)
#endif

#define NR_IRQS_LEGACY 16

/*
* Use this value to indicate lack of interrupt
* capability
Expand Down
Loading

0 comments on commit 96e2667

Please sign in to comment.