[PATCH 02/17] bsp/arm: Separate setup for translation table

Chris Johns chrisj at rtems.org
Thu Feb 27 05:54:07 UTC 2014


Hi Ralf,

Some of these line are far to long. There is no formal policy on this 
such as 80 columns however some are way way past a reasonable limit.

There are also some "/* TODO */" statements. Seems we are supporting 
doxygen should this be @todo. Also it would be nice if some detail was 
added such as why we need these functions and someone should add this code.

There is "#if 0" code. What is the code and why is it removed ?

Chris

On 26/02/2014 9:51 pm, Ralf Kirchner wrote:
> ---
>   .../lib/libbsp/arm/shared/include/arm-cp15-start.h |   26 ++++++++++++++++----
>   1 Datei geändert, 21 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)
>
> diff --git a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
> index 54f2963..a0fe9b1 100644
> --- a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
> +++ b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
> @@ -129,12 +129,11 @@ arm_cp15_start_set_translation_table_entries(
>   }
>
>   BSP_START_TEXT_SECTION static inline void
> -arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
> -  uint32_t ctrl,
> -  uint32_t *ttb,
> -  uint32_t client_domain,
> +arm_cp15_start_setup_translation_table(
> +  uint32_t                            *ttb,
> +  const uint32_t                       client_domain,
>     const arm_cp15_start_section_config *config_table,
> -  size_t config_count
> +  const size_t                         config_count
>   )
>   {
>     uint32_t dac = ARM_CP15_DAC_DOMAIN(client_domain, ARM_CP15_DAC_CLIENT);
> @@ -151,7 +150,24 @@ arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
>     for (i = 0; i < config_count; ++i) {
>       arm_cp15_start_set_translation_table_entries(ttb, &config_table [i]);
>     }
> +}
>
> +BSP_START_TEXT_SECTION static inline void
> +arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
> +  uint32_t ctrl,
> +  uint32_t *ttb,
> +  uint32_t client_domain,
> +  const arm_cp15_start_section_config *config_table,
> +  size_t config_count
> +)
> +{
> +  arm_cp15_start_setup_translation_table(
> +    ttb,
> +    client_domain,
> +    config_table,
> +    config_count
> +  );
> +
>     /* Enable MMU and cache */
>     ctrl |= ARM_CP15_CTRL_I | ARM_CP15_CTRL_C | ARM_CP15_CTRL_M;
>
>



More information about the devel mailing list