summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-03-20 07:01:00 -0400
committerTom Rini <trini@konsulko.com>2015-03-20 07:01:00 -0400
commite6f4042a04195be258f79e33abe3b71af9162862 (patch)
treec386524124d1c95eb75e478ff271735454a04029 /arch/arm
parenta538ae997ae4cb375ba5362b50ba3f5b35f9519b (diff)
parent8e7a96364bc29073e5246d331a11ce8602d5d6a3 (diff)
downloadtalos-obmc-uboot-e6f4042a04195be258f79e33abe3b71af9162862.tar.gz
talos-obmc-uboot-e6f4042a04195be258f79e33abe3b71af9162862.zip
Merge branch 'master' of git://git.denx.de/u-boot-atmel
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c17
-rw-r--r--arch/arm/mach-at91/armv7/sama5d4_devices.c9
-rw-r--r--arch/arm/mach-at91/armv7/u-boot-spl.lds (renamed from arch/arm/mach-at91/u-boot-spl.lds)0
3 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c b/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c
index 0ec32c3ab9..857c864068 100644
--- a/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c
@@ -101,3 +101,20 @@ void at91_spi0_hw_init(unsigned long cs_mask)
}
}
#endif
+
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+void at91_mci_hw_init(void)
+{
+ struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+ at91_set_a_periph(AT91_PIO_PORTA, 2, 0); /* MCI CLK */
+ at91_set_a_periph(AT91_PIO_PORTA, 1, 0); /* MCI CDA */
+ at91_set_a_periph(AT91_PIO_PORTA, 0, 0); /* MCI DA0 */
+ at91_set_a_periph(AT91_PIO_PORTA, 3, 0); /* MCI DA1 */
+ at91_set_a_periph(AT91_PIO_PORTA, 4, 0); /* MCI DA2 */
+ at91_set_a_periph(AT91_PIO_PORTA, 5, 0); /* MCI DA3 */
+
+ /* Enable clock */
+ writel(1 << ATMEL_ID_MCI, &pmc->pcer);
+}
+#endif
diff --git a/arch/arm/mach-at91/armv7/sama5d4_devices.c b/arch/arm/mach-at91/armv7/sama5d4_devices.c
index ef39cb7e08..76301d6302 100644
--- a/arch/arm/mach-at91/armv7/sama5d4_devices.c
+++ b/arch/arm/mach-at91/armv7/sama5d4_devices.c
@@ -75,6 +75,15 @@ void matrix_init(void)
writel(0x00000001, &h32mx->sassr[4]);
writel(0x00000001, &h32mx->srtsr[4]);
+ /* Configure Programmable Security peripherals on matrix 64 */
+ writel(readl(&h64mx->spselr[0]) | 0x00080000, &h64mx->spselr[0]);
+ writel(readl(&h64mx->spselr[1]) | 0x00180000, &h64mx->spselr[1]);
+ writel(readl(&h64mx->spselr[2]) | 0x00000008, &h64mx->spselr[2]);
+
+ /* Configure Programmable Security peripherals on matrix 32 */
+ writel(readl(&h32mx->spselr[0]) | 0xFFC00000, &h32mx->spselr[0]);
+ writel(readl(&h32mx->spselr[1]) | 0x60E3FFFF, &h32mx->spselr[1]);
+
/* Enable the write protect */
writel(ATMEL_MATRIX_WPMR_WPKEY | ATMEL_MATRIX_WPMR_WPEN, &h64mx->wpmr);
writel(ATMEL_MATRIX_WPMR_WPKEY | ATMEL_MATRIX_WPMR_WPEN, &h32mx->wpmr);
diff --git a/arch/arm/mach-at91/u-boot-spl.lds b/arch/arm/mach-at91/armv7/u-boot-spl.lds
index eccca43a42..eccca43a42 100644
--- a/arch/arm/mach-at91/u-boot-spl.lds
+++ b/arch/arm/mach-at91/armv7/u-boot-spl.lds
OpenPOWER on IntegriCloud