-
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: 137416 b: refs/heads/master c: 49cbe78 h: refs/heads/master v: v3
- Loading branch information
Eric Miao
committed
Mar 23, 2009
1 parent
3c34496
commit 995917b
Showing
41 changed files
with
1,670 additions
and
3 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: f8dec04d33b94a4cfa9358fd9666c01480bb164d | ||
refs/heads/master: 49cbe78637eb0503f45fc9b556ec08918a616534 |
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
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,27 @@ | ||
if ARCH_MMP | ||
|
||
menu "Marvell PXA168 Implmentations" | ||
|
||
config MACH_ASPENITE | ||
bool "Marvell's PXA168 Aspenite Development Board" | ||
select CPU_PXA168 | ||
help | ||
Say 'Y' here if you want to support the Marvell PXA168-based | ||
Aspenite Development Board. | ||
|
||
config MACH_ZYLONITE2 | ||
bool "Marvell's PXA168 Zylonite2 Development Board" | ||
select CPU_PXA168 | ||
help | ||
Say 'Y' here if you want to support the Marvell PXA168-based | ||
Zylonite2 Development Board. | ||
|
||
endmenu | ||
|
||
config CPU_PXA168 | ||
bool | ||
select CPU_MOHAWK | ||
help | ||
Select code specific to PXA168 | ||
|
||
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,12 @@ | ||
# | ||
# Makefile for Marvell's PXA168 processors line | ||
# | ||
|
||
obj-y += common.o clock.o devices.o irq.o time.o | ||
|
||
# SoC support | ||
obj-$(CONFIG_CPU_PXA168) += pxa168.o | ||
|
||
# board support | ||
obj-$(CONFIG_MACH_ASPENITE) += aspenite.o | ||
obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.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,42 @@ | ||
/* | ||
* linux/arch/arm/mach-mmp/aspenite.c | ||
* | ||
* Support for the Marvell PXA168-based Aspenite and Zylonite2 | ||
* Development Platform. | ||
* | ||
* 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 | ||
* publishhed by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
|
||
#include <asm/mach-types.h> | ||
#include <asm/mach/arch.h> | ||
#include <mach/addr-map.h> | ||
|
||
#include "common.h" | ||
|
||
static void __init common_init(void) | ||
{ | ||
} | ||
|
||
MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") | ||
.phys_io = APB_PHYS_BASE, | ||
.boot_params = 0x00000100, | ||
.io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, | ||
.map_io = pxa_map_io, | ||
.init_irq = pxa168_init_irq, | ||
.timer = &pxa168_timer, | ||
.init_machine = common_init, | ||
MACHINE_END | ||
|
||
MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform") | ||
.phys_io = APB_PHYS_BASE, | ||
.boot_params = 0x00000100, | ||
.io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, | ||
.map_io = pxa_map_io, | ||
.init_irq = pxa168_init_irq, | ||
.timer = &pxa168_timer, | ||
.init_machine = common_init, | ||
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,83 @@ | ||
/* | ||
* linux/arch/arm/mach-mmp/clock.c | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/kernel.h> | ||
#include <linux/list.h> | ||
#include <linux/spinlock.h> | ||
#include <linux/clk.h> | ||
#include <linux/io.h> | ||
|
||
#include <mach/regs-apbc.h> | ||
#include "clock.h" | ||
|
||
static void apbc_clk_enable(struct clk *clk) | ||
{ | ||
uint32_t clk_rst; | ||
|
||
clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(clk->fnclksel); | ||
__raw_writel(clk_rst, clk->clk_rst); | ||
} | ||
|
||
static void apbc_clk_disable(struct clk *clk) | ||
{ | ||
__raw_writel(0, clk->clk_rst); | ||
} | ||
|
||
struct clkops apbc_clk_ops = { | ||
.enable = apbc_clk_enable, | ||
.disable = apbc_clk_disable, | ||
}; | ||
|
||
static DEFINE_SPINLOCK(clocks_lock); | ||
|
||
int clk_enable(struct clk *clk) | ||
{ | ||
unsigned long flags; | ||
|
||
spin_lock_irqsave(&clocks_lock, flags); | ||
if (clk->enabled++ == 0) | ||
clk->ops->enable(clk); | ||
spin_unlock_irqrestore(&clocks_lock, flags); | ||
return 0; | ||
} | ||
EXPORT_SYMBOL(clk_enable); | ||
|
||
void clk_disable(struct clk *clk) | ||
{ | ||
unsigned long flags; | ||
|
||
WARN_ON(clk->enabled == 0); | ||
|
||
spin_lock_irqsave(&clocks_lock, flags); | ||
if (--clk->enabled == 0) | ||
clk->ops->disable(clk); | ||
spin_unlock_irqrestore(&clocks_lock, flags); | ||
} | ||
EXPORT_SYMBOL(clk_disable); | ||
|
||
unsigned long clk_get_rate(struct clk *clk) | ||
{ | ||
unsigned long rate; | ||
|
||
if (clk->ops->getrate) | ||
rate = clk->ops->getrate(clk); | ||
else | ||
rate = clk->rate; | ||
|
||
return rate; | ||
} | ||
EXPORT_SYMBOL(clk_get_rate); | ||
|
||
void clks_register(struct clk_lookup *clks, size_t num) | ||
{ | ||
int i; | ||
|
||
for (i = 0; i < num; i++) | ||
clkdev_add(&clks[i]); | ||
} |
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,71 @@ | ||
/* | ||
* linux/arch/arm/mach-mmp/clock.h | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <asm/clkdev.h> | ||
|
||
struct clkops { | ||
void (*enable)(struct clk *); | ||
void (*disable)(struct clk *); | ||
unsigned long (*getrate)(struct clk *); | ||
}; | ||
|
||
struct clk { | ||
const struct clkops *ops; | ||
|
||
void __iomem *clk_rst; /* clock reset control register */ | ||
int fnclksel; /* functional clock select (APBC) */ | ||
uint32_t enable_val; /* value for clock enable (APMU) */ | ||
unsigned long rate; | ||
int enabled; | ||
}; | ||
|
||
extern struct clkops apbc_clk_ops; | ||
|
||
#define APBC_CLK(_name, _reg, _fnclksel, _rate) \ | ||
struct clk clk_##_name = { \ | ||
.clk_rst = (void __iomem *)APBC_##_reg, \ | ||
.fnclksel = _fnclksel, \ | ||
.rate = _rate, \ | ||
.ops = &apbc_clk_ops, \ | ||
} | ||
|
||
#define APBC_CLK_OPS(_name, _reg, _fnclksel, _rate, _ops) \ | ||
struct clk clk_##_name = { \ | ||
.clk_rst = (void __iomem *)APBC_##_reg, \ | ||
.fnclksel = _fnclksel, \ | ||
.rate = _rate, \ | ||
.ops = _ops, \ | ||
} | ||
|
||
#define APMU_CLK(_name, _reg, _eval, _rate) \ | ||
struct clk clk_##_name = { \ | ||
.clk_rst = (void __iomem *)APMU_##_reg, \ | ||
.enable_val = _eval, \ | ||
.rate = _rate, \ | ||
.ops = &apmu_clk_ops, \ | ||
} | ||
|
||
#define APMU_CLK_OPS(_name, _reg, _eval, _rate, _ops) \ | ||
struct clk clk_##_name = { \ | ||
.clk_rst = (void __iomem *)APMU_##_reg, \ | ||
.enable_val = _eval, \ | ||
.rate = _rate, \ | ||
.ops = _ops, \ | ||
} | ||
|
||
#define INIT_CLKREG(_clk, _devname, _conname) \ | ||
{ \ | ||
.clk = _clk, \ | ||
.dev_id = _devname, \ | ||
.con_id = _conname, \ | ||
} | ||
|
||
extern struct clk clk_pxa168_gpio; | ||
extern struct clk clk_pxa168_timers; | ||
|
||
extern void clks_register(struct clk_lookup *, size_t); |
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,37 @@ | ||
/* | ||
* linux/arch/arm/mach-mmp/common.c | ||
* | ||
* Code common to PXA168 processor lines | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/kernel.h> | ||
|
||
#include <asm/page.h> | ||
#include <asm/mach/map.h> | ||
#include <mach/addr-map.h> | ||
|
||
#include "common.h" | ||
|
||
static struct map_desc standard_io_desc[] __initdata = { | ||
{ | ||
.pfn = __phys_to_pfn(APB_PHYS_BASE), | ||
.virtual = APB_VIRT_BASE, | ||
.length = APB_PHYS_SIZE, | ||
.type = MT_DEVICE, | ||
}, { | ||
.pfn = __phys_to_pfn(AXI_PHYS_BASE), | ||
.virtual = AXI_VIRT_BASE, | ||
.length = AXI_PHYS_SIZE, | ||
.type = MT_DEVICE, | ||
}, | ||
}; | ||
|
||
void __init pxa_map_io(void) | ||
{ | ||
iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); | ||
} |
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,11 @@ | ||
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | ||
|
||
struct sys_timer; | ||
|
||
extern void timer_init(int irq); | ||
|
||
extern struct sys_timer pxa168_timer; | ||
extern void __init pxa168_init_irq(void); | ||
|
||
extern void __init icu_init_irq(void); | ||
extern void __init pxa_map_io(void); |
Oops, something went wrong.