Skip to content

Commit

Permalink
Merge branch 'imx/driver' of git://git.linaro.org/people/shawnguo/lin…
Browse files Browse the repository at this point in the history
…ux-2.6 into next/drivers

* 'imx/driver' of git://git.linaro.org/people/shawnguo/linux-2.6: (3 commits)
  ARM: imx6q: add cko1 clock
  ARM: mxc: make imx_dma_is_general_purpose more generic for sdma
  ARM: imx6: Rename DEBUG_IMX6Q_UART to UART4
  • Loading branch information
Arnd Bergmann committed Feb 28, 2012
2 parents ee80285 + 1aa0cf6 commit e135e45
Show file tree
Hide file tree
Showing 204 changed files with 1,630 additions and 1,107 deletions.
9 changes: 3 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ S: Orphan
F: drivers/platform/x86/wmi.c

AD1889 ALSA SOUND DRIVER
M: Kyle McMartin <kyle@mcmartin.ca>
M: Thibaut Varene <T-Bone@parisc-linux.org>
W: http://wiki.parisc-linux.org/AD1889
L: linux-parisc@vger.kernel.org
Expand Down Expand Up @@ -3047,7 +3046,6 @@ F: drivers/hwspinlock/hwspinlock_*
F: include/linux/hwspinlock.h

HARMONY SOUND DRIVER
M: Kyle McMartin <kyle@mcmartin.ca>
L: linux-parisc@vger.kernel.org
S: Maintained
F: sound/parisc/harmony.*
Expand Down Expand Up @@ -5000,9 +4998,8 @@ F: Documentation/blockdev/paride.txt
F: drivers/block/paride/

PARISC ARCHITECTURE
M: Kyle McMartin <kyle@mcmartin.ca>
M: Helge Deller <deller@gmx.de>
M: "James E.J. Bottomley" <jejb@parisc-linux.org>
M: Helge Deller <deller@gmx.de>
L: linux-parisc@vger.kernel.org
W: http://www.parisc-linux.org/
Q: http://patchwork.kernel.org/project/linux-parisc/list/
Expand Down Expand Up @@ -5861,7 +5858,7 @@ S: Maintained
F: drivers/mmc/host/sdhci-spear.c

SECURITY SUBSYSTEM
M: James Morris <jmorris@namei.org>
M: James Morris <james.l.morris@oracle.com>
L: linux-security-module@vger.kernel.org (suggested Cc:)
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git
W: http://security.wiki.kernel.org/
Expand All @@ -5874,7 +5871,7 @@ S: Supported

SELINUX SECURITY MODULE
M: Stephen Smalley <sds@tycho.nsa.gov>
M: James Morris <jmorris@namei.org>
M: James Morris <james.l.morris@oracle.com>
M: Eric Paris <eparis@parisplace.org>
L: selinux@tycho.nsa.gov (subscribers-only, general discussion)
W: http://selinuxproject.org
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 3
SUBLEVEL = 0
EXTRAVERSION = -rc4
EXTRAVERSION = -rc5
NAME = Saber-toothed Squirrel

# *DOCUMENTATION*
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ choice
Say Y here if you want kernel low-level debugging support
on i.MX50 or i.MX53.

config DEBUG_IMX6Q_UART
bool "i.MX6Q Debug UART"
config DEBUG_IMX6Q_UART4
bool "i.MX6Q Debug UART4"
depends on SOC_IMX6Q
help
Say Y here if you want kernel low-level debugging support
on i.MX6Q.
on i.MX6Q UART4.

config DEBUG_MSM_UART1
bool "Kernel low-level debugging messages via MSM UART1"
Expand Down
7 changes: 0 additions & 7 deletions arch/arm/common/it8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,6 @@ int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
return -EBUSY;
}

/*
* If we set up a device for bus mastering, we need to check the latency
* timer as we don't have even crappy BIOSes to set it properly.
* The implementation is from arch/i386/pci/i386.c
*/
unsigned int pcibios_max_latency = 255;

/* ITE bridge requires setting latency timer to avoid early bus access
termination by PCI bus master devices
*/
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/common/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -1502,12 +1502,13 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op)
struct pl330_thread *thrd = ch_id;
struct pl330_dmac *pl330;
unsigned long flags;
int ret = 0, active = thrd->req_running;
int ret = 0, active;

if (!thrd || thrd->free || thrd->dmac->state == DYING)
return -EINVAL;

pl330 = thrd->dmac;
active = thrd->req_running;

spin_lock_irqsave(&pl330->lock, flags);

Expand Down
5 changes: 5 additions & 0 deletions arch/arm/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
disable_irq
.endm

.macro save_and_disable_irqs_notrace, oldcpsr
mrs \oldcpsr, cpsr
disable_irq_notrace
.endm

/*
* Restore interrupt state previously stored in a register. We don't
* guarantee that this will preserve the flags.
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/hardware/pl330.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ enum pl330_dstcachectrl {
DCCTRL1, /* Bufferable only */
DCCTRL2, /* Cacheable, but do not allocate */
DCCTRL3, /* Cacheable and bufferable, but do not allocate */
DINVALID1 = 8,
DINVALID1, /* AWCACHE = 0x1000 */
DINVALID2,
DCCTRL6, /* Cacheable write-through, allocate on writes only */
DCCTRL7, /* Cacheable write-back, allocate on writes only */
Expand Down
1 change: 1 addition & 0 deletions arch/arm/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <asm/hw_breakpoint.h>
#include <asm/ptrace.h>
#include <asm/types.h>
#include <asm/system.h>

#ifdef __KERNEL__
#define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \
Expand Down
9 changes: 8 additions & 1 deletion arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/perf_event.h>
#include <linux/hw_breakpoint.h>
#include <linux/regset.h>
#include <linux/audit.h>

#include <asm/pgtable.h>
#include <asm/system.h>
Expand Down Expand Up @@ -904,6 +905,12 @@ long arch_ptrace(struct task_struct *child, long request,
return ret;
}

#ifdef __ARMEB__
#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB
#else
#define AUDIT_ARCH_NR AUDIT_ARCH_ARM
#endif

asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
{
unsigned long ip;
Expand All @@ -918,7 +925,7 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
if (!ip)
audit_syscall_exit(regs);
else
audit_syscall_entry(AUDIT_ARCH_ARMEB, scno, regs->ARM_r0,
audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);

if (!test_thread_flag(TIF_SYSCALL_TRACE))
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/smp_twd.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static struct notifier_block twd_cpufreq_nb = {

static int twd_cpufreq_init(void)
{
if (!IS_ERR(twd_clk))
if (twd_evt && *__this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
return cpufreq_register_notifier(&twd_cpufreq_nb,
CPUFREQ_TRANSITION_NOTIFIER);

Expand Down
74 changes: 73 additions & 1 deletion arch/arm/mach-imx/clock-imx6q.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@
#define BM_CLPCR_MASK_SCU_IDLE (0x1 << 26)
#define BM_CLPCR_MASK_L2CC_IDLE (0x1 << 27)

#define BP_CCOSR_CKO1_EN 7
#define BP_CCOSR_CKO1_PODF 4
#define BM_CCOSR_CKO1_PODF (0x7 << 4)
#define BP_CCOSR_CKO1_SEL 0
#define BM_CCOSR_CKO1_SEL (0xf << 0)

#define FREQ_480M 480000000
#define FREQ_528M 528000000
#define FREQ_594M 594000000
Expand Down Expand Up @@ -393,6 +399,7 @@ static struct clk ipu1_di1_clk;
static struct clk ipu2_di0_clk;
static struct clk ipu2_di1_clk;
static struct clk enfc_clk;
static struct clk cko1_clk;
static struct clk dummy_clk = {};

static unsigned long external_high_reference;
Expand Down Expand Up @@ -938,6 +945,24 @@ static void _clk_disable(struct clk *clk)
writel_relaxed(reg, clk->enable_reg);
}

static int _clk_enable_1b(struct clk *clk)
{
u32 reg;
reg = readl_relaxed(clk->enable_reg);
reg |= 0x1 << clk->enable_shift;
writel_relaxed(reg, clk->enable_reg);

return 0;
}

static void _clk_disable_1b(struct clk *clk)
{
u32 reg;
reg = readl_relaxed(clk->enable_reg);
reg &= ~(0x1 << clk->enable_shift);
writel_relaxed(reg, clk->enable_reg);
}

struct divider {
struct clk *clk;
void __iomem *reg;
Expand Down Expand Up @@ -983,6 +1008,7 @@ DEF_CLK_DIV1(ipu2_di0_pre_div, &ipu2_di0_pre_clk, CSCDR2, IPU2_DI0_PRE);
DEF_CLK_DIV1(ipu2_di1_pre_div, &ipu2_di1_pre_clk, CSCDR2, IPU2_DI1_PRE);
DEF_CLK_DIV1(ipu1_div, &ipu1_clk, CSCDR3, IPU1_HSP);
DEF_CLK_DIV1(ipu2_div, &ipu2_clk, CSCDR3, IPU2_HSP);
DEF_CLK_DIV1(cko1_div, &cko1_clk, CCOSR, CKO1);

#define DEF_CLK_DIV2(d, c, r, b) \
static struct divider d = { \
Expand Down Expand Up @@ -1038,6 +1064,7 @@ static struct divider *dividers[] = {
&enfc_div,
&spdif_div,
&asrc_serial_div,
&cko1_div,
};

static unsigned long ldb_di_clk_get_rate(struct clk *clk)
Expand Down Expand Up @@ -1625,6 +1652,32 @@ DEF_IPU_DI_MUX(CSCDR2, 2, 1);
DEF_IPU_MUX(1);
DEF_IPU_MUX(2);

static struct multiplexer cko1_mux = {
.clk = &cko1_clk,
.reg = CCOSR,
.bp = BP_CCOSR_CKO1_SEL,
.bm = BM_CCOSR_CKO1_SEL,
.parents = {
&pll3_usb_otg,
&pll2_bus,
&pll1_sys,
&pll5_video,
&dummy_clk,
&axi_clk,
&enfc_clk,
&ipu1_di0_clk,
&ipu1_di1_clk,
&ipu2_di0_clk,
&ipu2_di1_clk,
&ahb_clk,
&ipg_clk,
&ipg_perclk,
&ckil_clk,
&pll4_audio,
NULL
},
};

static struct multiplexer *multiplexers[] = {
&axi_mux,
&periph_mux,
Expand Down Expand Up @@ -1667,6 +1720,7 @@ static struct multiplexer *multiplexers[] = {
&ipu2_di1_mux,
&ipu1_mux,
&ipu2_mux,
&cko1_mux,
};

static int _clk_set_parent(struct clk *clk, struct clk *parent)
Expand All @@ -1690,7 +1744,7 @@ static int _clk_set_parent(struct clk *clk, struct clk *parent)
break;
i++;
}
if (!m->parents[i])
if (!m->parents[i] || m->parents[i] == &dummy_clk)
return -EINVAL;

val = readl_relaxed(m->reg);
Expand Down Expand Up @@ -1745,6 +1799,20 @@ DEF_NG_CLK(asrc_serial_clk, &pll3_usb_otg);
.secondary = s, \
}

#define DEF_CLK_1B(name, er, es, p, s) \
static struct clk name = { \
.enable_reg = er, \
.enable_shift = es, \
.enable = _clk_enable_1b, \
.disable = _clk_disable_1b, \
.get_rate = _clk_get_rate, \
.set_rate = _clk_set_rate, \
.round_rate = _clk_round_rate, \
.set_parent = _clk_set_parent, \
.parent = p, \
.secondary = s, \
}

DEF_CLK(aips_tz1_clk, CCGR0, CG0, &ahb_clk, NULL);
DEF_CLK(aips_tz2_clk, CCGR0, CG1, &ahb_clk, NULL);
DEF_CLK(apbh_dma_clk, CCGR0, CG2, &ahb_clk, NULL);
Expand Down Expand Up @@ -1811,6 +1879,7 @@ DEF_CLK(usdhc4_clk, CCGR6, CG4, &pll2_pfd_400m, NULL);
DEF_CLK(emi_slow_clk, CCGR6, CG5, &axi_clk, NULL);
DEF_CLK(vdo_axi_clk, CCGR6, CG6, &axi_clk, NULL);
DEF_CLK(vpu_clk, CCGR6, CG7, &axi_clk, NULL);
DEF_CLK_1B(cko1_clk, CCOSR, BP_CCOSR_CKO1_EN, &pll2_bus, NULL);

static int pcie_clk_enable(struct clk *clk)
{
Expand Down Expand Up @@ -1922,6 +1991,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "gpmi_io_clk", gpmi_io_clk),
_REGISTER_CLOCK(NULL, "usboh3_clk", usboh3_clk),
_REGISTER_CLOCK(NULL, "sata_clk", sata_clk),
_REGISTER_CLOCK(NULL, "cko1_clk", cko1_clk),
};

int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
Expand Down Expand Up @@ -2029,6 +2099,8 @@ int __init mx6q_clocks_init(void)
clk_set_rate(&usdhc3_clk, 49500000);
clk_set_rate(&usdhc4_clk, 49500000);

clk_set_parent(&cko1_clk, &ahb_clk);

np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
base = of_iomap(np, 0);
WARN_ON(!base);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/lluart.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <mach/hardware.h>

static struct map_desc imx_lluart_desc = {
#ifdef CONFIG_DEBUG_IMX6Q_UART
#ifdef CONFIG_DEBUG_IMX6Q_UART4
.virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
.pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
.length = MX6Q_UART4_SIZE,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/voltagedomains3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ void __init omap3xxx_voltagedomains_init(void)
* XXX Will depend on the process, validation, and binning
* for the currently-running IC
*/
#ifdef CONFIG_PM_OPP
if (cpu_is_omap3630()) {
omap3_voltdm_mpu.volt_data = omap36xx_vddmpu_volt_data;
omap3_voltdm_core.volt_data = omap36xx_vddcore_volt_data;
} else {
omap3_voltdm_mpu.volt_data = omap34xx_vddmpu_volt_data;
omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data;
}
#endif

if (cpu_is_omap3517() || cpu_is_omap3505())
voltdms = voltagedomains_am35xx;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/voltagedomains44xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ void __init omap44xx_voltagedomains_init(void)
* XXX Will depend on the process, validation, and binning
* for the currently-running IC
*/
#ifdef CONFIG_PM_OPP
omap4_voltdm_mpu.volt_data = omap44xx_vdd_mpu_volt_data;
omap4_voltdm_iva.volt_data = omap44xx_vdd_iva_volt_data;
omap4_voltdm_core.volt_data = omap44xx_vdd_core_volt_data;
#endif

for (i = 0; voltdm = voltagedomains_omap4[i], voltdm; i++)
voltdm->sys_clk.name = sys_clk_name;
Expand Down
Loading

0 comments on commit e135e45

Please sign in to comment.