Skip to content
Snippets Groups Projects
Commit bca7ab31 authored by Leo Yan's avatar Leo Yan Committed by Eric Miao
Browse files

ARM: mmp: register internal sram bank


MMP2 have the internal sram, this sram can be allocated
for video, power management and secure processor.

Now the sram usage is:
0xd1000000 ~ 0xd101ffff (128KB) : reserved for secure processor
0xd1020000 ~ 0xd1037fff (96KB)  : for video and PM

Register the internal sram's second half 96KB buffer,
so that video and PM can dynamically alloc/free from it.

Signed-off-by: default avatarLeo Yan <leoy@marvell.com>
Acked-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 101bf4c1
No related branches found
No related tags found
No related merge requests found
...@@ -191,6 +191,11 @@ static struct sram_platdata mmp2_asram_platdata = { ...@@ -191,6 +191,11 @@ static struct sram_platdata mmp2_asram_platdata = {
.granularity = SRAM_GRANULARITY, .granularity = SRAM_GRANULARITY,
}; };
static struct sram_platdata mmp2_isram_platdata = {
.pool_name = "isram",
.granularity = SRAM_GRANULARITY,
};
static void __init brownstone_init(void) static void __init brownstone_init(void)
{ {
mfp_config(ARRAY_AND_SIZE(brownstone_pin_config)); mfp_config(ARRAY_AND_SIZE(brownstone_pin_config));
...@@ -202,6 +207,7 @@ static void __init brownstone_init(void) ...@@ -202,6 +207,7 @@ static void __init brownstone_init(void)
mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */ mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */ mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */
mmp2_add_asram(&mmp2_asram_platdata); mmp2_add_asram(&mmp2_asram_platdata);
mmp2_add_isram(&mmp2_isram_platdata);
/* enable 5v regulator */ /* enable 5v regulator */
platform_device_register(&brownstone_v_5vp_device); platform_device_register(&brownstone_v_5vp_device);
......
...@@ -30,6 +30,7 @@ extern struct pxa_device_desc mmp2_device_sdh1; ...@@ -30,6 +30,7 @@ extern struct pxa_device_desc mmp2_device_sdh1;
extern struct pxa_device_desc mmp2_device_sdh2; extern struct pxa_device_desc mmp2_device_sdh2;
extern struct pxa_device_desc mmp2_device_sdh3; extern struct pxa_device_desc mmp2_device_sdh3;
extern struct pxa_device_desc mmp2_device_asram; extern struct pxa_device_desc mmp2_device_asram;
extern struct pxa_device_desc mmp2_device_isram;
static inline int mmp2_add_uart(int id) static inline int mmp2_add_uart(int id)
{ {
...@@ -92,5 +93,10 @@ static inline int mmp2_add_asram(struct sram_platdata *data) ...@@ -92,5 +93,10 @@ static inline int mmp2_add_asram(struct sram_platdata *data)
return pxa_register_device(&mmp2_device_asram, data, sizeof(*data)); return pxa_register_device(&mmp2_device_asram, data, sizeof(*data));
} }
static inline int mmp2_add_isram(struct sram_platdata *data)
{
return pxa_register_device(&mmp2_device_isram, data, sizeof(*data));
}
#endif /* __ASM_MACH_MMP2_H */ #endif /* __ASM_MACH_MMP2_H */
...@@ -227,4 +227,6 @@ MMP2_DEVICE(sdh1, "sdhci-pxav3", 1, MMC2, 0xd4280800, 0x120); ...@@ -227,4 +227,6 @@ MMP2_DEVICE(sdh1, "sdhci-pxav3", 1, MMC2, 0xd4280800, 0x120);
MMP2_DEVICE(sdh2, "sdhci-pxav3", 2, MMC3, 0xd4281000, 0x120); MMP2_DEVICE(sdh2, "sdhci-pxav3", 2, MMC3, 0xd4281000, 0x120);
MMP2_DEVICE(sdh3, "sdhci-pxav3", 3, MMC4, 0xd4281800, 0x120); MMP2_DEVICE(sdh3, "sdhci-pxav3", 3, MMC4, 0xd4281800, 0x120);
MMP2_DEVICE(asram, "asram", -1, NONE, 0xe0000000, 0x4000); MMP2_DEVICE(asram, "asram", -1, NONE, 0xe0000000, 0x4000);
/* 0xd1000000 ~ 0xd101ffff is reserved for secure processor */
MMP2_DEVICE(isram, "isram", -1, NONE, 0xd1020000, 0x18000);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment