Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57728
b: refs/heads/master
c: 4a907de
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jun 13, 2007
1 parent c06840c commit fd77e42
Show file tree
Hide file tree
Showing 40 changed files with 290 additions and 329 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: 1e0e76cf1376a0a1b49a23396e945456c329814e
refs/heads/master: 4a907dec9845001dc2b117a0ed2a2150384a4cea
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-s3c2440/mach-anubis.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ static struct map_desc anubis_iodesc[] __initdata = {
.length = SZ_4K,
.type = MT_DEVICE,
}, {
.virtual = (u32)ANUBIS_VA_IDREG,
.pfn = __phys_to_pfn(ANUBIS_PA_IDREG),
.virtual = (u32)ANUBIS_VA_CTRL2,
.pfn = __phys_to_pfn(ANUBIS_PA_CTRL2),
.length = SZ_4K,
.type = MT_DEVICE,
},
Expand Down
58 changes: 4 additions & 54 deletions trunk/arch/arm/mach-s3c2440/mach-osiris.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/serial_core.h>

#include <asm/mach/arch.h>
Expand Down Expand Up @@ -66,11 +65,6 @@ static struct map_desc osiris_iodesc[] __initdata = {
/* CPLD control registers */

{
.virtual = (u32)OSIRIS_VA_CTRL0,
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL0),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (u32)OSIRIS_VA_CTRL1,
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL1),
.length = SZ_16K,
Expand All @@ -80,11 +74,6 @@ static struct map_desc osiris_iodesc[] __initdata = {
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL2),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (u32)OSIRIS_VA_IDREG,
.pfn = __phys_to_pfn(OSIRIS_PA_IDREG),
.length = SZ_16K,
.type = MT_DEVICE,
},
};

Expand Down Expand Up @@ -206,13 +195,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot)
pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n",
slot, set, set->nr_map);

tmp = __raw_readb(OSIRIS_VA_CTRL0);
tmp &= ~OSIRIS_CTRL0_NANDSEL;
tmp = __raw_readb(OSIRIS_VA_CTRL1);
tmp &= ~OSIRIS_CTRL1_NANDSEL;
tmp |= slot;

pr_debug("osiris_nand: ctrl0 now %02x\n", tmp);
pr_debug("osiris_nand: ctrl1 now %02x\n", tmp);

__raw_writeb(tmp, OSIRIS_VA_CTRL0);
__raw_writeb(tmp, OSIRIS_VA_CTRL1);
}

static struct s3c2410_platform_nand osiris_nand_info = {
Expand Down Expand Up @@ -246,45 +235,10 @@ static struct platform_device osiris_pcmcia = {
.resource = osiris_pcmcia_resource,
};

/* Osiris power management device */

#ifdef CONFIG_PM
static unsigned char pm_osiris_ctrl0;

static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
{
pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0);
return 0;
}

static int osiris_pm_resume(struct sys_device *sd)
{
if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
__raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);

return 0;
}

#else
#define osiris_pm_suspend NULL
#define osiris_pm_resume NULL
#endif

static struct sysdev_class osiris_pm_sysclass = {
set_kset_name("mach-osiris"),
.suspend = osiris_pm_suspend,
.resume = osiris_pm_resume,
};

static struct sys_device osiris_pm_sysdev = {
.cls = &osiris_pm_sysclass,
};

/* Standard Osiris devices */

static struct platform_device *osiris_devices[] __initdata = {
&s3c_device_i2c,
&s3c_device_wdt,
&s3c_device_nand,
&osiris_pcmcia,
};
Expand Down Expand Up @@ -334,9 +288,6 @@ static void __init osiris_map_io(void)

static void __init osiris_init(void)
{
sysdev_class_register(&osiris_pm_sysclass);
sysdev_register(&osiris_pm_sysdev);

platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices));
};

Expand All @@ -348,6 +299,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
.map_io = osiris_map_io,
.init_machine = osiris_init,
.init_irq = s3c24xx_init_irq,
.init_machine = osiris_init,
.timer = &s3c24xx_timer,
MACHINE_END
4 changes: 0 additions & 4 deletions trunk/arch/arm/vfp/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ do_vfp:
add r10, r10, #TI_VFPSTATE @ r10 = workspace
ldr pc, [r4] @ call VFP entry point

ENTRY(vfp_null_entry)
mov pc, lr
ENDPROC(vfp_null_entry)

.LCvfp:
.word vfp_vector

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/arm/vfp/vfpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
*/
void vfp_testing_entry(void);
void vfp_support_entry(void);
void vfp_null_entry(void);

void (*vfp_vector)(void) = vfp_null_entry;
void (*vfp_vector)(void) = vfp_testing_entry;
union vfp_state *last_VFP_context[NR_CPUS];

/*
Expand Down Expand Up @@ -322,10 +321,8 @@ static int __init vfp_init(void)
* The handler is already setup to just log calls, so
* we just need to read the VFPSID register.
*/
vfp_vector = vfp_testing_entry;
vfpsid = fmrx(FPSID);
barrier();
vfp_vector = vfp_null_entry;

printk(KERN_INFO "VFP support v0.3: ");
if (VFP_arch) {
Expand Down
131 changes: 122 additions & 9 deletions trunk/arch/sparc64/kernel/irq.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* $Id: irq.c,v 1.114 2002/01/11 08:45:38 davem Exp $
* irq.c: UltraSparc IRQ handling/init/registry.
/* irq.c: UltraSparc IRQ handling/init/registry.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
* Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net)
* Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
* Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
Expand Down Expand Up @@ -43,6 +42,7 @@
#include <asm/cpudata.h>
#include <asm/auxio.h>
#include <asm/head.h>
#include <asm/hypervisor.h>

/* UPA nodes send interrupt packet to UltraSparc with first data reg
* value low 5 (7 on Starfire) bits holding the IRQ identifier being
Expand Down Expand Up @@ -380,6 +380,76 @@ static void sun4v_irq_end(unsigned int virt_irq)
}
}

static void sun4v_virq_enable(unsigned int virt_irq)
{
struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
unsigned int ino = bucket - &ivector_table[0];

if (likely(bucket)) {
unsigned long cpuid, dev_handle, dev_ino;
int err;

cpuid = irq_choose_cpu(virt_irq);

dev_handle = ino & IMAP_IGN;
dev_ino = ino & IMAP_INO;

err = sun4v_vintr_set_target(dev_handle, dev_ino, cpuid);
if (err != HV_EOK)
printk("sun4v_vintr_set_target(%lx,%lx,%lu): "
"err(%d)\n",
dev_handle, dev_ino, cpuid, err);
err = sun4v_vintr_set_state(dev_handle, dev_ino,
HV_INTR_ENABLED);
if (err != HV_EOK)
printk("sun4v_vintr_set_state(%lx,%lx,"
"HV_INTR_ENABLED): err(%d)\n",
dev_handle, dev_ino, err);
}
}

static void sun4v_virq_disable(unsigned int virt_irq)
{
struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
unsigned int ino = bucket - &ivector_table[0];

if (likely(bucket)) {
unsigned long dev_handle, dev_ino;
int err;

dev_handle = ino & IMAP_IGN;
dev_ino = ino & IMAP_INO;

err = sun4v_vintr_set_state(dev_handle, dev_ino,
HV_INTR_DISABLED);
if (err != HV_EOK)
printk("sun4v_vintr_set_state(%lx,%lx,"
"HV_INTR_DISABLED): err(%d)\n",
dev_handle, dev_ino, err);
}
}

static void sun4v_virq_end(unsigned int virt_irq)
{
struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
unsigned int ino = bucket - &ivector_table[0];

if (likely(bucket)) {
unsigned long dev_handle, dev_ino;
int err;

dev_handle = ino & IMAP_IGN;
dev_ino = ino & IMAP_INO;

err = sun4v_vintr_set_state(dev_handle, dev_ino,
HV_INTR_STATE_IDLE);
if (err != HV_EOK)
printk("sun4v_vintr_set_state(%lx,%lx,"
"HV_INTR_STATE_IDLE): err(%d)\n",
dev_handle, dev_ino, err);
}
}

static void run_pre_handler(unsigned int virt_irq)
{
struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
Expand Down Expand Up @@ -434,6 +504,21 @@ static struct irq_chip sun4v_msi = {
};
#endif

static struct irq_chip sun4v_virq = {
.typename = "vsun4v",
.enable = sun4v_virq_enable,
.disable = sun4v_virq_disable,
.end = sun4v_virq_end,
};

static struct irq_chip sun4v_virq_ack = {
.typename = "vsun4v+ack",
.enable = sun4v_virq_enable,
.disable = sun4v_virq_disable,
.ack = run_pre_handler,
.end = sun4v_virq_end,
};

void irq_install_pre_handler(int virt_irq,
void (*func)(unsigned int, void *, void *),
void *arg1, void *arg2)
Expand All @@ -447,15 +532,18 @@ void irq_install_pre_handler(int virt_irq,

chip = get_irq_chip(virt_irq);
if (chip == &sun4u_irq_ack ||
chip == &sun4v_irq_ack
chip == &sun4v_irq_ack ||
chip == &sun4v_virq_ack
#ifdef CONFIG_PCI_MSI
|| chip == &sun4v_msi
#endif
)
return;

chip = (chip == &sun4u_irq ?
&sun4u_irq_ack : &sun4v_irq_ack);
&sun4u_irq_ack :
(chip == &sun4v_irq ?
&sun4v_irq_ack : &sun4v_virq_ack));
set_irq_chip(virt_irq, chip);
}

Expand Down Expand Up @@ -492,19 +580,18 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
return bucket->virt_irq;
}

unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
static unsigned int sun4v_build_common(unsigned long sysino,
struct irq_chip *chip)
{
struct ino_bucket *bucket;
struct irq_handler_data *data;
unsigned long sysino;

BUG_ON(tlb_type != hypervisor);

sysino = sun4v_devino_to_sysino(devhandle, devino);
bucket = &ivector_table[sysino];
if (!bucket->virt_irq) {
bucket->virt_irq = virt_irq_alloc(__irq(bucket));
set_irq_chip(bucket->virt_irq, &sun4v_irq);
set_irq_chip(bucket->virt_irq, chip);
}

data = get_irq_chip_data(bucket->virt_irq);
Expand All @@ -529,6 +616,32 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
return bucket->virt_irq;
}

unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
{
unsigned long sysino = sun4v_devino_to_sysino(devhandle, devino);

return sun4v_build_common(sysino, &sun4v_irq);
}

unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
{
unsigned long sysino, hv_err;

BUG_ON(devhandle & ~IMAP_IGN);
BUG_ON(devino & ~IMAP_INO);

sysino = devhandle | devino;

hv_err = sun4v_vintr_set_cookie(devhandle, devino, sysino);
if (hv_err) {
prom_printf("IRQ: Fatal, cannot set cookie for [%x:%x] "
"err=%lu\n", devhandle, devino, hv_err);
prom_halt();
}

return sun4v_build_common(sysino, &sun4v_virq);
}

#ifdef CONFIG_PCI_MSI
unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
unsigned int msi_start, unsigned int msi_end)
Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/input/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,6 @@ config INPUT_FF_MEMLESS
To compile this driver as a module, choose M here: the
module will be called ff-memless.

config INPUT_POLLDEV
tristate "Polled input device skeleton"
help
Say Y here if you are using a driver for an input
device that periodically polls hardware state. This
option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.

If unsure, say N.

To compile this driver as a module, choose M here: the
module will be called input-polldev.

comment "Userland interfaces"

config INPUT_MOUSEDEV
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/input/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ obj-$(CONFIG_INPUT) += input-core.o
input-core-objs := input.o ff-core.o

obj-$(CONFIG_INPUT_FF_MEMLESS) += ff-memless.o
obj-$(CONFIG_INPUT_POLLDEV) += input-polldev.o

obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o
obj-$(CONFIG_INPUT_JOYDEV) += joydev.o
Expand Down
Loading

0 comments on commit fd77e42

Please sign in to comment.