OpenCloudOS-Kernel/arch/arm/mach-sa1100
Russell King 2fb04fdf30 net: smc91x: fix SMC accesses
Commit b70661c708 ("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: b70661c708 ("net: smc91x: use run-time configuration on all ARM machines")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-28 23:44:55 -04:00
..
include/mach ARM: 8532/1: uncompress: mark putc as inline 2016-02-22 16:55:42 +00:00
Kconfig ARM: sa1100: remove references to the defunct handhelds.org 2016-04-12 12:34:15 -07:00
Makefile ARM: 8368/1: sa1100: move irq driver to drivers/irqchip/ 2015-05-28 14:40:03 +01:00
Makefile.boot ARM: sa1100: fix build error 2011-12-08 14:55:57 +08:00
assabet.c arm: sa1100: move irda header to linux/platform_data 2014-12-30 18:44:07 -05:00
badge4.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
cerf.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
clock.c ARM: 8250/1: sa1100: provide OSTIMER0 clock for pxa_timer 2015-01-14 11:28:22 +00:00
collie.c Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-02-12 08:51:56 -08:00
generic.c ARM: 8367/1: sa1100: prepare for moving irq driver to drivers/irqchip 2015-05-28 14:40:03 +01:00
generic.h cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
h3xxx.c ARM: 8136/1: sa1100: add Micro ASIC platform device 2014-09-12 17:39:50 +01:00
h3100.c arm: sa1100: move irda header to linux/platform_data 2014-12-30 18:44:07 -05:00
h3600.c arm: sa1100: move irda header to linux/platform_data 2014-12-30 18:44:07 -05:00
hackkit.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
jornada720.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
jornada720_ssp.c ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
lart.c arm-soc: cleanups 2013-02-21 14:58:40 -08:00
nanoengine.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
neponset.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pci-nanoengine.c ARM: sa1100: Convert PCI to use generic config accessors 2015-01-30 16:14:43 -06:00
pleb.c net: smc91x: fix SMC accesses 2016-08-28 23:44:55 -04:00
pm.c ARM: 8284/1: sa1100: clear RCSR_SMR on resume 2015-01-29 15:24:53 +00:00
shannon.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
simpad.c ARM: simpad: switch to gpiochip_add_data() 2016-02-19 09:51:42 +01:00
sleep.S ARM: 7452/1: delay: allow timer-based delay implementation to be selected 2012-07-09 17:42:23 +01:00
ssp.c ARM: 7342/2: sa1100: prepare for sparse irq conversion 2012-03-25 23:57:20 +01:00