Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342390
b: refs/heads/master
c: db5eb2d
h: refs/heads/master
v: v3
  • Loading branch information
Ulf Hansson authored and Linus Walleij committed Nov 15, 2012
1 parent 011d000 commit 21dc538
Show file tree
Hide file tree
Showing 207 changed files with 1,259 additions and 2,317 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: f75ed2d39562e19e4d1896c07e7f091515c6d11d
refs/heads/master: db5eb2daf717d5023ade51fd2a2f7bc0bfcffbde

This file was deleted.

2 changes: 1 addition & 1 deletion trunk/Documentation/hwmon/fam15h_power
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Supported chips:
BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors
(not yet published)

Author: Andreas Herrmann <herrmann.der.user@googlemail.com>
Author: Andreas Herrmann <andreas.herrmann3@amd.com>

Description
-----------
Expand Down
5 changes: 2 additions & 3 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ F: include/linux/altera_uart.h
F: include/linux/altera_jtaguart.h

AMD FAM15H PROCESSOR POWER MONITORING DRIVER
M: Andreas Herrmann <herrmann.der.user@googlemail.com>
M: Andreas Herrmann <andreas.herrmann3@amd.com>
L: lm-sensors@lm-sensors.org
S: Maintained
F: Documentation/hwmon/fam15h_power
Expand Down Expand Up @@ -2507,7 +2507,6 @@ M: Joonyoung Shim <jy0922.shim@samsung.com>
M: Seung-Woo Kim <sw0312.kim@samsung.com>
M: Kyungmin Park <kyungmin.park@samsung.com>
L: dri-devel@lists.freedesktop.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
S: Supported
F: drivers/gpu/drm/exynos
F: include/drm/exynos*
Expand Down Expand Up @@ -5648,7 +5647,7 @@ S: Maintained
F: drivers/pinctrl/spear/

PKTCDVD DRIVER
M: Jiri Kosina <jkosina@suse.cz>
M: Peter Osterlund <petero2@telia.com>
S: Maintained
F: drivers/block/pktcdvd.c
F: include/linux/pktcdvd.h
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 7
SUBLEVEL = 0
EXTRAVERSION = -rc4
EXTRAVERSION = -rc3
NAME = Terrified Chipmunk

# *DOCUMENTATION*
Expand Down
6 changes: 1 addition & 5 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ config ARCH_OMAP
help
Support for TI's OMAP platform (OMAP1/2/3/4).

config ARCH_VT8500_SINGLE
config ARCH_VT8500
bool "VIA/WonderMedia 85xx"
select ARCH_HAS_CPUFREQ
select ARCH_REQUIRE_GPIOLIB
Expand All @@ -953,8 +953,6 @@ config ARCH_VT8500_SINGLE
select GENERIC_CLOCKEVENTS
select GENERIC_GPIO
select HAVE_CLK
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select USE_OF
help
Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
Expand Down Expand Up @@ -1129,8 +1127,6 @@ source "arch/arm/mach-versatile/Kconfig"
source "arch/arm/mach-vexpress/Kconfig"
source "arch/arm/plat-versatile/Kconfig"

source "arch/arm/mach-vt8500/Kconfig"

source "arch/arm/mach-w90x900/Kconfig"

# Definitions to make life easier
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/arm/include/asm/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ extern void iotable_init(struct map_desc *, int);
extern void vm_reserve_area_early(unsigned long addr, unsigned long size,
void *caller);

#ifdef CONFIG_DEBUG_LL
extern void debug_ll_addr(unsigned long *paddr, unsigned long *vaddr);
extern void debug_ll_io_init(void);
#else
static inline void debug_ll_io_init(void) {}
#endif

struct mem_type;
extern const struct mem_type *get_mem_type(unsigned int type);
/*
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/arm/kernel/debug.S
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ ENTRY(printch)
b 1b
ENDPROC(printch)

ENTRY(debug_ll_addr)
addruart r2, r3, ip
str r2, [r0]
str r3, [r1]
mov pc, lr
ENDPROC(debug_ll_addr)

#else

ENTRY(printascii)
Expand All @@ -126,11 +119,4 @@ ENTRY(printch)
mov pc, lr
ENDPROC(printch)

ENTRY(debug_ll_addr)
mov r2, #0
str r2, [r0]
str r2, [r1]
mov pc, lr
ENDPROC(debug_ll_addr)

#endif
12 changes: 0 additions & 12 deletions trunk/arch/arm/mach-vt8500/Kconfig

This file was deleted.

3 changes: 0 additions & 3 deletions trunk/arch/arm/mach-vt8500/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,4 @@ int __init vt8500_irq_init(struct device_node *node,
/* defined in drivers/clk/clk-vt8500.c */
void __init vtwm_clk_init(void __iomem *pmc_base);

/* defined in irq.c */
asmlinkage void vt8500_handle_irq(struct pt_regs *regs);

#endif
26 changes: 26 additions & 0 deletions trunk/arch/arm/mach-vt8500/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* arch/arm/mach-vt8500/include/mach/entry-macro.S
*
* Low-level IRQ helper macros for VIA VT8500
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

.macro get_irqnr_preamble, base, tmp
@ physical 0xd8140000 is virtual 0xf8140000
mov \base, #0xf8000000
orr \base, \base, #0x00140000
.endm

.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
ldr \irqnr, [\base]
cmp \irqnr, #63 @ may be false positive, check interrupt status
bne 1001f
ldr \irqstat, [\base, #0x84]
ands \irqstat, #0x80000000
moveq \irqnr, #0
1001:
.endm

22 changes: 22 additions & 0 deletions trunk/arch/arm/mach-vt8500/include/mach/irqs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* arch/arm/mach-vt8500/include/mach/irqs.h
*
* Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

/* This value is just to make the core happy, never used otherwise */
#define NR_IRQS 128
108 changes: 38 additions & 70 deletions trunk/arch/arm/mach-vt8500/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <linux/of_address.h>

#include <asm/irq.h>
#include <asm/exception.h>


#define VT8500_ICPC_IRQ 0x20
#define VT8500_ICPC_FIQ 0x24
Expand Down Expand Up @@ -66,42 +66,39 @@
#define VT8500_EDGE ( VT8500_TRIGGER_RISING \
| VT8500_TRIGGER_FALLING)

/* vt8500 has 1 intc, wm8505 and wm8650 have 2 */
#define VT8500_INTC_MAX 2
static int irq_cnt;

struct vt8500_irq_data {
void __iomem *base; /* IO Memory base address */
struct irq_domain *domain; /* Domain for this controller */
struct vt8500_irq_priv {
void __iomem *base;
};

/* Global variable for accessing io-mem addresses */
static struct vt8500_irq_data intc[VT8500_INTC_MAX];
static u32 active_cnt = 0;

static void vt8500_irq_mask(struct irq_data *d)
{
struct vt8500_irq_data *priv = d->domain->host_data;
struct vt8500_irq_priv *priv =
(struct vt8500_irq_priv *)(d->domain->host_data);
void __iomem *base = priv->base;
void __iomem *stat_reg = base + VT8500_ICIS + (d->hwirq < 32 ? 0 : 4);
u8 edge, dctr;
u32 status;
u8 edge;

edge = readb(base + VT8500_ICDC + d->hwirq) & VT8500_EDGE;
if (edge) {
status = readl(stat_reg);
void __iomem *stat_reg = base + VT8500_ICIS
+ (d->hwirq < 32 ? 0 : 4);
unsigned status = readl(stat_reg);

status |= (1 << (d->hwirq & 0x1f));
writel(status, stat_reg);
} else {
dctr = readb(base + VT8500_ICDC + d->hwirq);
u8 dctr = readb(base + VT8500_ICDC + d->hwirq);

dctr &= ~VT8500_INT_ENABLE;
writeb(dctr, base + VT8500_ICDC + d->hwirq);
}
}

static void vt8500_irq_unmask(struct irq_data *d)
{
struct vt8500_irq_data *priv = d->domain->host_data;
struct vt8500_irq_priv *priv =
(struct vt8500_irq_priv *)(d->domain->host_data);
void __iomem *base = priv->base;
u8 dctr;

Expand All @@ -112,7 +109,8 @@ static void vt8500_irq_unmask(struct irq_data *d)

static int vt8500_irq_set_type(struct irq_data *d, unsigned int flow_type)
{
struct vt8500_irq_data *priv = d->domain->host_data;
struct vt8500_irq_priv *priv =
(struct vt8500_irq_priv *)(d->domain->host_data);
void __iomem *base = priv->base;
u8 dctr;

Expand Down Expand Up @@ -150,15 +148,17 @@ static struct irq_chip vt8500_irq_chip = {

static void __init vt8500_init_irq_hw(void __iomem *base)
{
u32 i;
unsigned int i;

/* Enable rotating priority for IRQ */
writel(ICPC_ROTATE, base + VT8500_ICPC_IRQ);
writel(0x00, base + VT8500_ICPC_FIQ);

/* Disable all interrupts and route them to IRQ */
for (i = 0; i < 64; i++)
writeb(VT8500_INT_DISABLE | ICDC_IRQ, base + VT8500_ICDC + i);
for (i = 0; i < 64; i++) {
/* Disable all interrupts and route them to IRQ */
writeb(VT8500_INT_DISABLE | ICDC_IRQ,
base + VT8500_ICDC + i);
}
}

static int vt8500_irq_map(struct irq_domain *h, unsigned int virq,
Expand All @@ -175,67 +175,33 @@ static struct irq_domain_ops vt8500_irq_domain_ops = {
.xlate = irq_domain_xlate_onecell,
};

asmlinkage void __exception_irq_entry vt8500_handle_irq(struct pt_regs *regs)
{
u32 stat, i;
int irqnr, virq;
void __iomem *base;

/* Loop through each active controller */
for (i=0; i<active_cnt; i++) {
base = intc[i].base;
irqnr = readl_relaxed(base) & 0x3F;
/*
Highest Priority register default = 63, so check that this
is a real interrupt by checking the status register
*/
if (irqnr == 63) {
stat = readl_relaxed(base + VT8500_ICIS + 4);
if (!(stat & BIT(31)))
continue;
}

virq = irq_find_mapping(intc[i].domain, irqnr);
handle_IRQ(virq, regs);
}
}

int __init vt8500_irq_init(struct device_node *node, struct device_node *parent)
{
struct irq_domain *vt8500_irq_domain;
struct vt8500_irq_priv *priv;
int irq, i;
struct device_node *np = node;

if (active_cnt == VT8500_INTC_MAX) {
pr_err("%s: Interrupt controllers > VT8500_INTC_MAX\n",
__func__);
goto out;
}

intc[active_cnt].base = of_iomap(np, 0);
intc[active_cnt].domain = irq_domain_add_linear(node, 64,
&vt8500_irq_domain_ops, &intc[active_cnt]);
priv = kzalloc(sizeof(struct vt8500_irq_priv), GFP_KERNEL);
priv->base = of_iomap(np, 0);

if (!intc[active_cnt].base) {
pr_err("%s: Unable to map IO memory\n", __func__);
goto out;
}

if (!intc[active_cnt].domain) {
pr_err("%s: Unable to add irq domain!\n", __func__);
goto out;
}
vt8500_irq_domain = irq_domain_add_legacy(node, 64, irq_cnt, 0,
&vt8500_irq_domain_ops, priv);
if (!vt8500_irq_domain)
pr_err("%s: Unable to add wmt irq domain!\n", __func__);

vt8500_init_irq_hw(intc[active_cnt].base);
irq_set_default_host(vt8500_irq_domain);

pr_info("vt8500-irq: Added interrupt controller\n");
vt8500_init_irq_hw(priv->base);

active_cnt++;
pr_info("Added IRQ Controller @ %x [virq_base = %d]\n",
(u32)(priv->base), irq_cnt);

/* check if this is a slaved controller */
if (of_irq_count(np) != 0) {
/* check that we have the correct number of interrupts */
if (of_irq_count(np) != 8) {
pr_err("%s: Incorrect IRQ map for slaved controller\n",
pr_err("%s: Incorrect IRQ map for slave controller\n",
__func__);
return -EINVAL;
}
Expand All @@ -247,7 +213,9 @@ int __init vt8500_irq_init(struct device_node *node, struct device_node *parent)

pr_info("vt8500-irq: Enabled slave->parent interrupts\n");
}
out:

irq_cnt += 64;

return 0;
}

Loading

0 comments on commit 21dc538

Please sign in to comment.