mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] Use new get_irqnr_preamble [ARM] Ensure machine class menu is sorted alphabetically [ARM] 4333/2: KS8695: Micrel Development board [ARM] 4332/2: KS8695: Serial driver [ARM] 4331/3: Support for Micrel/Kendin KS8695 processor [ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board [ARM] 4372/1: Define byte sizes in asm-arm/sizes.h [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. [ARM] Update mach-types [ARM] export symbol csum_partial_copy_from_user [ARM] iop13xx: msi support [ARM] stacktrace fix [ARM] Spinlock initializer cleanup [ARM] remove useless config option GENERIC_BUST_SPINLOCK [ARM] 4303/3: base kernel support for TI DaVinci [ARM] 4369/1: AT91: Fix circular dependency in header files [ARM] 4368/1: S3C24xx: build fix [ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK [ARM] Fix iop32x/iop33x build [ARM] EBSA110: fix build errors caused by missing "const" ...
This commit is contained in:
commit
f7d02ae76e
139 files changed
+8624
-548
No files matched your search
+38
-24
@@ -114,9 +114,6 @@ config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_BUST_SPINLOCK
|
||||
bool
|
||||
|
||||
config ARCH_MAY_HAVE_PC_FDC
|
||||
bool
|
||||
|
||||
@@ -247,6 +244,15 @@ config ARCH_IMX
|
||||
help
|
||||
Support for Motorola's i.MX family of processors (MX1, MXL).
|
||||
|
||||
config ARCH_IOP13XX
|
||||
bool "IOP13xx-based"
|
||||
depends on MMU
|
||||
select PLAT_IOP
|
||||
select PCI
|
||||
select ARCH_SUPPORTS_MSI
|
||||
help
|
||||
Support for Intel's IOP13XX (XScale) family of processors.
|
||||
|
||||
config ARCH_IOP32X
|
||||
bool "IOP32x-based"
|
||||
depends on MMU
|
||||
@@ -264,22 +270,12 @@ config ARCH_IOP33X
|
||||
help
|
||||
Support for Intel's IOP33X (XScale) family of processors.
|
||||
|
||||
config ARCH_IOP13XX
|
||||
bool "IOP13xx-based"
|
||||
config ARCH_IXP23XX
|
||||
bool "IXP23XX-based"
|
||||
depends on MMU
|
||||
select PLAT_IOP
|
||||
select PCI
|
||||
select ARCH_SUPPORTS_MSI
|
||||
select PCI
|
||||
help
|
||||
Support for Intel's IOP13XX (XScale) family of processors.
|
||||
|
||||
config ARCH_IXP4XX
|
||||
bool "IXP4xx-based"
|
||||
depends on MMU
|
||||
select GENERIC_TIME
|
||||
select GENERIC_CLOCKEVENTS
|
||||
help
|
||||
Support for Intel's IXP4XX (XScale) family of processors.
|
||||
Support for Intel's IXP23xx (XScale) family of processors.
|
||||
|
||||
config ARCH_IXP2000
|
||||
bool "IXP2400/2800-based"
|
||||
@@ -288,12 +284,13 @@ config ARCH_IXP2000
|
||||
help
|
||||
Support for Intel's IXP2400/2800 (XScale) family of processors.
|
||||
|
||||
config ARCH_IXP23XX
|
||||
bool "IXP23XX-based"
|
||||
config ARCH_IXP4XX
|
||||
bool "IXP4xx-based"
|
||||
depends on MMU
|
||||
select PCI
|
||||
select GENERIC_TIME
|
||||
select GENERIC_CLOCKEVENTS
|
||||
help
|
||||
Support for Intel's IXP23xx (XScale) family of processors.
|
||||
Support for Intel's IXP4XX (XScale) family of processors.
|
||||
|
||||
config ARCH_L7200
|
||||
bool "LinkUp-L7200"
|
||||
@@ -308,6 +305,12 @@ config ARCH_L7200
|
||||
If you have any questions or comments about the Linux kernel port
|
||||
to this board, send e-mail to <sjhill@cotw.com>.
|
||||
|
||||
config ARCH_KS8695
|
||||
bool "Micrel/Kendin KS8695"
|
||||
help
|
||||
Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
|
||||
System-on-Chip devices.
|
||||
|
||||
config ARCH_NS9XXX
|
||||
bool "NetSilicon NS9xxx"
|
||||
help
|
||||
@@ -354,7 +357,6 @@ config ARCH_SA1100
|
||||
config ARCH_S3C2410
|
||||
bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
|
||||
select GENERIC_GPIO
|
||||
select GENERIC_TIME
|
||||
help
|
||||
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
|
||||
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
|
||||
@@ -377,6 +379,13 @@ config ARCH_LH7A40X
|
||||
core with a wide array of integrated devices for
|
||||
hand-held and low-power applications.
|
||||
|
||||
config ARCH_DAVINCI
|
||||
bool "TI DaVinci"
|
||||
select GENERIC_TIME
|
||||
select GENERIC_CLOCKEVENTS
|
||||
help
|
||||
Support for TI's DaVinci platform.
|
||||
|
||||
config ARCH_OMAP
|
||||
bool "TI OMAP"
|
||||
select GENERIC_GPIO
|
||||
@@ -445,6 +454,10 @@ source "arch/arm/mach-netx/Kconfig"
|
||||
|
||||
source "arch/arm/mach-ns9xxx/Kconfig"
|
||||
|
||||
source "arch/arm/mach-davinci/Kconfig"
|
||||
|
||||
source "arch/arm/mach-ks8695/Kconfig"
|
||||
|
||||
# Definitions to make life easier
|
||||
config ARCH_ACORN
|
||||
bool
|
||||
@@ -505,7 +518,7 @@ config ISA_DMA_API
|
||||
bool
|
||||
|
||||
config PCI
|
||||
bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX
|
||||
bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695
|
||||
help
|
||||
Find out whether you have a PCI motherboard. PCI is the name of a
|
||||
bus system, i.e. the way the CPU talks to the other stuff inside
|
||||
@@ -674,7 +687,8 @@ config LEDS
|
||||
ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
|
||||
ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
|
||||
ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
|
||||
ARCH_AT91 || MACH_TRIZEPS4
|
||||
ARCH_AT91 || MACH_TRIZEPS4 || ARCH_DAVINCI || \
|
||||
ARCH_KS8695
|
||||
help
|
||||
If you say Y here, the LEDs on your machine will be used
|
||||
to provide useful information about your current system status.
|
||||
|
||||
@@ -135,6 +135,8 @@ endif
|
||||
machine-$(CONFIG_ARCH_NETX) := netx
|
||||
machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
|
||||
textofs-$(CONFIG_ARCH_NS9XXX) := 0x00108000
|
||||
machine-$(CONFIG_ARCH_DAVINCI) := davinci
|
||||
machine-$(CONFIG_ARCH_KS8695) := ks8695
|
||||
|
||||
ifeq ($(CONFIG_ARCH_EBSA110),y)
|
||||
# This is what happens if you forget the IOCS16 line.
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+329
-203
File diff suppressed because it is too large.
Load diff
@@ -76,6 +76,7 @@ EXPORT_SYMBOL(__const_udelay);
|
||||
|
||||
/* networking */
|
||||
EXPORT_SYMBOL(csum_partial);
|
||||
EXPORT_SYMBOL(csum_partial_copy_from_user);
|
||||
EXPORT_SYMBOL(csum_partial_copy_nocheck);
|
||||
EXPORT_SYMBOL(__csum_ipv6_magic);
|
||||
|
||||
|
||||
+34
-1
@@ -41,11 +41,11 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <asm/dma.h>
|
||||
#include <asm/ecard.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/mach/irq.h>
|
||||
@@ -958,6 +958,31 @@ void ecard_release_resources(struct expansion_card *ec)
|
||||
}
|
||||
EXPORT_SYMBOL(ecard_release_resources);
|
||||
|
||||
void ecard_setirq(struct expansion_card *ec, const struct expansion_card_ops *ops, void *irq_data)
|
||||
{
|
||||
ec->irq_data = irq_data;
|
||||
barrier();
|
||||
ec->ops = ops;
|
||||
}
|
||||
EXPORT_SYMBOL(ecard_setirq);
|
||||
|
||||
void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
|
||||
unsigned long offset, unsigned long maxsize)
|
||||
{
|
||||
unsigned long start = ecard_resource_start(ec, res);
|
||||
unsigned long end = ecard_resource_end(ec, res);
|
||||
|
||||
if (offset > (end - start))
|
||||
return NULL;
|
||||
|
||||
start += offset;
|
||||
if (maxsize && end - start > maxsize)
|
||||
end = start + maxsize;
|
||||
|
||||
return devm_ioremap(&ec->dev, start, end - start);
|
||||
}
|
||||
EXPORT_SYMBOL(ecardm_iomap);
|
||||
|
||||
/*
|
||||
* Probe for an expansion card.
|
||||
*
|
||||
@@ -1133,6 +1158,14 @@ static int ecard_drv_remove(struct device *dev)
|
||||
drv->remove(ec);
|
||||
ecard_release(ec);
|
||||
|
||||
/*
|
||||
* Restore the default operations. We ensure that the
|
||||
* ops are set before we change the data.
|
||||
*/
|
||||
ec->ops = &ecard_default_ops;
|
||||
barrier();
|
||||
ec->irq_data = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,21 +52,15 @@ static int save_trace(struct stackframe *frame, void *d)
|
||||
return trace->nr_entries >= trace->max_entries;
|
||||
}
|
||||
|
||||
void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
|
||||
void save_stack_trace(struct stack_trace *trace)
|
||||
{
|
||||
struct stack_trace_data data;
|
||||
unsigned long fp, base;
|
||||
|
||||
data.trace = trace;
|
||||
data.skip = trace->skip;
|
||||
|
||||
if (task) {
|
||||
base = (unsigned long)task_stack_page(task);
|
||||
fp = 0; /* FIXME */
|
||||
} else {
|
||||
base = (unsigned long)task_stack_page(current);
|
||||
asm("mov %0, fp" : "=r" (fp));
|
||||
}
|
||||
base = (unsigned long)task_stack_page(current);
|
||||
asm("mov %0, fp" : "=r" (fp));
|
||||
|
||||
walk_stackframe(fp, base, base + THREAD_SIZE, save_trace, &data);
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ void __init time_init(void)
|
||||
|
||||
#ifdef CONFIG_NO_IDLE_HZ
|
||||
if (system_timer->dyn_tick)
|
||||
system_timer->dyn_tick->lock = SPIN_LOCK_UNLOCKED;
|
||||
spin_lock_init(&system_timer->dyn_tick->lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ config ARCH_AT91SAM9261
|
||||
config ARCH_AT91SAM9263
|
||||
bool "AT91SAM9263"
|
||||
|
||||
config ARCH_AT91SAM9RL
|
||||
bool "AT91SAM9RL"
|
||||
|
||||
endchoice
|
||||
|
||||
# ----------------------------------------------------------
|
||||
@@ -152,6 +155,20 @@ endif
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
if ARCH_AT91SAM9RL
|
||||
|
||||
comment "AT91SAM9RL Board Type"
|
||||
|
||||
config MACH_AT91SAM9RLEK
|
||||
bool "Atmel AT91SAM9RL-EK Evaluation Kit"
|
||||
depends on ARCH_AT91SAM9RL
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit.
|
||||
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
comment "AT91 Board Options"
|
||||
|
||||
config MTD_AT91_DATAFLASH_CARD
|
||||
|
||||
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devic
|
||||
obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o
|
||||
obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o
|
||||
obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o
|
||||
obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o
|
||||
|
||||
# AT91RM9200 board-specific support
|
||||
obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
|
||||
@@ -36,9 +37,13 @@ obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
|
||||
# AT91SAM9263 board-specific support
|
||||
obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
|
||||
|
||||
# AT91SAM9RL board-specific support
|
||||
obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o
|
||||
|
||||
# LEDs support
|
||||
led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
|
||||
led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
|
||||
led-$(CONFIG_MACH_AT91SAM9261EK)+= leds.o
|
||||
led-$(CONFIG_MACH_CSB337) += leds.o
|
||||
led-$(CONFIG_MACH_CSB637) += leds.o
|
||||
led-$(CONFIG_MACH_KB9200) += leds.o
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
#define SZ_512 0x00000200
|
||||
#define SZ_256 0x00000100
|
||||
#define SZ_16 0x00000010
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Host
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
#define SZ_512 0x00000200
|
||||
#define SZ_256 0x00000100
|
||||
#define SZ_16 0x00000010
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Host
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
#define SZ_512 0x00000200
|
||||
#define SZ_256 0x00000100
|
||||
#define SZ_16 0x00000010
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Host
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
#define SZ_512 0x00000200
|
||||
#define SZ_256 0x00000100
|
||||
#define SZ_16 0x00000010
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Host
|
||||
|
||||
@@ -0,0 +1,341 @@
|
||||
/*
|
||||
* arch/arm/mach-at91/at91sam9rl.c
|
||||
*
|
||||
* Copyright (C) 2005 SAN People
|
||||
* Copyright (C) 2007 Atmel Corporation
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file COPYING in the main directory of this archive for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <asm/arch/at91sam9rl.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
|
||||
static struct map_desc at91sam9rl_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = AT91_VA_BASE_SYS,
|
||||
.pfn = __phys_to_pfn(AT91_BASE_SYS),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
static struct map_desc at91sam9rl_sram_desc[] __initdata = {
|
||||
{
|
||||
.pfn = __phys_to_pfn(AT91SAM9RL_SRAM_BASE),
|
||||
.type = MT_DEVICE,
|
||||
}
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* The peripheral clocks.
|
||||
*/
|
||||
static struct clk pioA_clk = {
|
||||
.name = "pioA_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_PIOA,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk pioB_clk = {
|
||||
.name = "pioB_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_PIOB,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk pioC_clk = {
|
||||
.name = "pioC_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_PIOC,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk pioD_clk = {
|
||||
.name = "pioD_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_PIOD,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart0_clk = {
|
||||
.name = "usart0_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_US0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart1_clk = {
|
||||
.name = "usart1_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_US1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart2_clk = {
|
||||
.name = "usart2_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_US2,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart3_clk = {
|
||||
.name = "usart3_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_US3,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk mmc_clk = {
|
||||
.name = "mci_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_MCI,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk twi0_clk = {
|
||||
.name = "twi0_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_TWI0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk twi1_clk = {
|
||||
.name = "twi1_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_TWI1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk spi_clk = {
|
||||
.name = "spi_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_SPI,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ssc0_clk = {
|
||||
.name = "ssc0_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_SSC0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ssc1_clk = {
|
||||
.name = "ssc1_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_SSC1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tc0_clk = {
|
||||
.name = "tc0_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_TC0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tc1_clk = {
|
||||
.name = "tc1_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_TC1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tc2_clk = {
|
||||
.name = "tc2_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_TC2,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk pwmc_clk = {
|
||||
.name = "pwmc_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_PWMC,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tsc_clk = {
|
||||
.name = "tsc_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_TSC,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk dma_clk = {
|
||||
.name = "dma_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_DMA,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk udphs_clk = {
|
||||
.name = "udphs_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_UDPHS,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk lcdc_clk = {
|
||||
.name = "lcdc_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_LCDC,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ac97_clk = {
|
||||
.name = "ac97_clk",
|
||||
.pmc_mask = 1 << AT91SAM9RL_ID_AC97C,
|
||||
.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,
|
||||
&twi0_clk,
|
||||
&twi1_clk,
|
||||
&spi_clk,
|
||||
&ssc0_clk,
|
||||
&ssc1_clk,
|
||||
&tc0_clk,
|
||||
&tc1_clk,
|
||||
&tc2_clk,
|
||||
&pwmc_clk,
|
||||
&tsc_clk,
|
||||
&dma_clk,
|
||||
&udphs_clk,
|
||||
&lcdc_clk,
|
||||
&ac97_clk,
|
||||
// irq0
|
||||
};
|
||||
|
||||
/*
|
||||
* The two 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 void __init at91sam9rl_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);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
static struct at91_gpio_bank at91sam9rl_gpio[] = {
|
||||
{
|
||||
.id = AT91SAM9RL_ID_PIOA,
|
||||
.offset = AT91_PIOA,
|
||||
.clock = &pioA_clk,
|
||||
}, {
|
||||
.id = AT91SAM9RL_ID_PIOB,
|
||||
.offset = AT91_PIOB,
|
||||
.clock = &pioB_clk,
|
||||
}, {
|
||||
.id = AT91SAM9RL_ID_PIOC,
|
||||
.offset = AT91_PIOC,
|
||||
.clock = &pioC_clk,
|
||||
}, {
|
||||
.id = AT91SAM9RL_ID_PIOD,
|
||||
.offset = AT91_PIOD,
|
||||
.clock = &pioD_clk,
|
||||
}
|
||||
};
|
||||
|
||||
static void at91sam9rl_reset(void)
|
||||
{
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* AT91SAM9RL processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at91sam9rl_initialize(unsigned long main_clock)
|
||||
{
|
||||
unsigned long cidr, sram_size;
|
||||
|
||||
/* Map peripherals */
|
||||
iotable_init(at91sam9rl_io_desc, ARRAY_SIZE(at91sam9rl_io_desc));
|
||||
|
||||
cidr = at91_sys_read(AT91_DBGU_CIDR);
|
||||
|
||||
switch (cidr & AT91_CIDR_SRAMSIZ) {
|
||||
case AT91_CIDR_SRAMSIZ_32K:
|
||||
sram_size = 2 * SZ_16K;
|
||||
break;
|
||||
case AT91_CIDR_SRAMSIZ_16K:
|
||||
default:
|
||||
sram_size = SZ_16K;
|
||||
}
|
||||
|
||||
at91sam9rl_sram_desc->virtual = AT91_IO_VIRT_BASE - sram_size;
|
||||
at91sam9rl_sram_desc->length = sram_size;
|
||||
|
||||
/* Map SRAM */
|
||||
iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc));
|
||||
|
||||
at91_arch_reset = at91sam9rl_reset;
|
||||
at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
|
||||
|
||||
/* Init clock subsystem */
|
||||
at91_clock_init(main_clock);
|
||||
|
||||
/* Register the processor-specific clocks */
|
||||
at91sam9rl_register_clocks();
|
||||
|
||||
/* Register GPIO subsystem */
|
||||
at91_gpio_init(at91sam9rl_gpio, 4);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Interrupt initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* The default interrupt priority levels (0 = lowest, 7 = highest).
|
||||
*/
|
||||
static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = {
|
||||
7, /* Advanced Interrupt Controller */
|
||||
7, /* System Peripherals */
|
||||
1, /* Parallel IO Controller A */
|
||||
1, /* Parallel IO Controller B */
|
||||
1, /* Parallel IO Controller C */
|
||||
1, /* Parallel IO Controller D */
|
||||
5, /* USART 0 */
|
||||
5, /* USART 1 */
|
||||
5, /* USART 2 */
|
||||
5, /* USART 3 */
|
||||
0, /* Multimedia Card Interface */
|
||||
6, /* Two-Wire Interface 0 */
|
||||
6, /* Two-Wire Interface 1 */
|
||||
5, /* Serial Peripheral Interface */
|
||||
4, /* Serial Synchronous Controller 0 */
|
||||
4, /* Serial Synchronous Controller 1 */
|
||||
0, /* Timer Counter 0 */
|
||||
0, /* Timer Counter 1 */
|
||||
0, /* Timer Counter 2 */
|
||||
0,
|
||||
0, /* Touch Screen Controller */
|
||||
0, /* DMA Controller */
|
||||
2, /* USB Device High speed port */
|
||||
2, /* LCD Controller */
|
||||
6, /* AC97 Controller */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0, /* Advanced Interrupt Controller */
|
||||
};
|
||||
|
||||
void __init at91sam9rl_init_interrupts(unsigned int priority[NR_AIC_IRQS])
|
||||
{
|
||||
if (!priority)
|
||||
priority = at91sam9rl_default_irq_priority;
|
||||
|
||||
/* Initialize the AIC interrupt controller */
|
||||
at91_aic_init(priority);
|
||||
|
||||
/* Enable GPIO interrupts */
|
||||
at91_gpio_irq_setup();
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -60,6 +60,9 @@ static void __init ek_map_io(void)
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9261_initialize(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&ek_uart_config);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
/*
|
||||
* Copyright (C) 2005 SAN People
|
||||
* Copyright (C) 2007 Atmel Corporation
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file COPYING in the main directory of this archive for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <video/atmel_lcdc.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/at91sam926x_mc.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
/*
|
||||
* Serial port configuration.
|
||||
* 0 .. 3 = USART0 .. USART3
|
||||
* 4 = DBGU
|
||||
*/
|
||||
static struct at91_uart_config __initdata ek_uart_config = {
|
||||
.console_tty = 0, /* ttyS0 */
|
||||
.nr_tty = 2,
|
||||
.tty_map = { 4, 0, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
|
||||
};
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 12.000 MHz crystal */
|
||||
at91sam9rl_initialize(12000000);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&ek_uart_config);
|
||||
}
|
||||
|
||||
static void __init ek_init_irq(void)
|
||||
{
|
||||
at91sam9rl_init_interrupts(NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* MCI (SD/MMC)
|
||||
*/
|
||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
||||
.wire4 = 1,
|
||||
.det_pin = AT91_PIN_PA15,
|
||||
// .wp_pin = ... not connected
|
||||
// .vcc_pin = ... not connected
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* NAND flash
|
||||
*/
|
||||
static struct mtd_partition __initdata ek_nand_partition[] = {
|
||||
{
|
||||
.name = "Partition 1",
|
||||
.offset = 0,
|
||||
.size = 256 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "Partition 2",
|
||||
.offset = 256 * 1024 ,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mtd_partition *nand_partitions(int size, int *num_partitions)
|
||||
{
|
||||
*num_partitions = ARRAY_SIZE(ek_nand_partition);
|
||||
return ek_nand_partition;
|
||||
}
|
||||
|
||||
static struct at91_nand_data __initdata ek_nand_data = {
|
||||
.ale = 21,
|
||||
.cle = 22,
|
||||
// .det_pin = ... not connected
|
||||
.rdy_pin = AT91_PIN_PD17,
|
||||
.enable_pin = AT91_PIN_PB6,
|
||||
.partition_info = nand_partitions,
|
||||
.bus_width_16 = 0,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* SPI devices
|
||||
*/
|
||||
static struct spi_board_info ek_spi_devices[] = {
|
||||
{ /* DataFlash chip */
|
||||
.modalias = "mtd_dataflash",
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 15 * 1000 * 1000,
|
||||
.bus_num = 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* LCD Controller
|
||||
*/
|
||||
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
|
||||
static struct fb_videomode at91_tft_vga_modes[] = {
|
||||
{
|
||||
.name = "TX09D50VM1CCA @ 60",
|
||||
.refresh = 60,
|
||||
.xres = 240, .yres = 320,
|
||||
.pixclock = KHZ2PICOS(4965),
|
||||
|
||||
.left_margin = 1, .right_margin = 33,
|
||||
.upper_margin = 1, .lower_margin = 0,
|
||||
.hsync_len = 5, .vsync_len = 1,
|
||||
|
||||
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
},
|
||||
};
|
||||
|
||||
static struct fb_monspecs at91fb_default_monspecs = {
|
||||
.manufacturer = "HIT",
|
||||
.monitor = "TX09D50VM1CCA",
|
||||
|
||||
.modedb = at91_tft_vga_modes,
|
||||
.modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
|
||||
.hfmin = 15000,
|
||||
.hfmax = 64000,
|
||||
.vfmin = 50,
|
||||
.vfmax = 150,
|
||||
};
|
||||
|
||||
#define AT91SAM9RL_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
|
||||
| ATMEL_LCDC_DISTYPE_TFT \
|
||||
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
|
||||
|
||||
static void at91_lcdc_power_control(int on)
|
||||
{
|
||||
if (on)
|
||||
at91_set_gpio_value(AT91_PIN_PA30, 0); /* power up */
|
||||
else
|
||||
at91_set_gpio_value(AT91_PIN_PA30, 1); /* power down */
|
||||
}
|
||||
|
||||
/* Driver datas */
|
||||
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
|
||||
.default_bpp = 16,
|
||||
.default_dmacon = ATMEL_LCDC_DMAEN,
|
||||
.default_lcdcon2 = AT91SAM9RL_DEFAULT_LCDCON2,
|
||||
.default_monspecs = &at91fb_default_monspecs,
|
||||
.atmel_lcdfb_power_control = at91_lcdc_power_control,
|
||||
.guard_time = 1,
|
||||
};
|
||||
|
||||
#else
|
||||
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
|
||||
#endif
|
||||
|
||||
|
||||
static void __init ek_board_init(void)
|
||||
{
|
||||
/* Serial */
|
||||
at91_add_device_serial();
|
||||
/* I2C */
|
||||
at91_add_device_i2c();
|
||||
/* NAND */
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
/* SPI */
|
||||
at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
|
||||
/* MMC */
|
||||
at91_add_device_mmc(0, &ek_mmc_data);
|
||||
/* LCD Controller */
|
||||
at91_add_device_lcdc(&ek_lcdc_data);
|
||||
}
|
||||
|
||||
MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
|
||||
/* Maintainer: Atmel */
|
||||
.phys_io = AT91_BASE_SYS,
|
||||
.io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
@@ -13,12 +13,14 @@ extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned shor
|
||||
extern void __init at91sam9260_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9261_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9263_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9rl_initialize(unsigned long main_clock);
|
||||
|
||||
/* Interrupts */
|
||||
extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91_aic_init(unsigned int priority[]);
|
||||
|
||||
/* Timer */
|
||||
|
||||
Loaded 20 of 139 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user