]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: pxa: enhance smc91x platform data
authorRobert Jarzmik <robert.jarzmik@free.fr>
Mon, 17 Oct 2016 19:45:29 +0000 (21:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Oct 2016 18:14:20 +0000 (14:14 -0400)
Instead of having the smc91x driver relying on machine_is_*() calls,
provide this data through platform data, ie. idp, mainstone and
stargate.

This way, the driver doesn't need anymore machine_is_*() calls, which
wouldn't work anymore with a device-tree build.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/arm/mach-pxa/idp.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/stargate2.c
include/linux/smc91x.h

index 66070acaa888cc5778f5651592691c34a0adfca5..d1db32b1a2c613cbaf326f8300a24bd439bc91f2 100644 (file)
@@ -85,6 +85,7 @@ static struct resource smc91x_resources[] = {
 static struct smc91x_platdata smc91x_platdata = {
        .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
                 SMC91X_USE_DMA | SMC91X_NOWAIT,
+       .pxa_u16_align4 = true,
 };
 
 static struct platform_device smc91x_device = {
index 40964069a17caf10889f4d4505740d1666441278..a2d851a3a546c592fa7191365914b6b08a33de56 100644 (file)
@@ -140,6 +140,7 @@ static struct resource smc91x_resources[] = {
 static struct smc91x_platdata mainstone_smc91x_info = {
        .flags  = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
                  SMC91X_NOWAIT | SMC91X_USE_DMA,
+       .pxa_u16_align4 = true,
 };
 
 static struct platform_device smc91x_device = {
index 702f4f14b708ccb4ca80da7e7ef3da9595b2a784..7b6610e9dae46cc9e981b819f5326a909bf53e68 100644 (file)
@@ -673,6 +673,7 @@ static struct resource smc91x_resources[] = {
 static struct smc91x_platdata stargate2_smc91x_info = {
        .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT
        | SMC91X_NOWAIT | SMC91X_USE_DMA,
+       .pxa_u16_align4 = true,
 };
 
 static struct platform_device smc91x_device = {
index e302c447e057a98b0ba47b5bc73acd816b9dc7f7..129bc674dcf5df4ed3b2e184391fda0ada071618 100644 (file)
@@ -39,6 +39,7 @@ struct smc91x_platdata {
        unsigned long flags;
        unsigned char leda;
        unsigned char ledb;
+       bool pxa_u16_align4;    /* PXA buggy u16 writes on 4*n+2 addresses */
 };
 
 #endif /* __SMC91X_H__ */