This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

omapl138 UBOOT EMAC without PHY

Other Parts Discussed in Thread: OMAPL138

Hi,

I'm using UBOOT provided by MCSDK_1_01_00_02 for omapl138. I'd want to connect EMAC of omapl138 directly with another EMAC switch into FPGA by MII.

My target is like omapl138_lcdk provided by TI (da850evm).

I did that with linux and it works. But I can't do it with UBOOT after to have done some changes:

- PING from OMAP to PC works (with uboot shell)

- PING from PC to omapl138 doesn't work (with PC shell)

- PING from omapl to omapl doesn't work (with uboot shell)

- PING from PC to omapl138  works (with PC shell) while I do a PING from  omapl to omapl (with uboot shell). After it doesn't work anymore.

When it doesn't work, I obtains message "ping failed; host 192.168.1.4 is not alive".

ip PC : 192.168.1.1

mask PC : 255.255.255.0

ip omapl uboot : 192.168.1.4

I set these environment variables :

ethaddr=00:00:00:fc:fa:c3
gatewayip=192.168.1.1
ipaddr=192.168.1.4
netdev=eth0
netmask=255.255.255.0
serverip=192.168.1.1


Perhaps something is missing?

I send you files I have modified...


Thanks a lot

Best regards

2806.omapl138_lcdk.h

5076.davinci_emac.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Ethernet driver for TI TMS320DM644x (DaVinci) chips.
*
* Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
*
* Parts shamelessly stolen from TI's dm644x_emac.c. Original copyright
* follows:
*
* ----------------------------------------------------------------------------
*
* dm644x_emac.c
*
* TI DaVinci (DM644X) EMAC peripheral driver source for DV-EVM
*
* Copyright (C) 2005 Texas Instruments.
*
* ----------------------------------------------------------------------------
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* ----------------------------------------------------------------------------
* Modifications:
* ver. 1.0: Sep 2005, Anant Gole - Created EMAC version for uBoot.
* ver 1.1: Nov 2005, Anant Gole - Extended the RX logic for multiple descriptors
*
*/
#include <common.h>
#include <command.h>
#include <net.h>
#include <miiphy.h>
#include <malloc.h>
#include <linux/compiler.h>
#include <asm/arch/emac_defs.h>
#include <asm/io.h>
#include "davinci_emac.h"
unsigned int emac_dbg = 0;
#define debug_emac(fmt,args...) if (emac_dbg) printf(fmt,##args)
#ifdef EMAC_HW_RAM_ADDR
static inline unsigned long BD_TO_HW(unsigned long x)
{
if (x == 0)
return 0;
return x - EMAC_WRAPPER_RAM_ADDR + EMAC_HW_RAM_ADDR;
}
static inline unsigned long HW_TO_BD(unsigned long x)
{
if (x == 0)
return 0;
return x - EMAC_HW_RAM_ADDR + EMAC_WRAPPER_RAM_ADDR;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

4062.omapl138_lcdk.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* Based on da850evm.c. Original Copyrights follow:
*
* Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. <nick.thompson@gefanuc.com>
* Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <common.h>
#include <i2c.h>
#include <net.h>
#include <netdev.h>
#include <spi.h>
#include <spi_flash.h>
#include <asm/arch/hardware.h>
#include <asm/arch/emif_defs.h>
#include <asm/arch/emac_defs.h>
#include <asm/io.h>
#include <asm/errno.h>
#include <asm/arch/davinci_misc.h>
#ifdef CONFIG_DAVINCI_MMC
#include <mmc.h>
#include <asm/arch/sdmmc_defs.h>
#endif
DECLARE_GLOBAL_DATA_PTR;
#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
#ifdef CONFIG_DAVINCI_MMC
/* MMC0 pin muxer settings */
const struct pinmux_config mmc0_pins[] = {
/* GP0[11] is required for SD to work on Rev 3 EVMs */
{ pinmux(0), 8, 4 }, /* GP0[11] */
{ pinmux(10), 2, 0 }, /* MMCSD0_CLK */
{ pinmux(10), 2, 1 }, /* MMCSD0_CMD */
{ pinmux(10), 2, 2 }, /* MMCSD0_DAT_0 */
{ pinmux(10), 2, 3 }, /* MMCSD0_DAT_1 */
{ pinmux(10), 2, 4 }, /* MMCSD0_DAT_2 */
{ pinmux(10), 2, 5 }, /* MMCSD0_DAT_3 */
/* LCDK supports only 4-bit mode, remaining pins are not configured */
};
#endif
/* UART pin muxer settings */
static const struct pinmux_config uart_pins[] = {
{ pinmux(0), 4, 6 },
{ pinmux(0), 4, 7 },
{ pinmux(4), 2, 4 },
{ pinmux(4), 2, 5 }
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Sebastien