Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281842
b: refs/heads/master
c: a461178
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann committed Dec 28, 2011
1 parent deb281b commit 87c9740
Show file tree
Hide file tree
Showing 201 changed files with 2,991 additions and 1,569 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 155bc27fdfbdf65a07a4f8ef3eafa25e57d8b511
refs/heads/master: a46117836e23f97cf4660b0ebf8404ad151fb63d
25 changes: 25 additions & 0 deletions trunk/Documentation/devicetree/bindings/net/macb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
* Cadence MACB/GEM Ethernet controller

Required properties:
- compatible: Should be "cdns,[<chip>-]{macb|gem}"
Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs.
Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
Use "cnds,pc302-gem" for Picochip picoXcell pc302 and later devices based on
the Cadence GEM, or the generic form: "cdns,gem".
- reg: Address and length of the register set for the device
- interrupts: Should contain macb interrupt
- phy-mode: String, operation mode of the PHY interface.
Supported values are: "mii", "rmii", "gmii", "rgmii".

Optional properties:
- local-mac-address: 6 bytes, mac address

Examples:

macb0: ethernet@fffc4000 {
compatible = "cdns,at32ap7000-macb";
reg = <0xfffc4000 0x4000>;
interrupts = <21>;
phy-mode = "rmii";
local-mac-address = [3a 0e 03 04 05 06];
};
2 changes: 2 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ config ARCH_MMP
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
select GENERIC_CLOCKEVENTS
select GPIO_PXA
select HAVE_SCHED_CLOCK
select TICK_ONESHOT
select PLAT_PXA
Expand Down Expand Up @@ -674,6 +675,7 @@ config ARCH_PXA
select CLKSRC_MMIO
select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS
select GPIO_PXA
select HAVE_SCHED_CLOCK
select TICK_ONESHOT
select PLAT_PXA
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/arm/boot/dts/at91sam9g20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
atmel,use-dma-tx;
status = "disabled";
};

macb0: ethernet@fffc4000 {
compatible = "cdns,at32ap7000-macb", "cdns,macb";
reg = <0xfffc4000 0x100>;
interrupts = <21>;
status = "disabled";
};
};
};
};
7 changes: 7 additions & 0 deletions trunk/arch/arm/boot/dts/at91sam9g45.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@
atmel,use-dma-tx;
status = "disabled";
};

macb0: ethernet@fffbc000 {
compatible = "cdns,at32ap7000-macb", "cdns,macb";
reg = <0xfffbc000 0x100>;
interrupts = <25>;
status = "disabled";
};
};
};
};
5 changes: 5 additions & 0 deletions trunk/arch/arm/boot/dts/at91sam9m10g45ek.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
usart1: serial@fff90000 {
status = "okay";
};

macb0: ethernet@fffbc000 {
phy-mode = "rmii";
status = "okay";
};
};
};
};
5 changes: 5 additions & 0 deletions trunk/arch/arm/boot/dts/usb_a9g20.dts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
dbgu: serial@fffff200 {
status = "okay";
};

macb0: ethernet@fffc4000 {
phy-mode = "rmii";
status = "okay";
};
};
};
};
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-at91/at91cap9.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static struct clk pwm_clk = {
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk macb_clk = {
.name = "macb_clk",
.name = "pclk",
.pmc_mask = 1 << AT91CAP9_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL,
};
Expand Down Expand Up @@ -210,6 +210,8 @@ static struct clk *periph_clocks[] __initdata = {
};

static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-at91/at91cap9_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
[0] = {
Expand All @@ -227,7 +227,7 @@ static struct platform_device at91cap9_eth_device = {
.num_resources = ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
if (!data)
return;
Expand Down Expand Up @@ -264,7 +264,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
platform_device_register(&at91cap9_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-at91/at91rm9200_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}

#if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
[0] = {
Expand All @@ -162,7 +162,7 @@ static struct platform_device at91rm9200_eth_device = {
.num_resources = ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
if (!data)
return;
Expand Down Expand Up @@ -199,7 +199,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
platform_device_register(&at91rm9200_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-at91/at91sam9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static struct clk ohci_clk = {
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk macb_clk = {
.name = "macb_clk",
.name = "pclk",
.pmc_mask = 1 << AT91SAM9260_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL,
};
Expand Down Expand Up @@ -190,6 +190,8 @@ static struct clk *periph_clocks[] __initdata = {
};

static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-at91/at91sam9260_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
[0] = {
Expand All @@ -163,7 +163,7 @@ static struct platform_device at91sam9260_eth_device = {
.num_resources = ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
if (!data)
return;
Expand Down Expand Up @@ -200,7 +200,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
platform_device_register(&at91sam9260_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-at91/at91sam9263.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static struct clk pwm_clk = {
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk macb_clk = {
.name = "macb_clk",
.name = "pclk",
.pmc_mask = 1 << AT91SAM9263_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL,
};
Expand Down Expand Up @@ -182,6 +182,8 @@ static struct clk *periph_clocks[] __initdata = {
};

static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-at91/at91sam9263_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
[0] = {
Expand All @@ -171,7 +171,7 @@ static struct platform_device at91sam9263_eth_device = {
.num_resources = ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
if (!data)
return;
Expand Down Expand Up @@ -208,7 +208,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
platform_device_register(&at91sam9263_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-at91/at91sam9g45.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static struct clk ac97_clk = {
.type = CLK_TYPE_PERIPHERAL,
};
static struct clk macb_clk = {
.name = "macb_clk",
.name = "pclk",
.pmc_mask = 1 << AT91SAM9G45_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL,
};
Expand Down Expand Up @@ -209,6 +209,8 @@ static struct clk *periph_clocks[] __initdata = {
};

static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
/* One additional fake clock for ohci */
CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-at91/at91sam9g45_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
[0] = {
Expand All @@ -311,7 +311,7 @@ static struct platform_device at91sam9g45_eth_device = {
.num_resources = ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
if (!data)
return;
Expand Down Expand Up @@ -348,7 +348,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
platform_device_register(&at91sam9g45_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-1arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static void __init onearm_init_early(void)
at91_set_serial_console(0);
}

static struct at91_eth_data __initdata onearm_eth_data = {
static struct macb_platform_data __initdata onearm_eth_data = {
.phy_irq_pin = AT91_PIN_PC4,
.is_rmii = 1,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-afeb-9260v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static struct spi_board_info afeb9260_spi_devices[] = {
/*
* MACB Ethernet device
*/
static struct at91_eth_data __initdata afeb9260_macb_data = {
static struct macb_platform_data __initdata afeb9260_macb_data = {
.phy_irq_pin = AT91_PIN_PA9,
.is_rmii = 0,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-cam60.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static struct spi_board_info cam60_spi_devices[] __initdata = {
/*
* MACB Ethernet device
*/
static struct __initdata at91_eth_data cam60_macb_data = {
static struct __initdata macb_platform_data cam60_macb_data = {
.phy_irq_pin = AT91_PIN_PB5,
.is_rmii = 0,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-cap9adk.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static struct at91_mmc_data __initdata cap9adk_mmc_data = {
/*
* MACB Ethernet device
*/
static struct at91_eth_data __initdata cap9adk_macb_data = {
static struct macb_platform_data __initdata cap9adk_macb_data = {
.is_rmii = 1,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-carmeva.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void __init carmeva_init_early(void)
at91_set_serial_console(0);
}

static struct at91_eth_data __initdata carmeva_eth_data = {
static struct macb_platform_data __initdata carmeva_eth_data = {
.phy_irq_pin = AT91_PIN_PC4,
.is_rmii = 1,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-cpu9krea.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static struct at91_udc_data __initdata cpu9krea_udc_data = {
/*
* MACB Ethernet device
*/
static struct at91_eth_data __initdata cpu9krea_macb_data = {
static struct macb_platform_data __initdata cpu9krea_macb_data = {
.is_rmii = 1,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-cpuat91.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static void __init cpuat91_init_early(void)
at91_set_serial_console(0);
}

static struct at91_eth_data __initdata cpuat91_eth_data = {
static struct macb_platform_data __initdata cpuat91_eth_data = {
.is_rmii = 1,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-csb337.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void __init csb337_init_early(void)
at91_set_serial_console(0);
}

static struct at91_eth_data __initdata csb337_eth_data = {
static struct macb_platform_data __initdata csb337_eth_data = {
.phy_irq_pin = AT91_PIN_PC2,
.is_rmii = 0,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-csb637.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static void __init csb637_init_early(void)
at91_set_serial_console(0);
}

static struct at91_eth_data __initdata csb637_eth_data = {
static struct macb_platform_data __initdata csb637_eth_data = {
.phy_irq_pin = AT91_PIN_PC0,
.is_rmii = 0,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/board-eb9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void __init eb9200_init_early(void)
at91_set_serial_console(0);
}

static struct at91_eth_data __initdata eb9200_eth_data = {
static struct macb_platform_data __initdata eb9200_eth_data = {
.phy_irq_pin = AT91_PIN_PC4,
.is_rmii = 1,
};
Expand Down
Loading

0 comments on commit 87c9740

Please sign in to comment.