Skip to content

Commit

Permalink
lpc32xx: add Ethernet support
Browse files Browse the repository at this point in the history
Signed-off-by: Albert ARIBAUD (3ADEV) <[email protected]>
  • Loading branch information
3adev authored and albert-aribaud-u-boot committed Apr 10, 2015
1 parent b491d97 commit ac2916a
Show file tree
Hide file tree
Showing 7 changed files with 659 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clk.h>
#include <asm/arch/wdt.h>
Expand Down Expand Up @@ -55,3 +56,11 @@ int print_cpuinfo(void)
return 0;
}
#endif

#ifdef CONFIG_LPC32XX_ETH
int cpu_eth_init(bd_t *bis)
{
lpc32xx_eth_initialize(bis);
return 0;
}
#endif
7 changes: 7 additions & 0 deletions arch/arm/cpu/arm926ejs/lpc32xx/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ void lpc32xx_uart_init(unsigned int uart_id)
writel(CLK_UART_X_DIV(1) | CLK_UART_Y_DIV(1),
&clk->u3clk + (uart_id - 3));
}

void lpc32xx_mac_init(void)
{
/* Enable MAC interface */
writel(CLK_MAC_REG | CLK_MAC_SLAVE | CLK_MAC_MASTER
| CLK_MAC_MII, &clk->macclk_ctrl);
}
3 changes: 3 additions & 0 deletions arch/arm/include/asm/arch-lpc32xx/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
#define CONFIG_SYS_BAUDRATE_TABLE \
{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }

/* Ethernet */
#define LPC32XX_ETH_BASE ETHERNET_BASE

/* NOR Flash */
#if defined(CONFIG_SYS_FLASH_CFI)
#define CONFIG_FLASH_CFI_DRIVER
Expand Down
1 change: 1 addition & 0 deletions arch/arm/include/asm/arch-lpc32xx/sys_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
#define _LPC32XX_SYS_PROTO_H

void lpc32xx_uart_init(unsigned int uart_id);
void lpc32xx_mac_init(void);

#endif /* _LPC32XX_SYS_PROTO_H */
1 change: 1 addition & 0 deletions drivers/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ obj-$(CONFIG_GRETH) += greth.o
obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o
obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o
obj-$(CONFIG_LAN91C96) += lan91c96.o
obj-$(CONFIG_LPC32XX_ETH) += lpc32xx_eth.o
obj-$(CONFIG_MACB) += macb.o
obj-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
obj-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o
Expand Down
Loading

0 comments on commit ac2916a

Please sign in to comment.