[U-Boot] [PATCH v2 0/7] Introduce function mux library

Simon Glass sjg at chromium.org
Tue Nov 29 02:04:34 CET 2011


It is clear even at this early stage that some board/nvidia code
needs to move into the cpu area. Stephen Warren suggested two changes
which are the subject of the first two patches in this series.

This series also introduces a new function mux concept, which allows
selecting of pin options for a particular peripheral. This makes it
easy for boards to set up pin muxing without having to know the details,
and copy lots of code.

We will revisit this concept once pin muxing is finalised in the kernel.

Most platforms will want UARTs to be configured, so we move this into
the cpu area also. The new board_init_uart_f() function looks after
configuring the UARTs as selected by the CONFIG_TEGRA2_ENABLE_...
options.

The last patch fixes a build error not introduced by this series.

Changes in v2:
- Code style: added blank line before return in arch_cpu_init()
- Move UART init from funcmux to clock
- funcmux functions can fail and now return an error code
- Use size_t instead of int
- Remove UART_COUNT subscript
- Use clock_ll_start_uart() to set up UARTs
- Wrap nvedit error in commit message

Simon Glass (7):
  tegra: Move cpu_init_cp15() to arch_cpu_init()
  tegra: Move clock_early_init() to arch_cpu_init()
  tegra: add clock_ll_start_uart() to enable UART prior to reloc
  tegra: Add a function mux feature
  tegra: Add support for UART init in cpu board.c
  tegra: Move boards over to use arch-level board UART function
  tegra: Fix build error in plutux, medcom

 arch/arm/cpu/armv7/tegra2/Makefile         |    2 +-
 arch/arm/cpu/armv7/tegra2/board.c          |   58 ++++++++++++++++++++
 arch/arm/cpu/armv7/tegra2/clock.c          |   14 +++++
 arch/arm/cpu/armv7/tegra2/funcmux.c        |   58 ++++++++++++++++++++
 arch/arm/include/asm/arch-tegra2/board.h   |   30 ++++++++++
 arch/arm/include/asm/arch-tegra2/clock.h   |   11 ++++
 arch/arm/include/asm/arch-tegra2/funcmux.h |   41 ++++++++++++++
 board/avionic-design/common/tamonten.c     |   50 +----------------
 board/nvidia/common/board.c                |   82 +---------------------------
 include/configs/medcom.h                   |    2 +
 include/configs/plutux.h                   |    2 +
 11 files changed, 222 insertions(+), 128 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/tegra2/funcmux.c
 create mode 100644 arch/arm/include/asm/arch-tegra2/board.h
 create mode 100644 arch/arm/include/asm/arch-tegra2/funcmux.h

-- 
1.7.3.1



More information about the U-Boot mailing list