9
0
Fork 0
Commit Graph

13718 Commits

Author SHA1 Message Date
Sascha Hauer 5a5838f5cc memtest: Make cached/uncached test configurable
Add options to explicitly test cached/uncached tests. Without these
options still both cached and uncached is tested if remapping is
supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:43 +01:00
Sascha Hauer 8f2549abb7 memtest: By default only test biggest region
Often enough the biggest free region spans most free RAM, so
it doesn't add much value to test the remaining free regions. This
patch changes the default behaviour to only test the biggest free
region and adds the -t option to test all regions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:43 +01:00
Sascha Hauer 4ff9e28abc memtest: move error handling to end of function
Move error handling out of the test code to make the actual test
better visible.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:42 +01:00
Sascha Hauer 8f130c738e memtest: move ctrlc check / progress showing into separate function
To make the actual test a bit better visible in the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:04 +01:00
Antony Pavlov e856be5361 MIPS: tplink-mr3020_defconfig: enable pbl; make image shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 0649af6f64 MIPS: tplink-mr3020: add pbl low level init
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 36b8e0d37c MIPS: ath79: add pbl_ar9331_ddr1_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

See also this openocd commit:

    commit f59d2d9ecfee8899df531b87b7acaa468725f238
    Author: Oleksij Rempel <linux@rempel-privat.de>
    Date:   Fri Jan 30 13:05:31 2015 +0100

        tcl/target|board: add config Atheros ar9331

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 11cea6cf71 MIPS: ath79: add black-swift_defconfig
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 770f98d3bf MIPS: ath79: add black-swift board support
Black Swift is a tiny coin-sized embedded computer based on AR9331 SoC.
See http://www.black-swift.com/ for details.

See also Black Swift kickstarter page:
  https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 82bd8277f2 MIPS: ath79: add debug_ll_ar9331_init macro
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 61163945cf MIPS: ath79: add pbl_ar9331_uart_enable macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 50725503b3 MIPS: ath79: add pbl_ar9331_ddr2_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Oleksij Rempel 0f8ddb4d53 MIPS: ath79: add pbl_ar9331_pll macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 23492d36be mips: cpuinfo: report secondary cache configuration
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 9c12b4ae1c mips: c-r4k: detect secondary cache
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Sascha Hauer b9f9eef722 memtest: Make comments single line when appropriate
Make the comments single line when they fit into a single line
to make the code a bit shorter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:47 +01:00
Sascha Hauer 680a6a9616 memtest: Make output more compact
Especially when called multiple times the output of the memory test
is quite verbose. Make it more compact by only describing once what
is being done and only use one progress bare instead of three.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:47 +01:00
Sascha Hauer e96b1713ea memtest: split tests in separate functions
The memtest does a bus integrity check and a moving inversions test.
Split the tests into two separate functions so that the can be called
separately.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:47 +01:00
Sascha Hauer b792124a7d rework remap_range
remap_range is for remapping regions with different cache attributes.
It is implemented for ARM and PowerPC only, the other architectures only
provide stubs.
Currently the new cache attributes are passed in an architecture specific
way and the attributes have to be retrieved by calls to
mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags().
Make this simpler by providing architecture independent flags which can
be directly passed to remap_range()
Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function.
The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture
has as default. the arch_can_remap() function returns true if the
architecture can change the cache attributes, false otherwise. This
allows the memtest code to better find out what it has to do.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:44 +01:00
Anton Bondarenko 79b813851f embedsky-e9: cleanup and reorder DTS nodes
Removed duplicate ldb node. Removed disabled nodes

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 09:22:45 +01:00
Andrey Smirnov 33d482fdd3 arm/cpu: Avoid multiple definitions of barebox_arm_entry
All versions of barebox_arm_entry (in uncompress.c, start.c and
start-pbl.c) appear to be doing exacty the same thing. So move the
definition into a separate file and use IS_ENABLED macro to avoid
re-definition.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 08:39:22 +01:00
Andrey Smirnov 2c68f4e53c arm/cpu/start.c: Distil some common code in __start().
Both barebox_boarddata and barebox_boot_dtb perform essentially the
same function -- hold a pointer to a chunk of private data. Since only
one variable is ever used at any given time we may as well merge those
two variable into one. This also allows us to share more code between
two boot paths (board data vs. device tree)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 08:31:58 +01:00
Sergey Koshechkin e5b9918329 login: make some locally used functions static
This patch continues cleanup password code from

  commit 40596b856f
  Author: Sascha Hauer <s.hauer@pengutronix.de>
  Date:   Thu Aug 27 15:58:50 2015 +0200

      login: cleanup password code

Signed-off-by: Sergey Koshechkin <tritel59@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 07:59:13 +01:00
Peter Mamonov f1d4230a33 ata: disk_ata_drive: remove obsolete check for ID validity
The id check does not work on some newer drives.

Acked-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 07:57:39 +01:00
Andrey Smirnov 48d6151029 ARM: Add support for semihosting
Add semihosting API implementation and implement a filesystem driver
to access debugging host filesystem using it.

Tested on Freescale SabreSD board (i.MX6Q) using OpenOCD

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-30 08:06:03 +01:00
Lucas Stach 33d3286460 ARM: imx6: add OF fixup to delete nonexistent CPU cores
Make sure that the DT passed to Linux reflects the actual number of CPU
cores present in the system by reading the SCU configuration. As both
the Q and DL variants of the MX6 have versions with cores fused away,
but the DTs have the maximum number of cores specified, this just deletes
any nonexistent CPU core nodes.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 17:08:02 +01:00
Trent Piepho 550cf79c21 Make list of flash images and fix link all single image cases
Create a new file named 'barebox-flash-images' in the top level output
directory that lists each image generated, one per line.  Paths will
be relative to the top level output directory.  This works if multiple
images are generated as well as for a single image.

Also update the existing barebox-flash-image symlink to point to the
image in all cases where there is a single image generated.  If
multiple images are generated, it will point to the non-existent file
'multi-image-build'.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 16:52:40 +01:00
Alexander Aring 51b0e90ec6 amba: check if on remove callback
Currently we get a null pointer dereference when booting linux on RPi
which use "uart-pl011" driver. This driver doesn't implement a remove
driver callback. This patch adds a check before calling the remove
callback if the driver which use the amba bus implement such
functionality.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 16:45:51 +01:00
Alexander Aring ad0aadfda3 checkpatch: fix left brace warning
Running checkpatch with perl version 5.22 occur the following warnings:

Unescaped left brace in regex is deprecated, ... checkpatch.pl line 2017.
Unescaped left brace in regex is deprecated, ... checkpatch.pl line 2267.
Unescaped left brace in regex is deprecated, ... checkpatch.pl line 2268.
...
lot of weird things
...
)\(.*\).*\s{ <-- HERE / at ./scripts/checkpatch.pl line 2016.

This patch fix these warning, an similar commit was done in linux kernel
commit: 4e5d56bdf892e18832a6540b63ebf709966bce2a ("checkpatch: fix left
brace warning").

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 16:45:42 +01:00
Alexander Aring a25cfdee7b loadb: add missing brackets in help
This patch adds missing brackets in the help text of loadb command.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 16:45:42 +01:00
Sascha Hauer 9b31b271ad video: ipuv3: Silence VPL message
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 11:48:53 +01:00
Michael Grzeschik 97d5514a02 ARM: i.MX6: add Technexion Wandboard support
This adds support support for the i.MX6 Technexion Wandboard. The
board comes in different SoC variants and different amounts of RAM.
The baord type is autodetected based on the SoC type, so all boards
can be supported by the same binary image.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 11:13:08 +01:00
Sascha Hauer cfcb530075 ARM: i.MX6dl: dts: include arm/imx6dl.dtsi from board files
Otherwise boards cannot include board files from the kernel dts
without getting the file ordering wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 10:52:29 +01:00
Sascha Hauer 58eae8361c ARM: Allow compressed dtb binaries
In the current multi image build process the DTBs end up uncompressed
in the PBL. This can be annoying because the PBL is often very size
constrained.
This patch allows to put the DTBs in as lzo compressed binary into
the PBL. Since lzo offers quite good compression ratios for DTBs no
other compression algorithm has been implemented for now.
Boards which want to use the compressed DTBs only have to change
the __dtb_ prefix in the DTB name to __dtb_z_. Also they should select
ARM_USE_COMPRESSED_DTB to make sure barebox supports uncompressing
the DTB.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 10:02:28 +01:00
Sascha Hauer fcc6020164 ARM: Eltec-hypercam: Add missing dcdofd in flash header
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 08:34:40 +01:00
Sascha Hauer 6b127d4f18 memtest: move request/release regions to common/
Normally code providing a feature should be implemented in common/ which
is then called from the command code. Follow this rule and move some more
of the memtest code to common/.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 08:22:45 +01:00
Lucas Stach 1678dcf7ca ARM: imx: clocksource: add new DT compatible
The i.MX6 DL/S DT has been changed to use more specific compatibles as
GPTv2 has a different programming model for modes used in Linux. This
difference doesn't matter for Barebox, but the old mx31 compatible has
been dropped from the DT, so we need to match on the one still present.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 15:06:58 +01:00
Sascha Hauer 31fd4cceb6 of_dump: Add option to print node names only
Devicetrees tend to become very long and it is hard to find the
interesting nodes in a full tree output.
This patch adds the -n option to the of_node command. With this
option only the names of the nodes are printed, but not the properties.
The resulting output is much shorter and the node one is interested
in can be copy/pasted to a second call to of_node.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 14:08:19 +01:00
Antony Pavlov a1aa681089 commands: clk_dump: use COMMAND_SUCCESS instead of 0 return code
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 08:20:27 +01:00
Eric Nelson 52cadd7ec3 imx6-mmdc: restore RALAT/WALAT in MMDC0, not MMDC1
Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 07:54:41 +01:00
Eric Nelson ea1fb2f75d imx6-mmdc: fix automatic power down enable in write level calibration
Bit 0 of the MAPSR register controls auto power down.

Explicitly clear this bit instead of reserved bit when
exiting from mmdc_do_write_level_calibration().

Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 07:51:43 +01:00
Antony Pavlov d70cb35e44 clock.h: include <types.h> under guard macro
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-22 09:33:58 +02:00
Antony Pavlov 31ab7cd460 commands: add clk_get_rate command
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-22 09:33:58 +02:00
Trent Piepho a5c51acab4 net: eth: Fixup OF tree with registered MAC addresses too
The eth code registers an OF tree fixup that looks for any nodes in
the Linux oftree that match eth devices loaded in barebox and sets the
mac-address property in those nodes.  The purpose is to pass MAC
addresses to the Linux kernel for drivers that expect the MAC address
to be in the device tree.

If barebox does not have a driver for the network device, either
because it has been disabled or because one does not exist, then the
OF tree will not be fixed up to include a MAC address.

The eth code also has a list of MAC addresses which board code has
registered, usually done when it reads the address from an EEPROM or
on-chip memory.  If an eth device is created later in the boot, it
will look here for an address.

The registered MAC address list is not used for the OF tree fix up,
and this patch changes that.  This way barebox can place a MAC address
in the device-tree without needing a driver for the network device.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-22 09:07:52 +02:00
Trent Piepho cb32b33aaf net: eth: Refactor OF tree fixup of one node into new function
Code that fixes up one node with a new MAC address is refactored into
a new function that eth_of_fixup() calls in a loop.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-22 09:07:52 +02:00
Sascha Hauer 68fb8855ef ARM: mvebu: Lenovo IX4 300D: Fix pblb generation
pblx-y must be passed the entry point function without any extension.
Otherwise the pblb file is not added to $targets and is removed by
make as an intermediate file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-19 08:39:29 +02:00
Sascha Hauer fe89df4ed9 scripts/kwbimage: Make BINARY files relative to config file
The BINARY files given in the config files are expected to be relative
to the place kwbimage is called from. This is bad since it breaks where
kwbimage is called from the build directory and not the source
directory.
It makes more sense to make the paths in the config files relative
to the config files which works with out of tree builds and is also
more what a user normally expects.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-19 08:39:25 +02:00
Sascha Hauer 119f75f23a scripts/kwbimage: Move configfile opening to the function that reads it
The configfile is read in image_create_config_parse(), so move opening
the file to there aswell and pass the configfile as filename instead of
FILE *.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-19 08:39:18 +02:00
Sascha Hauer e4216c80ac common/Makefile: Add missing dependency
imd-barebox.o needs include/generated/compile.h. Add the dependency.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-16 19:25:03 +02:00
Sascha Hauer 92f8d5953b logo: Makefile: remove debug output
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 09:08:55 +02:00