1. 28 Aug, 2016 1 commit
    • Russell King's avatar
      net: smc91x: fix SMC accesses · 2fb04fdf
      Russell King authored
      Commit b70661c7 ("net: smc91x: use run-time configuration on all ARM
      machines") broke some ARM platforms through several mistakes.  Firstly,
      the access size must correspond to the following rule:
      
      (a) at least one of 16-bit or 8-bit access size must be supported
      (b) 32-bit accesses are optional, and may be enabled in addition to
          the above.
      
      Secondly, it provides no emulation of 16-bit accesses, instead blindly
      making 16-bit accesses even when the platform specifies that only 8-bit
      is supported.
      
      Reorganise smc91x.h so we can make use of the existing 16-bit access
      emulation already provided - if 16-bit accesses are supported, use
      16-bit accesses directly, otherwise if 8-bit accesses are supported,
      use the provided 16-bit access emulation.  If neither, BUG().  This
      exactly reflects the driver behaviour prior to the commit being fixed.
      
      Since the conversion incorrectly cut down the available access sizes on
      several platforms, we also need to go through every platform and fix up
      the overly-restrictive access size: Arnd assumed that if a platform can
      perform 32-bit, 16-bit and 8-bit accesses, then only a 32-bit access
      size needed to be specified - not so, all available access sizes must
      be specified.
      
      This likely fixes some performance regressions in doing this: if a
      platform does not support 8-bit accesses, 8-bit accesses have been
      emulated by performing a 16-bit read-modify-write access.
      
      Tested on the Intel Assabet/Neponset platform, which supports only 8-bit
      accesses, which was broken by the original commit.
      
      Fixes: b70661c7
      
       ("net: smc91x: use run-time configuration on all ARM machines")
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fb04fdf
  2. 11 Aug, 2016 1 commit
  3. 09 Jul, 2016 1 commit
  4. 27 Jun, 2016 1 commit
  5. 05 May, 2016 1 commit
  6. 30 Apr, 2016 2 commits
  7. 08 Apr, 2016 1 commit
  8. 29 Mar, 2016 1 commit
  9. 15 Mar, 2016 1 commit
    • Arnd Bergmann's avatar
      ARM: pxa/raumfeld: use PROPERTY_ENTRY_INTEGER to define props · 4d2508a5
      Arnd Bergmann authored
      
      
      gcc-6.0 notices that the use of the property_entry in this file that
      was recently introduced cannot work right, as we initialize the wrong
      field:
      
      raumfeld.c:387:3: error: the address of 'raumfeld_rotary_encoder_steps' will always evaluate as 'true' [-Werror=address]
         DEV_PROP_U32, 1, &raumfeld_rotary_encoder_steps, },
         ^~~~~~~~~~~~
      raumfeld.c:389:3: error: the address of 'raumfeld_rotary_encoder_axis' will always evaluate as 'true' [-Werror=address]
         DEV_PROP_U32, 1, &raumfeld_rotary_encoder_axis, },
         ^~~~~~~~~~~~
      raumfeld.c:391:3: error: the address of 'raumfeld_rotary_encoder_relative_axis' will always evaluate as 'true' [-Werror=address]
         DEV_PROP_U32, 1, &raumfeld_rotary_encoder_relative_axis, },
         ^~~~~~~~~~~~
      
      The problem appears to stem from relying on an old definition of
      'struct property', but it has changed several times since the code
      could have last been correct.
      
      This changes the code to use the PROPERTY_ENTRY_INTEGER() macro instead,
      which works fine for the current definition and is a safer way of doing
      the initialization.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: a9e340dc
      
       ("Input: rotary_encoder - move away from platform data structure")
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      4d2508a5
  10. 04 Mar, 2016 1 commit
    • Arnd Bergmann's avatar
      usb: gadget: pxa25x_udc: move register definitions from arch · c5418a0b
      Arnd Bergmann authored
      
      
      ixp4xx and pxa25x both use this driver and provide a slightly
      different set of register definitions for it. Aside from that,
      the definition in the ixp4xx-regs.h header conflicts with the
      on in the pxa27x device driver when compile-testing that:
      
      In file included from ../drivers/usb/gadget/udc/pxa27x_udc.c:37:0:
      ../drivers/usb/gadget/udc/pxa27x_udc.h:26:0: warning: "UDCCR" redefined
       #define UDCCR  0x0000  /* UDC Control Register */
       ^
      In file included from ../arch/arm/mach-ixp4xx/include/mach/hardware.h:27:0,
                       from ../arch/arm/mach-ixp4xx/include/mach/io.h:18,
                       from ../arch/arm/include/asm/io.h:194,
                       from ../include/linux/io.h:25,
                       from ../include/linux/irq.h:24,
                       from ../drivers/usb/gadget/udc/pxa27x_udc.c:23:
      ../arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h:415:0: note: this is the location of the previous definition
       #define UDCCR  IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0000)
      
      This addresses both issues by moving all the definitions into the
      pxa25x_udc driver itself. It turns out the only difference between
      them was 'UDCCS_IO_ROF', and that could well be a mistake when it
      was incorrectly copied from pxa25x to ixp4xx.
      Acked-by: default avatarKrzysztof Halasa <khalasa@piap.pl>
      Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      c5418a0b
  11. 02 Mar, 2016 2 commits
  12. 26 Feb, 2016 1 commit
  13. 20 Feb, 2016 1 commit
  14. 01 Feb, 2016 7 commits
    • Arnd Bergmann's avatar
      ARM: pxa: don't select RFKILL if CONFIG_NET is disabled · f29327d9
      Arnd Bergmann authored
      
      
      Bluetooth is only supported when network support is part of the kernel,
      so it is a bit pointless to build the tosa-bt support without networking.
      If we try anyway, we get a Kconfig warning:
      
      warning: (TOSA_BT && H1940BT) selects RFKILL which has unmet direct dependencies (NET)
      
      This adds a dependency on CONFIG_NET to avoid that case.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      f29327d9
    • Arnd Bergmann's avatar
      ARM: pxa: fix building without IWMMXT · 343c1cdb
      Arnd Bergmann authored
      
      
      When CONFIG_IWMMXT, the pxa3xx and pxa27x suspend/resume code
      emits some xscale specific instructions, which are rejected
      by the assembler, because gcc is built with -march=armv5
      -mtune=xscale and passes that option to the assembler:
      
      /tmp/cciHumzr.s:553: Error: selected processor does not support ARM mode `mra r2,r3,acc0'
      /tmp/cciHumzr.s:605: Error: selected processor does not support ARM mode `mar acc0,r2,r3'
      make[3]: *** [arch/arm/mach-pxa/pxa3xx.o] Error 1
      /tmp/cci5MUNu.s:326: Error: selected processor does not support ARM mode `mra r2,r3,acc0'
      /tmp/cci5MUNu.s:367: Error: selected processor does not support ARM mode `mar acc0,r2,r3'
      make[3]: *** [arch/arm/mach-pxa/pxa27x.o] Error 1
      
      Overriding with -Wa,-march=xscale no longer works, so instead
      I'm adding an explict ".arch_extension" directive in all four inline
      assembly statements, which should work even if they end up in a different
      order in the assembly output.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      343c1cdb
    • Arnd Bergmann's avatar
      ARM: pxa: move extern declarations to pm.h · a9a54cae
      Arnd Bergmann authored
      
      
      When CONFIG_IWMMXT is disabled, we get a warning in pxa3xx.c:
      
      arch/arm/mach-pxa/pxa3xx.c: In function 'pxa3xx_cpu_pm_suspend':
      arch/arm/mach-pxa/pxa3xx.c:109:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
      
      It turns out that there is an 'extern' declaration in the
      middle of a function.
      
      For consistency, this moves the declaration and two others from
      the same file into pm.h.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      a9a54cae
    • Arnd Bergmann's avatar
      ARM: pxa: don't select GPIO_SYSFS for MIOA701 · 55e70147
      Arnd Bergmann authored
      
      
      GPIO_SYSFS is a common kernel functionality, not something
      that a board specific Kconfig should have to worry about.
      In MIOA701, we get a warning about the select when CONFIG_SYSFS
      is disabled:
      
      warning: (MACH_MIOA701) selects GPIO_SYSFS which has unmet direct dependencies (GPIOLIB && SYSFS)
      
      This just removes the select and instead enables the symbol in
      the defconfig file.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      55e70147
    • Arnd Bergmann's avatar
      ARM: pxa: mark unused eseries code as __maybe_unused · 0a137a1a
      Arnd Bergmann authored
      
      
      Two variables in eseries.c are used on multiple platforms,
      but are not referenced when those are all disabled:
      
      eseries.c:60:31: warning: 'e7xx_gpio_vbus' defined but not used [-Wunused-variable]
      eseries.c:129:20: warning: 'eseries_register_clks' defined but not used [-Wunused-function]
      
      Marking them __maybe_unused is the nicest way to ensure
      that we never get the warning or end up with missing symbols
      if we get it wrong.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      0a137a1a
    • Arnd Bergmann's avatar
      ARM: pxa: mark spitz_card_pwr_ctrl as __maybe_unused · 28987347
      Arnd Bergmann authored
      
      
      This function is only used when CONFIG_PCMCIA is enabled, otherwise
      we get a harmless warning:
      
      arch/arm/mach-pxa/spitz.c:204:13: warning: 'spitz_card_pwr_ctrl' defined but not used [-Wunused-function]
      
      Marking it as __maybe_unused keeps the logic simple and avoids the
      warning on randconfig builds.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      28987347
    • Arnd Bergmann's avatar
      ARM: pxa: define clock registers as __iomem · ea7743e2
      Arnd Bergmann authored
      
      
      We should not dereference registers as pointers, so use readl/writel
      instead for these registers.
      
      The clock registers are accessed in multiple files, so we have to
      change them all at once.
      
      I stumbled over these registers while looking at something unrelated.
      There are in fact other registers with the same problem, but I did
      not try to address those at this point.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      ea7743e2
  15. 15 Dec, 2015 3 commits
    • Arnd Bergmann's avatar
      ARM: pxa: mark ezx structures as __maybe_unused · ee5d8742
      Arnd Bergmann authored
      
      
      The ezx platform contains multiple machine descriptors, but not all
      of them use all of the data structures, and it's possible to disable
      all of the machines, which produces some harmless warnings:
      
      mach-pxa/ezx.c:53:26: warning: 'ezx_pwm_lookup' defined but not used [-Wunused-variable]
      mach-pxa/ezx.c:86:31: warning: 'ezx_fb_info_1' defined but not used [-Wunused-variable]
      mach-pxa/ezx.c:107:31: warning: 'ezx_fb_info_2' defined but not used [-Wunused-variable]
      mach-pxa/ezx.c:113:32: warning: 'ezx_devices' defined but not used [-Wunused-variable]
      mach-pxa/ezx.c:117:22: warning: 'ezx_pin_config' defined but not used [-Wunused-variable]
      
      This marks all those structures as __maybe_unused to avoid the warnings.
      Obviously a configuration that contains the ezx platform but no specific
      model is a bit silly, but it should not cause compile-time warnings.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      ee5d8742
    • Arnd Bergmann's avatar
      ARM: pxa: mark raumfeld init functions as __maybe_unused · f41bd6af
      Arnd Bergmann authored
      
      
      The raumfeld.c file contains three similar machine definitions,
      each with their own init function. If one or more of them are
      disabled, we get compile-time warnings:
      
      arm/mach-pxa/raumfeld.c:1070:123: warning: 'raumfeld_connector_init' defined but not used [-Wunused-function]
      arm/mach-pxa/raumfeld.c:1082:123: warning: 'raumfeld_speaker_init' defined but not used [-Wunused-function]
      
      This marks the functions as __maybe_unused to avoid the warnings.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarDaniel Mack <daniel@zonque.org>
      f41bd6af
    • Arnd Bergmann's avatar
      ARM: pxa: cm-x2xx: avoid duplicate macro warnings · f39c42f5
      Arnd Bergmann authored
      
      
      In an old commit, we worked around the duplicate definition of
      GPIO24_SSP1_SFRM in cm-x2xx.c, which includes files for both
      pxa25x and pxa27x. Apparently the problem has come back and we
      now have four additional duplicate symbols that cause warnings:
      
      In file included from /git/arm-soc/arch/arm/mach-pxa/pxa27x.h:7:0,
                       from /git/arm-soc/arch/arm/mach-pxa/cm-x2xx.c:27:
      /git/arm-soc/arch/arm/mach-pxa/mfp-pxa27x.h:21:0: warning: "GPIO86_GPIO" redefined
       #define GPIO86_GPIO  MFP_CFG_IN(GPIO86, AF0)
      
      This uses the same hack as before and undefines all symbols that
      are defined more than once. Fortunately, cm-x2xx does not need
      any of these.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      f39c42f5
  16. 10 Dec, 2015 1 commit
  17. 07 Dec, 2015 1 commit
  18. 01 Dec, 2015 1 commit
  19. 19 Nov, 2015 2 commits
  20. 17 Nov, 2015 1 commit
    • Mauro Carvalho Chehab's avatar
      [media] include/media: split I2C headers from V4L2 core · b5dcee22
      Mauro Carvalho Chehab authored
      
      
      Currently, include/media is messy, as it contains both the V4L2 core
      headers and some driver-specific headers on the same place. That makes
      harder to identify what core headers should be documented and what
      headers belong to I2C drivers that are included only by bridge/main
      drivers that would require the functions provided by them.
      
      Let's move those i2c specific files to its own subdirectory.
      
      The files to move were produced via the following script:
      	mkdir include/media/i2c
      	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
      	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
      	for i in include/media/*.h; do n=`basename $i`;  (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done
      
      And the references corrected via this script:
          MAIN_DIR="media/"
          PREV_DIR="media/"
          DIRS="i2c/"
      
          echo "Checking affected files" >&2
          for i in $DIRS; do
      	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
      		 n=`basename $j`
      		git grep -l $n
      	done
          done|sort|uniq >files && (
      	echo "Handling files..." >&2;
      	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done";
      	);
      	echo "Handling documentation..." >&2;
      	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done"
      	);
          ) >script && . ./script
      
      Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      b5dcee22
  21. 16 Oct, 2015 2 commits
    • Arnd Bergmann's avatar
      ARM: pxa: remove incorrect __init annotation on pxa27x_set_pwrmode · 54c09889
      Arnd Bergmann authored
      
      
      The z2 machine calls pxa27x_set_pwrmode() in order to power off
      the machine, but this function gets discarded early at boot because
      it is marked __init, as pointed out by kbuild:
      
      WARNING: vmlinux.o(.text+0x145c4): Section mismatch in reference from the function z2_power_off() to the function .init.text:pxa27x_set_pwrmode()
      The function z2_power_off() references
      the function __init pxa27x_set_pwrmode().
      This is often because z2_power_off lacks a __init
      annotation or the annotation of pxa27x_set_pwrmode is wrong.
      
      This removes the __init section modifier to fix rebooting and the
      build error.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: ba4a90a6
      
       ("ARM: pxa/z2: fix building error of pxa27x_cpu_suspend() no longer available")
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      54c09889
    • Uwe Kleine-König's avatar
      ARM: pxa: raumfeld: make some variables static · 4a672bfe
      Uwe Kleine-König authored
      
      
      This fixes the following sparse warnings:
      
      	arch/arm/mach-pxa/raumfeld.c:510:24: warning: symbol 'raumfeld_w1_gpio_device' was not declared. Should it be static?
      	arch/arm/mach-pxa/raumfeld.c:632:31: warning: symbol 'raumfeld_spi_platform_data' was not declared. Should it be static?
      	arch/arm/mach-pxa/raumfeld.c:851:28: warning: symbol 'audio_va_initdata' was not declared. Should it be static?
      	arch/arm/mach-pxa/raumfeld.c:883:28: warning: symbol 'audio_dummy_initdata' was not declared. Should it be static?
      	arch/arm/mach-pxa/raumfeld.c:931:28: warning: symbol 'max8660_v6_subdev_data' was not declared. Should it be static?
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarDaniel Mack <daniel@zonque.org>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      4a672bfe
  22. 14 Oct, 2015 7 commits