summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dts: update to v4.9-rc1Sascha Hauer2016-10-18832-7368/+34605
| | | | 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>
| * | | | scripts: kwboot: shorten delay between two boot messagesUwe Kleine-König2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Together with the previous changes that allow to handle the scenario where too many messages were sent, this greatly improves the probability to hit the time window during which the CPU accepts a boot message. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | scripts: kwboot: improve diagnostic outputUwe Kleine-König2016-10-041-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After entering uart boot mode the CPU prints some diagnostic messages. Showing them to the user helps her to notice when the message window was missed or there is an other problem. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | scripts: kwboot: flush input and output only onceUwe Kleine-König2016-10-041-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When flushing input before sending of a boot message the acknowledging reply for the previous message from the CPU might be discarded and so missed. So only flush once before sending boot messages in a loop. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | scripts: kwboot: try to resync on packet boundary after receiving a NAKUwe Kleine-König2016-10-041-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we sent the boot message too often the CPU might already have started to interpret this as an xmodem packet. As sender and receiver are not in sync it's impossible to transfer a packet successfully. So when we get a NAK send '\xff' bytes until the receiver reaches the packet boundary. When we send too many the SoC replies with a NAK for each byte and doesn't interpret it as the start of a new package (which must start with SOH == '\x01'). A slower alternative would be to wait for another NAK which is sent when reception of the already started packet times out. This was tested on an Armada XP based machine with bootrom version 1.20. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: mvneta: clean txdesc before usageUwe Kleine-König2016-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes tx error detection which triggered way too often because the hardware doesn't seem to clear the error bits on success Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: mvebu: select HAVE_DEFAULT_ENVIRONMENT_NEWUwe Kleine-König2016-09-162-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the available boards for mvebu has any environment additions, so this is safe. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: mvebu_defconfig: enable all machines, AEABI, nand and net driverUwe Kleine-König2016-09-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: mvebu_defconfig: oldconfigUwe Kleine-König2016-09-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the result of make mvebu_defconfig make savedefconfig mv defconfig arch/arm/configs/mvebu_defconfig . Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mtd'Sascha Hauer2016-10-101-30/+26
|\ \ \ \ \
| * | | | | nand: denali: get rid of compile-time debug informationSteffen Trumtrar2016-09-261-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dev_dbgs containing __FILE__ and __LINE__ and no other interesting debug informations. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | nand: denali: use is_timeout in while loopSteffen Trumtrar2016-09-261-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using udelay and a countdown, use the is_timeout function. Also, move the code closer to the kernel version, i.e. check for the correct bank and clean the interrupt status. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>