diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:04:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:04:59 -0400 |
commit | 95985725367e55642755ca6986d0c930cd3738e2 (patch) | |
tree | e8c8627bc782fa39f42ab3d099e92ebdb8261026 /arch/arm/mach-shmobile/include/mach/mmc-mackerel.h | |
parent | 4d4fcae1d4a10c6cf3c8ca2ec61d2d3270f1225e (diff) | |
parent | 9d9659b6c0ebf7dde65ebada4c67980818245913 (diff) |
Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
mmc: Add MMC_PROGRESS_*
mmc, ARM: Rename SuperH Mobile ARM zboot helpers
ARM: mach-shmobile: add coherent DMA mask to CEU camera devices
ARM: mach-shmobile: Dynamic backlight control for Mackerel
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach/mmc-mackerel.h')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/mmc-mackerel.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h new file mode 100644 index 000000000000..15d3a9efdec2 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h | |||
@@ -0,0 +1,38 @@ | |||
1 | #ifndef MMC_MACKEREL_H | ||
2 | #define MMC_MACKEREL_H | ||
3 | |||
4 | #define PORT0CR (void __iomem *)0xe6051000 | ||
5 | #define PORT1CR (void __iomem *)0xe6051001 | ||
6 | #define PORT2CR (void __iomem *)0xe6051002 | ||
7 | #define PORT159CR (void __iomem *)0xe605009f | ||
8 | |||
9 | #define PORTR031_000DR (void __iomem *)0xe6055000 | ||
10 | #define PORTL159_128DR (void __iomem *)0xe6054010 | ||
11 | |||
12 | static inline void mmc_init_progress(void) | ||
13 | { | ||
14 | /* Initialise LEDS0-3 | ||
15 | * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) | ||
16 | * value: 0x10 - enable output | ||
17 | */ | ||
18 | __raw_writeb(0x10, PORT0CR); | ||
19 | __raw_writeb(0x10, PORT1CR); | ||
20 | __raw_writeb(0x10, PORT2CR); | ||
21 | __raw_writeb(0x10, PORT159CR); | ||
22 | } | ||
23 | |||
24 | static inline void mmc_update_progress(int n) | ||
25 | { | ||
26 | unsigned a = 0, b = 0; | ||
27 | |||
28 | if (n < 3) | ||
29 | a = 1 << n; | ||
30 | else | ||
31 | b = 1 << 31; | ||
32 | |||
33 | __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a, | ||
34 | PORTR031_000DR); | ||
35 | __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, | ||
36 | PORTL159_128DR); | ||
37 | } | ||
38 | #endif /* MMC_MACKEREL_H */ | ||