diff options
Diffstat (limited to 'arch/arm/mach-mmp/include/mach')
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mmp2.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/sram.h | 35 |
2 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h index de7b88826ad..2f7b2d3c2b1 100644 --- a/arch/arm/mach-mmp/include/mach/mmp2.h +++ b/arch/arm/mach-mmp/include/mach/mmp2.h | |||
@@ -13,6 +13,7 @@ extern void mmp2_clear_pmic_int(void); | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/i2c/pxa-i2c.h> | 14 | #include <linux/i2c/pxa-i2c.h> |
15 | #include <mach/devices.h> | 15 | #include <mach/devices.h> |
16 | #include <mach/sram.h> | ||
16 | 17 | ||
17 | extern struct pxa_device_desc mmp2_device_uart1; | 18 | extern struct pxa_device_desc mmp2_device_uart1; |
18 | extern struct pxa_device_desc mmp2_device_uart2; | 19 | extern struct pxa_device_desc mmp2_device_uart2; |
@@ -28,6 +29,8 @@ extern struct pxa_device_desc mmp2_device_sdh0; | |||
28 | extern struct pxa_device_desc mmp2_device_sdh1; | 29 | extern struct pxa_device_desc mmp2_device_sdh1; |
29 | extern struct pxa_device_desc mmp2_device_sdh2; | 30 | extern struct pxa_device_desc mmp2_device_sdh2; |
30 | extern struct pxa_device_desc mmp2_device_sdh3; | 31 | extern struct pxa_device_desc mmp2_device_sdh3; |
32 | extern struct pxa_device_desc mmp2_device_asram; | ||
33 | extern struct pxa_device_desc mmp2_device_isram; | ||
31 | 34 | ||
32 | static inline int mmp2_add_uart(int id) | 35 | static inline int mmp2_add_uart(int id) |
33 | { | 36 | { |
@@ -85,5 +88,15 @@ static inline int mmp2_add_sdhost(int id, struct sdhci_pxa_platdata *data) | |||
85 | return pxa_register_device(d, data, sizeof(*data)); | 88 | return pxa_register_device(d, data, sizeof(*data)); |
86 | } | 89 | } |
87 | 90 | ||
91 | static inline int mmp2_add_asram(struct sram_platdata *data) | ||
92 | { | ||
93 | return pxa_register_device(&mmp2_device_asram, data, sizeof(*data)); | ||
94 | } | ||
95 | |||
96 | static inline int mmp2_add_isram(struct sram_platdata *data) | ||
97 | { | ||
98 | return pxa_register_device(&mmp2_device_isram, data, sizeof(*data)); | ||
99 | } | ||
100 | |||
88 | #endif /* __ASM_MACH_MMP2_H */ | 101 | #endif /* __ASM_MACH_MMP2_H */ |
89 | 102 | ||
diff --git a/arch/arm/mach-mmp/include/mach/sram.h b/arch/arm/mach-mmp/include/mach/sram.h new file mode 100644 index 00000000000..239e0fc1bb1 --- /dev/null +++ b/arch/arm/mach-mmp/include/mach/sram.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/include/mach/sram.h | ||
3 | * | ||
4 | * SRAM Memory Management | ||
5 | * | ||
6 | * Copyright (c) 2011 Marvell Semiconductors Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_SRAM_H | ||
15 | #define __ASM_ARCH_SRAM_H | ||
16 | |||
17 | #include <linux/genalloc.h> | ||
18 | |||
19 | /* ARBITRARY: SRAM allocations are multiples of this 2^N size */ | ||
20 | #define SRAM_GRANULARITY 512 | ||
21 | |||
22 | enum sram_type { | ||
23 | MMP_SRAM_UNDEFINED = 0, | ||
24 | MMP_ASRAM, | ||
25 | MMP_ISRAM, | ||
26 | }; | ||
27 | |||
28 | struct sram_platdata { | ||
29 | char *pool_name; | ||
30 | int granularity; | ||
31 | }; | ||
32 | |||
33 | extern struct gen_pool *sram_get_gpool(char *pool_name); | ||
34 | |||
35 | #endif /* __ASM_ARCH_SRAM_H */ | ||