Commit ebdea46f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (130 commits)
  [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms
  [ARM] 3855/1: Add generic time support
  [ARM] 3873/1: S3C24XX: Add irq_chip names
  [ARM] 3872/1: S3C24XX: Apply consistant tabbing to irq_chips
  [ARM] 3871/1: S3C24XX: Fix ordering of EINT4..23
  [ARM] nommu: confirms the CR_V bit in nommu mode
  [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores.
  [ARM] 3870/1: AT91: Start removing static memory mappings
  [ARM] 3869/1: AT91: NAND support for DK and KB9202 boards
  [ARM] 3868/1: AT91 hardware header update
  [ARM] 3867/1: AT91 GPIO update
  [ARM] 3866/1: AT91 clock update
  [ARM] 3865/1: AT91RM9200 header updates
  [ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series
  [ARM] kthread: switch arch/arm/kernel/apm.c
  [ARM] Off-by-one in arch/arm/common/icst*
  [ARM] 3864/1: Refactore sharpsl_pm
  [ARM] 3863/1: Add Locomo SPI Device
  [ARM] 3847/2:  Convert LOMOMO to use struct device for GPIOs
  [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h
  ...
parents fecf3404 250d375d
...@@ -17,6 +17,10 @@ config ARM ...@@ -17,6 +17,10 @@ config ARM
Europe. There is an ARM Linux project with a web page at Europe. There is an ARM Linux project with a web page at
<http://www.arm.linux.org.uk/>. <http://www.arm.linux.org.uk/>.
config GENERIC_TIME
bool
default n
config MMU config MMU
bool bool
default y default y
...@@ -51,6 +55,10 @@ config GENERIC_HARDIRQS ...@@ -51,6 +55,10 @@ config GENERIC_HARDIRQS
bool bool
default y default y
config TRACE_IRQFLAGS_SUPPORT
bool
default y
config HARDIRQS_SW_RESEND config HARDIRQS_SW_RESEND
bool bool
default y default y
...@@ -91,7 +99,7 @@ config ARCH_MTD_XIP ...@@ -91,7 +99,7 @@ config ARCH_MTD_XIP
config VECTORS_BASE config VECTORS_BASE
hex hex
default 0xffff0000 if MMU default 0xffff0000 if MMU || CPU_HIGH_VECTOR
default DRAM_BASE if REMAP_VECTORS_TO_RAM default DRAM_BASE if REMAP_VECTORS_TO_RAM
default 0x00000000 default 0x00000000
help help
...@@ -198,16 +206,27 @@ config ARCH_IMX ...@@ -198,16 +206,27 @@ config ARCH_IMX
help help
Support for Motorola's i.MX family of processors (MX1, MXL). Support for Motorola's i.MX family of processors (MX1, MXL).
config ARCH_IOP3XX config ARCH_IOP32X
bool "IOP3xx-based" bool "IOP32x-based"
depends on MMU
select PLAT_IOP
select PCI
help
Support for Intel's 80219 and IOP32X (XScale) family of
processors.
config ARCH_IOP33X
bool "IOP33x-based"
depends on MMU depends on MMU
select PLAT_IOP
select PCI select PCI
help help
Support for Intel's IOP3XX (XScale) family of processors. Support for Intel's IOP33X (XScale) family of processors.
config ARCH_IXP4XX config ARCH_IXP4XX
bool "IXP4xx-based" bool "IXP4xx-based"
depends on MMU depends on MMU
select GENERIC_TIME
help help
Support for Intel's IXP4XX (XScale) family of processors. Support for Intel's IXP4XX (XScale) family of processors.
...@@ -308,7 +327,9 @@ source "arch/arm/mach-footbridge/Kconfig" ...@@ -308,7 +327,9 @@ source "arch/arm/mach-footbridge/Kconfig"
source "arch/arm/mach-integrator/Kconfig" source "arch/arm/mach-integrator/Kconfig"
source "arch/arm/mach-iop3xx/Kconfig" source "arch/arm/mach-iop32x/Kconfig"
source "arch/arm/mach-iop33x/Kconfig"
source "arch/arm/mach-ixp4xx/Kconfig" source "arch/arm/mach-ixp4xx/Kconfig"
...@@ -348,6 +369,9 @@ source "arch/arm/mach-netx/Kconfig" ...@@ -348,6 +369,9 @@ source "arch/arm/mach-netx/Kconfig"
config ARCH_ACORN config ARCH_ACORN
bool bool
config PLAT_IOP
bool
source arch/arm/mm/Kconfig source arch/arm/mm/Kconfig
# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER # bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER
...@@ -602,6 +626,7 @@ config LEDS_CPU ...@@ -602,6 +626,7 @@ config LEDS_CPU
config ALIGNMENT_TRAP config ALIGNMENT_TRAP
bool bool
depends on CPU_CP15_MMU
default y if !ARCH_EBSA110 default y if !ARCH_EBSA110
help help
ARM processors can not fetch/store information which is not ARM processors can not fetch/store information which is not
...@@ -633,11 +658,12 @@ config ZBOOT_ROM_BSS ...@@ -633,11 +658,12 @@ config ZBOOT_ROM_BSS
hex "Compressed ROM boot loader BSS address" hex "Compressed ROM boot loader BSS address"
default "0" default "0"
help help
The base address of 64KiB of read/write memory in the target The base address of an area of read/write memory in the target
for the ROM-able zImage, which must be available while the for the ROM-able zImage which must be available while the
decompressor is running. Platforms which normally make use of decompressor is running. It must be large enough to hold the
ROM-able zImage formats normally set this to a suitable entire decompressed kernel plus an additional 128 KiB.
value in their defconfig file. Platforms which normally make use of ROM-able zImage formats
normally set this to a suitable value in their defconfig file.
If ZBOOT_ROM is not enabled, this has no effect. If ZBOOT_ROM is not enabled, this has no effect.
...@@ -832,7 +858,7 @@ source "drivers/base/Kconfig" ...@@ -832,7 +858,7 @@ source "drivers/base/Kconfig"
source "drivers/connector/Kconfig" source "drivers/connector/Kconfig"
if ALIGNMENT_TRAP if ALIGNMENT_TRAP || !CPU_CP15_MMU
source "drivers/mtd/Kconfig" source "drivers/mtd/Kconfig"
endif endif
...@@ -844,7 +870,7 @@ source "drivers/block/Kconfig" ...@@ -844,7 +870,7 @@ source "drivers/block/Kconfig"
source "drivers/acorn/block/Kconfig" source "drivers/acorn/block/Kconfig"
if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ if PCMCIA || ARCH_CLPS7500 || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX \
|| ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \ || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \
|| ARCH_IXP23XX || ARCH_IXP23XX
......
...@@ -25,6 +25,14 @@ config FLASH_SIZE ...@@ -25,6 +25,14 @@ config FLASH_SIZE
hex 'FLASH Size' if SET_MEM_PARAM hex 'FLASH Size' if SET_MEM_PARAM
default 0x00400000 default 0x00400000
config PROCESSOR_ID
hex
default 0x00007700
depends on !CPU_CP15
help
If processor has no CP15 register, this processor ID is
used instead of the auto-probing which utilizes the register.
config REMAP_VECTORS_TO_RAM config REMAP_VECTORS_TO_RAM
bool 'Install vectors to the begining of RAM' if DRAM_BASE bool 'Install vectors to the begining of RAM' if DRAM_BASE
depends on DRAM_BASE depends on DRAM_BASE
......
...@@ -55,7 +55,12 @@ arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 ...@@ -55,7 +55,12 @@ arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3
# This selects how we optimise for the processor. # This selects how we optimise for the processor.
tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610
tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710
tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi
tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi
tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi
tune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_ARM946T) :=$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi)
tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi
...@@ -101,7 +106,8 @@ endif ...@@ -101,7 +106,8 @@ endif
machine-$(CONFIG_ARCH_INTEGRATOR) := integrator machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
machine-$(CONFIG_ARCH_CLPS711X) := clps711x machine-$(CONFIG_ARCH_CLPS711X) := clps711x
machine-$(CONFIG_ARCH_IOP3XX) := iop3xx machine-$(CONFIG_ARCH_IOP32X) := iop32x
machine-$(CONFIG_ARCH_IOP33X) := iop33x
machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
machine-$(CONFIG_ARCH_IXP2000) := ixp2000 machine-$(CONFIG_ARCH_IXP2000) := ixp2000
machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
...@@ -157,6 +163,7 @@ core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) ...@@ -157,6 +163,7 @@ core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
core-$(CONFIG_VFP) += arch/arm/vfp/ core-$(CONFIG_VFP) += arch/arm/vfp/
# If we have a common platform directory, then include it in the build. # If we have a common platform directory, then include it in the build.
core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/
core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
......
...@@ -51,7 +51,11 @@ OBJS += head-at91rm9200.o ...@@ -51,7 +51,11 @@ OBJS += head-at91rm9200.o
endif endif
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
ifeq ($(CONFIG_CPU_CP15),y)
OBJS += big-endian.o OBJS += big-endian.o
else
# The endian should be set by h/w design.
endif
endif endif
# #
......
...@@ -20,11 +20,21 @@ ...@@ -20,11 +20,21 @@
#ifdef DEBUG #ifdef DEBUG
#if defined(CONFIG_DEBUG_ICEDCC) #if defined(CONFIG_DEBUG_ICEDCC)
#ifdef CONFIG_CPU_V6
.macro loadsp, rb
.endm
.macro writeb, ch, rb
mcr p14, 0, \ch, c0, c5, 0
.endm
#else
.macro loadsp, rb .macro loadsp, rb
.endm .endm
.macro writeb, ch, rb .macro writeb, ch, rb
mcr p14, 0, \ch, c0, c1, 0 mcr p14, 0, \ch, c0, c1, 0
.endm .endm
#endif
#else #else
#include <asm/arch/debug-macro.S> #include <asm/arch/debug-macro.S>
...@@ -42,12 +52,6 @@ ...@@ -42,12 +52,6 @@
add \rb, \rb, #0x00010000 @ Ser1 add \rb, \rb, #0x00010000 @ Ser1
#endif #endif
.endm .endm
#elif defined(CONFIG_ARCH_IOP331)
.macro loadsp, rb
mov \rb, #0xff000000
orr \rb, \rb, #0x00ff0000
orr \rb, \rb, #0x0000f700 @ location of the UART
.endm
#elif defined(CONFIG_ARCH_S3C2410) #elif defined(CONFIG_ARCH_S3C2410)
.macro loadsp, rb .macro loadsp, rb
mov \rb, #0x50000000 mov \rb, #0x50000000
...@@ -78,9 +82,11 @@ ...@@ -78,9 +82,11 @@
kphex r6, 8 /* processor id */ kphex r6, 8 /* processor id */
kputc #':' kputc #':'
kphex r7, 8 /* architecture id */ kphex r7, 8 /* architecture id */
#ifdef CONFIG_CPU_CP15
kputc #':' kputc #':'
mrc p15, 0, r0, c1, c0 mrc p15, 0, r0, c1, c0
kphex r0, 8 /* control reg */ kphex r0, 8 /* control reg */
#endif
kputc #'\n' kputc #'\n'
kphex r5, 8 /* decompressed kernel start */ kphex r5, 8 /* decompressed kernel start */
kputc #'-' kputc #'-'
...@@ -503,7 +509,11 @@ call_kernel: bl cache_clean_flush ...@@ -503,7 +509,11 @@ call_kernel: bl cache_clean_flush
*/ */
call_cache_fn: adr r12, proc_types call_cache_fn: adr r12, proc_types
#ifdef CONFIG_CPU_CP15
mrc p15, 0, r6, c0, c0 @ get processor ID mrc p15, 0, r6, c0, c0 @ get processor ID
#else
ldr r6, =CONFIG_PROCESSOR_ID
#endif
1: ldr r1, [r12, #0] @ get value 1: ldr r1, [r12, #0] @ get value
ldr r2, [r12, #4] @ get mask ldr r2, [r12, #4] @ get mask
eor r1, r1, r6 @ (real ^ match) eor r1, r1, r6 @ (real ^ match)
......
...@@ -30,6 +30,25 @@ static void putstr(const char *ptr); ...@@ -30,6 +30,25 @@ static void putstr(const char *ptr);
#include <asm/arch/uncompress.h> #include <asm/arch/uncompress.h>
#ifdef CONFIG_DEBUG_ICEDCC #ifdef CONFIG_DEBUG_ICEDCC
#ifdef CONFIG_CPU_V6
static void icedcc_putc(int ch)
{
int status, i = 0x4000000;
do {
if (--i < 0)
return;
asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
} while (status & (1 << 29));
asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
}
#else
static void icedcc_putc(int ch) static void icedcc_putc(int ch)
{ {
int status, i = 0x4000000; int status, i = 0x4000000;
...@@ -44,6 +63,8 @@ static void icedcc_putc(int ch) ...@@ -44,6 +63,8 @@ static void icedcc_putc(int ch)
asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
} }
#endif
#define putc(ch) icedcc_putc(ch) #define putc(ch) icedcc_putc(ch)
#define flush() do { } while (0) #define flush() do { } while (0)
#endif #endif
......
...@@ -57,7 +57,7 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq) ...@@ -57,7 +57,7 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq)
break; break;
} while (i < ARRAY_SIZE(idx2s)); } while (i < ARRAY_SIZE(idx2s));
if (i > ARRAY_SIZE(idx2s)) if (i >= ARRAY_SIZE(idx2s))
return vco; return vco;
vco.s = idx2s[i]; vco.s = idx2s[i];
...@@ -119,7 +119,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period) ...@@ -119,7 +119,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period)
break; break;
} while (i < ARRAY_SIZE(idx2s)); } while (i < ARRAY_SIZE(idx2s));
if (i > ARRAY_SIZE(idx2s)) if (i >= ARRAY_SIZE(idx2s))
return vco; return vco;
vco.s = idx2s[i]; vco.s = idx2s[i];
......
...@@ -55,7 +55,7 @@ icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq) ...@@ -55,7 +55,7 @@ icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq)
break; break;
} while (i < ARRAY_SIZE(idx2s)); } while (i < ARRAY_SIZE(idx2s));
if (i > ARRAY_SIZE(idx2s)) if (i >= ARRAY_SIZE(idx2s))
return vco; return vco;
vco.s = idx2s[i]; vco.s = idx2s[i];
...@@ -118,7 +118,7 @@ icst525_ps_to_vco(const struct icst525_params *p, unsigned long period) ...@@ -118,7 +118,7 @@ icst525_ps_to_vco(const struct icst525_params *p, unsigned long period)
break; break;
} while (i < ARRAY_SIZE(idx2s)); } while (i < ARRAY_SIZE(idx2s));
if (i > ARRAY_SIZE(idx2s)) if (i >= ARRAY_SIZE(idx2s))
return vco; return vco;
vco.s = idx2s[i]; vco.s = idx2s[i];
......
...@@ -121,6 +121,13 @@ static struct locomo_dev_info locomo_devices[] = { ...@@ -121,6 +121,13 @@ static struct locomo_dev_info locomo_devices[] = {
.offset = 0, .offset = 0,
.length = 0, .length = 0,
}, },
{
.devid = LOCOMO_DEVID_SPI,
.irq = {},
.name = "locomo-spi",
.offset = LOCOMO_SPI,
.length = 0x30,
},
}; };
...@@ -374,7 +381,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, ...@@ -374,7 +381,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc,
struct irqdesc *d; struct irqdesc *d;
void __iomem *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F; req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F;
if (req) { if (req) {
irq = LOCOMO_IRQ_SPI_START; irq = LOCOMO_IRQ_SPI_START;
d = irq_desc + irq; d = irq_desc + irq;
...@@ -391,35 +398,35 @@ static void locomo_spi_ack_irq(unsigned int irq) ...@@ -391,35 +398,35 @@ static void locomo_spi_ack_irq(unsigned int irq)
{ {
void __iomem *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIWE); r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIWE);
r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
locomo_writel(r, mapbase + LOCOMO_SPIWE); locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIWE);
r = locomo_readl(mapbase + LOCOMO_SPIIS); r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIS);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START));
locomo_writel(r, mapbase + LOCOMO_SPIIS); locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIIS);
r = locomo_readl(mapbase + LOCOMO_SPIWE); r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIWE);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START));
locomo_writel(r, mapbase + LOCOMO_SPIWE); locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIWE);
} }
static void locomo_spi_mask_irq(unsigned int irq) static void locomo_spi_mask_irq(unsigned int irq)
{ {
void __iomem *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIIE); r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIE);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START));
locomo_writel(r, mapbase + LOCOMO_SPIIE); locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIIE);
} }
static void locomo_spi_unmask_irq(unsigned int irq) static void locomo_spi_unmask_irq(unsigned int irq)
{ {
void __iomem *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIIE); r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIE);
r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
locomo_writel(r, mapbase + LOCOMO_SPIIE); locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIIE);
} }
static struct irq_chip locomo_spi_chip = { static struct irq_chip locomo_spi_chip = {
...@@ -814,12 +821,15 @@ static inline struct locomo *locomo_chip_driver(struct locomo_dev *ldev) ...@@ -814,12 +821,15 @@ static inline struct locomo *locomo_chip_driver(struct locomo_dev *ldev)
return (struct locomo *)dev_get_drvdata(ldev->dev.parent); return (struct locomo *)dev_get_drvdata(ldev->dev.parent);
} }
void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned int dir) void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir)
{ {
struct locomo *lchip = locomo_chip_driver(ldev); struct locomo *lchip = dev_get_drvdata(dev);
unsigned long flags; unsigned long flags;
unsigned int r; unsigned int r;
if (!lchip)
return;
spin_lock_irqsave(&lchip->lock, flags); spin_lock_irqsave(&lchip->lock, flags);
r = locomo_readl(lchip->base + LOCOMO_GPD); r = locomo_readl(lchip->base + LOCOMO_GPD);
...@@ -836,12 +846,15 @@ void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned in ...@@ -836,12 +846,15 @@ void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned in
spin_unlock_irqrestore(&lchip->lock, flags); spin_unlock_irqrestore(&lchip->lock, flags);
} }
unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits) int locomo_gpio_read_level(struct device *dev, unsigned int bits)
{ {
struct locomo *lchip = locomo_chip_driver(ldev); struct locomo *lchip = dev_get_drvdata(dev);
unsigned long flags; unsigned long flags;
unsigned int ret; unsigned int ret;
if (!lchip)
return -ENODEV;
spin_lock_irqsave(&lchip->lock, flags); spin_lock_irqsave(&lchip->lock, flags);
ret = locomo_readl(lchip->base + LOCOMO_GPL); ret = locomo_readl(lchip->base + LOCOMO_GPL);
spin_unlock_irqrestore(&lchip->lock, flags); spin_unlock_irqrestore(&lchip->lock, flags);
...@@ -850,12 +863,15 @@ unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits) ...@@ -850,12 +863,15 @@ unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits)
return ret; return ret;
} }
unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits) int locomo_gpio_read_output(struct device *dev, unsigned int bits)
{ {
struct locomo *lchip = locomo_chip_driver(ldev); struct locomo *lchip = dev_get_drvdata(dev);
unsigned long flags; unsigned long flags;
unsigned int ret; unsigned int ret;
if (!lchip)
return -ENODEV;
spin_lock_irqsave(&lchip->lock, flags); spin_lock_irqsave(&lchip->lock, flags);
ret = locomo_readl(lchip->base + LOCOMO_GPO); ret = locomo_readl(lchip->base + LOCOMO_GPO);
spin_unlock_irqrestore(&lchip->lock, flags); spin_unlock_irqrestore(&lchip->lock, flags);
...@@ -864,12 +880,15 @@ unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits) ...@@ -864,12 +880,15 @@ unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits)
return ret; return ret;
} }
void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int set) void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set)
{ {
struct locomo *lchip = locomo_chip_driver(ldev); struct locomo *lchip = dev_get_drvdata(dev);
unsigned long flags; unsigned long flags;
unsigned int r; unsigned int r;
if (!lchip)
return;
spin_lock_irqsave(&lchip->lock, flags); spin_lock_irqsave(&lchip->lock, flags);
r = locomo_readl(lchip->base + LOCOMO_GPO); r = locomo_readl(lchip->base + LOCOMO_GPO);
...@@ -1058,9 +1077,9 @@ void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf) ...@@ -1058,9 +1077,9 @@ void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
struct locomo *lchip = locomo_chip_driver(dev); struct locomo *lchip = locomo_chip_driver(dev);
if (vr) if (vr)
locomo_gpio_write(dev, LOCOMO_GPIO_FL_VR, 1); locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 1);
else else
locomo_gpio_write(dev, LOCOMO_GPIO_FL_VR, 0); locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 0);
spin_lock_irqsave(&lchip->lock, flags); spin_lock_irqsave(&lchip->lock, flags);
locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ #define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */
#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ #define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */
#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ #define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */
#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */
#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ #define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */
#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */ #define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */
...@@ -575,6 +576,9 @@ static int corgi_pxa_pm_enter(suspend_state_t state) ...@@ -575,6 +576,9 @@ static int corgi_pxa_pm_enter(suspend_state_t state)
while (corgi_enter_suspend(alarm_time,alarm_status,state)) while (corgi_enter_suspend(alarm_time,alarm_status,state))
{} {}
if (sharpsl_pm.machinfo->earlyresume)
sharpsl_pm.machinfo->earlyresume();
dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n"); dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n");
return 0; return 0;
......
...@@ -126,6 +126,7 @@ CONFIG_CRUNCH=y ...@@ -126,6 +126,7 @@ CONFIG_CRUNCH=y
# EP93xx Platforms # EP93xx Platforms
# #
CONFIG_MACH_EDB9302=y CONFIG_MACH_EDB9302=y
CONFIG_MACH_EDB9312=y
CONFIG_MACH_EDB9315=y CONFIG_MACH_EDB9315=y
CONFIG_MACH_EDB9315A=y CONFIG_MACH_EDB9315A=y
CONFIG_MACH_GESBC9312=y CONFIG_MACH_GESBC9312=y
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.17-git9 # Linux kernel version: 2.6.18
# Sun Jun 25 23:56:32 2006 # Wed Sep 20 20:27:31 2006
# #
CONFIG_ARM=y CONFIG_ARM=y
CONFIG_MMU=y CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_VECTORS_BASE=0xffff0000 CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
# #
# Code maturity level options # Code maturity level options
...@@ -26,14 +31,15 @@ CONFIG_SWAP=y ...@@ -26,14 +31,15 @@ CONFIG_SWAP=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set # CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y # CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set # CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set # CONFIG_IKCONFIG is not set
# CONFIG_RELAY is not set # CONFIG_RELAY is not set
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
CONFIG_UID16=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL=y
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set
...@@ -46,6 +52,8 @@ CONFIG_FUTEX=y ...@@ -46,6 +52,8 @@ CONFIG_FUTEX=y
CONFIG_EPOLL=y CONFIG_EPOLL=y
CONFIG_SHMEM=y CONFIG_SHMEM=y
CONFIG_SLAB=y CONFIG_SLAB=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set # CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0 CONFIG_BASE_SMALL=0
# CONFIG_SLOB is not set # CONFIG_SLOB is not set
...@@ -84,7 +92,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" ...@@ -84,7 +92,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_REALVIEW is not set # CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_AT91RM9200 is not set # CONFIG_ARCH_AT91 is not set
# CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
...@@ -94,7 +102,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" ...@@ -94,7 +102,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_NETX is not set # CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_H720X is not set # CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_IMX is not set # CONFIG_ARCH_IMX is not set
# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IOP32X is not set
# CONFIG_ARCH_IOP33X is not set
# CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP2000 is not set
# CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_IXP23XX is not set
...@@ -122,13 +131,18 @@ CONFIG_ARCH_SMDK2410=y ...@@ -122,13 +131,18 @@ CONFIG_ARCH_SMDK2410=y
CONFIG_ARCH_S3C2440=y CONFIG_ARCH_S3C2440=y
CONFIG_SMDK2440_CPU2440=y CONFIG_SMDK2440_CPU2440=y
CONFIG_SMDK2440_CPU2442=y CONFIG_SMDK2440_CPU2442=y
CONFIG_MACH_S3C2413=y
CONFIG_MACH_SMDK2413=y CONFIG_MACH_SMDK2413=y
CONFIG_MACH_VR1000=y CONFIG_MACH_VR1000=y
CONFIG_MACH_RX3715=y CONFIG_MACH_RX3715=y
CONFIG_MACH_OTOM=y CONFIG_MACH_OTOM=y
CONFIG_MACH_NEXCODER_2440=y CONFIG_MACH_NEXCODER_2440=y
CONFIG_MACH_VSTMS=y
CONFIG_S3C2410_CLOCK=y CONFIG_S3C2410_CLOCK=y
CONFIG_S3C2410_PM=y
CONFIG_CPU_S3C2410_DMA=y
CONFIG_CPU_S3C2410=y CONFIG_CPU_S3C2410=y
CONFIG_S3C2412_PM=y
CONFIG_CPU_S3C2412=y CONFIG_CPU_S3C2412=y
CONFIG_CPU_S3C244X=y CONFIG_CPU_S3C244X=y
CONFIG_CPU_S3C2440=y CONFIG_CPU_S3C2440=y
...@@ -156,7 +170,7 @@ CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 ...@@ -156,7 +170,7 @@ CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
CONFIG_CPU_32=y CONFIG_CPU_32=y
CONFIG_CPU_ARM920T=y CONFIG_CPU_ARM920T=y
CONFIG_CPU_ARM926T=y CONFIG_CPU_ARM926T=y
CONFIG_CPU_32v4=y CONFIG_CPU_32v4T=y
CONFIG_CPU_32v5=y CONFIG_CPU_32v5=y
CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_ABRT_EV4T=y
CONFIG_CPU_ABRT_EV5TJ=y CONFIG_CPU_ABRT_EV5TJ=y
...@@ -200,6 +214,7 @@ CONFIG_FLATMEM=y ...@@ -200,6 +214,7 @@ CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set # CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_SPLIT_PTLOCK_CPUS=4096
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ALIGNMENT_TRAP=y CONFIG_ALIGNMENT_TRAP=y
# #
...@@ -304,7 +319,6 @@ CONFIG_TCP_CONG_BIC=y ...@@ -304,7 +319,6 @@ CONFIG_TCP_CONG_BIC=y
# CONFIG_ATALK is not set # CONFIG_ATALK is not set
# CONFIG_X25 is not set # CONFIG_X25 is not set
# CONFIG_LAPB is not set # CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set # CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set # CONFIG_WAN_ROUTER is not set
...@@ -460,6 +474,7 @@ CONFIG_BLK_DEV_NBD=m ...@@ -460,6 +474,7 @@ CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_CDROM_PKTCDVD is not set # CONFIG_CDROM_PKTCDVD is not set
CONFIG_ATA_OVER_ETH=m CONFIG_ATA_OVER_ETH=m
...@@ -640,6 +655,7 @@ CONFIG_SERIO_LIBPS2=y ...@@ -640,6 +655,7 @@ CONFIG_SERIO_LIBPS2=y
CONFIG_VT=y CONFIG_VT=y
CONFIG_VT_CONSOLE=y CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_SERIAL_NONSTANDARD=y CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set # CONFIG_COMPUTONE is not set
# CONFIG_ROCKETPORT is not set # CONFIG_ROCKETPORT is not set
...@@ -716,6 +732,7 @@ CONFIG_S3C2410_WATCHDOG=y ...@@ -716,6 +732,7 @@ CONFIG_S3C2410_WATCHDOG=y
# USB-based Watchdog Cards # USB-based Watchdog Cards
# #
# CONFIG_USBPCWATCHDOG is not set # CONFIG_USBPCWATCHDOG is not set
CONFIG_HW_RANDOM=y
# CONFIG_NVRAM is not set # CONFIG_NVRAM is not set
CONFIG_S3C2410_RTC=y CONFIG_S3C2410_RTC=y
# CONFIG_DTLK is not set # CONFIG_DTLK is not set
...@@ -857,12 +874,12 @@ CONFIG_VIDEO_V4L2=y ...@@ -857,12 +874,12 @@ CONFIG_VIDEO_V4L2=y
# #
# Graphics support # Graphics support
# #
CONFIG_FIRMWARE_EDID=y
CONFIG_FB=y CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_MACMODES is not set # CONFIG_FB_MACMODES is not set
CONFIG_FB_FIRMWARE_EDID=y
# CONFIG_FB_BACKLIGHT is not set # CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_TILEBLITTING is not set
...@@ -995,7 +1012,7 @@ CONFIG_USB_MON=y ...@@ -995,7 +1012,7 @@ CONFIG_USB_MON=y
# CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set # CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set # CONFIG_USB_LED is not set
# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set # CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETKIT is not set
# CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_PHIDGETSERVO is not set
...@@ -1095,6 +1112,7 @@ CONFIG_JFFS2_FS=y ...@@ -1095,6 +1112,7 @@ CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_SUMMARY is not set # CONFIG_JFFS2_SUMMARY is not set
# CONFIG_JFFS2_FS_XATTR is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y CONFIG_JFFS2_RTIME=y
...@@ -1202,14 +1220,19 @@ CONFIG_NLS_DEFAULT="iso8859-1" ...@@ -1202,14 +1220,19 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# #
# CONFIG_PRINTK_TIME is not set # CONFIG_PRINTK_TIME is not set
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_KERNEL=y
CONFIG_LOG_BUF_SHIFT=16 CONFIG_LOG_BUF_SHIFT=16
CONFIG_DETECT_SOFTLOCKUP=y CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_SCHEDSTATS is not set # CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SLAB is not set
CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK is not set
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_RWSEMS is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO=y
...@@ -1251,3 +1274,4 @@ CONFIG_CRC32=y ...@@ -1251,3 +1274,4 @@ CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set # CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_DEFLATE=y
CONFIG_PLIST=y
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/kthread.h>
#include <asm/apm.h> /* apm_power_info */ #include <asm/apm.h> /* apm_power_info */
#include <asm/system.h> #include <asm/system.h>
...@@ -80,7 +81,7 @@ struct apm_user { ...@@ -80,7 +81,7 @@ struct apm_user {
*/ */
static int suspends_pending; static int suspends_pending;
static int apm_disabled; static int apm_disabled;
static int arm_apm_active; static struct task_struct *kapmd_tsk;
static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
...@@ -97,7 +98,6 @@ static LIST_HEAD(apm_user_list); ...@@ -97,7 +98,6 @@ static LIST_HEAD(apm_user_list);
* to be suspending the system. * to be suspending the system.
*/ */
static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait); static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
static DECLARE_COMPLETION(kapmd_exit);
static DEFINE_SPINLOCK(kapmd_queue_lock); static DEFINE_SPINLOCK(kapmd_queue_lock);
static struct apm_queue kapmd_queue; static struct apm_queue kapmd_queue;
...@@ -468,16 +468,13 @@ static int apm_get_info(char *buf, char **start, off_t fpos, int length) ...@@ -468,16 +468,13 @@ static int apm_get_info(char *buf, char **start, off_t fpos, int length)
static int kapmd(void *arg) static int kapmd(void *arg)
{ {
daemonize("kapmd");
current->flags |= PF_NOFREEZE;
do { do {
apm_event_t event; apm_event_t event;
wait_event_interruptible(kapmd_wait, wait_event_interruptible(kapmd_wait,
!queue_empty(&kapmd_queue) || !arm_apm_active); !queue_empty(&kapmd_queue) || kthread_should_stop());
if (!arm_apm_active) if (kthread_should_stop())
break; break;
spin_lock_irq(&kapmd_queue_lock); spin_lock_irq(&kapmd_queue_lock);
...@@ -508,7 +505,7 @@ static int kapmd(void *arg) ...@@ -508,7 +505,7 @@ static int kapmd(void *arg)
} }
} while (1); } while (1);
complete_and_exit(&kapmd_exit, 0); return 0;
} }
static int __init apm_init(void) static int __init apm_init(void)
...@@ -520,13 +517,14 @@ static int __init apm_init(void) ...@@ -520,13 +517,14 @@ static int __init apm_init(void)
return -ENODEV; return -ENODEV;
} }
arm_apm_active = 1; kapmd_tsk = kthread_create(kapmd, NULL, "kapmd");
if (IS_ERR(kapmd_tsk)) {
ret = kernel_thread(kapmd, NULL, CLONE_KERNEL); ret = PTR_ERR(kapmd_tsk);
if (ret < 0) { kapmd_tsk = NULL;
arm_apm_active = 0;
return ret; return ret;
} }
kapmd_tsk->flags |= PF_NOFREEZE;
wake_up_process(kapmd_tsk);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
create_proc_info_entry("apm", 0, NULL, apm_get_info); create_proc_info_entry("apm", 0, NULL, apm_get_info);
...@@ -535,10 +533,7 @@ static int __init apm_init(void) ...@@ -535,10 +533,7 @@ static int __init apm_init(void)
ret = misc_register(&apm_device); ret = misc_register(&apm_device);
if (ret != 0) { if (ret != 0) {
remove_proc_entry("apm", NULL); remove_proc_entry("apm", NULL);
kthread_stop(kapmd_tsk);
arm_apm_active = 0;
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
} }
return ret; return ret;
...@@ -549,9 +544,7 @@ static void __exit apm_exit(void) ...@@ -549,9 +544,7 @@ static void __exit apm_exit(void)
misc_deregister(&apm_device); misc_deregister(&apm_device);
remove_proc_entry("apm", NULL); remove_proc_entry("apm", NULL);
arm_apm_active = 0; kthread_stop(kapmd_tsk);
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
} }
module_init(apm_init); module_init(apm_init);
......
...@@ -21,6 +21,36 @@ ...@@ -21,6 +21,36 @@
#if defined(CONFIG_DEBUG_ICEDCC) #if defined(CONFIG_DEBUG_ICEDCC)
@@ debug using ARM EmbeddedICE DCC channel @@ debug using ARM EmbeddedICE DCC channel
#if defined(CONFIG_CPU_V6)
.macro addruart, rx
.endm
.macro senduart, rd, rx
mcr p14, 0, \rd, c0, c5, 0
.endm
.macro busyuart, rd, rx
1001:
mrc p14, 0, \rx, c0, c1, 0
tst \rx, #0x20000000
beq 1001b
.endm
.macro waituart, rd, rx
mov \rd, #0x2000000
1001:
subs \rd, \rd, #1
bmi 1002f
mrc p14, 0, \rx, c0, c1, 0
tst \rx, #0x20000000
bne 1001b
1002:
.endm
#else
.macro addruart, rx .macro addruart, rx
.endm .endm
...@@ -46,9 +76,12 @@ ...@@ -46,9 +76,12 @@
bne 1001b bne 1001b
1002: 1002:
.endm .endm
#endif /* CONFIG_CPU_V6 */
#else #else
#include <asm/arch/debug-macro.S> #include <asm/arch/debug-macro.S>
#endif #endif /* CONFIG_DEBUG_ICEDCC */
/* /*
* Useful debugging routines * Useful debugging routines
......
...@@ -191,6 +191,9 @@ __dabt_svc: ...@@ -191,6 +191,9 @@ __dabt_svc:
__irq_svc: __irq_svc:
svc_entry svc_entry
#ifdef CONFIG_TRACE_IRQFLAGS
bl trace_hardirqs_off
#endif
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
get_thread_info tsk get_thread_info tsk
ldr r8, [tsk, #TI_PREEMPT] @ get preempt count ldr r8, [tsk, #TI_PREEMPT] @ get preempt count
...@@ -211,6 +214,10 @@ preempt_return: ...@@ -211,6 +214,10 @@ preempt_return:
#endif #endif
ldr r0, [sp, #S_PSR] @ irqs are already disabled ldr r0, [sp, #S_PSR] @ irqs are already disabled
msr spsr_cxsf, r0 msr spsr_cxsf, r0
#ifdef CONFIG_TRACE_IRQFLAGS
tst r0, #PSR_I_BIT
bleq trace_hardirqs_on
#endif
ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
.ltorg .ltorg
...@@ -398,6 +405,9 @@ __dabt_usr: ...@@ -398,6 +405,9 @@ __dabt_usr:
__irq_usr: __irq_usr:
usr_entry usr_entry
#ifdef CONFIG_TRACE_IRQFLAGS
bl trace_hardirqs_off
#endif
get_thread_info tsk get_thread_info tsk
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
ldr r8, [tsk, #TI_PREEMPT] @ get preempt count ldr r8, [tsk, #TI_PREEMPT] @ get preempt count
...@@ -412,6 +422,9 @@ __irq_usr: ...@@ -412,6 +422,9 @@ __irq_usr:
teq r0, r7 teq r0, r7
strne r0, [r0, -r0] strne r0, [r0, -r0]
#endif #endif
#ifdef CONFIG_TRACE_IRQFLAGS
bl trace_hardirqs_on
#endif
mov why, #0 mov why, #0
b ret_to_user b ret_to_user
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* Common kernel startup code (non-paged MM) * Common kernel startup code (non-paged MM)
* for 32-bit CPUs which has a process ID register(CP15).
* *
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
...@@ -40,7 +39,11 @@ ...@@ -40,7 +39,11 @@
ENTRY(stext) ENTRY(stext)
msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
@ and irqs disabled @ and irqs disabled
#ifndef CONFIG_CPU_CP15
ldr r9, =CONFIG_PROCESSOR_ID
#else
mrc p15, 0, r9, c0, c0 @ get processor id mrc p15, 0, r9, c0, c0 @ get processor id
#endif
bl __lookup_processor_type @ r5=procinfo r9=cpuid bl __lookup_processor_type @ r5=procinfo r9=cpuid
movs r10, r5 @ invalid processor (r5=0)? movs r10, r5 @ invalid processor (r5=0)?
beq __error_p @ yes, error 'p' beq __error_p @ yes, error 'p'
...@@ -58,6 +61,7 @@ ENTRY(stext) ...@@ -58,6 +61,7 @@ ENTRY(stext)
*/ */
.type __after_proc_init, %function .type __after_proc_init, %function
__after_proc_init: __after_proc_init:
#ifdef CONFIG_CPU_CP15
mrc p15, 0, r0, c1, c0, 0 @ read control reg mrc p15, 0, r0, c1, c0, 0 @ read control reg
#ifdef CONFIG_ALIGNMENT_TRAP #ifdef CONFIG_ALIGNMENT_TRAP
orr r0, r0, #CR_A orr r0, r0, #CR_A
...@@ -72,8 +76,14 @@ __after_proc_init: ...@@ -72,8 +76,14 @@ __after_proc_init:
#endif #endif
#ifdef CONFIG_CPU_ICACHE_DISABLE #ifdef CONFIG_CPU_ICACHE_DISABLE
bic r0, r0, #CR_I bic r0, r0, #CR_I
#endif
#ifdef CONFIG_CPU_HIGH_VECTOR
orr r0, r0, #CR_V
#else
bic r0, r0, #CR_V
#endif #endif
mcr p15, 0, r0, c1, c0, 0 @ write control reg mcr p15, 0, r0, c1, c0, 0 @ write control reg
#endif /* CONFIG_CPU_CP15 */
mov pc, r13 @ clear the BSS and jump mov pc, r13 @ clear the BSS and jump
@ to start_kernel @ to start_kernel
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* linux/arch/arm/kernel/module.c * linux/arch/arm/kernel/module.c
* *
* Copyright (C) 2002 Russell King. * Copyright (C) 2002 Russell King.
* Modified for nommu by Hyok S. Choi
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License version 2 as
...@@ -32,6 +33,7 @@ extern void _etext; ...@@ -32,6 +33,7 @@ extern void _etext;
#define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) #define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK)
#endif #endif
#ifdef CONFIG_MMU
void *module_alloc(unsigned long size) void *module_alloc(unsigned long size)
{ {
struct vm_struct *area; struct vm_struct *area;
...@@ -46,6 +48,12 @@ void *module_alloc(unsigned long size) ...@@ -46,6 +48,12 @@ void *module_alloc(unsigned long size)
return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL);
} }
#else /* CONFIG_MMU */
void *module_alloc(unsigned long size)
{
return size == 0 ? NULL : vmalloc(size);
}
#endif /* !CONFIG_MMU */
void module_free(struct module *module, void *region) void module_free(struct module *module, void *region)
{ {
......
...@@ -221,16 +221,26 @@ void __show_regs(struct pt_regs *regs) ...@@ -221,16 +221,26 @@ void __show_regs(struct pt_regs *regs)
processor_modes[processor_mode(regs)], processor_modes[processor_mode(regs)],
thumb_mode(regs) ? " (T)" : "", thumb_mode(regs) ? " (T)" : "",
get_fs() == get_ds() ? "kernel" : "user"); get_fs() == get_ds() ? "kernel" : "user");
#if CONFIG_CPU_CP15
{ {
unsigned int ctrl, transbase, dac; unsigned int ctrl;
__asm__ ( __asm__ (
" mrc p15, 0, %0, c1, c0\n" " mrc p15, 0, %0, c1, c0\n"
" mrc p15, 0, %1, c2, c0\n" : "=r" (ctrl));
" mrc p15, 0, %2, c3, c0\n" printk("Control: %04X\n", ctrl);
: "=r" (ctrl), "=r" (transbase), "=r" (dac));
printk("Control: %04X Table: %08X DAC: %08X\n",
ctrl, transbase, dac);
} }
#ifdef CONFIG_CPU_CP15_MMU
{
unsigned int transbase, dac;
__asm__ (
" mrc p15, 0, %0, c2, c0\n"
" mrc p15, 0, %1, c3, c0\n"
: "=r" (transbase), "=r" (dac));
printk("Table: %08X DAC: %08X\n",
transbase, dac);
}
#endif
#endif
} }
void show_regs(struct pt_regs * regs) void show_regs(struct pt_regs * regs)
......
...@@ -69,10 +69,12 @@ EXPORT_SYMBOL(profile_pc); ...@@ -69,10 +69,12 @@ EXPORT_SYMBOL(profile_pc);
*/ */
int (*set_rtc)(void); int (*set_rtc)(void);
#ifndef CONFIG_GENERIC_TIME
static unsigned long dummy_gettimeoffset(void) static unsigned long dummy_gettimeoffset(void)
{ {
return 0; return 0;
} }
#endif
/* /*
* Scheduler clock - returns current time in nanosec units. * Scheduler clock - returns current time in nanosec units.
...@@ -230,6 +232,7 @@ static inline void do_leds(void) ...@@ -230,6 +232,7 @@ static inline void do_leds(void)
#define do_leds() #define do_leds()
#endif #endif
#ifndef CONFIG_GENERIC_TIME
void do_gettimeofday(struct timeval *tv) void do_gettimeofday(struct timeval *tv)
{ {
unsigned long flags; unsigned long flags;
...@@ -291,6 +294,7 @@ int do_settimeofday(struct timespec *tv) ...@@ -291,6 +294,7 @@ int do_settimeofday(struct timespec *tv)
} }
EXPORT_SYMBOL(do_settimeofday); EXPORT_SYMBOL(do_settimeofday);
#endif /* !CONFIG_GENERIC_TIME */
/** /**
* save_time_delta - Save the offset between system time and RTC time * save_time_delta - Save the offset between system time and RTC time
...@@ -500,8 +504,10 @@ device_initcall(timer_init_sysfs); ...@@ -500,8 +504,10 @@ device_initcall(timer_init_sysfs);
void __init time_init(void) void __init time_init(void)
{ {
#ifndef CONFIG_GENERIC_TIME
if (system_timer->offset == NULL) if (system_timer->offset == NULL)
system_timer->offset = dummy_gettimeoffset; system_timer->offset = dummy_gettimeoffset;
#endif
system_timer->init(); system_timer->init();
#ifdef CONFIG_NO_IDLE_HZ #ifdef CONFIG_NO_IDLE_HZ
......
...@@ -191,7 +191,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) ...@@ -191,7 +191,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
if (tsk != current) if (tsk != current)
fp = thread_saved_fp(tsk); fp = thread_saved_fp(tsk);
else else
asm("mov%? %0, fp" : "=r" (fp)); asm("mov %0, fp" : "=r" (fp) : : "cc");
c_backtrace(fp, 0x10); c_backtrace(fp, 0x10);
barrier(); barrier();
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include "generic.h" #include "generic.h"
#include "clock.h"
static struct map_desc at91rm9200_io_desc[] __initdata = { static struct map_desc at91rm9200_io_desc[] __initdata = {
{ {
...@@ -26,87 +27,224 @@ static struct map_desc at91rm9200_io_desc[] __initdata = { ...@@ -26,87 +27,224 @@ static struct map_desc at91rm9200_io_desc[] __initdata = {
.type = MT_DEVICE, .type = MT_DEVICE,
}, { }, {
.virtual = AT91_VA_BASE_SPI, .virtual = AT91_VA_BASE_SPI,
.pfn = __phys_to_pfn(AT91_BASE_SPI), .pfn = __phys_to_pfn(AT91RM9200_BASE_SPI),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_SSC2,
.pfn = __phys_to_pfn(AT91_BASE_SSC2),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_SSC1,
.pfn = __phys_to_pfn(AT91_BASE_SSC1),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_SSC0,
.pfn = __phys_to_pfn(AT91_BASE_SSC0),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_US3,
.pfn = __phys_to_pfn(AT91_BASE_US3),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_US2,
.pfn = __phys_to_pfn(AT91_BASE_US2),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_US1,
.pfn = __phys_to_pfn(AT91_BASE_US1),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_US0,
.pfn = __phys_to_pfn(AT91_BASE_US0),
.length = SZ_16K, .length = SZ_16K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, { }, {
.virtual = AT91_VA_BASE_EMAC, .virtual = AT91_VA_BASE_EMAC,
.pfn = __phys_to_pfn(AT91_BASE_EMAC), .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC),
.length = SZ_16K, .length = SZ_16K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, { }, {
.virtual = AT91_VA_BASE_TWI, .virtual = AT91_VA_BASE_TWI,
.pfn = __phys_to_pfn(AT91_BASE_TWI), .pfn = __phys_to_pfn(AT91RM9200_BASE_TWI),
.length = SZ_16K, .length = SZ_16K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, { }, {
.virtual = AT91_VA_BASE_MCI, .virtual = AT91_VA_BASE_MCI,
.pfn = __phys_to_pfn(AT91_BASE_MCI), .pfn = __phys_to_pfn(AT91RM9200_BASE_MCI),
.length = SZ_16K, .length = SZ_16K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, { }, {
.virtual = AT91_VA_BASE_UDP, .virtual = AT91_VA_BASE_UDP,
.pfn = __phys_to_pfn(AT91_BASE_UDP), .pfn = __phys_to_pfn(AT91RM9200_BASE_UDP),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_TCB1,
.pfn = __phys_to_pfn(AT91_BASE_TCB1),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = AT91_VA_BASE_TCB0,
.pfn = __phys_to_pfn(AT91_BASE_TCB0),
.length = SZ_16K, .length = SZ_16K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, { }, {
.virtual = AT91_SRAM_VIRT_BASE, .virtual = AT91_SRAM_VIRT_BASE,
.pfn = __phys_to_pfn(AT91_SRAM_BASE), .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE),
.length = AT91_SRAM_SIZE, .length = AT91RM9200_SRAM_SIZE,
.type = MT_DEVICE, .type = MT_DEVICE,
}, },
}; };
void __init at91rm9200_map_io(void) /* --------------------------------------------------------------------
* Clocks
* -------------------------------------------------------------------- */
/*
* The peripheral clocks.
*/
static struct clk udc_clk = {
.name = "udc_clk",
.pmc_mask = 1 << AT91RM9200_ID_UDP,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk ohci_clk = {
.name = "ohci_clk",
.pmc_mask = 1 << AT91RM9200_ID_UHP,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk ether_clk = {
.name = "ether_clk",
.pmc_mask = 1 << AT91RM9200_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk mmc_clk = {
.name = "mci_clk",
.pmc_mask = 1 << AT91RM9200_ID_MCI,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk twi_clk = {
.name = "twi_clk",
.pmc_mask = 1 << AT91RM9200_ID_TWI,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk usart0_clk = {
.name = "usart0_clk",
.pmc_mask = 1 << AT91RM9200_ID_US0,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk usart1_clk = {
.name = "usart1_clk",
.pmc_mask = 1 << AT91RM9200_ID_US1,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk usart2_clk = {
.name = "usart2_clk",
.pmc_mask = 1 << AT91RM9200_ID_US2,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk usart3_clk = {
.name = "usart3_clk",
.pmc_mask = 1 << AT91RM9200_ID_US3,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk spi_clk = {
.name = "spi_clk",
.pmc_mask = 1 << AT91RM9200_ID_SPI,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk pioA_clk = {
.name = "pioA_clk",
.pmc_mask = 1 << AT91RM9200_ID_PIOA,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk pioB_clk = {
.name = "pioB_clk",
.pmc_mask = 1 << AT91RM9200_ID_PIOB,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk pioC_clk = {
.name = "pioC_clk",
.pmc_mask = 1 << AT91RM9200_ID_PIOC,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk pioD_clk = {
.name = "pioD_clk",
.pmc_mask = 1 << AT91RM9200_ID_PIOD,
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk *periph_clocks[] __initdata = {
&pioA_clk,
&pioB_clk,
&pioC_clk,
&pioD_clk,
&usart0_clk,
&usart1_clk,
&usart2_clk,
&usart3_clk,
&mmc_clk,
&udc_clk,
&twi_clk,
&spi_clk,
// ssc 0 .. ssc2
// tc0 .. tc5
&ohci_clk,
&ether_clk,
// irq0 .. irq6
};
/*
* The four programmable clocks.
* You must configure pin multiplexing to bring these signals out.
*/
static struct clk pck0 = {
.name = "pck0",
.pmc_mask = AT91_PMC_PCK0,
.type = CLK_TYPE_PROGRAMMABLE,
.id = 0,
};
static struct clk pck1 = {
.name = "pck1",
.pmc_mask = AT91_PMC_PCK1,
.type = CLK_TYPE_PROGRAMMABLE,
.id = 1,
};
static struct clk pck2 = {
.name = "pck2",
.pmc_mask = AT91_PMC_PCK2,
.type = CLK_TYPE_PROGRAMMABLE,
.id = 2,
};
static struct clk pck3 = {
.name = "pck3",
.pmc_mask = AT91_PMC_PCK3,
.type = CLK_TYPE_PROGRAMMABLE,
.id = 3,
};
static void __init at91rm9200_register_clocks(void)
{ {
int i;
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
clk_register(periph_clocks[i]);
clk_register(&pck0);
clk_register(&pck1);
clk_register(&pck2);
clk_register(&pck3);
}
/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
static struct at91_gpio_bank at91rm9200_gpio[] = {
{
.id = AT91RM9200_ID_PIOA,
.offset = AT91_PIOA,
.clock = &pioA_clk,
}, {
.id = AT91RM9200_ID_PIOB,
.offset = AT91_PIOB,
.clock = &pioB_clk,
}, {
.id = AT91RM9200_ID_PIOC,
.offset = AT91_PIOC,
.clock = &pioC_clk,
}, {
.id = AT91RM9200_ID_PIOD,
.offset = AT91_PIOD,
.clock = &pioD_clk,
}
};
/* --------------------------------------------------------------------
* AT91RM9200 processor initialization
* -------------------------------------------------------------------- */
void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks)
{
/* Map peripherals */
iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
/* Init clock subsystem */
at91_clock_init(main_clock);
/* Register the processor-specific clocks */
at91rm9200_register_clocks();
/* Initialize GPIO subsystem */
at91_gpio_init(at91rm9200_gpio, banks);
} }
/* --------------------------------------------------------------------
* Interrupt initialization
* -------------------------------------------------------------------- */
/* /*
* The default interrupt priority levels (0 = lowest, 7 = highest). * The default interrupt priority levels (0 = lowest, 7 = highest).
*/ */
...@@ -145,10 +283,14 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { ...@@ -145,10 +283,14 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
0 /* Advanced Interrupt Controller (IRQ6) */ 0 /* Advanced Interrupt Controller (IRQ6) */
}; };
void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) void __init at91rm9200_init_interrupts(unsigned int priority[NR_AIC_IRQS])
{ {
if (!priority) if (!priority)
priority = at91rm9200_default_irq_priority; priority = at91rm9200_default_irq_priority;
/* Initialize the AIC interrupt controller */
at91_aic_init(priority); at91_aic_init(priority);
/* Enable GPIO interrupts */
at91_gpio_irq_setup();
} }
...@@ -34,20 +34,11 @@ ...@@ -34,20 +34,11 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <asm/hardware.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
#include "generic.h" #include "generic.h"
static void __init onearm_init_irq(void)
{
/* Initialize AIC controller */
at91rm9200_init_irq(NULL);
/* Set up the GPIO interrupts */
at91_gpio_irq_setup(PQFP_GPIO_BANKS);
}
/* /*
* Serial port configuration. * Serial port configuration.
...@@ -62,15 +53,18 @@ static struct at91_uart_config __initdata onearm_uart_config = { ...@@ -62,15 +53,18 @@ static struct at91_uart_config __initdata onearm_uart_config = {
static void __init onearm_map_io(void) static void __init onearm_map_io(void)
{ {
at91rm9200_map_io(); /* Initialize processor: 18.432 MHz crystal */
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
/* Initialize clocks: 18.432 MHz crystal */
at91_clock_init(18432000);
/* Setup the serial ports and console */ /* Setup the serial ports and console */
at91_init_serial(&onearm_uart_config); at91_init_serial(&onearm_uart_config);
} }
static void __init onearm_init_irq(void)
{
at91rm9200_init_interrupts(NULL);
}
static struct at91_eth_data __initdata onearm_eth_data = { static struct at91_eth_data __initdata onearm_eth_data = {
.phy_irq_pin = AT91_PIN_PC4, .phy_irq_pin = AT91_PIN_PC4,
.is_rmii = 1, .is_rmii = 1,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -7,6 +7,7 @@ obj-n := ...@@ -7,6 +7,7 @@ obj-n :=
obj- := obj- :=
obj-$(CONFIG_MACH_EDB9302) += edb9302.o obj-$(CONFIG_MACH_EDB9302) += edb9302.o
obj-$(CONFIG_MACH_EDB9312) += edb9312.o
obj-$(CONFIG_MACH_EDB9315) += edb9315.o obj-$(CONFIG_MACH_EDB9315) += edb9315.o
obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o
obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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