summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2017.04.0v2017.04.0Sascha Hauer2017-04-071-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nvvar: Fix creation without valueSascha Hauer2017-04-071-3/+9
| | | | | | | | | | When a new nvvar is added without a value we want to get the value from the corresponding globalvar. We do this by using nv_set which ends up freeing the exact string that we passed into nv_set as value. This results in a corrupt value. Fix this by assigning a value manually without calling nv_set. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* openrisc: fix call to restart_handler_register_fnFranck Jullien2017-03-301-1/+1
| | | | | Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: fix usbserial re-connectAlexander Kurz2017-03-291-1/+3
| | | | | | | | | | | | | | | | With commit b4f55fcf355a ("console: expose consoles in devfs") consoles got inserted, but never removed from devfs. When dealing with USB consoles, barebox should be prepared for devices spontaneously appering and disappering again (user disconnects and re- connects the cable). If the devfs entry is not removed upon disconnect, barebox will raise an error "device creation failed with File exists" when the cable is connected again. Remove devfs entries when consoles are de-registered. Also change the error message, it's the devfs entry. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: console_get_by_name: do not strcmp NULLAlexander Kurz2017-03-291-1/+1
| | | | | | | | | | | | | console_get_by_name iterates through the console_list using strcmp to mach a given console by name. console_list may contain entries with devname = NULL, inserted there e.g. by KEYBOARD_GPIO. In worst case loady -t usbserial will crash barebox when strcmp hits 0 NULL devname: > unable to handle NULL pointer dereference at address 0x00000000 Let console_get_by_name just ignore the anonymous consoles. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: backend circular: Fix wrong commentSascha Hauer2017-03-271-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb_kbd: release all keys on error / disconnectPeter Mamonov2017-03-241-0/+11
| | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: bucket_circular: -EUCLEAN means data could be readSascha Hauer2017-03-231-1/+1
| | | | | | | | -EUCLEAN returned from state_mtd_peb_read() means that the data shall still be used. This fixes initialization of buckets which need cleanup Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: bucket_cached: Fix reading pages which need cleanupSascha Hauer2017-03-231-4/+4
| | | | | | | | When the raw device returns -EUCLEAN we have to return successfully to the upper layer, otherwise it will discard the data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: fix reading data from page that needs cleanupSascha Hauer2017-03-231-4/+3
| | | | | | | | mtd_read´() returns -EUCLEAN to indicate that a page needs cleanup. This value shouldn't be returned from the mtd read file operation since this should return the number of bytes read. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mvebu: only build kwbootimage support if BOOTM is enabledLucas Stach2017-03-221-1/+1
| | | | | | | | As this is the bootm image handler implementation for the kwbootimage it is of no use if BOOTM is missing and fails to link. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA: mvebu: select DISK_ATALucas Stach2017-03-221-0/+1
| | | | | | | The already selected DISK_IDE_SFF depends on it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add AFLAGS for secure monitor filesLucas Stach2017-03-221-0/+2
| | | | | | | The instructions used in those files are only supported on ARMv7. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: dts: i.MX7 WaRP7: remove wdog1 pinctrl workaroundAlexander Kurz2017-03-201-17/+0
| | | | | | | | | The wdog1 pinctrl got fixed with linux upstream commit 213e51ca8df1 ("ARM: dts: imx7: Add "LPSR" to LPSR iomux pin names"). Remove the old workaround, since it triggers a build error. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX7: Kconfig: ARCH_IMX7 selects PINCTRL_IMX_IOMUX_V3Alexander Kurz2017-03-201-0/+1
| | | | | | | | fsl,imx7d-iomuxc is provided by selecting PINCTRL_IMX_IOMUX_V3. Select it since a system without it will not be very usefull. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* efi: clocksoure: make sure the meassured frequency is validMichael Olbrich2017-03-151-0/+4
| | | | | | | | | Some EFI implementations have a even slower tick rate and the meassured frequency may be zero. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: baltos: define baltos_sram_init() return type as voidYegor Yefremov2017-03-131-1/+1
| | | | | | | | As stated in the routine's description this routine is to return void, hence fix its declaration to remove compiler warning. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix: console: expose consoles in devfsJean-Christophe PLAGNIOL-VILLARD2017-03-131-1/+1
| | | | | | | | | | | | | | | | on 64bit ssize_t is not an int but a long so use the protype for fops_write ssize_t common/console.c: In function ‘console_register’: common/console.c:373:22: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] newcdev->fops.write = fops_write; in commit b4f55fcf355a4d0ac456445a5f42f259f2812b57 By Bastian Stender <bst@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2017-03-1315-38/+3404
|\
| * video: make enable/disable ops optionalJean-Christophe PLAGNIOL-VILLARD2017-03-101-2/+4
| | | | | | | | | | | | | | | | Some framebuffers cannot be enabled/disabled, so make the corresponding ops optional. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: call fb_[en|dis]able instead of fops directlySascha Hauer2017-03-101-3/+5
| | | | | | | | | | | | | | | | We have fb_enable and fb_disable which handle enabling of a framebuffer, so use it instead of calling into the ops directly. This gets the enable count straight. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: add support for Solomon SSD1307 OLED controller familyBastian Stender2017-03-063-0/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was ported from linux v4.10. Like the kernel driver only communication via I2C is supported. It has only been tested with a SSD1306 and a 96x16 OLED display: &i2c0 { status = "okay"; ssd1306: oled@3c { compatible = "solomon,ssd1306fb-i2c"; reg = <0x3c>; reset-gpios = <&gpio1 1 0>; solomon,height = <16>; solomon,width = <96>; solomon,page-offset = <0>; solomon,com-invdir; solomon,com-seq; }; Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fb: introduce flush for virtual framebufferBastian Stender2017-02-284-0/+32
| | | | | | | | | | | | | | | | | | | | | | Some drivers need an explicit sync method to flush the virtual framebuffer to the display. It is called fb_flush(). fb_flush() gets called on fbc_putc, on fb_close and in the pattern cycle in the fbtest command. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: expose consoles in devfsBastian Stender2017-02-282-0/+56
| | | | | | | | | | | | | | | | | | This enables displaying text on e.g. a framebuffer console by issueing echo -o /dev/fbconsole0 abc123 Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: replace set_active by open/closeBastian Stender2017-02-284-23/+85
| | | | | | | | | | | | | | | | | | Opening and closing consoles should be independent from setting them active. This way it is possible to open e.g. a framebuffer console and display text on it without showing stdout/stderr. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fbconsole: implement vt100 cursor shown/hiddenBastian Stender2017-02-281-5/+50
| | | | | | | | | | | | | | | | | | This implements the vt100 show cursor command '[?25h' and the hide cursor command '[?25l'. It is useful for displaying text on a non-active (no stdout/stdin/stderr) console with 'echo'. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fbconsole: check cursor position before movingBastian Stender2017-02-281-2/+5
| | | | | | | | | | | | | | | | | | | | Moving the cursor to x=2, y=2 with "\e[3;3H" on a 12x2 framebuffer console lead to a barebox crash while drawing the cursor. If the cursor position is out of bounds clip the cursor to the corresponding edge. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * lib/fonts: add VGA8x8 fontBastian Stender2017-02-243-0/+2592
| | | | | | | | | | | | | | | | | | Ported from Linux v4.10. This font is ideal for displaying a framebuffer console on a small display. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * 2d-primitives: check dimensions in __illuminateBastian Stender2017-02-241-0/+3
| | | | | | | | | | | | | | | | gl_draw_circle draws outside of the screen if the resolution is too low. This lead to memory corruption. Check the dimensions before drawing. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * graphic_utils: do not allocate info in fb_openBastian Stender2017-02-241-3/+0
| | | | | | | | | | | | | | | | info was errorneously allocated, but it really is a pointer to a fb_info struct from the framebuffer. This fixes a memory leak. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * graphic_utils: implement 8 bpp color depth in gu_set_pixelBastian Stender2017-02-241-0/+1
| | | | | | | | | | Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb'Sascha Hauer2017-03-133-8/+36
|\ \
| * | usb: gadget: properly release f_multi_optsSascha Hauer2017-03-093-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usbgadget commands uses statically allocated f_multi_opts and passes this to usb_multi_register(). These f_multi_opts are of course no longer valid when we leave the usbgadget command. Luckily we do not use the data after we left the usbgadget command, so this never has been a problem. However, f_multi_opts has some allocated members which we can not free anymore on gadget unregistration because we no longer have the pointer to them. Fix this by adding a release function to struct f_multi_opts. This way we can allocate all memory dynamically and properly free it when not used anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: print a meaningful error messageSascha Hauer2017-03-091-0/+5
| | | | | | | | | | | | | | | | | | | | | We can only register one USB multi gadget, so check for it being already registered and print a meaningful error message if it is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/rpi'Sascha Hauer2017-03-1326-293/+326
|\ \ \
| * | | ARM: rpi: switch to DT probe and multi-image buildLucas Stach2017-03-0214-173/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit switches the RaspberryPi arch over to probe Barebox from the builtin DT and enables multi-image builds. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: move debug UART base selection to KconfigLucas Stach2017-03-022-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To let the user select the right base, when building multi-image. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: always build relocatable imageLucas Stach2017-03-022-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes more space available for the malloc area and will allow to switch to multi-image later on. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci-bcm2835: enable devicetree probingEnrico Joerns2017-03-021-0/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Enrico Joerns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clocksource: bcm2835: use clock-frequency property when availableEnrico Joerns2017-03-021-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the clock frequency is given by a DT property, use this and don't try to use the clock handle. Signed-off-by: Enrico Joerns <ejo@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: convert watchdog/reset to regular driverLucas Stach2017-03-026-21/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way it can be probed from DT later on. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: convert mailbox interface to regular driverLucas Stach2017-03-025-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In prepareation for devicetree probing. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: move model detection before console initLucas Stach2017-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we can print the correct model in the Barebox banner. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: move model initialisation to rpi-commonEnrico Joerns2017-03-025-79/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Raspberry PIs use different versions schemes for the older and newer variants. The decoding arrays for these schemes were split up in rpi.c and rpi2.c. This is not required, as the appropriate versioning scheme can be determined programmatically. Signed-off-by: Enrico Joerns <ejo@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mvebu'Sascha Hauer2017-03-1329-294/+538
|\ \ \ \
| * | | | i2c: mv64xxx: simplify mv64xxx_i2c_wait_for_completionBastian Stender2017-03-021-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two nested while loops are not necessary here, so integrate the read, i2c_fsm and i2c_do_action calls into mv64xxx_i2c_wait_for_completion() and remove the obsolete interrupt remains. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | i2c: mv64xxx: add software delaysBastian Stender2017-03-021-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As stated in Marvell's Functional Specifications in MV-S107021-U0 Rev. A on page 420 ff. software delays are needed. "SW delay represent a delay of at least 2 internal clock cycles". These delays are hereby implemented. The original kernel driver compensates the needed software delays with the time the interrupts take. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mvebu: netgear-rn2120: make use of mvebu_get_initial_int_reg_baseUwe Kleine-König2017-03-021-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary to make second stage booting work when the register window is already moved. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
| * | | | kwbimage_v1: add support to boot a mvebu imageUwe Kleine-König2017-03-022-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just starts the main image of the mvebu image assuming that the header images just setup the RAM. The position of the internal register window is provided in the header as introduced in the previous commit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
| * | | | filetype: Add image type for boot images used on Armada 370 and XPUwe Kleine-König2017-03-022-0/+9
| | | | |