mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge branches 'clks' and 'pnx' into devel
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 33
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Man-Eating Seals of Antiquity
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -574,6 +574,7 @@ config ARCH_PNX4008
|
||||
bool "Philips Nexperia PNX4008 Mobile"
|
||||
select CPU_ARM926T
|
||||
select HAVE_CLK
|
||||
select COMMON_CLKDEV
|
||||
help
|
||||
This enables support for Philips PNX4008 mobile platform.
|
||||
|
||||
|
||||
@@ -99,6 +99,16 @@ void clkdev_add(struct clk_lookup *cl)
|
||||
}
|
||||
EXPORT_SYMBOL(clkdev_add);
|
||||
|
||||
void __init clkdev_add_table(struct clk_lookup *cl, size_t num)
|
||||
{
|
||||
mutex_lock(&clocks_mutex);
|
||||
while (num--) {
|
||||
list_add_tail(&cl->node, &clocks);
|
||||
cl++;
|
||||
}
|
||||
mutex_unlock(&clocks_mutex);
|
||||
}
|
||||
|
||||
#define MAX_DEV_ID 20
|
||||
#define MAX_CON_ID 16
|
||||
|
||||
|
||||
@@ -154,16 +154,16 @@
|
||||
* Please note that the implementation of these, and the required
|
||||
* effects are cache-type (VIVT/VIPT/PIPT) specific.
|
||||
*
|
||||
* flush_cache_kern_all()
|
||||
* flush_kern_all()
|
||||
*
|
||||
* Unconditionally clean and invalidate the entire cache.
|
||||
*
|
||||
* flush_cache_user_mm(mm)
|
||||
* flush_user_all()
|
||||
*
|
||||
* Clean and invalidate all user space cache entries
|
||||
* before a change of page tables.
|
||||
*
|
||||
* flush_cache_user_range(start, end, flags)
|
||||
* flush_user_range(start, end, flags)
|
||||
*
|
||||
* Clean and invalidate a range of cache entries in the
|
||||
* specified address space before a change of page tables.
|
||||
@@ -179,6 +179,20 @@
|
||||
* - start - virtual start address
|
||||
* - end - virtual end address
|
||||
*
|
||||
* coherent_user_range(start, end)
|
||||
*
|
||||
* Ensure coherency between the Icache and the Dcache in the
|
||||
* region described by start, end. If you have non-snooping
|
||||
* Harvard caches, you need to implement this function.
|
||||
* - start - virtual start address
|
||||
* - end - virtual end address
|
||||
*
|
||||
* flush_kern_dcache_area(kaddr, size)
|
||||
*
|
||||
* Ensure that the data held in page is written back.
|
||||
* - kaddr - page address
|
||||
* - size - region size
|
||||
*
|
||||
* DMA Cache Coherency
|
||||
* ===================
|
||||
*
|
||||
|
||||
@@ -27,4 +27,7 @@ struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
|
||||
void clkdev_add(struct clk_lookup *cl);
|
||||
void clkdev_drop(struct clk_lookup *cl);
|
||||
|
||||
void clkdev_add_table(struct clk_lookup *, size_t);
|
||||
int clk_add_alias(const char *, const char *, char *, struct device *);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -142,8 +142,7 @@ void __init bcmring_amba_init(void)
|
||||
|
||||
chipcHw_busInterfaceClockEnable(bus_clock);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||
struct amba_device *d = amba_devs[i];
|
||||
|
||||
@@ -447,7 +447,6 @@ static void __init ep93xx_dma_clock_init(void)
|
||||
static int __init ep93xx_clock_init(void)
|
||||
{
|
||||
u32 value;
|
||||
int i;
|
||||
|
||||
/* Determine the bootloader configured pll1 rate */
|
||||
value = __raw_readl(EP93XX_SYSCON_CLKSET1);
|
||||
@@ -480,8 +479,7 @@ static int __init ep93xx_clock_init(void)
|
||||
clk_f.rate / 1000000, clk_h.rate / 1000000,
|
||||
clk_p.rate / 1000000);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clocks); i++)
|
||||
clkdev_add(&clocks[i]);
|
||||
clkdev_add_table(clocks, ARRAY_SIZE(clocks));
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(ep93xx_clock_init);
|
||||
|
||||
@@ -144,8 +144,7 @@ static int __init integrator_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||
struct amba_device *d = amba_devs[i];
|
||||
|
||||
@@ -558,9 +558,7 @@ static void __init intcp_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cp_lookups); i++)
|
||||
clkdev_add(&cp_lookups[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++) {
|
||||
|
||||
@@ -88,11 +88,3 @@ unsigned long clk_get_rate(struct clk *clk)
|
||||
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]);
|
||||
}
|
||||
|
||||
@@ -68,5 +68,3 @@ struct clk clk_##_name = { \
|
||||
|
||||
extern struct clk clk_pxa168_gpio;
|
||||
extern struct clk clk_pxa168_timers;
|
||||
|
||||
extern void clks_register(struct clk_lookup *, size_t);
|
||||
|
||||
@@ -94,7 +94,7 @@ static int __init pxa168_init(void)
|
||||
mfp_init_base(MFPR_VIRT_BASE);
|
||||
mfp_init_addr(pxa168_mfp_addr_map);
|
||||
pxa_init_dma(IRQ_PXA168_DMA_INT0, 32);
|
||||
clks_register(ARRAY_AND_SIZE(pxa168_clkregs));
|
||||
clkdev_add_table(ARRAY_AND_SIZE(pxa168_clkregs));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -131,7 +131,7 @@ static int __init pxa910_init(void)
|
||||
mfp_init_base(MFPR_VIRT_BASE);
|
||||
mfp_init_addr(pxa910_mfp_addr_map);
|
||||
pxa_init_dma(IRQ_PXA910_DMA_INT0, 32);
|
||||
clks_register(ARRAY_AND_SIZE(pxa910_clkregs));
|
||||
clkdev_add_table(ARRAY_AND_SIZE(pxa910_clkregs));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -570,7 +570,6 @@ static struct clk_lookup lookups[] __initdata = {
|
||||
int __init mx1_clocks_init(unsigned long fref)
|
||||
{
|
||||
unsigned int reg;
|
||||
int i;
|
||||
|
||||
/* disable clocks we are able to */
|
||||
__raw_writel(0, SCM_GCCR);
|
||||
@@ -592,8 +591,7 @@ int __init mx1_clocks_init(unsigned long fref)
|
||||
reg = (reg & CCM_CSCR_CLKO_MASK) >> CCM_CSCR_CLKO_OFFSET;
|
||||
clko_clk.parent = (struct clk *)clko_clocks[reg];
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
clk_enable(&hclk);
|
||||
clk_enable(&fclk);
|
||||
|
||||
@@ -968,7 +968,6 @@ static struct clk_lookup lookups[] = {
|
||||
*/
|
||||
int __init mx21_clocks_init(unsigned long lref, unsigned long href)
|
||||
{
|
||||
int i;
|
||||
u32 cscr;
|
||||
|
||||
external_low_reference = lref;
|
||||
@@ -986,8 +985,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
|
||||
else
|
||||
spll_clk.parent = &fpm_clk;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
/* Turn off all clock gates */
|
||||
__raw_writel(0, CCM_PCCR0);
|
||||
|
||||
@@ -719,7 +719,6 @@ static void __init to2_adjust_clocks(void)
|
||||
int __init mx27_clocks_init(unsigned long fref)
|
||||
{
|
||||
u32 cscr = __raw_readl(CCM_CSCR);
|
||||
int i;
|
||||
|
||||
external_high_reference = fref;
|
||||
|
||||
@@ -736,8 +735,7 @@ int __init mx27_clocks_init(unsigned long fref)
|
||||
|
||||
to2_adjust_clocks();
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
/* Turn off all clocks we do not need */
|
||||
__raw_writel(0, CCM_PCCR0);
|
||||
|
||||
@@ -210,11 +210,7 @@ static struct clk_lookup lookups[] = {
|
||||
|
||||
int __init mx25_clocks_init(unsigned long fref)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -485,15 +485,13 @@ static struct clk_lookup lookups[] = {
|
||||
|
||||
int __init mx35_clocks_init()
|
||||
{
|
||||
int i;
|
||||
unsigned int ll = 0;
|
||||
|
||||
#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
|
||||
ll = (3 << 16);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
/* Turn off all clocks except the ones we need to survive, namely:
|
||||
* EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart
|
||||
|
||||
@@ -578,12 +578,10 @@ static struct clk_lookup lookups[] = {
|
||||
int __init mx31_clocks_init(unsigned long fref)
|
||||
{
|
||||
u32 reg;
|
||||
int i;
|
||||
|
||||
ckih_rate = fref;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
/* change the csi_clk parent if necessary */
|
||||
reg = __raw_readl(MXC_CCM_CCMR);
|
||||
|
||||
@@ -624,7 +624,6 @@ static struct clk_lookup lookups[] = {
|
||||
int __init mxc91231_clocks_init(unsigned long fref)
|
||||
{
|
||||
void __iomem *gpt_base;
|
||||
int i;
|
||||
|
||||
ckih_rate = fref;
|
||||
|
||||
@@ -632,8 +631,7 @@ int __init mxc91231_clocks_init(unsigned long fref)
|
||||
sdhc_clk[0].parent = clk_sdhc_parent(&sdhc_clk[0]);
|
||||
sdhc_clk[1].parent = clk_sdhc_parent(&sdhc_clk[1]);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(lookups); i++)
|
||||
clkdev_add(&lookups[i]);
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
gpt_base = MXC91231_IO_ADDRESS(MXC91231_GPT1_BASE_ADDR);
|
||||
mxc_timer_init(&gpt_clk, gpt_base, MXC91231_INT_GPT);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user