aboutsummaryrefslogtreecommitdiffstats
path: root/patches.at91/0202-AT91SAM9N12-add-crypto-peripherals.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.at91/0202-AT91SAM9N12-add-crypto-peripherals.patch')
-rw-r--r--patches.at91/0202-AT91SAM9N12-add-crypto-peripherals.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/patches.at91/0202-AT91SAM9N12-add-crypto-peripherals.patch b/patches.at91/0202-AT91SAM9N12-add-crypto-peripherals.patch
new file mode 100644
index 00000000000000..5c73a90542a2e3
--- /dev/null
+++ b/patches.at91/0202-AT91SAM9N12-add-crypto-peripherals.patch
@@ -0,0 +1,90 @@
+From 4d751232a49a7f677bd665ca70c2887e6d2537d5 Mon Sep 17 00:00:00 2001
+From: Nicolas Royer <nicolas@eukrea.com>
+Date: Mon, 17 Sep 2012 18:26:13 +0200
+Subject: AT91SAM9N12: add crypto peripherals
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Royer <nicolas@eukrea.com>
+Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Acked-by: Eric Bénard <eric@eukrea.com>
+Tested-by: Eric Bénard <eric@eukrea.com>
+---
+ arch/arm/mach-at91/at91sam9n12.c | 17 +++++++++++++++++
+ arch/arm/mach-at91/include/mach/at91sam9n12.h | 2 ++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
+index ebe94bb..d09baf1 100644
+--- a/arch/arm/mach-at91/at91sam9n12.c
++++ b/arch/arm/mach-at91/at91sam9n12.c
+@@ -17,6 +17,7 @@
+ #include <mach/cpu.h>
+ #include <mach/board.h>
+
++
+ #include "soc.h"
+ #include "generic.h"
+ #include "clock.h"
+@@ -134,6 +135,17 @@ static struct clk ssc_clk = {
+ .pmc_mask = 1 << AT91SAM9N12_ID_SSC,
+ .type = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk aes_clk = {
++ .name = "aes_clk",
++ .pmc_mask = 1 << AT91SAM9N12_ID_AES,
++ .type = CLK_TYPE_PERIPHERAL,
++};
++static struct clk sha_clk = {
++ .name = "sha_clk",
++ .pmc_mask = 1 << AT91SAM9N12_ID_SHA,
++ .type = CLK_TYPE_PERIPHERAL,
++};
++
+
+ static struct clk *periph_clocks[] __initdata = {
+ &pioAB_clk,
+@@ -157,6 +169,8 @@ static struct clk *periph_clocks[] __initdata = {
+ &uhp_clk,
+ &udp_clk,
+ &ssc_clk,
++ &aes_clk,
++ &sha_clk,
+ };
+
+ static struct clk_lookup periph_clocks_lookups[] = {
+@@ -176,6 +190,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
+ CLKDEV_CON_ID("pioB", &pioAB_clk),
+ CLKDEV_CON_ID("pioC", &pioCD_clk),
+ CLKDEV_CON_ID("pioD", &pioCD_clk),
++ CLKDEV_CON_DEV_ID("aes_clk", "f000c000.aes", &aes_clk),
++ CLKDEV_CON_DEV_ID("sha_clk", "f0014000.sha", &sha_clk),
+ /* additional fake clock for macb_hclk */
+ CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk),
+ CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk),
+@@ -219,6 +235,7 @@ static void __init at91sam9n12_register_clocks(void)
+ static void __init at91sam9n12_map_io(void)
+ {
+ at91_init_sram(0, AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE);
++ init_consistent_dma_size(SZ_4M);
+ }
+
+ void __init at91sam9n12_initialize(void)
+diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12.h b/arch/arm/mach-at91/include/mach/at91sam9n12.h
+index d374b87..e07b0de 100644
+--- a/arch/arm/mach-at91/include/mach/at91sam9n12.h
++++ b/arch/arm/mach-at91/include/mach/at91sam9n12.h
+@@ -36,7 +36,9 @@
+ #define AT91SAM9N12_ID_UDP 23 /* USB Device High Speed */
+ #define AT91SAM9N12_ID_LCDC 25 /* LCD Controller */
+ #define AT91SAM9N12_ID_ISI 25 /* Image Sensor Interface */
++#define AT91SAM9N12_ID_SHA 27 /* SHA */
+ #define AT91SAM9N12_ID_SSC 28 /* Synchronous Serial Controller */
++#define AT91SAM9N12_ID_AES 29 /* AES */
+ #define AT91SAM9N12_ID_TRNG 30 /* TRNG */
+ #define AT91SAM9N12_ID_IRQ0 31 /* Advanced Interrupt Controller */
+
+--
+1.8.0.197.g5a90748
+