summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* memtest: Make cached/uncached test configurableSascha Hauer2015-11-041-5/+21
| | | | | | | | 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>
* memtest: By default only test biggest regionSascha Hauer2015-11-043-27/+72
| | | | | | | | | 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>
* memtest: move error handling to end of functionSascha Hauer2015-11-041-20/+17
| | | | | | | Move error handling out of the test code to make the actual test better visible. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: move ctrlc check / progress showing into separate functionSascha Hauer2015-11-041-16/+24
| | | | | | To make the actual test a bit better visible in the code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: Make comments single line when appropriateSascha Hauer2015-11-031-16/+5
| | | | | | | 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>
* memtest: Make output more compactSascha Hauer2015-11-031-13/+7
| | | | | | | | 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>
* memtest: split tests in separate functionsSascha Hauer2015-11-033-38/+11
| | | | | | | | 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>
* rework remap_rangeSascha Hauer2015-11-0316-173/+120
| | | | | | | | | | | | | | | | | | 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>
* memtest: move request/release regions to common/Sascha Hauer2015-10-273-105/+117
| | | | | | | | 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>
* ARM: imx: clocksource: add new DT compatibleLucas Stach2015-10-261-0/+3
| | | | | | | | | | 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>
* common/Makefile: Add missing dependencySascha Hauer2015-10-161-0/+1
| | | | | | imd-barebox.o needs include/generated/compile.h. Add the dependency. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: simple-panel: depend on OFDEVICELucas Stach2015-10-141-1/+1
| | | | | | | | | Fixes: In function `simple_panel_ioctl': undefined reference to `of_get_display_timings' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand_denali: don't include arch headerLucas Stach2015-10-142-2/+0
| | | | | | | | It causes build failures on other arches than socfpga and the driver doesn't use anything provided by this header. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* input: usb-kbd: depend on CONSOLE_FULLLucas Stach2015-10-141-0/+1
| | | | | | | | | Fixes: In function `usb_kbd_probe': (usb_kbd_probe): undefined reference to `console_set_active' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Fix filesystem detection with full pathPeter Mamonov2015-10-131-1/+5
| | | | | | | | | | | | | When mount is given a full path (including /dev/) to the cdev file we can no longer automatically detect the filesystem. This is broken since: e89f1a1 detect_fs: use device instead of file Fix it by dropping the /dev/ component of the path. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2015-10-0713-111/+1107
|\
| * usb: core: drop unnecessary le16_to_cpu() conversionAntony Pavlov2015-10-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In drivers/usb/core/usb.c we already have le16_to_cpus() conversion just after usb_get_descriptor(): 390 /* correct le values */ 391 le16_to_cpus(&dev->descriptor->bcdUSB); 392 le16_to_cpus(&dev->descriptor->idVendor); 393 le16_to_cpus(&dev->descriptor->idProduct); 394 le16_to_cpus(&dev->descriptor->bcdDevice); so no additional idVendor/idProduct descriptor fields le16_to_cpu() conversion is needed after that. On the big-endian machines extra le16_to_cpu() conversion leads to wrong idVendor/idProduct USB device parameters values (e.g. see devinfo <usb-device> output), and to a much more serious problem: idVendor/idProduct-based USB device detection does not work. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * input: port usb keyboard driver from the u-bootPeter Mamonov2015-10-023-0/+428
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci-hcd: use mdelay_non_interruptible()Peter Mamonov2015-10-021-3/+3
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci-hcd: detect re-entrancePeter Mamonov2015-10-021-4/+38
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci-hcd: port periodic transactions implementation from the u-bootPeter Mamonov2015-10-022-2/+415
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: clock: introduce mdelay_non_interruptible()Peter Mamonov2015-10-023-0/+11
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: chipidea: Add udc unregister for device removalMarkus Pargmann2015-09-233-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | The host may assume that the usb device is still up and running after booting if we do not deregister the udc here. I observed issues when the linux kernel was using a usb gadget directly where the complete USB Hub got disconnected through this. This patch adds a proper USB disconnect for gadget devices. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci-hcd: use is_timeout_non_interruptible()Peter Mamonov2015-09-101-2/+2
| | | | | | | | | | | | | | | | | | Use is_timeout_non_interruptible() intead of is_timeout() to avoid re-entering ehci-hcd functions from pollers, registered by usb drivers. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * endian: sync {big,little}_endian.h with linux-4.2Antony Pavlov2015-09-102-80/+156
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci-hcd: add OF bindingsPeter Mamonov2015-09-041-4/+18
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * endian: Always evaluate argumentsDavid S. Miller2015-09-022-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on commit 3d6f4a20cc287a8980c6186624834cf10a70752b Author: David Miller <davem@davemloft.net> Date: Thu Jul 24 23:38:31 2008 -0700 endian: Always evaluate arguments. In barebox.git/drivers/usb/core/usb.c, function usb_parse_config() we have had le16_to_cpus(&(dev->config.wTotalLength)); which evaluates to "do { } while (0)" on little endian, so struct usb_configuration field misuse will never be discovered on little endian. Therefore, always evaluate the arguments to nop endian transformation operations. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci: fix include/usb/usb.h:'struct usb_configuration' misuseAntony Pavlov2015-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the commit commit 245069bcef15ecc19db616a967501349b76c84d0 Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Thu Jul 10 11:36:12 2014 +0200 USB: introduce usb_interface/usb_configuration structs On little endian systems like ARM the le16_to_cpus() macro is a no op, defined as: #define le16_to_cpus __le16_to_cpus #define __le16_to_cpus(x) do {} while (0) So struct usb_configuration field misuse was discovered on big-endian MIPS machine. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/omap'Sascha Hauer2015-10-0730-139/+431
|\ \
| * | xload: be more flexible when searching for second stage bootloader.Vicente Bergas2015-10-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A first stage bootloader can read fat and ext4 filesystems, and even both can be compiled-in at the same time. But then xload has a hardcoded fat filesystem mount option which renders ext4 unusable. This patch tries to mount it as ext4 if the fat attempt fails. Then, a typical use case of an ext4 formatted filesystem is it to be a standard linux filesystem, which contains boot-related files in /boot. So, when searching for the second stage bootloader, try /boot/barebox.bin after not finding it in /barebox.bin Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | detect_fs: use device instead of fileVicente Bergas2015-10-023-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | detect_fs would usually mount a device on a directory, so, use a device-specific type detection. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: am33xx: Enable ethernet node on NET bootWadim Egorov2015-09-291-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: am335x-phytec-phycore-som: Disable mac node.Wadim Egorov2015-09-291-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | archosg9: add displayVicente Bergas2015-09-294-20/+123
| | | | | | | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | archosg9: Use defaultenv-2-menuVicente Bergas2015-09-2911-81/+23
| | | | | | | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | archosg9: re-generate defconfigs with "make savedefconfig"Vicente Bergas2015-09-292-36/+28
| | | | | | | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: Include strip file to Phytec am335x MLOsDaniel Schultz2015-09-093-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch disables the clocks in the Phytec am335x MLOs and reduce the MLO size by 9kb. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: Add include to strip am33xx clocksDaniel Schultz2015-09-091-0/+79
| | | | | | | | | | | | | | | | | | | | | Include this file to disable all clocks. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: am335x: Register eMMC MLO handlerDaniel Schultz2015-09-091-0/+4
| | | | | | | | | | | | | | | | | | | | | Register the eMMC MLO handler to the barebox_update command. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: am33xx: Add barebox_update eMMC optionDaniel Schultz2015-09-095-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch the barebox_update command will be extended by the possibility to flash the MLO to eMMC devices. The MLO will be flashed to the following addresses: 0x00000 0x20000 0x40000 0x60000 Because the first 512 Bytes of the MLO are reserved for the CHSETTINGS header and this only use ~80 Bytes, there is space for the partition table in the header. The command will overwrite the bootstrap code area and will hold the partition table and the Boot signature. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd'Sascha Hauer2015-10-078-1/+2203
|\ \ \
| * | | at91sam9x5: fix ROM base address (bugfix for nand ECC)iEdoardo Scaglia2015-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ROM base address in the 9x5 processors lives at 1M, not 4M, where SMD is, as defined later in the same file. The ROM includes some tables that are used to build error-correction data for NAND memory. By using the wrong address, we get wrong data and the result is undetected bit flips (data at 0x408000 is all zeroes). Thus, even though our kernel was fixing bit errors in NAND, barebox was not fixing them. With UBI (our situation) we got I/O errors because the checksum verification for data nodes failed. Using the proper address corrects the problem: barebox reports a "bitflip" message, consistent with the kernel message for the same file, and the files are properly loaded and booted. Note: the kernel has the same wrong define, but then the magic number 0x00108000 as spelled in arch/arm/boot/dts/at91sam9x5.dtsi is used instead of the symbolic name. Signed-off-by: Edoardo Scaglia <scaglia@amelchem.com> Signed-off-by: Federico Braghiroli <braghiroli@amelchem.com> Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd denali: pass col argument to READID operationEnrico Jorns2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A read id operation followed by 0x00 reads the device ID while a read id operation followed by 0x20 reads the possible ONFI identifier. As the READID function did not propagate the second id parameter but had a hard-coded call for 0x90 0x00, reading the ONFI identifier was not possible and thus chips werde not detected (tested with MT29F8G08ABABAWP) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd nand_denali: Add denali nand driverEnrico Jorns2015-09-235-0/+2188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is based on the denali driver from the linux kernel Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd nand: added 'bits_per_cell' propertyEnrico Jorns2015-09-232-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This one is available in the kernel and used by the denali driver Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc'Sascha Hauer2015-10-0717-25/+32
|\ \ \ \
| * | | | commands: ls: use 14 digits for filesizeAntony Pavlov2015-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 10 digits are not enough for modern SATA/USB storages. E.g.: barebox> ls -l /dev/ cr-------- 500107862016 ata0 cr-------- 33554432 ata0.0 cr-------- 500073258496 ata0.1 cr-------- 32224837632 disk0 cr-------- 67108864 disk0.0 cr-------- 32156680192 disk0.1 14 digits look much better. E.g.: barebox> ls -l /dev/ cr-------- 500107862016 ata0 cr-------- 33554432 ata0.0 cr-------- 500073258496 ata0.1 cr-------- 32224837632 disk0 cr-------- 67108864 disk0.0 cr-------- 32156680192 disk0.1 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | fs: syntax fix in ramfs.cStefan Christ2015-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: imx-hdmi: Remove unused 'regmap' structureFabio Estevam2015-10-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As regmap is not used in Barebox we can remove this field from the imx_hdmi struct. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ubiformat: remove dead codeJan Remmet2015-09-291-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | divisor isn't used. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>