Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cafb0ba authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'smc91x-dt'



Robert Jarzmik says:

====================
support smc91x on mainstone and devicetree

This series aims at bringing support to mainstone board on a
device-tree based build, as what is already in place for legacy
mainstone.

The bulk of the mainstone "specific" behavior is that a u16 write
doesn't work on a address of the form 4*n + 2, while it works on 4*n.

The legacy workaround was in SMC_outw(), with calls to
machine_is_mainstone(). These calls don't work with a pxa27x-dt
machine type, which is used when a generic device-tree pxa27x machine
is used to boot the mainstone board.

Therefore, this series enables the smc91c111 adapter of the mainstone
board to work on a device-tree build, exaclty as it's been working for
years with the legacy arch/arm/mach-pxa/mainstone.c definition.

As a sum up, this extends an existing mechanism to device-tree based
pxa platforms.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents cd94e519 c4055a8c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,3 +13,5 @@ Optional properties:
  16-bit access only.
- power-gpios: GPIO to control the PWRDWN pin
- reset-gpios: GPIO to control the RESET pin
- pxa-u16-align4 : Boolean, put in place the workaround the force all
		   u16 writes to be 32 bits aligned
+1 −0
Original line number Diff line number Diff line
@@ -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 = {
+1 −0
Original line number Diff line number Diff line
@@ -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 = {
+1 −0
Original line number Diff line number Diff line
@@ -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 = {
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@

#if SMC_CAN_USE_16BIT
#define SMC_inw(a, r)		inw((unsigned long) ((a) + (r)))
#define SMC_outw(v, a, r)	outw(v, (unsigned long) ((a) + (r)))
#define SMC_outw(lp, v, a, r)	outw(v, (unsigned long) ((a) + (r)))
#define SMC_insw(a, r, p, l)	insw((unsigned long) ((a) + (r)), (p), (l))
#define SMC_outsw(a, r, p, l)	outsw((unsigned long) ((a) + (r)), (p), (l))
#endif
Loading