Base Address Configuration - Mapping; Interrupt Pin Configuration; Driver Porting - Wiznet W5300 Porting Manual

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

Advertisement

2.3. Base address configuration - Mapping

In the Linux kernel, it should be added a routine which is mapping the base address (physical
address) of W5300 from driver to virtual address. Generally a hardware dependant routine in
the Linux kernel is realized in 'arch/<architecture>/<MCU>/mach-<board>.c'.
So
the
W5300E01-ARM
s3c2410/mach-w5300e01.c'.
static struct map_desc w5300e01_iodesc[] __initdata = {
{ 0xf0000000, __phys_to_pfn(S3C2410_CS2), SZ_1M, MT_DEVICE },
{ 0xf8000000, __phys_to_pfn(S3C2410_CS3), SZ_1M, MT_DEVICE }
};
Previous code is a routine for mapping the physical address of CS2 to virtual address
'0xf0000000'. The physical address of CS2 is base address of W5300 and W5300 Linux driver
uses mapped virtual address '0xf0000000'..

2.4. Interrupt pin configuration

In general, we can use GPIO pin to input, output or especially to interrupt by setting it.
Namely we can use it variously. So we should set the GPIO pin to interrupt mode.
For example, the GPIO pin set to interrupt in the 'arch/arm/mach-s3c2410/mach-
w5300e01.c' file which is Linux kernel source of W5300E01-ARM as below.
static void __init w5300e01_init(void)
{
...
/* W5300 interrupt pin */
s3c2410_gpio_cfgpin(S3C2410_GPF0, S3C2410_GPF0_EINT0);
...
}

3. Driver porting

If the system setting is completed in bootloader and Linux kernel, we should do the Linux
driver porting of W5300. The compiling of Linux driver needs Linux kernel code in your system.
This section serves modification of Linux driver code.
Copyright © WIZnet All Rights Reserved
contains
hardware
dependant
routine
W5300 Linux Driver Porting Guide | 10 page
in
'arch/arm/mach-

Advertisement

Table of Contents
loading

Table of Contents