Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188162
b: refs/heads/master
c: 2e0c17d
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Mar 18, 2010
1 parent bdc6e78 commit 0debd84
Show file tree
Hide file tree
Showing 19 changed files with 154 additions and 70 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: 22001a13d09d82772e831dcdac0553994a4bac5d
refs/heads/master: 2e0c17d100c35e843dac1e99daf19b5e2b3fe168
15 changes: 15 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5214,6 +5214,21 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
S: Maintained
F: arch/sparc/

SPARC SERIAL DRIVERS
M: "David S. Miller" <davem@davemloft.net>
L: sparclinux@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
S: Maintained
F: drivers/serial/suncore.c
F: drivers/serial/suncore.h
F: drivers/serial/sunhv.c
F: drivers/serial/sunsab.c
F: drivers/serial/sunsab.h
F: drivers/serial/sunsu.c
F: drivers/serial/sunzilog.c
F: drivers/serial/sunzilog.h

SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
M: Roger Wolff <R.E.Wolff@BitWizard.nl>
S: Supported
Expand Down
15 changes: 10 additions & 5 deletions trunk/drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,16 @@ static inline int memory_fail_init(void)
* differentiation between which *physical* devices each
* section belongs to...
*/
int __weak arch_get_memory_phys_device(unsigned long start_pfn)
{
return 0;
}

static int add_memory_block(int nid, struct mem_section *section,
unsigned long state, int phys_device,
enum mem_add_context context)
unsigned long state, enum mem_add_context context)
{
struct memory_block *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
unsigned long start_pfn;
int ret = 0;

if (!mem)
Expand All @@ -443,7 +447,8 @@ static int add_memory_block(int nid, struct mem_section *section,
mem->phys_index = __section_nr(section);
mem->state = state;
mutex_init(&mem->state_mutex);
mem->phys_device = phys_device;
start_pfn = section_nr_to_pfn(mem->phys_index);
mem->phys_device = arch_get_memory_phys_device(start_pfn);

ret = register_memory(mem, section);
if (!ret)
Expand Down Expand Up @@ -515,7 +520,7 @@ int remove_memory_block(unsigned long node_id, struct mem_section *section,
*/
int register_new_memory(int nid, struct mem_section *section)
{
return add_memory_block(nid, section, MEM_OFFLINE, 0, HOTPLUG);
return add_memory_block(nid, section, MEM_OFFLINE, HOTPLUG);
}

int unregister_memory_section(struct mem_section *section)
Expand Down Expand Up @@ -548,7 +553,7 @@ int __init memory_dev_init(void)
if (!present_section_nr(i))
continue;
err = add_memory_block(0, __nr_to_section(i), MEM_ONLINE,
0, BOOT);
BOOT);
if (!ret)
ret = err;
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp)
else
v &= ~0xffff;

for (irq = find_first_bit(&v, HPET_MAX_IRQ); irq < HPET_MAX_IRQ;
irq = find_next_bit(&v, HPET_MAX_IRQ, 1 + irq)) {

for_each_set_bit(irq, &v, HPET_MAX_IRQ) {
if (irq >= nr_irqs) {
irq = HPET_MAX_IRQ;
break;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pcmcia/i82092.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ static int __devinit i82092aa_pci_probe(struct pci_dev *dev, const struct pci_de
sockets[i].socket.map_size = 0x1000;
sockets[i].socket.irq_mask = 0;
sockets[i].socket.pci_irq = dev->irq;
sockets[i].socket.cb_dev = dev;
sockets[i].socket.owner = THIS_MODULE;

sockets[i].number = i;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pcmcia/i82365.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
#define I365_CSC_DETECT 0x08
#define I365_CSC_ANY 0x0F
#define I365_CSC_GPI 0x10
#define I365_CSC_IRQ_MASK 0xF0

/* Flags for I365_ADDRWIN */
#define I365_ENA_IO(map) (0x40 << (map))
Expand Down
36 changes: 16 additions & 20 deletions trunk/drivers/pcmcia/pcmcia_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
{
struct pcmcia_socket *s;
config_t *c;
int ret;

s = p_dev->socket;

Expand All @@ -264,13 +265,13 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,

if (!(s->state & SOCKET_PRESENT)) {
dev_dbg(&s->dev, "No card present\n");
mutex_unlock(&s->ops_mutex);
return -ENODEV;
ret = -ENODEV;
goto unlock;
}
if (!(c->state & CONFIG_LOCKED)) {
dev_dbg(&s->dev, "Configuration isnt't locked\n");
mutex_unlock(&s->ops_mutex);
return -EACCES;
ret = -EACCES;
goto unlock;
}

if (mod->Attributes & CONF_IRQ_CHANGE_VALID) {
Expand All @@ -286,29 +287,30 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,

if (mod->Attributes & CONF_VCC_CHANGE_VALID) {
dev_dbg(&s->dev, "changing Vcc is not allowed at this time\n");
return -EINVAL;
ret = -EINVAL;
goto unlock;
}

/* We only allow changing Vpp1 and Vpp2 to the same value */
if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) &&
(mod->Attributes & CONF_VPP2_CHANGE_VALID)) {
if (mod->Vpp1 != mod->Vpp2) {
dev_dbg(&s->dev, "Vpp1 and Vpp2 must be the same\n");
mutex_unlock(&s->ops_mutex);
return -EINVAL;
ret = -EINVAL;
goto unlock;
}
s->socket.Vpp = mod->Vpp1;
if (s->ops->set_socket(s, &s->socket)) {
mutex_unlock(&s->ops_mutex);
dev_printk(KERN_WARNING, &s->dev,
"Unable to set VPP\n");
return -EIO;
ret = -EIO;
goto unlock;
}
} else if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) ||
(mod->Attributes & CONF_VPP2_CHANGE_VALID)) {
dev_dbg(&s->dev, "changing Vcc is not allowed at this time\n");
mutex_unlock(&s->ops_mutex);
return -EINVAL;
ret = -EINVAL;
goto unlock;
}

if (mod->Attributes & CONF_IO_CHANGE_WIDTH) {
Expand All @@ -332,9 +334,11 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
s->ops->set_io_map(s, &io_on);
}
}
ret = 0;
unlock:
mutex_unlock(&s->ops_mutex);

return 0;
return ret;
} /* modify_configuration */
EXPORT_SYMBOL(pcmcia_modify_configuration);

Expand Down Expand Up @@ -752,14 +756,6 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)

#ifdef CONFIG_PCMCIA_PROBE

#ifdef IRQ_NOAUTOEN
/* if the underlying IRQ infrastructure allows for it, only allocate
* the IRQ, but do not enable it
*/
if (!(req->Handler))
type |= IRQ_NOAUTOEN;
#endif /* IRQ_NOAUTOEN */

if (s->irq.AssignedIRQ != 0) {
/* If the interrupt is already assigned, it must be the same */
irq = s->irq.AssignedIRQ;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pcmcia/pd6729.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev,
socket[i].socket.map_size = 0x1000;
socket[i].socket.irq_mask = mask;
socket[i].socket.pci_irq = dev->irq;
socket[i].socket.cb_dev = dev;
socket[i].socket.owner = THIS_MODULE;

socket[i].number = i;
Expand Down
37 changes: 35 additions & 2 deletions trunk/drivers/pcmcia/ti113x.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static int ti_init(struct yenta_socket *socket)
u8 new, reg = exca_readb(socket, I365_INTCTL);

new = reg & ~I365_INTR_ENA;
if (socket->cb_irq)
if (socket->dev->irq)
new |= I365_INTR_ENA;
if (new != reg)
exca_writeb(socket, I365_INTCTL, new);
Expand All @@ -316,14 +316,47 @@ static int ti_override(struct yenta_socket *socket)
return 0;
}

static void ti113x_use_isa_irq(struct yenta_socket *socket)
{
int isa_irq = -1;
u8 intctl;
u32 isa_irq_mask = 0;

if (!isa_probe)
return;

/* get a free isa int */
isa_irq_mask = yenta_probe_irq(socket, isa_interrupts);
if (!isa_irq_mask)
return; /* no useable isa irq found */

/* choose highest available */
for (; isa_irq_mask; isa_irq++)
isa_irq_mask >>= 1;
socket->cb_irq = isa_irq;

exca_writeb(socket, I365_CSCINT, (isa_irq << 4));

intctl = exca_readb(socket, I365_INTCTL);
intctl &= ~(I365_INTR_ENA | I365_IRQ_MASK); /* CSC Enable */
exca_writeb(socket, I365_INTCTL, intctl);

dev_info(&socket->dev->dev,
"Yenta TI113x: using isa irq %d for CardBus\n", isa_irq);
}


static int ti113x_override(struct yenta_socket *socket)
{
u8 cardctl;

cardctl = config_readb(socket, TI113X_CARD_CONTROL);
cardctl &= ~(TI113X_CCR_PCI_IRQ_ENA | TI113X_CCR_PCI_IREQ | TI113X_CCR_PCI_CSC);
if (socket->cb_irq)
if (socket->dev->irq)
cardctl |= TI113X_CCR_PCI_IRQ_ENA | TI113X_CCR_PCI_CSC | TI113X_CCR_PCI_IREQ;
else
ti113x_use_isa_irq(socket);

config_writeb(socket, TI113X_CARD_CONTROL, cardctl);

return ti_override(socket);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/pcmcia/vrc4171_card.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ typedef struct vrc4171_socket {
char name[24];
int csc_irq;
int io_irq;
spinlock_t lock;
} vrc4171_socket_t;

static vrc4171_socket_t vrc4171_sockets[CARD_MAX_SLOTS];
Expand Down Expand Up @@ -327,7 +328,7 @@ static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
slot = sock->sock;
socket = &vrc4171_sockets[slot];

spin_lock_irq(&sock->lock);
spin_lock_irq(&socket->lock);

voltage = set_Vcc_value(state->Vcc);
exca_write_byte(slot, CARD_VOLTAGE_SELECT, voltage);
Expand Down Expand Up @@ -370,7 +371,7 @@ static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
cscint |= I365_CSC_DETECT;
exca_write_byte(slot, I365_CSCINT, cscint);

spin_unlock_irq(&sock->lock);
spin_unlock_irq(&socket->lock);

return 0;
}
Expand Down
Loading

0 comments on commit 0debd84

Please sign in to comment.