2015-03-01 11:44:40 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2015
|
2015-11-29 10:50:53 +00:00
|
|
|
* Kamil Lulko, <kamil.lulko@gmail.com>
|
2015-03-01 11:44:40 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/io.h>
|
2017-05-03 23:38:56 +00:00
|
|
|
#include <asm/armv7m_mpu.h>
|
2015-03-01 11:44:40 +00:00
|
|
|
#include <asm/arch/stm32.h>
|
|
|
|
|
|
|
|
u32 get_cpu_rev(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int arch_cpu_init(void)
|
|
|
|
{
|
2017-05-03 23:38:56 +00:00
|
|
|
struct mpu_region_config stm32_region_config[] = {
|
|
|
|
{ 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
|
|
|
|
STRONG_ORDER, REGION_4GB },
|
|
|
|
};
|
2017-07-28 09:54:14 +00:00
|
|
|
int i;
|
|
|
|
|
2015-03-01 11:44:40 +00:00
|
|
|
configure_clocks();
|
|
|
|
/*
|
|
|
|
* Configure the memory protection unit (MPU) to allow full access to
|
|
|
|
* the whole 4GB address space.
|
|
|
|
*/
|
2017-05-03 23:38:56 +00:00
|
|
|
disable_mpu();
|
2017-07-28 09:54:14 +00:00
|
|
|
for (i = 0; i < ARRAY_SIZE(stm32_region_config); i++)
|
2017-05-03 23:38:56 +00:00
|
|
|
mpu_config(&stm32_region_config[i]);
|
|
|
|
enable_mpu();
|
2015-03-01 11:44:40 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void s_init(void)
|
|
|
|
{
|
|
|
|
}
|