m68knommu: clean up and merge common ColdFire FEC code
cover m68knommu: clean up and merge common ColdFire FEC code
The code to init and platform setup the ColdFire FEC devices is duplicated throughout the CPU specific config.c files. It is all common, this is the same FEC hardware block, just with different base addresses and IRQ numbers used.
Cleanup and merge the common FEC platform code.
arch/m68k/platform/520x/config.c | 31 ------------- arch/m68k/platform/523x/config.c | 31 ------------- arch/m68k/platform/5272/config.c | 37 --------------- arch/m68k/platform/527x/config.c | 65 --------------------------- arch/m68k/platform/528x/config.c | 31 ------------- arch/m68k/platform/532x/config.c | 31 ------------- b/arch/m68k/include/asm/m520xsim.h | 11 +++- b/arch/m68k/include/asm/m523xsim.h | 13 ++++- b/arch/m68k/include/asm/m5272sim.h | 9 ++- b/arch/m68k/include/asm/m527xsim.h | 15 ++++++ b/arch/m68k/include/asm/m528xsim.h | 11 +++- b/arch/m68k/include/asm/m532xsim.h | 13 +++++ b/arch/m68k/platform/520x/config.c | 16 +++--- b/arch/m68k/platform/523x/config.c | 16 +++--- b/arch/m68k/platform/5272/config.c | 16 +++--- b/arch/m68k/platform/527x/config.c | 24 +++++----- b/arch/m68k/platform/528x/config.c | 16 +++--- b/arch/m68k/platform/532x/config.c | 16 +++--- b/arch/m68k/platform/coldfire/device.c | 78 +++++++++++++++++++++++++++++++++ 19 files changed, 192 insertions(+), 288 deletions(-)
PATCH 1/7 m68knommu: make 520x FEC platform addressing consistent
From: Greg Ungerer <[email protected]>
If we make all FEC (ethernet) addressing consistent across all ColdFire family members then we will be able to remove the duplicated plaform data and use a single setup for all.
So modify the ColdFire 520x FEC addressing so that:
. FECs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register) . use a common name for IRQs used
--- arch/m68k/include/asm/m520xsim.h | 11 +++++++++-- arch/m68k/platform/520x/config.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-)
arch/m68k/include/asm/m520xsim.h +9 -2
@@ -48,12 +48,19 @@#define MCFINT_UART1 27/* Interrupt number for UART1 */ #define MCFINT_UART2 28/* Interrupt number for UART2 */ #define MCFINT_QSPI 31/* Interrupt number for QSPI */ +#define MCFINT_FECRX0 36/* Interrupt number for FEC RX */ +#define MCFINT_FECTX0 40/* Interrupt number for FEC RX */ +#define MCFINT_FECENTC0 42/* Interrupt number for FEC RX */ #define MCFINT_PIT1 4/* Interrupt number for PIT1 (PIT0 in processor) */ #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) +#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) +/* * SDRAM configuration registers. */
@@ -155,8 +162,8 @@/* * FEC module. */ -#define MCFFEC_BASE 0xFC030000/* Base of FEC ethernet */ -#define MCFFEC_SIZE 0x800/* Register set size */ +#define MCFFEC_BASE0 0xFC030000/* Base of FEC ethernet */ +#define MCFFEC_SIZE0 0x800/* Register set size */ /* * Reset Control Unit.
arch/m68k/platform/520x/config.c +8 -8
@@ -27,23 +27,23 @@static struct resource m520x_fec_resources[] = { { - .start =MCFFEC_BASE , - .end =MCFFEC_BASE +MCFFEC_SIZE -1 , + .start =MCFFEC_BASE0 , + .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , .flags =IORESOURCE_MEM , }, { - .start =64 +36 , - .end =64 +36 , + .start =MCF_IRQ_FEXRX0 , + .end =MCF_IRQ_FECRX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +40 , - .end =64 +40 , + .start =MCF_IRQ_FECTX0 , + .end =MCF_IRQ_FECTX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +42 , - .end =64 +42 , + .start =MCF_IRQ_FECENTC0 , + .end =MCF_IRQ_FECENTC0 , .flags =IORESOURCE_IRQ , }, };
Signature · 1 line
1.7.0.4
PATCH 2/7 m68knommu: make 523x FEC platform addressing consistent
In reply to [email protected]From: Greg Ungerer <[email protected]>
If we make all FEC (ethernet) addressing consistent across all ColdFire family members then we will be able to remove the duplicated plaform data and use a single setup for all.
So modify the ColdFire 523x FEC addressing so that:
. FECs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register) . use a common name for IRQs used
--- arch/m68k/include/asm/m523xsim.h | 13 ++++++++++--- arch/m68k/platform/523x/config.c | 16 ++++++++-------- 2 files changed, 18 insertions(+), 11 deletions(-)
arch/m68k/include/asm/m523xsim.h +10 -3
@@ -37,13 +37,20 @@#define MCFINT_UART0 13/* Interrupt number for UART0 */ #define MCFINT_UART1 14/* Interrupt number for UART1 */ #define MCFINT_UART2 15/* Interrupt number for UART2 */ -#define MCFINT_PIT1 36/* Interrupt number for PIT1 */ #define MCFINT_QSPI 18/* Interrupt number for QSPI */ +#define MCFINT_FECRX0 23/* Interrupt number for FEC */ +#define MCFINT_FECTX0 27/* Interrupt number for FEC */ +#define MCFINT_FECENTC0 29/* Interrupt number for FEC */ +#define MCFINT_PIT1 36/* Interrupt number for PIT1 */ #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) +#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) +/* * SDRAM configuration registers. */
@@ -72,8 +79,8 @@/* * FEC ethernet module. */ -#define MCFFEC_BASE (MCF_IPSBAR + 0x1000) -#define MCFFEC_SIZE 0x800 +#define MCFFEC_BASE0 (MCF_IPSBAR + 0x1000) +#define MCFFEC_SIZE0 0x800/* * GPIO module.
arch/m68k/platform/523x/config.c +8 -8
@@ -28,23 +28,23 @@static struct resource m523x_fec_resources[] = { { - .start =MCFFEC_BASE , - .end =MCFFEC_BASE +MCFFEC_SIZE -1 , + .start =MCFFEC_BASE0 , + .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , .flags =IORESOURCE_MEM , }, { - .start =64 +23 , - .end =64 +23 , + .start =MCF_IRQ_FECRX0 , + .end =MCF_IRQ_FECRX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +27 , - .end =64 +27 , + .start =MCF_IRQ_FECTX0 , + .end =MCF_IRQ_FECTX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +29 , - .end =64 +29 , + .start =MCF_IRQ_FECENTC0 , + .end =MCF_IRQ_FECENTC0 , .flags =IORESOURCE_IRQ , }, };
Signature · 1 line
1.7.0.4
PATCH 3/7 m68knommu: make 5272 FEC platform addressing consistent
In reply to [email protected]From: Greg Ungerer <[email protected]>
If we make all FEC (ethernet) addressing consistent across all ColdFire family members then we will be able to remove the duplicated plaform data and use a single setup for all.
So modify the ColdFire 5272 FEC addressing so that:
. FECs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register) . use a common name for IRQs used
--- arch/m68k/include/asm/m5272sim.h | 9 ++++++--- arch/m68k/platform/5272/config.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-)
arch/m68k/include/asm/m5272sim.h +6 -3
@@ -88,6 +88,9 @@#define MCFTIMER_BASE3 (MCF_MBAR + 0x240)/* Base address TIMER4 */ #define MCFTIMER_BASE4 (MCF_MBAR + 0x260)/* Base address TIMER3 */ +#define MCFFEC_BASE0 (MCF_MBAR + 0x840)/* Base FEC ethernet */ +#define MCFFEC_SIZE0 0x1d0 +/* * Define system peripheral IRQ usage. */
@@ -114,9 +117,9 @@#define MCF_IRQ_USB6 83/* USB Endpoint 6 */ #define MCF_IRQ_USB7 84/* USB Endpoint 7 */ #define MCF_IRQ_DMA 85/* DMA Controller */ -#define MCF_IRQ_ERX 86/* Ethernet Receiver */ -#define MCF_IRQ_ETX 87/* Ethernet Transmitter */ -#define MCF_IRQ_ENTC 88/* Ethernet Non-Time Critical */ +#define MCF_IRQ_FECRX0 86/* Ethernet Receiver */ +#define MCF_IRQ_FECTX0 87/* Ethernet Transmitter */ +#define MCF_IRQ_FECENTC0 88/* Ethernet Non-Time Critical */ #define MCF_IRQ_QSPI 89/* Queued Serial Interface */ #define MCF_IRQ_EINT5 90/* External Interrupt 5 */ #define MCF_IRQ_EINT6 91/* External Interrupt 6 */
arch/m68k/platform/5272/config.c +8 -8
@@ -32,23 +32,23 @@ unsigned char ledbank = 0xff;static struct resource m5272_fec_resources[] = { { - .start =MCF_MBAR +0x840 , - .end =MCF_MBAR +0x840 +0x1cf , + .start =MCFFEC_BASE0 , + .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , .flags =IORESOURCE_MEM , }, { - .start =MCF_IRQ_ERX , - .end =MCF_IRQ_ERX , + .start =MCF_IRQ_FECRX0 , + .end =MCF_IRQ_FECRX0 , .flags =IORESOURCE_IRQ , }, { - .start =MCF_IRQ_ETX , - .end =MCF_IRQ_ETX , + .start =MCF_IRQ_FECTX0 , + .end =MCF_IRQ_FECTX0 , .flags =IORESOURCE_IRQ , }, { - .start =MCF_IRQ_ENTC , - .end =MCF_IRQ_ENTC , + .start =MCF_IRQ_FECENTC0 , + .end =MCF_IRQ_FECENTC0 , .flags =IORESOURCE_IRQ , }, };
Signature · 1 line
1.7.0.4
PATCH 4/7 m68knommu: make 527x FEC platform addressing consistent
In reply to [email protected]From: Greg Ungerer <[email protected]>
If we make all FEC (ethernet) addressing consistent across all ColdFire family members then we will be able to remove the duplicated plaform data and use a single setup for all.
So modify the ColdFire 527x FEC addressing so that:
. FECs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register) . use a common name for IRQs used
--- arch/m68k/include/asm/m527xsim.h | 15 +++++++++++++++ arch/m68k/platform/527x/config.c | 24 ++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-)
arch/m68k/include/asm/m527xsim.h +15 -0
@@ -38,12 +38,27 @@#define MCFINT_UART1 14/* Interrupt number for UART1 */ #define MCFINT_UART2 15/* Interrupt number for UART2 */ #define MCFINT_QSPI 18/* Interrupt number for QSPI */ +#define MCFINT_FECRX0 23/* Interrupt number for FEC0 */ +#define MCFINT_FECTX0 27/* Interrupt number for FEC0 */ +#define MCFINT_FECENTC0 29/* Interrupt number for FEC0 */ #define MCFINT_PIT1 36/* Interrupt number for PIT1 */ +#define MCFINT2_VECBASE 128/* Vector base number 2 */ +#define MCFINT2_FECRX1 23/* Interrupt number for FEC1 */ +#define MCFINT2_FECTX1 27/* Interrupt number for FEC1 */ +#define MCFINT2_FECENTC1 29/* Interrupt number for FEC1 */ +#define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) +#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) +#define MCF_IRQ_FECRX1 (MCFINT2_VECBASE + MCFINT2_FECRX1) +#define MCF_IRQ_FECTX1 (MCFINT2_VECBASE + MCFINT2_FECTX1) +#define MCF_IRQ_FECENTC1 (MCFINT2_VECBASE + MCFINT2_FECENTC1) +/* * SDRAM configuration registers. */
arch/m68k/platform/527x/config.c +12 -12
@@ -33,18 +33,18 @@ static struct resource m527x_fec0_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = 64 + 23, - .end = 64 + 23, + .start = MCF_IRQ_FECRX0, + .end = MCF_IRQ_FECRX0, .flags = IORESOURCE_IRQ, }, { - .start = 64 + 27, - .end = 64 + 27, + .start = MCF_IRQ_FECTX0, + .end = MCF_IRQ_FECTX0, .flags = IORESOURCE_IRQ, }, { - .start = 64 + 29, - .end = 64 + 29, + .start = MCF_IRQ_FECENTC0, + .end = MCF_IRQ_FECENTC0, .flags = IORESOURCE_IRQ, }, };
@@ -56,18 +56,18 @@ static struct resource m527x_fec1_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = 128 + 23, - .end = 128 + 23, + .start = MCF_IRQ_FECRX1, + .end = MCF_IRQ_FECRX1, .flags = IORESOURCE_IRQ, }, { - .start = 128 + 27, - .end = 128 + 27, + .start = MCF_IRQ_FECTX1, + .end = MCF_IRQ_FECTX1, .flags = IORESOURCE_IRQ, }, { - .start = 128 + 29, - .end = 128 + 29, + .start = MCF_IRQ_FECENTC1, + .end = MCF_IRQ_FECENTC1, .flags = IORESOURCE_IRQ, }, };
Signature · 1 line
1.7.0.4
PATCH 5/7 m68knommu: make 528x FEC platform addressing consistent
In reply to [email protected]From: Greg Ungerer <[email protected]>
If we make all FEC (ethernet) addressing consistent across all ColdFire family members then we will be able to remove the duplicated plaform data and use a single setup for all.
So modify the ColdFire 528x FEC addressing so that:
. FECs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register) . use a common name for IRQs used
--- arch/m68k/include/asm/m528xsim.h | 11 +++++++++-- arch/m68k/platform/528x/config.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-)
arch/m68k/include/asm/m528xsim.h +9 -2
@@ -38,12 +38,19 @@#define MCFINT_UART1 14/* Interrupt number for UART1 */ #define MCFINT_UART2 15/* Interrupt number for UART2 */ #define MCFINT_QSPI 18/* Interrupt number for QSPI */ +#define MCFINT_FECRX0 23/* Interrupt number for FEC */ +#define MCFINT_FECTX0 27/* Interrupt number for FEC */ +#define MCFINT_FECENTC0 29/* Interrupt number for FEC */ #define MCFINT_PIT1 55/* Interrupt number for PIT1 */ #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) +#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) +/* * SDRAM configuration registers. */
@@ -71,8 +78,8 @@/* * FEC ethernet module. */ -#define MCFFEC_BASE (MCF_IPSBAR + 0x00001000) -#define MCFFEC_SIZE 0x800 +#define MCFFEC_BASE0 (MCF_IPSBAR + 0x00001000) +#define MCFFEC_SIZE0 0x800/* * GPIO registers
arch/m68k/platform/528x/config.c +8 -8
@@ -29,23 +29,23 @@static struct resource m528x_fec_resources[] = { { - .start =MCFFEC_BASE , - .end =MCFFEC_BASE +MCFFEC_SIZE -1 , + .start =MCFFEC_BASE0 , + .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , .flags =IORESOURCE_MEM , }, { - .start =64 +23 , - .end =64 +23 , + .start =MCF_IRQ_FECRX0 , + .end =MCF_IRQ_FECRX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +27 , - .end =64 +27 , + .start =MCF_IRQ_FECTX0 , + .end =MCF_IRQ_FECTX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +29 , - .end =64 +29 , + .start =MCF_IRQ_FECENTC0 , + .end =MCF_IRQ_FECENTC0 , .flags =IORESOURCE_IRQ , }, };
Signature · 1 line
1.7.0.4
PATCH 6/7 m68knommu: make 532x FEC platform addressing consistent
In reply to [email protected]From: Greg Ungerer <[email protected]>
If we make all FEC (ethernet) addressing consistent across all ColdFire family members then we will be able to remove the duplicated plaform data and use a single setup for all.
So modify the ColdFire 532x FEC addressing so that:
. FECs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register) . use a common name for IRQs used
--- arch/m68k/include/asm/m532xsim.h | 13 +++++++++++++ arch/m68k/platform/532x/config.c | 16 ++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-)
arch/m68k/include/asm/m532xsim.h +13 -0
@@ -24,11 +24,18 @@#define MCFINT_UART1 27/* Interrupt number for UART1 */ #define MCFINT_UART2 28/* Interrupt number for UART2 */ #define MCFINT_QSPI 31/* Interrupt number for QSPI */ +#define MCFINT_FECRX0 36/* Interrupt number for FEC */ +#define MCFINT_FECTX0 40/* Interrupt number for FEC */ +#define MCFINT_FECENTC0 42/* Interrupt number for FEC */ #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) +#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) +#define MCF_WTM_WCR MCF_REG16(0xFC098000)/*
@@ -91,6 +98,12 @@#define MCFUART_BASE2 0xFC068000/* Base address of UART3 */ /* +* FEC module. +*/ +#define MCFFEC_BASE0 0xFC030000/* Base address of FEC0 */ +#define MCFFEC_SIZE0 0x800/* Size of FEC0 region */ + +/* * Timer module. */ #define MCFTIMER_BASE1 0xFC070000/* Base address of TIMER1 */
arch/m68k/platform/532x/config.c +8 -8
@@ -35,23 +35,23 @@static struct resource m532x_fec_resources[] = { { - .start =0xfc030000 , - .end =0xfc0307ff , + .start =MCFFEC_BASE0 , + .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , .flags =IORESOURCE_MEM , }, { - .start =64 +36 , - .end =64 +36 , + .start =MCF_IRQ_FECRX0 , + .end =MCF_IRQ_FECRX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +40 , - .end =64 +40 , + .start =MCF_IRQ_FECTX0 , + .end =MCF_IRQ_FECTX0 , .flags =IORESOURCE_IRQ , }, { - .start =64 +42 , - .end =64 +42 , + .start =MCF_IRQ_FECENTC0 , + .end =MCF_IRQ_FECENTC0 , .flags =IORESOURCE_IRQ , }, };
Signature · 1 line
1.7.0.4
PATCH 7/7 m68knommu: merge common ColdFire FEC platform setup code
In reply to [email protected]From: Greg Ungerer <[email protected]>
The ColdFire FEC is common to quite a few ColdFire CPUs. No need to duplicate its platform setup code for every CPU family member that has it. Merge all the setup code into a single shared file.
--- arch/m68k/platform/520x/config.c | 31 ------------- arch/m68k/platform/523x/config.c | 31 ------------- arch/m68k/platform/5272/config.c | 37 ---------------- arch/m68k/platform/527x/config.c | 65 ---------------------------- arch/m68k/platform/528x/config.c | 31 ------------- arch/m68k/platform/532x/config.c | 31 ------------- arch/m68k/platform/coldfire/device.c | 78 ++++++++++++++++++++++++++++++++++ 7 files changed, 78 insertions(+), 226 deletions(-)
arch/m68k/platform/520x/config.c +0 -31
@@ -25,36 +25,6 @@/***************************************************************************/ -static struct resource m520x_fec_resources[] = { - { - .start =MCFFEC_BASE0 , - .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , - .flags =IORESOURCE_MEM , - }, - { - .start =MCF_IRQ_FEXRX0 , - .end =MCF_IRQ_FECRX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECTX0 , - .end =MCF_IRQ_FECTX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECENTC0 , - .end =MCF_IRQ_FECENTC0 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device m520x_fec = { - .name ="fec" , - .id =0 , - .num_resources =ARRAY_SIZE (m520x_fec_resources), - .resource = m520x_fec_resources, -}; - #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) static struct resource m520x_qspi_resources[] = { {
@@ -196,7 +166,6 @@ static void __init m520x_qspi_init(void) static struct platform_device *m520x_devices[] __initdata = { - &m520x_fec,#if defined(CONFIG_SPI_COLDFIRE_QSPI ) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE ) &m520x_qspi,#endif
arch/m68k/platform/523x/config.c +0 -31
@@ -26,36 +26,6 @@/***************************************************************************/ -static struct resource m523x_fec_resources[] = { - { - .start =MCFFEC_BASE0 , - .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , - .flags =IORESOURCE_MEM , - }, - { - .start =MCF_IRQ_FECRX0 , - .end =MCF_IRQ_FECRX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECTX0 , - .end =MCF_IRQ_FECTX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECENTC0 , - .end =MCF_IRQ_FECENTC0 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device m523x_fec = { - .name ="fec" , - .id =0 , - .num_resources =ARRAY_SIZE (m523x_fec_resources), - .resource = m523x_fec_resources, -}; - #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) static struct resource m523x_qspi_resources[] = { {
@@ -257,7 +227,6 @@ void __init config_BSP(char *commandp, int size)static int __init init_BSP (void ) { -m523x_fec_init ();#if defined(CONFIG_SPI_COLDFIRE_QSPI ) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE )m523x_qspi_init ();#endif
arch/m68k/platform/5272/config.c +0 -37
@@ -30,42 +30,6 @@ unsigned char ledbank = 0xff;/***************************************************************************/ -static struct resource m5272_fec_resources[] = { - { - .start =MCFFEC_BASE0 , - .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , - .flags =IORESOURCE_MEM , - }, - { - .start =MCF_IRQ_FECRX0 , - .end =MCF_IRQ_FECRX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECTX0 , - .end =MCF_IRQ_FECTX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECENTC0 , - .end =MCF_IRQ_FECENTC0 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device m5272_fec = { - .name ="fec" , - .id =0 , - .num_resources =ARRAY_SIZE (m5272_fec_resources), - .resource = m5272_fec_resources, -}; - -static struct platform_device *m5272_devices[]__initdata = { - &m5272_fec, -}; - -/***************************************************************************/ -static void __init m5272_uarts_init (void ) {u32 v;
@@ -137,7 +101,6 @@ static int __init init_BSP(void) {m5272_uarts_init ();fixed_phy_add (PHY_POLL ,0 , &nettel_fixed_phy_status); -platform_add_devices (m5272_devices,ARRAY_SIZE (m5272_devices));return 0 ; }
arch/m68k/platform/527x/config.c +0 -65
77 lines not on this page · raw message
arch/m68k/platform/528x/config.c +0 -31
@@ -27,36 +27,6 @@/***************************************************************************/ -static struct resource m528x_fec_resources[] = { - { - .start =MCFFEC_BASE0 , - .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , - .flags =IORESOURCE_MEM , - }, - { - .start =MCF_IRQ_FECRX0 , - .end =MCF_IRQ_FECRX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECTX0 , - .end =MCF_IRQ_FECTX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECENTC0 , - .end =MCF_IRQ_FECENTC0 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device m528x_fec = { - .name ="fec" , - .id =0 , - .num_resources =ARRAY_SIZE (m528x_fec_resources), - .resource = m528x_fec_resources, -}; - #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) static struct resource m528x_qspi_resources[] = { {
@@ -187,7 +157,6 @@ static void __init m528x_qspi_init(void)#endif /* defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) */ static struct platform_device *m528x_devices[] __initdata = { - &m528x_fec,#if defined(CONFIG_SPI_COLDFIRE_QSPI ) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE ) &m528x_qspi,#endif
arch/m68k/platform/532x/config.c +0 -31
@@ -33,36 +33,6 @@/***************************************************************************/ -static struct resource m532x_fec_resources[] = { - { - .start =MCFFEC_BASE0 , - .end =MCFFEC_BASE0 +MCFFEC_SIZE0 -1 , - .flags =IORESOURCE_MEM , - }, - { - .start =MCF_IRQ_FECRX0 , - .end =MCF_IRQ_FECRX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECTX0 , - .end =MCF_IRQ_FECTX0 , - .flags =IORESOURCE_IRQ , - }, - { - .start =MCF_IRQ_FECENTC0 , - .end =MCF_IRQ_FECENTC0 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device m532x_fec = { - .name ="fec" , - .id =0 , - .num_resources =ARRAY_SIZE (m532x_fec_resources), - .resource = m532x_fec_resources, -}; - #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) static struct resource m532x_qspi_resources[] = { {
@@ -179,7 +149,6 @@ static void __init m532x_qspi_init(void) static struct platform_device *m532x_devices[] __initdata = { - &m532x_fec,#if defined(CONFIG_SPI_COLDFIRE_QSPI ) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE ) &m532x_qspi,#endif
arch/m68k/platform/coldfire/device.c +78 -0
92 lines not on this page · raw message
Signature · 1 line
1.7.0.4