U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
January 2017
- 194 participants
- 600 discussions

[U-Boot] [PATCH v2] defconfig: Add a config for AM335x High Security EVM
by Andrew F. Davis 22 Jan '17
by Andrew F. Davis 22 Jan '17
22 Jan '17
Add a new defconfig file for the AM335x High Security EVM. This config
is specific for the case of memory device booting. Memory device booting
is handled separatly from peripheral booting on HS devices as the load
address changes.
This defconfig is the same as for the non-secure part, except for:
CONFIG_TI_SECURE_DEVICE option set to 'y'
CONFIG_ISW_ENTRY_ADDR updated for secure images.
CONFIG_FIT_IMAGE_POST_PROCESS option set to 'y'
CONFIG_SPL_FIT_IMAGE_POST_PROCESS option set to 'y'
CONFIG_USE_TINY_PRINTF option set to 'y' to reduce SPL size
CONFIG_SPL_SYS_MALLOC_SIMPLE set to 'y' to reduce SPL size
Signed-off-by: Andrew F. Davis <afd(a)ti.com>
---
Changes from v1:
- Add to MAINTAINERS file
MAINTAINERS | 1 +
configs/am335x_hs_evm_defconfig | 62 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 configs/am335x_hs_evm_defconfig
diff --git a/MAINTAINERS b/MAINTAINERS
index 1ea7ae013a..788e16a391 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -441,6 +441,7 @@ F: arch/arm/mach-omap2/omap5/sec_entry_cpu1.S
F: arch/arm/mach-omap2/omap5/sec-fxns.c
F: arch/arm/mach-omap2/sec-common.c
F: arch/arm/mach-omap2/config_secure.mk
+F: configs/am335x_hs_evm_defconfig
F: configs/am43xx_hs_evm_defconfig
F: configs/am57xx_hs_evm_defconfig
F: configs/dra7xx_hs_evm_defconfig
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
new file mode 100644
index 0000000000..f8445c3249
--- /dev/null
+++ b/configs/am335x_hs_evm_defconfig
@@ -0,0 +1,62 @@
+CONFIG_ARM=y
+CONFIG_AM33XX=y
+CONFIG_TI_SECURE_DEVICE=y
+# CONFIG_SPL_EXT_SUPPORT is not set
+# CONFIG_SPL_NAND_SUPPORT is not set
+CONFIG_TARGET_AM335X_EVM=y
+CONFIG_ISW_ENTRY_ADDR=0x40300350
+CONFIG_SPL_STACK_R_ADDR=0x82000000
+# CONFIG_SPL_YMODEM_SUPPORT is not set
+CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FIT=y
+CONFIG_SYS_EXTRA_OPTIONS="NAND"
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+CONFIG_FIT_IMAGE_POST_PROCESS=y
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_SPL=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_MTD_SUPPORT=y
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_ASKENV=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_DFU=y
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"
+# CONFIG_BLK is not set
+CONFIG_DFU_MMC=y
+CONFIG_DFU_NAND=y
+CONFIG_DFU_RAM=y
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_MMC_OMAP_HS=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
+CONFIG_SYS_NS16550=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
+CONFIG_G_DNL_VENDOR_NUM=0x0451
+CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_USE_TINY_PRINTF=y
+CONFIG_RSA=y
+CONFIG_SPL_OF_LIBFDT=y
--
2.11.0
3
10

[U-Boot] [PATCH 1/7] arm: socfpga: update de0 nano default environment
by Dalon Westergreen 22 Jan '17
by Dalon Westergreen 22 Jan '17
22 Jan '17
From: Dalon Westergreen <dalon.westergreen(a)intel.com>
The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as
as result the default uboot environment for this board
needs updating. This sets the default envirnment to
use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and
CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot
and os partitions.
Also set the default fdtimage value to match the
devicetree name in the linux kernel for this board.
Signed-off-by: Dalon Westergreen <dalon.westergreen(a)intel.com>
de0 fix spaces
---
include/configs/socfpga_de0_nano_soc.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index 6b9546e..205b859 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -39,15 +39,17 @@
"bootm ${loadaddr} - ${fdt_addr}\0" \
"bootimage=zImage\0" \
"fdt_addr=100\0" \
- "fdtimage=socfpga.dtb\0" \
+ "fdtimage=socfpga_cyclone5_de0_sockit.dtb\0" \
"bootm ${loadaddr} - ${fdt_addr}\0" \
- "mmcroot=/dev/mmcblk0p2\0" \
+ "mmc_boot=" __stringify(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "\0" \
+ "mmc_os=" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "\0" \
+ "mmcroot=/dev/mmcblk0p${mmc_os}\0" \
"mmcboot=setenv bootargs " CONFIG_BOOTARGS \
" root=${mmcroot} rw rootwait;" \
"bootz ${loadaddr} - ${fdt_addr}\0" \
"mmcload=mmc rescan;" \
- "load mmc 0:1 ${loadaddr} ${bootimage};" \
- "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
+ "load mmc 0:${mmc_boot} ${loadaddr} ${bootimage};" \
+ "load mmc 0:${mmc_boot} ${fdt_addr} ${fdtimage}\0" \
/* The rest of the configuration is shared */
#include <configs/socfpga_common.h>
--
2.7.4
3
17
This patch add Kconfig entry for CONFIG_BOARD_LATE_INIT
Cc: Tom Rini <trini(a)konsulko.com>
Signed-off-by: Jagan Teki <jagan(a)openedev.com>
---
common/Kconfig | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/common/Kconfig b/common/Kconfig
index a04ee10..bb47ee4 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -373,6 +373,16 @@ config VERSION_VARIABLE
Any change to this variable will be reverted at the
next reset.
+config BOARD_LATE_INIT
+ bool "Enable Board late init code"
+ help
+ Sometimes board require some initialization code that might
+ require once the actual init done, example saving board specific env,
+ boot-modes etc. which eventually done at late.
+
+ So this config enable the late init code with the help of board_late_init
+ function which should defined on respective boards.
+
config DISPLAY_CPUINFO
bool "Display information about the CPU during start up"
default y if ARM || BLACKFIN || NIOS2 || X86 || XTENSA
--
1.9.1
3
6

[U-Boot] [PATCH 00/11] ARM: uniphier: recond round of UniPhier updates for v2017.03
by Masahiro Yamada 22 Jan '17
by Masahiro Yamada 22 Jan '17
22 Jan '17
- Make SPL optional for ARMv8 SoCs (main motivation is to use ATF)
- Refactor SoC init code
- Add PXs3 SoC support (DT, pinctrl driver, SoC code)
Masahiro Yamada (11):
ARM: uniphier: add missing static and const qualifier
ARM: uniphier: make SPL optional for ARVv8 SoCs
ARM: uniphier: add uniphier_v8_defconfig
ARM: uniphier: replace <linux/err.h> with <linux/errno.h>
ARM: uniphier: replace <common.h> with <linux/delay.h> where possible
ARM: uniphier: simplify SoC ID get function
ARM: uniphier: add macro to generate SoC data look-up function
ARM: dts: uniphier: compile only DT files that make sense
pinctrl: uniphier: support UniPhier PXs3 pinctrl driver
ARM: dts: uniphier: add PXs3 SoC/board support
ARM: uniphier: add PXs3 SoC support
arch/arm/Kconfig | 11 +-
arch/arm/dts/Makefile | 29 +-
arch/arm/dts/uniphier-pxs3-ref.dts | 51 ++++
arch/arm/dts/uniphier-pxs3.dtsi | 328 ++++++++++++++++++++++
arch/arm/mach-uniphier/Kconfig | 54 ++--
arch/arm/mach-uniphier/Makefile | 4 +-
arch/arm/mach-uniphier/arm32/psci.c | 12 +-
arch/arm/mach-uniphier/arm64/Makefile | 5 +-
arch/arm/mach-uniphier/board_init.c | 57 ++--
arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c | 6 +-
arch/arm/mach-uniphier/boot-mode/boot-mode.c | 32 +--
arch/arm/mach-uniphier/boot-mode/cmd_pinmon.c | 20 +-
arch/arm/mach-uniphier/boot-mode/spl_board.c | 6 +-
arch/arm/mach-uniphier/clk/Makefile | 1 +
arch/arm/mach-uniphier/clk/dpll-ld4.c | 2 +-
arch/arm/mach-uniphier/clk/dpll-pro4.c | 2 +-
arch/arm/mach-uniphier/clk/dpll-sld8.c | 2 +-
arch/arm/mach-uniphier/clk/pll-base-ld20.c | 3 +-
arch/arm/mach-uniphier/clk/pll-ld4.c | 2 +-
arch/arm/mach-uniphier/clk/pll-pro4.c | 2 +-
arch/arm/mach-uniphier/clk/pll-pxs3.c | 7 +
arch/arm/mach-uniphier/cpu-info.c | 76 +++++
arch/arm/mach-uniphier/cpu_info.c | 73 -----
arch/arm/mach-uniphier/debug-uart/debug-uart.c | 20 +-
arch/arm/mach-uniphier/dram/cmd_ddrphy.c | 10 +-
arch/arm/mach-uniphier/dram/ddrphy-ld4.c | 2 +-
arch/arm/mach-uniphier/dram/ddrphy-training.c | 2 +-
arch/arm/mach-uniphier/dram/umc-ld20.c | 3 +-
arch/arm/mach-uniphier/dram/umc-ld4.c | 2 +-
arch/arm/mach-uniphier/dram/umc-pro4.c | 2 +-
arch/arm/mach-uniphier/dram/umc-pxs2.c | 2 +-
arch/arm/mach-uniphier/dram/umc-sld8.c | 2 +-
arch/arm/mach-uniphier/dram_init.c | 4 +-
arch/arm/mach-uniphier/init.h | 1 +
arch/arm/mach-uniphier/memconf.c | 2 +-
arch/arm/mach-uniphier/pinctrl-glue.c | 2 +-
arch/arm/mach-uniphier/sbc/Makefile | 1 +
arch/arm/mach-uniphier/sg-regs.h | 6 -
arch/arm/mach-uniphier/soc-info.c | 34 +++
arch/arm/mach-uniphier/soc-info.h | 103 +++----
arch/arm/mach-uniphier/soc_info.c | 84 ------
arch/arm/mach-uniphier/spl_board_init.c | 38 +--
configs/uniphier_ld11_defconfig | 3 +-
configs/uniphier_ld20_defconfig | 3 +-
configs/uniphier_ld4_sld8_defconfig | 1 +
configs/uniphier_pro4_defconfig | 1 +
configs/uniphier_pxs2_ld6b_defconfig | 1 +
configs/uniphier_sld3_defconfig | 1 +
configs/uniphier_v8_defconfig | 34 +++
doc/README.uniphier | 4 +
drivers/pinctrl/uniphier/Kconfig | 24 +-
drivers/pinctrl/uniphier/Makefile | 1 +
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c | 140 +++++++++
include/configs/uniphier.h | 6 +-
54 files changed, 918 insertions(+), 406 deletions(-)
create mode 100644 arch/arm/dts/uniphier-pxs3-ref.dts
create mode 100644 arch/arm/dts/uniphier-pxs3.dtsi
create mode 100644 arch/arm/mach-uniphier/clk/pll-pxs3.c
create mode 100644 arch/arm/mach-uniphier/cpu-info.c
delete mode 100644 arch/arm/mach-uniphier/cpu_info.c
create mode 100644 arch/arm/mach-uniphier/soc-info.c
delete mode 100644 arch/arm/mach-uniphier/soc_info.c
create mode 100644 configs/uniphier_v8_defconfig
create mode 100644 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
--
2.7.4
1
12
Hi Kever and Simon,
Thanks very much for the help. Really appreciate it.
> I didn't see your detail steps for getting u-boot-dtb.bin, does it
> include SPL here?
I'm using this method:
> 2. with "CONFIG_ROCKCHIP_SPL_BACK_TO_BROM", which is default setting
...
> I'm confusing with this incorrect DRAM size, could you share the console
> output
> during you flash the image, there should have correct DRAM size info.
> I'm not sure if the DRAM on your board is symmetric or not, or any else
> special.
See below for the output. I noticed that I only have "Channel b"
and not "Channel a". On my other board that boots, I have both a and b. I
wonder if one bank of DDR3 went bad on this
board. What do you think?
Thanks again.
Rick
DDR Version 1.00 20160217
In
Channel b: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=8 Size=1024MB
Memory OK
OUT
usb boot ver:20160218
ChipType = 8
...FlashInit enter...
FtlMallocOffset = 8040 8000
FtlMallocOffset = 10040 8000
FtlMallocOffset = 11040 1000
FtlMallocOffset = 19040 8000
FtlMallocOffset = 1a040 1000
1:0 0 7f7f05 22
...NandcInit enter...
0:1200 0 7f7f05 22
FtlMallocOffset = 23040 9000
gNandcVer = 6
SDC_BusRequest: CMD=8 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=8 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=8 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=5 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=5 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=5 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=55 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=55 SDC_RESP_TIMEOUT 1815
SDC_BusRequest: CMD=55 SDC_RESP_TIMEOUT 1815
mmc Ext_csd, ret=0 ,
Ext[226]=20, bootSize=2000,
Ext[215]=1, Ext[214]=d5, Ext[213]=a0, Ext[212]=0,cap
=1d5a000 R
EL=1f
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=1d5a000
FwPartOffset=2000 , 2000
UsbHook 622396
powerOn 623080
DDR Version 1.00 20160217
In
SRX
Channel b: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=8 Size=1024MB
2
1
Move all of the status LED feature to drivers/led/Kconfig.
The LED status definitions were moved from the board configuration
files to the defconfig files.
TBD: Move all of the definitions in the include/status_led.h to the
relevant board's defconfig files.
Tested boards: CL-SOM-AM57x, CM-T335
Signed-off-by: Uri Mashiach <uri.mashiach(a)compulab.co.il>
---
arch/arm/cpu/arm920t/ep93xx/led.c | 35 ++++++-------
arch/powerpc/include/asm/status_led.h | 10 ++--
arch/powerpc/lib/interrupts.c | 6 +--
board/BuS/eb_cpu5282/eb_cpu5282.c | 2 +-
board/bf533-stamp/bf533-stamp.c | 28 ++++++----
board/compulab/cm_t335/cm_t335.c | 4 +-
board/compulab/cm_t35/cm_t35.c | 4 +-
board/compulab/cm_t3517/cm_t3517.c | 4 +-
board/corscience/tricorder/led.c | 26 +++++-----
board/corscience/tricorder/tricorder.c | 6 +--
board/isee/igep00x0/igep00x0.c | 4 +-
board/motionpro/motionpro.c | 45 +++++++++++-----
board/olimex/mx23_olinuxino/mx23_olinuxino.c | 6 +--
board/samtec/vining_fpga/socfpga.c | 4 +-
board/ti/beagle/Makefile | 2 +-
board/ti/beagle/beagle.c | 6 +--
board/ti/beagle/led.c | 14 ++---
cmd/Makefile | 2 +-
cmd/ide.c | 2 +-
cmd/led.c | 69 ++++++++++++-------------
common/board_r.c | 8 +--
configs/TQM823L_defconfig | 7 +++
configs/TQM823M_defconfig | 7 +++
configs/TQM850L_defconfig | 7 +++
configs/TQM850M_defconfig | 7 +++
configs/TQM855L_defconfig | 7 +++
configs/TQM855M_defconfig | 7 +++
configs/TQM860L_defconfig | 7 +++
configs/TQM860M_defconfig | 7 +++
configs/TQM862L_defconfig | 7 +++
configs/TQM862M_defconfig | 7 +++
configs/TQM866M_defconfig | 7 +++
configs/TQM885D_defconfig | 7 +++
configs/cl-som-am57x_defconfig | 5 ++
configs/cm_t335_defconfig | 6 +++
configs/cm_t3517_defconfig | 7 +++
configs/cm_t35_defconfig | 7 +++
configs/eb_cpu5282_defconfig | 6 +++
configs/eb_cpu5282_internal_defconfig | 6 +++
configs/edb9315a_defconfig | 12 +++++
configs/igep0020_defconfig | 7 +++
configs/igep0030_defconfig | 7 +++
configs/motionpro_defconfig | 10 ++++
configs/mx23_olinuxino_defconfig | 8 +++
configs/omap3_beagle_defconfig | 11 ++++
configs/socfpga_vining_fpga_defconfig | 11 ++++
configs/tqma6s_wru4_mmc_defconfig | 20 ++++++++
configs/tricorder_defconfig | 11 ++++
configs/tricorder_flash_defconfig | 11 ++++
configs/v38b_defconfig | 6 +++
drivers/misc/Makefile | 4 +-
drivers/misc/gpio_led.c | 26 +++++-----
drivers/misc/pca9551_led.c | 2 +-
drivers/misc/status_led.c | 76 ++++++++++++++--------------
include/common.h | 2 +-
include/configs/PATI.h | 2 -
include/configs/TQM823L.h | 6 ---
include/configs/TQM823M.h | 6 ---
include/configs/TQM850L.h | 2 -
include/configs/TQM850M.h | 2 -
include/configs/TQM855L.h | 2 -
include/configs/TQM855M.h | 2 -
include/configs/TQM860L.h | 2 -
include/configs/TQM860M.h | 2 -
include/configs/TQM862L.h | 2 -
include/configs/TQM862M.h | 2 -
include/configs/TQM866M.h | 2 -
include/configs/TQM885D.h | 2 -
include/configs/bf526-ezbrd.h | 16 ------
include/configs/bf533-stamp.h | 16 ------
include/configs/cl-som-am57x.h | 11 ----
include/configs/cm_t335.h | 7 ---
include/configs/cm_t35.h | 10 +---
include/configs/cm_t3517.h | 10 +---
include/configs/eb_cpu5282.h | 7 ---
include/configs/edb93xx.h | 13 -----
include/configs/motionpro.h | 14 -----
include/configs/mx23_olinuxino.h | 9 ----
include/configs/omap3_beagle.h | 11 ----
include/configs/omap3_igep00x0.h | 8 ---
include/configs/socfpga_vining_fpga.h | 16 ------
include/configs/stm32f429-discovery.h | 1 -
include/configs/tqma6_wru4.h | 21 --------
include/configs/tricorder.h | 12 -----
include/configs/v38b.h | 2 -
include/status_led.h | 59 ++++++++-------------
net/bootp.c | 6 +--
net/net.c | 20 ++++----
scripts/config_whitelist.txt | 4 --
89 files changed, 485 insertions(+), 454 deletions(-)
diff --git a/arch/arm/cpu/arm920t/ep93xx/led.c b/arch/arm/cpu/arm920t/ep93xx/led.c
index ecceb98..402fa3a 100644
--- a/arch/arm/cpu/arm920t/ep93xx/led.c
+++ b/arch/arm/cpu/arm920t/ep93xx/led.c
@@ -9,16 +9,16 @@
#include <config.h>
#include <status_led.h>
-static uint8_t saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
-static uint32_t gpio_pin[2] = {1 << STATUS_LED_GREEN,
- 1 << STATUS_LED_RED};
+static uint8_t saved_state[2] = {CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF};
+static uint32_t gpio_pin[2] = {1 << CONFIG_LED_STATUS_GREEN,
+ 1 << CONFIG_LED_STATUS_RED};
static inline void switch_LED_on(uint8_t led)
{
register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
writel(readl(&gpio->pedr) | gpio_pin[led], &gpio->pedr);
- saved_state[led] = STATUS_LED_ON;
+ saved_state[led] = CONFIG_LED_STATUS_ON;
}
static inline void switch_LED_off(uint8_t led)
@@ -26,27 +26,27 @@ static inline void switch_LED_off(uint8_t led)
register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
writel(readl(&gpio->pedr) & ~gpio_pin[led], &gpio->pedr);
- saved_state[led] = STATUS_LED_OFF;
+ saved_state[led] = CONFIG_LED_STATUS_OFF;
}
void red_led_on(void)
{
- switch_LED_on(STATUS_LED_RED);
+ switch_LED_on(CONFIG_LED_STATUS_RED);
}
void red_led_off(void)
{
- switch_LED_off(STATUS_LED_RED);
+ switch_LED_off(CONFIG_LED_STATUS_RED);
}
void green_led_on(void)
{
- switch_LED_on(STATUS_LED_GREEN);
+ switch_LED_on(CONFIG_LED_STATUS_GREEN);
}
void green_led_off(void)
{
- switch_LED_off(STATUS_LED_GREEN);
+ switch_LED_off(CONFIG_LED_STATUS_GREEN);
}
void __led_init(led_id_t mask, int state)
@@ -56,13 +56,14 @@ void __led_init(led_id_t mask, int state)
void __led_toggle(led_id_t mask)
{
- if (STATUS_LED_RED == mask) {
- if (STATUS_LED_ON == saved_state[STATUS_LED_RED])
+ if (CONFIG_LED_STATUS_RED == mask) {
+ if (CONFIG_LED_STATUS_ON == saved_state[CONFIG_LED_STATUS_RED])
red_led_off();
else
red_led_on();
- } else if (STATUS_LED_GREEN == mask) {
- if (STATUS_LED_ON == saved_state[STATUS_LED_GREEN])
+ } else if (CONFIG_LED_STATUS_GREEN == mask) {
+ if (CONFIG_LED_STATUS_ON ==
+ saved_state[CONFIG_LED_STATUS_GREEN])
green_led_off();
else
green_led_on();
@@ -71,13 +72,13 @@ void __led_toggle(led_id_t mask)
void __led_set(led_id_t mask, int state)
{
- if (STATUS_LED_RED == mask) {
- if (STATUS_LED_ON == state)
+ if (CONFIG_LED_STATUS_RED == mask) {
+ if (CONFIG_LED_STATUS_ON == state)
red_led_on();
else
red_led_off();
- } else if (STATUS_LED_GREEN == mask) {
- if (STATUS_LED_ON == state)
+ } else if (CONFIG_LED_STATUS_GREEN == mask) {
+ if (CONFIG_LED_STATUS_ON == state)
green_led_on();
else
green_led_off();
diff --git a/arch/powerpc/include/asm/status_led.h b/arch/powerpc/include/asm/status_led.h
index 260a831..1ae1b17 100644
--- a/arch/powerpc/include/asm/status_led.h
+++ b/arch/powerpc/include/asm/status_led.h
@@ -8,7 +8,7 @@
#define __ASM_STATUS_LED_H__
/* if not overridden */
-#ifndef CONFIG_BOARD_SPECIFIC_LED
+#ifndef CONFIG_LED_STATUS_BOARD_SPECIFIC
# if defined(CONFIG_8xx)
# include <mpc8xx.h>
# elif defined(CONFIG_MPC8260)
@@ -34,12 +34,12 @@ static inline void __led_init (led_id_t mask, int state)
#endif
#if (STATUS_LED_ACTIVE == 0)
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
immr->STATUS_LED_DAT &= ~mask;
else
immr->STATUS_LED_DAT |= mask;
#else
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
immr->STATUS_LED_DAT |= mask;
else
immr->STATUS_LED_DAT &= ~mask;
@@ -59,12 +59,12 @@ static inline void __led_set (led_id_t mask, int state)
volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
#if (STATUS_LED_ACTIVE == 0)
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
immr->STATUS_LED_DAT &= ~mask;
else
immr->STATUS_LED_DAT |= mask;
#else
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
immr->STATUS_LED_DAT |= mask;
else
immr->STATUS_LED_DAT &= ~mask;
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index f7cf915..5031357 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <asm/processor.h>
#include <watchdog.h>
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#include <status_led.h>
#endif
@@ -112,9 +112,9 @@ void timer_interrupt (struct pt_regs *regs)
WATCHDOG_RESET ();
#endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
status_led_tick (timestamp);
-#endif /* CONFIG_STATUS_LED */
+#endif /* CONFIG_LED_STATUS */
#ifdef CONFIG_SHOW_ACTIVITY
board_show_activity (timestamp);
diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c
index 2164b52..b1740ee 100644
--- a/board/BuS/eb_cpu5282/eb_cpu5282.c
+++ b/board/BuS/eb_cpu5282/eb_cpu5282.c
@@ -174,7 +174,7 @@ void __led_init(led_id_t mask, int state)
void __led_set(led_id_t mask, int state)
{
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
MCFGPTA_GPTPORT |= (1 << 3);
else
MCFGPTA_GPTPORT &= ~(1 << 3);
diff --git a/board/bf533-stamp/bf533-stamp.c b/board/bf533-stamp/bf533-stamp.c
index eb000a6..185a651 100644
--- a/board/bf533-stamp/bf533-stamp.c
+++ b/board/bf533-stamp/bf533-stamp.c
@@ -50,8 +50,8 @@ int misc_init_r(void)
#ifdef CONFIG_SHOW_BOOT_PROGRESS
-#define STATUS_LED_OFF 0
-#define STATUS_LED_ON 1
+#define CONFIG_LED_STATUS_OFF 0
+#define CONFIG_LED_STATUS_ON 1
static int gpio_setup;
@@ -76,24 +76,30 @@ void show_boot_progress(int status)
{
switch (status) {
case BOOTSTAGE_ID_CHECK_MAGIC:
- stamp_led_set(STATUS_LED_OFF, STATUS_LED_OFF, STATUS_LED_ON);
+ stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF,
+ CONFIG_LED_STATUS_ON);
break;
case BOOTSTAGE_ID_CHECK_HEADER:
- stamp_led_set(STATUS_LED_OFF, STATUS_LED_ON, STATUS_LED_OFF);
+ stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_ON,
+ CONFIG_LED_STATUS_OFF);
break;
case BOOTSTAGE_ID_CHECK_CHECKSUM:
- stamp_led_set(STATUS_LED_OFF, STATUS_LED_ON, STATUS_LED_ON);
+ stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_ON,
+ CONFIG_LED_STATUS_ON);
break;
case BOOTSTAGE_ID_CHECK_ARCH:
- stamp_led_set(STATUS_LED_ON, STATUS_LED_OFF, STATUS_LED_OFF);
+ stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_OFF,
+ CONFIG_LED_STATUS_OFF);
break;
case BOOTSTAGE_ID_CHECK_IMAGETYPE:
case BOOTSTAGE_ID_DECOMP_IMAGE:
- stamp_led_set(STATUS_LED_ON, STATUS_LED_OFF, STATUS_LED_ON);
+ stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_OFF,
+ CONFIG_LED_STATUS_ON);
break;
case BOOTSTAGE_ID_KERNEL_LOADED:
case BOOTSTAGE_ID_CHECK_BOOT_OS:
- stamp_led_set(STATUS_LED_ON, STATUS_LED_ON, STATUS_LED_OFF);
+ stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_ON,
+ CONFIG_LED_STATUS_OFF);
break;
case BOOTSTAGE_ID_BOOT_OS_RETURNED:
case BOOTSTAGE_ID_RD_MAGIC:
@@ -102,10 +108,12 @@ void show_boot_progress(int status)
case BOOTSTAGE_ID_RAMDISK:
case BOOTSTAGE_ID_NO_RAMDISK:
case BOOTSTAGE_ID_RUN_OS:
- stamp_led_set(STATUS_LED_OFF, STATUS_LED_OFF, STATUS_LED_OFF);
+ stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF,
+ CONFIG_LED_STATUS_OFF);
break;
default:
- stamp_led_set(STATUS_LED_ON, STATUS_LED_ON, STATUS_LED_ON);
+ stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_ON,
+ CONFIG_LED_STATUS_ON);
break;
}
}
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index 428aee6..c4506b9 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -31,8 +31,8 @@ int board_init(void)
gpmc_init();
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_OFF);
#endif
return 0;
}
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index 484651b..ec21955 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -92,8 +92,8 @@ int board_init(void)
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);
#endif
return 0;
diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c
index 8aae248..50312b1 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -89,8 +89,8 @@ int board_init(void)
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);
#endif
cm_t3517_musb_init();
diff --git a/board/corscience/tricorder/led.c b/board/corscience/tricorder/led.c
index 30f2f50..00ffc00 100644
--- a/board/corscience/tricorder/led.c
+++ b/board/corscience/tricorder/led.c
@@ -23,16 +23,16 @@ void __led_init(led_id_t mask, int state)
void __led_toggle(led_id_t mask)
{
int toggle_gpio = 0;
-#ifdef STATUS_LED_BIT
- if (!toggle_gpio && STATUS_LED_BIT & mask)
+#ifdef CONFIG_LED_STATUS0
+ if (!toggle_gpio && CONFIG_LED_STATUS_BIT & mask)
toggle_gpio = TRICORDER_STATUS_LED_GREEN;
#endif
-#ifdef STATUS_LED_BIT1
- if (!toggle_gpio && STATUS_LED_BIT1 & mask)
+#ifdef CONFIG_LED_STATUS1
+ if (!toggle_gpio && CONFIG_LED_STATUS_BIT1 & mask)
toggle_gpio = TRICORDER_STATUS_LED_YELLOW;
#endif
-#ifdef STATUS_LED_BIT2
- if (!toggle_gpio && STATUS_LED_BIT2 & mask) {
+#ifdef CONFIG_LED_STATUS2
+ if (!toggle_gpio && CONFIG_LED_STATUS_BIT2 & mask) {
uint8_t val;
twl4030_i2c_read_u8(TWL4030_CHIP_LED, TWL4030_LED_LEDEN,
&val);
@@ -51,23 +51,23 @@ void __led_toggle(led_id_t mask)
void __led_set(led_id_t mask, int state)
{
-#ifdef STATUS_LED_BIT
- if (STATUS_LED_BIT & mask) {
+#ifdef CONFIG_LED_STATUS0
+ if (CONFIG_LED_STATUS_BIT & mask) {
gpio_request(TRICORDER_STATUS_LED_GREEN, "");
gpio_direction_output(TRICORDER_STATUS_LED_GREEN, 0);
gpio_set_value(TRICORDER_STATUS_LED_GREEN, state);
}
#endif
-#ifdef STATUS_LED_BIT1
- if (STATUS_LED_BIT1 & mask) {
+#ifdef CONFIG_LED_STATUS1
+ if (CONFIG_LED_STATUS_BIT1 & mask) {
gpio_request(TRICORDER_STATUS_LED_YELLOW, "");
gpio_direction_output(TRICORDER_STATUS_LED_YELLOW, 0);
gpio_set_value(TRICORDER_STATUS_LED_YELLOW, state);
}
#endif
-#ifdef STATUS_LED_BIT2
- if (STATUS_LED_BIT2 & mask) {
- if (STATUS_LED_OFF == state)
+#ifdef CONFIG_LED_STATUS2
+ if (CONFIG_LED_STATUS_BIT2 & mask) {
+ if (CONFIG_LED_STATUS_OFF == state)
twl4030_i2c_write_u8(TWL4030_CHIP_LED,
TWL4030_LED_LEDEN, 0);
else
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index 0009452..e8260c6 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -120,9 +120,9 @@ int misc_init_r(void)
print_hwversion(&eeprom);
twl4030_power_init();
- status_led_set(0, STATUS_LED_ON);
- status_led_set(1, STATUS_LED_ON);
- status_led_set(2, STATUS_LED_ON);
+ status_led_set(0, CONFIG_LED_STATUS_ON);
+ status_led_set(1, CONFIG_LED_STATUS_ON);
+ status_led_set(2, CONFIG_LED_STATUS_ON);
omap_die_id_display();
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index ae7959b..e5a8038 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -68,8 +68,8 @@ int board_init(void)
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);
#endif
return 0;
diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c
index dc237c1..7fa81b8 100644
--- a/board/motionpro/motionpro.c
+++ b/board/motionpro/motionpro.c
@@ -15,9 +15,9 @@
#include <miiphy.h>
#include <libfdt.h>
-#if defined(CONFIG_STATUS_LED)
+#if defined(CONFIG_LED_STATUS)
#include <status_led.h>
-#endif /* CONFIG_STATUS_LED */
+#endif /* CONFIG_LED_STATUS */
/* Kollmorgen DPR initialization data */
struct init_elem {
@@ -194,27 +194,46 @@ int ft_board_setup(void *blob, bd_t *bd)
#endif /* CONFIG_OF_BOARD_SETUP */
-#if defined(CONFIG_STATUS_LED)
-void __led_init(led_id_t regaddr, int state)
+#if defined(CONFIG_LED_STATUS)
+vu_long *regcode_to_regaddr(led_id_t regcode)
{
- *((vu_long *) regaddr) |= ENABLE_GPIO_OUT;
+ /* GPT Enable and Mode Select Register address */
+ vu_long *reg_translate[] = {
+ (vu_long *)MPC5XXX_GPT6_ENABLE,
+ (vu_long *)MPC5XXX_GPT7_ENABLE,
+ };
+
+ if (ARRAY_SIZE(reg_translate) <= regcode)
+ return NULL;
+ return reg_translate[regcode];
+}
+
+void __led_init(led_id_t regcode, int state)
+{
+ vu_long *regaddr = regcode_to_regaddr(regcode);
+
+ *regaddr |= ENABLE_GPIO_OUT;
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
*((vu_long *) regaddr) |= LED_ON;
else
*((vu_long *) regaddr) &= ~LED_ON;
}
-void __led_set(led_id_t regaddr, int state)
+void __led_set(led_id_t regcode, int state)
{
- if (state == STATUS_LED_ON)
- *((vu_long *) regaddr) |= LED_ON;
+ vu_long *regaddr = regcode_to_regaddr(regcode);
+
+ if (state == CONFIG_LED_STATUS_ON)
+ *regaddr |= LED_ON;
else
- *((vu_long *) regaddr) &= ~LED_ON;
+ *regaddr &= ~LED_ON;
}
-void __led_toggle(led_id_t regaddr)
+void __led_toggle(led_id_t regcode)
{
- *((vu_long *) regaddr) ^= LED_ON;
+ vu_long *regaddr = regcode_to_regaddr(regcode);
+
+ *regaddr ^= LED_ON;
}
-#endif /* CONFIG_STATUS_LED */
+#endif /* CONFIG_LED_STATUS */
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index 65cbbf1..f05fd0a 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -13,7 +13,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#include <status_led.h>
#endif
@@ -72,8 +72,8 @@ int board_init(void)
/* Adress of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
#endif
return 0;
diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c
index f3a92b5..f888ecb 100644
--- a/board/samtec/vining_fpga/socfpga.c
+++ b/board/samtec/vining_fpga/socfpga.c
@@ -21,8 +21,8 @@ int board_late_init(void)
const unsigned int usb_nrst_gpio = 35;
int ret;
- status_led_set(1, STATUS_LED_ON);
- status_led_set(2, STATUS_LED_ON);
+ status_led_set(1, CONFIG_LED_STATUS_ON);
+ status_led_set(2, CONFIG_LED_STATUS_ON);
/* Address of boot parameters for ATAG (if ATAG is used) */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile
index 7a858be..41b552a 100644
--- a/board/ti/beagle/Makefile
+++ b/board/ti/beagle/Makefile
@@ -6,4 +6,4 @@
#
obj-y := beagle.o
-obj-$(CONFIG_STATUS_LED) += led.o
+obj-$(CONFIG_LED_STATUS) += led.o
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index cfdab3e..178bee5 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -16,7 +16,7 @@
#include <common.h>
#include <dm.h>
#include <ns16550.h>
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#include <status_led.h>
#endif
#include <twl4030.h>
@@ -95,8 +95,8 @@ int board_init(void)
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);
#endif
return 0;
diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c
index a913a4c..30b8b93 100644
--- a/board/ti/beagle/led.c
+++ b/board/ti/beagle/led.c
@@ -15,26 +15,26 @@
#define BEAGLE_LED_USR0 150
#define BEAGLE_LED_USR1 149
-#ifdef STATUS_LED_GREEN
+#ifdef CONFIG_LED_STATUS_GREEN
void green_led_off(void)
{
- __led_set (STATUS_LED_GREEN, 0);
+ __led_set(CONFIG_LED_STATUS_GREEN, 0);
}
void green_led_on(void)
{
- __led_set (STATUS_LED_GREEN, 1);
+ __led_set(CONFIG_LED_STATUS_GREEN, 1);
}
#endif
static int get_led_gpio(led_id_t mask)
{
-#ifdef STATUS_LED_BIT
- if (STATUS_LED_BIT & mask)
+#ifdef CONFIG_LED_STATUS0
+ if (CONFIG_LED_STATUS_BIT & mask)
return BEAGLE_LED_USR0;
#endif
-#ifdef STATUS_LED_BIT1
- if (STATUS_LED_BIT1 & mask)
+#ifdef CONFIG_LED_STATUS1
+ if (CONFIG_LED_STATUS_BIT1 & mask)
return BEAGLE_LED_USR1;
#endif
diff --git a/cmd/Makefile b/cmd/Makefile
index 34bc544..566fed9 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -78,7 +78,7 @@ obj-$(CONFIG_CMD_ITEST) += itest.o
obj-$(CONFIG_CMD_JFFS2) += jffs2.o
obj-$(CONFIG_CMD_CRAMFS) += cramfs.o
obj-$(CONFIG_CMD_LDRINFO) += ldrinfo.o
-obj-$(CONFIG_CMD_LED) += led.o
+obj-$(CONFIG_LED_STATUS_CMD) += led.o
obj-$(CONFIG_CMD_LICENSE) += license.o
obj-y += load.o
obj-$(CONFIG_LOGBUFFER) += log.o
diff --git a/cmd/ide.c b/cmd/ide.c
index c942744..0fd401b 100644
--- a/cmd/ide.c
+++ b/cmd/ide.c
@@ -25,7 +25,7 @@
#include <ide.h>
#include <ata.h>
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
# include <status_led.h>
#endif
diff --git a/cmd/led.c b/cmd/led.c
index b0f1a61..951a5e2 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -26,37 +26,38 @@ struct led_tbl_s {
typedef struct led_tbl_s led_tbl_t;
static const led_tbl_t led_commands[] = {
-#ifdef CONFIG_BOARD_SPECIFIC_LED
-#ifdef STATUS_LED_BIT
- { "0", STATUS_LED_BIT, NULL, NULL, NULL },
+#ifdef CONFIG_LED_STATUS_BOARD_SPECIFIC
+#ifdef CONFIG_LED_STATUS0
+ { "0", CONFIG_LED_STATUS_BIT, NULL, NULL, NULL },
#endif
-#ifdef STATUS_LED_BIT1
- { "1", STATUS_LED_BIT1, NULL, NULL, NULL },
+#ifdef CONFIG_LED_STATUS1
+ { "1", CONFIG_LED_STATUS_BIT1, NULL, NULL, NULL },
#endif
-#ifdef STATUS_LED_BIT2
- { "2", STATUS_LED_BIT2, NULL, NULL, NULL },
+#ifdef CONFIG_LED_STATUS2
+ { "2", CONFIG_LED_STATUS_BIT2, NULL, NULL, NULL },
#endif
-#ifdef STATUS_LED_BIT3
- { "3", STATUS_LED_BIT3, NULL, NULL, NULL },
+#ifdef CONFIG_LED_STATUS3
+ { "3", CONFIG_LED_STATUS_BIT3, NULL, NULL, NULL },
#endif
-#ifdef STATUS_LED_BIT4
- { "4", STATUS_LED_BIT4, NULL, NULL, NULL },
+#ifdef CONFIG_LED_STATUS4
+ { "4", CONFIG_LED_STATUS_BIT4, NULL, NULL, NULL },
#endif
-#ifdef STATUS_LED_BIT5
- { "5", STATUS_LED_BIT5, NULL, NULL, NULL },
+#ifdef CONFIG_LED_STATUS5
+ { "5", CONFIG_LED_STATUS_BIT5, NULL, NULL, NULL },
#endif
#endif
-#ifdef STATUS_LED_GREEN
- { "green", STATUS_LED_GREEN, green_led_off, green_led_on, NULL },
+#ifdef CONFIG_LED_STATUS_GREEN
+ { "green", CONFIG_LED_STATUS_GREEN, green_led_off, green_led_on, NULL },
#endif
-#ifdef STATUS_LED_YELLOW
- { "yellow", STATUS_LED_YELLOW, yellow_led_off, yellow_led_on, NULL },
+#ifdef CONFIG_LED_STATUS_YELLOW
+ { "yellow", CONFIG_LED_STATUS_YELLOW, yellow_led_off, yellow_led_on,
+ NULL },
#endif
-#ifdef STATUS_LED_RED
- { "red", STATUS_LED_RED, red_led_off, red_led_on, NULL },
+#ifdef CONFIG_LED_STATUS_RED
+ { "red", CONFIG_LED_STATUS_RED, red_led_off, red_led_on, NULL },
#endif
-#ifdef STATUS_LED_BLUE
- { "blue", STATUS_LED_BLUE, blue_led_off, blue_led_on, NULL },
+#ifdef CONFIG_LED_STATUS_BLUE
+ { "blue", CONFIG_LED_STATUS_BLUE, blue_led_off, blue_led_on, NULL },
#endif
{ NULL, 0, NULL, NULL, NULL }
};
@@ -110,14 +111,14 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
led_commands[i].on();
else
__led_set(led_commands[i].mask,
- STATUS_LED_ON);
+ CONFIG_LED_STATUS_ON);
break;
case LED_OFF:
if (led_commands[i].off)
led_commands[i].off();
else
__led_set(led_commands[i].mask,
- STATUS_LED_OFF);
+ CONFIG_LED_STATUS_OFF);
break;
case LED_TOGGLE:
if (led_commands[i].toggle)
@@ -149,36 +150,36 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
U_BOOT_CMD(
led, 4, 1, do_led,
"["
-#ifdef CONFIG_BOARD_SPECIFIC_LED
-#ifdef STATUS_LED_BIT
+#ifdef CONFIG_LED_STATUS_BOARD_SPECIFIC
+#ifdef CONFIG_LED_STATUS0
"0|"
#endif
-#ifdef STATUS_LED_BIT1
+#ifdef CONFIG_LED_STATUS1
"1|"
#endif
-#ifdef STATUS_LED_BIT2
+#ifdef CONFIG_LED_STATUS2
"2|"
#endif
-#ifdef STATUS_LED_BIT3
+#ifdef CONFIG_LED_STATUS3
"3|"
#endif
-#ifdef STATUS_LED_BIT4
+#ifdef CONFIG_LED_STATUS4
"4|"
#endif
-#ifdef STATUS_LED_BIT5
+#ifdef CONFIG_LED_STATUS5
"5|"
#endif
#endif
-#ifdef STATUS_LED_GREEN
+#ifdef CONFIG_LED_STATUS_GREEN
"green|"
#endif
-#ifdef STATUS_LED_YELLOW
+#ifdef CONFIG_LED_STATUS_YELLOW
"yellow|"
#endif
-#ifdef STATUS_LED_RED
+#ifdef CONFIG_LED_STATUS_RED
"red|"
#endif
-#ifdef STATUS_LED_BLUE
+#ifdef CONFIG_LED_STATUS_BLUE
"blue|"
#endif
"all] [on|off|toggle|blink] [blink-freq in ms]",
diff --git a/common/board_r.c b/common/board_r.c
index a373352..46a43b9 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -596,11 +596,11 @@ static int initr_kgdb(void)
}
#endif
-#if defined(CONFIG_STATUS_LED)
+#if defined(CONFIG_LED_STATUS)
static int initr_status_led(void)
{
-#if defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);
+#if defined(CONFIG_LED_STATUS_BOOT)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_BLINKING);
#else
status_led_init();
#endif
@@ -907,7 +907,7 @@ init_fnc_t init_sequence_r[] = {
#if defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) || defined(CONFIG_M68K)
timer_init, /* initialize timer */
#endif
-#if defined(CONFIG_STATUS_LED)
+#if defined(CONFIG_LED_STATUS)
initr_status_led,
#endif
/* PPC has a udelay(20) here dating from 2002. Why? */
diff --git a/configs/TQM823L_defconfig b/configs/TQM823L_defconfig
index 7081ed6..8645193 100644
--- a/configs/TQM823L_defconfig
+++ b/configs/TQM823L_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM823M_defconfig b/configs/TQM823M_defconfig
index 496dc06..08bf149 100644
--- a/configs/TQM823M_defconfig
+++ b/configs/TQM823M_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM850L_defconfig b/configs/TQM850L_defconfig
index 0f711d1..1b87bcb 100644
--- a/configs/TQM850L_defconfig
+++ b/configs/TQM850L_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM850M_defconfig b/configs/TQM850M_defconfig
index 7a72ce9..15aa30b 100644
--- a/configs/TQM850M_defconfig
+++ b/configs/TQM850M_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM855L_defconfig b/configs/TQM855L_defconfig
index b034a04..aa8b4a0 100644
--- a/configs/TQM855L_defconfig
+++ b/configs/TQM855L_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM855M_defconfig b/configs/TQM855M_defconfig
index 05b4518..3a80d5a 100644
--- a/configs/TQM855M_defconfig
+++ b/configs/TQM855M_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM860L_defconfig b/configs/TQM860L_defconfig
index 5d8a088..8885164 100644
--- a/configs/TQM860L_defconfig
+++ b/configs/TQM860L_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM860M_defconfig b/configs/TQM860M_defconfig
index 023751d..00196f7 100644
--- a/configs/TQM860M_defconfig
+++ b/configs/TQM860M_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM862L_defconfig b/configs/TQM862L_defconfig
index 628d687..1fff2b4 100644
--- a/configs/TQM862L_defconfig
+++ b/configs/TQM862L_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM862M_defconfig b/configs/TQM862M_defconfig
index d1cf91c..afd6d6e 100644
--- a/configs/TQM862M_defconfig
+++ b/configs/TQM862M_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM866M_defconfig b/configs/TQM866M_defconfig
index e0cf770..cb2c869 100644
--- a/configs/TQM866M_defconfig
+++ b/configs/TQM866M_defconfig
@@ -10,5 +10,12 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/TQM885D_defconfig b/configs/TQM885D_defconfig
index 889de7b..89bc242 100644
--- a/configs/TQM885D_defconfig
+++ b/configs/TQM885D_defconfig
@@ -13,5 +13,12 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
+CONFIG_LED_STATUS=y
+# CONFIG_LED_STATUS_BOARD_SPECIFIC is not set
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/cl-som-am57x_defconfig b/configs/cl-som-am57x_defconfig
index 5d3bc11..6711075 100644
--- a/configs/cl-som-am57x_defconfig
+++ b/configs/cl-som-am57x_defconfig
@@ -23,6 +23,11 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=37
+CONFIG_LED_STATUS_STATE=2
CONFIG_MMC_OMAP_HS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index e2c8162..b21631c 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -35,6 +35,12 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=64
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index 115e451..1997e56 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -20,6 +20,13 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=186
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
diff --git a/configs/cm_t35_defconfig b/configs/cm_t35_defconfig
index 4d9b203..9d23243 100644
--- a/configs/cm_t35_defconfig
+++ b/configs/cm_t35_defconfig
@@ -22,6 +22,13 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=186
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig
index 03d8e43..d53c6e8 100644
--- a/configs/eb_cpu5282_defconfig
+++ b/configs/eb_cpu5282_defconfig
@@ -12,4 +12,10 @@ CONFIG_CMD_I2C=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=8
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
+CONFIG_LED_STATUS_CMD=y
# CONFIG_CFB_CONSOLE is not set
diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig
index 04d094a..1aed49a 100644
--- a/configs/eb_cpu5282_internal_defconfig
+++ b/configs/eb_cpu5282_internal_defconfig
@@ -11,4 +11,10 @@ CONFIG_CMD_I2C=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=8
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
+CONFIG_LED_STATUS_CMD=y
# CONFIG_CFB_CONSOLE is not set
diff --git a/configs/edb9315a_defconfig b/configs/edb9315a_defconfig
index 9e8c6bb..86ae479 100644
--- a/configs/edb9315a_defconfig
+++ b/configs/edb9315a_defconfig
@@ -15,5 +15,17 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=0
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
+CONFIG_LED_STATUS_RED_ENABLE=y
+CONFIG_LED_STATUS_RED=1
+CONFIG_LED_STATUS_GREEN_ENABLE=y
+CONFIG_LED_STATUS_GREEN=0
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/igep0020_defconfig b/configs/igep0020_defconfig
index 50bb4ac..5fc0340 100644
--- a/configs/igep0020_defconfig
+++ b/configs/igep0020_defconfig
@@ -34,6 +34,13 @@ CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_UBI=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=27
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0030_defconfig b/configs/igep0030_defconfig
index 42bd6fc..8acdccc 100644
--- a/configs/igep0030_defconfig
+++ b/configs/igep0030_defconfig
@@ -26,6 +26,13 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_UBI=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=16
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/motionpro_defconfig b/configs/motionpro_defconfig
index d5c9317..371ee2e 100644
--- a/configs/motionpro_defconfig
+++ b/configs/motionpro_defconfig
@@ -15,5 +15,15 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=0
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_FREQ=10
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=1
+CONFIG_LED_STATUS_FREQ1=10
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_OF_LIBFDT=y
diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig
index f67bb78..00cff96 100644
--- a/configs/mx23_olinuxino_defconfig
+++ b/configs/mx23_olinuxino_defconfig
@@ -19,6 +19,14 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=59
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
+CONFIG_LED_STATUS_CMD=y
CONFIG_MMC_MXS=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index 32626a2..5050a39 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -18,6 +18,17 @@ CONFIG_CMD_USB=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=2
+CONFIG_LED_STATUS_STATE1=2
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=1
+CONFIG_LED_STATUS_GREEN_ENABLE=y
+CONFIG_LED_STATUS_GREEN=2
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index f01b569..fb9bae4 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -46,6 +46,17 @@ CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS_GPIO=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=48
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=53
+CONFIG_LED_STATUS2=y
+CONFIG_LED_STATUS_BIT2=54
+CONFIG_LED_STATUS3=y
+CONFIG_LED_STATUS_BIT3=65
+CONFIG_LED_STATUS_CMD=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
CONFIG_SPI_FLASH=y
diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig
index e5cfcc6..2902c93 100644
--- a/configs/tqma6s_wru4_mmc_defconfig
+++ b/configs/tqma6s_wru4_mmc_defconfig
@@ -28,6 +28,26 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=0
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=1
+CONFIG_LED_STATUS_STATE1=2
+CONFIG_LED_STATUS2=y
+CONFIG_LED_STATUS_BIT2=2
+CONFIG_LED_STATUS_STATE2=2
+CONFIG_LED_STATUS3=y
+CONFIG_LED_STATUS_BIT3=3
+CONFIG_LED_STATUS_STATE3=2
+CONFIG_LED_STATUS4=y
+CONFIG_LED_STATUS_BIT4=4
+CONFIG_LED_STATUS_STATE4=2
+CONFIG_LED_STATUS5=y
+CONFIG_LED_STATUS_BIT5=5
+CONFIG_LED_STATUS_STATE5=2
+CONFIG_LED_STATUS_CMD=y
CONFIG_PCA9551_LED=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/tricorder_defconfig b/configs/tricorder_defconfig
index 12a6843..9a2e5c6 100644
--- a/configs/tricorder_defconfig
+++ b/configs/tricorder_defconfig
@@ -18,6 +18,17 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
CONFIG_CMD_UBI=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=2
+CONFIG_LED_STATUS_STATE1=2
+CONFIG_LED_STATUS2=y
+CONFIG_LED_STATUS_BIT2=4
+CONFIG_LED_STATUS_STATE2=2
+CONFIG_LED_STATUS_CMD=y
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/tricorder_flash_defconfig b/configs/tricorder_flash_defconfig
index 32c2059..a477091 100644
--- a/configs/tricorder_flash_defconfig
+++ b/configs/tricorder_flash_defconfig
@@ -18,6 +18,17 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
CONFIG_CMD_UBI=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=1
+CONFIG_LED_STATUS_STATE=2
+CONFIG_LED_STATUS1=y
+CONFIG_LED_STATUS_BIT1=2
+CONFIG_LED_STATUS_STATE1=2
+CONFIG_LED_STATUS2=y
+CONFIG_LED_STATUS_BIT2=4
+CONFIG_LED_STATUS_STATE2=2
+CONFIG_LED_STATUS_CMD=y
CONFIG_MMC_OMAP_HS=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/v38b_defconfig b/configs/v38b_defconfig
index fb198b6..e5dd07a 100644
--- a/configs/v38b_defconfig
+++ b/configs/v38b_defconfig
@@ -10,6 +10,12 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_LED_STATUS=y
+CONFIG_LED_STATUS0=y
+CONFIG_LED_STATUS_BIT=16
+CONFIG_LED_STATUS_STATE=1
+CONFIG_LED_STATUS_BOOT_ENABLE=y
+CONFIG_LED_STATUS_BOOT=0
# CONFIG_PCI is not set
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 9fbb5a7..e3151ea 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_CROS_EC_SANDBOX) += cros_ec_sandbox.o
obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o
endif
obj-$(CONFIG_FSL_IIM) += fsl_iim.o
-obj-$(CONFIG_GPIO_LED) += gpio_led.o
+obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o
obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o
obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o
@@ -34,7 +34,7 @@ endif
endif
obj-$(CONFIG_SMSC_LPC47M) += smsc_lpc47m.o
obj-$(CONFIG_SMSC_SIO1007) += smsc_sio1007.o
-obj-$(CONFIG_STATUS_LED) += status_led.o
+obj-$(CONFIG_LED_STATUS) += status_led.o
obj-$(CONFIG_SANDBOX) += swap_case.o
ifdef CONFIG_SPL_OF_PLATDATA
ifdef CONFIG_SPL_BUILD
diff --git a/drivers/misc/gpio_led.c b/drivers/misc/gpio_led.c
index 164c30d..b913069 100644
--- a/drivers/misc/gpio_led.c
+++ b/drivers/misc/gpio_led.c
@@ -17,7 +17,7 @@ static led_id_t gpio_led_inv[] = CONFIG_GPIO_LED_INVERTED_TABLE;
static int gpio_led_gpio_value(led_id_t mask, int state)
{
- int i, gpio_value = (state == STATUS_LED_ON);
+ int i, gpio_value = (state == CONFIG_LED_STATUS_ON);
for (i = 0; i < ARRAY_SIZE(gpio_led_inv); i++) {
if (gpio_led_inv[i] == mask)
@@ -56,51 +56,51 @@ void __led_toggle(led_id_t mask)
/* 'generic' override of colored LED stubs, to use GPIO functions instead */
-#ifdef STATUS_LED_RED
+#ifdef CONFIG_LED_STATUS_RED
void red_led_on(void)
{
- __led_set(STATUS_LED_RED, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
}
void red_led_off(void)
{
- __led_set(STATUS_LED_RED, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
}
#endif
-#ifdef STATUS_LED_GREEN
+#ifdef CONFIG_LED_STATUS_GREEN
void green_led_on(void)
{
- __led_set(STATUS_LED_GREEN, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_GREEN, CONFIG_LED_STATUS_ON);
}
void green_led_off(void)
{
- __led_set(STATUS_LED_GREEN, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_GREEN, CONFIG_LED_STATUS_OFF);
}
#endif
-#ifdef STATUS_LED_YELLOW
+#ifdef CONFIG_LED_STATUS_YELLOW
void yellow_led_on(void)
{
- __led_set(STATUS_LED_YELLOW, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_YELLOW, CONFIG_LED_STATUS_ON);
}
void yellow_led_off(void)
{
- __led_set(STATUS_LED_YELLOW, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_YELLOW, CONFIG_LED_STATUS_OFF);
}
#endif
-#ifdef STATUS_LED_BLUE
+#ifdef CONFIG_LED_STATUS_BLUE
void blue_led_on(void)
{
- __led_set(STATUS_LED_BLUE, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_BLUE, CONFIG_LED_STATUS_ON);
}
void blue_led_off(void)
{
- __led_set(STATUS_LED_BLUE, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_BLUE, CONFIG_LED_STATUS_OFF);
}
#endif
diff --git a/drivers/misc/pca9551_led.c b/drivers/misc/pca9551_led.c
index 4da0319..226a31a 100644
--- a/drivers/misc/pca9551_led.c
+++ b/drivers/misc/pca9551_led.c
@@ -124,7 +124,7 @@ void __led_init(led_id_t id, int state)
void __led_set(led_id_t mask, int state)
{
- if (state == STATUS_LED_OFF)
+ if (state == CONFIG_LED_STATUS_OFF)
pca9551_led_set_state(mask, PCA9551_LED_STATE_OFF);
else
pca9551_led_set_state(mask, PCA9551_LED_STATE_ON);
diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c
index 31e8831..3773c85 100644
--- a/drivers/misc/status_led.c
+++ b/drivers/misc/status_led.c
@@ -27,45 +27,45 @@ typedef struct {
} led_dev_t;
led_dev_t led_dev[] = {
- { STATUS_LED_BIT,
- STATUS_LED_STATE,
- STATUS_LED_PERIOD,
- 0,
- },
-#if defined(STATUS_LED_BIT1)
- { STATUS_LED_BIT1,
- STATUS_LED_STATE1,
- STATUS_LED_PERIOD1,
- 0,
- },
+ { CONFIG_LED_STATUS_BIT,
+ CONFIG_LED_STATUS_STATE,
+ LED_STATUS_PERIOD,
+ 0,
+ },
+#if defined(CONFIG_LED_STATUS1)
+ { CONFIG_LED_STATUS_BIT1,
+ CONFIG_LED_STATUS_STATE1,
+ LED_STATUS_PERIOD1,
+ 0,
+ },
#endif
-#if defined(STATUS_LED_BIT2)
- { STATUS_LED_BIT2,
- STATUS_LED_STATE2,
- STATUS_LED_PERIOD2,
- 0,
- },
+#if defined(CONFIG_LED_STATUS2)
+ { CONFIG_LED_STATUS_BIT2,
+ CONFIG_LED_STATUS_STATE2,
+ LED_STATUS_PERIOD2,
+ 0,
+ },
#endif
-#if defined(STATUS_LED_BIT3)
- { STATUS_LED_BIT3,
- STATUS_LED_STATE3,
- STATUS_LED_PERIOD3,
- 0,
- },
+#if defined(CONFIG_LED_STATUS3)
+ { CONFIG_LED_STATUS_BIT3,
+ CONFIG_LED_STATUS_STATE3,
+ LED_STATUS_PERIOD3,
+ 0,
+ },
#endif
-#if defined(STATUS_LED_BIT4)
- { STATUS_LED_BIT4,
- STATUS_LED_STATE4,
- STATUS_LED_PERIOD4,
- 0,
- },
+#if defined(CONFIG_LED_STATUS4)
+ { CONFIG_LED_STATUS_BIT4,
+ CONFIG_LED_STATUS_STATE4,
+ LED_STATUS_PERIOD4,
+ 0,
+ },
#endif
-#if defined(STATUS_LED_BIT5)
- { STATUS_LED_BIT5,
- STATUS_LED_STATE5,
- STATUS_LED_PERIOD5,
- 0,
- },
+#if defined(CONFIG_LED_STATUS5)
+ { CONFIG_LED_STATUS_BIT5,
+ CONFIG_LED_STATUS_STATE5,
+ LED_STATUS_PERIOD5,
+ 0,
+ },
#endif
};
@@ -93,7 +93,7 @@ void status_led_tick (ulong timestamp)
for (i = 0, ld = led_dev; i < MAX_LED_DEV; i++, ld++) {
- if (ld->state != STATUS_LED_BLINKING)
+ if (ld->state != CONFIG_LED_STATUS_BLINKING)
continue;
if (++ld->cnt >= ld->period) {
@@ -117,9 +117,9 @@ void status_led_set (int led, int state)
ld = &led_dev[led];
ld->state = state;
- if (state == STATUS_LED_BLINKING) {
+ if (state == CONFIG_LED_STATUS_BLINKING) {
ld->cnt = 0; /* always start with full period */
- state = STATUS_LED_ON; /* always start with LED _ON_ */
+ state = CONFIG_LED_STATUS_ON; /* always start with LED _ON_ */
}
__led_set (ld->mask, state);
}
diff --git a/include/common.h b/include/common.h
index 695478c..2af555e 100644
--- a/include/common.h
+++ b/include/common.h
@@ -911,7 +911,7 @@ static inline struct in_addr getenv_ip(char *var)
int pcmcia_init (void);
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
# include <status_led.h>
#endif
diff --git a/include/configs/PATI.h b/include/configs/PATI.h
index c8d0a58..9589c35 100644
--- a/include/configs/PATI.h
+++ b/include/configs/PATI.h
@@ -50,8 +50,6 @@
#define CONFIG_WATCHDOG /* turn on platform specific watchdog */
-/*#define CONFIG_STATUS_LED 1 */ /* Enable status led */
-
#define CONFIG_LOADS_ECHO 1 /* Echo on for serial download */
/*
diff --git a/include/configs/TQM823L.h b/include/configs/TQM823L.h
index 2fd5fa3..41879f8 100644
--- a/include/configs/TQM823L.h
+++ b/include/configs/TQM823L.h
@@ -76,12 +76,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#if defined(CONFIG_LCD)
-# undef CONFIG_STATUS_LED /* disturbs display */
-#else
-# define CONFIG_STATUS_LED 1 /* Status LED enabled */
-#endif /* CONFIG_LCD */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM823M.h b/include/configs/TQM823M.h
index 11bba09..ad5c922 100644
--- a/include/configs/TQM823M.h
+++ b/include/configs/TQM823M.h
@@ -74,12 +74,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#ifdef CONFIG_LCD
-# undef CONFIG_STATUS_LED /* disturbs display */
-#else
-# define CONFIG_STATUS_LED 1 /* Status LED enabled */
-#endif /* CONFIG_LCD */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM850L.h b/include/configs/TQM850L.h
index 548f1bc..03c7cb9 100644
--- a/include/configs/TQM850L.h
+++ b/include/configs/TQM850L.h
@@ -69,8 +69,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM850M.h b/include/configs/TQM850M.h
index 582b934..3c716ce 100644
--- a/include/configs/TQM850M.h
+++ b/include/configs/TQM850M.h
@@ -69,8 +69,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM855L.h b/include/configs/TQM855L.h
index 814290f..c4c90aa 100644
--- a/include/configs/TQM855L.h
+++ b/include/configs/TQM855L.h
@@ -71,8 +71,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM855M.h b/include/configs/TQM855M.h
index 4a657ff..56e2a45 100644
--- a/include/configs/TQM855M.h
+++ b/include/configs/TQM855M.h
@@ -71,8 +71,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/* enable I2C and select the hardware/software driver */
diff --git a/include/configs/TQM860L.h b/include/configs/TQM860L.h
index bdfe509..1875609 100644
--- a/include/configs/TQM860L.h
+++ b/include/configs/TQM860L.h
@@ -71,8 +71,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM860M.h b/include/configs/TQM860M.h
index ce6b404..15df1da 100644
--- a/include/configs/TQM860M.h
+++ b/include/configs/TQM860M.h
@@ -71,8 +71,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM862L.h b/include/configs/TQM862L.h
index 66dbcb6..b3b0722 100644
--- a/include/configs/TQM862L.h
+++ b/include/configs/TQM862L.h
@@ -74,8 +74,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM862M.h b/include/configs/TQM862M.h
index 478f16b..45f10e5 100644
--- a/include/configs/TQM862M.h
+++ b/include/configs/TQM862M.h
@@ -74,8 +74,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/*
diff --git a/include/configs/TQM866M.h b/include/configs/TQM866M.h
index 5501622..8f3efec 100644
--- a/include/configs/TQM866M.h
+++ b/include/configs/TQM866M.h
@@ -85,8 +85,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/* enable I2C and select the hardware/software driver */
diff --git a/include/configs/TQM885D.h b/include/configs/TQM885D.h
index b246926..d75b25d 100644
--- a/include/configs/TQM885D.h
+++ b/include/configs/TQM885D.h
@@ -79,8 +79,6 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
/* enable I2C and select the hardware/software driver */
diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h
index d0a364c..7d75e73 100644
--- a/include/configs/bf526-ezbrd.h
+++ b/include/configs/bf526-ezbrd.h
@@ -138,22 +138,6 @@
#define CONFIG_UART_CONSOLE 1
/* define to enable run status via led */
-/* #define CONFIG_STATUS_LED */
-#ifdef CONFIG_STATUS_LED
-#define CONFIG_GPIO_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-/* use LED0 to indicate booting/alive */
-#define STATUS_LED_BOOT 0
-#define STATUS_LED_BIT GPIO_PF8
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 4)
-/* use LED1 to indicate crash */
-#define STATUS_LED_CRASH 1
-#define STATUS_LED_BIT1 GPIO_PG11
-#define STATUS_LED_STATE1 STATUS_LED_ON
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
-/* #define STATUS_LED_BIT2 GPIO_PG12 */
-#endif
/*
* Pull in common ADI header for remaining command/environment setup
diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index ec4d93c..afb3ef6 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
@@ -186,22 +186,6 @@
/* #define CONFIG_SHOW_BOOT_PROGRESS */
/* define to enable run status via led */
-/* #define CONFIG_STATUS_LED */
-#ifdef CONFIG_STATUS_LED
-#define CONFIG_GPIO_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-/* use LED0 to indicate booting/alive */
-#define STATUS_LED_BOOT 0
-#define STATUS_LED_BIT GPIO_PF2
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 4)
-/* use LED1 to indicate crash */
-#define STATUS_LED_CRASH 1
-#define STATUS_LED_BIT1 GPIO_PF3
-#define STATUS_LED_STATE1 STATUS_LED_ON
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
-/* #define STATUS_LED_BIT2 GPIO_PF4 */
-#endif
/* define to enable splash screen support */
diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h
index 8297182..6692acc 100644
--- a/include/configs/cl-som-am57x.h
+++ b/include/configs/cl-som-am57x.h
@@ -28,17 +28,6 @@
#define CONFIG_MISC_INIT_R
#define CONFIG_REVISION_TAG
-/* Status LED */
-#define CONFIG_STATUS_LED /* Status LED enabled */
-#define CONFIG_GPIO_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define GREEN_LED_DEV 0
- /* cl_som_am57x Green LED is GPIO2_5 */
-#define GREEN_LED_GPIO 37
-#define STATUS_LED_BIT GREEN_LED_GPIO
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-
/* PMIC I2C bus number */
#define CONFIG_SYS_SPD_BUS_NUM 3
diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h
index 8f24174..0076e65 100644
--- a/include/configs/cm_t335.h
+++ b/include/configs/cm_t335.h
@@ -153,14 +153,7 @@
#define GPIO_PIN(_bank, _pin) ((_bank << 5) + _pin)
/* Status LED */
-#define CONFIG_STATUS_LED
-#define CONFIG_GPIO_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define STATUS_LED_BIT GPIO_PIN(2, 0)
/* Status LED polarity is inversed, so init it in the "off" state */
-#define STATUS_LED_STATE STATUS_LED_OFF
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BOOT 0
/* EEPROM */
#define CONFIG_CMD_EEPROM
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 0c72443..ab695cb 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -254,20 +254,12 @@
GENERATED_GBL_DATA_SIZE)
/* Status LED */
-#define CONFIG_STATUS_LED /* Status LED enabled */
-#define CONFIG_BOARD_SPECIFIC_LED
-#define CONFIG_GPIO_LED
#define GREEN_LED_GPIO 186 /* CM-T35 Green LED is GPIO186 */
-#define GREEN_LED_DEV 0
-#define STATUS_LED_BIT GREEN_LED_GPIO
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BOOT GREEN_LED_DEV
#define CONFIG_SPLASHIMAGE_GUARD
/* GPIO banks */
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#define CONFIG_OMAP3_GPIO_6 /* GPIO186 is in GPIO bank 6 */
#endif
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index 874a889..6ee61d5 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -257,18 +257,10 @@
GENERATED_GBL_DATA_SIZE)
/* Status LED */
-#define CONFIG_STATUS_LED /* Status LED enabled */
-#define CONFIG_BOARD_SPECIFIC_LED
-#define CONFIG_GPIO_LED
#define GREEN_LED_GPIO 186 /* CM-T3517 Green LED is GPIO186 */
-#define GREEN_LED_DEV 0
-#define STATUS_LED_BIT GREEN_LED_GPIO
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BOOT GREEN_LED_DEV
/* GPIO banks */
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#define CONFIG_OMAP3_GPIO_6 /* GPIO186 is in GPIO bank 6 */
#endif
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index 4a868c5..dc08db6 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -35,13 +35,7 @@
#define CONFIG_HW_WATCHDOG
-#define CONFIG_STATUS_LED
-#define CONFIG_BOARD_SPECIFIC_LED
#define STATUS_LED_ACTIVE 0
-#define STATUS_LED_BIT 0x0008 /* Timer7 GPIO */
-#define STATUS_LED_BOOT 0
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_STATE STATUS_LED_OFF
/*----------------------------------------------------------------------*
* Configuration for environment *
@@ -65,7 +59,6 @@
*/
#define CONFIG_CMDLINE_EDITING
#define CONFIG_CMD_DATE
-#define CONFIG_CMD_LED
#define CONFIG_MCFTMR
diff --git a/include/configs/edb93xx.h b/include/configs/edb93xx.h
index 9080b9a..9cc62ed 100644
--- a/include/configs/edb93xx.h
+++ b/include/configs/edb93xx.h
@@ -102,20 +102,7 @@
#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
/* Status LED */
-#define CONFIG_STATUS_LED 1 /* Status LED enabled */
-#define CONFIG_BOARD_SPECIFIC_LED 1
-#define STATUS_LED_GREEN 0
-#define STATUS_LED_RED 1
-/* Green */
-#define STATUS_LED_BIT STATUS_LED_GREEN
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-/* Red */
-#define STATUS_LED_BIT1 STATUS_LED_RED
-#define STATUS_LED_STATE1 STATUS_LED_OFF
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
/* Optional value */
-#define STATUS_LED_BOOT STATUS_LED_BIT
/* Network hardware configuration */
#define CONFIG_DRIVER_EP93XX_MAC
diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h
index 917350f..9b8a7ea 100644
--- a/include/configs/motionpro.h
+++ b/include/configs/motionpro.h
@@ -283,24 +283,10 @@
/*
* Status LED configuration
*/
-#define CONFIG_STATUS_LED /* Status LED enabled */
-#define CONFIG_BOARD_SPECIFIC_LED
#define ENABLE_GPIO_OUT 0x00000024
#define LED_ON 0x00000010
-#ifndef __ASSEMBLY__
-/*
- * In case of Motion-PRO, a LED is identified by its corresponding
- * GPT Enable and Mode Select Register.
- */
-typedef volatile unsigned long * led_id_t;
-
-extern void __led_init(led_id_t id, int state);
-extern void __led_toggle(led_id_t id);
-extern void __led_set(led_id_t id, int state);
-#endif /* __ASSEMBLY__ */
-
/*
* Temperature sensor
*/
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index 36ff7ce..d05b922 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -14,8 +14,6 @@
#define CONFIG_SYS_NO_FLASH
#define CONFIG_DOS_PARTITION
-#define CONFIG_CMD_LED
-
/* Memory configuration */
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
#define PHYS_SDRAM_1 0x40000000 /* Base address */
@@ -34,13 +32,6 @@
#endif
/* Status LED */
-#define CONFIG_STATUS_LED
-#define CONFIG_GPIO_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define STATUS_LED_BOOT 0
-#define STATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
/* USB */
#ifdef CONFIG_CMD_USB
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 9850aa6..c69b325 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -35,16 +35,6 @@
#define CONFIG_ENV_OVERWRITE
/* Status LED */
-#define CONFIG_STATUS_LED 1
-#define CONFIG_BOARD_SPECIFIC_LED 1
-#define STATUS_LED_BIT 0x01
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT1 0x02
-#define STATUS_LED_STATE1 STATUS_LED_ON
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BOOT STATUS_LED_BIT
-#define STATUS_LED_GREEN STATUS_LED_BIT1
/* Enable Multi Bus support for I2C */
#define CONFIG_I2C_MULTI_BUS 1
@@ -88,7 +78,6 @@
"4m(kernel),-(fs)"
#define CONFIG_CMD_NAND /* NAND support */
-#define CONFIG_CMD_LED /* LED support */
#define CONFIG_VIDEO_OMAP3 /* DSS Support */
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index e6d7db0..ac0df3e 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -30,19 +30,11 @@
/* Status LED available for IGEP0020 and IGEP0030 but not IGEP0032 */
#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020) || \
(CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
-#define CONFIG_STATUS_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define CONFIG_GPIO_LED
#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020)
#define RED_LED_GPIO 27
#elif (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
#define RED_LED_GPIO 16
#endif
-#define RED_LED_DEV 0
-#define STATUS_LED_BIT RED_LED_GPIO
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BOOT RED_LED_DEV
#endif
/* GPIO banks */
diff --git a/include/configs/socfpga_vining_fpga.h b/include/configs/socfpga_vining_fpga.h
index c5555e6..eef664e 100644
--- a/include/configs/socfpga_vining_fpga.h
+++ b/include/configs/socfpga_vining_fpga.h
@@ -15,7 +15,6 @@
#define CONFIG_HW_WATCHDOG
#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_LED
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on VINING_FPGA */
@@ -43,21 +42,6 @@
* 2 ... Bottom Green
* 3 ... Bottom Red
*/
-#define CONFIG_STATUS_LED
-#define CONFIG_GPIO_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define STATUS_LED_BIT 48
-#define STATUS_LED_STATE STATUS_LED_OFF
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT1 53
-#define STATUS_LED_STATE1 STATUS_LED_OFF
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT2 54
-#define STATUS_LED_STATE2 STATUS_LED_OFF
-#define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT3 65
-#define STATUS_LED_STATE3 STATUS_LED_OFF
-#define STATUS_LED_PERIOD3 (CONFIG_SYS_HZ / 2)
/* Ethernet on SoC (EMAC) */
#if defined(CONFIG_CMD_NET)
diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h
index f05c1aa..6b35641 100644
--- a/include/configs/stm32f429-discovery.h
+++ b/include/configs/stm32f429-discovery.h
@@ -42,7 +42,6 @@
#define CONFIG_ENV_SECT_SIZE (128 << 10)
#define CONFIG_ENV_SIZE (8 << 10)
-#define CONFIG_BOARD_SPECIFIC_LED
#define CONFIG_RED_LED 110
#define CONFIG_GREEN_LED 109
diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h
index 96f15cd..a378406 100644
--- a/include/configs/tqma6_wru4.h
+++ b/include/configs/tqma6_wru4.h
@@ -37,27 +37,6 @@
#define CONFIG_CMD_DATE
/* LED */
-#define CONFIG_CMD_LED
-#define CONFIG_STATUS_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define STATUS_LED_BIT 0
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT1 1
-#define STATUS_LED_STATE1 STATUS_LED_ON
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT2 2
-#define STATUS_LED_STATE2 STATUS_LED_ON
-#define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT3 3
-#define STATUS_LED_STATE3 STATUS_LED_ON
-#define STATUS_LED_PERIOD3 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT4 4
-#define STATUS_LED_STATE4 STATUS_LED_ON
-#define STATUS_LED_PERIOD4 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT5 5
-#define STATUS_LED_STATE5 STATUS_LED_ON
-#define STATUS_LED_PERIOD5 (CONFIG_SYS_HZ / 2)
/* Bootcounter */
#define CONFIG_BOOTCOUNT_LIMIT
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index a300f38..a961e5c 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -60,18 +60,6 @@
#define CONFIG_OMAP3_GPIO_2 /* GPIO32..63 are in GPIO bank 2 */
/* LED support */
-#define CONFIG_STATUS_LED
-#define CONFIG_BOARD_SPECIFIC_LED
-#define CONFIG_CMD_LED /* LED command */
-#define STATUS_LED_BIT (1 << 0)
-#define STATUS_LED_STATE STATUS_LED_ON
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT1 (1 << 1)
-#define STATUS_LED_STATE1 STATUS_LED_ON
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
-#define STATUS_LED_BIT2 (1 << 2)
-#define STATUS_LED_STATE2 STATUS_LED_ON
-#define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ / 2)
/* NS16550 Configuration */
#define CONFIG_SYS_NS16550_SERIAL
diff --git a/include/configs/v38b.h b/include/configs/v38b.h
index 229c242..7d01323 100644
--- a/include/configs/v38b.h
+++ b/include/configs/v38b.h
@@ -291,8 +291,6 @@
/*
* Status LED
*/
-#define CONFIG_STATUS_LED /* Status LED enabled */
-#define CONFIG_BOARD_SPECIFIC_LED /* version has board specific leds */
#define CONFIG_SYS_LED_BASE MPC5XXX_GPT7_ENABLE /* Timer 7 GPIO */
#ifndef __ASSEMBLY__
diff --git a/include/status_led.h b/include/status_led.h
index 396ea88..f838f36 100644
--- a/include/status_led.h
+++ b/include/status_led.h
@@ -17,11 +17,24 @@
#ifndef _STATUS_LED_H_
#define _STATUS_LED_H_
-#ifdef CONFIG_STATUS_LED
-
-#define STATUS_LED_OFF 0
-#define STATUS_LED_BLINKING 1
-#define STATUS_LED_ON 2
+#ifdef CONFIG_LED_STATUS
+
+#define LED_STATUS_PERIOD (CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ)
+#ifdef CONFIG_LED_STATUS1
+#define LED_STATUS_PERIOD1 (CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ1)
+#endif /* CONFIG_LED_STATUS1 */
+#ifdef CONFIG_LED_STATUS2
+#define LED_STATUS_PERIOD2 (CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ2)
+#endif /* CONFIG_LED_STATUS2 */
+#ifdef CONFIG_LED_STATUS3
+#define LED_STATUS_PERIOD3 (CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ3)
+#endif /* CONFIG_LED_STATUS3 */
+#ifdef CONFIG_LED_STATUS4
+#define LED_STATUS_PERIOD4 (CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ4)
+#endif /* CONFIG_LED_STATUS4 */
+#ifdef CONFIG_LED_STATUS5
+#define LED_STATUS_PERIOD5 (CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ5)
+#endif /* CONFIG_LED_STATUS5 */
void status_led_init(void);
void status_led_tick (unsigned long timestamp);
@@ -34,14 +47,8 @@ void status_led_set (int led, int state);
# define STATUS_LED_ODR im_cpm.cp_pbodr
# define STATUS_LED_DAT im_cpm.cp_pbdat
-# define STATUS_LED_BIT 0x00000001
-# define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-# define STATUS_LED_STATE STATUS_LED_BLINKING
-
# define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
-# define STATUS_LED_BOOT 0 /* LED 0 used for boot status */
-
/***** MVS v1 **********************************************************/
#elif (defined(CONFIG_MVS) && CONFIG_MVS < 2)
# define STATUS_LED_PAR im_ioport.iop_pdpar
@@ -49,17 +56,10 @@ void status_led_set (int led, int state);
# undef STATUS_LED_ODR
# define STATUS_LED_DAT im_ioport.iop_pddat
-# define STATUS_LED_BIT 0x00000001
-# define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-# define STATUS_LED_STATE STATUS_LED_BLINKING
-
# define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
-# define STATUS_LED_BOOT 0 /* LED 0 used for boot status */
-
/***** Someone else defines these *************************************/
#elif defined(STATUS_LED_PAR)
-
/*
* ADVICE: Define in your board configuration file rather than
* filling this file up with lots of custom board stuff.
@@ -67,26 +67,9 @@ void status_led_set (int led, int state);
#elif defined(CONFIG_V38B)
-# define STATUS_LED_BIT 0x0010 /* Timer7 GPIO */
-# define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
-# define STATUS_LED_STATE STATUS_LED_BLINKING
-
# define STATUS_LED_ACTIVE 0 /* LED on for bit == 0 */
-# define STATUS_LED_BOOT 0 /* LED 0 used for boot status */
-
-#elif defined(CONFIG_MOTIONPRO)
-
-#define STATUS_LED_BIT ((vu_long *) MPC5XXX_GPT6_ENABLE)
-#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 10)
-#define STATUS_LED_STATE STATUS_LED_BLINKING
-
-#define STATUS_LED_BIT1 ((vu_long *) MPC5XXX_GPT7_ENABLE)
-#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 10)
-#define STATUS_LED_STATE1 STATUS_LED_OFF
-
-#define STATUS_LED_BOOT 0 /* LED 0 used for boot status */
-#elif defined(CONFIG_BOARD_SPECIFIC_LED)
+#elif defined(CONFIG_LED_STATUS_BOARD_SPECIFIC)
/* led_id_t is unsigned long mask */
typedef unsigned long led_id_t;
@@ -99,11 +82,11 @@ void __led_blink(led_id_t mask, int freq);
#endif
/************************************************************************/
-#ifndef CONFIG_BOARD_SPECIFIC_LED
+#ifndef CONFIG_LED_STATUS_BOARD_SPECIFIC
# include <asm/status_led.h>
#endif
-#endif /* CONFIG_STATUS_LED */
+#endif /* CONFIG_LED_STATUS */
/*
* Coloured LEDs API
diff --git a/net/bootp.c b/net/bootp.c
index 42e14ed..be8f710 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -15,7 +15,7 @@
#include <net/tftp.h>
#include "bootp.h"
#include "nfs.h"
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#include <status_led.h>
#endif
#ifdef CONFIG_BOOTP_RANDOM_DELAY
@@ -359,8 +359,8 @@ static void bootp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
/*
* Got a good BOOTP reply. Copy the data into our variables.
*/
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_OFF);
#endif
store_net_params(bp); /* Store net parameters from reply */
diff --git a/net/net.c b/net/net.c
index 671d45d..6e67877 100644
--- a/net/net.c
+++ b/net/net.c
@@ -88,7 +88,7 @@
#include <errno.h>
#include <net.h>
#include <net/tftp.h>
-#if defined(CONFIG_STATUS_LED)
+#if defined(CONFIG_LED_STATUS)
#include <miiphy.h>
#include <status_led.h>
#endif
@@ -518,15 +518,15 @@ restart:
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && \
- defined(CONFIG_STATUS_LED) && \
- defined(STATUS_LED_RED)
+ defined(CONFIG_LED_STATUS) && \
+ defined(CONFIG_LED_STATUS_RED)
/*
* Echo the inverted link state to the fault LED.
*/
if (miiphy_link(eth_get_dev()->name, CONFIG_SYS_FAULT_MII_ADDR))
- status_led_set(STATUS_LED_RED, STATUS_LED_OFF);
+ status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
else
- status_led_set(STATUS_LED_RED, STATUS_LED_ON);
+ status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
#endif /* CONFIG_MII, ... */
#ifdef CONFIG_USB_KEYBOARD
@@ -583,16 +583,18 @@ restart:
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && \
- defined(CONFIG_STATUS_LED) && \
- defined(STATUS_LED_RED)
+ defined(CONFIG_LED_STATUS) && \
+ defined(CONFIG_LED_STATUS_RED)
/*
* Echo the inverted link state to the fault LED.
*/
if (miiphy_link(eth_get_dev()->name,
CONFIG_SYS_FAULT_MII_ADDR))
- status_led_set(STATUS_LED_RED, STATUS_LED_OFF);
+ status_led_set(CONFIG_LED_STATUS_RED,
+ CONFIG_LED_STATUS_OFF);
else
- status_led_set(STATUS_LED_RED, STATUS_LED_ON);
+ status_led_set(CONFIG_LED_STATUS_RED,
+ CONFIG_LED_STATUS_ON);
#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
#endif /* CONFIG_MII, ... */
debug_cond(DEBUG_INT_STATE, "--- net_loop timeout\n");
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 12c7878..3ea1c85 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -333,7 +333,6 @@ CONFIG_BOARD_POSTCLK_INIT
CONFIG_BOARD_RESET
CONFIG_BOARD_REVISION_TAG
CONFIG_BOARD_SIZE_LIMIT
-CONFIG_BOARD_SPECIFIC_LED
CONFIG_BOARD_TAURUS
CONFIG_BOARD_TYPES
CONFIG_BOOGER
@@ -537,7 +536,6 @@ CONFIG_CMD_IRQ
CONFIG_CMD_JFFS2
CONFIG_CMD_KGDB
CONFIG_CMD_LDRINFO
-CONFIG_CMD_LED
CONFIG_CMD_LOADY
CONFIG_CMD_LZMADEC
CONFIG_CMD_MAX6957
@@ -1319,7 +1317,6 @@ CONFIG_GPCS_PHY3_ADDR
CONFIG_GPCS_PHY_ADDR
CONFIG_GPIO
CONFIG_GPIO_ENABLE_SPI_FLASH
-CONFIG_GPIO_LED
CONFIG_GPIO_LED_INVERTED_TABLE
CONFIG_GPIO_LED_STUBS
CONFIG_GREEN_LED
@@ -3097,7 +3094,6 @@ CONFIG_STAMP_CF
CONFIG_STANDALONE_LOAD_ADDR
CONFIG_STATIC_BOARD_REV
CONFIG_STATIC_RELA
-CONFIG_STATUS_LED
CONFIG_STD_DEVICES_SETTINGS
CONFIG_STK52XX
CONFIG_STK52XX_REV100
--
2.7.4
2
1

22 Jan '17
Move all of the status LED feature to drivers/led/Kconfig.
doc/README.LED updated to reflect the Kconfig implementation.
Tested boards: CL-SOM-AM57x, CM-T335
Signed-off-by: Uri Mashiach <uri.mashiach(a)compulab.co.il>
---
README | 8 +-
doc/README.LED | 58 +++++-----
drivers/led/Kconfig | 323 +++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 355 insertions(+), 34 deletions(-)
diff --git a/README b/README
index 7e0dd35..a95348a 100644
--- a/README
+++ b/README
@@ -2033,7 +2033,7 @@ The following options need to be configured:
A byte containing the id of the VLAN.
-- Status LED: CONFIG_STATUS_LED
+- Status LED: CONFIG_LED_STATUS
Several configurations allow to display the current
status using a LED. For instance, the LED will blink
@@ -2041,15 +2041,15 @@ The following options need to be configured:
soon as a reply to a BOOTP request was received, and
start blinking slow once the Linux kernel is running
(supported by a status LED driver in the Linux
- kernel). Defining CONFIG_STATUS_LED enables this
+ kernel). Defining CONFIG_LED_STATUS enables this
feature in U-Boot.
Additional options:
- CONFIG_GPIO_LED
+ CONFIG_LED_STATUS_GPIO
The status LED can be connected to a GPIO pin.
In such cases, the gpio_led driver can be used as a
- status LED backend implementation. Define CONFIG_GPIO_LED
+ status LED backend implementation. Define CONFIG_LED_STATUS_GPIO
to include the gpio_led driver in the U-Boot binary.
CONFIG_GPIO_LED_INVERTED_TABLE
diff --git a/doc/README.LED b/doc/README.LED
index c3bcb3a..7aa95bd 100644
--- a/doc/README.LED
+++ b/doc/README.LED
@@ -5,48 +5,48 @@ This README describes the status LED API.
The API is defined by the include file include/status_led.h
-The first step is to define CONFIG_STATUS_LED in the board config file.
+The first step is to enable CONFIG_LED_STATUS in menuconfig:
+> Device Drivers > LED Support.
-If the LED support is only for a single board, define CONFIG_BOARD_SPECIFIC_LED
-in the board config file.
+If the LED support is only for specific board, enable
+CONFIG_LED_STATUS_BOARD_SPECIFIC in the menuconfig.
-At a minimum, these macros must be defined at
-STATUS_LED_BIT
-STATUS_LED_STATE
-STATUS_LED_PERIOD
+Status LEDS 0 to 5 are enabled by the following configurations at menuconfig:
+CONFIG_STATUS_LED0, CONFIG_STATUS_LED1, ... CONFIG_STATUS_LED5
-If there are multiple status LED's define
-STATUS_LED_BIT<n>
-STATUS_LED_STATE<n>
-STATUS_LED_PERIOD<n>
+The following should be configured for each of the enabled LEDs:
+CONFIG_STATUS_LED_BIT<n>
+CONFIG_STATUS_LED_STATE<n>
+CONFIG_STATUS_LED_FREQ<n>
+Where <n> is an integer 1 through 5 (empty for 0).
-Where <n> can a integer 1 through 3.
-
-STATUS_LED_BIT is passed into the __led_* functions to identify which LED is
-being acted on. As such, the value choose must be unique with with respect to
-the other STATUS_LED_BIT's. Mapping the value to a physical LED is the
+CONFIG_STATUS_LED_BIT is passed into the __led_* functions to identify which LED
+is being acted on. As such, the value choose must be unique with with respect to
+the other CONFIG_STATUS_LED_BIT's. Mapping the value to a physical LED is the
reponsiblity of the __led_* function.
-STATUS_LED_STATE is the initial state of the LED. It should be set to one of
-these values: STATUS_LED_OFF or STATUS_LED_ON.
+CONFIG_STATUS_LED_STATE is the initial state of the LED. It should be set to one
+of these values: CONFIG_LED_STATUS_OFF or CONFIG_LED_STATUS_ON.
-STATUS_LED_PERIOD is how long is the LED blink period. This usually set to
-(CONFIG_SYS_HZ / <N>) where <N> is the frequency of the blink. Typical values
-range from 2 to 10.
+CONFIG_STATUS_LED_FREQ determines the LED blink frequency.
+Values range from 2 to 10.
Some other LED macros
+---------------------
-STATUS_LED_BOOT is the LED to light when the board is booting. This must be a
-valid STATUS_LED_BIT value.
+CONFIG_STATUS_LED_BOOT is the LED to light when the board is booting.
+This must be a valid LED number (0-5).
-STATUS_LED_RED is the red LED. It is used signal errors. This must be a valid
-STATUS_LED_BIT value. Other similar color LED's are STATUS_LED_YELLOW and
-STATUS_LED_BLUE.
+CONFIG_STATUS_LED_RED is the red LED. It is used to signal errors. This must be
+a valid LED number (0-5). Other similar color LED's macros are
+CONFIG_STATUS_LED_GREEN, CONFIG_STATUS_LED_YELLOW and CONFIG_STATUS_LED_BLUE.
-These board must define these functions
+General LED functions
+---------------------
+The following functions should be defined:
-__led_init is called once to initialize the LED to STATUS_LED_STATE. One time
-start up code should be placed here.
+__led_init is called once to initialize the LED to CONFIG_STATUS_LED_STATE.
+One time start up code should be placed here.
__led_set is called to change the state of the LED.
diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig
index fe74403..609b1fa 100644
--- a/drivers/led/Kconfig
+++ b/drivers/led/Kconfig
@@ -17,7 +17,6 @@ config SPL_LED
If this is acceptable and you have a need to use LEDs in SPL,
enable this option. You will need to enable device tree in SPL
for this to work.
-
config LED_GPIO
bool "LED support for GPIO-connected LEDs"
depends on LED && DM_GPIO
@@ -34,4 +33,326 @@ config SPL_LED_GPIO
This option is an SPL-variant of the LED_GPIO option.
See the help of LED_GPIO for details.
+config LED_STATUS
+ bool "Enable status LED API"
+ help
+ Allows common u-boot commands to use a board's leds to
+ provide status for activities like booting and downloading files.
+
+if LED_STATUS
+
+# Hidden constants
+
+config LED_STATUS_OFF
+ int
+ default 0
+
+config LED_STATUS_BLINKING
+ int
+ default 1
+
+config LED_STATUS_ON
+ int
+ default 2
+
+# Hidden constants end
+
+config LED_STATUS_GPIO
+ bool "GPIO status LED implementation"
+ help
+ The status LED can be connected to a GPIO pin. In such cases, the
+ gpio_led driver can be used as a status LED backend implementation.
+
+config LED_STATUS_BOARD_SPECIFIC
+ bool "Specific board"
+ default y
+ help
+ LED support is only for a specific board.
+
+comment "LEDs parameters"
+
+config LED_STATUS0
+ bool "Enable status LED 0"
+
+if LED_STATUS0
+
+config LED_STATUS_BIT
+ int "identification"
+ help
+ CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify
+ which LED is being acted on. As such, the chosen value must be unique
+ with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value
+ to a physical LED is the responsibility of the __led_* function.
+
+config LED_STATUS_STATE
+ int "initial state"
+ range LED_STATUS_OFF LED_STATUS_ON
+ default LED_STATUS_OFF
+ help
+ Should be set one of the following:
+ 0 - off
+ 1 - blinking
+ 2 - on
+
+config LED_STATUS_FREQ
+ int "blink frequency"
+ range 2 10
+ default 2
+ help
+ The LED blink period calculated from LED_STATUS_FREQ:
+ LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ
+ Values range: 2 - 10
+
+endif # LED_STATUS0
+
+config LED_STATUS1
+ bool "Enable status LED 1"
+
+if LED_STATUS1
+
+config LED_STATUS_BIT1
+ int "identification"
+ help
+ CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to
+ identify which LED is being acted on. As such, the chosen value must
+ be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
+ the value to a physical LED is the responsibility of the __led_*
+ function.
+
+config LED_STATUS_STATE1
+ int "initial state"
+ range LED_STATUS_OFF LED_STATUS_ON
+ default LED_STATUS_OFF
+ help
+ Should be set one of the following:
+ 0 - off
+ 1 - blinking
+ 2 - on
+
+config LED_STATUS_FREQ1
+ int "blink frequency"
+ range 2 10
+ default 2
+ help
+ The LED blink period calculated from LED_STATUS_FREQ1:
+ LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1
+ Values range: 2 - 10
+
+endif # LED_STATUS1
+
+config LED_STATUS2
+ bool "Enable status LED 2"
+
+if LED_STATUS2
+
+config LED_STATUS_BIT2
+ int "identification"
+ help
+ CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to
+ identify which LED is being acted on. As such, the chosen value must
+ be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
+ the value to a physical LED is the responsibility of the __led_*
+ function.
+
+config LED_STATUS_STATE2
+ int "initial state"
+ range LED_STATUS_OFF LED_STATUS_ON
+ default LED_STATUS_OFF
+ help
+ Should be set one of the following:
+ 0 - off
+ 1 - blinking
+ 2 - on
+
+config LED_STATUS_FREQ2
+ int "blink frequency"
+ range 2 10
+ default 2
+ help
+ The LED blink period calculated from LED_STATUS_FREQ2:
+ LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2
+ Values range: 2 - 10
+
+endif # LED_STATUS2
+
+config LED_STATUS3
+ bool "Enable status LED 3"
+
+if LED_STATUS3
+
+config LED_STATUS_BIT3
+ int "identification"
+ help
+ CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to
+ identify which LED is being acted on. As such, the chosen value must
+ be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
+ the value to a physical LED is the responsibility of the __led_*
+ function.
+
+config LED_STATUS_STATE3
+ int "initial state"
+ range LED_STATUS_OFF LED_STATUS_ON
+ default LED_STATUS_OFF
+ help
+ Should be set one of the following:
+ 0 - off
+ 1 - blinking
+ 2 - on
+
+config LED_STATUS_FREQ3
+ int "blink frequency"
+ range 2 10
+ default 2
+ help
+ The LED blink period calculated from LED_STATUS_FREQ3:
+ LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3
+ Values range: 2 - 10
+
+endif # LED_STATUS3
+
+config LED_STATUS4
+ bool "Enable status LED 4"
+
+if LED_STATUS4
+
+config LED_STATUS_BIT4
+ int "identification"
+ help
+ CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to
+ identify which LED is being acted on. As such, the chosen value must
+ be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
+ the value to a physical LED is the responsibility of the __led_*
+ function.
+
+config LED_STATUS_STATE4
+ int "initial state"
+ range LED_STATUS_OFF LED_STATUS_ON
+ default LED_STATUS_OFF
+ help
+ Should be set one of the following:
+ 0 - off
+ 1 - blinking
+ 2 - on
+
+config LED_STATUS_FREQ4
+ int "blink frequency"
+ range 2 10
+ default 2
+ help
+ The LED blink period calculated from LED_STATUS_FREQ4:
+ LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4
+ Values range: 2 - 10
+
+endif # LED_STATUS4
+
+config LED_STATUS5
+ bool "Enable status LED 5"
+
+if LED_STATUS5
+
+config LED_STATUS_BIT5
+ int "identification"
+ help
+ CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to
+ identify which LED is being acted on. As such, the chosen value must
+ be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
+ the value to a physical LED is the responsibility of the __led_*
+ function.
+
+config LED_STATUS_STATE5
+ int "initial state"
+ range LED_STATUS_OFF LED_STATUS_ON
+ default LED_STATUS_OFF
+ help
+ Should be set one of the following:
+ 0 - off
+ 1 - blinking
+ 2 - on
+
+config LED_STATUS_FREQ5
+ int "blink frequency"
+ range 2 10
+ default 2
+ help
+ The LED blink period calculated from LED_STATUS_FREQ5:
+ LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5
+ Values range: 2 - 10
+
+endif # LED_STATUS5
+
+config LED_STATUS_BOOT_ENABLE
+ bool "Enable BOOT LED"
+ help
+ Enable to turn an LED on when the board is booting.
+
+if LED_STATUS_BOOT_ENABLE
+
+config LED_STATUS_BOOT
+ int "LED to light when the board is booting"
+ help
+ Valid enabled LED device number.
+
+endif # LED_STATUS_BOOT_ENABLE
+
+config LED_STATUS_RED_ENABLE
+ bool "Enable red LED"
+ help
+ Enable red status LED.
+
+if LED_STATUS_RED_ENABLE
+
+config LED_STATUS_RED
+ int "Red LED identification"
+ help
+ Valid enabled LED device number.
+
+endif # LED_STATUS_RED_ENABLE
+
+config LED_STATUS_YELLOW_ENABLE
+ bool "Enable yellow LED"
+ help
+ Enable yellow status LED.
+
+if LED_STATUS_YELLOW_ENABLE
+
+config LED_STATUS_YELLOW
+ int "Yellow LED identification"
+ help
+ Valid enabled LED device number.
+
+endif # LED_STATUS_YELLOW_ENABLE
+
+config LED_STATUS_BLUE_ENABLE
+ bool "Enable blue LED"
+ help
+ Enable blue status LED.
+
+if LED_STATUS_BLUE_ENABLE
+
+config LED_STATUS_BLUE
+ int "Blue LED identification"
+ help
+ Valid enabled LED device number.
+
+endif # LED_STATUS_BLUE_ENABLE
+
+config LED_STATUS_GREEN_ENABLE
+ bool "Enable green LED"
+ help
+ Enable green status LED.
+
+if LED_STATUS_GREEN_ENABLE
+
+config LED_STATUS_GREEN
+ int "Green LED identification"
+ help
+ Valid enabled LED device number (0-5).
+
+endif # LED_STATUS_GREEN_ENABLE
+
+config LED_STATUS_CMD
+ bool "Enable status LED commands"
+
+endif # LED_STATUS
+
endmenu
--
2.7.4
2
1

[U-Boot] [PATCH 1/7] arm: socfpga: update de0 nano default environment
by Dalon Westergreen 21 Jan '17
by Dalon Westergreen 21 Jan '17
21 Jan '17
From: Dalon Westergreen <dalon.westergreen(a)intel.com>
The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as
as result the default uboot environment for this board
needs updating. This sets the default envirnment to
use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and
CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot
and os partitions.
Also set the default fdtimage value to match the
devicetree name in the linux kernel for this board.
Signed-off-by: Dalon Westergreen <dalon.westergreen(a)intel.com>
de0 fix spaces
---
include/configs/socfpga_de0_nano_soc.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index 6b9546e..205b859 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -39,15 +39,17 @@
"bootm ${loadaddr} - ${fdt_addr}\0" \
"bootimage=zImage\0" \
"fdt_addr=100\0" \
- "fdtimage=socfpga.dtb\0" \
+ "fdtimage=socfpga_cyclone5_de0_sockit.dtb\0" \
"bootm ${loadaddr} - ${fdt_addr}\0" \
- "mmcroot=/dev/mmcblk0p2\0" \
+ "mmc_boot=" __stringify(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "\0" \
+ "mmc_os=" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "\0" \
+ "mmcroot=/dev/mmcblk0p${mmc_os}\0" \
"mmcboot=setenv bootargs " CONFIG_BOOTARGS \
" root=${mmcroot} rw rootwait;" \
"bootz ${loadaddr} - ${fdt_addr}\0" \
"mmcload=mmc rescan;" \
- "load mmc 0:1 ${loadaddr} ${bootimage};" \
- "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
+ "load mmc 0:${mmc_boot} ${loadaddr} ${bootimage};" \
+ "load mmc 0:${mmc_boot} ${fdt_addr} ${fdtimage}\0" \
/* The rest of the configuration is shared */
#include <configs/socfpga_common.h>
--
2.7.4
1
1

21 Jan '17
Fixing compilation problem
u-boot-socfpga/drivers/serial/ns16550.c:144: undefined reference to `out_be32'
---
arch/nios2/include/asm/io.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index 69ab23e..65a1e04 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -74,9 +74,11 @@ extern unsigned inl (unsigned port);
#define inb(addr) readb(addr)
#define inw(addr) readw(addr)
#define inl(addr) readl(addr)
+#define in_be32(addr) readl(addr)
#define outb(val, addr) writeb(val,addr)
#define outw(val, addr) writew(val,addr)
#define outl(val, addr) writel(val,addr)
+#define out_be32(addr,val) writel(val,addr)
static inline void insb (unsigned long port, void *dst, unsigned long count)
{
--
2.7.4
2
1

21 Jan '17
This series introduces binman, a tool designed to create firmware images.
It provides a way to bring together various binaries and place them in an
image, at particular positions and with configurable alignment.
Packaging of firmware is quite a different task from building the various
parts. In many cases the various binaries which go into the image come from
separate build systems. For example, ARM Trusted Firmware is used on ARMv8
devices but is not built in the U-Boot tree. If a Linux kernel is included
in the firmware image, it is built elsewhere.
It is of course possible to add more and more build rules to the U-Boot
build system to cover these cases. It can shell out to other Makefiles and
build scripts. But it seems better to create a clear divide between building
software and packaging it.
U-Boot supports a very large number of boards. Many of these have their own
specific rules for how an image should be put together so that it boots
correctly. At present these rules are described by manual instructions,
different for each board. By turning these instructions into a standard
format, we can support making valid images for any board without manual
effort, lots of READMEs, etc.
Images consist of a number of entries which are combined to make up the
final image. The image is described in the device tree for the board, meaning
that it can be accessed at run-time if desired.
Binman is an extensible tool. A set of standard entries is provides, but
new entries can be created fairly easily. Entries can be as simple as
providing the name of a file to include. They can also handle more complex
requirements, such as adjusting the input file or reading header information
from one entry to control the position of another.
U-Boot's mkimage builds FIT images and various other binaries. Binman
augments this by allowing these binaries to be packed together. While FIT
should be used where possible, it cannot be used everywhere. For example,
many devices require executable code at a particular offset in the image.
X86 machines require lots of binary blobs at particular places, and a
microcode collection easily accessible at boot.
So far binman has enough functionality to be useful, so sunxi and x86 boards
are switched over to use it, as examples.
The series is available at u-boot-dm/binman-working
Future work and missing features are documented in the README.
Changes in v6:
- Deal with optional microcode in SPL
- Drop unwanted root-node properties from tegra20-u-boot.dtsi
- Use __import__() when importlib is not available
Changes in v5:
- Add a Makefile 'warning' line for debugging
- Add a dependency on u-boot.dtb for buildman
- Add a new for optional microcode
- Add a new patch to drop microcode features from ifdtool
- Add a new tegra patch to use an automatically included .dtsi file
- Add documentation for the 'optional-ucode' property
- Add documentation for this feature
- Add instructions on how to generate html code coverage
- Add missing 'descriptor.bin' file
- Allow microcode to be optional
- Allow the compiled device tree to be returned from _DoReadFileDtb()
- Change the Makefile variable from binman_... to u_boot_...
- Print 'binman' before all errors
- Put the code to calculate dtb total length in a function
- Remove commented-out PYTHONPATH code which is not needed now
Changes in v4:
- Add an option to bring in an soc .dtsi file also
- Add new patch to support building x86 images with FSP/CMC
- Fix incorrect comments at the top of intel_*.py
- Remove RFC tag
- Use binman for all sunxi boards
- Use binman for all x86 boards
Changes in v3:
- Add a new patch to automatically include a U-Boot .dtsi file
- Put the binman definition in u-boot.dtsi
- Use a <dts>-u-boot.dtsi file for the binman changes
Changes in v2:
- Add automated test coverage
- Add test for code coverage
- Fix the -b option
- Put the binman definition in a common file for x86
- Various changes and improvements based on using this tool for a while
- drop the unused __len__() method
Simon Glass (13):
binman: Introduce binman, a tool for building binary images
binman: Add basic entry types for U-Boot
binman: Add support for building x86 ROMs
binman: Add support for u-boot.img as an input binary
binman: Add support for building x86 ROMs with SPL
binman: Add support for building x86 images with FSP/CMC
binman: Add a build rule for binman
binman: Allow configuration options to be used in .dts files
binman: Automatically include a U-Boot .dtsi file
tegra: Use a U-Boot-specific .dtsi file
sunxi: Use binman for sunxi boards
x86: Use binman all x86 boards
binman: Drop microcode features from ifdtool
Makefile | 57 +-
arch/arm/dts/sunxi-u-boot.dtsi | 14 +
arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 15 +
arch/arm/dts/tegra124-nyan-big.dts | 2 -
arch/arm/dts/tegra20-u-boot.dtsi | 8 +
arch/arm/dts/tegra20.dtsi | 2 -
arch/x86/dts/emulation-u-boot.dtsi | 18 +
arch/x86/dts/u-boot.dtsi | 62 ++
scripts/Makefile.lib | 25 +-
tools/binman/.gitignore | 1 +
tools/binman/README | 541 ++++++++++++++
tools/binman/binman | 1 +
tools/binman/binman.py | 114 +++
tools/binman/cmdline.py | 53 ++
tools/binman/control.py | 118 +++
tools/binman/entry_test.py | 27 +
tools/binman/etype/_testing.py | 26 +
tools/binman/etype/blob.py | 37 +
tools/binman/etype/entry.py | 200 +++++
tools/binman/etype/intel_cmc.py | 17 +
tools/binman/etype/intel_descriptor.py | 55 ++
tools/binman/etype/intel_fsp.py | 17 +
tools/binman/etype/intel_me.py | 17 +
tools/binman/etype/intel_mrc.py | 17 +
tools/binman/etype/intel_vga.py | 17 +
tools/binman/etype/u_boot.py | 17 +
tools/binman/etype/u_boot_dtb.py | 17 +
tools/binman/etype/u_boot_dtb_with_ucode.py | 78 ++
tools/binman/etype/u_boot_img.py | 17 +
tools/binman/etype/u_boot_nodtb.py | 17 +
tools/binman/etype/u_boot_spl.py | 17 +
tools/binman/etype/u_boot_spl_bss_pad.py | 26 +
tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 28 +
tools/binman/etype/u_boot_ucode.py | 84 +++
tools/binman/etype/u_boot_with_ucode_ptr.py | 87 +++
tools/binman/etype/x86_start16.py | 17 +
tools/binman/etype/x86_start16_spl.py | 17 +
tools/binman/fdt_test.py | 48 ++
tools/binman/func_test.py | 822 +++++++++++++++++++++
tools/binman/image.py | 229 ++++++
tools/binman/test/01_invalid.dts | 5 +
tools/binman/test/02_missing_node.dts | 6 +
tools/binman/test/03_empty.dts | 9 +
tools/binman/test/04_invalid_entry.dts | 11 +
tools/binman/test/05_simple.dts | 11 +
tools/binman/test/06_dual_image.dts | 22 +
tools/binman/test/07_bad_align.dts | 12 +
tools/binman/test/08_pack.dts | 30 +
tools/binman/test/09_pack_extra.dts | 35 +
tools/binman/test/10_pack_align_power2.dts | 12 +
tools/binman/test/11_pack_align_size_power2.dts | 12 +
tools/binman/test/12_pack_inv_align.dts | 13 +
tools/binman/test/13_pack_inv_size_align.dts | 13 +
tools/binman/test/14_pack_overlap.dts | 16 +
tools/binman/test/15_pack_overflow.dts | 12 +
tools/binman/test/16_pack_image_overflow.dts | 13 +
tools/binman/test/17_pack_image_size.dts | 13 +
tools/binman/test/18_pack_image_align.dts | 13 +
tools/binman/test/19_pack_inv_image_align.dts | 14 +
.../binman/test/20_pack_inv_image_align_power2.dts | 13 +
tools/binman/test/21_image_pad.dts | 16 +
tools/binman/test/22_image_name.dts | 21 +
tools/binman/test/23_blob.dts | 12 +
tools/binman/test/24_sorted.dts | 17 +
tools/binman/test/25_pack_zero_size.dts | 15 +
tools/binman/test/26_pack_u_boot_dtb.dts | 14 +
tools/binman/test/27_pack_4gb_no_size.dts | 18 +
tools/binman/test/28_pack_4gb_outside.dts | 19 +
tools/binman/test/29_x86-rom.dts | 19 +
tools/binman/test/30_x86-rom-me-no-desc.dts | 15 +
tools/binman/test/31_x86-rom-me.dts | 18 +
tools/binman/test/32_intel-vga.dts | 13 +
tools/binman/test/33_x86-start16.dts | 13 +
tools/binman/test/34_x86_ucode.dts | 29 +
tools/binman/test/35_x86_single_ucode.dts | 26 +
tools/binman/test/36_u_boot_img.dts | 11 +
tools/binman/test/37_x86_no_ucode.dts | 20 +
tools/binman/test/38_x86_ucode_missing_node.dts | 26 +
tools/binman/test/39_x86_ucode_missing_node2.dts | 23 +
tools/binman/test/40_x86_ucode_not_in_image.dts | 28 +
tools/binman/test/41_unknown_pos_size.dts | 11 +
tools/binman/test/42_intel-fsp.dts | 13 +
tools/binman/test/43_intel-cmc.dts | 13 +
tools/binman/test/44_x86_optional_ucode.dts | 30 +
tools/binman/test/descriptor.bin | Bin 0 -> 4096 bytes
tools/binman/test/u_boot_no_ucode_ptr | Bin 0 -> 4182 bytes
tools/binman/test/u_boot_no_ucode_ptr.c | 15 +
tools/binman/test/u_boot_ucode_ptr | Bin 0 -> 4175 bytes
tools/binman/test/u_boot_ucode_ptr.c | 15 +
tools/binman/test/u_boot_ucode_ptr.lds | 18 +
tools/ifdtool.c | 254 +------
91 files changed, 3709 insertions(+), 300 deletions(-)
create mode 100644 arch/arm/dts/sunxi-u-boot.dtsi
create mode 100644 arch/arm/dts/tegra124-nyan-big-u-boot.dtsi
create mode 100644 arch/arm/dts/tegra20-u-boot.dtsi
create mode 100644 arch/x86/dts/emulation-u-boot.dtsi
create mode 100644 arch/x86/dts/u-boot.dtsi
create mode 100644 tools/binman/.gitignore
create mode 100644 tools/binman/README
create mode 120000 tools/binman/binman
create mode 100755 tools/binman/binman.py
create mode 100644 tools/binman/cmdline.py
create mode 100644 tools/binman/control.py
create mode 100644 tools/binman/entry_test.py
create mode 100644 tools/binman/etype/_testing.py
create mode 100644 tools/binman/etype/blob.py
create mode 100644 tools/binman/etype/entry.py
create mode 100644 tools/binman/etype/intel_cmc.py
create mode 100644 tools/binman/etype/intel_descriptor.py
create mode 100644 tools/binman/etype/intel_fsp.py
create mode 100644 tools/binman/etype/intel_me.py
create mode 100644 tools/binman/etype/intel_mrc.py
create mode 100644 tools/binman/etype/intel_vga.py
create mode 100644 tools/binman/etype/u_boot.py
create mode 100644 tools/binman/etype/u_boot_dtb.py
create mode 100644 tools/binman/etype/u_boot_dtb_with_ucode.py
create mode 100644 tools/binman/etype/u_boot_img.py
create mode 100644 tools/binman/etype/u_boot_nodtb.py
create mode 100644 tools/binman/etype/u_boot_spl.py
create mode 100644 tools/binman/etype/u_boot_spl_bss_pad.py
create mode 100644 tools/binman/etype/u_boot_spl_with_ucode_ptr.py
create mode 100644 tools/binman/etype/u_boot_ucode.py
create mode 100644 tools/binman/etype/u_boot_with_ucode_ptr.py
create mode 100644 tools/binman/etype/x86_start16.py
create mode 100644 tools/binman/etype/x86_start16_spl.py
create mode 100644 tools/binman/fdt_test.py
create mode 100644 tools/binman/func_test.py
create mode 100644 tools/binman/image.py
create mode 100644 tools/binman/test/01_invalid.dts
create mode 100644 tools/binman/test/02_missing_node.dts
create mode 100644 tools/binman/test/03_empty.dts
create mode 100644 tools/binman/test/04_invalid_entry.dts
create mode 100644 tools/binman/test/05_simple.dts
create mode 100644 tools/binman/test/06_dual_image.dts
create mode 100644 tools/binman/test/07_bad_align.dts
create mode 100644 tools/binman/test/08_pack.dts
create mode 100644 tools/binman/test/09_pack_extra.dts
create mode 100644 tools/binman/test/10_pack_align_power2.dts
create mode 100644 tools/binman/test/11_pack_align_size_power2.dts
create mode 100644 tools/binman/test/12_pack_inv_align.dts
create mode 100644 tools/binman/test/13_pack_inv_size_align.dts
create mode 100644 tools/binman/test/14_pack_overlap.dts
create mode 100644 tools/binman/test/15_pack_overflow.dts
create mode 100644 tools/binman/test/16_pack_image_overflow.dts
create mode 100644 tools/binman/test/17_pack_image_size.dts
create mode 100644 tools/binman/test/18_pack_image_align.dts
create mode 100644 tools/binman/test/19_pack_inv_image_align.dts
create mode 100644 tools/binman/test/20_pack_inv_image_align_power2.dts
create mode 100644 tools/binman/test/21_image_pad.dts
create mode 100644 tools/binman/test/22_image_name.dts
create mode 100644 tools/binman/test/23_blob.dts
create mode 100644 tools/binman/test/24_sorted.dts
create mode 100644 tools/binman/test/25_pack_zero_size.dts
create mode 100644 tools/binman/test/26_pack_u_boot_dtb.dts
create mode 100644 tools/binman/test/27_pack_4gb_no_size.dts
create mode 100644 tools/binman/test/28_pack_4gb_outside.dts
create mode 100644 tools/binman/test/29_x86-rom.dts
create mode 100644 tools/binman/test/30_x86-rom-me-no-desc.dts
create mode 100644 tools/binman/test/31_x86-rom-me.dts
create mode 100644 tools/binman/test/32_intel-vga.dts
create mode 100644 tools/binman/test/33_x86-start16.dts
create mode 100644 tools/binman/test/34_x86_ucode.dts
create mode 100644 tools/binman/test/35_x86_single_ucode.dts
create mode 100644 tools/binman/test/36_u_boot_img.dts
create mode 100644 tools/binman/test/37_x86_no_ucode.dts
create mode 100644 tools/binman/test/38_x86_ucode_missing_node.dts
create mode 100644 tools/binman/test/39_x86_ucode_missing_node2.dts
create mode 100644 tools/binman/test/40_x86_ucode_not_in_image.dts
create mode 100644 tools/binman/test/41_unknown_pos_size.dts
create mode 100644 tools/binman/test/42_intel-fsp.dts
create mode 100644 tools/binman/test/43_intel-cmc.dts
create mode 100644 tools/binman/test/44_x86_optional_ucode.dts
create mode 100644 tools/binman/test/descriptor.bin
create mode 100755 tools/binman/test/u_boot_no_ucode_ptr
create mode 100644 tools/binman/test/u_boot_no_ucode_ptr.c
create mode 100755 tools/binman/test/u_boot_ucode_ptr
create mode 100644 tools/binman/test/u_boot_ucode_ptr.c
create mode 100644 tools/binman/test/u_boot_ucode_ptr.lds
--
2.8.0.rc3.226.g39d4020
5
46