summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore56
-rw-r--r--CREDITS472
-rw-r--r--Documentation/boards/efi.rst14
-rw-r--r--Documentation/boards/imx.rst3
-rw-r--r--Documentation/boards/imx/Karo-TX25.rst10
-rw-r--r--Documentation/boards/imx/Phytec-phyCARD-i.MX27.rst8
-rw-r--r--Documentation/boards/imx/Phytec-phyCORE-i.MX27.rst8
-rw-r--r--Documentation/boards/mxs.rst16
-rw-r--r--Documentation/boards/mxs/Freescale-i.MX23-evk.rst2
-rw-r--r--Documentation/boards/mxs/KaRo-TX28.rst2
-rw-r--r--Documentation/boards/mxs/Olimex-olinuxino.rst26
-rw-r--r--Documentation/user/booting-linux.rst4
-rw-r--r--Documentation/user/variables.rst2
-rwxr-xr-xMAKEALL45
-rw-r--r--Makefile8
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/a9m2410/env/config2
-rw-r--r--arch/arm/boards/a9m2440/env/config2
-rw-r--r--arch/arm/boards/at91sam9n12ek/env/bin/init_board4
-rw-r--r--arch/arm/boards/edb93xx/env/config2
-rw-r--r--arch/arm/boards/embedsky-e9/board.c17
-rw-r--r--arch/arm/boards/embedsky-e9/defaultenv-e9/boot/mmc34
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/env/config2
-rw-r--r--arch/arm/boards/friendlyarm-mini6410/env/config2
-rw-r--r--arch/arm/boards/friendlyarm-tiny6410/env/config2
-rw-r--r--arch/arm/boards/haba-knx/Makefile1
-rw-r--r--arch/arm/boards/haba-knx/env/bin/init_board49
-rw-r--r--arch/arm/boards/haba-knx/env/config40
-rw-r--r--arch/arm/boards/haba-knx/init.c348
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/board.c31
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg8
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/lowlevel.c1
-rw-r--r--arch/arm/boards/sama5d3xek/init.c12
-rw-r--r--arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c27
-rw-r--r--arch/arm/boards/sama5d4ek/sama5d4ek.c3
-rw-r--r--arch/arm/configs/haba_knx_lite_defconfig89
-rw-r--r--arch/arm/cpu/mmu.c2
-rw-r--r--arch/arm/cpu/setupc.S2
-rw-r--r--arch/arm/cpu/start.c2
-rw-r--r--arch/arm/dts/Makefile2
-rw-r--r--arch/arm/dts/am335x-phytec-phycore-som.dtsi30
-rw-r--r--arch/arm/dts/am335x-phytec-phyflex.dts31
-rw-r--r--arch/arm/dts/empty.c3
-rw-r--r--arch/arm/dts/imx6q-embedsky-e9.dts23
-rw-r--r--arch/arm/dts/imx6qdl-phytec-pfla02.dtsi41
-rw-r--r--arch/arm/include/asm/barebox-arm.h2
-rw-r--r--arch/arm/mach-at91/Kconfig5
-rw-r--r--arch/arm/mach-imx/Kconfig1
-rw-r--r--arch/arm/mach-imx/clk-imx5.c1
-rw-r--r--arch/arm/mach-imx/imx6-bbu-nand.c38
-rw-r--r--arch/arm/mach-imx/include/mach/devices-imx53.h5
-rw-r--r--arch/blackfin/boards/ipe337/barebox.lds.S4
-rw-r--r--arch/blackfin/include/asm/linkage.h53
-rw-r--r--arch/blackfin/include/asm/system.h2
-rw-r--r--arch/blackfin/lib/flush.S2
-rw-r--r--arch/efi/Makefile2
-rw-r--r--arch/nios2/cpu/.gitignore1
-rw-r--r--arch/ppc/lib/crtsavres.S4
-rw-r--r--arch/sandbox/Makefile1
-rw-r--r--arch/sandbox/os/Makefile2
-rw-r--r--arch/sandbox/os/common.c2
-rw-r--r--arch/x86/Makefile2
-rw-r--r--commands/Kconfig2
-rw-r--r--commands/crc.c23
-rw-r--r--commands/loadenv.c4
-rw-r--r--commands/memtest.c15
-rw-r--r--commands/of_property.c2
-rw-r--r--commands/splash.c1
-rw-r--r--common/Kconfig6
-rw-r--r--common/console.c2
-rw-r--r--common/hush.c2
-rw-r--r--defaultenv/.gitignore1
-rw-r--r--defaultenv/Makefile8
-rw-r--r--drivers/mci/imx-esdhc.c3
-rw-r--r--drivers/mci/sdhci.h1
-rw-r--r--drivers/mtd/nand/nand_imx_bbm.c2
-rw-r--r--drivers/mtd/nand/nand_mxs.c7
-rw-r--r--drivers/of/of_path.c2
-rw-r--r--drivers/pinctrl/pinctrl.c3
-rw-r--r--drivers/serial/serial_imx.c4
-rw-r--r--drivers/spi/imx_spi.c41
-rw-r--r--drivers/usb/core/hub.c8
-rw-r--r--drivers/usb/core/usb.c2
-rw-r--r--drivers/usb/gadget/at91_udc.c2
-rw-r--r--drivers/usb/gadget/u_serial.c1
-rw-r--r--drivers/usb/host/ehci-hcd.c6
-rw-r--r--drivers/usb/storage/transport.c8
-rw-r--r--drivers/usb/storage/usb.c2
-rw-r--r--fs/parseopt.c2
-rw-r--r--fs/ubifs/ubifs.h4
-rw-r--r--images/Makefile.imx5
-rw-r--r--include/asm-generic/bug.h37
-rw-r--r--include/common.h121
-rw-r--r--include/console.h1
-rw-r--r--include/debug_ll.h4
-rw-r--r--include/linux/bug.h30
-rw-r--r--include/linux/kernel.h88
-rw-r--r--include/linux/mtd/nand_mxs.h37
-rw-r--r--include/usb/usb.h4
-rw-r--r--lib/decompress_bunzip2.c4
-rw-r--r--lib/parameter.c7
-rw-r--r--net/netconsole.c1
-rwxr-xr-xscripts/checkpatch.pl2
-rwxr-xr-xscripts/genenv4
105 files changed, 1237 insertions, 860 deletions
diff --git a/.gitignore b/.gitignore
index 03c5e20189..ce2be8ac04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,67 +3,52 @@
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
+# NOTE! Please use 'git ls-files -i --exclude-standard'
+# command after changing this file, to see if there are
+# any tracked files which get ignored after the change.
+#
# Normal rules
#
-*~
.*
-\#*\#
*.o
+*.o.*
*.a
*.s
*.ko
*.so
+*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.elf
+*.patch
*.mcp
-*.orig
*.bct
*.dcd
*.dcd.S
*.bbenv
*.bbenv.*
+Module.symvers
#
# Top-level generic files
#
-tags
-TAGS
-cross_arch
-cross_compile
-barebox
-barebox.S
-barebox.bin
-barebox.srec
-barebox.netx
-barebox.s5p
-barebox.spi
-barebox.ubl
-barebox.zynq
-barebox.uimage
-barebox.map
-barebox.kwb
-barebox.kwbuart
-barebox.efi
-barebox.canon-a1100.bin
-barebox-flash-image
-System.map
-Module.symvers
-barebox_default_env*
+/tags
+/TAGS
+/barebox*
+/System.map
#
# git files that we don't want to ignore even it they are dot-files
#
!.gitignore
+!.mailmap
#
# Generated include files
#
-include/asm-*/asm-offsets.h
include/config
-include/linux/compile.h
include/generated
# Generated files
@@ -79,6 +64,17 @@ series
# cscope files
cscope.*
+ncscope.*
-# patches
-*.patch
+# gnu global files
+GPATH
+GRTAGS
+GSYMS
+GTAGS
+
+*.orig
+*~
+\#*\#
+
+# Kconfig presets
+all.config
diff --git a/CREDITS b/CREDITS
deleted file mode 100644
index bd5a5424da..0000000000
--- a/CREDITS
+++ /dev/null
@@ -1,472 +0,0 @@
-#
-# Parts of the development effort for this project have been
-# sponsored by SIEMENS AG, Austria. Thanks to SIEMENS for
-# supporting an Open Source project!
-#
-#
-# This is at least a partial credits-file of individual people that
-# have contributed to the barebox project. It is sorted by name and
-# formatted to allow easy grepping and beautification by scripts.
-# The fields are: name (N), email (E), web-address (W), PGP key ID
-# and fingerprint (P), description (D), and snail-mail address (S).
-# Thanks,
-#
-# Wolfgang Denk
-#----------
-
-N: Dr. Bruno Achauer
-E: bruno@exet-ag.de
-D: Support for NetBSD (both as host and target system)
-
-N: Guillaume Alexandre
-E: guillaume.alexandre@gespac.ch
-D: Add PCIPPC6 configuration
-
-N: Swen Anderson
-E: sand@peppercon.de
-D: ERIC Support
-
-N: Pantelis Antoniou
-E: panto@intracom.gr
-D: NETVIA & NETPHONE board support, ARTOS support.
-D: Support for Silicon Turnkey eXpress XTc
-
-N: Pierre Aubert
-E: <p.aubert@staubli.com>
-D: Support for RPXClassic board
-
-N: Yuli Barcohen
-E: yuli@arabellasw.com
-D: Unified support for Motorola MPC826xADS/MPC8272ADS/PQ2FADS boards.
-D: Support for Zephyr Engineering ZPC.1900 board.
-D: Support for Interphase iSPAN boards.
-D: Support for Analogue&Micro Adder boards.
-D: Support for Analogue&Micro Rattler boards.
-W: http://www.arabellasw.com
-
-N: Jerry van Baren
-E: <vanbaren@cideas.com>
-D: BedBug port to 603e core (MPC82xx). Code for enhanced memory test.
-
-N: Pavel Bartusek
-E: <pba@sysgo.com>
-D: Reiserfs support
-W: http://www.elinos.com
-
-N: Andre Beaudin
-E: <andre.beaudin@colubris.com>
-D: PCMCIA, Ethernet, TFTP
-
-N: Jon Benediktsson
-E: jonb@marel.is
-D: Support for Marel V37 board
-
-N: Raphael Bossek
-E: raphael.bossek@solutions4linux.de
-D: 8xxrom-0.3.0
-
-N: Cliff Brake
-E: cliff.brake@gmail.com
-D: Port to Vibren PXA255 IDP platform
-W: http://www.vibren.com
-W: http://bec-systems.com
-
-N: Rick Bronson
-E: rick@efn.org
-D: Atmel AT91RM9200DK and NAND support
-
-N: David Brown
-E: DBrown03@harris.com
-D: Extensions to 8xxrom-0.3.0
-
-N: Oliver Brown
-E: obrown@adventnetworks.com
-D: Port to the gw8260 board
-
-N: Curt Brune
-E: curt@cucy.com
-D: Added support for Samsung S3C4510B CPU (ARM7tdmi based SoC)
-D: Added support for ESPD-Inc. EVB4510 Board
-W: http://www.cucy.com
-
-N: Jonathan De Bruyne
-E: jonathan.debruyne@siemens.atea.be
-D: Port to Siemens IAD210 board
-
-N: Ken Chou
-E: kchou@ieee.org
-D: Support for A3000 SBC board
-
-N: Conn Clark
-E: clark@esteem.com
-D: ESTEEM192E support
-
-N: Magnus Damm
-E: damm@opensource.se
-D: 8xxrom
-
-N: Richard Danter
-E: richard.danter@windriver.com
-D: Support for Wind River PPMC 7xx/74xx boards
-
-N: George G. Davis
-E: gdavis@mvista.com
-D: Board ports for ADS GraphicsClient+ and Intel Assabet
-
-N: Arun Dharankar
-E: ADharankar@ATTBI.Com
-D: threads / scheduler example code
-
-N: Kári Davíđsson
-E: kd@flaga.is
-D: FLAGA DM Support
-
-N: Wolfgang Denk
-E: wd@denx.de
-D: barebox initial version, continuing maintenance, ARMBoot merge
-W: http://www.denx.de
-
-N: Dan A. Dickey
-E: ddickey@charter.net
-D: FADS Support
-
-N: James F. Dougherty
-E: jfd@GigabitNetworks.COM
-D: Port to the MOUSSE board
-
-N: Dave Ellis
-E: DGE@sixnetio.com
-D: EEPROM Speedup, SXNI855T port
-
-N: Thomas Elste
-E: info@elste.org
-D: Port for the ModNET50 Board, NET+50 CPU Port
-W: http://www.imms.de
-
-N: Daniel Engström
-E: daniel@omicron.se
-D: x86 port, Support for sc520_cdp board
-
-N: Dr. Wolfgang Grandegger
-E: wg@denx.de
-D: Support for Interphase 4539 T1/E1/J1 PMC, PN62, CCM, SCM boards
-W: www.denx.de
-
-N: Peter Figuli
-E: peposh@etc.sk
-D: Support for WEP EP250 (PXA) board
-
-N: Thomas Frieden
-E: ThomasF@hyperion-entertainment.com
-D: Support for AmigaOne
-
-N: Frank Gottschling
-E: fgottschling@eltec.de
-D: Support for ELTEC MHPC/BAB7xx/ELPPC boards, cfb-console, i8042, SMI LynxEM
-W: www.eltec.de
-
-N: Marius Groeger
-E: mgroeger@sysgo.de
-D: MBX Support, board specific function interface, EST SBC8260 support; initial support for StrongARM (LART), ARM720TDMI (implementa A7)
-W: www.elinos.com
-
-N: Kirk Haderlie
-E: khaderlie@vividimage.com
-D: Added TFTP to 8xxrom (-> 0.3.1)
-
-N: Chris Hallinan
-E: clh@net1plus.com
-D: DHCP Support
-
-N: Anne-Sophie Harnois
-E: Anne-Sophie.Harnois@nextream.fr
-D: Port to Walnut405 board
-
-N: Andreas Heppel
-E: aheppel@sysgo.de
-D: CPU Support for MPC 75x; board support for Eltec BAB750 [obsolete!]
-
-N: August Hoeraendl
-E: august.hoerandl@gmx.at
-D: Support for the logodl board (PXA2xx)
-
-N: Josh Huber
-E: huber@alum.wpi.edu
-D: Port to the Galileo Evaluation Board, and the MPC74xx cpu series.
-W: http://www.mclx.com/
-
-H: Stuart Hughes
-E: stuarth@lineo.com
-D: Port to MPC8260ADS board
-
-H: Rich Ireland
-E: r.ireland@computer.org
-D: FPGA device configuration driver
-
-N: Gary Jennejohn
-E: garyj@jennejohn.org, gj@denx.de
-D: Support for Samsung ARM920T S3C2400X, ARM920T "TRAB"
-W: www.denx.de
-
-N: Murray Jensen
-E: Murray.Jensen@csiro.au
-D: Initial 8260 support; GDB support
-D: Port to Cogent+Hymod boards; Hymod Board Database
-
-N: Yoo. Jonghoon
-E: yooth@ipone.co.kr
-D: Added port to the RPXlite board
-
-N: Mark Jonas
-E: mark.jonas@freescale.com
-D: Support for Freescale Total5200 platform
-W: http://www.mobilegt.com/
-
-N: Sam Song
-E: samsongshu@yahoo.com.cn
-D: Port to the RPXlite_DW board
-
-N: Brad Kemp
-E: Brad.Kemp@seranoa.com
-D: Port to Windriver ppmc8260 board
-
-N: Sangmoon Kim
-E: dogoil@etinsys.com
-D: Support for debris board
-D: Support for KVME080 board
-
-N: Frederick W. Klatt
-E: fred.klatt@windriver.com
-D: Support for Wind River SBC8540/SBC8560 boards
-
-N: Thomas Koeller
-E: tkoeller@gmx.net
-D: Port to Motorola Sandpoint 3 (MPC8240)
-
-N: Raghu Krishnaprasad
-E: Raghu.Krishnaprasad@fci.com
-D: Support for Adder-II MPC852T evaluation board
-W: http://www.forcecomputers.com
-
-N: Bernhard Kuhn
-E: bkuhn@metrowerks.com
-D Support for Coldfire CPU; Support for Motorola M5272C3 and M5282EVB boards
-
-N: Prakash Kumar
-E: prakash@embedx.com
-D Support for Intrinsyc CERF PXA250 board.
-
-N: Thomas Lange
-E: thomas@corelatus.se
-D: Support for GTH, GTH2 and dbau1x00 boards; lots of PCMCIA fixes
-
-N: Marc Leeman
-E: marc.leeman@barco.com
-D: Support for Barco Streaming Video Card (SVC) and Sample Compress Network (SCN)
-W: www.barco.com
-
-N: The LEOX team
-E: team@leox.org
-D: Support for LEOX boards, DS164x RTC
-W: http://www.leox.org
-
-N: Leif Lindholm
-E: leif.lindholm@i3micro.com
-D: Support for AMD dbau1550 board.
-
-N: Stephan Linz
-E: linz@li-pro.net
-D: Support for Nios Stratix Development Kit (DK-1S10)
-D: Support for SSV ADNP/ESC1 (Nios Cyclone)
-W: http://www.li-pro.net
-
-N: Raymond Lo
-E: lo@routefree.com
-D: Support for DOS partitions
-
-N: Dan Malek
-E: dan@embeddedalley.com
-D: FADSROM, the grandfather of all of this
-D: Support for Silicon Turnkey eXpress XTc
-
-N: Andrea "llandre" Marson
-E: andrea.marson@dave-tech.it
-D: Port to PPChameleonEVB board
-W: www.dave-tech.it
-
-N: Reinhard Meyer
-E: r.meyer@emk-elektronik.de
-D: Port to EMK TOP860 Module
-
-N: Jay Monkman
-E: jtm@smoothsmoothie.com
-D: EST SBC8260 support
-
-N: Frank Morauf
-E: frank.morauf@salzbrenner.com
-D: Support for Embedded Planet RPX Super Board
-
-N: David Müller
-E: d.mueller@elsoft.ch
-D: Support for Samsung ARM920T SMDK2410 eval board
-
-N: Scott McNutt
-E: smcnutt@psyent.com
-D: Support for Altera Nios-32 CPU
-D: Support for Altera Nios-II CPU
-D: Support for Nios Cyclone Development Kit (DK-1C20)
-W: http://www.psyent.com
-
-N: Rolf Offermanns
-E: rof@sysgo.de
-D: Initial support for SSV-DNP1110, SMC91111 driver
-W: www.elinos.com
-
-N: John Otken
-E: jotken@softadvances.com
-D: Support for AMCC Luan 440SP board
-
-N: Tolunay Orkun
-E: torkun@nextio.com
-D: Support for Cogent CSB272 & CSB472 boards
-
-N: Keith Outwater
-E: keith_outwater@mvis.com
-D: Support for generic/custom MPC860T boards (GEN860T, GEN860T_SC)
-
-N: Frank Panno
-E: fpanno@delphintech.com
-D: Support for Embedded Planet EP8260 Board
-
-N: Denis Peter
-E: d.peter@mpl.ch
-D: Support for 4xx SCSI, floppy, CDROM, CT69000 video, ...
-D: Support for PIP405 board
-D: Support for MIP405 board
-
-N: Dave Peverley
-E: dpeverley@mpc-data.co.uk
-W: http://www.mpc-data.co.uk
-D: OMAP730 P2 board support
-
-N: Bill Pitts
-E: wlp@mindspring.com
-D: BedBug embedded debugger code
-
-N: Daniel Poirot
-E: dan.poirot@windriver.com
-D: Support for the Wind River sbc405, sbc8240 board
-W: http://www.windriver.com
-
-N: Stefan Roese
-E: stefan.roese@esd-electronics.com
-D: AMCC PPC401/403/405GP Support; Windows environment support
-
-N: Erwin Rol
-E: erwin@muffin.org
-D: boot support for RTEMS
-
-N: Paul Ruhland
-E: pruhland@rochester.rr.com
-D: Port to Logic Zoom LH7A40x SDK board(s)
-
-N: Neil Russell
-E: caret@c-side.com
-D: Author of LiMon-1.4.2, which contributed some ideas
-
-N: Travis B. Sawyer
-E: travis.sawyer@sandburst.com
-D: Support for AMCC PPC440GX, XES XPedite1000 440GX PrPMC board. AMCC 440gx Ref Platform (Ocotea)
-
-N: Paolo Scaffardi
-E: arsenio@tin.it
-D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots more
-
-N: Robert Schwebel
-E: r.schwebel@pengutronix.de
-D: Support for csb226, logodl and innokom boards (PXA2xx)
-
-N: Aaron Sells
-E: sellsa@embeddedplanet.com
-D: Support for EP82xxM
-
-N: Art Shipkowski
-E: art@videon-central.com
-D: Support for NetSilicon NS7520
-
-N: Yasushi Shoji
-E: yashi@atmark-techno.com
-D: Support for Xilinx MicroBlaze, for Atmark Techno SUZAKU FPGA board
-
-N: Kurt Stremerch
-E: kurt@exys.be
-D: Support for Exys XSEngine board
-
-N: Andrea Scian
-E: andrea.scian@dave-tech.it
-D: Port to B2 board
-W: www.dave-tech.it
-
-N: Rob Taylor
-E: robt@flyingpig.com
-D: Port to MBX860T and Sandpoint8240
-
-N: Erik Theisen
-E: etheisen@mindspring.com
-D: MBX8xx and many other patches
-
-N: Jim Thompson
-E: jim@musenki.com
-D: Support for MUSENKI board
-
-N: Rune Torgersen
-E: <runet@innovsys.com>
-D: Support for Motorola MPC8266ADS board
-
-N: Greg Ungerer
-E: greg.ungerer@opengear.com
-D: Support for ks8695 CPU, and OpenGear cmXXXX boards
-
-N: David Updegraff
-E: dave@cray.com
-D: Port to Cray L1 board; DHCP vendor extensions
-
-N: Christian Vejlbo
-E: christian.vejlbo@tellabs.com
-D: FADS860T ethernet support
-
-N: Robert Whaley
-E: rwhaley@applieddata.net
-D: Port to ARM PXA27x adsvix SBC
-
-N: Martin Winistoerfer
-E: martinwinistoerfer@gmx.ch
-D: Port to MPC555/556 microcontrollers and support for cmi board
-
-N: Ming-Len Wu
-E: minglen_wu@techware.com.tw
-D: Motorola MX1ADS board support
-W: http://www.techware.com.tw/
-
-N: Xianghua Xiao
-E: x.xiao@motorola.com
-D: Support for Motorola 85xx(PowerQUICC III) chip, MPC8540ADS and MPC8560ADS boards.
-
-N: John Zhan
-E: zhanz@sinovee.com
-D: Support for SinoVee Microsystems SC8xx SBC
-
-N: Alex Zuepke
-E: azu@sysgo.de
-D: Overall improvements on StrongARM, ARM720TDMI; Support for Tuxscreen; initial PCMCIA support for ARM
-W: www.elinos.com
-
-N: James MacAulay
-E: james.macaulay@amirix.com
-D: Suppport for Amirix AP1000
-W: www.amirix.com
-
-N: Timur Tabi
-E: timur@freescale.com
-D: Support for MPC8349E-mITX
-W: www.freescale.com
diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst
index 2147cb63db..b7ad40e472 100644
--- a/Documentation/boards/efi.rst
+++ b/Documentation/boards/efi.rst
@@ -164,20 +164,20 @@ Care must be taken that a partition is only accessed either via the Block IO Pro
the File IO Interface. Doing both at the same time will most likely result in data
corruption on the partition
-EFI device pathes
------------------
+EFI device paths
+----------------
-In EFI each device can be pointed to using a device path. Device pathes have multiple
+In EFI each device can be pointed to using a device path. Device paths have multiple
components. The toplevel component on X86 systems will be the PCI root complex, on
other systems this can be the physical memory space. Each component will now descrive
how to find the child component on the parent bus. Additional device path nodes can
-describe network addresses or filenames on partitions. Device pathes have a binary
+describe network addresses or filenames on partitions. Device paths have a binary
representation and a clearly defined string representation. These characteristics make
-device pathes suitable for describing boot entries. barebox could use device pathes
-to store the reference to kernels on boot media. Also device pathes could be used to
+device paths suitable for describing boot entries. barebox could use device paths
+to store the reference to kernels on boot media. Also device paths could be used to
pass a root filesystem to the Kernel.
-Currently device pathes are only integrated into barebox in a way that each EFI device
+Currently device paths are only integrated into barebox in a way that each EFI device
has a device parameter ``devpath`` which contains its device path:
.. code-block:: sh
diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst
index 0fde3e747e..466f69c5ba 100644
--- a/Documentation/boards/imx.rst
+++ b/Documentation/boards/imx.rst
@@ -91,7 +91,7 @@ command for writing to NAND flash.
i.MX boards
-----------
-Not supported all boards have a description here. Many newer boards also do
+Not all supported boards have a description here. Many newer boards also do
not have individual defconfig files, they are covered by ``imx_v7_defconfig``
or ``imx_defconfig`` instead.
@@ -101,4 +101,3 @@ or ``imx_defconfig`` instead.
:maxdepth: 1
imx/*
- mxs/*
diff --git a/Documentation/boards/imx/Karo-TX25.rst b/Documentation/boards/imx/Karo-TX25.rst
new file mode 100644
index 0000000000..756c99d816
--- /dev/null
+++ b/Documentation/boards/imx/Karo-TX25.rst
@@ -0,0 +1,10 @@
+Ka-Ro TX25
+==========
+
+Building the bootloader image for this target is covered by the ``imx_defconfig``
+multiimage configuration if the ``System Type`` menu entry ``Ka-Ro TX25``
+is enabled.
+
+Use the corresponding ``barebox-karo-tx25.img`` for external NAND boot.
+Use the corresponding ``barebox-karo-tx25-internal.img`` for internal NAND, USB
+or SD card boot.
diff --git a/Documentation/boards/imx/Phytec-phyCARD-i.MX27.rst b/Documentation/boards/imx/Phytec-phyCARD-i.MX27.rst
new file mode 100644
index 0000000000..d5d3837132
--- /dev/null
+++ b/Documentation/boards/imx/Phytec-phyCARD-i.MX27.rst
@@ -0,0 +1,8 @@
+Phytec phyCARD-i.MX27
+=====================
+
+Building the bootloader image for this target is covered by the ``imx_defconfig``
+multiimage configuration if the ``System Type`` menu entry ``phyCard-i.MX27``
+is enabled.
+
+Use the corresponding ``barebox-phytec-phycard-imx27.img`` file for this target.
diff --git a/Documentation/boards/imx/Phytec-phyCORE-i.MX27.rst b/Documentation/boards/imx/Phytec-phyCORE-i.MX27.rst
new file mode 100644
index 0000000000..4b40be781d
--- /dev/null
+++ b/Documentation/boards/imx/Phytec-phyCORE-i.MX27.rst
@@ -0,0 +1,8 @@
+Phytec phyCORE-i.MX27
+=====================
+
+Building the bootloader image for this target is covered by the ``imx_defconfig``
+multiimage configuration if the ``System Type`` menu entry ``phyCORE-i.MX27``
+is enabled.
+
+Use the corresponding ``barebox-phytec-phycore-imx27.img`` file for this target.
diff --git a/Documentation/boards/mxs.rst b/Documentation/boards/mxs.rst
index 6c8bdb56fa..cfcd4c70d6 100644
--- a/Documentation/boards/mxs.rst
+++ b/Documentation/boards/mxs.rst
@@ -115,5 +115,17 @@ mxsboot tool which changes this sector number in the image.
Booting second stage
--------------------
-The second stage images can be started with the barebox bootm command or
-just jumped into using the 'go' command.
+The second stage images can be started with the barebox :ref:`command_bootm` command or
+just jumped into using the :ref:`command_go` command.
+
+i.MXs boards
+------------
+
+Not all supported boards have a description here.
+
+.. toctree::
+ :glob:
+ :numbered:
+ :maxdepth: 1
+
+ mxs/*
diff --git a/Documentation/boards/mxs/Freescale-i.MX23-evk.rst b/Documentation/boards/mxs/Freescale-i.MX23-evk.rst
index 85dde46e40..cb73ec1279 100644
--- a/Documentation/boards/mxs/Freescale-i.MX23-evk.rst
+++ b/Documentation/boards/mxs/Freescale-i.MX23-evk.rst
@@ -21,7 +21,7 @@ How to get the bootloader binary image
Using the default configuration::
- make ARCH=arm imx23evk_defconfig
+ make ARCH=arm freescale-mx23-evk_defconfig
Build the bootloader binary image::
diff --git a/Documentation/boards/mxs/KaRo-TX28.rst b/Documentation/boards/mxs/KaRo-TX28.rst
index 0c5dc71ef3..6cad5eb243 100644
--- a/Documentation/boards/mxs/KaRo-TX28.rst
+++ b/Documentation/boards/mxs/KaRo-TX28.rst
@@ -38,5 +38,5 @@ This produces the following images:
* barebox-karo-tx28-bootstream.img - Use with the bcb command
* barebox-karo-tx28-sd.img - Use for SD cards
- * barebox-karo-tx28-2nd.img - Use for 2nd stage booting (with bootm)
+ * barebox-karo-tx28-2nd.img - Use for 2nd stage booting (with :ref:`command_bootm`)
diff --git a/Documentation/boards/mxs/Olimex-olinuxino.rst b/Documentation/boards/mxs/Olimex-olinuxino.rst
new file mode 100644
index 0000000000..a06eb3309f
--- /dev/null
+++ b/Documentation/boards/mxs/Olimex-olinuxino.rst
@@ -0,0 +1,26 @@
+Olimex LTD Olinuxino
+====================
+
+The CPU module
+--------------
+
+This CPU module is based on a Freescale i.MX23 CPU.
+
+How to get the bootloader binary image
+--------------------------------------
+
+Using the default configuration::
+
+ make ARCH=arm imx233-olinuxino_defconfig
+
+Build the binary image::
+
+ make ARCH=arm CROSS_COMPILE=armv5compiler
+
+**NOTE:** replace the armv5compiler with your ARM v5 cross compiler.
+
+This produces the following images:
+
+ * barebox-olinuxino-imx23-bootstream.img - Use with the bcb command
+ * barebox-olinuxino-imx23-sd.img - Use for SD cards
+ * barebox-olinuxino-imx23-2nd.img - Use for 2nd stage booting (with :ref:`command_bootm`)
diff --git a/Documentation/user/booting-linux.rst b/Documentation/user/booting-linux.rst
index 17427f3636..3a8da11fd5 100644
--- a/Documentation/user/booting-linux.rst
+++ b/Documentation/user/booting-linux.rst
@@ -166,7 +166,7 @@ A Bootloader Spec Entry consists of key value pairs::
linux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
initrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd
-All pathes are absolute pathes in the partition. Bootloader Spec Entries can
+All paths are absolute paths in the partition. Bootloader Spec Entries can
be created manually, but there also is the ``scripts/kernel-install`` tool to
create/list/modify entries directly on a MMC/SD card or other media. To use
it create a SD card / USB memory stick with a /boot partition with type 0xea.
@@ -246,7 +246,7 @@ link target is exported from the server.
``boot net`` will then start the Kernel.
-If the pathes or names are not suitable they can be adjusted in
+If the paths or names are not suitable they can be adjusted in
``/env/boot/net``:
.. code-block:: sh
diff --git a/Documentation/user/variables.rst b/Documentation/user/variables.rst
index ea99eb6113..0abc25d98a 100644
--- a/Documentation/user/variables.rst
+++ b/Documentation/user/variables.rst
@@ -79,7 +79,7 @@ of all variables with special meaning along with a short description::
barebox:/ magicvar
OPTARG optarg for hush builtin getopt
- PATH colon separated list of pathes to search for executables
+ PATH colon separated list of paths to search for executables
PS1 hush prompt
armlinux_architecture ARM machine ID
armlinux_system_rev ARM system revision
diff --git a/MAKEALL b/MAKEALL
index bf9131abbf..909e170b15 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -10,11 +10,9 @@ errors_list=""
nb_defconfigs=0
ret=0
-here=$(pwd)
-
time_start=$(date +%s)
-filename=`basename $0`
+filename=$(basename $0)
is_print_stats=1
@@ -93,38 +91,42 @@ do_build_target() {
local log_err="${LOGDIR}/${target}/errors.log"
rm -rf "${BUILDDIR}"
- mkdir -p "${BUILDDIR}"
mkdir -p "${LOGDIR}/${target}"
printf "Building ${arch} ${target} \n" >&2 | tee -a "${log_report}"
- tmp=`echo "${target}" | tr - _`
+ tmp=$(echo "${target}" | tr - _)
- cross_compile=`eval echo '$CROSS_COMPILE_'${tmp}`
- cross_compile_set=`eval echo '${CROSS_COMPILE_'${tmp}'+set}'`
+ cross_compile=$(eval echo '$CROSS_COMPILE_'${tmp})
+ cross_compile_set=$(eval echo '${CROSS_COMPILE_'${tmp}'+set}')
if [ "${cross_compile_set}" = "" ]
then
- cross_compile=`eval echo '$CROSS_COMPILE_'${arch}`
- cross_compile_set=`eval echo '${CROSS_COMPILE_'${arch}'+set}'`
+ cross_compile=$(eval echo '$CROSS_COMPILE_'${arch})
+ cross_compile_set=$(eval echo '${CROSS_COMPILE_'${arch}'+set}')
if [ "${cross_compile_set}" = "" ]
then
cross_compile=${CROSS_COMPILE}
fi
fi
- MAKE="make -C ${here} CROSS_COMPILE=${cross_compile} ARCH=${arch} O=${BUILDDIR}"
- ${MAKE} -j${JOBS} ${target} 2>&1 > "${log_report}" | tee "${log_err}"
+ MAKE="make -j${JOBS} CROSS_COMPILE=${cross_compile} ARCH=${arch} O=${BUILDDIR}"
+ ${MAKE} ${target} 2>&1 > "${log_report}" | tee "${log_err}"
- printf "Configure: " | tee -a "${log_report}"
check_pipe_status
- if [ "$?" = "0" ]; then
+ result="$?"
+
+ printf "Configure: " | tee -a "${log_report}"
+
+ if [ "$result" = "0" ]; then
printf "OK \n" | tee -a "${log_report}"
- ${MAKE} -j${JOBS} -s 2>&1 >> "${log_report}" | tee -a "${log_err}"
+ ${MAKE} -s 2>&1 >> "${log_report}" | tee -a "${log_err}"
+
+ check_pipe_status
+ result="$?"
printf "Compile: " ${target} | tee -a "${log_report}"
- check_pipe_status
- if [ "$?" = "0" ]; then
+ if [ "$result" = "0" ]; then
printf "OK \n" | tee -a "${log_report}"
${cross_compile}size ${BUILDDIR}/barebox | tee -a "${log_report}"
else
@@ -172,7 +174,7 @@ do_build_all() {
if [ -d $i ]
then
- do_build ${arch}
+ do_build ${arch} "*"
build_target=$((build_target + 1))
fi
done
@@ -234,7 +236,7 @@ fi
if [ "${CONFIG}" ]
then
- basedir=`dirname ${CONFIG}`
+ basedir=$(dirname ${CONFIG})
if [ ! "${basedir}" ] || [ "${basedir}" = "." ]
then
@@ -251,13 +253,6 @@ then
REGEX="*"
fi
-if [ ! "${CONFIG}" ] && [ ! "${CROSS_COMPILE+set}" ]
-then
- echo "You need to specify a CONFIG or a CROSS_COMPILE"
- usage
- exit 1
-fi
-
if [ ! "${ARCH}" ] || [ ! -d arch/${ARCH} ]
then
do_build_all
diff --git a/Makefile b/Makefile
index 90a7eeee65..9d44e40518 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VERSION = 2015
-PATCHLEVEL = 01
+PATCHLEVEL = 02
SUBLEVEL = 0
EXTRAVERSION =
NAME = None
@@ -488,9 +488,9 @@ images/%.s: barebox.bin FORCE
$(Q)$(MAKE) $(build)=images $@
ifdef CONFIG_PBL_MULTI_IMAGES
-all: $(KBUILD_DTBS) barebox.bin images
+all: barebox.bin images
else
-all: barebox-flash-image $(KBUILD_DTBS)
+all: barebox-flash-image
endif
common-$(CONFIG_PBL_IMAGE) += pbl/
@@ -953,7 +953,7 @@ endif # CONFIG_MODULES
CLEAN_DIRS += $(MODVERDIR)
CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \
.tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \
- .tmp_kallsyms* common/barebox_default_env* barebox.ldr \
+ .tmp_kallsyms* barebox.ldr \
scripts/bareboxenv-target barebox-flash-image \
barebox.srec barebox.s5p barebox.ubl barebox.zynq \
barebox.uimage barebox.spi barebox.kwb barebox.kwbuart \
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 193f731e90..f0133d4165 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -13,8 +13,6 @@ AS += -EL
LD += -EL
endif
-comma = ,
-
# This selects which instruction set is used.
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index d81d3601e8..f9daa08a38 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_MACH_GUF_CUPID) += guf-cupid/
obj-$(CONFIG_MACH_GUF_SANTARO) += guf-santaro/
obj-$(CONFIG_MACH_GUF_VINCELL) += guf-vincell/
obj-$(CONFIG_MACH_GW_VENTANA) += gateworks-ventana/
+obj-$(CONFIG_MACH_HABA_KNX_LITE) += haba-knx/
obj-$(CONFIG_MACH_HIGHBANK) += highbank/
obj-$(CONFIG_MACH_IMX21ADS) += freescale-mx21-ads/
obj-$(CONFIG_MACH_IMX233_OLINUXINO) += imx233-olinuxino/
diff --git a/arch/arm/boards/a9m2410/env/config b/arch/arm/boards/a9m2410/env/config
index 79150ce017..2b09318934 100644
--- a/arch/arm/boards/a9m2410/env/config
+++ b/arch/arm/boards/a9m2410/env/config
@@ -23,4 +23,4 @@ eth0.ipaddr=192.168.42.31
eth0.netmask=255.255.0.0
eth0.gateway=192.168.23.1
eth0.serverip=192.168.23.2
-eth0.ethaddr=00:04:f3:00:06:35
+#eth0.ethaddr=
diff --git a/arch/arm/boards/a9m2440/env/config b/arch/arm/boards/a9m2440/env/config
index 936c35f9a9..d1fb01b731 100644
--- a/arch/arm/boards/a9m2440/env/config
+++ b/arch/arm/boards/a9m2440/env/config
@@ -23,4 +23,4 @@ eth0.ipaddr=192.168.42.32
eth0.netmask=255.255.0.0
eth0.gateway=192.168.23.1
eth0.serverip=192.168.23.2
-eth0.ethaddr=00:04:f3:00:06:35
+#eth0.ethaddr=
diff --git a/arch/arm/boards/at91sam9n12ek/env/bin/init_board b/arch/arm/boards/at91sam9n12ek/env/bin/init_board
index 6b44044f17..4931342a0b 100644
--- a/arch/arm/boards/at91sam9n12ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9n12ek/env/bin/init_board
@@ -12,7 +12,7 @@ button_wait=5
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
-if [ $at91_udc0.vbus != 1 ]
+if [ $at91_udc.vbus != 1 ]
then
echo "No USB Device cable plugged, normal boot"
exit
@@ -30,7 +30,7 @@ fi
echo "${button_name} pressed detected wait ${button_wait}s"
timeout -s -a ${button_wait}
-if [ $at91_udc0.vbus != 1 ]
+if [ $at91_udc.vbus != 1 ]
then
echo "No USB Device cable plugged, normal boot"
exit
diff --git a/arch/arm/boards/edb93xx/env/config b/arch/arm/boards/edb93xx/env/config
index 47ab209d82..3266272742 100644
--- a/arch/arm/boards/edb93xx/env/config
+++ b/arch/arm/boards/edb93xx/env/config
@@ -3,7 +3,7 @@
eth0.ipaddr=192.168.0.50
eth0.netmask=255.255.0.0
eth0.serverip=192.168.0.8
-eth0.ethaddr=80:81:82:83:84:85
+#eth0.ethaddr=
board=edb9301
autoboot_timeout=3
diff --git a/arch/arm/boards/embedsky-e9/board.c b/arch/arm/boards/embedsky-e9/board.c
index 1e7e06788a..e8aac0c1b0 100644
--- a/arch/arm/boards/embedsky-e9/board.c
+++ b/arch/arm/boards/embedsky-e9/board.c
@@ -40,6 +40,7 @@
#include <mach/spi.h>
#include <mach/usb.h>
#include <envfs.h>
+#include <bootsource.h>
#define PHY_ID_RTL8211E 0x001cc915
#define PHY_ID_MASK 0xffffffff
@@ -59,11 +60,25 @@ static int rtl8211e_phy_fixup(struct phy_device *dev)
static int e9_devices_init(void)
{
+ int ret;
+ char *environment_path;
+
if (!of_machine_is_compatible("embedsky,e9"))
return 0;
armlinux_set_architecture(3980);
- barebox_set_hostname("e9");
+
+ environment_path = asprintf("/chosen/environment-mmc%d",
+ bootsource_get_instance());
+
+ ret = of_device_enable_path(environment_path);
+
+ if (ret < 0)
+ pr_warn("Failed to enable environment partition '%s' (%d)\n",
+ environment_path, ret);
+
+ free(environment_path);
+
defaultenv_append_directory(defaultenv_e9);
return 0;
diff --git a/arch/arm/boards/embedsky-e9/defaultenv-e9/boot/mmc3 b/arch/arm/boards/embedsky-e9/defaultenv-e9/boot/mmc3
index 374eb1cfe6..f6cb529d3c 100644
--- a/arch/arm/boards/embedsky-e9/defaultenv-e9/boot/mmc3
+++ b/arch/arm/boards/embedsky-e9/defaultenv-e9/boot/mmc3
@@ -2,5 +2,5 @@
mount /dev/mmc3.0
-global.bootm.image=/mnt/mmc3.0/boot/zImage
-global.linux.bootargs.dyn.root="root=/dev/mmcblk1p1 rootwait"
+global.bootm.image=/mnt/mmc3.0/zImage
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootwait"
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/config b/arch/arm/boards/freescale-mx25-3ds/env/config
index a5e492e339..8469935b20 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/config
+++ b/arch/arm/boards/freescale-mx25-3ds/env/config
@@ -26,4 +26,4 @@ eth0.ipaddr=192.168.3.11
eth0.netmask=255.255.255.0
#eth0.gateway=a.b.c.d
eth0.serverip=192.168.3.10
-eth0.ethaddr=00:50:c2:8c:e6:0e
+#eth0.ethaddr=
diff --git a/arch/arm/boards/friendlyarm-mini6410/env/config b/arch/arm/boards/friendlyarm-mini6410/env/config
index a1c86e1fba..74beeff4fa 100644
--- a/arch/arm/boards/friendlyarm-mini6410/env/config
+++ b/arch/arm/boards/friendlyarm-mini6410/env/config
@@ -12,7 +12,7 @@ ip=dhcp
#eth0.ipaddr=a.b.c.d.e
#eth0.netmask=a.b.c.d.e
#eth0.gateway=a.b.c.d.e
-eth0.ethaddr=08:90:90:90:90:90
+#eth0.ethaddr=
# can be either 'nfs', 'tftp' or 'nand'
kernel_loc=tftp
diff --git a/arch/arm/boards/friendlyarm-tiny6410/env/config b/arch/arm/boards/friendlyarm-tiny6410/env/config
index 35d0fac334..6422e9f6a6 100644
--- a/arch/arm/boards/friendlyarm-tiny6410/env/config
+++ b/arch/arm/boards/friendlyarm-tiny6410/env/config
@@ -12,7 +12,7 @@ ip=dhcp
#eth0.ipaddr=a.b.c.d.e
#eth0.netmask=a.b.c.d.e
#eth0.gateway=a.b.c.d.e
-eth0.ethaddr=08:90:90:90:90:90
+#eth0.ethaddr=
# can be either 'nfs', 'tftp' or 'nand'
kernel_loc=tftp
diff --git a/arch/arm/boards/haba-knx/Makefile b/arch/arm/boards/haba-knx/Makefile
new file mode 100644
index 0000000000..eb072c0161
--- /dev/null
+++ b/arch/arm/boards/haba-knx/Makefile
@@ -0,0 +1 @@
+obj-y += init.o
diff --git a/arch/arm/boards/haba-knx/env/bin/init_board b/arch/arm/boards/haba-knx/env/bin/init_board
new file mode 100644
index 0000000000..0a6baf722b
--- /dev/null
+++ b/arch/arm/boards/haba-knx/env/bin/init_board
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+button_name="dfu_bp"
+button_wait=5
+
+product_id=0x1234
+vendor_id=0x4321
+
+dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
+
+if [ $at91_udc0.vbus != 1 ]
+then
+ echo "No USB Device cable plugged, normal boot"
+ exit
+fi
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+ autoboot_timeout=16
+ echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+ usbserial
+ exit
+fi
+
+echo "${button_name} pressed detected wait ${button_wait}s"
+timeout -s -a ${button_wait}
+
+if [ $at91_udc0.vbus != 1 ]
+then
+ echo "No USB Device cable plugged, normal boot"
+ exit
+fi
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+ echo "${button_name} released, normal boot"
+ autoboot_timeout=16
+ echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+ usbserial
+ exit
+fi
+
+echo ""
+echo "Start DFU Mode"
+echo ""
+
+dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
diff --git a/arch/arm/boards/haba-knx/env/config b/arch/arm/boards/haba-knx/env/config
new file mode 100644
index 0000000000..d1dca105ad
--- /dev/null
+++ b/arch/arm/boards/haba-knx/env/config
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# use 'dhcp' to do dhcp in barebox and in kernel
+# use 'none' if you want to skip kernel ip autoconfiguration
+ip=none
+#ip=dhcp-barebox
+[ x$armlinux_architecture = x4310 ] && dhcp_vendor_id=barebox-haba-knx-lite
+
+# or set your networking parameters here
+#eth0.ipaddr=a.b.c.d
+#eth0.netmask=a.b.c.d
+#eth0.gateway=a.b.c.d
+#eth0.serverip=a.b.c.d
+
+# can be either 'nfs', 'tftp', 'nor' or 'nand'
+kernel_loc=nand
+# can be either 'net', 'nor', 'nand' or 'initrd'
+rootfs_loc=nand
+# can be either 'nfs', 'tftp', 'nor', 'nand' or empty
+oftree_loc=nand
+
+# can be either 'jffs2' or 'ubifs'
+rootfs_type=ubifs
+rootfsimage=root.$rootfs_type
+
+kernelimage=zImage
+#kernelimage=uImage
+#kernelimage=Image
+#kernelimage=Image.lzo
+
+nand_device=atmel_nand
+nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)"
+rootfs_mtdblock_nand=6
+
+autoboot_timeout=3
+
+bootargs="console=ttyS0,115200"
+
+# set a fancy prompt (if support is compiled in)
+PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "
diff --git a/arch/arm/boards/haba-knx/init.c b/arch/arm/boards/haba-knx/init.c
new file mode 100644
index 0000000000..f9d8f0f903
--- /dev/null
+++ b/arch/arm/boards/haba-knx/init.c
@@ -0,0 +1,348 @@
+/*
+ * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD
+ * Copyright (C) 2014 Gregory Hermant <gregory.hermant@calao-systems.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ *
+ */
+
+#include <common.h>
+#include <net.h>
+#include <init.h>
+#include <environment.h>
+#include <asm/armlinux.h>
+#include <generated/mach-types.h>
+#include <partition.h>
+#include <fs.h>
+#include <fcntl.h>
+#include <io.h>
+#include <mach/hardware.h>
+#include <nand.h>
+#include <linux/sizes.h>
+#include <linux/mtd/nand.h>
+#include <linux/clk.h>
+#include <mach/board.h>
+#include <mach/at91sam9_smc.h>
+#include <gpio.h>
+#include <led.h>
+#include <mach/io.h>
+#include <mach/iomux.h>
+#include <mach/at91_pmc.h>
+#include <mach/at91_rstc.h>
+#include <spi/spi.h>
+#include <i2c/i2c.h>
+#include <libfile.h>
+
+#if defined(CONFIG_NAND_ATMEL)
+static struct atmel_nand_data nand_pdata = {
+ .ale = 21,
+ .cle = 22,
+ .det_pin = -EINVAL,
+ .rdy_pin = AT91_PIN_PC13,
+ .enable_pin = AT91_PIN_PC14,
+ .ecc_mode = NAND_ECC_SOFT,
+ .on_flash_bbt = 1,
+};
+
+static struct sam9_smc_config haba_knx_nand_smc_config = {
+ .ncs_read_setup = 0,
+ .nrd_setup = 2,
+ .ncs_write_setup = 0,
+ .nwe_setup = 2,
+
+ .ncs_read_pulse = 4,
+ .nrd_pulse = 4,
+ .ncs_write_pulse = 4,
+ .nwe_pulse = 4,
+
+ .read_cycle = 7,
+ .write_cycle = 7,
+
+ .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+ AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8,
+ .tdf_cycles = 3,
+};
+
+static void haba_knx_add_device_nand(void)
+{
+ /* configure chip-select 3 (NAND) */
+ sam9_smc_configure(0, 3, &haba_knx_nand_smc_config);
+ at91_add_device_nand(&nand_pdata);
+}
+#else
+static void haba_knx_add_device_nand(void) {}
+#endif
+
+#if defined(CONFIG_DRIVER_NET_MACB)
+static struct macb_platform_data macb_pdata = {
+ .phy_interface = PHY_INTERFACE_MODE_RMII,
+ .phy_addr = -1,
+};
+
+static void haba_knx_phy_reset(void)
+{
+ unsigned long rstc;
+ struct clk *clk = clk_get(NULL, "macb_clk");
+
+ clk_enable(clk);
+
+ at91_set_gpio_input(AT91_PIN_PA14, 0);
+ at91_set_gpio_input(AT91_PIN_PA15, 0);
+ at91_set_gpio_input(AT91_PIN_PA17, 0);
+ at91_set_gpio_input(AT91_PIN_PA18, 0);
+
+ rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
+
+ /* Need to reset PHY -> 500ms reset */
+ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
+ (AT91_RSTC_ERSTL & (0x0d << 8)) |
+ AT91_RSTC_URSTEN);
+
+ at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
+
+ /* Wait for end hardware reset */
+ while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL))
+ ;
+
+ /* Restore NRST value */
+ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
+ (rstc) |
+ AT91_RSTC_URSTEN);
+}
+
+#define MACB_SA1B 0x0098
+#define MACB_SA1T 0x009c
+
+static int haba_ip_get_macb_ethaddr(u8 *addr)
+{
+ u32 top, bottom;
+ void __iomem *base = IOMEM(AT91SAM9260_BASE_EMAC);
+
+ bottom = readl(base + MACB_SA1B);
+ top = readl(base + MACB_SA1T);
+ addr[0] = bottom & 0xff;
+ addr[1] = (bottom >> 8) & 0xff;
+ addr[2] = (bottom >> 16) & 0xff;
+ addr[3] = (bottom >> 24) & 0xff;
+ addr[4] = top & 0xff;
+ addr[5] = (top >> 8) & 0xff;
+
+ /* valid and not private */
+ if (is_valid_ether_addr(addr) && !(addr[0] & 0x02))
+ return 0;
+
+ return -EINVAL;
+}
+
+#define EEPROM_OFFSET 250
+#define EEPROM_SIZE 256
+
+static int haba_set_ethaddr(void)
+{
+ char addr[6];
+ char eep_data[256];
+ int i, fd, ret;
+
+ fd = open("/dev/eeprom0", O_RDONLY);
+ if (fd < 0) {
+ ret = fd;
+ goto err;
+ }
+
+ ret = read_full(fd, eep_data, EEPROM_SIZE);
+ if (ret < 0)
+ goto err_open;
+
+ for (i = 0; i < 6; i++)
+ addr[i] = eep_data[EEPROM_OFFSET+i];
+
+ eth_register_ethaddr(0, addr);
+
+ ret = 0;
+
+err_open:
+ close(fd);
+err:
+ if (ret)
+ pr_err("can't read eeprom /dev/eeprom0 (%s)\n", strerror(ret));
+
+ return ret;
+}
+
+static void haba_knx_add_device_eth(void)
+{
+ u8 enetaddr[6];
+
+ if (!haba_ip_get_macb_ethaddr(enetaddr))
+ eth_register_ethaddr(0, enetaddr);
+ else
+ haba_set_ethaddr();
+
+ haba_knx_phy_reset();
+ at91_add_device_eth(0, &macb_pdata);
+}
+#else
+static void haba_knx_add_device_eth(void) {}
+#endif
+
+/*
+ * USB Device port
+ */
+static struct at91_udc_data __initdata ek_udc_data = {
+ .vbus_pin = AT91_PIN_PB2,
+ .pullup_pin = 0, /* pull-up driven by UDC */
+};
+
+static struct i2c_board_info i2c_devices[] = {
+ {
+ I2C_BOARD_INFO("24c02", 0x50)
+ }
+};
+
+static const struct spi_board_info ek_spi_devices[] = {
+ {
+ .name = "m25p16",
+ .max_speed_hz = 30 * 1000 * 1000,
+ .bus_num = 0,
+ .chip_select = 0,
+ },
+ {
+ .name = "spi_mci",
+ .max_speed_hz = 25 * 1000 * 1000,
+ .bus_num = 0,
+ .chip_select = 1,
+ }
+};
+
+static unsigned spi0_standard_cs[] = { AT91_PIN_PA3, AT91_PIN_PA27 };
+static struct at91_spi_platform_data spi_pdata = {
+ .chipselect = spi0_standard_cs,
+ .num_chipselect = ARRAY_SIZE(spi0_standard_cs),
+};
+
+static void haba_knx_add_device_spi(void)
+{
+ if (machine_is_haba_knx_lite()) {
+ spi_register_board_info(ek_spi_devices,
+ ARRAY_SIZE(ek_spi_devices));
+ at91_add_device_spi(0, &spi_pdata);
+ }
+}
+
+static struct at91_usbh_data haba_knx_usbh_data = {
+ .ports = 2,
+ .vbus_pin = { -EINVAL, -EINVAL },
+};
+
+static void haba_knx_add_device_usb(void)
+{
+ at91_add_device_usbh_ohci(&haba_knx_usbh_data);
+}
+
+struct gpio_led led = {
+ .gpio = AT91_PIN_PA28,
+ .led = {
+ .name = "user_led",
+ },
+};
+
+static void __init ek_add_led(void)
+{
+ if (!machine_is_haba_knx_lite())
+ return;
+ at91_set_gpio_output(led.gpio, led.active_low);
+ led_gpio_register(&led);
+}
+
+static int haba_knx_mem_init(void)
+{
+ at91_add_device_sdram(0);
+ return 0;
+}
+mem_initcall(haba_knx_mem_init);
+
+static void __init ek_add_device_button(void)
+{
+ at91_set_GPIO_periph(AT91_PIN_PC3, 1); /* user btn, pull up enabled */
+ at91_set_deglitch(AT91_PIN_PC3, 1);
+ export_env_ull("dfu_button", AT91_PIN_PC3);
+}
+
+static const struct devfs_partition haba_knx_nand0_partitions[] = {
+ {
+ .offset = 0x00000,
+ .size = SZ_128K,
+ .flags = DEVFS_PARTITION_FIXED,
+ .name = "at91bootstrap_raw",
+ .bbname = "at91bootstrap",
+ }, {
+ .offset = DEVFS_PARTITION_APPEND,
+ .size = SZ_256K,
+ .flags = DEVFS_PARTITION_FIXED,
+ .name = "self_raw",
+ .bbname = "self0",
+ }, {
+ .offset = DEVFS_PARTITION_APPEND,
+ .size = SZ_128K,
+ .flags = DEVFS_PARTITION_FIXED,
+ .name = "env_raw",
+ .bbname = "env0",
+ }, {
+ .offset = DEVFS_PARTITION_APPEND,
+ .size = SZ_128K,
+ .flags = DEVFS_PARTITION_FIXED,
+ .name = "env_raw1",
+ .bbname = "env1",
+ }, {
+ /* sentinel */
+ }
+};
+
+static int haba_knx_devices_init(void)
+{
+ at91_add_device_i2c(0, i2c_devices, ARRAY_SIZE(i2c_devices));
+ haba_knx_add_device_nand();
+ haba_knx_add_device_eth();
+ haba_knx_add_device_spi();
+ haba_knx_add_device_usb();
+ at91_add_device_udc(&ek_udc_data);
+ ek_add_led();
+ ek_add_device_button();
+
+ armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
+ armlinux_set_architecture(MACH_TYPE_HABA_KNX_LITE);
+
+ devfs_create_partitions("nand0", haba_knx_nand0_partitions);
+
+ return 0;
+}
+device_initcall(haba_knx_devices_init);
+
+static int haba_knx_console_init(void)
+{
+ barebox_set_model("CALAO HABA-KNX-LITE");
+ barebox_set_hostname("haba-knx-lite");
+
+ at91_register_uart(0, 0);
+ at91_set_A_periph(AT91_PIN_PB14, 1); /* Enable pull-up on DRXD */
+
+ at91_set_gpio_input(AT91_PIN_PB0, 1); /* Enable pull-up on usd CD */
+ return 0;
+}
+console_initcall(haba_knx_console_init);
+
+static int haba_knx_main_clock(void)
+{
+ at91_set_main_clock(12000000);
+ return 0;
+}
+pure_initcall(haba_knx_main_clock);
diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index 1551460393..5f65261a9f 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -17,6 +17,7 @@
*
*/
+#include <malloc.h>
#include <envfs.h>
#include <environment.h>
#include <bootsource.h>
@@ -65,6 +66,9 @@ static void phyflex_err006282_workaround(void)
static int phytec_pfla02_init(void)
{
+ int ret;
+ char *environment_path;
+
if (!of_machine_is_compatible("phytec,imx6q-pfla02") &&
!of_machine_is_compatible("phytec,imx6dl-pfla02") &&
!of_machine_is_compatible("phytec,imx6s-pfla02"))
@@ -76,19 +80,38 @@ static int phytec_pfla02_init(void)
switch (bootsource_get()) {
case BOOTSOURCE_MMC:
- of_device_enable_path("/chosen/environment-sd");
+ environment_path = asprintf("/chosen/environment-sd%d",
+ bootsource_get_instance() + 1);
break;
case BOOTSOURCE_NAND:
- of_device_enable_path("/chosen/environment-nand");
+ environment_path = asprintf("/chosen/environment-nand");
break;
default:
case BOOTSOURCE_SPI:
- of_device_enable_path("/chosen/environment-spinor");
+ environment_path = asprintf("/chosen/environment-spinor");
break;
}
- defaultenv_append_directory(defaultenv_phyflex_imx6);
+ ret = of_device_enable_path(environment_path);
+ if (ret < 0)
+ pr_warn("Failed to enable environment partition '%s' (%d)\n",
+ environment_path, ret);
+
+ free(environment_path);
return 0;
}
device_initcall(phytec_pfla02_init);
+
+static int phytec_pbab0x_init(void)
+{
+ if (!of_machine_is_compatible("phytec,imx6x-pbab01") &&
+ !of_machine_is_compatible("phytec,imx6dl-pbab05") &&
+ !of_machine_is_compatible("phytec,imx6q-pbab02"))
+ return 0;
+
+ defaultenv_append_directory(defaultenv_phyflex_imx6);
+
+ return 0;
+}
+device_initcall(phytec_pbab0x_init);
diff --git a/arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg b/arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
new file mode 100644
index 0000000000..e414b6e612
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
@@ -0,0 +1,8 @@
+#define SETUP_MDCFG0 \
+ wm 32 0x021b000c 0x565c9b85
+
+#define SETUP_1GIB_2GIB_4GIB \
+ wm 32 0x021b0040 0x00000027; \
+ wm 32 0x021b0000 0x831a0000
+
+#include "flash-header-phytec-pfla02.h"
diff --git a/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c b/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c
index dbd264aed2..ee6d7fb262 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c
@@ -90,6 +90,7 @@ static void __noreturn start_imx6_phytec_common(uint32_t size,
}
PHYTEC_ENTRY(start_phytec_pbab01_1gib, imx6q_phytec_pbab01, SZ_1G, true);
+PHYTEC_ENTRY(start_phytec_pbab01_1gib_1bank, imx6q_phytec_pbab01, SZ_1G, true);
PHYTEC_ENTRY(start_phytec_pbab01_2gib, imx6q_phytec_pbab01, SZ_2G, true);
PHYTEC_ENTRY(start_phytec_pbab01_4gib, imx6q_phytec_pbab01, SZ_4G, true);
PHYTEC_ENTRY(start_phytec_pbab01dl_1gib, imx6dl_phytec_pbab01, SZ_1G, false);
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
index 57dc7b0667..7504bf83b0 100644
--- a/arch/arm/boards/sama5d3xek/init.c
+++ b/arch/arm/boards/sama5d3xek/init.c
@@ -49,11 +49,13 @@
#include "hw_version.h"
+#ifdef CONFIG_W1_MASTER_GPIO
struct w1_gpio_platform_data w1_pdata = {
.pin = AT91_PIN_PE25,
.ext_pullup_enable_pin = -EINVAL,
.is_open_drain = 0,
};
+#endif
#if defined(CONFIG_NAND_ATMEL)
static struct atmel_nand_data nand_pdata = {
@@ -123,12 +125,12 @@ static void ek_add_device_nand(void) {}
#if defined(CONFIG_DRIVER_NET_MACB)
static struct macb_platform_data gmac_pdata = {
.phy_interface = PHY_INTERFACE_MODE_RGMII,
- .phy_addr = 7,
+ .phy_addr = -1,
};
static struct macb_platform_data macb_pdata = {
.phy_interface = PHY_INTERFACE_MODE_RMII,
- .phy_addr = 0,
+ .phy_addr = -1,
};
static bool used_23 = false;
@@ -323,11 +325,13 @@ struct gpio_led leds[] = {
.name = "d1",
},
}, {
+#ifndef CONFIG_W1_MASTER_GPIO
.gpio = AT91_PIN_PE25,
.active_low = 1,
.led = {
.name = "d2",
},
+#endif
},
};
@@ -353,6 +357,7 @@ static int at91sama5d3xek_mem_init(void)
}
mem_initcall(at91sama5d3xek_mem_init);
+#ifdef CONFIG_W1_MASTER_GPIO
static void ek_add_device_w1(void)
{
at91_set_gpio_input(w1_pdata.pin, 0);
@@ -361,6 +366,9 @@ static void ek_add_device_w1(void)
at91sama5d3xek_devices_detect_hw();
}
+#else
+static void ek_add_device_w1(void) {}
+#endif
#ifdef CONFIG_POLLER
/*
diff --git a/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c b/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
index fe6876a9eb..f5b885ce0d 100644
--- a/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
+++ b/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
@@ -40,6 +40,7 @@ static struct atmel_nand_data nand_pdata = {
.rdy_pin = -EINVAL,
.enable_pin = -EINVAL,
.ecc_mode = NAND_ECC_HW,
+ .has_pmecc = 1,
.pmecc_sector_size = 512,
.pmecc_corr_cap = 8,
.on_flash_bbt = 1,
@@ -161,7 +162,7 @@ static void ek_add_device_mci(void)
at91_add_device_mci(1, &mci1_data);
/* power on MCI1 */
- at91_set_gpio_output(AT91_PIN_PE15, 0);
+ at91_set_gpio_output(AT91_PIN_PE4, 0);
}
#else
static void ek_add_device_mci(void) {}
@@ -245,15 +246,15 @@ static void ek_add_led(void)
static void ek_add_led(void) {}
#endif
-static int sama5d4ek_mem_init(void)
+static int sama5d4_xplained_mem_init(void)
{
at91_add_device_sdram(0);
return 0;
}
-mem_initcall(sama5d4ek_mem_init);
+mem_initcall(sama5d4_xplained_mem_init);
-static const struct devfs_partition sama5d4ek_nand0_partitions[] = {
+static const struct devfs_partition sama5d4_xplained_nand0_partitions[] = {
{
.offset = 0x00000,
.size = SZ_256K,
@@ -283,7 +284,7 @@ static const struct devfs_partition sama5d4ek_nand0_partitions[] = {
}
};
-static int sama5d4ek_devices_init(void)
+static int sama5d4_xplained_devices_init(void)
{
ek_add_device_i2c();
ek_add_device_nand();
@@ -293,27 +294,27 @@ static int sama5d4ek_devices_init(void)
ek_add_device_mci();
ek_add_device_lcdc();
- devfs_create_partitions("nand0", sama5d4ek_nand0_partitions);
+ devfs_create_partitions("nand0", sama5d4_xplained_nand0_partitions);
return 0;
}
-device_initcall(sama5d4ek_devices_init);
+device_initcall(sama5d4_xplained_devices_init);
-static int sama5d4ek_console_init(void)
+static int sama5d4_xplained_console_init(void)
{
- barebox_set_model("Atmel sama5d4ek");
- barebox_set_hostname("sama5d4ek");
+ barebox_set_model("Atmel sama5d4_xplained");
+ barebox_set_hostname("sama5d4_xplained");
at91_register_uart(4, 0);
return 0;
}
-console_initcall(sama5d4ek_console_init);
+console_initcall(sama5d4_xplained_console_init);
-static int sama5d4ek_main_clock(void)
+static int sama5d4_xplained_main_clock(void)
{
at91_set_main_clock(12000000);
return 0;
}
-pure_initcall(sama5d4ek_main_clock);
+pure_initcall(sama5d4_xplained_main_clock);
diff --git a/arch/arm/boards/sama5d4ek/sama5d4ek.c b/arch/arm/boards/sama5d4ek/sama5d4ek.c
index bbc53c6758..790a063266 100644
--- a/arch/arm/boards/sama5d4ek/sama5d4ek.c
+++ b/arch/arm/boards/sama5d4ek/sama5d4ek.c
@@ -1,5 +1,5 @@
/*
- * SAMA5D4EK board configureation.
+ * SAMA5D4EK board configuration.
*
* Copyright (C) 2014 Atmel Corporation,
* Bo Shen <voice.shen@atmel.com>
@@ -40,6 +40,7 @@ static struct atmel_nand_data nand_pdata = {
.rdy_pin = -EINVAL,
.enable_pin = -EINVAL,
.ecc_mode = NAND_ECC_HW,
+ .has_pmecc = 1,
.pmecc_sector_size = 512,
.pmecc_corr_cap = 8,
.on_flash_bbt = 1,
diff --git a/arch/arm/configs/haba_knx_lite_defconfig b/arch/arm/configs/haba_knx_lite_defconfig
new file mode 100644
index 0000000000..62d66bc5f2
--- /dev/null
+++ b/arch/arm/configs/haba_knx_lite_defconfig
@@ -0,0 +1,89 @@
+CONFIG_ARCH_AT91SAM9G20=y
+CONFIG_MACH_HABA_KNX_LITE=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_AEABI=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_PBL_IMAGE=y
+CONFIG_MMU=y
+CONFIG_TEXT_BASE=0x27f00000
+CONFIG_EXPERIMENTAL=y
+CONFIG_MALLOC_TLSF=y
+CONFIG_PROMPT="HABA-KNX-LITE:"
+CONFIG_GLOB=y
+CONFIG_PROMPT_HUSH_PS2="y"
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_CONSOLE_ACTIVATE_ALL=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/haba-knx/env"
+# CONFIG_CMD_ARM_CPUINFO is not set
+CONFIG_LONGHELP=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_GO=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_BAREBOX_UPDATE=y
+CONFIG_CMD_OFTREE=y
+CONFIG_NET=y
+CONFIG_NET_NFS=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_DRIVER_NET_MACB=y
+CONFIG_DRIVER_SPI_ATMEL=y
+CONFIG_I2C=y
+CONFIG_I2C_GPIO=y
+CONFIG_MTD=y
+# CONFIG_MTD_OOB_DEVICE is not set
+CONFIG_MTD_M25P80=y
+CONFIG_NAND=y
+# CONFIG_NAND_ECC_HW is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
+CONFIG_NAND_ATMEL=y
+CONFIG_MTD_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_SERIAL=y
+CONFIG_MCI=y
+# CONFIG_MCI_INFO is not set
+# CONFIG_MCI_WRITE is not set
+CONFIG_MCI_SPI=y
+CONFIG_MMC_SPI_CRC_ON=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_EEPROM_AT24=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+CONFIG_FS_UBIFS=y
+CONFIG_ZLIB=y
+CONFIG_LZO_DECOMPRESS=y
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index 09fe8d592a..e733ec4b81 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -1,6 +1,4 @@
/*
- * start-pbl.c
- *
* Copyright (c) 2009-2013 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
* See file CREDITS for list of people who contributed to this
diff --git a/arch/arm/cpu/setupc.S b/arch/arm/cpu/setupc.S
index 2df2683128..c232b08d3b 100644
--- a/arch/arm/cpu/setupc.S
+++ b/arch/arm/cpu/setupc.S
@@ -40,7 +40,7 @@ ENDPROC(setup_c)
/*
* void relocate_to_adr(unsigned long targetadr)
*
- * Copy binary to targetadr, relocate code, clear bss and continue
+ * Copy binary to targetadr, relocate code and continue
* executing at new address.
*/
.section .text.relocate_to_adr
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 418870fb69..304ed0cee7 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -1,6 +1,4 @@
/*
- * start-arm.c
- *
* Copyright (c) 2010 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
* See file CREDITS for list of people who contributed to this
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index f7166286c2..7b3db8ce48 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -5,7 +5,7 @@ endif
# just to build a built-in.o. Otherwise compilation fails when no devicetree is
# created.
-obj-y += empty.o
+obj- += dummy.o
pbl-dtb-$(CONFIG_MACH_AFI_GF) += am335x-afi-gf.dtb.o
pbl-dtb-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o
diff --git a/arch/arm/dts/am335x-phytec-phycore-som.dtsi b/arch/arm/dts/am335x-phytec-phycore-som.dtsi
index c34ae38271..7d0e3c5466 100644
--- a/arch/arm/dts/am335x-phytec-phycore-som.dtsi
+++ b/arch/arm/dts/am335x-phytec-phycore-som.dtsi
@@ -17,6 +17,13 @@
};
&am33xx_pinmux {
+ usb_pins: pinmux_usb_pins {
+ pinctrl-single,pins = <
+ 0x21c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
+ 0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
+ >;
+ };
+
i2c0_pins: pinmux_i2c0_pins {
pinctrl-single,pins = <
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
@@ -106,6 +113,29 @@
};
};
+&cppi41dma {
+ status = "okay";
+};
+
+&usb_ctrl_mod {
+ status = "okay";
+};
+
+&usb {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins>;
+ status = "okay";
+};
+
+&usb1 {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&usb1_phy {
+ status = "okay";
+};
+
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
diff --git a/arch/arm/dts/am335x-phytec-phyflex.dts b/arch/arm/dts/am335x-phytec-phyflex.dts
index 6c49567107..5459cd24db 100644
--- a/arch/arm/dts/am335x-phytec-phyflex.dts
+++ b/arch/arm/dts/am335x-phytec-phyflex.dts
@@ -39,6 +39,13 @@
};
&am33xx_pinmux {
+ usb_pins: pinmux_usb {
+ pinctrl-single,pins = <
+ 0x21c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
+ 0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
+ >;
+ };
+
i2c0_pins: pinmux_i2c0_pins {
pinctrl-single,pins = <
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda */
@@ -129,6 +136,30 @@
};
};
+&cppi41dma {
+ status = "okay";
+};
+
+
+&usb_ctrl_mod {
+ status = "okay";
+};
+
+&usb {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins>;
+ status = "okay";
+};
+
+&usb1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usb1_phy {
+ status = "okay";
+};
+
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
diff --git a/arch/arm/dts/empty.c b/arch/arm/dts/empty.c
deleted file mode 100644
index d141224cf8..0000000000
--- a/arch/arm/dts/empty.c
+++ /dev/null
@@ -1,3 +0,0 @@
-static inline void empty(void)
-{
-}
diff --git a/arch/arm/dts/imx6q-embedsky-e9.dts b/arch/arm/dts/imx6q-embedsky-e9.dts
index d8a606a1bb..53665cf9d5 100644
--- a/arch/arm/dts/imx6q-embedsky-e9.dts
+++ b/arch/arm/dts/imx6q-embedsky-e9.dts
@@ -19,9 +19,16 @@
chosen {
linux,stdout-path = &uart4;
- environment@0 {
+ environment-mmc1 {
compatible = "barebox,environment";
device-path = &usdhc2, "partname:barebox-environment";
+ status = "disabled";
+ };
+
+ environment-mmc3 {
+ compatible = "barebox,environment";
+ device-path = &usdhc4, "partname:barebox-environment";
+ status = "disabled";
};
};
@@ -40,3 +47,17 @@
reg = <0x80000 0x80000>;
};
};
+
+&usdhc4 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0x80000>;
+ };
+ partition@1 {
+ label = "barebox-environment";
+ reg = <0x80000 0x80000>;
+ };
+};
diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
index 32ce088fee..5ac0ef9431 100644
--- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
@@ -23,11 +23,29 @@
status = "disabled";
};
- environment-sd {
+ environment-sd1 {
+ compatible = "barebox,environment";
+ device-path = &usdhc1, "partname:barebox-environment";
+ status = "disabled";
+ };
+
+ environment-sd2 {
+ compatible = "barebox,environment";
+ device-path = &usdhc2, "partname:barebox-environment";
+ status = "disabled";
+ };
+
+ environment-sd3 {
compatible = "barebox,environment";
device-path = &usdhc3, "partname:barebox-environment";
status = "disabled";
};
+
+ environment-sd4 {
+ compatible = "barebox,environment";
+ device-path = &usdhc4, "partname:barebox-environment";
+ status = "disabled";
+ };
};
};
@@ -48,14 +66,23 @@
partition@0 {
label = "barebox";
- reg = <0x0 0x80000>;
+ reg = <0x0 0x100000>;
};
partition@1 {
label = "barebox-environment";
- reg = <0x80000 0x10000>;
+ reg = <0x100000 0x20000>;
};
+ partition@2 {
+ label = "oftree";
+ reg = <0x120000 0x20000>;
+ };
+
+ partition@3 {
+ label = "kernel";
+ reg = <0x140000 0x0>;
+ };
};
};
@@ -95,22 +122,22 @@
partition@1 {
label = "barebox-environment";
- reg = <0x400000 0x20000>;
+ reg = <0x400000 0x100000>;
};
partition@2 {
label = "oftree";
- reg = <0x420000 0x20000>;
+ reg = <0x500000 0x100000>;
};
partition@3 {
label = "kernel";
- reg = <0x440000 0x800000>;
+ reg = <0x600000 0x800000>;
};
partition@4 {
label = "root";
- reg = <0xC40000 0x0>;
+ reg = <0xe00000 0x0>;
};
};
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 9ad07cb77a..dbc8aaaba7 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -29,6 +29,8 @@
#include <asm-generic/memory_layout.h>
#include <linux/kernel.h>
#include <linux/types.h>
+#include <linux/compiler.h>
+#include <asm/barebox-arm-head.h>
/* cpu/.../cpu.c */
int cleanup_before_linux(void);
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 9ee4f303b8..b85e6fa356 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -352,6 +352,11 @@ config MACH_QIL_A9G20
Select this if you are using a Calao Systems QIL-A9G20 Board.
<http://www.calao-systems.com>
+config MACH_HABA_KNX_LITE
+ bool "CALAO HABA-KNX-LITE"
+ help
+ Select this if you are using a Calao Systems HABA-KNX-LITE.
+ <http://www.calao-systems.com>
endchoice
endif
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 9ac36e1453..477207e646 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -119,6 +119,7 @@ config BAREBOX_UPDATE_IMX6_NAND
depends on BAREBOX_UPDATE
depends on MTD
depends on MTD_WRITE
+ depends on NAND_MXS
default y
comment "Freescale i.MX System-on-Chip"
diff --git a/arch/arm/mach-imx/clk-imx5.c b/arch/arm/mach-imx/clk-imx5.c
index 2ae8d6aa3a..ea805b0f64 100644
--- a/arch/arm/mach-imx/clk-imx5.c
+++ b/arch/arm/mach-imx/clk-imx5.c
@@ -372,6 +372,7 @@ int __init mx53_clocks_init(void __iomem *regs, unsigned long rate_ckil, unsigne
clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART2_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART3_BASE_ADDR, NULL);
+ clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART4_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX53_I2C1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX53_I2C2_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX53_I2C3_BASE_ADDR, NULL);
diff --git a/arch/arm/mach-imx/imx6-bbu-nand.c b/arch/arm/mach-imx/imx6-bbu-nand.c
index 1b46e514e9..d2bfedbad5 100644
--- a/arch/arm/mach-imx/imx6-bbu-nand.c
+++ b/arch/arm/mach-imx/imx6-bbu-nand.c
@@ -30,6 +30,7 @@
#include <fs.h>
#include <mach/bbu.h>
#include <linux/mtd/mtd-abi.h>
+#include <linux/mtd/nand_mxs.h>
#include <linux/mtd/mtd.h>
#include <linux/stat.h>
@@ -235,22 +236,9 @@ static int fcb_create(struct fcb_block *fcb, struct mtd_info *mtd)
fcb->TotalPageSize = mtd->writesize + mtd->oobsize;
fcb->SectorsPerBlock = mtd->erasesize / mtd->writesize;
- if (mtd->writesize == 2048) {
- fcb->EccBlock0EccType = 4;
- } else if (mtd->writesize == 4096) {
- if (mtd->oobsize == 218) {
- fcb->EccBlock0EccType = 8;
- } else if (mtd->oobsize == 128) {
- fcb->EccBlock0EccType = 4;
- } else {
- pr_err("Illegal oobsize %d\n", mtd->oobsize);
- return -EINVAL;
- }
- } else {
- pr_err("Illegal writesize %d\n", mtd->writesize);
- return -EINVAL;
- }
-
+ /* Divide ECC strength by two and save the value into FCB structure. */
+ fcb->EccBlock0EccType =
+ mxs_nand_get_ecc_strength(mtd->writesize, mtd->oobsize) >> 1;
fcb->EccBlockNEccType = fcb->EccBlock0EccType;
/* Also hardcoded in kobs-ng */
@@ -267,12 +255,8 @@ static int fcb_create(struct fcb_block *fcb, struct mtd_info *mtd)
/* DBBT search area starts at third block */
fcb->DBBTSearchAreaStartAddress = mtd->erasesize / mtd->writesize * 2;
- if (mtd->writesize == 2048) {
- fcb->BadBlockMarkerByte = 0x000007cf;
- } else {
- pr_err("BadBlockMarkerByte unknown for writesize %d\n", mtd->writesize);
- return -EINVAL;
- }
+ fcb->BadBlockMarkerByte = mxs_nand_mark_byte_offset(mtd);
+ fcb->BadBlockMarkerStartBit = mxs_nand_mark_bit_offset(mtd);
fcb->BBMarkerPhysicalOffset = mtd->writesize;
@@ -437,6 +421,16 @@ static int imx6_bbu_nand_update(struct bbu_handler *handler, struct bbu_data *da
fcb_create(fcb, mtd);
encode_hamming_13_8(fcb, ecc, 512);
+
+ /*
+ * Set the first and second byte of OOB data to 0xFF, not 0x00. These
+ * bytes are used as the Manufacturers Bad Block Marker (MBBM). Since
+ * the FCB is mostly written to the first page in a block, a scan for
+ * factory bad blocks will detect these blocks as bad, e.g. when
+ * function nand_scan_bbt() is executed to build a new bad block table.
+ */
+ memset(fcb_raw_page + mtd->writesize, 0xFF, 2);
+
ret = raw_write_page(mtd, fcb_raw_page, 0);
if (ret)
goto out;
diff --git a/arch/arm/mach-imx/include/mach/devices-imx53.h b/arch/arm/mach-imx/include/mach/devices-imx53.h
index 88be4fdbc8..10caae8c93 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx53.h
+++ b/arch/arm/mach-imx/include/mach/devices-imx53.h
@@ -47,6 +47,11 @@ static inline struct device_d *imx53_add_uart2(void)
return imx_add_uart_imx21((void *)MX53_UART3_BASE_ADDR, 2);
}
+static inline struct device_d *imx53_add_uart3(void)
+{
+ return imx_add_uart_imx21((void *)MX53_UART4_BASE_ADDR, 3);
+}
+
static inline struct device_d *imx53_add_fec(struct fec_platform_data *pdata)
{
return imx_add_fec_imx27((void *)MX53_FEC_BASE_ADDR, pdata);
diff --git a/arch/blackfin/boards/ipe337/barebox.lds.S b/arch/blackfin/boards/ipe337/barebox.lds.S
index 21a91eeb0a..9bb7cc4953 100644
--- a/arch/blackfin/boards/ipe337/barebox.lds.S
+++ b/arch/blackfin/boards/ipe337/barebox.lds.S
@@ -68,9 +68,9 @@ SECTIONS
.barebox_cmd : { BAREBOX_CMDS }
___barebox_cmd_end = .;
- __barebox_magicvar_start = .;
+ ___barebox_magicvar_start = .;
.barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
+ ___barebox_magicvar_end = .;
___barebox_initcalls_start = .;
.barebox_initcalls : { INITCALLS }
diff --git a/arch/blackfin/include/asm/linkage.h b/arch/blackfin/include/asm/linkage.h
index 0f547271f8..f7d6d47a04 100644
--- a/arch/blackfin/include/asm/linkage.h
+++ b/arch/blackfin/include/asm/linkage.h
@@ -1,54 +1,13 @@
/*
- * barebox - linkage.h
- *
- * Copyright (c) 2005 blackfin.uclinux.org
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Copyright 2004-2009 Analog Devices Inc.
*
+ * Licensed under the GPL-2 or later.
*/
-#ifndef _LINUX_LINKAGE_H
-#define _LINUX_LINKAGE_H
-
-#ifdef __cplusplus
-#define CPP_ASMLINKAGE extern "C"
-#else
-#define CPP_ASMLINKAGE
-#endif
-
-#define asmlinkage CPP_ASMLINKAGE
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
-#define SYMBOL_NAME_STR(X) #X
-#define SYMBOL_NAME(X) X
-#ifdef __STDC__
-#define SYMBOL_NAME_LABEL(X) X##:
-#else
-#define SYMBOL_NAME_LABEL(X) X:
-#endif
-
-#define __ALIGN .align 4
-#define __ALIGN_STR ".align 4"
-
-#ifdef __ASSEMBLY__
-
-#define ALIGN __ALIGN
-#define ALIGN_STR __ALIGN_STR
-
-#define ENTRY(name) \
- .globl SYMBOL_NAME(name); \
- ALIGN; \
- SYMBOL_NAME_LABEL(name)
-#endif
+#define __ALIGN .align 4
+#define __ALIGN_STR ".align 4"
#endif
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h
index 581fd42397..f11dd4ebf1 100644
--- a/arch/blackfin/include/asm/system.h
+++ b/arch/blackfin/include/asm/system.h
@@ -21,7 +21,7 @@
#ifndef _BLACKFIN_SYSTEM_H
#define _BLACKFIN_SYSTEM_H
-#include <asm/linkage.h>
+#include <linux/linkage.h>
#include <asm/blackfin.h>
#include <asm/segment.h>
#include <asm/entry.h>
diff --git a/arch/blackfin/lib/flush.S b/arch/blackfin/lib/flush.S
index 62aa496986..4ee5d870ac 100644
--- a/arch/blackfin/lib/flush.S
+++ b/arch/blackfin/lib/flush.S
@@ -8,7 +8,7 @@
*/
#define ASSEMBLY
-#include <asm/linkage.h>
+#include <linux/linkage.h>
#include <asm/cplb.h>
#include <asm/blackfin.h>
diff --git a/arch/efi/Makefile b/arch/efi/Makefile
index 85cb655615..b078bd0e35 100644
--- a/arch/efi/Makefile
+++ b/arch/efi/Makefile
@@ -1,3 +1,5 @@
+KBUILD_DEFCONFIG := efi_defconfig
+
CFLAGS += -fpic -fshort-wchar -mno-sse -mno-mmx
ifeq ($(CONFIG_X86_32),y)
diff --git a/arch/nios2/cpu/.gitignore b/arch/nios2/cpu/.gitignore
new file mode 100644
index 0000000000..d1165788c9
--- /dev/null
+++ b/arch/nios2/cpu/.gitignore
@@ -0,0 +1 @@
+barebox.lds
diff --git a/arch/ppc/lib/crtsavres.S b/arch/ppc/lib/crtsavres.S
index a764ae4ce6..b0fbbfc997 100644
--- a/arch/ppc/lib/crtsavres.S
+++ b/arch/ppc/lib/crtsavres.S
@@ -33,13 +33,11 @@
* the executable file might be covered by the GNU General Public License.
*/
+#include <linux/stringify.h>
#include <asm/ppc_asm.tmpl>
#define N_FUN 36
-#define __stringify_1(x...) #x
-#define __stringify(x...) __stringify_1(x)
-
#define _GLOBAL(n) \
.text; \
.stabs __stringify(n:F-1),N_FUN,0,0,n;\
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index ed5d3a3dab..e3fb039554 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -1,3 +1,4 @@
+KBUILD_DEFCONFIG := sandbox_defconfig
CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index 2e65be5eed..537f848e06 100644
--- a/arch/sandbox/os/Makefile
+++ b/arch/sandbox/os/Makefile
@@ -8,6 +8,8 @@ else
CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs))
endif
+CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE)
+
CFLAGS := -Wall
NOSTDINC_FLAGS :=
diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c
index 412393811e..0854fb5d80 100644
--- a/arch/sandbox/os/common.c
+++ b/arch/sandbox/os/common.c
@@ -285,7 +285,7 @@ int main(int argc, char *argv[])
{
void *ram;
int opt, ret, fd;
- int malloc_size = 8 * 1024 * 1024;
+ int malloc_size = CONFIG_MALLOC_SIZE;
char str[6];
int fdno = 0, envno = 0, option_index = 0;
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index a78fa22ac6..da17d70bdc 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -1,3 +1,5 @@
+KBUILD_DEFCONFIG := generic_defconfig
+
CPPFLAGS += -D__X86__ -fno-strict-aliasing
board-y := x86_generic
diff --git a/commands/Kconfig b/commands/Kconfig
index 509e93512d..e4f68e7bda 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2018,7 +2018,7 @@ config CMD_OF_PROPERTY
Valid formats for values:
<0x00112233 4 05> - an array of cells. cells not beginning with a digit are
- interpreted as node pathes and converted to phandles
+ interpreted as node paths and converted to phandles
[00 11 22 .. nn] - byte stream
If the value does not start with '<' or '[' it is interpreted as string
diff --git a/commands/crc.c b/commands/crc.c
index 9b6a3e2a4b..58b750eb95 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -46,9 +46,10 @@ static int do_crc(int argc, char *argv[])
#ifdef CONFIG_CMD_CRC_CMP
char *vfilename = NULL;
#endif
+ char *crcvarname = NULL, *sizevarname = NULL;
int opt, err = 0, filegiven = 0, verify = 0;
- while((opt = getopt(argc, argv, "f:F:v:V:")) > 0) {
+ while((opt = getopt(argc, argv, "f:F:v:V:r:s:")) > 0) {
switch(opt) {
case 'f':
filename = optarg;
@@ -60,6 +61,12 @@ static int do_crc(int argc, char *argv[])
vfilename = optarg;
break;
#endif
+ case 'r':
+ crcvarname = optarg;
+ break;
+ case 's':
+ sizevarname = optarg;
+ break;
case 'v':
verify = 1;
vcrc = simple_strtoul(optarg, NULL, 0);
@@ -89,6 +96,18 @@ static int do_crc(int argc, char *argv[])
printf("CRC32 for %s 0x%08lx ... 0x%08lx ==> 0x%08lx",
filename, (ulong)start, (ulong)start + total - 1, crc);
+ if (crcvarname) {
+ char *crcstr = asprintf("0x%lx", crc);
+ setenv(crcvarname, crcstr);
+ kfree(crcstr);
+ }
+
+ if (sizevarname) {
+ char *sizestr = asprintf("0x%lx", total);
+ setenv(sizevarname, sizestr);
+ kfree(sizestr);
+ }
+
#ifdef CONFIG_CMD_CRC_CMP
if (vfilename) {
size = total;
@@ -118,6 +137,8 @@ BAREBOX_CMD_HELP_OPT ("-F FILE", "Use file to compare.")
#endif
BAREBOX_CMD_HELP_OPT ("-v CRC", "Verify")
BAREBOX_CMD_HELP_OPT ("-V FILE", "Verify with CRC read from FILE")
+BAREBOX_CMD_HELP_OPT ("-r <var>", "Set <var> to the checksum result\n")
+BAREBOX_CMD_HELP_OPT ("-s <var>", "Set <var> to the data size\n")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(crc32)
diff --git a/commands/loadenv.c b/commands/loadenv.c
index 91ce5e707c..8d6be2fa83 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -109,7 +109,7 @@ static int do_loadenv(int argc, char *argv[])
BAREBOX_CMD_HELP_START(loadenv)
BAREBOX_CMD_HELP_TEXT("Load environment from files in ENVFS (default /dev/env0) in")
-BAREBOX_CMD_HELP_TEXT("DIRECTORY (default /env")
+BAREBOX_CMD_HELP_TEXT("DIRECTORY (default /env)")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-n", "do not overwrite existing files")
@@ -120,7 +120,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(loadenv)
.cmd = do_loadenv,
BAREBOX_CMD_DESC("load environment from ENVFS")
- BAREBOX_CMD_OPTS("{-nsd] [ENVFS] [DIRECTORY]")
+ BAREBOX_CMD_OPTS("[-nsd] [ENVFS] [DIRECTORY]")
BAREBOX_CMD_GROUP(CMD_GRP_ENV)
BAREBOX_CMD_HELP(cmd_loadenv_help)
BAREBOX_CMD_END
diff --git a/commands/memtest.c b/commands/memtest.c
index d384436afb..9dec0efcba 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -60,8 +60,7 @@ static int request_memtest_regions(struct list_head *list)
*/
if (list_empty(&bank->res->children)) {
start = PAGE_ALIGN(bank->res->start);
- end = PAGE_ALIGN_DOWN(bank->res->end) - 1;
- size = end - start + 1;
+ size = PAGE_ALIGN_DOWN(bank->res->end - start + 1);
ret = alloc_memtest_region(list, start, size);
if (ret < 0)
@@ -89,13 +88,13 @@ static int request_memtest_regions(struct list_head *list)
* Between used regions. Start from second entry.
*/
list_for_each_entry_from(r, &bank->res->children, sibling) {
- start = PAGE_ALIGN(r_prev->end);
- end = PAGE_ALIGN_DOWN(r->start);
+ start = PAGE_ALIGN(r_prev->end + 1);
+ end = r->start - 1;
r_prev = r;
if (start >= end)
continue;
- size = end - start;
+ size = PAGE_ALIGN_DOWN(end - start + 1);
ret = alloc_memtest_region(list, start, size);
if (ret < 0)
return ret;
@@ -107,9 +106,9 @@ static int request_memtest_regions(struct list_head *list)
r = list_last_entry(&bank->res->children,
struct resource, sibling);
start = PAGE_ALIGN(r->end);
- end = PAGE_ALIGN_DOWN(bank->res->end) - 1;
- size = end - start + 1;
- if (start < end) {
+ end = bank->res->end;
+ size = PAGE_ALIGN_DOWN(end - start + 1);
+ if (start < end && start > r->end) {
ret = alloc_memtest_region(list, start, size);
if (ret < 0)
return ret;
diff --git a/commands/of_property.c b/commands/of_property.c
index e0154fc394..ae6bfd4211 100644
--- a/commands/of_property.c
+++ b/commands/of_property.c
@@ -308,7 +308,7 @@ BAREBOX_CMD_HELP_OPT ("-d", "delete property")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Valid formats for values:")
BAREBOX_CMD_HELP_TEXT("<0x00112233 4 05> - an array of cells. cells not beginning with a digit are")
-BAREBOX_CMD_HELP_TEXT(" interpreted as node pathes and converted to phandles")
+BAREBOX_CMD_HELP_TEXT(" interpreted as node paths and converted to phandles")
BAREBOX_CMD_HELP_TEXT("[00 11 22 .. nn] - byte stream")
BAREBOX_CMD_HELP_TEXT("If the value does not start with '<' or '[' it is interpreted as string")
BAREBOX_CMD_HELP_END
diff --git a/commands/splash.c b/commands/splash.c
index 9bd84fbb2b..077c0e4b03 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -41,6 +41,7 @@ static int do_splash(int argc, char *argv[])
break;
case 'y':
s.y = simple_strtoul(optarg, NULL, 0);
+ break;
case 'o':
offscreen = 1;
}
diff --git a/common/Kconfig b/common/Kconfig
index 00e4f36d62..d4373431aa 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -674,9 +674,9 @@ config DEFAULT_ENVIRONMENT_PATH
depends on DEFAULT_ENVIRONMENT
prompt "Default environment path"
help
- Space separated list of pathes the default environment will be taken from.
- Relative pathes will be relative to the barebox Toplevel dir, but absolute
- pathes are fine aswell.
+ Space separated list of paths the default environment will be taken from.
+ Relative paths will be relative to the barebox Toplevel dir, but absolute
+ paths are fine aswell.
config BAREBOXENV_TARGET
bool
diff --git a/common/console.c b/common/console.c
index c092621aa1..0c32f06b93 100644
--- a/common/console.c
+++ b/common/console.c
@@ -194,7 +194,7 @@ int console_register(struct console_device *newcdev)
console_init_early();
if (newcdev->devname) {
- dev->id = DEVICE_ID_SINGLE;
+ dev->id = newcdev->devid;
strcpy(dev->name, newcdev->devname);
} else {
dev->id = DEVICE_ID_DYNAMIC;
diff --git a/common/hush.c b/common/hush.c
index b23b3f6633..ffd251339e 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -2020,7 +2020,7 @@ BAREBOX_CMD_START(getopt)
BAREBOX_CMD_END
#endif
-BAREBOX_MAGICVAR(PATH, "colon separated list of pathes to search for executables");
+BAREBOX_MAGICVAR(PATH, "colon separated list of paths to search for executables");
#ifdef CONFIG_HUSH_FANCY_PROMPT
BAREBOX_MAGICVAR(PS1, "hush prompt");
#endif
diff --git a/defaultenv/.gitignore b/defaultenv/.gitignore
new file mode 100644
index 0000000000..40e90d7f57
--- /dev/null
+++ b/defaultenv/.gitignore
@@ -0,0 +1 @@
+barebox_default_env*
diff --git a/defaultenv/Makefile b/defaultenv/Makefile
index fc679ebc9c..33e0eceef9 100644
--- a/defaultenv/Makefile
+++ b/defaultenv/Makefile
@@ -3,7 +3,7 @@ bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1
obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o
-extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX)
+extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) barebox_zero_env
$(obj)/defaultenv.o: $(obj)/barebox_default_env.h
@@ -22,3 +22,9 @@ cmd_env_h = cat $< | (cd $(obj) && $(objtree)/scripts/bin2c "__aligned(4) defaul
$(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) FORCE
$(call if_changed,env_h)
+
+quiet_cmd_env_zero = ENVZ $@
+cmd_env_zero = ($(objtree)/scripts/bareboxenv -z $(CONFIG_DEFAULT_ENVIRONMENT_PATH) $@)
+
+$(obj)/barebox_zero_env: FORCE
+ $(call cmd,env_zero)
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 239cd375fa..23bdc1fb15 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -471,6 +471,9 @@ static int esdhc_init(struct mci_host *mci, struct device_d *dev)
esdhc_write32(regs + SDHCI_CLOCK_CONTROL__TIMEOUT_CONTROL__SOFTWARE_RESET,
SYSCTL_HCKEN | SYSCTL_IPGEN);
+ /* RSTA doesn't reset MMC_BOOT register, so manually reset it */
+ esdhc_write32(regs + SDHCI_MMC_BOOT, 0);
+
/* Set the initial clock speed */
set_sysctl(mci, 400000);
diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h
index b67818485b..82a692e732 100644
--- a/drivers/mci/sdhci.h
+++ b/drivers/mci/sdhci.h
@@ -18,6 +18,7 @@
#define SDHCI_SIGNAL_ENABLE 0x38
#define SDHCI_ACMD12_ERR__HOST_CONTROL2 0x3C
#define SDHCI_CAPABILITIES 0x40
+#define SDHCI_MMC_BOOT 0xC4
#define COMMAND_CMD(x) ((x & 0x3f) << 24)
#define COMMAND_CMDTYP_NORMAL 0x0
diff --git a/drivers/mtd/nand/nand_imx_bbm.c b/drivers/mtd/nand/nand_imx_bbm.c
index f419759b18..5caa0a26c3 100644
--- a/drivers/mtd/nand/nand_imx_bbm.c
+++ b/drivers/mtd/nand/nand_imx_bbm.c
@@ -43,7 +43,7 @@
* To preserve the factory bad block information we take the following
* strategy:
*
- * - If the NAND driver detects that no flasg BBT is present on 2k NAND
+ * - If the NAND driver detects that no flash BBT is present on 2k NAND
* chips it will not create one because it would do so based on the wrong
* BBM position
* - This command is used to create a flash BBT then.
diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
index 94101a3d98..4e38e09186 100644
--- a/drivers/mtd/nand/nand_mxs.c
+++ b/drivers/mtd/nand/nand_mxs.c
@@ -20,6 +20,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/nand_mxs.h>
#include <linux/types.h>
#include <linux/clk.h>
#include <linux/err.h>
@@ -231,7 +232,7 @@ static uint32_t mxs_nand_aux_status_offset(void)
return (MXS_NAND_METADATA_SIZE + 0x3) & ~0x3;
}
-static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
+uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
uint32_t page_oob_size)
{
int ecc_chunk_count = mxs_nand_ecc_chunk_cnt(page_data_size);
@@ -294,14 +295,14 @@ static inline uint32_t mxs_nand_get_mark_offset(uint32_t page_data_size,
return block_mark_bit_offset;
}
-static uint32_t mxs_nand_mark_byte_offset(struct mtd_info *mtd)
+uint32_t mxs_nand_mark_byte_offset(struct mtd_info *mtd)
{
uint32_t ecc_strength;
ecc_strength = mxs_nand_get_ecc_strength(mtd->writesize, mtd->oobsize);
return mxs_nand_get_mark_offset(mtd->writesize, ecc_strength) >> 3;
}
-static uint32_t mxs_nand_mark_bit_offset(struct mtd_info *mtd)
+uint32_t mxs_nand_mark_bit_offset(struct mtd_info *mtd)
{
uint32_t ecc_strength;
ecc_strength = mxs_nand_get_ecc_strength(mtd->writesize, mtd->oobsize);
diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 6a2d634dcf..f0fd917ada 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -113,7 +113,7 @@ out:
* @outpath: if this function returns 0 outpath will contain the path belonging
* to the input path description. Must be freed with free().
*
- * pathes in the devicetree have the form of a multistring property. The first
+ * paths in the devicetree have the form of a multistring property. The first
* string contains the full path to the physical device containing the path.
* The remaining strings have the form "<type>:<options>". Currently supported
* for <type> are:
diff --git a/drivers/pinctrl/pinctrl.c b/drivers/pinctrl/pinctrl.c
index d6479b9cd5..10ce186a12 100644
--- a/drivers/pinctrl/pinctrl.c
+++ b/drivers/pinctrl/pinctrl.c
@@ -62,9 +62,6 @@ int of_pinctrl_select_state(struct device_node *np, const char *name)
struct device_node *np_config;
const char *statename;
- if (!IS_ENABLED(CONFIG_PINCTRL))
- return -ENOSYS;
-
if (!of_find_property(np, "pinctrl-0", NULL))
return 0;
diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index 21189cbbf8..cd954c282d 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -340,8 +340,10 @@ static int imx_serial_probe(struct device_d *dev)
cdev->linux_console_name = "ttymxc";
if (dev->device_node) {
devname = of_alias_get(dev->device_node);
- if (devname)
+ if (devname) {
cdev->devname = xstrdup(devname);
+ cdev->devid = DEVICE_ID_SINGLE;
+ }
}
imx_serial_init_port(cdev);
diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index 3146339949..a1f19eba8b 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -137,6 +137,25 @@ static int imx_spi_setup(struct spi_device *spi)
return 0;
}
+static unsigned int imx_spi_maybe_reverse_bits(struct spi_device *spi, unsigned int word)
+{
+ unsigned int result = word;
+
+ if (spi->mode & SPI_LSB_FIRST) {
+ size_t bits_left = spi->bits_per_word - 1;
+
+ for (word >>= 1; word; word >>= 1) {
+ result <<= 1;
+ result |= word & 1;
+ bits_left--;
+ }
+
+ result <<= bits_left;
+ }
+
+ return result;
+}
+
static unsigned int cspi_0_0_xchg_single(struct imx_spi *imx, unsigned int data)
{
void __iomem *base = imx->regs;
@@ -382,9 +401,20 @@ static void cspi_2_3_chipselect(struct spi_device *spi, int is_active)
gpio_set_value(gpio, gpio_cs);
}
-static void imx_spi_do_transfer(struct spi_device *spi, struct spi_transfer *t)
+static u32 imx_xchg_single(struct spi_device *spi, u32 tx_val)
{
+ u32 rx_val;
struct imx_spi *imx = container_of(spi->master, struct imx_spi, master);
+
+
+ tx_val = imx_spi_maybe_reverse_bits(spi, tx_val);
+ rx_val = imx->xchg_single(imx, tx_val);
+
+ return imx_spi_maybe_reverse_bits(spi, rx_val);
+}
+
+static void imx_spi_do_transfer(struct spi_device *spi, struct spi_transfer *t)
+{
unsigned i;
if (spi->bits_per_word <= 8) {
@@ -393,7 +423,8 @@ static void imx_spi_do_transfer(struct spi_device *spi, struct spi_transfer *t)
u8 rx_val;
for (i = 0; i < t->len; i++) {
- rx_val = imx->xchg_single(imx, tx_buf ? tx_buf[i] : 0);
+ rx_val = imx_xchg_single(spi, tx_buf ? tx_buf[i] : 0);
+
if (rx_buf)
rx_buf[i] = rx_val;
}
@@ -403,7 +434,8 @@ static void imx_spi_do_transfer(struct spi_device *spi, struct spi_transfer *t)
u16 rx_val;
for (i = 0; i < t->len >> 1; i++) {
- rx_val = imx->xchg_single(imx, tx_buf ? tx_buf[i] : 0);
+ rx_val = imx_xchg_single(spi, tx_buf ? tx_buf[i] : 0);
+
if (rx_buf)
rx_buf[i] = rx_val;
}
@@ -413,7 +445,8 @@ static void imx_spi_do_transfer(struct spi_device *spi, struct spi_transfer *t)
u32 rx_val;
for (i = 0; i < t->len >> 2; i++) {
- rx_val = imx->xchg_single(imx, tx_buf ? tx_buf[i] : 0);
+ rx_val = imx_xchg_single(spi, tx_buf ? tx_buf[i] : 0);
+
if (rx_buf)
rx_buf[i] = rx_val;
}
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index d42b47cbe0..dd3c10e825 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -122,7 +122,7 @@ int hub_port_reset(struct usb_device *dev, int port,
for (tries = 0; tries < MAX_TRIES; tries++) {
usb_set_port_feature(dev, port + 1, USB_PORT_FEAT_RESET);
- wait_ms(200);
+ mdelay(200);
if (usb_get_port_status(dev, port + 1, &portsts) < 0) {
dev_dbg(&dev->dev, "get_port_status failed status %lX\n",
@@ -149,7 +149,7 @@ int hub_port_reset(struct usb_device *dev, int port,
if (portstatus & USB_PORT_STAT_ENABLE)
break;
- wait_ms(200);
+ mdelay(200);
}
if (tries == MAX_TRIES) {
@@ -196,7 +196,7 @@ static void usb_hub_port_connect_change(struct usb_device *dev, int port)
if (dev->children[port] && !(portstatus & USB_PORT_STAT_ENABLE))
usb_remove_device(dev->children[port]);
- wait_ms(200);
+ mdelay(200);
/* Reset the port */
if (hub_port_reset(dev, port, &portstatus) < 0) {
@@ -204,7 +204,7 @@ static void usb_hub_port_connect_change(struct usb_device *dev, int port)
return;
}
- wait_ms(200);
+ mdelay(200);
/* Allocate a new device struct for it */
usb = usb_alloc_new_device();
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 3f3d59577c..d1c3e0394d 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -372,7 +372,7 @@ int usb_new_device(struct usb_device *dev)
goto err_out;
}
- wait_ms(10); /* Let the SET_ADDRESS settle */
+ mdelay(10); /* Let the SET_ADDRESS settle */
tmp = sizeof(*dev->descriptor);
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 60e1ff79d3..b36ef19c8a 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1464,6 +1464,8 @@ static int __init at91udc_probe(struct device_d *dev)
DBG(udc, "VBUS detection: host:%s \n",
udc->vbus ? "present":"absent");
+ udc->gpio_vbus_val = udc->vbus;
+
dev_add_param_bool(dev, "vbus",
at91_udc_vbus_set, NULL, &udc->gpio_vbus_val, udc);
} else {
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 8c58746cbd..1e5e8093c0 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -530,6 +530,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
cdev->flush = serial_flush;
cdev->setbrg = serial_setbaudrate;
cdev->devname = "usbserial";
+ cdev->devid = DEVICE_ID_SINGLE;
status = console_register(cdev);
if (status)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 133561659c..7b913270be 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -646,7 +646,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
* root
*/
ehci_powerup_fixup(ehci);
- wait_ms(50);
+ mdelay(50);
ehci->portreset |= 1 << le16_to_cpu(req->index);
/* terminate the reset */
ehci_writel(status_reg, reg & ~EHCI_PS_PR);
@@ -709,7 +709,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
goto unknown;
}
- wait_ms(1);
+ mdelay(1);
len = min3(srclen, (int)le16_to_cpu(req->length), length);
if (srcptr != NULL && len > 0)
memcpy(buffer, srcptr, len);
@@ -804,7 +804,7 @@ static int ehci_init(struct usb_host *host)
ehci_writel(&ehci->hcor->or_configflag, cmd);
/* unblock posted write */
cmd = ehci_readl(&ehci->hcor->or_usbcmd);
- wait_ms(5);
+ mdelay(5);
ehci->rootdev = 0;
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 1cceeccf8a..ac1fe79418 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -133,7 +133,7 @@ int usb_stor_Bulk_transport(ccb *srb, struct us_data *us)
/* DATA STAGE */
/* send/receive data payload, if there is any */
- wait_ms(1);
+ mdelay(1);
data_actlen = 0;
if (srb->datalen) {
@@ -229,17 +229,17 @@ int usb_stor_Bulk_reset(struct us_data *us)
US_DEBUGP("Soft reset stalled: %d\n", result);
return result;
}
- wait_ms(150);
+ mdelay(150);
/* clear the bulk endpoints halt */
US_DEBUGP("Soft reset: clearing %s endpoint halt\n", "bulk-in");
pipe = usb_rcvbulkpipe(us->pusb_dev, us->recv_bulk_ep);
result = usb_clear_halt(us->pusb_dev, pipe);
- wait_ms(150);
+ mdelay(150);
US_DEBUGP("Soft reset: clearing %s endpoint halt\n", "bulk-out");
pipe = usb_sndbulkpipe(us->pusb_dev, us->send_bulk_ep);
result2 = usb_clear_halt(us->pusb_dev, pipe);
- wait_ms(150);
+ mdelay(150);
if (result >= 0)
result = result2;
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 5149761a83..9d1ffa3070 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -101,7 +101,7 @@ static int usb_stor_test_unit_ready(ccb *srb, struct us_data *us)
if (result == USB_STOR_TRANSPORT_GOOD)
return 0;
usb_stor_request_sense(srb, us);
- wait_ms(100);
+ mdelay(100);
} while (retries--);
return -1;
diff --git a/fs/parseopt.c b/fs/parseopt.c
index fbe53cfb02..12dbe1813c 100644
--- a/fs/parseopt.c
+++ b/fs/parseopt.c
@@ -26,7 +26,7 @@ again:
}
v = simple_strtoul(start + optlen + 1, &endp, 0);
- if (v > USHORT_MAX)
+ if (v > USHRT_MAX)
return;
if (*endp == ',' || *endp == '\0')
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index b4a9d76b09..c025d34825 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -318,10 +318,6 @@ struct file {
#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
#endif
-#define INT_MAX ((int)(~0U>>1))
-#define INT_MIN (-INT_MAX - 1)
-#define LLONG_MAX ((long long)(~0ULL>>1))
-
/*
* These are the fs-independent mount-flags: up to 32 flags are supported
*/
diff --git a/images/Makefile.imx b/images/Makefile.imx
index fd7f7256e5..eacc76eaa2 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -105,6 +105,11 @@ CFG_start_phytec_pbab01_1gib.pblx.imximg = $(board)/phytec-phyflex-imx6/flash-he
FILE_barebox-phytec-pbab01-1gib.img = start_phytec_pbab01_1gib.pblx.imximg
image-$(CONFIG_MACH_PHYTEC_PFLA02) += barebox-phytec-pbab01-1gib.img
+pblx-$(CONFIG_MACH_PHYTEC_PFLA02) += start_phytec_pbab01_1gib_1bank
+CFG_start_phytec_pbab01_1gib_1bank.pblx.imximg = $(board)/phytec-phyflex-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
+FILE_barebox-phytec-pbab01-1gib-1bank.img = start_phytec_pbab01_1gib_1bank.pblx.imximg
+image-$(CONFIG_MACH_PHYTEC_PFLA02) += barebox-phytec-pbab01-1gib-1bank.img
+
pblx-$(CONFIG_MACH_PHYTEC_PFLA02) += start_phytec_pbab01dl_1gib
CFG_start_phytec_pbab01dl_1gib.pblx.imximg = $(board)/phytec-phyflex-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg
FILE_barebox-phytec-pbab01dl-1gib.img = start_phytec_pbab01dl_1gib.pblx.imximg
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
new file mode 100644
index 0000000000..8583d2425f
--- /dev/null
+++ b/include/asm-generic/bug.h
@@ -0,0 +1,37 @@
+#ifndef _ASM_GENERIC_BUG_H
+#define _ASM_GENERIC_BUG_H
+
+#include <linux/compiler.h>
+
+#define BUG() do { \
+ printf("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
+ panic("BUG!"); \
+} while (0)
+#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
+
+
+#define __WARN() do { \
+ printf("WARNING: at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
+} while (0)
+
+#ifndef WARN_ON
+#define WARN_ON(condition) ({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) \
+ __WARN(); \
+ unlikely(__ret_warn_on); \
+})
+#endif
+
+#ifndef WARN
+#define WARN(condition, format...) ({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) { \
+ __WARN(); \
+ puts("WARNING: "); \
+ printf(format); \
+ } \
+ unlikely(__ret_warn_on); \
+})
+#endif
+#endif
diff --git a/include/common.h b/include/common.h
index fca9798bbb..eef371c4bf 100644
--- a/include/common.h
+++ b/include/common.h
@@ -49,38 +49,6 @@
#error "None of __LITTLE_ENDIAN and __BIG_ENDIAN are defined"
#endif
-#define BUG() do { \
- printf("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
- panic("BUG!"); \
-} while (0)
-#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
-
-
-#define __WARN() do { \
- printf("WARNING: at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
-} while (0)
-
-#ifndef WARN_ON
-#define WARN_ON(condition) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) \
- __WARN(); \
- unlikely(__ret_warn_on); \
-})
-#endif
-
-#ifndef WARN
-#define WARN(condition, format...) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) { \
- __WARN(); \
- puts("WARNING: "); \
- printf(format); \
- } \
- unlikely(__ret_warn_on); \
-})
-#endif
-
#include <asm/barebox.h> /* boot information for Linux kernel */
/*
@@ -89,7 +57,6 @@
void reginfo(void);
void __noreturn hang (void);
-void __noreturn panic(const char *fmt, ...);
char *size_human_readable(unsigned long long size);
@@ -107,11 +74,6 @@ void __noreturn poweroff(void);
void udelay (unsigned long);
void mdelay (unsigned long);
-/* lib_generic/vsprintf.c */
-ulong simple_strtoul(const char *cp,char **endp,unsigned int base);
-unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base);
-long simple_strtol(const char *cp,char **endp,unsigned int base);
-
/* lib_generic/crc32.c */
uint32_t crc32(uint32_t, const void*, unsigned int);
uint32_t crc32_no_comp(uint32_t, const void*, unsigned int);
@@ -175,32 +137,8 @@ static inline char *shell_expand(char *str)
}
#endif
-/* Force a compilation error if condition is true */
-#define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition))
-
-/* Force a compilation error if condition is constant and true */
-#define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)]))
-
-/* Force a compilation error if a constant expression is not a power of 2 */
-#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \
- BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
-
-/*
- * Force a compilation error if condition is true, but also produce a
- * result (of value 0 and type size_t), so the expression can be used
- * e.g. in a structure initializer (or where-ever else comma
- * expressions aren't permitted).
- */
-#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
-#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
-
-#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
-#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
#define ALIGN_DOWN(x, a) ((x) & ~((typeof(x))(a) - 1))
-#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
-#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
/*
@@ -214,30 +152,6 @@ static inline char *shell_expand(char *str)
char __##name[sizeof(type) * (size) + (align) - 1]; \
type *name = (type *)ALIGN((uintptr_t)__##name, align)
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
-#define USHORT_MAX ((u16)(~0U))
-#define SHORT_MAX ((s16)(USHORT_MAX>>1))
-#define SHORT_MIN (-SHORT_MAX - 1)
-#define INT_MAX ((int)(~0U>>1))
-#define INT_MIN (-INT_MAX - 1)
-#define UINT_MAX (~0U)
-#define LONG_MAX ((long)(~0UL>>1))
-#define LONG_MIN (-LONG_MAX - 1)
-#define ULONG_MAX (~0UL)
-#define LLONG_MAX ((long long)(~0ULL>>1))
-#define LLONG_MIN (-LLONG_MAX - 1)
-#define ULLONG_MAX (~0ULL)
-
#define PAGE_SIZE 4096
#define PAGE_SHIFT 12
#define PAGE_ALIGN(s) (((s) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
@@ -279,41 +193,6 @@ void barebox_set_hostname(const char *);
#define IOMEM(addr) ((void __force __iomem *)(addr))
#endif
-#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-
-#define DIV_ROUND_CLOSEST(x, divisor)( \
-{ \
- typeof(divisor) __divisor = divisor; \
- (((x) + ((__divisor) / 2)) / (__divisor)); \
-} \
-)
-
-/**
- * upper_32_bits - return bits 32-63 of a number
- * @n: the number we're accessing
- *
- * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
- * the "right shift count >= width of type" warning when that quantity is
- * 32-bits.
- */
-#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
-
-/**
- * lower_32_bits - return bits 0-31 of a number
- * @n: the number we're accessing
- */
-#define lower_32_bits(n) ((u32)(n))
-
-#define abs(x) ({ \
- long __x = (x); \
- (__x < 0) ? -__x : __x; \
- })
-
-#define abs64(x) ({ \
- s64 __x = (x); \
- (__x < 0) ? -__x : __x; \
- })
-
/*
* Check if two regions overlap. returns true if they do, false otherwise
*/
diff --git a/include/console.h b/include/console.h
index beafb4d778..72b4a440e7 100644
--- a/include/console.h
+++ b/include/console.h
@@ -47,6 +47,7 @@ struct console_device {
int (*set_active)(struct console_device *cdev, unsigned active);
char *devname;
+ int devid;
struct list_head list;
diff --git a/include/debug_ll.h b/include/debug_ll.h
index 288aa256e5..b0eb7cd7d9 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -33,7 +33,7 @@
#if defined (CONFIG_DEBUG_LL)
-static inline void putc_ll(unsigned char value)
+static inline void putc_ll(char value)
{
PUTC_LL(value);
}
@@ -67,7 +67,7 @@ static inline void puts_ll(const char * str)
#else
-static inline void putc_ll(unsigned char value)
+static inline void putc_ll(char value)
{
}
diff --git a/include/linux/bug.h b/include/linux/bug.h
new file mode 100644
index 0000000000..7295618c98
--- /dev/null
+++ b/include/linux/bug.h
@@ -0,0 +1,30 @@
+#ifndef _LINUX_BUG_H
+#define _LINUX_BUG_H
+
+#include <asm-generic/bug.h>
+
+#ifdef __CHECKER__
+#define BUILD_BUG_ON_NOT_POWER_OF_2(n) (0)
+#define BUILD_BUG_ON_ZERO(e) (0)
+#define BUILD_BUG_ON_NULL(e) ((void*)0)
+#define BUILD_BUG_ON(condition) (0)
+#else /* __CHECKER__ */
+
+/* Force a compilation error if a constant expression is not a power of 2 */
+#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \
+ BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
+
+/* Force a compilation error if condition is true, but also produce a
+ result (of value 0 and type size_t), so the expression can be used
+ e.g. in a structure initializer (or where-ever else comma expressions
+ aren't permitted). */
+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
+#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
+
+/* Force a compilation error if condition is true */
+#define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition))
+
+#endif
+
+
+#endif /* _LINUX_BUG_H */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 98f12e1b93..3f2644cf65 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -2,8 +2,43 @@
#define _LINUX_KERNEL_H
#include <linux/compiler.h>
+#include <linux/bug.h>
#include <linux/barebox-wrapper.h>
+#define USHRT_MAX ((u16)(~0U))
+#define SHRT_MAX ((s16)(USHRT_MAX>>1))
+#define SHRT_MIN ((s16)(-SHRT_MAX - 1))
+#define INT_MAX ((int)(~0U>>1))
+#define INT_MIN (-INT_MAX - 1)
+#define UINT_MAX (~0U)
+#define LONG_MAX ((long)(~0UL>>1))
+#define LONG_MIN (-LONG_MAX - 1)
+#define ULONG_MAX (~0UL)
+#define LLONG_MAX ((long long)(~0ULL>>1))
+#define LLONG_MIN (-LLONG_MAX - 1)
+#define ULLONG_MAX (~0ULL)
+#define SIZE_MAX (~(size_t)0)
+
+#define U8_MAX ((u8)~0U)
+#define S8_MAX ((s8)(U8_MAX>>1))
+#define S8_MIN ((s8)(-S8_MAX - 1))
+#define U16_MAX ((u16)~0U)
+#define S16_MAX ((s16)(U16_MAX>>1))
+#define S16_MIN ((s16)(-S16_MAX - 1))
+#define U32_MAX ((u32)~0U)
+#define S32_MAX ((s32)(U32_MAX>>1))
+#define S32_MIN ((s32)(-S32_MAX - 1))
+#define U64_MAX ((u64)~0ULL)
+#define S64_MAX ((s64)(U64_MAX>>1))
+#define S64_MIN ((s64)(-S64_MAX - 1))
+
+#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
+#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
+#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
+#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
+
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
+
/*
* This looks more complex than it should be. But we need to
* get the type for the ~ right in round_down (it needs to be
@@ -17,6 +52,47 @@
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
#define round_down(x, y) ((x) & ~__round_mask(x, y))
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+
+#define DIV_ROUND_CLOSEST(x, divisor)( \
+{ \
+ typeof(divisor) __divisor = divisor; \
+ (((x) + ((__divisor) / 2)) / (__divisor)); \
+} \
+)
+
+/**
+ * upper_32_bits - return bits 32-63 of a number
+ * @n: the number we're accessing
+ *
+ * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
+ * the "right shift count >= width of type" warning when that quantity is
+ * 32-bits.
+ */
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+
+/**
+ * lower_32_bits - return bits 0-31 of a number
+ * @n: the number we're accessing
+ */
+#define lower_32_bits(n) ((u32)(n))
+
+#define abs(x) ({ \
+ long __x = (x); \
+ (__x < 0) ? -__x : __x; \
+ })
+
+#define abs64(x) ({ \
+ s64 __x = (x); \
+ (__x < 0) ? -__x : __x; \
+ })
+
+void __noreturn panic(const char *fmt, ...);
+
+extern unsigned long simple_strtoul(const char *,char **,unsigned int);
+extern long simple_strtol(const char *,char **,unsigned int);
+extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
+
/*
* min()/max()/clamp() macros that also do
* strict type-checking.. See the
@@ -170,4 +246,16 @@ static inline char *hex_byte_pack_upper(char *buf, u8 byte)
return buf;
}
+/**
+ * container_of - cast a member of a structure out to the containing structure
+ * @ptr: the pointer to the member.
+ * @type: the type of the container struct this is embedded in.
+ * @member: the name of the member within the struct.
+ *
+ */
+#define container_of(ptr, type, member) ({ \
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
+ (type *)( (char *)__mptr - offsetof(type,member) );})
+
+
#endif /* _LINUX_KERNEL_H */
diff --git a/include/linux/mtd/nand_mxs.h b/include/linux/mtd/nand_mxs.h
new file mode 100644
index 0000000000..eca31777f5
--- /dev/null
+++ b/include/linux/mtd/nand_mxs.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2015 PHYTEC Messtechnik GmbH,
+ * Author: Stefan Christ <s.christ@phytec.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __NAND_MXS_H
+#define __NAND_MXS_H
+
+/*
+ * Functions are definied in drivers/mtd/nand/nand_mxs.c. They are used to
+ * calculate the ECC Strength, BadBlockMarkerByte and BadBlockMarkerStartBit
+ * which are placed into the FCB structure. The i.MX6 ROM needs these
+ * parameters to read the firmware from NAND.
+ *
+ * The parameters depends on the pagesize and oobsize of NAND chips and are
+ * different for each combination. To avoid placing hardcoded values in the bbu
+ * update handler code, the generic calculation from the driver code is used.
+ */
+
+uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
+ uint32_t page_oob_size);
+
+uint32_t mxs_nand_mark_byte_offset(struct mtd_info *mtd);
+
+uint32_t mxs_nand_mark_bit_offset(struct mtd_info *mtd);
+
+#endif /* __NAND_MXS_H */
diff --git a/include/usb/usb.h b/include/usb/usb.h
index f02f1fbb57..991f3d7dd1 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -171,10 +171,6 @@ int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe,
void *buffer, int transfer_len, int interval);
void usb_disable_asynch(int disable);
int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
-static inline void wait_ms(unsigned long ms)
-{
- mdelay(ms);
-};
int usb_get_configuration_no(struct usb_device *dev, unsigned char *buffer,
int cfgno);
int usb_get_report(struct usb_device *dev, int ifnum, unsigned char type,
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
index 0ca2dcd400..ee2862bebb 100644
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -53,10 +53,6 @@
#include <bunzip2.h>
#endif /* STATIC */
-#ifndef INT_MAX
-#define INT_MAX 0x7fffffff
-#endif
-
/* Constants for Huffman coding */
#define MAX_GROUPS 6
#define GROUP_SIZE 50 /* 64 would have been more efficient */
diff --git a/lib/parameter.c b/lib/parameter.c
index d337ef37c7..865ad9f431 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -114,7 +114,7 @@ int dev_param_set_generic(struct device_d *dev, struct param_d *p,
return 0;
}
p->value = strdup(val);
- return 0;
+ return p->value ? 0 : -ENOMEM;
}
static const char *param_get_generic(struct device_d *dev, struct param_d *p)
@@ -130,6 +130,10 @@ static int __dev_add_param(struct param_d *param, struct device_d *dev, const ch
if (get_param_by_name(dev, name))
return -EEXIST;
+ param->name = strdup(name);
+ if (!param->name)
+ return -ENOMEM;
+
if (set)
param->set = set;
else
@@ -139,7 +143,6 @@ static int __dev_add_param(struct param_d *param, struct device_d *dev, const ch
else
param->get = param_get_generic;
- param->name = strdup(name);
param->flags = flags;
param->dev = dev;
list_add_tail(&param->list, &dev->parameters);
diff --git a/net/netconsole.c b/net/netconsole.c
index 99b998408c..0ee6a7655b 100644
--- a/net/netconsole.c
+++ b/net/netconsole.c
@@ -154,6 +154,7 @@ static int netconsole_init(void)
cdev->putc = nc_putc;
cdev->getc = nc_getc;
cdev->devname = "netconsole";
+ cdev->devid = DEVICE_ID_SINGLE;
cdev->set_active = nc_set_active;
g_priv = priv;
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 419436dede..a40d32cba7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -328,7 +328,7 @@ sub top_of_kernel_tree {
my ($root) = @_;
my @tree_check = (
- "arch", "commands", "common", "COPYING", "CREDITS", "defaultenv",
+ "arch", "commands", "common", "COPYING", "defaultenv",
"Documentation", "drivers", "fs", "include", "lib",
"MAKEALL", "Makefile", "net", "README", "scripts", "TODO"
);
diff --git a/scripts/genenv b/scripts/genenv
index 9f22adea5c..5ebe699632 100755
--- a/scripts/genenv
+++ b/scripts/genenv
@@ -2,8 +2,8 @@
# Generate the default environment file from a list of directories
# usage: genenv <basedir> <objdir> <target> <dir>...
-# where <basedir> is the base directory for relative pathes in <dir>
-# where <objdir> is the base directory for relative pathes for result
+# where <basedir> is the base directory for relative paths in <dir>
+# where <objdir> is the base directory for relative paths for result
# and <target> is the resulting binary environment
objtree=$2
basedir=$1