aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Yan <leoy@marvell.com>2011-08-14 23:09:53 -0400
committerEric Miao <eric.y.miao@gmail.com>2011-10-25 08:29:20 -0400
commit101bf4c19672b519f6d50a7b11e1e03b25a929b6 (patch)
tree886d455140f1504b9d8876059d7047394883a2aa
parent3c7241bd36e2a618fe20c91f6c69cc20f2d981f2 (diff)
ARM: mmp: register audio sram bank
MMP platform has sram for the audio island; Add the device structure for the audio sram, and register the audio sram device at init phase. Signed-off-by: Leo Yan <leoy@marvell.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-mmp/brownstone.c5
-rw-r--r--arch/arm/mach-mmp/include/mach/mmp2.h7
-rw-r--r--arch/arm/mach-mmp/mmp2.c1
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index c79162a50f28..db4b5fd4e9d2 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -186,6 +186,10 @@ static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc2 = {
186 | PXA_FLAG_SD_8_BIT_CAPABLE_SLOT, 186 | PXA_FLAG_SD_8_BIT_CAPABLE_SLOT,
187}; 187};
188 188
189static struct sram_platdata mmp2_asram_platdata = {
190 .pool_name = "asram",
191 .granularity = SRAM_GRANULARITY,
192};
189 193
190static void __init brownstone_init(void) 194static void __init brownstone_init(void)
191{ 195{
@@ -197,6 +201,7 @@ static void __init brownstone_init(void)
197 mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info)); 201 mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info));
198 mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */ 202 mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
199 mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */ 203 mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */
204 mmp2_add_asram(&mmp2_asram_platdata);
200 205
201 /* enable 5v regulator */ 206 /* enable 5v regulator */
202 platform_device_register(&brownstone_v_5vp_device); 207 platform_device_register(&brownstone_v_5vp_device);
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h
index de7b88826ad7..c2273287eda4 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
17extern struct pxa_device_desc mmp2_device_uart1; 18extern struct pxa_device_desc mmp2_device_uart1;
18extern struct pxa_device_desc mmp2_device_uart2; 19extern struct pxa_device_desc mmp2_device_uart2;
@@ -28,6 +29,7 @@ extern struct pxa_device_desc mmp2_device_sdh0;
28extern struct pxa_device_desc mmp2_device_sdh1; 29extern struct pxa_device_desc mmp2_device_sdh1;
29extern struct pxa_device_desc mmp2_device_sdh2; 30extern struct pxa_device_desc mmp2_device_sdh2;
30extern struct pxa_device_desc mmp2_device_sdh3; 31extern struct pxa_device_desc mmp2_device_sdh3;
32extern struct pxa_device_desc mmp2_device_asram;
31 33
32static inline int mmp2_add_uart(int id) 34static inline int mmp2_add_uart(int id)
33{ 35{
@@ -85,5 +87,10 @@ static inline int mmp2_add_sdhost(int id, struct sdhci_pxa_platdata *data)
85 return pxa_register_device(d, data, sizeof(*data)); 87 return pxa_register_device(d, data, sizeof(*data));
86} 88}
87 89
90static inline int mmp2_add_asram(struct sram_platdata *data)
91{
92 return pxa_register_device(&mmp2_device_asram, data, sizeof(*data));
93}
94
88#endif /* __ASM_MACH_MMP2_H */ 95#endif /* __ASM_MACH_MMP2_H */
89 96
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index 079c18861d5c..9d0075475349 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -226,4 +226,5 @@ MMP2_DEVICE(sdh0, "sdhci-pxav3", 0, MMC, 0xd4280000, 0x120);
226MMP2_DEVICE(sdh1, "sdhci-pxav3", 1, MMC2, 0xd4280800, 0x120); 226MMP2_DEVICE(sdh1, "sdhci-pxav3", 1, MMC2, 0xd4280800, 0x120);
227MMP2_DEVICE(sdh2, "sdhci-pxav3", 2, MMC3, 0xd4281000, 0x120); 227MMP2_DEVICE(sdh2, "sdhci-pxav3", 2, MMC3, 0xd4281000, 0x120);
228MMP2_DEVICE(sdh3, "sdhci-pxav3", 3, MMC4, 0xd4281800, 0x120); 228MMP2_DEVICE(sdh3, "sdhci-pxav3", 3, MMC4, 0xd4281800, 0x120);
229MMP2_DEVICE(asram, "asram", -1, NONE, 0xe0000000, 0x4000);
229 230