Commit b93cd6a0 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh

* 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh:
  mailmap: Fix up some renesas attributions
  sh: clkfwk: Kill off remaining debugfs cruft.
  drivers: sh: Kill off dead pathname for runtime PM stub.
  drivers: sh: Generalize runtime PM platform stub.
  sh: Wire up process_vm syscalls.
  sh: clkfwk: add clk_rate_mult_range_round()
  serial: sh-sci: Fix up SH-2A SCIF support.
  sh: Fix cached/uncaced address calculation in 29bit mode
parents d291ffb3 ab4f75cd
...@@ -68,6 +68,7 @@ Juha Yrjola <juha.yrjola@solidboot.com> ...@@ -68,6 +68,7 @@ Juha Yrjola <juha.yrjola@solidboot.com>
Kay Sievers <kay.sievers@vrfy.org> Kay Sievers <kay.sievers@vrfy.org>
Kenneth W Chen <kenneth.w.chen@intel.com> Kenneth W Chen <kenneth.w.chen@intel.com>
Koushik <raghavendra.koushik@neterion.com> Koushik <raghavendra.koushik@neterion.com>
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Leonid I Ananiev <leonid.i.ananiev@intel.com> Leonid I Ananiev <leonid.i.ananiev@intel.com>
Linas Vepstas <linas@austin.ibm.com> Linas Vepstas <linas@austin.ibm.com>
Mark Brown <broonie@sirena.org.uk> Mark Brown <broonie@sirena.org.uk>
...@@ -111,3 +112,4 @@ Uwe Kleine-König <ukl@pengutronix.de> ...@@ -111,3 +112,4 @@ Uwe Kleine-König <ukl@pengutronix.de>
Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Takashi YOSHII <takashi.yoshii.zj@renesas.com> Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Yusuke Goda <goda.yusuke@renesas.com>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Common objects # Common objects
obj-y := timer.o console.o clock.o pm_runtime.o obj-y := timer.o console.o clock.o
# CPU objects # CPU objects
obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
......
...@@ -151,8 +151,13 @@ typedef struct page *pgtable_t; ...@@ -151,8 +151,13 @@ typedef struct page *pgtable_t;
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#ifdef CONFIG_UNCACHED_MAPPING #ifdef CONFIG_UNCACHED_MAPPING
#if defined(CONFIG_29BIT)
#define UNCAC_ADDR(addr) P2SEGADDR(addr)
#define CAC_ADDR(addr) P1SEGADDR(addr)
#else
#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start)
#define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET)
#endif
#else #else
#define UNCAC_ADDR(addr) ((addr)) #define UNCAC_ADDR(addr) ((addr))
#define CAC_ADDR(addr) ((addr)) #define CAC_ADDR(addr) ((addr))
......
...@@ -375,8 +375,10 @@ ...@@ -375,8 +375,10 @@
#define __NR_syncfs 362 #define __NR_syncfs 362
#define __NR_sendmmsg 363 #define __NR_sendmmsg 363
#define __NR_setns 364 #define __NR_setns 364
#define __NR_process_vm_readv 365
#define __NR_process_vm_writev 366
#define NR_syscalls 365 #define NR_syscalls 367
#ifdef __KERNEL__ #ifdef __KERNEL__
......
...@@ -396,10 +396,12 @@ ...@@ -396,10 +396,12 @@
#define __NR_syncfs 373 #define __NR_syncfs 373
#define __NR_sendmmsg 374 #define __NR_sendmmsg 374
#define __NR_setns 375 #define __NR_setns 375
#define __NR_process_vm_readv 376
#define __NR_process_vm_writev 377
#ifdef __KERNEL__ #ifdef __KERNEL__
#define NR_syscalls 376 #define NR_syscalls 378
#define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_READDIR
......
...@@ -176,10 +176,12 @@ static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, ...@@ -176,10 +176,12 @@ static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups,
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xfffe8000, .mapbase = 0xfffe8000,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
.scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
SCSCR_REIE,
.scbrr_algo_id = SCBRR_ALGO_2, .scbrr_algo_id = SCBRR_ALGO_2,
.type = PORT_SCIF, .type = PORT_SCIF,
.irqs = { 192, 192, 192, 192 }, .irqs = { 192, 192, 192, 192 },
.regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
}; };
static struct platform_device scif0_device = { static struct platform_device scif0_device = {
...@@ -193,10 +195,12 @@ static struct platform_device scif0_device = { ...@@ -193,10 +195,12 @@ static struct platform_device scif0_device = {
static struct plat_sci_port scif1_platform_data = { static struct plat_sci_port scif1_platform_data = {
.mapbase = 0xfffe8800, .mapbase = 0xfffe8800,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
.scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
SCSCR_REIE,
.scbrr_algo_id = SCBRR_ALGO_2, .scbrr_algo_id = SCBRR_ALGO_2,
.type = PORT_SCIF, .type = PORT_SCIF,
.irqs = { 196, 196, 196, 196 }, .irqs = { 196, 196, 196, 196 },
.regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
}; };
static struct platform_device scif1_device = { static struct platform_device scif1_device = {
...@@ -210,10 +214,12 @@ static struct platform_device scif1_device = { ...@@ -210,10 +214,12 @@ static struct platform_device scif1_device = {
static struct plat_sci_port scif2_platform_data = { static struct plat_sci_port scif2_platform_data = {
.mapbase = 0xfffe9000, .mapbase = 0xfffe9000,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
.scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
SCSCR_REIE,
.scbrr_algo_id = SCBRR_ALGO_2, .scbrr_algo_id = SCBRR_ALGO_2,
.type = PORT_SCIF, .type = PORT_SCIF,
.irqs = { 200, 200, 200, 200 }, .irqs = { 200, 200, 200, 200 },
.regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
}; };
static struct platform_device scif2_device = { static struct platform_device scif2_device = {
...@@ -227,10 +233,12 @@ static struct platform_device scif2_device = { ...@@ -227,10 +233,12 @@ static struct platform_device scif2_device = {
static struct plat_sci_port scif3_platform_data = { static struct plat_sci_port scif3_platform_data = {
.mapbase = 0xfffe9800, .mapbase = 0xfffe9800,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
.scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
SCSCR_REIE,
.scbrr_algo_id = SCBRR_ALGO_2, .scbrr_algo_id = SCBRR_ALGO_2,
.type = PORT_SCIF, .type = PORT_SCIF,
.irqs = { 204, 204, 204, 204 }, .irqs = { 204, 204, 204, 204 },
.regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
}; };
static struct platform_device scif3_device = { static struct platform_device scif3_device = {
......
...@@ -382,3 +382,5 @@ ENTRY(sys_call_table) ...@@ -382,3 +382,5 @@ ENTRY(sys_call_table)
.long sys_syncfs .long sys_syncfs
.long sys_sendmmsg .long sys_sendmmsg
.long sys_setns .long sys_setns
.long sys_process_vm_readv /* 365 */
.long sys_process_vm_writev
...@@ -402,3 +402,5 @@ sys_call_table: ...@@ -402,3 +402,5 @@ sys_call_table:
.long sys_syncfs .long sys_syncfs
.long sys_sendmmsg .long sys_sendmmsg
.long sys_setns /* 375 */ .long sys_setns /* 375 */
.long sys_process_vm_readv
.long sys_process_vm_writev
...@@ -7,3 +7,11 @@ obj-$(CONFIG_HAVE_CLK) += clk/ ...@@ -7,3 +7,11 @@ obj-$(CONFIG_HAVE_CLK) += clk/
obj-$(CONFIG_MAPLE) += maple/ obj-$(CONFIG_MAPLE) += maple/
obj-$(CONFIG_SUPERHYWAY) += superhyway/ obj-$(CONFIG_SUPERHYWAY) += superhyway/
obj-$(CONFIG_GENERIC_GPIO) += pfc.o obj-$(CONFIG_GENERIC_GPIO) += pfc.o
#
# For the moment we only use this framework for ARM-based SH/R-Mobile
# platforms and generic SH. SH-based SH-Mobile platforms are still using
# an older framework that is pending up-porting, at which point this
# special casing can go away.
#
obj-$(CONFIG_SUPERH)$(CONFIG_ARCH_SHMOBILE) += pm_runtime.o
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/debugfs.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/sh_clk.h> #include <linux/sh_clk.h>
...@@ -173,6 +172,26 @@ long clk_rate_div_range_round(struct clk *clk, unsigned int div_min, ...@@ -173,6 +172,26 @@ long clk_rate_div_range_round(struct clk *clk, unsigned int div_min,
return clk_rate_round_helper(&div_range_round); return clk_rate_round_helper(&div_range_round);
} }
static long clk_rate_mult_range_iter(unsigned int pos,
struct clk_rate_round_data *rounder)
{
return clk_get_rate(rounder->arg) * pos;
}
long clk_rate_mult_range_round(struct clk *clk, unsigned int mult_min,
unsigned int mult_max, unsigned long rate)
{
struct clk_rate_round_data mult_range_round = {
.min = mult_min,
.max = mult_max,
.func = clk_rate_mult_range_iter,
.arg = clk_get_parent(clk),
.rate = rate,
};
return clk_rate_round_helper(&mult_range_round);
}
int clk_rate_table_find(struct clk *clk, int clk_rate_table_find(struct clk *clk,
struct cpufreq_frequency_table *freq_table, struct cpufreq_frequency_table *freq_table,
unsigned long rate) unsigned long rate)
...@@ -205,9 +224,6 @@ int clk_reparent(struct clk *child, struct clk *parent) ...@@ -205,9 +224,6 @@ int clk_reparent(struct clk *child, struct clk *parent)
list_add(&child->sibling, &parent->children); list_add(&child->sibling, &parent->children);
child->parent = parent; child->parent = parent;
/* now do the debugfs renaming to reattach the child
to the proper parent */
return 0; return 0;
} }
...@@ -665,89 +681,6 @@ static int __init clk_syscore_init(void) ...@@ -665,89 +681,6 @@ static int __init clk_syscore_init(void)
subsys_initcall(clk_syscore_init); subsys_initcall(clk_syscore_init);
#endif #endif
/*
* debugfs support to trace clock tree hierarchy and attributes
*/
static struct dentry *clk_debugfs_root;
static int clk_debugfs_register_one(struct clk *c)
{
int err;
struct dentry *d;
struct clk *pa = c->parent;
char s[255];
char *p = s;
p += sprintf(p, "%p", c);
d = debugfs_create_dir(s, pa ? pa->dentry : clk_debugfs_root);
if (!d)
return -ENOMEM;
c->dentry = d;
d = debugfs_create_u8("usecount", S_IRUGO, c->dentry, (u8 *)&c->usecount);
if (!d) {
err = -ENOMEM;
goto err_out;
}
d = debugfs_create_u32("rate", S_IRUGO, c->dentry, (u32 *)&c->rate);
if (!d) {
err = -ENOMEM;
goto err_out;
}
d = debugfs_create_x32("flags", S_IRUGO, c->dentry, (u32 *)&c->flags);
if (!d) {
err = -ENOMEM;
goto err_out;
}
return 0;
err_out:
debugfs_remove_recursive(c->dentry);
return err;
}
static int clk_debugfs_register(struct clk *c)
{
int err;
struct clk *pa = c->parent;
if (pa && !pa->dentry) {
err = clk_debugfs_register(pa);
if (err)
return err;
}
if (!c->dentry) {
err = clk_debugfs_register_one(c);
if (err)
return err;
}
return 0;
}
static int __init clk_debugfs_init(void)
{
struct clk *c;
struct dentry *d;
int err;
d = debugfs_create_dir("clock", NULL);
if (!d)
return -ENOMEM;
clk_debugfs_root = d;
list_for_each_entry(c, &clock_list, node) {
err = clk_debugfs_register(c);
if (err)
goto err_out;
}
return 0;
err_out:
debugfs_remove_recursive(clk_debugfs_root);
return err;
}
late_initcall(clk_debugfs_init);
static int __init clk_late_init(void) static int __init clk_late_init(void)
{ {
unsigned long flags; unsigned long flags;
......
/* /*
* arch/arm/mach-shmobile/pm_runtime.c * Runtime PM support code
*
* Runtime PM support code for SuperH Mobile ARM
* *
* Copyright (C) 2009-2010 Magnus Damm * Copyright (C) 2009-2010 Magnus Damm
* *
......
...@@ -206,6 +206,25 @@ static struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = { ...@@ -206,6 +206,25 @@ static struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = {
[SCLSR] = sci_reg_invalid, [SCLSR] = sci_reg_invalid,
}, },
/*
* Common SH-2(A) SCIF definitions for ports with FIFO data
* count registers.
*/
[SCIx_SH2_SCIF_FIFODATA_REGTYPE] = {
[SCSMR] = { 0x00, 16 },
[SCBRR] = { 0x04, 8 },
[SCSCR] = { 0x08, 16 },
[SCxTDR] = { 0x0c, 8 },
[SCxSR] = { 0x10, 16 },
[SCxRDR] = { 0x14, 8 },
[SCFCR] = { 0x18, 16 },
[SCFDR] = { 0x1c, 16 },
[SCTFDR] = sci_reg_invalid,
[SCRFDR] = sci_reg_invalid,
[SCSPTR] = { 0x20, 16 },
[SCLSR] = { 0x24, 16 },
},
/* /*
* Common SH-3 SCIF definitions. * Common SH-3 SCIF definitions.
*/ */
......
...@@ -67,6 +67,7 @@ enum { ...@@ -67,6 +67,7 @@ enum {
SCIx_IRDA_REGTYPE, SCIx_IRDA_REGTYPE,
SCIx_SCIFA_REGTYPE, SCIx_SCIFA_REGTYPE,
SCIx_SCIFB_REGTYPE, SCIx_SCIFB_REGTYPE,
SCIx_SH2_SCIF_FIFODATA_REGTYPE,
SCIx_SH3_SCIF_REGTYPE, SCIx_SH3_SCIF_REGTYPE,
SCIx_SH4_SCIF_REGTYPE, SCIx_SH4_SCIF_REGTYPE,
SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
......
...@@ -52,7 +52,6 @@ struct clk { ...@@ -52,7 +52,6 @@ struct clk {
unsigned long arch_flags; unsigned long arch_flags;
void *priv; void *priv;
struct dentry *dentry;
struct clk_mapping *mapping; struct clk_mapping *mapping;
struct cpufreq_frequency_table *freq_table; struct cpufreq_frequency_table *freq_table;
unsigned int nr_freqs; unsigned int nr_freqs;
...@@ -94,6 +93,9 @@ int clk_rate_table_find(struct clk *clk, ...@@ -94,6 +93,9 @@ int clk_rate_table_find(struct clk *clk,
long clk_rate_div_range_round(struct clk *clk, unsigned int div_min, long clk_rate_div_range_round(struct clk *clk, unsigned int div_min,
unsigned int div_max, unsigned long rate); unsigned int div_max, unsigned long rate);
long clk_rate_mult_range_round(struct clk *clk, unsigned int mult_min,
unsigned int mult_max, unsigned long rate);
long clk_round_parent(struct clk *clk, unsigned long target, long clk_round_parent(struct clk *clk, unsigned long target,
unsigned long *best_freq, unsigned long *parent_freq, unsigned long *best_freq, unsigned long *parent_freq,
unsigned int div_min, unsigned int div_max); unsigned int div_min, unsigned int div_max);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment