Commit cbd19d09 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'IXP4xx-networking-cleanups'



Linus Walleij says:

====================
IXP4xx networking cleanups

This is a patch series which jams together Arnds and mine
cleanups for the IXP4xx networking.

I also have patches for device tree support but that
requires more elaborate work, this series is some of
mine and some of Arnds patches that is a good foundation
for his multiplatform work and my device tree work.

These are for application to the networking tree so
that can be taken in one separate sweep.

I have tested the patches for a bit using zeroday builds
and some boots on misc IXP4xx devices and haven't run
into any major problems. We might find some new stuff
as a result from the new compiler coverage.

I had to depromote enabling compiler coverage at one
point in the v2 set because it depended on other patches
making the code more generic.

The change in v3 was simply dropping one offending
patch hardcoding base addresses into the driver.

The change in v4 drops a stable@ tag that was
unnecessary.

This v5 is a rebase of the v4 patch set on top of
net-next.
====================

Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents a442c2c3 e45d0fad
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -132,6 +132,22 @@ static struct platform_device fsg_leds = {
};

/* Built-in 10/100 Ethernet MAC interfaces */
static struct resource fsg_eth_npeb_resources[] = {
	{
		.start		= IXP4XX_EthB_BASE_PHYS,
		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct resource fsg_eth_npec_resources[] = {
	{
		.start		= IXP4XX_EthC_BASE_PHYS,
		.end		= IXP4XX_EthC_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct eth_plat_info fsg_plat_eth[] = {
	{
		.phy		= 5,
@@ -151,12 +167,16 @@ static struct platform_device fsg_eth[] = {
		.dev = {
			.platform_data	= fsg_plat_eth,
		},
		.num_resources	= ARRAY_SIZE(fsg_eth_npeb_resources),
		.resource	= fsg_eth_npeb_resources,
	}, {
		.name			= "ixp4xx_eth",
		.id			= IXP4XX_ETH_NPEC,
		.dev = {
			.platform_data	= fsg_plat_eth + 1,
		},
		.num_resources	= ARRAY_SIZE(fsg_eth_npec_resources),
		.resource	= fsg_eth_npec_resources,
	}
};

+24 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/platform_data/wan_ixp4xx_hss.h>
#include <linux/serial_8250.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -272,6 +273,22 @@ static struct platform_device device_uarts = {


/* Built-in 10/100 Ethernet MAC interfaces */
static struct resource eth_npeb_resources[] = {
	{
		.start		= IXP4XX_EthB_BASE_PHYS,
		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct resource eth_npec_resources[] = {
	{
		.start		= IXP4XX_EthC_BASE_PHYS,
		.end		= IXP4XX_EthC_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct eth_plat_info eth_plat[] = {
	{
		.phy		= 0,
@@ -289,10 +306,14 @@ static struct platform_device device_eth_tab[] = {
		.name			= "ixp4xx_eth",
		.id			= IXP4XX_ETH_NPEB,
		.dev.platform_data	= eth_plat,
		.num_resources		= ARRAY_SIZE(eth_npeb_resources),
		.resource		= eth_npeb_resources,
	}, {
		.name			= "ixp4xx_eth",
		.id			= IXP4XX_ETH_NPEC,
		.dev.platform_data	= eth_plat + 1,
		.num_resources		= ARRAY_SIZE(eth_npec_resources),
		.resource		= eth_npec_resources,
	}
};

@@ -405,6 +426,9 @@ static void __init gmlr_init(void)
	if (hw_bits & CFG_HW_HAS_HSS1)
		device_tab[devices++] = &device_hss_tab[1]; /* max index 5 */

	hss_plat[0].timer_freq = ixp4xx_timer_freq;
	hss_plat[1].timer_freq = ixp4xx_timer_freq;

	gpio_request(GPIO_SCL, "SCL/clock");
	gpio_request(GPIO_SDA, "SDA/data");
	gpio_request(GPIO_STR, "strobe");
+1 −21
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#ifndef __ASSEMBLY__

#include <linux/reboot.h>
#include <linux/platform_data/eth_ixp4xx.h>

#include <asm/types.h>

@@ -92,27 +93,6 @@ struct ixp4xx_pata_data {
	void __iomem	*cs1;
};

#define IXP4XX_ETH_NPEA		0x00
#define IXP4XX_ETH_NPEB		0x10
#define IXP4XX_ETH_NPEC		0x20

/* Information about built-in Ethernet MAC interfaces */
struct eth_plat_info {
	u8 phy;		/* MII PHY ID, 0 - 31 */
	u8 rxq;		/* configurable, currently 0 - 31 only */
	u8 txreadyq;
	u8 hwaddr[6];
};

/* Information about built-in HSS (synchronous serial) interfaces */
struct hss_plat_info {
	int (*set_clock)(int port, unsigned int clock_type);
	int (*open)(int port, void *pdev,
		    void (*set_carrier_cb)(void *pdev, int carrier));
	void (*close)(int port, void *pdev);
	u8 txreadyq;
};

/*
 * Frequency of clock used for primary clocksource
 */
+20 −0
Original line number Diff line number Diff line
@@ -187,6 +187,22 @@ static struct platform_device ixdp425_uart = {
};

/* Built-in 10/100 Ethernet MAC interfaces */
static struct resource ixp425_npeb_resources[] = {
	{
		.start		= IXP4XX_EthB_BASE_PHYS,
		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct resource ixp425_npec_resources[] = {
	{
		.start		= IXP4XX_EthC_BASE_PHYS,
		.end		= IXP4XX_EthC_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct eth_plat_info ixdp425_plat_eth[] = {
	{
		.phy		= 0,
@@ -204,10 +220,14 @@ static struct platform_device ixdp425_eth[] = {
		.name			= "ixp4xx_eth",
		.id			= IXP4XX_ETH_NPEB,
		.dev.platform_data	= ixdp425_plat_eth,
		.num_resources		= ARRAY_SIZE(ixp425_npeb_resources),
		.resource		= ixp425_npeb_resources,
	}, {
		.name			= "ixp4xx_eth",
		.id			= IXP4XX_ETH_NPEC,
		.dev.platform_data	= ixdp425_plat_eth + 1,
		.num_resources		= ARRAY_SIZE(ixp425_npec_resources),
		.resource		= ixp425_npec_resources,
	}
};

+10 −0
Original line number Diff line number Diff line
@@ -165,6 +165,14 @@ static struct platform_device nas100d_uart = {
};

/* Built-in 10/100 Ethernet MAC interfaces */
static struct resource nas100d_eth_resources[] = {
	{
		.start		= IXP4XX_EthB_BASE_PHYS,
		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
		.flags		= IORESOURCE_MEM,
	},
};

static struct eth_plat_info nas100d_plat_eth[] = {
	{
		.phy		= 0,
@@ -178,6 +186,8 @@ static struct platform_device nas100d_eth[] = {
		.name			= "ixp4xx_eth",
		.id			= IXP4XX_ETH_NPEB,
		.dev.platform_data	= nas100d_plat_eth,
		.num_resources		= ARRAY_SIZE(nas100d_eth_resources),
		.resource		= nas100d_eth_resources,
	}
};

Loading