Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228043
b: refs/heads/master
c: 050afc9
h: refs/heads/master
i:
  228041: ee0e89f
  228039: d994d40
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Nov 10, 2010
1 parent 7f8f11b commit 3eddba6
Show file tree
Hide file tree
Showing 437 changed files with 30,789 additions and 8,190 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5bf68592e72eb0ded154efaaf43b39aab6964fc3
refs/heads/master: 050afc92ee394ccdd953f91dcbbf9af863af8efc
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-shmobile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,6 @@ endmenu
config SH_CLK_CPG
bool

source "drivers/sh/Kconfig"

endif
46 changes: 45 additions & 1 deletion trunk/arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,50 @@ static struct platform_device *qhd_devices[] __initdata = {

/* FSI */
#define IRQ_FSI evt2irq(0x1840)

static int fsi_set_rate(int is_porta, int rate)
{
struct clk *fsib_clk;
struct clk *fdiv_clk = &sh7372_fsidivb_clk;
int ret;

/* set_rate is not needed if port A */
if (is_porta)
return 0;

fsib_clk = clk_get(NULL, "fsib_clk");
if (IS_ERR(fsib_clk))
return -EINVAL;

switch (rate) {
case 48000:
clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 85428000));
clk_set_rate(fdiv_clk, clk_round_rate(fdiv_clk, 12204000));
ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
break;
default:
pr_err("unsupported rate in FSI2 port B\n");
ret = -EINVAL;
break;
}

clk_put(fsib_clk);

return ret;
}

static struct sh_fsi_platform_info fsi_info = {
.porta_flags = SH_FSI_BRS_INV |
SH_FSI_OUT_SLAVE_MODE |
SH_FSI_IN_SLAVE_MODE |
SH_FSI_OFMT(PCM) |
SH_FSI_IFMT(PCM),

.portb_flags = SH_FSI_BRS_INV |
SH_FSI_BRM_INV |
SH_FSI_LRS_INV |
SH_FSI_OFMT(SPDIF),
.set_rate = fsi_set_rate,
};

static struct resource fsi_resources[] = {
Expand Down Expand Up @@ -634,6 +672,7 @@ static struct platform_device lcdc1_device = {
static struct sh_mobile_hdmi_info hdmi_info = {
.lcd_chan = &sh_mobile_lcdc1_info.ch[0],
.lcd_dev = &lcdc1_device.dev,
.flags = HDMI_SND_SRC_SPDIF,
};

static struct resource hdmi_resources[] = {
Expand Down Expand Up @@ -992,6 +1031,7 @@ static void __init ap4evb_map_io(void)

#define GPIO_PORT9CR 0xE6051009
#define GPIO_PORT10CR 0xE605100A
#define USCCR1 0xE6058144
static void __init ap4evb_init(void)
{
u32 srcr4;
Expand Down Expand Up @@ -1062,7 +1102,7 @@ static void __init ap4evb_init(void)
/* setup USB phy */
__raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */

/* enable FSI2 */
/* enable FSI2 port A (ak4643) */
gpio_request(GPIO_FN_FSIAIBT, NULL);
gpio_request(GPIO_FN_FSIAILR, NULL);
gpio_request(GPIO_FN_FSIAISLD, NULL);
Expand All @@ -1079,6 +1119,10 @@ static void __init ap4evb_init(void)
gpio_request(GPIO_PORT41, NULL);
gpio_direction_input(GPIO_PORT41);

/* setup FSI2 port B (HDMI) */
gpio_request(GPIO_FN_FSIBCK, NULL);
__raw_writew(__raw_readw(USCCR1) & ~(1 << 6), USCCR1); /* use SPDIF */

/* set SPU2 clock to 119.6 MHz */
clk = clk_get(NULL, "spu_clk");
if (!IS_ERR(clk)) {
Expand Down
102 changes: 102 additions & 0 deletions trunk/arch/arm/mach-shmobile/clock-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
#define SMSTPCR3 0xe615013c
#define SMSTPCR4 0xe6150140

#define FSIDIVA 0xFE1F8000
#define FSIDIVB 0xFE1F8008

/* Platforms must set frequency on their DV_CLKI pin */
struct clk sh7372_dv_clki_clk = {
};
Expand Down Expand Up @@ -288,6 +291,7 @@ struct clk sh7372_pllc2_clk = {
.ops = &pllc2_clk_ops,
.parent = &extal1_div2_clk,
.freq_table = pllc2_freq_table,
.nr_freqs = ARRAY_SIZE(pllc2_freq_table) - 1,
.parent_table = pllc2_parent,
.parent_num = ARRAY_SIZE(pllc2_parent),
};
Expand Down Expand Up @@ -417,6 +421,101 @@ static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = {
fsibckcr_parent, ARRAY_SIZE(fsibckcr_parent), 6, 2),
};

/* FSI DIV */
static unsigned long fsidiv_recalc(struct clk *clk)
{
unsigned long value;

value = __raw_readl(clk->mapping->base);

if ((value & 0x3) != 0x3)
return 0;

value >>= 16;
if (value < 2)
return 0;

return clk->parent->rate / value;
}

static long fsidiv_round_rate(struct clk *clk, unsigned long rate)
{
return clk_rate_div_range_round(clk, 2, 0xffff, rate);
}

static void fsidiv_disable(struct clk *clk)
{
__raw_writel(0, clk->mapping->base);
}

static int fsidiv_enable(struct clk *clk)
{
unsigned long value;

value = __raw_readl(clk->mapping->base) >> 16;
if (value < 2) {
fsidiv_disable(clk);
return -ENOENT;
}

__raw_writel((value << 16) | 0x3, clk->mapping->base);

return 0;
}

static int fsidiv_set_rate(struct clk *clk,
unsigned long rate, int algo_id)
{
int idx;

if (clk->parent->rate == rate) {
fsidiv_disable(clk);
return 0;
}

idx = (clk->parent->rate / rate) & 0xffff;
if (idx < 2)
return -ENOENT;

__raw_writel(idx << 16, clk->mapping->base);
return fsidiv_enable(clk);
}

static struct clk_ops fsidiv_clk_ops = {
.recalc = fsidiv_recalc,
.round_rate = fsidiv_round_rate,
.set_rate = fsidiv_set_rate,
.enable = fsidiv_enable,
.disable = fsidiv_disable,
};

static struct clk_mapping sh7372_fsidiva_clk_mapping = {
.phys = FSIDIVA,
.len = 8,
};

struct clk sh7372_fsidiva_clk = {
.ops = &fsidiv_clk_ops,
.parent = &div6_reparent_clks[DIV6_FSIA], /* late install */
.mapping = &sh7372_fsidiva_clk_mapping,
};

static struct clk_mapping sh7372_fsidivb_clk_mapping = {
.phys = FSIDIVB,
.len = 8,
};

struct clk sh7372_fsidivb_clk = {
.ops = &fsidiv_clk_ops,
.parent = &div6_reparent_clks[DIV6_FSIB], /* late install */
.mapping = &sh7372_fsidivb_clk_mapping,
};

static struct clk *late_main_clks[] = {
&sh7372_fsidiva_clk,
&sh7372_fsidivb_clk,
};

enum { MSTP001,
MSTP131, MSTP130,
MSTP129, MSTP128, MSTP127, MSTP126, MSTP125,
Expand Down Expand Up @@ -585,6 +684,9 @@ void __init sh7372_clock_init(void)
if (!ret)
ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);

for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++)
ret = clk_register(late_main_clks[k]);

clkdev_add_table(lookups, ARRAY_SIZE(lookups));

if (!ret)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-shmobile/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ static inline int gpio_cansleep(unsigned gpio)

static inline int gpio_to_irq(unsigned gpio)
{
return -ENOSYS;
return __gpio_to_irq(gpio);
}

static inline int irq_to_gpio(unsigned int irq)
{
return -EINVAL;
return -ENOSYS;
}

#endif /* CONFIG_GPIOLIB */
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-shmobile/include/mach/sh7372.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,5 +464,7 @@ extern struct clk sh7372_dv_clki_div2_clk;
extern struct clk sh7372_pllc2_clk;
extern struct clk sh7372_fsiack_clk;
extern struct clk sh7372_fsibck_clk;
extern struct clk sh7372_fsidiva_clk;
extern struct clk sh7372_fsidivb_clk;

#endif /* __ASM_SH7372_H__ */
2 changes: 2 additions & 0 deletions trunk/arch/m68k/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#define _M68K_IRQFLAGS_H

#include <linux/types.h>
#ifdef CONFIG_MMU
#include <linux/hardirq.h>
#endif
#include <linux/preempt.h>
#include <asm/thread_info.h>
#include <asm/entry.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/include/asm/machdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ extern unsigned long hw_timer_offset(void);
extern irqreturn_t arch_timer_interrupt(int irq, void *dummy);

extern void config_BSP(char *command, int len);
extern void do_IRQ(int irq, struct pt_regs *fp);

#endif /* _M68K_MACHDEP_H */
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static void kvm_patch_ins_nop(u32 *inst)

static void kvm_patch_ins_b(u32 *inst, int addr)
{
#ifdef CONFIG_RELOCATABLE
#if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PPC_BOOK3S)
/* On relocatable kernels interrupts handlers and our code
can be in different regions, so we don't patch them */

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kvm/booke_interrupts.S
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ lightweight_exit:
lwz r3, VCPU_PC(r4)
mtsrr0 r3
lwz r3, VCPU_SHARED(r4)
lwz r3, VCPU_SHARED_MSR(r3)
lwz r3, (VCPU_SHARED_MSR + 4)(r3)
oris r3, r3, KVMPPC_MSR_MASK@h
ori r3, r3, KVMPPC_MSR_MASK@l
mtsrr1 r3
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kvm/e500.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);

free_page((unsigned long)vcpu->arch.shared);
kvmppc_e500_tlb_uninit(vcpu_e500);
kvm_vcpu_uninit(vcpu);
kvmppc_e500_tlb_uninit(vcpu_e500);
kmem_cache_free(kvm_vcpu_cache, vcpu_e500);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
switch (ioctl) {
case KVM_PPC_GET_PVINFO: {
struct kvm_ppc_pvinfo pvinfo;
memset(&pvinfo, 0, sizeof(pvinfo));
r = kvm_vm_ioctl_get_pvinfo(&pvinfo);
if (copy_to_user(argp, &pvinfo, sizeof(pvinfo))) {
r = -EFAULT;
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/powerpc/kvm/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ void kvmppc_init_timing_stats(struct kvm_vcpu *vcpu)
int i;

/* pause guest execution to avoid concurrent updates */
local_irq_disable();
mutex_lock(&vcpu->mutex);

vcpu->arch.last_exit_type = 0xDEAD;
Expand All @@ -51,7 +50,6 @@ void kvmppc_init_timing_stats(struct kvm_vcpu *vcpu)
vcpu->arch.timing_last_enter.tv64 = 0;

mutex_unlock(&vcpu->mutex);
local_irq_enable();
}

static void add_exit_timing(struct kvm_vcpu *vcpu, u64 duration, int type)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ config CPU_SH2
config CPU_SH2A
bool
select CPU_SH2
select UNCACHED_MAPPING

config CPU_SH3
bool
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ machdir-$(CONFIG_SOLUTION_ENGINE) += mach-se
machdir-$(CONFIG_SH_HP6XX) += mach-hp6xx
machdir-$(CONFIG_SH_DREAMCAST) += mach-dreamcast
machdir-$(CONFIG_SH_SH03) += mach-sh03
machdir-$(CONFIG_SH_SECUREEDGE5410) += mach-snapgear
machdir-$(CONFIG_SH_RTS7751R2D) += mach-r2d
machdir-$(CONFIG_SH_7751_SYSTEMH) += mach-systemh
machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705
machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander
machdir-$(CONFIG_SH_MIGOR) += mach-migor
machdir-$(CONFIG_SH_AP325RXA) += mach-ap325rxa
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/sh/boards/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ config SH_7343_SOLUTION_ENGINE
Select 7343 SolutionEngine if configuring for a Hitachi
SH7343 (SH-Mobile 3AS) evaluation board.

config SH_7751_SYSTEMH
bool "SystemH7751R"
depends on CPU_SUBTYPE_SH7751R
help
Select SystemH if you are configuring for a Renesas SystemH
7751R evaluation board.

config SH_HP6XX
bool "HP6XX"
select SYS_SUPPORTS_APM_EMULATION
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sh/boards/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
# Specific board support, not covered by a mach group.
#
obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o
obj-$(CONFIG_SH_SECUREEDGE5410) += board-secureedge5410.o
obj-$(CONFIG_SH_SH2007) += board-sh2007.o
obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o
obj-$(CONFIG_SH_URQUELL) += board-urquell.o
obj-$(CONFIG_SH_SHMIN) += board-shmin.o
obj-$(CONFIG_SH_EDOSK7705) += board-edosk7705.o
obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o
obj-$(CONFIG_SH_ESPT) += board-espt.o
obj-$(CONFIG_SH_POLARIS) += board-polaris.o
Expand Down
Loading

0 comments on commit 3eddba6

Please sign in to comment.