]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/eth/arm/tx51karo/v1_0/include/devs_eth_arm_tx51.inl
TX53 Release 2011-06-16
[karo-tx-redboot.git] / packages / devs / eth / arm / tx51karo / v1_0 / include / devs_eth_arm_tx51.inl
1 //==========================================================================
2 //
3 //      devs_eth_arm_tx51.inl
4 //
5 //      Board ethernet I/O definitions.
6 //
7 //==========================================================================
8 //####ECOSGPLCOPYRIGHTBEGIN####
9 // -------------------------------------------
10 // This file is part of eCos, the Embedded Configurable Operating System.
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 //
13 // eCos is free software; you can redistribute it and/or modify it under
14 // the terms of the GNU General Public License as published by the Free
15 // Software Foundation; either version 2 or (at your option) any later version.
16 //
17 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20 // for more details.
21 //
22 // You should have received a copy of the GNU General Public License along
23 // with eCos; if not, write to the Free Software Foundation, Inc.,
24 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 //
26 // As a special exception, if other files instantiate templates or use macros
27 // or inline functions from this file, or you compile this file and link it
28 // with other works to produce a work based on this file, this file does not
29 // by itself cause the resulting work to be covered by the GNU General Public
30 // License. However the source code for this file must still be made available
31 // in accordance with section (3) of the GNU General Public License.
32 //
33 // This exception does not invalidate any other reasons why a work based on
34 // this file might be covered by the GNU General Public License.
35 //
36 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 // at http://sources.redhat.com/ecos/ecos-license/
38 // -------------------------------------------
39 //####ECOSGPLCOPYRIGHTEND####
40 //===========================================================================
41
42 #include <cyg/hal/hal_intr.h>                   // CYGNUM_HAL_INTERRUPT_ETHR
43 #include <cyg/hal/hal_if.h>
44 #include <cyg/hal/mx51_iomux.h>
45
46 #ifdef CYGPKG_REDBOOT
47 #include <pkgconf/redboot.h>
48 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG
49 #include <redboot.h>
50 #include <flash_config.h>
51 #endif
52 #endif
53
54
55 #ifdef __WANT_DEVS
56
57 #ifdef CYGPKG_DEVS_ETH_ARM_MXCBOARD_ETH0
58
59 #ifdef CYGPKG_DEVS_ETH_PHY
60
61 static char  mxc_fec_name[] = "mxc_fec";
62
63 #define MX51_GPIO_ADDR(bank)                    (GPIO1_BASE_ADDR + (((bank) - 1) << 14))
64 #define FEC_POWER_GPIO                                  1, 3
65 #define FEC_RESET_GPIO                                  2, 14
66
67 #ifdef CYGSEM_REDBOOT_PLF_ESA_VALIDATE
68 //
69 // Verify that the given ESA is valid for this platform
70 //
71 static char oui[3] = CYGDAT_DEVS_ETH_ARM_TX51KARO_OUI;
72
73 bool
74 cyg_plf_redboot_esa_validate(unsigned char *val)
75 {
76         return (val[0] == oui[0]) && (val[1] == oui[1]) && (val[2] == oui[2]);
77 }
78 #endif
79
80 extern int tx51_mac_addr_program(unsigned char mac_addr[ETHER_ADDR_LEN]);
81
82 static inline void tx51_write_reg(CYG_ADDRWORD base_addr, CYG_WORD32 offset, CYG_WORD32 val)
83 {
84         if (net_debug) {
85                 diag_printf("Changing reg %08x from %08x to %08x\n",
86                                         base_addr + offset, readl(base_addr + offset), val);
87         }
88         HAL_WRITE_UINT32(base_addr + offset, val);
89 }
90
91 static inline CYG_WORD32 tx51_read_reg(CYG_ADDRWORD base_addr, CYG_WORD32 offset)
92 {
93         CYG_WORD32 val;
94
95         HAL_READ_UINT32(base_addr + offset, val);
96         if (net_debug) diag_printf("Read %08x from reg %08x\n", val, base_addr + offset);
97         return val;
98 }
99
100 static inline void tx51_set_reg(CYG_ADDRWORD base_addr, CYG_WORD32 offset,
101                                                                 CYG_WORD32 set_mask, CYG_WORD32 clr_mask)
102 {
103         CYG_WORD32 val;
104
105         HAL_READ_UINT32(base_addr + offset, val);
106         if (net_debug) diag_printf("Changing reg %08x from %08x to %08x\n", base_addr + offset, val,
107                                    (val & ~clr_mask) | set_mask);
108         val = (val & ~clr_mask) | set_mask;
109         HAL_WRITE_UINT32(base_addr + offset, val);
110 }
111
112 static struct tx51_gpio_setup {
113         cyg_uint32 iomux_addr;
114         cyg_uint8 on_func;
115         cyg_uint8 off_func;
116         cyg_uint8 grp;
117         cyg_uint8 shift;
118 } tx51_fec_gpio_data[] = {
119         /* iomux reg offset,                    func,       gpgrp, */
120         /*                                                                    gpiofn,  gpshift, */
121         { IOMUXC_SW_MUX_CTL_PAD_NANDF_CS3,              0x12, 0x13, 3, 19, }, /* MDC */
122         { IOMUXC_SW_MUX_CTL_PAD_EIM_EB2,                0x13, 0x11, 2, 22, }, /* MDIO */
123         { IOMUXC_SW_MUX_CTL_PAD_NANDF_RB3,              0x11, 0x13, 3, 11, }, /* RXC */
124         { IOMUXC_SW_MUX_CTL_PAD_NANDF_D11,              0x12, 0x13, 3, 29, }, /* RDV */
125         { IOMUXC_SW_MUX_CTL_PAD_NANDF_D9,               0x12, 0x13, 3, 31, }, /* RXD0 */
126         { IOMUXC_SW_MUX_CTL_PAD_EIM_EB3,                0x13, 0x11, 2, 23, }, /* RXD1 */
127         { IOMUXC_SW_MUX_CTL_PAD_EIM_CS2,                0x13, 0x11, 2, 27, }, /* RXD2 */
128         { IOMUXC_SW_MUX_CTL_PAD_EIM_CS3,                0x13, 0x11, 2, 28, }, /* RXD3 */
129         { IOMUXC_SW_MUX_CTL_PAD_EIM_CS4,                0x13, 0x11, 2, 29, }, /* RX_ER */
130         { IOMUXC_SW_MUX_CTL_PAD_NANDF_RDY_INT,  0x11, 0x13, 3, 24, }, /* TXC */
131         { IOMUXC_SW_MUX_CTL_PAD_NANDF_CS7,              0x11, 0x13, 3, 23, }, /* TXE */
132         { IOMUXC_SW_MUX_CTL_PAD_NANDF_D8,               0x12, 0x13, 4,  0, }, /* TXD0 */
133         { IOMUXC_SW_MUX_CTL_PAD_NANDF_CS4,              0x12, 0x13, 3, 20, }, /* TXD1 */
134         { IOMUXC_SW_MUX_CTL_PAD_NANDF_CS5,              0x12, 0x13, 3, 21, }, /* TXD2 */
135         { IOMUXC_SW_MUX_CTL_PAD_NANDF_CS6,              0x12, 0x13, 3, 22, }, /* TXD3 */
136         { IOMUXC_SW_MUX_CTL_PAD_NANDF_RB2,              0x11, 0x13, 3, 10, }, /* COL */
137         { IOMUXC_SW_MUX_CTL_PAD_EIM_CS5,                0x13, 0x11, 2, 30, }, /* CRS */
138         { IOMUXC_SW_MUX_CTL_PAD_NANDF_CS2,              0x13, 0x13, 3, 18, }, /* TX_ER */
139 };
140
141 static struct tx51_gpio_setup tx51_fec_pwr_pins[] = {
142         { IOMUXC_SW_MUX_CTL_PAD_EIM_A20,                0x11, 0x11, 2, 14, }, /* PHY reset */
143         { IOMUXC_SW_MUX_CTL_PAD_GPIO1_3,                0x10, 0x10, 1,  3, }, /* PHY power enable */
144 };
145
146 static struct tx51_gpio_setup tx51_fec_strap_pins[] = {
147         { IOMUXC_SW_MUX_CTL_PAD_GPIO1_3,                0x10, 0x10, 1,  3, }, /* PHY Power enable */
148         { IOMUXC_SW_MUX_CTL_PAD_NANDF_D9,               0x12, 0x13, 3, 31, }, /* Mode[0] */
149         { IOMUXC_SW_MUX_CTL_PAD_EIM_EB3,                0x13, 0x11, 2, 23, }, /* Mode[1] */
150         { IOMUXC_SW_MUX_CTL_PAD_EIM_CS2,                0x13, 0x11, 2, 27, }, /* Mode[2] */
151         { IOMUXC_SW_MUX_CTL_PAD_EIM_CS3,                0x13, 0x11, 2, 28, }, /* nINTSEL */
152 };
153
154 static inline void tx51_phy_power_off(void)
155 {
156         int i;
157
158         if (net_debug) diag_printf("Switching PHY POWER off\n");
159 #if 1
160         for (i = 0; i < NUM_ELEMS(tx51_fec_gpio_data); i++) {
161                 struct tx51_gpio_setup *gs = &tx51_fec_gpio_data[i];
162
163                 if (net_debug) diag_printf("%s: GPIO%d_%d[%d] is %d\n", __FUNCTION__,
164                                                                    gs->grp, gs->shift, i,
165                                                                    gpio_tst_bit(gs->grp, gs->shift));
166         }
167 #endif
168         /* deassert all pins attached to the PHY */
169         for (i = 0; i < NUM_ELEMS(tx51_fec_pwr_pins); i++) {
170                 struct tx51_gpio_setup *gs = &tx51_fec_pwr_pins[i];
171
172                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
173                                          GPIO_DR, 0, 1 << gs->shift);
174                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
175                                          GPIO_GDIR, 1 << gs->shift, 0);
176         }
177         for (i = 0; i < NUM_ELEMS(tx51_fec_gpio_data); i++) {
178                 struct tx51_gpio_setup *gs = &tx51_fec_gpio_data[i];
179 #if 0
180                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
181                                          GPIO_GDIR, 0, 1 << gs->shift);
182 #else
183                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
184                                          GPIO_DR, 0, 1 << gs->shift);
185                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
186                                          GPIO_GDIR, 1 << gs->shift, 0);
187 #endif
188                 tx51_write_reg(0, gs->iomux_addr, gs->off_func);
189         }
190         for (i = 0; i < NUM_ELEMS(tx51_fec_gpio_data); i++) {
191                 struct tx51_gpio_setup *gs = &tx51_fec_gpio_data[i];
192
193                 if (gpio_tst_bit(gs->grp, gs->shift)) {
194                         diag_printf("%s: GPIO%d_%d[%d] is not low\n", __FUNCTION__,
195                                                 gs->grp, gs->shift, i);
196                 }
197         }
198         if (net_debug) diag_printf("PHY POWER off done\n");
199 }
200
201 static bool mxc_fec_init(struct cyg_netdevtab_entry *tab);
202 static bool tx51_fec_init(struct cyg_netdevtab_entry *tab)
203 {
204 #if 1
205         cyg_bool esa_set;
206         int ok;
207
208         /* Check, whether MAC address is enabled */
209         ok = CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
210                                                                          "fec_esa", &esa_set, CONFIG_BOOL);
211 #if 0
212 ok |= 0;
213 //esa_set |= ok;
214 net_debug |= 1;
215 #endif
216         if (!(ok && esa_set)) {
217                 diag_printf("FEC disabled; set fec_esa=true to enable networking\n");
218                 return false;
219         }
220 #endif
221         return mxc_fec_init(tab);
222 }
223
224 static void tx51_fec_phy_init(void)
225 {
226         int i;
227         int phy_reset_delay = 100;
228         int dbg = net_debug;
229
230 #if 0
231         net_debug |= 1;
232 #endif
233         /*
234          * make sure the ETH PHY strap pins are pulled to the right voltage
235          * before deasserting the PHY reset GPIO
236          */
237         /* assert FEC PHY Reset (GPIO2_14) and switch PHY power on (GPIO1_3) */
238
239 #if 0
240         tx51_phy_power_off();
241 #endif
242
243         if (!gpio_tst_bit(1, 3)) {
244                 if (0 || net_debug) diag_printf("Switching PHY POWER on\n");
245                 gpio_clr_bit(2, 14);
246                 gpio_set_bit(1, 3);
247                 /* wait for 22ms for LAN8700 to power up */
248                 phy_reset_delay = 22000;
249 #if 1
250                 if (!gpio_tst_bit(1, 3)) {
251                         diag_printf("**Failed to switch PHY power on: GPIO1_PSR[%08lx]=%08x\n",
252                                                 MX51_GPIO_ADDR(1) + GPIO_PSR,
253                                                 tx51_read_reg(MX51_GPIO_ADDR(1), GPIO_PSR));
254                 }
255 #endif
256 #if 1
257                 if (gpio_tst_bit(2, 14)) {
258                         diag_printf("**Failed to assert PHY reset: GPIO2_PSR[%08lx]=%08x\n",
259                                                 MX51_GPIO_ADDR(2) + GPIO_PSR,
260                                                 tx51_read_reg(MX51_GPIO_ADDR(2), GPIO_PSR));
261                 }
262 #endif
263         } else {
264                 if (0 || net_debug) diag_printf("Asserting PHY RESET\n");
265                 gpio_clr_bit(2, 14);
266 #if 1
267                 if (gpio_tst_bit(2, 14)) {
268                         diag_printf("**Failed to assert PHY reset: GPIO2_PSR[%08lx]=%08x\n",
269                                                 MX51_GPIO_ADDR(2) + GPIO_PSR,
270                                                 tx51_read_reg(MX51_GPIO_ADDR(2), GPIO_PSR));
271                 }
272 #endif
273         }
274         for (i = 0; i < NUM_ELEMS(tx51_fec_gpio_data); i++) {
275                 struct tx51_gpio_setup *gs = &tx51_fec_gpio_data[i];
276                 int j;
277                 int strap = 0;
278
279                 for (j = 0; j < NUM_ELEMS(tx51_fec_strap_pins); j++) {
280                         struct tx51_gpio_setup *sp = &tx51_fec_strap_pins[j];
281
282                         if (gs->grp == sp->grp && gs->shift == sp->shift) {
283                                 strap = 1;
284                                 break;
285                         }
286                 }
287                 if (strap) {
288                         gpio_set_bit(gs->grp, gs->shift);
289                         if (net_debug) diag_printf("Setting GPIO%d_%d[%d] high\n",
290                                                                            gs->grp, gs->shift, i);
291                 } else {
292                         gpio_clr_bit(gs->grp, gs->shift);
293                         if (net_debug) diag_printf("Setting GPIO%d_%d[%d] low\n",
294                                                                            gs->grp, gs->shift, i);
295                 }
296                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
297                                          GPIO_GDIR, 1 << gs->shift, 0);
298                 tx51_write_reg(0, gs->iomux_addr,
299                                            gs->off_func);
300         }
301 #if 1
302         /* configure FEC strap pins to their required values */
303         for (i = 0; i < NUM_ELEMS(tx51_fec_strap_pins); i++) {
304                 struct tx51_gpio_setup *gs = &tx51_fec_strap_pins[i];
305
306                 if (net_debug) diag_printf("Asserting GPIO%d_%d\n", gs->grp,
307                                                                    gs->shift);
308                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
309                                          GPIO_GDIR, 1 << gs->shift, 0);
310                 tx51_set_reg(MX51_GPIO_ADDR(gs->grp),
311                                          GPIO_DR, 1 << gs->shift, 0);
312                 tx51_write_reg(0, gs->iomux_addr,
313                                            gs->off_func);
314                 gpio_set_bit(gs->grp, gs->shift);
315                 if (!gpio_tst_bit(gs->grp, gs->shift)) {
316                         diag_printf("**Failed to assert GPIO%d_%d: GPIO%d_PSR[%08lx]=%08x\n",
317                                                 gs->grp, gs->shift, gs->grp,
318                                                 MX51_GPIO_ADDR(gs->grp) + GPIO_PSR,
319                                                 tx51_read_reg(MX51_GPIO_ADDR(gs->grp), GPIO_PSR));
320                 }
321         }
322 #endif
323         for (i = 0; i < NUM_ELEMS(tx51_fec_gpio_data); i++) {
324                 struct tx51_gpio_setup *gs = &tx51_fec_gpio_data[i];
325                 int j;
326                 int strap = 0;
327
328                 for (j = 0; j < NUM_ELEMS(tx51_fec_strap_pins); j++) {
329                         struct tx51_gpio_setup *sp = &tx51_fec_strap_pins[j];
330
331                         if (gs->grp == sp->grp && gs->shift == sp->shift) {
332                                 strap = 1;
333                                 break;
334                         }
335                 }
336                 if (strap) {
337                         if (!gpio_tst_bit(gs->grp, gs->shift)) {
338                                 diag_printf("GPIO%d_%d[%d] is low instead of high\n",
339                                                         gs->grp, gs->shift, i);
340                         }
341                 } else {
342                         if (gpio_tst_bit(gs->grp, gs->shift)) {
343                                 diag_printf("GPIO%d_%d[%d] is high instead of low\n",
344                                                         gs->grp, gs->shift, i);
345                         }
346                 }
347         }
348         /* wait for 100us according to LAN8700 spec. before ... */
349         HAL_DELAY_US(phy_reset_delay);
350         /* ... deasserting FEC PHY reset */
351         if (0 || net_debug) diag_printf("Releasing PHY RESET\n");
352         gpio_set_bit(2, 14);
353         if (!gpio_tst_bit(2, 14)) {
354                 diag_printf("**Failed to release PHY reset\n");
355         }
356
357         /* configure all FEC pins to their required functions */
358         for (i = 0; i < NUM_ELEMS(tx51_fec_gpio_data); i++) {
359                 struct tx51_gpio_setup *gs = &tx51_fec_gpio_data[i];
360
361                 tx51_write_reg(0, gs->iomux_addr, gs->on_func);
362                 HAL_DELAY_US(10000);
363         }
364         net_debug = dbg;
365 }
366
367 ETH_PHY_REG_LEVEL_ACCESS_FUNS(eth0_phy,
368                                                           tx51_fec_phy_init,
369                                                           mxc_fec_phy_reset,
370                                                           mxc_fec_phy_write,
371                                                           mxc_fec_phy_read);
372
373 cyg_bool _tx51_provide_fec_esa(unsigned char *addr)
374 {
375         cyg_bool enabled;
376         int ok;
377
378         ok = CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
379                                          "fec_esa", &enabled, CONFIG_BOOL);
380         if (ok && enabled) {
381 #ifdef CYGSEM_REDBOOT_PLF_ESA_VALIDATE
382                 cyg_uint8 addr2[ETHER_ADDR_LEN];
383
384                 addr[0] = readl(SOC_FEC_MAC_BASE + 0x14);
385                 addr[1] = readl(SOC_FEC_MAC_BASE + 0x10);
386                 addr[2] = readl(SOC_FEC_MAC_BASE + 0xC);
387                 addr[3] = readl(SOC_FEC_MAC_BASE + 0x8);
388                 addr[4] = readl(SOC_FEC_MAC_BASE + 0x4);
389                 addr[5] = readl(SOC_FEC_MAC_BASE + 0x0);
390
391                 if (cyg_plf_redboot_esa_validate(addr)) {
392                         diag_printf("Ethernet FEC MAC address from fuse bank: ");
393                         diag_printf("%02x:%02x:%02x:%02x:%02x:%02x\n",
394                                                 addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
395                         CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
396                                                                                 "fec_esa_data", addr2, CONFIG_ESA);
397                         if (memcmp(addr, addr2, sizeof(addr)) != 0) {
398                                 CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_SET,
399                                                                                         "fec_esa_data", addr, CONFIG_ESA);
400                         }
401 #ifdef SOC_MAC_ADDR_LOCK_FUSE
402                         if ((readl(IIM_BASE_ADDR + 0x800 + SOC_MAC_ADDR_FUSE_BANK * 0x400 +
403                                            SOC_MAC_ADDR_LOCK_FUSE * 4) &
404                                  SOC_MAC_ADDR_LOCK_BIT) == 0) {
405                                 tx51_mac_addr_program(addr);
406                         }
407 #endif // SOC_MAC_ADDR_LOCK_FUSE
408                         return true;
409                 }
410 #endif // CYGSEM_REDBOOT_PLF_ESA_VALIDATE
411
412                 CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
413                                                                         "fec_esa_data", addr, CONFIG_ESA);
414
415                 diag_printf("Ethernet FEC MAC address from fconfig: ");
416                 diag_printf("%02x:%02x:%02x:%02x:%02x:%02x\n",
417                                         addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
418
419 #ifdef CYGSEM_REDBOOT_PLF_ESA_VALIDATE
420                 if (cyg_plf_redboot_esa_validate(addr)) {
421                         tx51_mac_addr_program(addr);
422                         return true;
423                 }
424
425                 diag_printf("** Error: Invalid MAC address: ");
426                 diag_printf("%02x:%02x:%02x:%02x:%02x:%02x\n",
427                                         addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
428
429                 writel(addr[0], SOC_FEC_MAC_BASE + 0x14);
430                 writel(addr[1], SOC_FEC_MAC_BASE + 0x10);
431                 writel(addr[2], SOC_FEC_MAC_BASE + 0xC);
432                 writel(addr[3], SOC_FEC_MAC_BASE + 0x8);
433                 writel(addr[4], SOC_FEC_MAC_BASE + 0x4);
434                 writel(addr[5], SOC_FEC_MAC_BASE + 0x0);
435
436 #ifdef SOC_MAC_ADDR_LOCK_FUSE
437                 if ((readl(IIM_BASE_ADDR + 0x800 + SOC_MAC_ADDR_FUSE_BANK * 0x400 +
438                                    SOC_MAC_ADDR_LOCK_FUSE * 4) &
439                          SOC_MAC_ADDR_LOCK_BIT) == 0) {
440                         diag_printf("Use 'fconfig fec_esa_data' to set the MAC address\n");
441                         return false;
442                 } else {
443                         diag_printf("Using MAC address from fconfig\n");
444                 }
445 #else
446                 diag_printf("Using MAC address from fconfig\n");
447 #endif // SOC_MAC_ADDR_LOCK_FUSE
448 #endif // CYGSEM_REDBOOT_PLF_ESA_VALIDATE
449                 return true;
450         }
451         return false;
452 }
453
454 static mxc_fec_priv_t mxc_fec_private = {
455         .phy = &eth0_phy,                                                         // PHY access routines
456         .provide_esa = _tx51_provide_fec_esa,
457 };
458
459 ETH_DRV_SC(mxc_fec_sc,
460                    &mxc_fec_private, // Driver specific data
461                    mxc_fec_name,
462                    mxc_fec_start,
463                    mxc_fec_stop,
464                    mxc_fec_control,
465                    mxc_fec_can_send,
466                    mxc_fec_send,
467                    mxc_fec_recv,
468                    mxc_fec_deliver,             // "pseudoDSR" called from fast net thread
469                    mxc_fec_poll,                // poll function, encapsulates ISR and DSR
470                    mxc_fec_int_vector);
471
472 NETDEVTAB_ENTRY(mxc_fec_netdev,
473                                 mxc_fec_name,
474                                 tx51_fec_init,
475                                 &mxc_fec_sc);
476 #endif
477
478 #if defined(CYGPKG_REDBOOT) && defined(CYGSEM_REDBOOT_FLASH_CONFIG)
479 RedBoot_config_option("Set FEC network hardware address [MAC]",
480                                           fec_esa,
481                                           ALWAYS_ENABLED, true,
482                                           CONFIG_BOOL, false
483                                          );
484 RedBoot_config_option("FEC network hardware address [MAC]",
485                                           fec_esa_data,
486                                           "fec_esa", true,
487                                           CONFIG_ESA, 0
488                                          );
489 #endif // CYGPKG_REDBOOT && CYGSEM_REDBOOT_FLASH_CONFIG
490
491 #ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
492 // Note that this section *is* active in an application, outside RedBoot,
493 // where the above section is not included.
494
495 #endif // CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
496 #endif // CYGPKG_DEVS_ETH_ARM_MXCBOARD_ETH0
497
498 #endif // __WANT_DEVS