summaryrefslogtreecommitdiffstats
path: root/board/samsung
Commit message (Collapse)AuthorAgeFilesLines
...
| * usb: gadget: Make g_dnl USB settings commonMaxime Ripard2017-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | The g_dnl USB settings for the vendor ID, product ID and manufacturer are actually common settings that can and should be shared by all the gadgets. Make them common by renaming them, and convert all the users. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | treewide: replace with error() with pr_err()Masahiro Yamada2017-10-044-10/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-162-2/+2
| | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename setenv() to env_set()Simon Glass2017-08-163-9/+9
| | | | | | | | We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: Add explicit include of <asm/mach-types.h>Simon Glass2017-06-053-0/+3
| | | | | | | | Rather than relying on common.h to provide this include, which is going away at some point, include it explicitly in each file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* samsung: Move pmic header out of config fileSimon Glass2017-06-011-0/+13
| | | | | | | We should not be including a PMIC header file in the board config. Move it to a C file. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: gpio: Add live tree supportSimon Glass2017-06-012-3/+3
| | | | | | | | | | | Add support for requesting GPIOs with a live device tree. This involves adjusting the function signature for the legacy function gpio_request_by_name_nodev(), so fix up all callers. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes to stm32f746-disco.c: Signed-off-by: Tom Rini <trini@konsulko.com>
* mmc: replace CONFIG_GENERIC_MMC with CONFIG_MMCMasahiro Yamada2017-05-155-6/+6
| | | | | | | | | | | Now CONFIG_GENERIC_MMC and CONFIG_MMC match for all defconfig. We do not need two options for the same feature. Deprecate the former. This commit was generated with the sed script 's/GENERIC_MMC/MMC/' and manual fixup of drivers/mmc/Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge branch 'master' of git://git.denx.de/u-boot-samsungTom Rini2017-04-082-304/+49
|\
| * board: samsung: trats2: remove the board_power_init() functionJaehoon Chung2017-04-071-57/+0
| | | | | | | | | | | | | | | | | | Remove the board_power_init() function. It will be initialized with device-tree. In future, it will be controlled with regulator API. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: trats2: remove the unused functionsJaehoon Chung2017-04-071-18/+0
| | | | | | | | | | | | | | | | Remove the unused functions. Never call the get_soft_i2c_scl/sda_pin() aynwhere. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: trats2: remove the board_i2c_init() functionJaehoon Chung2017-04-071-29/+0
| | | | | | | | | | | | | | | | Remove the board_i2c_init() function. i2c should be initialized with device-tree file. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: trats: remove the i2c_init functionJaehoon Chung2017-04-031-13/+0
| | | | | | | | | | | | | | | | | | i2c should be initialized with device-tree. This function doesn't need anymore. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: trats: convert to driver model for controlling phyJaehoon Chung2017-04-031-27/+48
| | | | | | | | | | | | | | | | Convert to driver model for controlling phy. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: trats: remove the unnecessary codesJaehoon Chung2017-04-031-160/+1
| | | | | | | | | | | | | | | | | | These codes are unnecessary, because max8997 should be initialized with dt-file. Remove max8997_init() function. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | board_f: Drop setup_dram_config() wrapperSimon Glass2017-04-055-5/+15
| | | | | | | | | | | | | | | | By making dram_init_banksize() return an error code we can drop the wrapper. Adjust this and clean up all implementations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* | i2c: Drop CONFIG_SOFT_I2C_MULTI_BUSSimon Glass2017-04-052-60/+0
|/ | | | | | | | | | | | | | | | This is not used by any board. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Clean up board_f sequence a little This series tries to remove #ifdefs from the board_f init sequence. It gets as far as I2C and then we need to discuss whether we can start to remove the old I2C framework. I think that ideally each entry in the init sequence should be enabled by at most one CONFIG, which is in Kconfig and is not arch-specific. END Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
* exynos: Drop large alignment for SDRAM parametersSimon Glass2017-02-101-2/+1
| | | | | | | | | | | We don't ever search for these so there is no need for a 4KB alignment. It just wastes space. Drop this and use the standard 4-byte alignment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* Merge git://git.denx.de/u-boot-samsungTom Rini2017-01-183-124/+125
|\
| * exynos5: Don't potentially undervoltage the CPUSjoerd Simons2017-01-181-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | For snow when chainloading u-boot the CPU seems to be running at full speed. The lower CPU voltage seems to be ok for u-boot, but when booting linux (bringing up all cores) I'm seeing random crashes. Bump the voltage up to a level that's safe for all cpu frequencies. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: universal_c210: remove the codes relevant to soft_i2cJaehoon Chung2017-01-181-11/+0
| | | | | | | | | | | | | | | | | | | | Removes the codes of soft_i2c. There is no usasge for universal_c210, also didn't define CONFIG_SOFT_I2C_GPIO_SCL. This code seems a dead code. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: universal_210: use the driver model for max8998Jaehoon Chung2017-01-181-75/+94
| | | | | | | | | | | | | | | | Revmoe the "ifndef CONFIG_DM_I2C". Intead, use the driver model for max8998. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * board: samsung: goni: fix the pmic's name for gettingJaehoon Chung2017-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | For Getting from uclass, use the "max8998-pmic" as name. It also needs to change the dt-node's name as "max8998-pmic". Otherwise, it doesn't find the pmic device. Because it's only searching for 'max8998_pmic'. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * arm: samsung: goni: use the driver model for max8998Jaehoon Chung2017-01-051-31/+30
| | | | | | | | | | | | | | | | Remove the "ifndef CONFIG_DM_I2C". Instead, use the driver model for max8998. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | mmc: move CONFIG_DWMMC to Kconfig, renaming to CONFIG_MMC_DWMasahiro Yamada2017-01-111-1/+1
|/ | | | | | | | | | | | | | | | | | | | This commit was created as follows: [1] Rename the option with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e 's/CONFIG_DWMMC/CONFIG_MMC_DW/g' [2] create the entry for MMC_DW in drivers/mmc/Kconfig (the prompt and help were copied from Linux) [3] run "tools/moveconfig.py -y MMC_DW" [4] add "depends on MMC_DW" to the MMC_DW_ROCKCHIP entry [5] Clean-up doc/README.socfpga by hand Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
* mmc: move CONFIG_SDHCI to Kconfig, renaming to CONFIG_MMC_SDHCIMasahiro Yamada2016-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Move CONFIG_SDHCI to Kconfig and rename it to CONFIG_MMC_SDHCI. My motivation for the rename is, ultimately, to make all the MMC options prefixed with MMC_ and SDHCI options with MMC_SDHCI_, like Linux. This commit was created as follows: [1] Rename the config option with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e 's/CONFIG_SDHCI/CONFIG_MMC_SDHCI/g' [2] create the entry for MMC_SDHCI in drivers/mmc/Kconfig [3] run "tools/moveconfig.py -y MMC_SDHCI" [4] add "depends on MMC_SDHCI" to existing SDHCI driver entries Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* board: samsung: update the MAINTAINERS fileJaehoon Chung2016-12-275-5/+5
| | | | | | Update the maintainer from Przemyslaw and Lukasz to me. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* arm: samsung: Convert s5p_goni and smdkc100 to DM_I2CSimon Glass2016-12-051-1/+6
| | | | | | | | These are the last two samsung boards that don't use DM_I2C. Move them over, leaving #ifdefs to allow the maintainer to complete this work. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* arm: exynos: i2c: Convert exynos boards to use DM_I2CSimon Glass2016-12-054-12/+52
| | | | | | | | | | Three boards are still not converting to use DM_I2C. They are also using the old PMIC framework. Rather than removing them, add #ifdefs to allow them to continue to build. This will give the maintainers a little more time to decide whether to convert them or not. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* arm: Remove smdk2410 boardSimon Glass2016-12-045-315/+0
| | | | | | | | This board has not been converted to DM_SERIAL by the deadline. Remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Müller <d.mueller@elsoft.ch>
* arch, board: squash lines for immediate returnMasahiro Yamada2016-09-231-7/+1
| | | | | | | | Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com> Reviewed-by: Angelo Dureghello <angelo@sysam.it>
* mtd: OneNAND: allow board init function failLadislav Michl2016-07-223-3/+9
| | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* exynos: video: Drop old unused codeSimon Glass2016-05-251-153/+0
| | | | | | | | | Now that we are using driver model, we can drop the weak functions and LCD init in the board file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* exynos: video: Convert several boards to driver model for videoSimon Glass2016-05-251-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Update several boards to use driver model for video. This involves changes to the EDP and FIMD (frame buffer) drivers. Existing PWM, simple-panel and pwm-backlight drivers are used. These work without additional configuration since they use the device tree settings in the same way as Linux. Boards converted are: - snow - spring - peach-pit - peach-pi All have been tested. Not converted: - MIPI display driver - s5pc210_universal - smdk5420 - smdk5250 - trats - trats2 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* exynos: Simplify calling of exynos_dp_phy_ctrl()Simon Glass2016-05-251-5/+0
| | | | | | | | This function controls enabling the EDP PHY. Rename it and drop the existing weak functions, which are confusing. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* exynos: Disable LCD display for boards we can't convertSimon Glass2016-05-252-0/+4
| | | | | | | | Some boards have the LCD enabled but I cannot test operation for the driver model conversion. Disable the LCD on these to avoid build errors. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* exynos: Allow CONFIG_MISC_COMMON to be build without an LCDSimon Glass2016-05-251-0/+10
| | | | | | | | This file currently requires LCD support. Adjust it so that it can still be built without LCD support (even thought it won't work fully). Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* board: samsung: add initial Espresso7420 board supportThomas Abraham2016-05-255-2/+55
| | | | | | | | | | Espresso7420 is a development/evaluation board for Exynos7420 SoC. It includes multiple onboard compoments (EMMC/Codec) and various interconnects (USB/HDMI). Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* samsung: fix mkorigenspl for darwinAndreas Bießmann2016-02-241-2/+2
| | | | | | | Compiling the mkorigenspl tool on darwin complains about undefined ulong. Fix this by using the unified way. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* Fix GCC format-security errors and convert sprintfs.Ben Whitten2016-01-141-2/+2
| | | | | | | | | | | With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal. Simple uses of sprintf are also converted to use strcpy. Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* usb: s3c-otg: Rename usb/s3c_udc.h to usb/dwc2_udc.hMarek Vasut2015-12-175-5/+5
| | | | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the global s3c_udc.h header to dwc2_udc.h. The rename is done automatically: $ sed -i "s/s3c_udc\.h/dwc2_udc.h/g" \ `git grep "s3c_udc\.h" | cut -d : -f 1` Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename s3c_udc_probe() functionMarek Vasut2015-12-175-5/+5
| | | | | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch is the second and final to rename global symbol, the s3c_udc_probe() function. The rename is done automatically: $ sed -i "s/s3c_udc_probe/dwc2_udc_probe/g" \ `git grep s3c_udc_probe | cut -d : -f 1` Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_plat_otg_dataMarek Vasut2015-12-175-6/+6
| | | | | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch is the first to rename global symbol, the struct s3c_plat_otg_data. The rename is done automatically: $ sed -i "s/s3c_plat_otg_data/dwc2_plat_otg_data/g" \ `git grep s3c_plat_otg_data | cut -d : -f 1` Signed-off-by: Marek Vasut <marex@denx.de>
* samsung: clean up checkpatch issuesMinkyu Kang2015-11-021-4/+3
| | | | | | | | | | | | | | | | | | This patch will fix these checkpatch issues. CHECK: Alignment should match open parenthesis + printf("Enter: %s %s\n", mode_name[mode][0], + mode_info[mode]); CHECK: Alignment should match open parenthesis + lcd_printf("\n\n\t%s %s\n", mode_name[mode][0], + mode_info[mode]); CHECK: Alignment should match open parenthesis + lcd_printf("\t%s %s - %s\n\n", selection[i], + mode_name[i][0], Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* odroid: clean up checkpatch issuesMinkyu Kang2015-11-021-8/+7
| | | | | | | | | | | | This patch will fix these checkpatch issues. +static const char *mmc_regulators[] = { CHECK: Blank lines aren't necessary before a close brace '}' + +} Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* smdk2410: clean up checkpatch issuesMinkyu Kang2015-11-021-5/+5
| | | | | | | | | | | | | | | | | | | | | This patch will fix these checkpatch issues. ERROR: spaces required around that '==' (ctx:VxV) +#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ ERROR: spaces required around that '==' (ctx:VxV) +#elif FCLK_SPEED==1 /* Fout = 202.8MHz */ ERROR: spaces required around that '==' (ctx:VxV) +#if USB_CLOCK==0 ERROR: spaces required around that '==' (ctx:VxV) +#elif USB_CLOCK==1 CHECK: spaces required around that ':' (ctx:VxV) + "bne 1b":"=r" (loops):"0" (loops)); Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* smdkv310: clean up checkpatch issuesMinkyu Kang2015-11-021-4/+4
| | | | | | | | | | | | | | | | | | This patch will fix these checkpatch issues. WARNING: Avoid unnecessary line continuations + gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \ WARNING: Avoid unnecessary line continuations + gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, \ WARNING: Avoid unnecessary line continuations + gd->bd->bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3, \ WARNING: Avoid unnecessary line continuations + gd->bd->bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4, \ Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* exynos5-dt-types: add board detection for Odroid XU3/XU3L/XU4.Przemyslaw Marczak2015-11-023-1/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds additional file with implementation of board detection code for Odroid-XU3/XU4. The detection depends on compatible found in fdt: - "samsung,exynos5" - uses Exynos5 generic code - "samsung,odroidxu3" - try detect XU3 revision There are few revisions of Odroid XU3/XU4, each can be detected by checking the value of channel 9 of built-in ADC: Rev ADC Board 0.1 0 XU3 0.1 0.2 372 XU3 0.2 | XU3L - no DISPLAYPORT 0.3 1280 XU4 0.1 The detection code depends on the ADC+10% value. Implementation of functions: - set_board_type() - read ADC and set type - get_board_rev() - returns board revision: 1..3 - get_board_type() - returns board type string Additional functions with return values of bool: - board_is_generic() - true if found compatible "samsung,exynos5" but not "samsung,odroidxu3" - board_is_odroidxu3() - true if found compatible "samsung,odroidxu3" and one of XU3 revision. - board_is_odroidxu4() - true if found compatible "samsung,odroidxu3" and XU4 revision. After I2C controller init, the get_board_type() can check if the XU3 board is a "Lite" variant, by probing chip 0x40 on I2C0 (INA231 - exists only on non-lite). This is useful for setting fdt file name at misc_init_r(). Enabled configs: - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - CONFIG_ODROID_REV_AIN - CONFIG_REVISION_TAG - CONFIG_BOARD_TYPES Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Simon Glass <sjg@chromium.org> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* samsung: board/misc: check returned pointer for get_board_type() callsPrzemyslaw Marczak2015-11-022-2/+5
| | | | | | | | | | | | | The function get_board_type() is called in two places by common code, but the returned pointer was never check. This commit adds checking the returned pointer, before use it. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* Fix bad return value checks (detected with Coccinelle)Thomas Huth2015-10-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the "Getting Started with Coccinelle - KVM edition" presentation that has been held by Julia Lawall at the KVM forum 2015 (see the slides at http://events.linuxfoundation.org/sites/events/files/slides/tutorial_kvm_0.pdf), she pointed out some bad return value checks in U-Boot that can be detected with Coccinelle by using the following config file: @@ identifier x,y; identifier f; statement S; @@ x = f(...); ( if (x < 0) S | if ( - y + x < 0) S ) This patch now fixes these issues. Signed-off-by: Thomas Huth <huth@tuxfamily.org>