[PATCH v2 0/4] TMS570 pinmux support and pin definitions update

Gedare Bloom gedare at rtems.org
Mon Jun 20 20:08:10 UTC 2016


Looks reasonable to me.

On Mon, Jun 20, 2016 at 3:52 PM,  <pisa at cmp.felk.cvut.cz> wrote:
> From: Pavel Pisa <pisa at cmp.felk.cvut.cz>
>
> These enhancements are laying already for long term in TMS570
> development branch for RTEMS 4.11 and they should be
> available for mainline as well.
>
>   https://github.com/AoLaD/rtems/tree/tms570-bsp-with-hwinit
>
> The main purpose of these changes is attempt to archive small but
> required step in direction to provide BSP with complete initialization
> included.
>
> If the review is positive I push changes to mainline.
>
> Pinmux definition allows easy setup of individual pin function at runtime
>
>   tms570_bsp_pin_set_function(TMS570_BALL_V5_MDCLK, TMS570_PIN_FNC_AUTO);
>
> and even mechanism to setup all registers by single call
>
>   #define TMS570_PINMMR_INIT_LIST(per_pin_action, common_arg) \
>     per_pin_action(common_arg, TMS570_BALL_W10_GIOB_3) \
>     per_pin_action(common_arg, TMS570_BALL_A5_GIOA_0) \
>   ...
>
>   const uint32_t tms570_pinmmr_init_data[] = {
>     TMS570_PINMMR_REG_VAL(0, TMS570_PINMMR_INIT_LIST),
>     TMS570_PINMMR_REG_VAL(1, TMS570_PINMMR_INIT_LIST),
>     TMS570_PINMMR_REG_VAL(2, TMS570_PINMMR_INIT_LIST),
>     TMS570_PINMMR_REG_VAL(3, TMS570_PINMMR_INIT_LIST),
>   ...
>     TMS570_PINMMR_REG_VAL(30, TMS570_PINMMR_INIT_LIST),
>   };
>
>   void
>   tms570_pinmux_init(void)
>   {
>     tms570_bsp_pinmmr_config(tms570_pinmmr_init_data, 0,
>                   RTEMS_ARRAY_SIZE(tms570_pinmmr_init_data));
>   }
>
> Serial hardware initialization appropriate for startup
> from unconfigured state is includes as well.
>
> Complete initialization code is much more complex pending task.
> If there is interrest I would prepare BSP configuration option
> to build with complete HalCoGen files as well and call appropriate
> functions during startup.
>
> Code has been tested over OpenOCD to run from SDRAM when
> board is preconfigured by
>
>   https://github.com/hornmich/tms570ls3137-hdk-sdram/tree/master/SDRAM_SCI_configuration
>
> and to work with lwIP TMS570 port included in
>
>   https://sourceforge.net/p/ulan/lwip-omk/
>
> RTEMS ticker, OMK lwIP test and dlopen test with ELF load
> run successfully on BSP. TMS570LS3137 in revission D
> is required to run successfully from SDRAM due to more
> critical errata. Run from internal RAM or Flash should
> not be affected by these erratas so much.
>
> Pavel Pisa (4):
>   bsp/tms570: include package balls and PINMMR registers mapping for
>     TMS570LS3135ZWT chip.
>   bsp/tms570: update pinmux to provide support for initialization lists
>     and clear of alt outputs.
>   bsp/tms570: include complete peripheral initialization to SCI driver.
>   bsp/tms570: regenerate preinstall makefile by bootstrap -p.
>
>  c/src/lib/libbsp/arm/tms570/Makefile.am            |   3 +
>  c/src/lib/libbsp/arm/tms570/console/tms570-sci.c   |  38 +-
>  .../lib/libbsp/arm/tms570/include/tms570-pinmux.h  | 136 ++--
>  c/src/lib/libbsp/arm/tms570/include/tms570-pins.h  |  10 +
>  c/src/lib/libbsp/arm/tms570/include/tms570.h       |   3 +
>  .../arm/tms570/include/tms570ls3137zwt-pins.h      | 690 +++++++++++++++++++++
>  c/src/lib/libbsp/arm/tms570/pinmux/pinmux.c        | 123 +++-
>  c/src/lib/libbsp/arm/tms570/preinstall.am          |   8 +
>  8 files changed, 940 insertions(+), 71 deletions(-)
>  create mode 100644 c/src/lib/libbsp/arm/tms570/include/tms570-pins.h
>  create mode 100644 c/src/lib/libbsp/arm/tms570/include/tms570ls3137zwt-pins.h
>
> --
> 1.9.1
>


More information about the devel mailing list