Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Lucy <[email protected]>
  • Loading branch information
lucypa committed Mar 11, 2022
1 parent 8a0b212 commit f26bcf1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
9 changes: 1 addition & 8 deletions libethdrivers/src/lwip.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ static void initialize_free_bufs(lwip_iface_t *iface)
}

static uintptr_t lwip_allocate_rx_buf(void *iface, size_t buf_size, void **cookie)
{
ZF_LOGW("lwip.c in libethdrivers/src/plat called lwip_allocate_rx_buf()\n");

{
lwip_iface_t *lwip_iface = (lwip_iface_t *)iface;
if (buf_size > CONFIG_LIB_ETHDRIVER_PREALLOCATED_BUF_SIZE) {
LOG_ERROR("Requested RX buffer of size %zu which can never be fullfilled by preallocated buffers of size %d", buf_size,
Expand Down Expand Up @@ -142,9 +140,6 @@ static void lwip_rx_complete(void *iface, unsigned int num_bufs, void **cookies,
}
}

// PKT_DEBUG(printf("Receiving packet\n"));
// PKT_DEBUG(print_packet(COL_RX, p->payload, len));

#if ETH_PAD_SIZE
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif
Expand Down Expand Up @@ -413,8 +408,6 @@ static err_t ethif_init(struct netif *netif)
return ERR_ARG;
}

printf("Does this file, lwip.c, get used\n");

lwip_iface_t *iface = (lwip_iface_t *)netif->state;
int mtu;
iface->driver.i_fn.low_level_init(&iface->driver, netif->hwaddr, &mtu);
Expand Down
10 changes: 1 addition & 9 deletions libethdrivers/src/plat/imx6/imx6.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static void handle_irq(struct eth_driver *driver, int irq)
if (e & NETIRQ_TXF) {
complete_tx(dev);
}
if (e & NETIRQ_RXF && rx_irq_enabled(driver)) {
if (e & NETIRQ_RXF) {
complete_rx(dev);
fill_rx_bufs(dev);
}
Expand Down Expand Up @@ -517,14 +517,6 @@ static void raw_poll(struct eth_driver *driver)
fill_rx_bufs(dev);
}

static void checksum(unsigned char *buffer, unsigned int len) {
unsigned int csum;
unsigned char *p;
unsigned int i;
for (p = buffer, i=len, csum=0; i > 0; csum += *p++, --i);
printf("check sum = %zu\n", csum);
}

static int raw_tx(struct eth_driver *driver, unsigned int num, uintptr_t *phys,
unsigned int *len, void *cookie)
{
Expand Down
1 change: 0 additions & 1 deletion libethdrivers/src/plat/imx6/ocotp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#define IMX6_OCOTP_SIZE 0x00004000

#elif defined(CONFIG_PLAT_IMX8MQ_EVK) || defined(CONFIG_PLAT_IMX8MM_EVK)
// from: root/arch/arm/include/asm/arch-imx8m/imx-regs-imx8mm.h
#define IMX6_OCOTP_PADDR 0x30350000
#define IMX6_OCOTP_SIZE 0x00010000

Expand Down
4 changes: 2 additions & 2 deletions libethdrivers/src/plat/imx6/uboot/imx8mm_pins.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2018-2019 NXP
* Taken from u-boot/arch/arm/include/asm/arch-imx8m/imx8mm_pins.h
* Content derived from u-boot/arch/arm/include/asm/arch-imx8m/imx8mm_pins.h
*/

#pragma once
Expand Down Expand Up @@ -691,4 +691,4 @@ enum {
IMX8MM_PAD_UART4_TXD_UART2_RTS_B = IOMUX_PAD(0x04B8, 0x0250, 1, 0x04F8, 1, 0),
IMX8MM_PAD_UART4_TXD_UART2_CTS_B = IOMUX_PAD(0x04B8, 0x0250, 1, 0x0000, 0, 0),
IMX8MM_PAD_UART4_TXD_GPIO5_IO29 = IOMUX_PAD(0x04B8, 0x0250, 5, 0x0000, 0, 0),
};
};
2 changes: 1 addition & 1 deletion libethdrivers/src/plat/imx6/uboot/imx_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#elif defined(CONFIG_PLAT_IMX8MM_EVK)
#include "imx8mm_pins.h"

#define IOMUXC_PADDR 0x30330000 // from: root/arch/arm/include/asm/arch-imx8m/imx-regs-imx8mm.h
#define IOMUXC_PADDR 0x30330000
#define IOMUXC_SIZE 0x10000

#else
Expand Down

0 comments on commit f26bcf1

Please sign in to comment.