summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2016.11.0v2016.11.0Sascha Hauer2016-11-111-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: of_find_path: Add support for new partition bindingSascha Hauer2016-11-111-1/+6
| | | | | | | The partitions now may be in a subnode of the actual device node. Eventually go another step up in the hierarchy if required. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: partitions: Support new bindingSascha Hauer2016-11-111-0/+7
| | | | | | | The new binding recommends to put the partitions into a subnode with compatible "fixed-partitions". Add support for this binding. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: add MX25U2033EAlexander Kurz2016-11-111-0/+1
| | | | | | | This chip can be found in 4th generation Kindle devices Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: nand_mxs: Fix readtotal calculationChristian Hemp2016-11-111-4/+4
| | | | | | | | | | | | | | | | | | | | | The calculation of readtotal must be bit alligend. If not the bch core finds bit flips in every page, because readtotal is too small. This bug was mostly introduced since commit "51061a9 mtd: nand: nand_mxs: Add subpage read support". Tested with: nand: NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD/Spansion S34ML08G2), 1024MiB, page size: 2048, OOB size: 128 nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron MT29F4G08ABADAWP), 512MiB, page size: 2048, OOB size: 64 nand: NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit), 1024MiB, page size: 2048, OOB size: 64 Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Make UBI detection more robustSascha Hauer2016-11-111-11/+24
| | | | | | | | | | | | | When we want to detect if a mtd device contains an UBI image then testing the first block is not enough since it can always happen that UBI has just erased the block before the power failed during last boot. Since UBI only ever erases one block at a time and directly writes the ec header to it afterwards, it shouldn't be necessary to scan the whole device for UBI data. Scan the first 64 blocks. The first non-empty block then must contain UBI data, if instead we find foreign data we assume that no UBI is on that mtd device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand: imx6: Changed default NAND clockDaniel Schultz2016-11-111-1/+1
| | | | | | | | | | | | | | | The Barebox recognized false bad erase blocks while booting from a Spansion NAND (1). This error occurred due a to high clock. The Kernel sets the default NAND clock to 22Mhz. So, to fix this error and to be more identical with the Kernel, the Barebox should be too. 1: nand: NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD/Spansion S34ML08G2), 1024MiB, page size: 2048, OOB size: 128 Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Tested-by: Stefan Lengfeld <s.lengfeld@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Fix appended device tree when CONFIG_OFTREE is enabledSascha Hauer2016-11-081-2/+10
| | | | | | | | | When CONFIG_OFTREE is enabled the appended device tree is unflattened and put into data->of_root_node, but there it is never used again. To actually use the appended device tree put it into data->oftree instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: fix state is not saved when string variable is changedStefan Lengfeld2016-11-031-1/+1
| | | | | | | The dirty flag was not set properly. Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: riotboard: fix barebox partition sizeLucas Stach2016-11-031-1/+1
| | | | | | | | | This was missed when updating all the partition sizes. The environment partition has been moved to the correct location, but the barebox partition size remained unchanged. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: e1000: fix i210 register remappingLucas Stach2016-11-031-3/+2
| | | | | | | | | | Don't mask out the remapping flag before checking the register offset, otherwise none of the switch statements will ever match. Fixes: ff6a64d42ffc (e1000: Consolidate register offset fixups) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: ubi: enable thread earlierSascha Hauer2016-10-191-9/+5
| | | | | | | | | | | Since "57cebc4 mtd: ubi: Fix scrubbing during attach" we make sure that the wear level worker does not start too early. However, now there are cases when the worker starts too late. When a ubi image is freshly written a volume may be autoresized. This has to be done after the wear level worker is started because otherwise the initial fastmap update will not be able to find any anchor PEBs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: bootm: Fix free_mem calculation when initrd is givenSascha Hauer2016-10-181-1/+1
| | | | | | | | | | | | | | When a initrd is given we calculate the next free memory position as: free_mem = PAGE_ALIGN(initrd_end); This is wrong when initrd_end exactly falls on a page boundary. In this case PAGE_ALIGN() does nothing and free_mem becomes initrd_end and the following bootm_load_devicetree() and thus booting fails with -ENOMEM. Fix this by correctly advancing to the next free memory position. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX Freescale Sabrelite: Use correct device tree for dl variantSascha Hauer2016-10-171-2/+2
| | | | | | | The i.MX6dl variant also uses the i.MX6q device tree which is wrong. Use the correct one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: add '-w' parameter to usage help textYegor Yefremov2016-10-121-1/+1
| | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: ubi: Fix scrubbing during attachSascha Hauer2016-10-113-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | ensure_wear_leveling() is called at the end of ubi_wl_init() and may come to the decision to scrub some blocks. In the Kernel this is done in a separate thread, but in barebox we do this synchronously. The problem is that during ubi_wl_init() the EBA system is not yet initialized (ubi_eba_init() is not yet called), so the wear level worker hits a NULL pointer deref when the fastmap needs to be updated and ubi_write_fastmap() accesses vol->eba_tbl. Solve this by honoring the ubi->thread_enabled flag which is only set to true when UBI is sufficiently initialized. This means we now can have multiple works queued, so we can no longer simply do one work when queued, but instead have to continue to do work until all work is done. The best place to do so is a ubi_thread() function which behaves similar to the Kernel function with the same name, but is called synchronously in barebox. To make sure that the initially queued works are done, the call to (no-op) wake_up_process() at the end of ubi_attach_mtd_dev() is replaced with a call to ubi_thread(). While at it also honor the ubi->ro_mode flag to make sure we do not do any wear leveling work on readonly UBI devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx6: add support for Auvidea H100Lucas Stach2016-10-115-2/+102
| | | | | | | | | | | The Auvidea H100 is a baseboard for the SolidRun MicroSOM, which provides HDMI IN/OUT capabilities. Currently supported is only a combination of the H100 baseboard with a i2eX MicroSOM. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: microsom: use imx6q_barebox_entryLucas Stach2016-10-111-7/+6
| | | | | | | Instead of hardcoding the different RAM sizes. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2016-10-1015-39/+314
|\
| * usb: imx-us-phy: implement notify_(dis)concectSascha Hauer2016-09-291-0/+27
| | | | | | | | | | | | | | | | | | | | | | The i.MX6 USB phy does not recognize disconnects of high speed devices when the USBPHY_CTRL_ENHOSTDISCONDETECT is not set. The phy does not work properly though when this bit is always set, so implement the notify_(dis)concect() callbacks to set this bit whenever a high speed device is connected and to clear it again when the device is disconnected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-us-phy: Convert driver to generic phy supportSascha Hauer2016-09-295-4/+70
| | | | | | | | | | | | | | The generic phy layer now supports USB phys, so convert the driver over to use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Add usb-nop-xceiv supportSascha Hauer2016-09-293-4/+116
| | | | | | | | | | | | | | | | | | Add a nop usb transcveiver driver. At the moment it does nothing, so is nothing more than a driver to satisfy the device tree dependencies. clk / vbus-regulator / vbus-detect-gpio support can be added later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Introduce to_usbphy conversion functionSascha Hauer2016-09-292-0/+20
| | | | | | | | | | | | | | | | | | | | The generic phy support layer has the necessary list handling and phy retrieval functions, so we should reuse them for usb phys. This adds a phy_to_usbphy() conversion function which drivers can implement which attach to the generic phy layer and are really usb phys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Introduce of_phy_get_by_phandleSascha Hauer2016-09-292-0/+44
| | | | | | | | | | | | | | | | | | Currently generic phy support assumes that the standard phy binding from dts/Bindings/phy/phy-bindings.txt is used. This adds a helper function which can be used to retrieve a phy when this standard binding is not used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-usb-phy: Drop unnecessary read/modify/writeSascha Hauer2016-09-291-5/+2
| | | | | | | | | | | | | | When writing to the USBPHY_CTRL register read/modify/write is unncessary since we are writing to the associated bit set register anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci: forward phy given in registration data to hostSascha Hauer2016-09-292-0/+2
| | | | | | | | | | | | | | Allow to pass a phy in the registration data and forward it to the usb_host structure. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: Add usb phy to usb hostSascha Hauer2016-09-292-0/+9
| | | | | | | | | | | | | | | | Add a struct usb_phy * member to struct usb_host. Also, call usb_phy_notify_connect() / usb_phy_notify_disconnect() when there are connection changes on the root hub. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: Use standard debug macroSascha Hauer2016-09-281-27/+25
| | | | | | | | | | | | Use standard pr_debug instead of homebrew USB_PRINTF Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubi'Sascha Hauer2016-10-105-22/+302
|\ \
| * | mtd: ubi: commands: added the new command 'ubirename'.Giorgio Dal Molin2016-09-271-0/+77
| | | | | | | | | | | | | | | Signed-off-by: Giorgio Dal Molin <iw3gtf@arcor.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: add API call to rename volumes.Giorgio Dal Molin2016-09-273-0/+160
| | | | | | | | | | | | | | | Signed-off-by: Giorgio Dal Molin <iw3gtf@arcor.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: remove now unused ioctlsSascha Hauer2016-09-271-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | The only ioctl needed is the one to get the ubi_num from a file descriptor. The remaining ioctls are now implemented as regular function calls. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: commands: use function API to access ubi volumesSascha Hauer2016-09-271-9/+30
| | | | | | | | | | | | | | | | | | We have a function API to manipulate ubi volumes, use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: introduce barebox specific ioctl to get ubi_numSascha Hauer2016-09-222-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Code wishing to manipulate ubi devices from outside the ubi layer needs the ubi_num as reference. Add an ioctl to get the ubi_num from a filedescriptor. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: Add API calls to create/remove volumesSascha Hauer2016-09-222-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use a ioctl API to create/remove ubi volumes. This means we always have to carry all function code for ubi volume manipulation when the ioctl is compiled in. This adds a function API to create/remove volumes so that the linker can throw the unused code away later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/state'Sascha Hauer2016-10-104-32/+40
|\ \ \
| * | | state: consistently pass one type as private data to dev_add_param_*Sascha Hauer2016-09-201-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The different dev_add_param_* calls all use different types as private data. This is unnecessary, use struct state_variable * for all of them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: make locally used function staticSascha Hauer2016-09-202-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | state_set_dirty() is only used in one file, make it static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: Add state to state_variableSascha Hauer2016-09-202-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A state variable should know which state it belongs to. Add field for it to struct state_variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: fix finding the correct parent nodeMichael Olbrich2016-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looking for the parent node during fixup is broken. The path of the parent node is not correctly terminated ('0' vs '\0'). Also, the new state node should be added to the supplied device tree not the barebox device tree used by of_find_node_by_path(). Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: don't keep pointers to device tree nodesMichael Olbrich2016-09-202-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caching pointers to device tree nodes or is not save. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. As a result, the node may be deleted and replaced with a new one. Keep a copy of the full path instead and resolve the node as needed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: copy backend of_path stringMichael Olbrich2016-09-202-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caching pointers to device tree nodes or names is not safe. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. As a result, the string may be deleted. Use local copies of the full path instead. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mvebu'Sascha Hauer2016-10-1017-58/+329
|\ \ \ \
| * | | | ARM: mvebu: document some general mvebu stuff and the rn2120 boardUwe Kleine-König2016-10-072-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: mvebu: add support for Netgear RN2120Uwe Kleine-König2016-10-079-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | pinctrl: mvebu: armada-370 fix gpio name for mpp63Uwe Kleine-König2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was found that pin 63 also works as input and so the respective function is renamed from "gpo" to "gpio". The respective commit in Linux is: a526973e0291 ("pinctrl: mvebu: Fix mapping of pin 63 (gpo -> gpio)") which appeared in v4.1-rc3. The devicetrees are fixed accordingly since commit ce5cad51f381 ("ARM: dts: armada-370: Update the mpp63 function in the device tree on Armada 370") which appeared in v4.6-rc1. This fixes a runtime warning on the affected machines (globalscale-mirabox and netgear-rn104) and makes the pin functional again. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | pinctrl: mvebu: add newline to error messageUwe Kleine-König2016-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | images: mvebu: don't generate uart imagesUwe Kleine-König2016-10-041-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kwboot knows how to work with an image for a different boot medium now. So there is no reason to generate a dedicated UART image any more. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | scripts: kwboot: set boot source to UART before sendingUwe Kleine-König2016-10-041-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending an image that specifies one of the alternative boot sources doesn't make sense. So change the boot source to UART on the fly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | scripts: kwboot: simplify kwboot_mmap_imageUwe Kleine-König2016-10-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was only a single caller who passes prot=PROT_READ unconditionally. So drop this parameter and simplify accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>