Makefile; Base Address Configuration; Irq(Interrupt Request) Configuration; Mac Address - Wiznet W5300 Porting Manual

Linux driver porting guide
Hide thumbs Also See for W5300:
Table of Contents

Advertisement

3.1. Makefile

Assign the route of Linux kernel code which we using now. Linux kernel code on the route
must be compiled already.
# Makefile for w5300 linux driver.
#
# linux kernel source path.
KERNELPATH:=/usr/src/linux
# build options.
LDFLAGS:=

3.2. Base address configuration

Set the virtual address which is assigned from '2.3 Base address configuration – Mapping' to
W5300 driver. And the 'w5300.h' of Linux driver code file converts into virtual address which
is mapping to base address of W5300 as below.
/* FIXME: This value is dependent on the system. It should be modified according
to system requirement. */
#define W5300_REG_BASE 0xF0000000

3.3. IRQ(Interrupt Request) configuration

Set IRQ number of W5300 interrupt pin to driver. Open the 'w5300.c' file of W5300 driver
code and modifies the IRQ number.
/* FIXME: Setting irq number / Configurable as module parameter */
static int w5300_irq = IRQ_EINT0;

3.4. Mac address

In the Linux, it is possible that MAC address of W5300 can active change to 'ifconfig' utility.
Basically the MAC address is in the 'w5300.c' file.
/* FIXME: Setting basic MAC address / It should be set according to the system. */
const u8 w5300_defmac[MAX_SOCK_NUM] = {0x00, 0x08, 0xDC,
0xA0, 0x00, 0x01};
Copyright © WIZnet All Rights Reserved
W5300 Linux Driver Porting Guide | 11 page

Advertisement

Table of Contents
loading

Table of Contents