macb: rename platform data
The macb/gem core is used by the Zynq SoC. In preparation of sharing the macb driver between at91 and Zynq, rename the platform data to 'struct macb_platform_data', and move the definition to a common location. Signed-off-by: Josh Cartwright <joshc@eso.teric.us> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
960a3d216a
commit
28acd8331d
|
@ -120,7 +120,7 @@ static void animeo_ip_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <mach/io.h>
|
||||
#include <spi/spi.h>
|
||||
|
||||
static struct at91_ether_platform_data ether_pdata = {
|
||||
static struct macb_platform_data ether_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -114,7 +114,7 @@ static void ek_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -82,7 +82,7 @@ static void ek_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -105,7 +105,7 @@ static void ek_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ static void ek_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -105,7 +105,7 @@ static void ek_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ static void dss11_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_addr = 0,
|
||||
.flags = AT91SAM_ETX2_ETX3_ALTERNATIVE,
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <mach/gpio.h>
|
||||
#include <mach/io.h>
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_flags = PHYLIB_FORCE_LINK,
|
||||
.phy_addr = 4,
|
||||
};
|
||||
|
|
|
@ -88,7 +88,7 @@ static void pm_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = -1,
|
||||
};
|
||||
|
|
|
@ -112,7 +112,7 @@ static void __init pm9g45_add_device_usbh(void)
|
|||
static void __init pm9g45_add_device_usbh(void) {}
|
||||
#endif
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ static void qil_a9260_add_device_mci(void) {}
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_CALAO_MB_QIL_A9260
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = -1,
|
||||
};
|
||||
|
|
|
@ -110,12 +110,12 @@ static void ek_add_device_nand(void) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
static struct at91_ether_platform_data gmac_pdata = {
|
||||
static struct macb_platform_data gmac_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RGMII,
|
||||
.phy_addr = 7,
|
||||
};
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -62,7 +62,7 @@ static void evk_add_device_nand(void)
|
|||
at91_add_device_nand(&nand_pdata);
|
||||
}
|
||||
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = 0,
|
||||
};
|
||||
|
|
|
@ -112,7 +112,7 @@ static void tny_a9260_add_device_nand(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_DRIVER_NET_MACB
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = -1,
|
||||
};
|
||||
|
|
|
@ -117,7 +117,7 @@ static void usb_a9260_add_device_nand(void) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
static struct at91_ether_platform_data macb_pdata = {
|
||||
static struct macb_platform_data macb_pdata = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.phy_addr = -1,
|
||||
};
|
||||
|
|
|
@ -86,7 +86,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
|
|||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_AT91_ETHER)
|
||||
void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
void __init at91_add_device_eth(int id, struct macb_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
@ -118,7 +118,7 @@ void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
|||
IORESOURCE_MEM, data);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
|
||||
void __init at91_add_device_eth(int id, struct macb_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
|
|
|
@ -81,7 +81,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
@ -118,7 +118,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
|||
IORESOURCE_MEM, data);
|
||||
}
|
||||
#else
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NAND_ATMEL)
|
||||
|
|
|
@ -81,7 +81,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
@ -112,7 +112,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
|||
IORESOURCE_MEM, data);
|
||||
}
|
||||
#else
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NAND_ATMEL)
|
||||
|
|
|
@ -82,7 +82,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
@ -114,7 +114,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
|||
IORESOURCE_MEM, data);
|
||||
}
|
||||
#else
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NAND_ATMEL)
|
||||
|
|
|
@ -83,7 +83,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data)
|
||||
{
|
||||
resource_size_t start;
|
||||
|
||||
|
@ -147,7 +147,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
|||
IORESOURCE_MEM, data);
|
||||
}
|
||||
#else
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MCI_ATMEL)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <video/atmel_lcdc.h>
|
||||
#include <mach/atmel_hlcdc.h>
|
||||
#include <linux/phy.h>
|
||||
#include <platform_data/macb.h>
|
||||
|
||||
/* USB Host */
|
||||
struct at91_usbh_data {
|
||||
|
@ -72,15 +73,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);
|
|||
/* Ethernet (EMAC & MACB) */
|
||||
#define AT91SAM_ETX2_ETX3_ALTERNATIVE (1 << 0)
|
||||
|
||||
struct at91_ether_platform_data {
|
||||
unsigned int phy_flags;
|
||||
unsigned int flags;
|
||||
int phy_addr;
|
||||
phy_interface_t phy_interface;
|
||||
int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
|
||||
};
|
||||
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data);
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data);
|
||||
|
||||
void at91_add_device_i2c(short i2c_id, struct i2c_board_info *devices, int nr_devices);
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
@ -204,7 +204,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
|||
|
||||
}
|
||||
#else
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
|
||||
void at91_add_device_eth(int id, struct macb_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MCI_ATMEL)
|
||||
|
|
|
@ -298,7 +298,7 @@ static int at91_ether_probe(struct device_d *dev)
|
|||
struct mii_bus *miibus;
|
||||
unsigned long ether_hz;
|
||||
struct clk *pclk;
|
||||
struct at91_ether_platform_data *pdata;
|
||||
struct macb_platform_data *pdata;
|
||||
|
||||
if (!dev->platform_data) {
|
||||
printf("at91_ether: no platform_data\n");
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <init.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <mach/board.h>
|
||||
#include <platform_data/macb.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/err.h>
|
||||
#include <asm/mmu.h>
|
||||
|
@ -584,7 +584,7 @@ static int macb_probe(struct device_d *dev)
|
|||
struct eth_device *edev;
|
||||
struct macb_device *macb;
|
||||
u32 ncfgr;
|
||||
struct at91_ether_platform_data *pdata;
|
||||
struct macb_platform_data *pdata;
|
||||
|
||||
if (!dev->platform_data) {
|
||||
dev_err(dev, "macb: no platform_data\n");
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* [origin Linux: arch/arm/mach-at91/include/mach/board.h]
|
||||
*
|
||||
* Copyright (C) 2005 HP Labs
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
#ifndef __MACB_H
|
||||
#define __MACB_H
|
||||
|
||||
#include <linux/phy.h>
|
||||
|
||||
struct macb_platform_data {
|
||||
unsigned int phy_flags;
|
||||
unsigned int flags;
|
||||
int phy_addr;
|
||||
phy_interface_t phy_interface;
|
||||
int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue