-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 272950 b: refs/heads/master c: 220e6cf h: refs/heads/master v: v3
- Loading branch information
Rob Herring
authored and
Arnd Bergmann
committed
Oct 31, 2011
1 parent
f795865
commit 67d62c3
Showing
23 changed files
with
445 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 253d7addbcb06acc90eb722f122d32a6ccbf67a7 | ||
refs/heads/master: 220e6cf7b793d702596506a8c4bf1f4fd4040df1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
obj-y := clock.o highbank.o system.o | ||
obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zreladdr-y := 0x00008000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright 2011 Calxeda, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include <linux/module.h> | ||
#include <linux/kernel.h> | ||
#include <linux/errno.h> | ||
#include <linux/clk.h> | ||
#include <linux/clkdev.h> | ||
|
||
struct clk { | ||
unsigned long rate; | ||
}; | ||
|
||
int clk_enable(struct clk *clk) | ||
{ | ||
return 0; | ||
} | ||
|
||
void clk_disable(struct clk *clk) | ||
{} | ||
|
||
unsigned long clk_get_rate(struct clk *clk) | ||
{ | ||
return clk->rate; | ||
} | ||
|
||
long clk_round_rate(struct clk *clk, unsigned long rate) | ||
{ | ||
return clk->rate; | ||
} | ||
|
||
int clk_set_rate(struct clk *clk, unsigned long rate) | ||
{ | ||
return 0; | ||
} | ||
|
||
static struct clk eclk = { .rate = 200000000 }; | ||
static struct clk pclk = { .rate = 150000000 }; | ||
|
||
static struct clk_lookup lookups[] = { | ||
{ .clk = &pclk, .con_id = "apb_pclk", }, | ||
{ .clk = &pclk, .dev_id = "sp804", }, | ||
{ .clk = &eclk, .dev_id = "ffe0e000.sdhci", }, | ||
{ .clk = &pclk, .dev_id = "fff36000.serial", }, | ||
}; | ||
|
||
void __init highbank_clocks_init(void) | ||
{ | ||
clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | ||
extern void highbank_clocks_init(void); | ||
extern void __iomem *scu_base_addr; | ||
#ifdef CONFIG_DEBUG_HIGHBANK_UART | ||
extern void highbank_lluart_map_io(void); | ||
#else | ||
static inline void highbank_lluart_map_io(void) {} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
/* | ||
* Copyright 2010-2011 Calxeda, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include <linux/clk.h> | ||
#include <linux/clkdev.h> | ||
#include <linux/io.h> | ||
#include <linux/irq.h> | ||
#include <linux/irqdomain.h> | ||
#include <linux/of.h> | ||
#include <linux/of_irq.h> | ||
#include <linux/of_platform.h> | ||
#include <linux/of_address.h> | ||
|
||
#include <asm/cacheflush.h> | ||
#include <asm/unified.h> | ||
#include <asm/smp_scu.h> | ||
#include <asm/hardware/arm_timer.h> | ||
#include <asm/hardware/timer-sp.h> | ||
#include <asm/hardware/gic.h> | ||
#include <asm/hardware/cache-l2x0.h> | ||
#include <asm/mach/arch.h> | ||
#include <asm/mach/map.h> | ||
#include <asm/mach/time.h> | ||
#include <mach/irqs.h> | ||
|
||
#include "core.h" | ||
#include "sysregs.h" | ||
|
||
void __iomem *sregs_base; | ||
|
||
#define HB_SCU_VIRT_BASE 0xfee00000 | ||
void __iomem *scu_base_addr = ((void __iomem *)(HB_SCU_VIRT_BASE)); | ||
|
||
static struct map_desc scu_io_desc __initdata = { | ||
.virtual = HB_SCU_VIRT_BASE, | ||
.pfn = 0, /* run-time */ | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}; | ||
|
||
static void __init highbank_scu_map_io(void) | ||
{ | ||
unsigned long base; | ||
|
||
/* Get SCU base */ | ||
asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); | ||
|
||
scu_io_desc.pfn = __phys_to_pfn(base); | ||
iotable_init(&scu_io_desc, 1); | ||
} | ||
|
||
static void __init highbank_map_io(void) | ||
{ | ||
highbank_scu_map_io(); | ||
highbank_lluart_map_io(); | ||
} | ||
|
||
#define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) | ||
#define HB_JUMP_TABLE_VIRT(cpu) phys_to_virt(HB_JUMP_TABLE_PHYS(cpu)) | ||
|
||
void highbank_set_cpu_jump(int cpu, void *jump_addr) | ||
{ | ||
writel(BSYM(virt_to_phys(jump_addr)), HB_JUMP_TABLE_VIRT(cpu)); | ||
__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16); | ||
outer_clean_range(HB_JUMP_TABLE_PHYS(cpu), | ||
HB_JUMP_TABLE_PHYS(cpu) + 15); | ||
} | ||
|
||
const static struct of_device_id irq_match[] = { | ||
{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
{} | ||
}; | ||
|
||
static void __init highbank_init_irq(void) | ||
{ | ||
of_irq_init(irq_match); | ||
l2x0_of_init(0, ~0UL); | ||
} | ||
|
||
static void __init highbank_timer_init(void) | ||
{ | ||
int irq; | ||
struct device_node *np; | ||
void __iomem *timer_base; | ||
|
||
/* Map system registers */ | ||
np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); | ||
sregs_base = of_iomap(np, 0); | ||
WARN_ON(!sregs_base); | ||
|
||
np = of_find_compatible_node(NULL, NULL, "arm,sp804"); | ||
timer_base = of_iomap(np, 0); | ||
WARN_ON(!timer_base); | ||
irq = irq_of_parse_and_map(np, 0); | ||
|
||
highbank_clocks_init(); | ||
|
||
sp804_clocksource_init(timer_base + 0x20, "timer1"); | ||
sp804_clockevents_init(timer_base, irq, "timer0"); | ||
} | ||
|
||
static struct sys_timer highbank_timer = { | ||
.init = highbank_timer_init, | ||
}; | ||
|
||
static void highbank_power_off(void) | ||
{ | ||
hignbank_set_pwr_shutdown(); | ||
scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
|
||
while (1) | ||
cpu_do_idle(); | ||
} | ||
|
||
static void __init highbank_init(void) | ||
{ | ||
pm_power_off = highbank_power_off; | ||
|
||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
} | ||
|
||
static const char *highbank_match[] __initconst = { | ||
"calxeda,highbank", | ||
NULL, | ||
}; | ||
|
||
DT_MACHINE_START(HIGHBANK, "Highbank") | ||
.map_io = highbank_map_io, | ||
.init_irq = highbank_init_irq, | ||
.timer = &highbank_timer, | ||
.init_machine = highbank_init, | ||
.dt_compat = highbank_match, | ||
MACHINE_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Debugging macro include header | ||
* | ||
* Copyright (C) 1994-1999 Russell King | ||
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
.macro addruart,rp,rv,tmp | ||
movw \rv, #0x6000 | ||
movt \rv, #0xfee3 | ||
movw \rp, #0x6000 | ||
movt \rp, #0xfff3 | ||
.endm | ||
|
||
#include <asm/hardware/debug-pl01x.S> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <asm/hardware/entry-macro-gic.S> | ||
|
||
.macro disable_fiq | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* empty */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef __MACH_IO_H | ||
#define __MACH_IO_H | ||
|
||
#define __io(a) ({ (void)(a); __typesafe_io(0); }) | ||
#define __mem_pci(a) (a) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef __MACH_IRQS_H | ||
#define __MACH_IRQS_H | ||
|
||
#define NR_IRQS 192 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* empty */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2010-2011 Calxeda, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef __MACH_SYSTEM_H | ||
#define __MACH_SYSTEM_H | ||
|
||
static inline void arch_idle(void) | ||
{ | ||
cpu_do_idle(); | ||
} | ||
|
||
extern void arch_reset(char mode, const char *cmd); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef __MACH_TIMEX_H | ||
#define __MACH_TIMEX_H | ||
|
||
#define CLOCK_TICK_RATE 1000000 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef __MACH_UNCOMPRESS_H | ||
#define __MACH_UNCOMPRESS_H | ||
|
||
#define putc(c) | ||
#define flush() | ||
#define arch_decomp_setup() | ||
#define arch_decomp_wdog() | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define VMALLOC_END 0xFEE00000UL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2011 Calxeda, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include <linux/init.h> | ||
#include <asm/page.h> | ||
#include <asm/sizes.h> | ||
#include <asm/mach/map.h> | ||
|
||
#define HB_DEBUG_LL_PHYS_BASE 0xfff36000 | ||
#define HB_DEBUG_LL_VIRT_BASE 0xfee36000 | ||
|
||
static struct map_desc lluart_io_desc __initdata = { | ||
.virtual = HB_DEBUG_LL_VIRT_BASE, | ||
.pfn = __phys_to_pfn(HB_DEBUG_LL_PHYS_BASE), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}; | ||
|
||
void __init highbank_lluart_map_io(void) | ||
{ | ||
iotable_init(&lluart_io_desc, 1); | ||
} |
Oops, something went wrong.