Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5762
b: refs/heads/master
c: 3c4ee4e
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Aug 10, 2005
1 parent e2670a6 commit 0125779
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 205 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: 435d444a532af652ba8bdfd4db4424982bea2f69
refs/heads/master: 3c4ee4e2520775896efc6ab850c4c27971fbcf2a
93 changes: 0 additions & 93 deletions trunk/Documentation/arm/Samsung-S3C24XX/USB-Host.txt

This file was deleted.

4 changes: 3 additions & 1 deletion trunk/arch/arm/lib/bitops.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if __LINUX_ARM_ARCH__ >= 6
#include <linux/config.h>

#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_CPU_MPCORE)
.macro bitop, instr
mov r2, #1
and r3, r0, #7 @ Get bit offset
Expand Down
18 changes: 5 additions & 13 deletions trunk/arch/arm/mach-s3c2410/usb-simtec.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* linux/arch/arm/mach-s3c2410/usb-simtec.c
*
* Copyright (c) 2004,2005 Simtec Electronics
* Copyright (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* http://www.simtec.co.uk/products/EB2410ITX/
Expand All @@ -14,8 +14,6 @@
* Modifications:
* 14-Sep-2004 BJD Created
* 18-Oct-2004 BJD Cleanups, and added code to report OC cleared
* 09-Aug-2005 BJD Renamed s3c2410_report_oc to s3c2410_usb_report_oc
* 09-Aug-2005 BJD Ports powered only if both are enabled
*/

#define DEBUG
Expand Down Expand Up @@ -49,19 +47,13 @@
* designed boards.
*/

static unsigned int power_state[2];

static void
usb_simtec_powercontrol(int port, int to)
{
pr_debug("usb_simtec_powercontrol(%d,%d)\n", port, to);

power_state[port] = to;

if (power_state[0] && power_state[1])
s3c2410_gpio_setpin(S3C2410_GPB4, 0);
else
s3c2410_gpio_setpin(S3C2410_GPB4, 1);
if (port == 1)
s3c2410_gpio_setpin(S3C2410_GPB4, to ? 0:1);
}

static irqreturn_t
Expand All @@ -71,10 +63,10 @@ usb_simtec_ocirq(int irq, void *pw, struct pt_regs *regs)

if (s3c2410_gpio_getpin(S3C2410_GPG10) == 0) {
pr_debug("usb_simtec: over-current irq (oc detected)\n");
s3c2410_usb_report_oc(info, 3);
s3c2410_report_oc(info, 3);
} else {
pr_debug("usb_simtec: over-current irq (oc cleared)\n");
s3c2410_usb_report_oc(info, 0);
s3c2410_report_oc(info, 0);
}

return IRQ_HANDLED;
Expand Down
17 changes: 3 additions & 14 deletions trunk/arch/arm/mm/mm-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ static void __init build_mem_type_table(void)
{
struct cachepolicy *cp;
unsigned int cr = get_cr();
unsigned int user_pgprot;
int cpu_arch = cpu_architecture();
int i;

Expand All @@ -409,9 +408,6 @@ static void __init build_mem_type_table(void)
}
}

cp = &cache_policies[cachepolicy];
user_pgprot = cp->pte;

/*
* ARMv6 and above have extended page tables.
*/
Expand All @@ -430,19 +426,12 @@ static void __init build_mem_type_table(void)
mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;

/*
* Mark the device area as "shared device"
*/
mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE;
mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED;

/*
* User pages need to be mapped with the ASID
* (iow, non-global)
*/
user_pgprot |= L_PTE_ASID;
}

cp = &cache_policies[cachepolicy];

if (cpu_arch >= CPU_ARCH_ARMv5) {
mem_types[MT_LOW_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
mem_types[MT_HIGH_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
Expand All @@ -459,7 +448,7 @@ static void __init build_mem_type_table(void)

for (i = 0; i < 16; i++) {
unsigned long v = pgprot_val(protection_map[i]);
v &= (~(PTE_BUFFERABLE|PTE_CACHEABLE)) | user_pgprot;
v &= (~(PTE_BUFFERABLE|PTE_CACHEABLE)) | cp->pte;
protection_map[i] = __pgprot(v);
}

Expand Down
22 changes: 14 additions & 8 deletions trunk/arch/arm/mm/proc-v6.S
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ ENTRY(cpu_v6_switch_mm)
mcr p15, 0, r1, c13, c0, 1 @ set context ID
mov pc, lr

#define nG (1 << 11)
#define APX (1 << 9)
#define AP1 (1 << 5)
#define AP0 (1 << 4)
#define XN (1 << 0)

/*
* cpu_v6_set_pte(ptep, pte)
*
Expand All @@ -133,24 +139,24 @@ ENTRY(cpu_v6_switch_mm)
ENTRY(cpu_v6_set_pte)
str r1, [r0], #-2048 @ linux version

bic r2, r1, #0x000007f0
bic r2, r1, #0x00000ff0
bic r2, r2, #0x00000003
orr r2, r2, #PTE_EXT_AP0 | 2
orr r2, r2, #AP0 | 2

tst r1, #L_PTE_WRITE
tstne r1, #L_PTE_DIRTY
orreq r2, r2, #PTE_EXT_APX
orreq r2, r2, #APX

tst r1, #L_PTE_USER
orrne r2, r2, #PTE_EXT_AP1
tstne r2, #PTE_EXT_APX
bicne r2, r2, #PTE_EXT_APX | PTE_EXT_AP0
orrne r2, r2, #AP1 | nG
tstne r2, #APX
bicne r2, r2, #APX | AP0

tst r1, #L_PTE_YOUNG
biceq r2, r2, #PTE_EXT_APX | PTE_EXT_AP_MASK
biceq r2, r2, #APX | AP1 | AP0

@ tst r1, #L_PTE_EXEC
@ orreq r2, r2, #PTE_EXT_XN
@ orreq r2, r2, #XN

tst r1, #L_PTE_PRESENT
moveq r2, #0
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/input/gameport/ns558.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ static int __init ns558_init(void)

static void __exit ns558_exit(void)
{
struct ns558 *ns558, *safe;
struct ns558 *ns558;

list_for_each_entry_safe(ns558, safe, &ns558_list, node) {
list_for_each_entry(ns558, &ns558_list, node) {
gameport_unregister_port(ns558->gameport);
release_region(ns558->io & ~(ns558->size - 1), ns558->size);
kfree(ns558);
Expand Down
20 changes: 16 additions & 4 deletions trunk/drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,20 @@ struct sixpack {

#define AX25_6PACK_HEADER_LEN 0

static void sp_start_tx_timer(struct sixpack *);
static void sixpack_decode(struct sixpack *, unsigned char[], int);
static int encode_sixpack(unsigned char *, unsigned char *, int, unsigned char);

/*
* Perform the persistence/slottime algorithm for CSMA access. If the
* perform the persistence/slottime algorithm for CSMA access. If the
* persistence check was successful, write the data to the serial driver.
* Note that in case of DAMA operation, the data is not sent here.
*/

static void sp_xmit_on_air(unsigned long channel)
{
struct sixpack *sp = (struct sixpack *) channel;
int actual, when = sp->slottime;
int actual;
static unsigned char random;

random = random * 17 + 41;
Expand All @@ -158,10 +159,20 @@ static void sp_xmit_on_air(unsigned long channel)
sp->tty->driver->write(sp->tty, &sp->led_state, 1);
sp->status2 = 0;
} else
mod_timer(&sp->tx_t, jiffies + ((when + 1) * HZ) / 100);
sp_start_tx_timer(sp);
}

/* ----> 6pack timer interrupt handler and friends. <---- */
static void sp_start_tx_timer(struct sixpack *sp)
{
int when = sp->slottime;

del_timer(&sp->tx_t);
sp->tx_t.data = (unsigned long) sp;
sp->tx_t.function = sp_xmit_on_air;
sp->tx_t.expires = jiffies + ((when + 1) * HZ) / 100;
add_timer(&sp->tx_t);
}

/* Encapsulate one AX.25 frame and stuff into a TTY queue. */
static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
Expand Down Expand Up @@ -232,7 +243,8 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
sp->xleft = count;
sp->xhead = sp->xbuff;
sp->status2 = count;
sp_xmit_on_air((unsigned long)sp);
if (sp->duplex == 0)
sp_start_tx_timer(sp);
}

return;
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,13 +907,9 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
raptorFlag = TRUE;
}

if (pci_request_regions(pDev, "dpt_i2o")) {
PERROR("dpti: adpt_config_hba: pci request region failed\n");
return -EINVAL;
}

base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size);
if (!base_addr_virt) {
pci_release_regions(pDev);
PERROR("dpti: adpt_config_hba: io remap failed\n");
return -EINVAL;
}
Expand All @@ -923,7 +919,6 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
if (!msg_addr_virt) {
PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n");
iounmap(base_addr_virt);
pci_release_regions(pDev);
return -EINVAL;
}
} else {
Expand All @@ -937,7 +932,6 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
iounmap(msg_addr_virt);
}
iounmap(base_addr_virt);
pci_release_regions(pDev);
return -ENOMEM;
}
memset(pHba, 0, sizeof(adpt_hba));
Expand Down Expand Up @@ -1033,7 +1027,6 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
up(&adpt_configuration_lock);

iounmap(pHba->base_addr_virt);
pci_release_regions(pHba->pDev);
if(pHba->msg_addr_virt != pHba->base_addr_virt){
iounmap(pHba->msg_addr_virt);
}
Expand Down
16 changes: 1 addition & 15 deletions trunk/drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,23 +336,9 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
unsigned long flags;
const int size = sizeof(struct scsi_target)
+ shost->transportt->target_size;
struct scsi_target *starget;
struct scsi_target *starget = kmalloc(size, GFP_ATOMIC);
struct scsi_target *found_target;

/*
* Obtain the real parent from the transport. The transport
* is allowed to fail (no error) if there is nothing at that
* target id.
*/
if (shost->transportt->target_parent) {
spin_lock_irqsave(shost->host_lock, flags);
parent = shost->transportt->target_parent(shost, channel, id);
spin_unlock_irqrestore(shost->host_lock, flags);
if (!parent)
return NULL;
}

starget = kmalloc(size, GFP_KERNEL);
if (!starget) {
printk(KERN_ERR "%s: allocation failure\n", __FUNCTION__);
return NULL;
Expand Down
Loading

0 comments on commit 0125779

Please sign in to comment.