9
0
Fork 0
Commit Graph

12447 Commits

Author SHA1 Message Date
Sascha Hauer 4d70da63a4 ARM: MXS: power-init: Add parameters to mx28_power_init()
Instead of introducing new functions each time a new power supply
situation is to be added, this patch adds parameters to mx28_power_init.

Right now there are three parameters:

- has_battery - true when this board has a battery.
- use_battery_input - true when this board is supplied from the
  battery input, but has a DC source instead of a real battery
- use_5v_input - true when this board can use the 5V input

The third one is introduced with this patch and allow to boot a board from 5v
(USB) source only. The main necessary change this needs is that the DC-DC
converter must always be sourced from DCDC_4P2 (DROPOUT_CTRL field of
HW_POWER_DCDC4P2)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-03 09:23:47 +01:00
Sascha Hauer ade5b109ac Release v2015.02.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 12:40:02 +01:00
Masahiro Yamada f5cb522743 pinctrl: remove unnecessary error check
The file drivers/pinctrl/pinctrl.c is compiled only when
CONFIG_PINCTRL is defined.  "IS_ENABLED(CONFIG_PINCTRL)" is
always evaluated as 1 in this function.
(Although the compiler would optimize it, the source file does
not look nice.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Jan Luebbe 8ed32ae81b commands: crc: support setting environment variables
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 03dabc0fe4 param: add error check to __dev_add_param()
If strdup() fails with out-of-memory, __dev_add_param() should fail
with -ENOMEM.

(Note strdup() is always given with a non-NULL pointer.  If the
argument name is given with NULL, the system would already have
crashed in the get_param_by_name() function.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 2f025305ae MAKEALL: do not create build directory explicitly
Since commit e7554c0cb2 (kbuild: create a build directory
automatically for out-of-tree build), MAKEALL does not have to
create a build directory.  It it done by the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 27a20a6011 MAKEALL: fix do_build_all
Currently, do_build_all() does nothing.

Since commit 195310fd7b (MAKEALL: add regex support), do_build()
takes two arguments.  To fix do_build_all(), it must pass "*" as the
second argument of do_build().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 5020f86af9 blackfin: fix undefined reference with CONFIG_CMD_MAGICVAR
For Blackfin, C symbols are prefixed with '_'.

If CONFIG_CMD_MAGICVAR is enabled for Blackfin, the following error occurs:

commands/built-in.o: In function `do_magicvar':
commands/magicvar.c:(.text+0x3326): undefined reference to `__barebox_magicvar_start'
commands/magicvar.c:(.text+0x332a): undefined reference to `__barebox_magicvar_end'
commands/magicvar.c:(.text+0x332e): undefined reference to `__barebox_magicvar_start'
commands/magicvar.c:(.text+0x3332): undefined reference to `__barebox_magicvar_end'
make: *** [barebox] Error 1

Add '_' to __barebox_magicvar_start and __barebox_magicvar_end,
like the other symbols in this linker script.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 31cbf0880d param: add error check to dev_param_set_generic()
The function dev_param_set_generic() may fail because of
out of memory.  If so, return -ENOMEM.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada a1b347f24c blackfin: consolidate arch/blackfin/include/asm/linkage.h
Since include/linux/linkage.h includes <asm/linkage.h>, the basic
coding style we should follow is:

 - <linux/linkage.h> should contain default macro defines
 - <asm/linkage.h> can define arch-specific macros and override the
   default ones in <linux/linkage.h>

The arch/blackfin/include/asm/linkage.h has redundant defines that
are already defined in <linux/linkage.h>.
Replace it with the one imported from Linux 3.19-rc6.

Generally, <asm/linkage.h> should not be included directly.
Fix two files to include <linux/linkage.h> instead.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 7f7cdb3466 kbuild: drop $(KBUILD_DTBS) from the all target
$(KBUILD_DTBS) is not set anywhere.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 130f4da232 kbuild: drop bogus "common/barebox_default_env*" from CLEAN_FILES
Since commit 7fa10256c3 (defaultenv: Allow multiple
defaultenvironment overlays), barebox_default_env* is created
in the defaultenv/ directory.  They are cleaned up when
"make clean" descends into the defaultenv/ directory.

We can simply delete "common/barebox_default_env*" from the
top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 97462a77fd gitignore: sync with Linux's .gitignore
The top .gitignore is getting close to Linux's one.
I am inclined to sync it more.

 - Add a missing comment block
 - Add missing patterns that have no impact (*.o.*, *.so.dbg)
 - Add prefix "/" to top-level generic files
 - Arrange the order for easier diff

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 4aa6819ecb gitignore: move "barebox_default_env*" to subdirectory
"barebox_default_env*" is not "Top-level generic files" because they
are generated in the defaultenv/ directory since commit 7fa10256c3
(defaultenv: Allow multiple defaultenvironment overlays).

The comment block of the top-level .gitignore says as follows:

  # NOTE! Don't add files that are generated in specific
  # subdirectories here. Add them in the ".gitignore" file
  # in that subdirectory instead.

Let's follow this rule.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 056e2372a3 gitignore: simplify .gitignore file with pattern "/barebox*"
There is no source file prefixed "barebox" at the top directory.
Generated files there can be simply ignored with "/barebox*" pattern.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 262eef7c6a usb: abolish wait_ms() function
This function is only used in drivers/usb/*.
It is equivalent to mdelay().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 5dc01bc942 ARM: fix a wrong comment about relocate_to_adr
The relocated_to_adr does not clear the .bss section.
It is done by the setup_c routine.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Wjatscheslaw Stoljarski f7ee0beb26 loadenv: fix typo in help text
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Masahiro Yamada 51f525f084 ARM: use an easier way to create the empty built-in.o
We do not have to build an unneeded file to create the built-in.o.
Just add a dummy string to "obj-".
(dummy.c does not need to exist.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 10:20:19 +01:00
Jan Luebbe b5579c7c12 imx53: add uart3
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-30 08:54:23 +01:00
Masahiro Yamada 3113eaf075 ARM: delete useless and wrong comments
These comments are wrong.  Anyway, they do not carry useful
information.  Delete.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-30 08:31:10 +01:00
Masahiro Yamada 41be004e8d linux/kernel.h: move some macros and prototypes
The include/common.h is still cluttered (although much better than
U-Boot).  It contains various utility macros that originates
in Linux.  Move them to the original place, include/linux/kernel.h,
to slim down include/common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:48:30 +01:00
Masahiro Yamada 8960b0ff81 asm-generic/bug.h: move BUG(), BUG_ON(), WARN(), WARN_ON() macros
In Linux, these macros are defined in include/asm-generic/bug.h.
To tidy up common.h, move BUG(), BUG_ON(), WARN(), WARN_ON() there.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:48:30 +01:00
Masahiro Yamada a07a472cac linux/bug.h: move BUILD_BUG_ON*() macros
In Linux, the macros BUILD_BUG_ON* are defined in include/linux/bug.h.
To tidy up common.h, move BUILD_BUG_* there.

MAYBE_BUILD_BUG_ON is not used in barebox and it was removed from Linux
long time ago.  Drop it from barebox, too.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:48:30 +01:00
Eric Bénard 223adf761b dhcp: fix request packet's seconds elapsed
it's done in the discover packet so let's do it also in the request packet.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:39:04 +01:00
Eric Bénard ea0a3b7da8 dhcp: fix request packet
we are not supposed to fill ciaddr, yiaddr and siaddr in the request packet.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:39:03 +01:00
Eric Bénard 1f9cf67ab0 dhcp: fix request packet's requested IP option
In the request packet, we are supposed to copy the IP that the DHCP server
provided in the offer packet so that dhcp_extended can fill the option 50.
There is actually an error in barebox as the pointer to the packet currently
built is used as the source instead of the pointer to the offer packet.
With this patch, barebox now sends a request packet which includes the right
requested IP in option 50.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:39:03 +01:00
Stefan Christ a114e9b00c ARM: i.MX6: use generic calculation in nand bbu handler
The parameters ECC Strength, BadBlockMarkerByte and BadBlockMarkerStartBit in
the FCB structure depends on the nand chip's pagesize and oobsize. Instead of
hardcoding these values into the imx6 bbu handler calculate these values on the
fly. Therefore we export the necessary functions from the nand_mxs driver to
use them in the bbu handler.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 07:58:00 +01:00
Bo Shen abf0033be7 ARM: atmel: sama5d4: nand: add has_pmecc parameter
Add the missing has_pmecc parameter for sama5d4 based boards.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 07:56:41 +01:00
Stefan Christ 41e3d1c92a imx6: add partitions on SPI NOR for PFLA02
Add partitions oftree and kernel on SPI NOR and increase size of barebox and
barebox-environment partition.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:16:26 +01:00
Stefan Christ 420e4cb641 ARM: i.MX6: Fix bad block marker in imx6-bbu-nand handler
The i.MX6 NAND update handler sets all bytes of OOB data to 0x00 in pages that
contain the FCB structure currently.  So the first and second byte which is
used as the manufacturers bad block marker is in the 'bad block' state. A scan
for factory bad blocks will detect these blocks as bad while they are still ok.

The barebox issues a scan for factory bad blocks to rebuild the bad block table
if the NAND is brand new or the last four blocks of flash are erased.

To fix this problem set the first two bytes of OOB data to 0xFF explicitly.

There is a potential chance that the bbu handler will mark a real bad block as
factory good. That's not a problem for the ROM Loader, because the FCB is
protected by a checksum and the hamming_13_8 encoding. Additionally the current
implementation of the bbu handler does not check the bad block table or the
factory bad block marker before writing the FCB at the first page of the first
and second block.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:14:07 +01:00
Wadim Egorov f0f6a7477b Fix spelling: pathes -> paths
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:02:56 +01:00
Dmitry Lavnikevich 51eb7ddd5a dts:imx6:pfla02: Align nand partitions by 512k
NAND chip used on phyFLEX-i.MX6 with 4GB NAND (MT29F32G08AFACAWP) has
512k eraseblock size.

Align NAND partitions by 512k to fix erase fails.

Also increase barebox-environment and oftree partitions to be two
eraseblocks. This will ensure safety in case of bad block.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:01:30 +01:00
Sascha Hauer f4e1969c19 boards: remove hardcoded MAC addresses
There should be no hardcoded MAC addresses in the default environments.
Remove them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 09:59:10 +01:00
Christian Hemp cf6626da3e ARM: phyFLEX-i.MX6: Add support for 1GB on 1 bank
Add support phyFLEX-i.MX6 SOM with 1GB on one ram bank

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 09:44:09 +01:00
Sascha Hauer 1a63678cb2 ARM: MXS: Add regulator debug print
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:21:19 +01:00
Sascha Hauer e0c61f3be3 ARM: MXS: Setup vdda in power prep
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:21:18 +01:00
Sascha Hauer 3a0122c712 pinctrl: Add MXS pinctrl driver
This adds a device tree pinctrl driver for MXS.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:21:18 +01:00
Sascha Hauer 7e22de9c3c pbl: Add support for memory_display
The PBL has console support now, so add memory_display support aswell
which can be a good debugging aid.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer c42178d9fc of: Create platform_device when creating AMBA device failed
If creating an AMBA device failed, maybe because AMBA support is
not compiled in, register the device as regular platform device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer f765925bb9 ARM: MXS: ocotp: Add devicetree support
Add the device tree compatible strings.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer f3ff746d20 ARM: MXS: Create ocotp device in SoC code
The ocotp device is completely SoC internal, no need to register
it from boards. Register it from SoC code instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer f0535fe5ee serial: stm_serial: Add devicetree support
This adds device tree support for the stm serial driver. This
driver really is a AMBA primecell, so the amba-pl011 could be
used. However, the current code tries to get the apb_pclk before
the clocks are registered, so this does not work. Use the stm
driver instead until a solution is found.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer 846f27cf92 mci: mxs: Add devicetree support
Add device tree compatibles and allow retrieving data from device tree
instead of platform_data only.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer 478ea1c0b1 ARM: MXS: Make gpio a driver
This turns the MXS gpio support into a driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:43 +01:00
Sascha Hauer 2a0f2d46fd ARM: MXS: Do not register devices with device tree support
When a device tree is present the SoC internal devices come from
it, so do not register them as platform devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:43 +01:00
Sascha Hauer c722646be6 MXS: power-init: inline only once used functions
mxs_power_init_4p2_params and mxs_power_init_4p2_regulator are used
only once, so inline the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:43 +01:00
Sascha Hauer 39189a5dde ARM: MXS: Fix vddd brownout setting
The brownout setting can be at maximum 7*25mV below the voltage
setting of the regulator. Set it to the minimum Voltage which is
1325mV.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:43 +01:00
Dmitry Lavnikevich 0d8ef327bb memtest: fix 4GB overflow fail
Add condition for checking size_t overflow. This fixes memtest fail
> Memtest failed. Error: -22
which appears when 4GB RAM is present.

Was tested on phyFLEX-i.MX6 modules with 4GB and 1GB RAM.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-27 09:03:07 +01:00
Uwe Kleine-König 866516511e trivial: s/flasg/flash/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-27 08:59:18 +01:00