summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dts: update to v4.5-rc1Sascha Hauer2016-02-04646-5162/+38992
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dts: update to v4.4Sascha Hauer2016-02-044-7/+38
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dts: update to v4.4-rc8Sascha Hauer2016-02-041-3/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dts: update to v4.4-rc7Sascha Hauer2016-02-049-9/+14
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dts: update to v4.4-rc6Sascha Hauer2016-02-045-9/+14
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dts: update to v4.4-rc5Sascha Hauer2016-02-0422-23/+1326
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX53: CCXMX53: Move device tree out of dts/Sascha Hauer2016-02-044-329/+314
| | | | | | | The dts files accidently have been added to dts/. Move them to a proper place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: imx53-guf-vincell-lt: dts: do not specfiy fixed memory informationEnrico Jorns2016-01-262-8/+0
| | | | | | | | | | | Setting a fixed memory size prevents from using the different board variants with different memories equipped. barebox is able to read RAM size informations from the imx53 RAM controller and thus does not require this information passed via dts. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: PXA: move HAVE_CLK selectLucas Stach2016-01-192-1/+1
| | | | | | | | | | | | Claiming that all of PXA has CLK implemented, while only PXA3XX selects the relevant clock implementations causes lots of build failures for the other PXA architectures. Fix it by moving the HAVE_CLK select to the one PXA arch, that actually has it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: hmac: fix error message that algo is displayedMarc Kleine-Budde2016-01-181-4/+4
| | | | | | | | | This patch moves the error message about missing crypto support so that the used crypto algo is printed. Without this patch the algo is always shown as a NULL pointer. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx233-olinuxino: Fix mx23_power_init() argumentsFabio Estevam2016-01-121-1/+1
| | | | | | | | | | | | | Commit 4d70da6 ("ARM: MXS: power-init: Add parameters to mx28_power_init()") causes imx233-olinuxino to not boot anymore. imx233-olinuxino is commonly powered from external input supply, so adjust the mx23_power_init() arguments to reflect that. Reported-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hush: Initialize struct p_contextSascha Hauer2016-01-111-3/+3
| | | | | | | The hush context must be initialized before it is used. Add initialization where necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2016-01-112-5/+7
|\
| * socfpga: Allow setting partition xloader boots from for mmcTrent Piepho2015-12-142-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xloader boots the 2nd stage barebox from socfpga_barebox_part when using NOR. But when using MMC it boots from a hardcoded "disk0.1". Add the mmc device name to the partition description and use it for mmc booting. Add an extern declaration of socfpga_barebox_part to the socfpga header so that a board can change it to use a different partition. Initialize socfpga_barebox_part to the default value instead of NULL to avoid the NULL check later. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rtc'Sascha Hauer2016-01-1113-9/+472
|\ \
| * | commands/hwclock: Check return value of rtc_read_time()Andrey Smirnov2016-01-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible for rtc_read_time() to fill struct rtc_time it returns with invalid values, so we have to check for its return value before using returned time. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc-lib: Check tm_wday for validity in rtc_valid_tm()Andrey Smirnov2016-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTC drivers rely on rtc_valid_tm() in order to make sure that no bogus values from uninitialized HW registers get passed to the uppper layers. A somewhat contrived way to reproduce this problem with DS1307 RTC would be to do the following: > i2c_write -b <bus> -a <addr> -r 3 0x00 > hwclock Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc: ds1307: Fix a memory leakAndrey Smirnov2016-01-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Several failure paths would result in control being transfered to 'exit' label, so instead of just returning error codes in those cases we also need to free the memory allocated for 'ds1307' Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc: ds1307: Add code to support ds1337/1341Andrey Smirnov2016-01-071-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | Port DS1337 specific bits from corresponding Linux driver and add small changes needed for DS1341. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc: Add Abracon driverSascha Hauer2016-01-073-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Abracon ab-rtcmc-32.768khz-eoz9-s3 RTC. The driver can probably support other Abracon RTCs aswell, but this hasn't been verified. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hwclock: Allow to set hwclock from sntpSascha Hauer2016-01-071-1/+26
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: Add SNTP supportSascha Hauer2016-01-074-0/+184
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for retrieving the time via Simple Network Time Protocol (SNTP). No fancy features are supported, only plainly getting the current time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc: Fill in weekdays before setting timeSascha Hauer2016-01-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Some rtcs store the weekday. Make sure it's filled in correctly before passinf the time to the driver. This is easily done by converting it to seconds-since-epoch and back to struct rtc_time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc: Check time for validity before passing it to the rtc driverSascha Hauer2016-01-071-0/+3
| | | | | | | | | | | | | | | | | | So that rtc drivers do not get invalid times. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hwclock command: forward return value of rtc_set_timeSascha Hauer2016-01-071-2/+1
| | | | | | | | | | | | | | | | | | rtc_set_time can fail, forward the error to the user. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hwclock command: use format like the Linux tool doesSascha Hauer2016-01-073-3/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print three-letter abbreviations of the days and months. With a fixup by Andrey Smirnov: | common/date.c: Fix off-by-one error | | As per http://pubs.opengroup.org/onlinepubs/007908775/xsh/time.h.html | 'tm_wday' is zero indexed with zero representing Sunday, this is also | corroborated by the code in rtc_time_to_tm() which used 4 to represent | Thursday. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pstore'Sascha Hauer2016-01-1129-66/+2689
|\ \
| * | Documentation: Document pstore/RAMOOPSMarkus Pargmann2015-12-111-0/+76
| | | | | | | | | | | | | | | | | | | | | Add some documentation about behaviour and setup of pstore/RAMOOPS. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs: Add pstore filesystemMarkus Pargmann2015-12-1012-0/+1650
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pstore is a persistent storage filesystem used for RAMOOPS. It is used to store console logs, panics, ftrace and other information in case of a crash/panic/oops/reboot. pstore is implemented for barebox as a read-only filesystem at the moment. It may be extended later on. The idea is to provide a way to extract essential data from the last running kernel. Most of the code is copied from the kernel. However this is only a lightweight implementation without real write support yet. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: Add RAMOOPS memory areaMarkus Pargmann2015-12-102-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RAMOOPS is a driver that uses a reserved static memory region to store the data from the last panic or boot. This helps to debug crashes at the next boot while preserving the boot messages. To guarantee a memory area that is not altered by barebox or the kernel, this area is located at the end of the RAM right after barebox and before the STACK. This ensures that changing barebox sizes do not interfere with RAMOOPS. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: start: Add visible sdram region for barebox board dataMarkus Pargmann2015-12-101-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to understand and find problems with the memory layout of barebox. It adds another entry for the board data that barebox allocated. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: Clarify memory layout calculationMarkus Pargmann2015-12-104-65/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The memory calculations used are all hardcoded into three different files, start-pbl.c, uncompress.c and start.c. To make this more readable and reliable, this patch gathers these information in barebox-arm.h with static inline functions for the calculation of the memory offsets. This patch also adds proper handling of different barebox/board data sizes. Currently only 1MB+Alignment of RAM is reserved for Barebox and board data. This could be too small for bigger devicetrees and barebox. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: Import reed solomon code from kernelMarkus Pargmann2015-12-107-0/+807
| | | | | | | | | | | | | | | | | | | | | | | | reed solomon code is used by RAMOOPS to check and fix data stored in volatile memory. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | vsprintf: Add scnprintf from kernelMarkus Pargmann2015-12-102-0/+25
| | | | | | | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | printk: Add missing include/declarationMarkus Pargmann2015-12-101-0/+3
| | | | | | | | | | | | | | | | | | | | | There are functions or structs used that do need these. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | log2: Add missing __rounddown_pow_of_two()Markus Pargmann2015-12-101-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: boards: karo-tx6x remove definition of DIV_ROUND_UPMarkus Pargmann2015-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | DIV_ROUND_UP is defined in include/linux/kernel.h. Use that instead. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/net'Sascha Hauer2016-01-113-90/+67
|\ \ \
| * | | net: resolv: Make argument constSascha Hauer2015-12-142-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | resolv() is not allowed to change the hostname argument, make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: dhcp: make unmodified variable constSascha Hauer2015-12-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'str' in dhcp_set_string_options is never modified, so make it const. With this we no longer have to cast away the const returned from getenv. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: dhcp: simplify dhcp_options_processSascha Hauer2015-12-141-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dhcp_options_handle returns the index into the dhcp_options array. This is only to be able in the caller to print a debug message when the index returned from dhcp_options_handle is out of bounds. Simplify this by printing the debug message in dhcp_options_handle and not in the caller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: dhcp: unify options and paramsSascha Hauer2015-12-141-77/+57
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The dhcp code distinguishes between options and params. If sent to the server they are params, if received from the server they are options. Unify them all to be options. If it has a handle_param callback it's a param, if it has a handle callback it's an option. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd'Sascha Hauer2016-01-113-2/+173
|\ \ \
| * | | mtd: gpmi: Add erased page bitflip correctionMarkus Pargmann2016-01-041-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware ECC does not work for erased pages. However as soon as something that is not 0xff is found in the page, hardware ECC assumes this is valid data and produces an uncorrectable error ECC status. We can use that to check for bitflips in erased pages and fix them if the number of flipped bits is below the ecc_strength. We need to move the memcpy above the for loop to be able to access the buffer directly. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: Add erased page bitflip check helper functionsMarkus Pargmann2016-01-042-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the bitflip check helper functions from the kernel. They are used to check for bitflips in erased pages and correct them in the buffer so that UBI can work with it. Unfortunately most nand controllers do not have ECC for erased pages and don't do this on their own. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc'Sascha Hauer2016-01-1128-210/+354
|\ \ \ \
| * | | | usb: chipidea-imx: check return value of regulator_get()David Jander2016-01-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VBUS regulator is optional for the chipidea-imx glue, so it must be checked if regulator_get provided a valid regulator handle before trying to enable the regulator. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | PCI: imx6: properly shut down core when leaving bareboxLucas Stach2016-01-081-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the i.MX6 PCIe core doesn't have a software reachable reset wired up, it's hard for any driver to get the core into a known good state. To make it easier for whatever software follows barebox, bring back the core into a safe state before leaving barebox. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | i.MX6: pci: Avoid aborts when asserting PCIe resetAndrey Smirnov2016-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting Barebox in the HW environment where PCIe core has been used but not properly shut down, writing to PCIE_PL_PFLR in imx6_pcie_assert_core_reset would cause data abort exception. The problem can be easily reproduced on a i.MX6 based board with PCIe slot populated with some device by doing: > bootm -f -e 0x1050 <your board's>.img Ignoring this exception seem to allow PCIe core to successfully initialize and enumerate devices properly. This is also how Linux Kernel version of the driver handles this situation -- it installs dummy no-op abort handler at the beginning of device's probing. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | i.MX6: pci: Reconcile imx6_pcie_start_link with the kernel codeAndrey Smirnov2016-01-081-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reconcile imx6_pcie_start_link with almost identical imx6_pcie_establish_link from analogous Linux kernel driver. This change is purely cosmetical, but refactoring the code this way simplifies implementation comparison. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>