mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (35 commits) ARM: Update (and cut down) mach-types ARM: 6771/1: vexpress: add support for multiple core tiles ARM: 6797/1: hw_breakpoint: Fix newlines in WARNings ARM: 6751/1: vexpress: select applicable errata workarounds in Kconfig ARM: 6753/1: omap4: Enable ARM local timers with OMAP4430 es1.0 exception ARM: 6759/1: smp: Select local timers vs broadcast timer support runtime ARM: pgtable: add pud-level code ARM: 6673/1: LPAE: use phys_addr_t instead of unsigned long for start of membanks ARM: Use long long format when printing meminfo physical addresses ARM: integrator: add Integrator/CP sched_clock support ARM: realview/vexpress: consolidate SMP bringup code ARM: realview/vexpress: consolidate localtimer support ARM: integrator/versatile: consolidate FPGA IRQ handling code ARM: rationalize versatile family Kconfig/Makefile ARM: realview: remove old AMBA device DMA definitions ARM: versatile: remove old AMBA device DMA definitions ARM: vexpress: use new init_early for clock tree and sched_clock init ARM: realview: use new init_early for clock tree and sched_clock init ARM: versatile: use new init_early for clock tree and sched_clock init ARM: integrator: use new init_early for clock tree init ...
This commit is contained in:
@@ -235,6 +235,7 @@ config ARCH_INTEGRATOR
|
||||
select ICST
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select PLAT_VERSATILE
|
||||
select PLAT_VERSATILE_FPGA_IRQ
|
||||
help
|
||||
Support for ARM's Integrator platform.
|
||||
|
||||
@@ -242,11 +243,11 @@ config ARCH_REALVIEW
|
||||
bool "ARM Ltd. RealView family"
|
||||
select ARM_AMBA
|
||||
select CLKDEV_LOOKUP
|
||||
select HAVE_SCHED_CLOCK
|
||||
select ICST
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||
select PLAT_VERSATILE
|
||||
select PLAT_VERSATILE_CLCD
|
||||
select ARM_TIMER_SP804
|
||||
select GPIO_PL061 if GPIOLIB
|
||||
help
|
||||
@@ -257,11 +258,12 @@ config ARCH_VERSATILE
|
||||
select ARM_AMBA
|
||||
select ARM_VIC
|
||||
select CLKDEV_LOOKUP
|
||||
select HAVE_SCHED_CLOCK
|
||||
select ICST
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||
select PLAT_VERSATILE
|
||||
select PLAT_VERSATILE_CLCD
|
||||
select PLAT_VERSATILE_FPGA_IRQ
|
||||
select ARM_TIMER_SP804
|
||||
help
|
||||
This enables support for ARM Ltd Versatile board.
|
||||
@@ -274,9 +276,10 @@ config ARCH_VEXPRESS
|
||||
select CLKDEV_LOOKUP
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select HAVE_CLK
|
||||
select HAVE_SCHED_CLOCK
|
||||
select HAVE_PATA_PLATFORM
|
||||
select ICST
|
||||
select PLAT_VERSATILE
|
||||
select PLAT_VERSATILE_CLCD
|
||||
help
|
||||
This enables support for the ARM Ltd Versatile Express boards.
|
||||
|
||||
@@ -1011,6 +1014,7 @@ source "arch/arm/mach-ux500/Kconfig"
|
||||
source "arch/arm/mach-versatile/Kconfig"
|
||||
|
||||
source "arch/arm/mach-vexpress/Kconfig"
|
||||
source "arch/arm/plat-versatile/Kconfig"
|
||||
|
||||
source "arch/arm/mach-vt8500/Kconfig"
|
||||
|
||||
|
||||
@@ -44,8 +44,14 @@ int local_timer_ack(void);
|
||||
/*
|
||||
* Setup a local timer interrupt for a CPU.
|
||||
*/
|
||||
void local_timer_setup(struct clock_event_device *);
|
||||
int local_timer_setup(struct clock_event_device *);
|
||||
|
||||
#else
|
||||
|
||||
static inline int local_timer_setup(struct clock_event_device *evt)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef __ASM_OUTERCACHE_H
|
||||
#define __ASM_OUTERCACHE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct outer_cache_fns {
|
||||
void (*inv_range)(unsigned long, unsigned long);
|
||||
void (*clean_range)(unsigned long, unsigned long);
|
||||
@@ -38,17 +40,17 @@ struct outer_cache_fns {
|
||||
|
||||
extern struct outer_cache_fns outer_cache;
|
||||
|
||||
static inline void outer_inv_range(unsigned long start, unsigned long end)
|
||||
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
if (outer_cache.inv_range)
|
||||
outer_cache.inv_range(start, end);
|
||||
}
|
||||
static inline void outer_clean_range(unsigned long start, unsigned long end)
|
||||
static inline void outer_clean_range(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
if (outer_cache.clean_range)
|
||||
outer_cache.clean_range(start, end);
|
||||
}
|
||||
static inline void outer_flush_range(unsigned long start, unsigned long end)
|
||||
static inline void outer_flush_range(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
if (outer_cache.flush_range)
|
||||
outer_cache.flush_range(start, end);
|
||||
@@ -74,11 +76,11 @@ static inline void outer_disable(void)
|
||||
|
||||
#else
|
||||
|
||||
static inline void outer_inv_range(unsigned long start, unsigned long end)
|
||||
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
|
||||
{ }
|
||||
static inline void outer_clean_range(unsigned long start, unsigned long end)
|
||||
static inline void outer_clean_range(phys_addr_t start, phys_addr_t end)
|
||||
{ }
|
||||
static inline void outer_flush_range(unsigned long start, unsigned long end)
|
||||
static inline void outer_flush_range(phys_addr_t start, phys_addr_t end)
|
||||
{ }
|
||||
static inline void outer_flush_all(void) { }
|
||||
static inline void outer_inv_all(void) { }
|
||||
|
||||
@@ -301,6 +301,7 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
||||
#define pgd_present(pgd) (1)
|
||||
#define pgd_clear(pgdp) do { } while (0)
|
||||
#define set_pgd(pgd,pgdp) do { } while (0)
|
||||
#define set_pud(pud,pudp) do { } while (0)
|
||||
|
||||
|
||||
/* Find an entry in the second-level page table.. */
|
||||
@@ -351,7 +352,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
|
||||
#define pte_unmap(pte) __pte_unmap(pte)
|
||||
|
||||
#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
|
||||
#define pfn_pte(pfn,prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
|
||||
#define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot))
|
||||
|
||||
#define pte_page(pte) pfn_to_page(pte_pfn(pte))
|
||||
#define mk_pte(page,prot) pfn_pte(page_to_pfn(page), prot)
|
||||
|
||||
@@ -195,7 +195,7 @@ static struct tagtable __tagtable_##fn __tag = { tag, fn }
|
||||
#define NR_BANKS 8
|
||||
|
||||
struct membank {
|
||||
unsigned long start;
|
||||
phys_addr_t start;
|
||||
unsigned long size;
|
||||
unsigned int highmem;
|
||||
};
|
||||
|
||||
@@ -238,8 +238,8 @@ static int enable_monitor_mode(void)
|
||||
ARM_DBG_READ(c1, 0, dscr);
|
||||
|
||||
/* Ensure that halting mode is disabled. */
|
||||
if (WARN_ONCE(dscr & ARM_DSCR_HDBGEN, "halting debug mode enabled."
|
||||
"Unable to access hardware resources.")) {
|
||||
if (WARN_ONCE(dscr & ARM_DSCR_HDBGEN,
|
||||
"halting debug mode enabled. Unable to access hardware resources.\n")) {
|
||||
ret = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
@@ -377,7 +377,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
|
||||
}
|
||||
}
|
||||
|
||||
if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot")) {
|
||||
if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot\n")) {
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
@@ -423,7 +423,7 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp)
|
||||
}
|
||||
}
|
||||
|
||||
if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot"))
|
||||
if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot\n"))
|
||||
return;
|
||||
|
||||
/* Reset the control register. */
|
||||
@@ -635,7 +635,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
|
||||
if (WARN_ONCE(!bp->overflow_handler &&
|
||||
(arch_check_bp_in_kernelspace(bp) || !core_has_mismatch_brps()
|
||||
|| !bp->hw.bp_target),
|
||||
"overflow handler required but none found")) {
|
||||
"overflow handler required but none found\n")) {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
out:
|
||||
@@ -936,8 +936,8 @@ static int __init arch_hw_breakpoint_init(void)
|
||||
ARM_DBG_READ(c1, 0, dscr);
|
||||
if (dscr & ARM_DSCR_HDBGEN) {
|
||||
max_watchpoint_len = 4;
|
||||
pr_warning("halting debug mode enabled. Assuming maximum "
|
||||
"watchpoint size of %u bytes.", max_watchpoint_len);
|
||||
pr_warning("halting debug mode enabled. Assuming maximum watchpoint size of %u bytes.\n",
|
||||
max_watchpoint_len);
|
||||
} else {
|
||||
/* Work out the maximum supported watchpoint length. */
|
||||
max_watchpoint_len = get_max_wp_len();
|
||||
|
||||
@@ -466,13 +466,13 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
|
||||
/* can't use cpu_relax() here as it may require MMU setup */;
|
||||
}
|
||||
|
||||
static int __init arm_add_memory(unsigned long start, unsigned long size)
|
||||
static int __init arm_add_memory(phys_addr_t start, unsigned long size)
|
||||
{
|
||||
struct membank *bank = &meminfo.bank[meminfo.nr_banks];
|
||||
|
||||
if (meminfo.nr_banks >= NR_BANKS) {
|
||||
printk(KERN_CRIT "NR_BANKS too low, "
|
||||
"ignoring memory at %#lx\n", start);
|
||||
"ignoring memory at 0x%08llx\n", (long long)start);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,8 @@ static int __init arm_add_memory(unsigned long start, unsigned long size)
|
||||
static int __init early_mem(char *p)
|
||||
{
|
||||
static int usermem __initdata = 0;
|
||||
unsigned long size, start;
|
||||
unsigned long size;
|
||||
phys_addr_t start;
|
||||
char *endp;
|
||||
|
||||
/*
|
||||
|
||||
@@ -474,13 +474,12 @@ static void smp_timer_broadcast(const struct cpumask *mask)
|
||||
#define smp_timer_broadcast NULL
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_LOCAL_TIMERS
|
||||
static void broadcast_timer_set_mode(enum clock_event_mode mode,
|
||||
struct clock_event_device *evt)
|
||||
{
|
||||
}
|
||||
|
||||
static void local_timer_setup(struct clock_event_device *evt)
|
||||
static void broadcast_timer_setup(struct clock_event_device *evt)
|
||||
{
|
||||
evt->name = "dummy_timer";
|
||||
evt->features = CLOCK_EVT_FEAT_ONESHOT |
|
||||
@@ -492,7 +491,6 @@ static void local_timer_setup(struct clock_event_device *evt)
|
||||
|
||||
clockevents_register_device(evt);
|
||||
}
|
||||
#endif
|
||||
|
||||
void __cpuinit percpu_timer_setup(void)
|
||||
{
|
||||
@@ -502,7 +500,8 @@ void __cpuinit percpu_timer_setup(void)
|
||||
evt->cpumask = cpumask_of(cpu);
|
||||
evt->broadcast = smp_timer_broadcast;
|
||||
|
||||
local_timer_setup(evt);
|
||||
if (local_timer_setup(evt))
|
||||
broadcast_timer_setup(evt);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
|
||||
@@ -712,17 +712,17 @@ EXPORT_SYMBOL(__readwrite_bug);
|
||||
|
||||
void __pte_error(const char *file, int line, pte_t pte)
|
||||
{
|
||||
printk("%s:%d: bad pte %08lx.\n", file, line, pte_val(pte));
|
||||
printk("%s:%d: bad pte %08llx.\n", file, line, (long long)pte_val(pte));
|
||||
}
|
||||
|
||||
void __pmd_error(const char *file, int line, pmd_t pmd)
|
||||
{
|
||||
printk("%s:%d: bad pmd %08lx.\n", file, line, pmd_val(pmd));
|
||||
printk("%s:%d: bad pmd %08llx.\n", file, line, (long long)pmd_val(pmd));
|
||||
}
|
||||
|
||||
void __pgd_error(const char *file, int line, pgd_t pgd)
|
||||
{
|
||||
printk("%s:%d: bad pgd %08lx.\n", file, line, pgd_val(pgd));
|
||||
printk("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd));
|
||||
}
|
||||
|
||||
asmlinkage void __div0(void)
|
||||
|
||||
@@ -27,13 +27,18 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
|
||||
pgd_t *pgd;
|
||||
pmd_t *pmd;
|
||||
pte_t *pte;
|
||||
pud_t *pud;
|
||||
spinlock_t *ptl;
|
||||
|
||||
pgd = pgd_offset(current->mm, addr);
|
||||
if (unlikely(pgd_none(*pgd) || pgd_bad(*pgd)))
|
||||
return 0;
|
||||
|
||||
pmd = pmd_offset(pgd, addr);
|
||||
pud = pud_offset(pgd, addr);
|
||||
if (unlikely(pud_none(*pud) || pud_bad(*pud)))
|
||||
return 0;
|
||||
|
||||
pmd = pmd_offset(pud, addr);
|
||||
if (unlikely(pmd_none(*pmd) || pmd_bad(*pmd)))
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
/*
|
||||
* Setup the local clock events for a CPU.
|
||||
*/
|
||||
void __cpuinit local_timer_setup(struct clock_event_device *evt)
|
||||
int __cpuinit local_timer_setup(struct clock_event_device *evt)
|
||||
{
|
||||
evt->irq = IRQ_LOCALTIMER;
|
||||
twd_timer_setup(evt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ config ARCH_INTEGRATOR_CP
|
||||
bool "Support Integrator/CP platform"
|
||||
select ARCH_CINTEGRATOR
|
||||
select ARM_TIMER_SP804
|
||||
select PLAT_VERSATILE_CLCD
|
||||
help
|
||||
Include support for the ARM(R) Integrator CP platform.
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
void integrator_init_early(void);
|
||||
void integrator_reserve(void);
|
||||
|
||||
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
|
||||
}
|
||||
};
|
||||
|
||||
void __init integrator_init_early(void)
|
||||
{
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
}
|
||||
|
||||
static int __init integrator_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||
struct amba_device *d = amba_devs[i];
|
||||
amba_device_register(d, &iomem_resource);
|
||||
|
||||
@@ -121,6 +121,7 @@ static struct clcd_panel vga = {
|
||||
.height = -1,
|
||||
.tim2 = TIM2_BCD | TIM2_IPC,
|
||||
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
|
||||
.caps = CLCD_CAP_5551,
|
||||
.connector = IMPD1_CTRL_DISP_VGA,
|
||||
.bpp = 16,
|
||||
.grayscale = 0,
|
||||
@@ -149,6 +150,7 @@ static struct clcd_panel svga = {
|
||||
.tim2 = TIM2_BCD,
|
||||
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
|
||||
.connector = IMPD1_CTRL_DISP_VGA,
|
||||
.caps = CLCD_CAP_5551,
|
||||
.bpp = 16,
|
||||
.grayscale = 0,
|
||||
};
|
||||
@@ -175,6 +177,7 @@ static struct clcd_panel prospector = {
|
||||
.height = -1,
|
||||
.tim2 = TIM2_BCD,
|
||||
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
|
||||
.caps = CLCD_CAP_5551,
|
||||
.fixedtimings = 1,
|
||||
.connector = IMPD1_CTRL_DISP_LCD,
|
||||
.bpp = 16,
|
||||
@@ -206,6 +209,7 @@ static struct clcd_panel ltm10c209 = {
|
||||
.height = -1,
|
||||
.tim2 = TIM2_BCD,
|
||||
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
|
||||
.caps = CLCD_CAP_5551,
|
||||
.fixedtimings = 1,
|
||||
.connector = IMPD1_CTRL_DISP_LCD,
|
||||
.bpp = 16,
|
||||
@@ -279,6 +283,7 @@ static void impd1fb_clcd_remove(struct clcd_fb *fb)
|
||||
|
||||
static struct clcd_board impd1_clcd_data = {
|
||||
.name = "IM-PD/1",
|
||||
.caps = CLCD_CAP_5551 | CLCD_CAP_888,
|
||||
.check = clcdfb_check,
|
||||
.decode = clcdfb_decode,
|
||||
.disable = impd1fb_clcd_disable,
|
||||
|
||||
@@ -24,9 +24,9 @@ void cm_control(u32, u32);
|
||||
#define CM_CTRL_LCDBIASDN (1 << 10)
|
||||
#define CM_CTRL_LCDMUXSEL_MASK (7 << 11)
|
||||
#define CM_CTRL_LCDMUXSEL_GENLCD (1 << 11)
|
||||
#define CM_CTRL_LCDMUXSEL_VGA_16BPP (2 << 11)
|
||||
#define CM_CTRL_LCDMUXSEL_VGA565_TFT555 (2 << 11)
|
||||
#define CM_CTRL_LCDMUXSEL_SHARPLCD (3 << 11)
|
||||
#define CM_CTRL_LCDMUXSEL_VGA_8421BPP (4 << 11)
|
||||
#define CM_CTRL_LCDMUXSEL_VGA555_TFT555 (4 << 11)
|
||||
#define CM_CTRL_LCDEN0 (1 << 14)
|
||||
#define CM_CTRL_LCDEN1 (1 << 15)
|
||||
#define CM_CTRL_STATIC1 (1 << 16)
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include <plat/fpga-irq.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
@@ -57,10 +59,10 @@
|
||||
* Setup a VA for the Integrator interrupt controller (for header #0,
|
||||
* just for now).
|
||||
*/
|
||||
#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
|
||||
#define VA_SC_BASE IO_ADDRESS(INTEGRATOR_SC_BASE)
|
||||
#define VA_EBI_BASE IO_ADDRESS(INTEGRATOR_EBI_BASE)
|
||||
#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_IC)
|
||||
#define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE)
|
||||
#define VA_SC_BASE __io_address(INTEGRATOR_SC_BASE)
|
||||
#define VA_EBI_BASE __io_address(INTEGRATOR_EBI_BASE)
|
||||
#define VA_CMIC_BASE __io_address(INTEGRATOR_HDR_IC)
|
||||
|
||||
/*
|
||||
* Logical Physical
|
||||
@@ -156,27 +158,14 @@ static void __init ap_map_io(void)
|
||||
|
||||
#define INTEGRATOR_SC_VALID_INT 0x003fffff
|
||||
|
||||
static void sc_mask_irq(struct irq_data *d)
|
||||
{
|
||||
writel(1 << d->irq, VA_IC_BASE + IRQ_ENABLE_CLEAR);
|
||||
}
|
||||
|
||||
static void sc_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
writel(1 << d->irq, VA_IC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irq_chip sc_chip = {
|
||||
.name = "SC",
|
||||
.irq_ack = sc_mask_irq,
|
||||
.irq_mask = sc_mask_irq,
|
||||
.irq_unmask = sc_unmask_irq,
|
||||
static struct fpga_irq_data sc_irq_data = {
|
||||
.base = VA_IC_BASE,
|
||||
.irq_start = 0,
|
||||
.chip.name = "SC",
|
||||
};
|
||||
|
||||
static void __init ap_init_irq(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* Disable all interrupts initially. */
|
||||
/* Do the core module ones */
|
||||
writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
@@ -185,13 +174,7 @@ static void __init ap_init_irq(void)
|
||||
writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR);
|
||||
writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);
|
||||
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
if (((1 << i) & INTEGRATOR_SC_VALID_INT) != 0) {
|
||||
set_irq_chip(i, &sc_chip);
|
||||
set_irq_handler(i, handle_level_irq);
|
||||
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
||||
}
|
||||
}
|
||||
fpga_irq_init(-1, INTEGRATOR_SC_VALID_INT, &sc_irq_data);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -282,7 +265,7 @@ static void ap_flash_exit(void)
|
||||
|
||||
static void ap_flash_set_vpp(int on)
|
||||
{
|
||||
unsigned long reg = on ? SC_CTRLS : SC_CTRLC;
|
||||
void __iomem *reg = on ? SC_CTRLS : SC_CTRLC;
|
||||
|
||||
writel(INTEGRATOR_SC_CTRL_nFLVPPEN, reg);
|
||||
}
|
||||
@@ -499,8 +482,9 @@ static struct sys_timer ap_timer = {
|
||||
MACHINE_START(INTEGRATOR, "ARM-Integrator")
|
||||
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
||||
.boot_params = 0x00000100,
|
||||
.map_io = ap_map_io,
|
||||
.reserve = integrator_reserve,
|
||||
.map_io = ap_map_io,
|
||||
.init_early = integrator_init_early,
|
||||
.init_irq = ap_init_irq,
|
||||
.timer = &ap_timer,
|
||||
.init_machine = ap_init,
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
|
||||
#include <asm/hardware/timer-sp.h>
|
||||
|
||||
#include <plat/clcd.h>
|
||||
#include <plat/fpga-irq.h>
|
||||
#include <plat/sched_clock.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define INTCP_PA_FLASH_BASE 0x24000000
|
||||
@@ -49,9 +53,9 @@
|
||||
|
||||
#define INTCP_PA_CLCD_BASE 0xc0000000
|
||||
|
||||
#define INTCP_VA_CIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE + 0x40)
|
||||
#define INTCP_VA_PIC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
|
||||
#define INTCP_VA_SIC_BASE IO_ADDRESS(INTEGRATOR_CP_SIC_BASE)
|
||||
#define INTCP_VA_CIC_BASE __io_address(INTEGRATOR_HDR_BASE + 0x40)
|
||||
#define INTCP_VA_PIC_BASE __io_address(INTEGRATOR_IC_BASE)
|
||||
#define INTCP_VA_SIC_BASE __io_address(INTEGRATOR_CP_SIC_BASE)
|
||||
|
||||
#define INTCP_ETH_SIZE 0x10
|
||||
|
||||
@@ -139,129 +143,48 @@ static void __init intcp_map_io(void)
|
||||
iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc));
|
||||
}
|
||||
|
||||
#define cic_writel __raw_writel
|
||||
#define cic_readl __raw_readl
|
||||
#define pic_writel __raw_writel
|
||||
#define pic_readl __raw_readl
|
||||
#define sic_writel __raw_writel
|
||||
#define sic_readl __raw_readl
|
||||
|
||||
static void cic_mask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int irq = d->irq - IRQ_CIC_START;
|
||||
cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
}
|
||||
|
||||
static void cic_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int irq = d->irq - IRQ_CIC_START;
|
||||
cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irq_chip cic_chip = {
|
||||
.name = "CIC",
|
||||
.irq_ack = cic_mask_irq,
|
||||
.irq_mask = cic_mask_irq,
|
||||
.irq_unmask = cic_unmask_irq,
|
||||
static struct fpga_irq_data cic_irq_data = {
|
||||
.base = INTCP_VA_CIC_BASE,
|
||||
.irq_start = IRQ_CIC_START,
|
||||
.chip.name = "CIC",
|
||||
};
|
||||
|
||||
static void pic_mask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int irq = d->irq - IRQ_PIC_START;
|
||||
pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
}
|
||||
|
||||
static void pic_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int irq = d->irq - IRQ_PIC_START;
|
||||
pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irq_chip pic_chip = {
|
||||
.name = "PIC",
|
||||
.irq_ack = pic_mask_irq,
|
||||
.irq_mask = pic_mask_irq,
|
||||
.irq_unmask = pic_unmask_irq,
|
||||
static struct fpga_irq_data pic_irq_data = {
|
||||
.base = INTCP_VA_PIC_BASE,
|
||||
.irq_start = IRQ_PIC_START,
|
||||
.chip.name = "PIC",
|
||||
};
|
||||
|
||||
static void sic_mask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int irq = d->irq - IRQ_SIC_START;
|
||||
sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
}
|
||||
|
||||
static void sic_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int irq = d->irq - IRQ_SIC_START;
|
||||
sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irq_chip sic_chip = {
|
||||
.name = "SIC",
|
||||
.irq_ack = sic_mask_irq,
|
||||
.irq_mask = sic_mask_irq,
|
||||
.irq_unmask = sic_unmask_irq,
|
||||
static struct fpga_irq_data sic_irq_data = {
|
||||
.base = INTCP_VA_SIC_BASE,
|
||||
.irq_start = IRQ_SIC_START,
|
||||
.chip.name = "SIC",
|
||||
};
|
||||
|
||||
static void
|
||||
sic_handle_irq(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
unsigned long status = sic_readl(INTCP_VA_SIC_BASE + IRQ_STATUS);
|
||||
|
||||
if (status == 0) {
|
||||
do_bad_IRQ(irq, desc);
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
irq = ffs(status) - 1;
|
||||
status &= ~(1 << irq);
|
||||
|
||||
irq += IRQ_SIC_START;
|
||||
|
||||
generic_handle_irq(irq);
|
||||
} while (status);
|
||||
}
|
||||
|
||||
static void __init intcp_init_irq(void)
|
||||
{
|
||||
unsigned int i;
|
||||
u32 pic_mask, sic_mask;
|
||||
|
||||
pic_mask = ~((~0u) << (11 - IRQ_PIC_START));
|
||||
pic_mask |= (~((~0u) << (29 - 22))) << 22;
|
||||
sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START));
|
||||
|
||||
/*
|
||||
* Disable all interrupt sources
|
||||
*/
|
||||
pic_writel(0xffffffff, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
pic_writel(0xffffffff, INTCP_VA_PIC_BASE + FIQ_ENABLE_CLEAR);
|
||||
writel(0xffffffff, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
writel(0xffffffff, INTCP_VA_PIC_BASE + FIQ_ENABLE_CLEAR);
|
||||
writel(0xffffffff, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
writel(0xffffffff, INTCP_VA_CIC_BASE + FIQ_ENABLE_CLEAR);
|
||||
writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR);
|
||||
|
||||
for (i = IRQ_PIC_START; i <= IRQ_PIC_END; i++) {
|
||||
if (i == 11)
|
||||
i = 22;
|
||||
if (i == 29)
|
||||
break;
|
||||
set_irq_chip(i, &pic_chip);
|
||||
set_irq_handler(i, handle_level_irq);
|
||||
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
||||
}
|
||||
fpga_irq_init(-1, pic_mask, &pic_irq_data);
|
||||
|
||||
cic_writel(0xffffffff, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
cic_writel(0xffffffff, INTCP_VA_CIC_BASE + FIQ_ENABLE_CLEAR);
|
||||
fpga_irq_init(-1, ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)),
|
||||
&cic_irq_data);
|
||||
|
||||
for (i = IRQ_CIC_START; i <= IRQ_CIC_END; i++) {
|
||||
set_irq_chip(i, &cic_chip);
|
||||
set_irq_handler(i, handle_level_irq);
|
||||
set_irq_flags(i, IRQF_VALID);
|
||||
}
|
||||
|
||||
sic_writel(0x00000fff, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR);
|
||||
sic_writel(0x00000fff, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR);
|
||||
|
||||
for (i = IRQ_SIC_START; i <= IRQ_SIC_END; i++) {
|
||||
set_irq_chip(i, &sic_chip);
|
||||
set_irq_handler(i, handle_level_irq);
|
||||
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
||||
}
|
||||
|
||||
set_irq_chained_handler(IRQ_CP_CPPLDINT, sic_handle_irq);
|
||||
fpga_irq_init(IRQ_CP_CPPLDINT, sic_mask, &sic_irq_data);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -449,43 +372,21 @@ static struct amba_device aaci_device = {
|
||||
/*
|
||||
* CLCD support
|
||||
*/
|
||||
static struct clcd_panel vga = {
|
||||
.mode = {
|
||||
.name = "VGA",
|
||||
.refresh = 60,
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.pixclock = 39721,
|
||||
.left_margin = 40,
|
||||
.right_margin = 24,
|
||||
.upper_margin = 32,
|
||||
.lower_margin = 11,
|
||||
.hsync_len = 96,
|
||||
.vsync_len = 2,
|
||||
.sync = 0,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
},
|
||||
.width = -1,
|
||||
.height = -1,
|
||||
.tim2 = TIM2_BCD | TIM2_IPC,
|
||||
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
|
||||
.bpp = 16,
|
||||
.grayscale = 0,
|
||||
};
|
||||
|
||||
/*
|
||||
* Ensure VGA is selected.
|
||||
*/
|
||||
static void cp_clcd_enable(struct clcd_fb *fb)
|
||||
{
|
||||
u32 val;
|
||||
struct fb_var_screeninfo *var = &fb->fb.var;
|
||||
u32 val = CM_CTRL_STATIC1 | CM_CTRL_STATIC2;
|
||||
|
||||
if (fb->fb.var.bits_per_pixel <= 8)
|
||||
val = CM_CTRL_LCDMUXSEL_VGA_8421BPP;
|
||||
if (var->bits_per_pixel <= 8 ||
|
||||
(var->bits_per_pixel == 16 && var->green.length == 5))
|
||||
/* Pseudocolor, RGB555, BGR555 */
|
||||
val |= CM_CTRL_LCDMUXSEL_VGA555_TFT555;
|
||||
else if (fb->fb.var.bits_per_pixel <= 16)
|
||||
val = CM_CTRL_LCDMUXSEL_VGA_16BPP
|
||||
| CM_CTRL_LCDEN0 | CM_CTRL_LCDEN1
|
||||
| CM_CTRL_STATIC1 | CM_CTRL_STATIC2;
|
||||
/* truecolor RGB565 */
|
||||
val |= CM_CTRL_LCDMUXSEL_VGA565_TFT555;
|
||||
else
|
||||
val = 0; /* no idea for this, don't trust the docs */
|
||||
|
||||
@@ -498,49 +399,24 @@ static void cp_clcd_enable(struct clcd_fb *fb)
|
||||
CM_CTRL_n24BITEN, val);
|
||||
}
|
||||
|
||||
static unsigned long framesize = SZ_1M;
|
||||
|
||||
static int cp_clcd_setup(struct clcd_fb *fb)
|
||||
{
|
||||
dma_addr_t dma;
|
||||
fb->panel = versatile_clcd_get_panel("VGA");
|
||||
if (!fb->panel)
|
||||
return -EINVAL;
|
||||
|
||||
fb->panel = &vga;
|
||||
|
||||
fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize,
|
||||
&dma, GFP_KERNEL);
|
||||
if (!fb->fb.screen_base) {
|
||||
printk(KERN_ERR "CLCD: unable to map framebuffer\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
fb->fb.fix.smem_start = dma;
|
||||
fb->fb.fix.smem_len = framesize;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cp_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
|
||||
{
|
||||
return dma_mmap_writecombine(&fb->dev->dev, vma,
|
||||
fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start,
|
||||
fb->fb.fix.smem_len);
|
||||
}
|
||||
|
||||
static void cp_clcd_remove(struct clcd_fb *fb)
|
||||
{
|
||||
dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start);
|
||||
return versatile_clcd_setup_dma(fb, SZ_1M);
|
||||
}
|
||||
|
||||
static struct clcd_board clcd_data = {
|
||||
.name = "Integrator/CP",
|
||||
.caps = CLCD_CAP_5551 | CLCD_CAP_RGB565 | CLCD_CAP_888,
|
||||
.check = clcdfb_check,
|
||||
.decode = clcdfb_decode,
|
||||
.enable = cp_clcd_enable,
|
||||
.setup = cp_clcd_setup,
|
||||
.mmap = cp_clcd_mmap,
|
||||
.remove = cp_clcd_remove,
|
||||
.mmap = versatile_clcd_mmap_dma,
|
||||
.remove = versatile_clcd_remove_dma,
|
||||
};
|
||||
|
||||
static struct amba_device clcd_device = {
|
||||
@@ -565,11 +441,23 @@ static struct amba_device *amba_devs[] __initdata = {
|
||||
&clcd_device,
|
||||
};
|
||||
|
||||
#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28)
|
||||
|
||||
static void __init intcp_init_early(void)
|
||||
{
|
||||
clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups));
|
||||
|
||||
integrator_init_early();
|
||||
|
||||
#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK
|
||||
versatile_sched_clock_init(REFCOUNTER, 24000000);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __init intcp_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups));
|
||||
platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||
@@ -599,8 +487,9 @@ static struct sys_timer cp_timer = {
|
||||
MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
|
||||
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
||||
.boot_params = 0x00000100,
|
||||
.map_io = intcp_map_io,
|
||||
.reserve = integrator_reserve,
|
||||
.map_io = intcp_map_io,
|
||||
.init_early = intcp_init_early,
|
||||
.init_irq = intcp_init_irq,
|
||||
.timer = &cp_timer,
|
||||
.init_machine = intcp_init,
|
||||
|
||||
@@ -263,7 +263,7 @@ static void __init msm_timer_init(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void __cpuinit local_timer_setup(struct clock_event_device *evt)
|
||||
int __cpuinit local_timer_setup(struct clock_event_device *evt)
|
||||
{
|
||||
struct msm_clock *clock = &msm_clocks[MSM_GLOBAL_TIMER];
|
||||
|
||||
@@ -295,6 +295,7 @@ void __cpuinit local_timer_setup(struct clock_event_device *evt)
|
||||
gic_enable_ppi(clock->irq.irq);
|
||||
|
||||
clockevents_register_device(evt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline int local_timer_ack(void)
|
||||
|
||||
@@ -44,6 +44,7 @@ config ARCH_OMAP4
|
||||
depends on ARCH_OMAP2PLUS
|
||||
select CPU_V7
|
||||
select ARM_GIC
|
||||
select LOCAL_TIMERS if SMP
|
||||
select PL310_ERRATA_588369
|
||||
select PL310_ERRATA_727915
|
||||
select ARM_ERRATA_720789
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user