beaglebone ethernet improvements
. added enable interrupts routine at the HW init stage . remove workaround, obsoleted by libnetdriver change . change netconf.sh to allow configuring this driver, changed README.txt to reflect this Change-Id: Ib659d5a55be96022b5e9013caa556dca5092ce89
This commit is contained in:
parent
3ef93645b9
commit
0c044c6b02
3 changed files with 10 additions and 23 deletions
|
@ -99,17 +99,18 @@ card()
|
||||||
printf "%2d. %s %s\n" "$card_number" "$card_mark" "$card_name"
|
printf "%2d. %s %s\n" "$card_number" "$card_mark" "$card_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
first_pcicard=4
|
first_pcicard=5
|
||||||
|
|
||||||
cards()
|
cards()
|
||||||
{
|
{
|
||||||
# Run lspci once to a temp file for use in 'card' function
|
# Run lspci once to a temp file for use in 'card' function
|
||||||
lspci >$LSPCI || exit
|
lspci >$LSPCI 2>/dev/null || true
|
||||||
|
|
||||||
card 0 "No Ethernet card (no networking)"
|
card 0 "No Ethernet card (no networking)"
|
||||||
card 1 "3Com 501 or 3Com 509 based card"
|
card 1 "3Com 501 or 3Com 509 based card"
|
||||||
card 2 "Realtek 8029 based card (also emulated by Qemu)" "10EC:8029"
|
card 2 "Realtek 8029 based card (also emulated by Qemu)" "10EC:8029"
|
||||||
card 3 "NE2000, 3com 503 or WD based card (also emulated by Bochs)"
|
card 3 "NE2000, 3com 503 or WD based card (also emulated by Bochs)"
|
||||||
|
card 4 "lan8710a (on BeagleBone, BeagleBone Black)"
|
||||||
n=$first_pcicard
|
n=$first_pcicard
|
||||||
for pcicard in $pci_list
|
for pcicard in $pci_list
|
||||||
do var=\$pci_descr$pcicard; descr="`eval echo $var`"
|
do var=\$pci_descr$pcicard; descr="`eval echo $var`"
|
||||||
|
@ -201,6 +202,7 @@ drv_params()
|
||||||
test "$v" = 1 && echo "Note: After installing, edit $LOCALRC to the right configuration."
|
test "$v" = 1 && echo "Note: After installing, edit $LOCALRC to the right configuration."
|
||||||
test "$v" = 1 && echo " chose option 4, the defaults for emulation by Bochs have been set."
|
test "$v" = 1 && echo " chose option 4, the defaults for emulation by Bochs have been set."
|
||||||
;;
|
;;
|
||||||
|
4) driver=lan8710a; ;;
|
||||||
$first_after_pci) driver="psip0"; ;;
|
$first_after_pci) driver="psip0"; ;;
|
||||||
*) warn "choose a number"
|
*) warn "choose a number"
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -8,14 +8,9 @@ created July 2013, JPEmbedded (info@jpembedded.eu)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
* INSTALLATION: *
|
* INSTALLATION: *
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
To install LAN8710A for BeagleBone under MINIX you have to edit /etc/inet.conf
|
To install LAN8710A for BeagleBone under MINIX you execute 'netconf' as
|
||||||
by adding line:
|
usual. Select the LAN8710A driver from the list. Restart the system
|
||||||
eth0 lan8710a 0 { default; };
|
and the driver should work.
|
||||||
and changing:
|
|
||||||
psip0 { default; };
|
|
||||||
to:
|
|
||||||
psip1;
|
|
||||||
Restart the system and the driver should work.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
* TESTS: *
|
* TESTS: *
|
||||||
|
|
|
@ -58,7 +58,6 @@ main(int argc, char *argv[])
|
||||||
message m;
|
message m;
|
||||||
int r;
|
int r;
|
||||||
int ipc_status;
|
int ipc_status;
|
||||||
static int rx_first_enabled = FALSE;
|
|
||||||
|
|
||||||
/* SEF local startup */
|
/* SEF local startup */
|
||||||
env_setargs(argc, argv);
|
env_setargs(argc, argv);
|
||||||
|
@ -90,18 +89,6 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
case DL_GETSTAT_S:
|
case DL_GETSTAT_S:
|
||||||
lan8710a_getstat(&m);
|
lan8710a_getstat(&m);
|
||||||
/*
|
|
||||||
* Workaround:
|
|
||||||
* Re-enabling interrupts here is made to avoid
|
|
||||||
* problem that Rx interrupt came when it can't
|
|
||||||
* be handled. When this problem occurs next Rx
|
|
||||||
* interrupts don't appear.
|
|
||||||
*/
|
|
||||||
if(rx_first_enabled == FALSE) {
|
|
||||||
rx_first_enabled = TRUE;
|
|
||||||
lan8710a_enable_interrupt(RX_INT |
|
|
||||||
TX_INT);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
panic("Illegal message: %d", m.m_type);
|
panic("Illegal message: %d", m.m_type);
|
||||||
|
@ -797,6 +784,9 @@ lan8710a_init_hw(void)
|
||||||
/* GMII RX and TX release from reset. */
|
/* GMII RX and TX release from reset. */
|
||||||
lan8710a_reg_set(CPSW_SL_MACCONTROL(1), CPSW_SL_GMII_EN);
|
lan8710a_reg_set(CPSW_SL_MACCONTROL(1), CPSW_SL_GMII_EN);
|
||||||
|
|
||||||
|
/* Enable interrupts. */
|
||||||
|
lan8710a_enable_interrupt(RX_INT | TX_INT);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue