diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-12 21:11:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-12 21:11:33 -0400 |
commit | f7d02ae76ebbf5b8a9531fe150c49e126a397704 (patch) | |
tree | bcfdcab6e70658d55a3c843694e04e938bf9168f /arch/arm/kernel/ecard.c | |
parent | 78db2ad6f4df9145bfd6aab1c0f1c56d615288ec (diff) | |
parent | 158304ef09a28c7f2dd37d78f536a4e09ba084a1 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
[ARM] Use new get_irqnr_preamble
[ARM] Ensure machine class menu is sorted alphabetically
[ARM] 4333/2: KS8695: Micrel Development board
[ARM] 4332/2: KS8695: Serial driver
[ARM] 4331/3: Support for Micrel/Kendin KS8695 processor
[ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board
[ARM] 4372/1: Define byte sizes in asm-arm/sizes.h
[ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors.
[ARM] Update mach-types
[ARM] export symbol csum_partial_copy_from_user
[ARM] iop13xx: msi support
[ARM] stacktrace fix
[ARM] Spinlock initializer cleanup
[ARM] remove useless config option GENERIC_BUST_SPINLOCK
[ARM] 4303/3: base kernel support for TI DaVinci
[ARM] 4369/1: AT91: Fix circular dependency in header files
[ARM] 4368/1: S3C24xx: build fix
[ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK
[ARM] Fix iop32x/iop33x build
[ARM] EBSA110: fix build errors caused by missing "const"
...
Diffstat (limited to 'arch/arm/kernel/ecard.c')
-rw-r--r-- | arch/arm/kernel/ecard.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index bdbd7da99286..f56d48c451ea 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -41,11 +41,11 @@ | |||
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/io.h> | ||
44 | 45 | ||
45 | #include <asm/dma.h> | 46 | #include <asm/dma.h> |
46 | #include <asm/ecard.h> | 47 | #include <asm/ecard.h> |
47 | #include <asm/hardware.h> | 48 | #include <asm/hardware.h> |
48 | #include <asm/io.h> | ||
49 | #include <asm/irq.h> | 49 | #include <asm/irq.h> |
50 | #include <asm/mmu_context.h> | 50 | #include <asm/mmu_context.h> |
51 | #include <asm/mach/irq.h> | 51 | #include <asm/mach/irq.h> |
@@ -958,6 +958,31 @@ void ecard_release_resources(struct expansion_card *ec) | |||
958 | } | 958 | } |
959 | EXPORT_SYMBOL(ecard_release_resources); | 959 | EXPORT_SYMBOL(ecard_release_resources); |
960 | 960 | ||
961 | void ecard_setirq(struct expansion_card *ec, const struct expansion_card_ops *ops, void *irq_data) | ||
962 | { | ||
963 | ec->irq_data = irq_data; | ||
964 | barrier(); | ||
965 | ec->ops = ops; | ||
966 | } | ||
967 | EXPORT_SYMBOL(ecard_setirq); | ||
968 | |||
969 | void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res, | ||
970 | unsigned long offset, unsigned long maxsize) | ||
971 | { | ||
972 | unsigned long start = ecard_resource_start(ec, res); | ||
973 | unsigned long end = ecard_resource_end(ec, res); | ||
974 | |||
975 | if (offset > (end - start)) | ||
976 | return NULL; | ||
977 | |||
978 | start += offset; | ||
979 | if (maxsize && end - start > maxsize) | ||
980 | end = start + maxsize; | ||
981 | |||
982 | return devm_ioremap(&ec->dev, start, end - start); | ||
983 | } | ||
984 | EXPORT_SYMBOL(ecardm_iomap); | ||
985 | |||
961 | /* | 986 | /* |
962 | * Probe for an expansion card. | 987 | * Probe for an expansion card. |
963 | * | 988 | * |
@@ -1133,6 +1158,14 @@ static int ecard_drv_remove(struct device *dev) | |||
1133 | drv->remove(ec); | 1158 | drv->remove(ec); |
1134 | ecard_release(ec); | 1159 | ecard_release(ec); |
1135 | 1160 | ||
1161 | /* | ||
1162 | * Restore the default operations. We ensure that the | ||
1163 | * ops are set before we change the data. | ||
1164 | */ | ||
1165 | ec->ops = &ecard_default_ops; | ||
1166 | barrier(); | ||
1167 | ec->irq_data = NULL; | ||
1168 | |||
1136 | return 0; | 1169 | return 0; |
1137 | } | 1170 | } |
1138 | 1171 | ||