Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264594
b: refs/heads/master
c: 06cf0b5
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Aug 17, 2011
1 parent 48e6118 commit 9b7d311
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 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: 1ace756628443ac41e8b6b409277fc4ee847472e
refs/heads/master: 06cf0b5468f204754f32e571f8415b20cedbe5f0
29 changes: 9 additions & 20 deletions trunk/arch/arm/kernel/ecard.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,52 +674,45 @@ static int __init ecard_probeirqhw(void)
#define ecard_probeirqhw() (0)
#endif

#ifndef IO_EC_MEMC8_BASE
#define IO_EC_MEMC8_BASE 0
#endif

static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
{
unsigned long address = 0;
void __iomem *address = NULL;
int slot = ec->slot_no;

if (ec->slot_no == 8)
return (void __iomem *)ioaddr(IO_EC_MEMC8_BASE);
return ECARD_MEMC8_BASE;

ectcr &= ~(1 << slot);

switch (type) {
case ECARD_MEMC:
if (slot < 4)
address = IO_EC_MEMC_BASE + (slot << 12);
address = ECARD_MEMC_BASE + (slot << 14);
break;

case ECARD_IOC:
if (slot < 4)
address = IO_EC_IOC_BASE + (slot << 12);
#ifdef IO_EC_IOC4_BASE
address = ECARD_IOC_BASE + (slot << 14);
else
address = IO_EC_IOC4_BASE + ((slot - 4) << 12);
#endif
address = ECARD_IOC4_BASE + ((slot - 4) << 14);
if (address)
address += speed << 17;
address += speed << 19;
break;

#ifdef IO_EC_EASI_BASE
case ECARD_EASI:
address = IO_EC_EASI_BASE + (slot << 22);
address = ECARD_EASI_BASE + (slot << 24);
if (speed == ECARD_FAST)
ectcr |= 1 << slot;
break;
#endif

default:
break;
}

#ifdef IOMD_ECTCR
iomd_writeb(ectcr, IOMD_ECTCR);
#endif
return (void __iomem *)(address ? ioaddr(address) : NULL);
return address;
}

static int ecard_prints(struct seq_file *m, ecard_t *ec)
Expand Down Expand Up @@ -1049,10 +1042,8 @@ ecard_probe(int slot, card_type_t type)
set_irq_flags(ec->irq, IRQF_VALID);
}

#ifdef IO_EC_MEMC8_BASE
if (slot == 8)
ec->irq = 11;
#endif
#ifdef CONFIG_ARCH_RPC
/* On RiscPC, only first two slots have DMA capability */
if (slot < 2)
Expand Down Expand Up @@ -1098,9 +1089,7 @@ static int __init ecard_init(void)
ecard_probe(slot, ECARD_IOC);
}

#ifdef IO_EC_MEMC8_BASE
ecard_probe(8, ECARD_IOC);
#endif

irqhw = ecard_probeirqhw();

Expand Down
11 changes: 5 additions & 6 deletions trunk/arch/arm/mach-rpc/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,20 @@
/*
* IO Addresses
*/
#define ECARD_EASI_BASE (IO_BASE + 0x05000000)
#define VIDC_BASE (IO_BASE + 0x00400000)
#define EXPMASK_BASE (IO_BASE + 0x00360000)
#define ECARD_IOC4_BASE (IO_BASE + 0x00270000)
#define ECARD_IOC_BASE (IO_BASE + 0x00240000)
#define IOMD_BASE (IO_BASE + 0x00200000)
#define IOC_BASE (IO_BASE + 0x00200000)
#define ECARD_MEMC8_BASE (IO_BASE + 0x0002b000)
#define FLOPPYDMA_BASE (IO_BASE + 0x0002a000)
#define PCIO_BASE (IO_BASE + 0x00010000)
#define ECARD_MEMC_BASE (IO_BASE + 0x00000000)

#define vidc_writel(val) __raw_writel(val, VIDC_BASE)

#define IO_EC_EASI_BASE 0x81400000
#define IO_EC_IOC4_BASE 0x8009c000
#define IO_EC_IOC_BASE 0x80090000
#define IO_EC_MEMC8_BASE 0x8000ac00
#define IO_EC_MEMC_BASE 0x80000000

#define NETSLOT_BASE 0x0302b000
#define NETSLOT_SIZE 0x00001000

Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/arm/mach-rpc/include/mach/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ DECLARE_IO(int,l,"")
#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))

/* the following macro is deprecated */
#define ioaddr(port) ((unsigned long)__ioaddr((port)))

#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)

Expand Down

0 comments on commit 9b7d311

Please sign in to comment.