diff options
Diffstat (limited to 'arch/avr32/mach-at32ap/at32ap700x.c')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 3ee5e7278790..07b21b121eef 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/arch/at32ap700x.h> | 20 | #include <asm/arch/at32ap700x.h> |
21 | #include <asm/arch/board.h> | 21 | #include <asm/arch/board.h> |
22 | #include <asm/arch/portmux.h> | 22 | #include <asm/arch/portmux.h> |
23 | #include <asm/arch/sram.h> | ||
23 | 24 | ||
24 | #include <video/atmel_lcdc.h> | 25 | #include <video/atmel_lcdc.h> |
25 | 26 | ||
@@ -2120,3 +2121,28 @@ void __init setup_platform(void) | |||
2120 | at32_init_pio(&pio3_device); | 2121 | at32_init_pio(&pio3_device); |
2121 | at32_init_pio(&pio4_device); | 2122 | at32_init_pio(&pio4_device); |
2122 | } | 2123 | } |
2124 | |||
2125 | struct gen_pool *sram_pool; | ||
2126 | |||
2127 | static int __init sram_init(void) | ||
2128 | { | ||
2129 | struct gen_pool *pool; | ||
2130 | |||
2131 | /* 1KiB granularity */ | ||
2132 | pool = gen_pool_create(10, -1); | ||
2133 | if (!pool) | ||
2134 | goto fail; | ||
2135 | |||
2136 | if (gen_pool_add(pool, 0x24000000, 0x8000, -1)) | ||
2137 | goto err_pool_add; | ||
2138 | |||
2139 | sram_pool = pool; | ||
2140 | return 0; | ||
2141 | |||
2142 | err_pool_add: | ||
2143 | gen_pool_destroy(pool); | ||
2144 | fail: | ||
2145 | pr_err("Failed to create SRAM pool\n"); | ||
2146 | return -ENOMEM; | ||
2147 | } | ||
2148 | core_initcall(sram_init); | ||