cleanup docs and remove remainders of dead board
Subsystems (3)
cover cleanup docs and remove remainders of dead board
This series deletes the remainders of dead board:
- arch/arm/cpu/arm920t/ep93xx/*
- arch/arm/include/asm/arch-ep93xx/*
- drivers/net/ep93xx_eth.[ch]
But while I was working to delete a dead driver "ep93xx_eth", I realized re-numbering the drivers list in doc/driver-model/UDM-net.txt was a painful task.
Is this numbering really necessary?
So, first of all I decided to delete sequencial numbers in doc/driver-model/UDM-*.txt. (This was done in 0001.)
I also noticed dead serial and net drivers still remaining in the list. So cleaned up them. (This was done in 0002 and 0003.)
The ep93xx related code was removed by 0004.
The ep93xx_eth driver was deleted by 0005.
Masahiro Yamada (5):
cosmetic: doc: driver-model: Do not number driver lists
cosmetic: doc: UDM-serial: clean up the remainders of dead driver
cosmetic: doc: UDM-net: clean up the remainders of dead driver
ep93xx: remove remainders of dead board
net: ep93xx_eth: remove a dead driver.
arch/arm/cpu/arm920t/ep93xx/Makefile | 41 -- arch/arm/cpu/arm920t/ep93xx/cpu.c | 37 -- arch/arm/cpu/arm920t/ep93xx/led.c | 85 ---- arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S | 49 --- arch/arm/cpu/arm920t/ep93xx/speed.c | 96 ----- arch/arm/cpu/arm920t/ep93xx/timer.c | 120 ------ arch/arm/cpu/arm920t/ep93xx/u-boot.lds | 54 --- arch/arm/include/asm/arch-ep93xx/ep93xx.h | 582 ------------------------- doc/driver-model/UDM-block.txt | 56 +-- doc/driver-model/UDM-gpio.txt | 32 +- doc/driver-model/UDM-hwmon.txt | 36 +- doc/driver-model/UDM-keyboard.txt | 12 +- doc/driver-model/UDM-mmc.txt | 72 ++-- doc/driver-model/UDM-net.txt | 220 +++++----- doc/driver-model/UDM-pci.txt | 124 +++--- doc/driver-model/UDM-pcmcia.txt | 24 +- doc/driver-model/UDM-power.txt | 12 +- doc/driver-model/UDM-rtc.txt | 152 +++---- doc/driver-model/UDM-serial.txt | 106 ++--- doc/driver-model/UDM-spi.txt | 96 ++--- doc/driver-model/UDM-stdio.txt | 16 +- doc/driver-model/UDM-twserial.txt | 4 +- doc/driver-model/UDM-video.txt | 24 +- doc/driver-model/UDM-watchdog.txt | 204 ++++----- drivers/net/Makefile | 1 - drivers/net/ep93xx_eth.c | 639 ---------------------------- drivers/net/ep93xx_eth.h | 127 ------ include/common.h | 3 +- include/netdev.h | 1 - 29 files changed, 582 insertions(+), 2443 deletions(-) delete mode 100644 arch/arm/cpu/arm920t/ep93xx/Makefile delete mode 100644 arch/arm/cpu/arm920t/ep93xx/cpu.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/led.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S delete mode 100644 arch/arm/cpu/arm920t/ep93xx/speed.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/timer.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/u-boot.lds delete mode 100644 arch/arm/include/asm/arch-ep93xx/ep93xx.h delete mode 100644 drivers/net/ep93xx_eth.c delete mode 100644 drivers/net/ep93xx_eth.h
Signature · 1 line
1.8.1.2
PATCH 1/5 cosmetic: doc: driver-model: Do not number driver lists
Everytime a dead driver is removed from the list,
we must re-number. This is a painful task.
Try
git show e53232250 -- doc/driver-model/UDM-serial.txt git show 6f62f4207 -- doc/driver-model/UDM-serial.txt git show b9f4bc34a -- doc/driver-model/UDM-serial.txt
to see what I mean.
--- doc/driver-model/UDM-block.txt | 56 +++++----- doc/driver-model/UDM-gpio.txt | 32 +++--- doc/driver-model/UDM-hwmon.txt | 36 +++---- doc/driver-model/UDM-keyboard.txt | 12 +-- doc/driver-model/UDM-mmc.txt | 72 ++++++------- doc/driver-model/UDM-net.txt | 216 +++++++++++++++++++------------------- doc/driver-model/UDM-pci.txt | 124 +++++++++++----------- doc/driver-model/UDM-pcmcia.txt | 24 ++--- doc/driver-model/UDM-power.txt | 12 +-- doc/driver-model/UDM-rtc.txt | 152 +++++++++++++-------------- doc/driver-model/UDM-serial.txt | 108 +++++++++---------- doc/driver-model/UDM-spi.txt | 96 ++++++++--------- doc/driver-model/UDM-stdio.txt | 16 +-- doc/driver-model/UDM-twserial.txt | 4 +- doc/driver-model/UDM-video.txt | 24 ++--- doc/driver-model/UDM-watchdog.txt | 204 +++++++++++++++++------------------ 16 files changed, 594 insertions(+), 594 deletions(-)
doc/driver-model/UDM-block.txt +28 -28
@@ -222,58 +222,58 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) ahci.c - --------- + ahci.c + ------ SCSI API, will be rewritten for a different API. - 2) ata_piix.c - ------------- + ata_piix.c + ---------- SATA API, easy to port. - 3) fsl_sata.c - ------------- + fsl_sata.c + ---------- SATA API, few CONFIG macros, easy to port. - 4) ftide020.c - ------------- + ftide020.c + ---------- IDE API, defines CONFIG_IDE_AHB and ide_preinit hook functions. - 5) mg_disk.c - ------------ + mg_disk.c + --------- Single driver with mg_disk API, not much to change, easy to port. - 6) mvsata_ide.c - --------------- + mvsata_ide.c + ------------ IDE API, only defines ide_preinit hook function. - 7) mxc_ata.c - ------------ + mxc_ata.c + --------- IDE API, only defines ide_preinit hook function. - 8) pata_bfin.c - -------------- + pata_bfin.c + ----------- SATA API, easy to port. - 9) sata_dwc.c - ------------- + sata_dwc.c + ---------- SATA API, easy to port. - 10) sata_sil3114.c - ------------------ + sata_sil3114.c + -------------- SATA API, easy to port. - 11) sata_sil.c - -------------- + sata_sil.c + ---------- SATA API, easy to port. - 12) sil680.c - ------------ + sil680.c + -------- IDE API, only defines ide_preinit hook function. - 13) sym53c8xx.c - --------------- + sym53c8xx.c + ----------- SCSI API, may be merged with code from cmd_scsi. - 14) systemace.c - --------------- + systemace.c + ----------- Single driver with systemace API, not much to change, easy to port.
doc/driver-model/UDM-gpio.txt +16 -16
@@ -68,39 +68,39 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) altera_pio.c - --------------- + altera_pio.c + ------------ Meets standard API. Implements gpio_request() properly. Simple conversion possible. - 2) at91_gpio.c - -------------- + at91_gpio.c + ----------- Don't meet standard API. Need some other methods to implement. - 3) da8xx_gpio.c - --------------- + da8xx_gpio.c + ------------ Meets standard API. Implements gpio_request() properly. Simple conversion possible. - 4) kw_gpio.c - ------------ + kw_gpio.c + --------- Doesn't meet standard API. Needs some other methods to implement and move some methods to another file. - 5) mpc83xx_gpio.c - ----------------- + mpc83xx_gpio.c + -------------- Meets standard API. Doesn't implement gpio_request() properly (only checks if the pin is valid). Simple conversion possible. - 6) mvgpio.c - ----------- + mvgpio.c + -------- Meets standard API. Doesn't implement gpio_request() properly (only checks if the pin is valid). Simple conversion possible. - 7) mvgpio.h - ----------- + mvgpio.h + -------- Wrong placement. Will be moved to another location. - 8) mvmfp.c - ---------- + mvmfp.c + ------- Wrong placement. Will be moved to another location.
doc/driver-model/UDM-hwmon.txt +18 -18
@@ -71,48 +71,48 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) drivers/hwmon/lm81.c - ----------------------- + drivers/hwmon/lm81.c + -------------------- The driver is standard dtt. Simple conversion is possible. - 2) drivers/hwmon/ds1722.c - ------------------------- + drivers/hwmon/ds1722.c + ---------------------- The driver is not standard dtt, but interface is similar to dtt. The interface has to be changed in order to comply to above mentioned specification. - 3) drivers/hwmon/ds1775.c - ------------------------- + drivers/hwmon/ds1775.c + ---------------------- The driver is standard dtt. Simple conversion is possible. - 4) drivers/hwmon/lm73.c - ----------------------- + drivers/hwmon/lm73.c + -------------------- The driver is standard dtt. Simple conversion is possible. - 5) drivers/hwmon/lm63.c - ----------------------- + drivers/hwmon/lm63.c + -------------------- The driver is standard dtt. Simple conversion is possible. - 6) drivers/hwmon/adt7460.c - -------------------------- + drivers/hwmon/adt7460.c + ----------------------- The driver is standard dtt. Simple conversion is possible. - 7) drivers/hwmon/lm75.c - ----------------------- + drivers/hwmon/lm75.c + -------------------- The driver is standard dtt. Simple conversion is possible. - 8) drivers/hwmon/ds1621.c - ------------------------- + drivers/hwmon/ds1621.c + ---------------------- The driver is standard dtt. Simple conversion is possible. - 9) drivers/hwmon/adm1021.c - -------------------------- + drivers/hwmon/adm1021.c + ----------------------- The driver is standard dtt. Simple conversion is possible.
doc/driver-model/UDM-keyboard.txt +6 -6
@@ -28,18 +28,18 @@ be converted into driver's private data. III) Analysis of in-tree drivers -------------------------------- - 1) board/mpl/common/kbd.c - ------------------------- + board/mpl/common/kbd.c + ---------------------- This driver is a classic STDIO driver, no problem with conversion is expected. Only necessary change will be to move this driver to a proper location. - 2) board/rbc823/kbd.c - --------------------- + board/rbc823/kbd.c + ------------------ This driver is a classic STDIO driver, no problem with conversion is expected. Only necessary change will be to move this driver to a proper location. - 3) drivers/input/keyboard.c - --------------------------- + drivers/input/keyboard.c + ------------------------ This driver is special in many ways. Firstly because this is a universal stub driver for converting scancodes from i8042 and the likes. Secondly because the buffer is filled by various other ad-hoc implementations of keyboard input by
doc/driver-model/UDM-mmc.txt +36 -36
136 lines not on this page · raw message
doc/driver-model/UDM-net.txt +108 -108
435 lines not on this page · raw message
doc/driver-model/UDM-pci.txt +62 -62
198 lines not on this page · raw message
doc/driver-model/UDM-pcmcia.txt +12 -12
@@ -47,32 +47,32 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) i82365.c - ----------- + i82365.c + -------- Driver methods have different name i82365_init() and i82365_exit but all functionality is the same. Board files board/atc/ti113x.c and board/cpc45/pd67290.c use their own implementation of these method. In this case all methods in driver behave only as wrappers. - 2) marubun_pcmcia.c - ------------------- + marubun_pcmcia.c + ---------------- Meets standard API behaviour. Simple conversion. - 3) mpc8xx_pcmcia.c - ------------------ + mpc8xx_pcmcia.c + --------------- Meets standard API behaviour. Simple conversion. - 4) rpx_pcmcia.c - --------------- + rpx_pcmcia.c + ------------ Implements only internal API used in other drivers. Non of methods implemented here are used outside driver model. - 5) ti_pci1410a.c - ---------------- + ti_pci1410a.c + ------------- Has different API but methods in this file are never called. Probably dead code. - 6)tqm8xx_pcmcia.c - ----------------- + tqm8xx_pcmcia.c + --------------- Implements only internal API used in other drivers. Non of methods implemented here are used outside driver model.
doc/driver-model/UDM-power.txt +6 -6
@@ -52,8 +52,8 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) ftpmu010.c - ------------- + ftpmu010.c + ---------- All methods of this file are moved to another location. void ftpmu010_32768osc_enable(void): Move to boards hacks void ftpmu010_mfpsr_select_dev(unsigned int dev): Move to board file
@@ -65,8 +65,8 @@ III) Analysis of in-tree drivers void ftpmu010_sdramhtc_set(unsigned int val): Move to board file arch/nds32/lib/board.c - 2) twl4030.c - ------------ + twl4030.c + --------- All methods of this file are moved to another location. void twl4030_power_reset_init(void): Move to board hacks void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val, u8 dev_grp,
@@ -74,8 +74,8 @@ III) Analysis of in-tree drivers void twl4030_power_init(void): Move to board hacks void twl4030_power_mmc_init(void): Move to board hacks - 3) twl6030.c - ------------ + twl6030.c + --------- Some methods are converted to new API and rest are moved to another location. void twl6030_stop_usb_charging(void): Convert to new API void twl6030_start_usb_charging(void): Convert to new API
doc/driver-model/UDM-rtc.txt +76 -76
268 lines not on this page · raw message
doc/driver-model/UDM-serial.txt +54 -54
173 lines not on this page · raw message
doc/driver-model/UDM-spi.txt +48 -48
146 lines not on this page · raw message
doc/driver-model/UDM-stdio.txt +8 -8
@@ -158,21 +158,21 @@ For in-depth analysis of serial port drivers, refer to [ UDM-serial.txt ]. For in-depth analysis of keyboard drivers, refer to [ UDM-keyboard.txt ]. For in-depth analysis of video drivers, refer to [ UDM-video.txt ]. - 1) arch/blackfin/cpu/jtag-console.c - ----------------------------------- + arch/blackfin/cpu/jtag-console.c + -------------------------------- This driver is a classic STDIO driver, no problem with conversion is expected. - 2) board/mpl/pati/pati.c - ------------------------ + board/mpl/pati/pati.c + --------------------- This driver registers with the STDIO framework, though it uses a lot of ad-hoc stuff which will need to be sorted out. - 3) board/netphone/phone_console.c - --------------------------------- + board/netphone/phone_console.c + ------------------------------ This driver is a classic STDIO driver, no problem with conversion is expected. - 4) drivers/net/netconsole.c - --------------------------- + drivers/net/netconsole.c + ------------------------ This driver is a classic STDIO driver, no problem with conversion is expected. IV) Other involved files (To be removed)
doc/driver-model/UDM-twserial.txt +2 -2
@@ -40,8 +40,8 @@ II) Approach III) Analysis of in-tree drivers -------------------------------- - 1) drivers/twserial/soft_tws.c - ------------------------------ + drivers/twserial/soft_tws.c + --------------------------- The driver is the only TWserial driver. The ad-hoc part in include/configs/inka4x0.h and the core soft_tws driver should be consolidated to one compact driver and moved to misc/ .
doc/driver-model/UDM-video.txt +12 -12
@@ -36,39 +36,39 @@ static struct stdio_device_ops handling the character output. III) Analysis of in-tree drivers -------------------------------- - 1) arch/powerpc/cpu/mpc8xx/video.c - ---------------------------------- + arch/powerpc/cpu/mpc8xx/video.c + ------------------------------- This driver copies the cfb_console [ see drivers/video/cfb_console.c ] approach and acts only as a STDIO device. Therefore there are currently two possible approaches, first being the conversion of this driver to usual STDIO device and second, long-term one, being conversion of this driver to video driver that provides console. - 2) arch/x86/lib/video.c - ----------------------- + arch/x86/lib/video.c + -------------------- This driver registers two separate STDIO devices and should be therefore converted as such. - 3) board/bf527-ezkit/video.c - ---------------------------- + board/bf527-ezkit/video.c + ------------------------- This driver seems bogus as it behaves as STDIO device, but provides no input or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use or present otherwise than as a dead code/define. - 4) board/bf533-stamp/video.c - ---------------------------- + board/bf533-stamp/video.c + ------------------------- This driver seems bogus as it behaves as STDIO device, but provides no input or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use or present otherwise than as a dead code/define. - 5) board/bf548-ezkit/video.c - ---------------------------- + board/bf548-ezkit/video.c + ------------------------- This driver seems bogus as it behaves as STDIO device, but provides no input or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use or present otherwise than as a dead code/define. - 6) board/cm-bf548/video.c - ---------------------------- + board/cm-bf548/video.c + ---------------------- This driver seems bogus as it behaves as STDIO device, but provides no input or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use or present otherwise than as a dead code/define.
doc/driver-model/UDM-watchdog.txt +102 -102
368 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 1/5 cosmetic: doc: driver-model: Do not number driver lists
Quoted 10 lines · Masahiro Yamada
Everytime a dead driver is removed from the list,
we must re-number. This is a painful task.Try
git showe53232250--doc/driver-model/UDM-serial.txtgit show6f62f4207--doc/driver-model/UDM-serial.txtgit showb9f4bc34a--doc/driver-model/UDM-serial.txt
to see what I mean.Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/8e7ee955/attachment.pgp>
PATCH 2/5 cosmetic: UDM-serial: clean up the remainders of dead driver
In reply to Masahiro YamadaThe following serial drivers do not exist any more.
- ns9750_serial.c: deleted by commit 4cfc611b4
- s3c4510b_uart.c: deleted by commit afad40299
- serial_clps7111.c: deleted by commit f2e080156
- serial_netarm.c: deleted by commit b411eb30f
This commit cleans up UDM-serial.txt.
--- doc/driver-model/UDM-serial.txt | 16 ---------------- 1 file changed, 16 deletions(-)
doc/driver-model/UDM-serial.txt +0 -16
@@ -84,18 +84,10 @@ III) Analysis of in-tree drivers during conversion. This driver is implemented in very universal manner, therefore it'll be necessary to properly design it's platform_data. - ns9750_serial.c - --------------- - Unmaintained port. Code got removed. - opencores_yanu.c ---------------- No support for CONFIG_SERIAL_MULTI. Simple conversion possible. - s3c4510b_uart.c - --------------- - No support for CONFIG_SERIAL_MULTI. Simple conversion possible. - sandbox.c --------- No support for CONFIG_SERIAL_MULTI. Simple conversion possible.
@@ -104,10 +96,6 @@ III) Analysis of in-tree drivers -------- This is a complementary part of NS16550 UART driver, see above. - serial_clps7111.c - ----------------- - No support for CONFIG_SERIAL_MULTI. Simple conversion possible. - serial_imx.c ------------ No support for CONFIG_SERIAL_MULTI. Simple conversion possible. This driver
@@ -129,10 +117,6 @@ III) Analysis of in-tree drivers ------------ No support for CONFIG_SERIAL_MULTI. Simple conversion possible. - serial_netarm.c - --------------- - No support for CONFIG_SERIAL_MULTI. Simple conversion possible. - serial_pl01x.c -------------- No support for CONFIG_SERIAL_MULTI. Simple conversion possible, though this
Signature · 1 line
1.8.1.2
PATCH 2/5 cosmetic: UDM-serial: clean up the remainders of dead driver
Quoted 10 lines · Masahiro Yamada
The following serial drivers do not exist any more.
-
ns9750_serial.c: deleted by commit4cfc611b4
-s3c4510b_uart.c: deleted by commitafad40299
-serial_clps7111.c: deleted by commitf2e080156
-serial_netarm.c: deleted by commitb411eb30fThis commit cleans up UDM-serial.txt.
Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/f7adeaff/attachment.pgp>
PATCH 3/5 cosmetic: UDM-net: clean up the remainders of dead driver
In reply to Masahiro YamadaThis commit omits non-existing drivers/net/netarm_eth.c from the list. This driver is deleted by commit b411eb30f.
--- doc/driver-model/UDM-net.txt | 6 ------ 1 file changed, 6 deletions(-)
doc/driver-model/UDM-net.txt +0 -6
@@ -338,12 +338,6 @@ III) Analysis of in-tree drivers This file implements external functions necessary for native NE2000 compatible networking card to work. - drivers/net/netarm_eth.c - ------------------------ - - This driver uses the old, legacy, network API and will either have to be - converted or removed. - drivers/net/netconsole.c ------------------------
Signature · 1 line
1.8.1.2
PATCH 3/5 cosmetic: UDM-net: clean up the remainders of dead driver
Quoted 4 lines · Masahiro Yamada
This commit omits non-existing
drivers/net/netarm_eth.cfrom the list. This driver is deleted by commitb411eb30f.Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/57067a49/attachment.pgp>
PATCH 4/5 ep93xx: remove remainders of dead board
In reply to Masahiro Yamadacommit 716f7ade104a9aeed647e19a8b8c9ed9f491359d
deleted all ep93xx SoC boards.
Now ep93xx SoC specific code
- arch/arm/cpu/arm920t/ep93xx/
- arch/arm/include/asm/arch-ep93xx/
are not used at all.
--- arch/arm/cpu/arm920t/ep93xx/Makefile | 41 -- arch/arm/cpu/arm920t/ep93xx/cpu.c | 37 -- arch/arm/cpu/arm920t/ep93xx/led.c | 85 ---- arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S | 49 --- arch/arm/cpu/arm920t/ep93xx/speed.c | 96 ----- arch/arm/cpu/arm920t/ep93xx/timer.c | 120 ------ arch/arm/cpu/arm920t/ep93xx/u-boot.lds | 54 --- arch/arm/include/asm/arch-ep93xx/ep93xx.h | 582 ---------------------------- 8 files changed, 1064 deletions(-) delete mode 100644 arch/arm/cpu/arm920t/ep93xx/Makefile delete mode 100644 arch/arm/cpu/arm920t/ep93xx/cpu.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/led.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S delete mode 100644 arch/arm/cpu/arm920t/ep93xx/speed.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/timer.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/u-boot.lds delete mode 100644 arch/arm/include/asm/arch-ep93xx/ep93xx.h
arch/arm/cpu/arm920t/ep93xx/Makefile deleted +0 -41
@@ -1,41 +0,0 @@ -# -# Cirrus Logic EP93xx CPU-specific Makefile -# -# Copyright (C) 2009 Matthias Kaehlcke <[email protected]> -# -# Copyright (C) 2004, 2005 -# Cory T. Tusar, Videon Central, Inc., <[email protected]> -# -# Copyright (C) 2006 -# Dominic Rath <[email protected]> -# -# Based on an original Makefile, which is -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = cpu.o led.o speed.o timer.o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/arm920t/ep93xx/cpu.c deleted +0 -37
@@ -1,37 +0,0 @@ -/* -* Cirrus Logic EP93xx CPU-specific support. -* -* Copyright (C) 2009 Matthias Kaehlcke <[email protected]> -* -* Copyright (C) 2004, 2005 -* Cory T. Tusar, Videon Central, Inc., <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <asm/arch/ep93xx.h> -#include <asm/io.h> - -/* We reset the CPU by generating a 1-->0 transition on DeviceCfg bit 31. */ -extern void reset_cpu (ulong addr) -{ -struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ; -uint32_t value; - -/* Unlock DeviceCfg and set SWRST */ -writel (0xAA , &syscon->sysswlock); - value =readl (&syscon->devicecfg); - value |=SYSCON_DEVICECFG_SWRST ; -writel (value, &syscon->devicecfg); - -/* Unlock DeviceCfg and clear SWRST */ -writel (0xAA , &syscon->sysswlock); - value =readl (&syscon->devicecfg); - value &= ~SYSCON_DEVICECFG_SWRST ; -writel (value, &syscon->devicecfg); - -/* Dying... */ -while (1 ) - ;/* noop */ -}
arch/arm/cpu/arm920t/ep93xx/led.c deleted +0 -85
85 lines not on this page · raw message
arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S deleted +0 -49
49 lines not on this page · raw message
arch/arm/cpu/arm920t/ep93xx/speed.c deleted +0 -96
96 lines not on this page · raw message
arch/arm/cpu/arm920t/ep93xx/timer.c deleted +0 -120
120 lines not on this page · raw message
arch/arm/cpu/arm920t/ep93xx/u-boot.lds deleted +0 -54
54 lines not on this page · raw message
arch/arm/include/asm/arch-ep93xx/ep93xx.h deleted +0 -582
582 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 4/5 ep93xx: remove remainders of dead board
Hi Masahiro,
EP93xx is not dead! I recently submit patch for full support of edb9315a board (see http://patchwork.ozlabs.org/patch/276429/). And it's working well on my boards and on the original evaluation board.
Best Regards,
Sergey Kostanbaev
Quoted 1,147 lines · Masahiro Yamada
commit
716f7ade104a9aeed647e19a8b8c9ed9f491359d
deleted all ep93xx SoC boards.Now ep93xx SoC specific code
-arch/arm/cpu/arm920t/ep93xx/
-arch/arm/include/asm/arch-ep93xx/
are not used at all.Signed-off-by Masahiro Yamada <[email protected]>--- arch/arm/cpu/arm920t/ep93xx/Makefile | 41 -- arch/arm/cpu/arm920t/ep93xx/cpu.c | 37 -- arch/arm/cpu/arm920t/ep93xx/led.c | 85 ---- arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S | 49 --- arch/arm/cpu/arm920t/ep93xx/speed.c | 96 ----- arch/arm/cpu/arm920t/ep93xx/timer.c | 120 ------ arch/arm/cpu/arm920t/ep93xx/u-boot.lds | 54 --- arch/arm/include/asm/arch-ep93xx/ep93xx.h | 582 ---------------------------- 8 files changed, 1064 deletions(-) delete mode 100644 arch/arm/cpu/arm920t/ep93xx/Makefile delete mode 100644 arch/arm/cpu/arm920t/ep93xx/cpu.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/led.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S delete mode 100644 arch/arm/cpu/arm920t/ep93xx/speed.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/timer.c delete mode 100644 arch/arm/cpu/arm920t/ep93xx/u-boot.lds delete mode 100644 arch/arm/include/asm/arch-ep93xx/ep93xx.harch/arm/cpu/arm920t/ep93xx/Makefile deleted +0
-41@@ -1,41 +0,0 @@ -# -# Cirrus Logic EP93xx CPU-specific Makefile -# -# Copyright (C) 2009 Matthias Kaehlcke <[email protected]> -# -# Copyright (C) 2004, 2005 -# Cory T. Tusar, Videon Central, Inc., <[email protected]> -# -# Copyright (C) 2006 -# Dominic Rath <[email protected]> -# -# Based on an original Makefile, which is -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = cpu.o led.o speed.o timer.o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################arch/arm/cpu/arm920t/ep93xx/cpu.c deleted +0
-37@@ -1,37 +0,0 @@ -/* -* Cirrus Logic EP93xx CPU-specific support. -* -* Copyright (C) 2009 Matthias Kaehlcke <[email protected]> -* -* Copyright (C) 2004, 2005 -* Cory T. Tusar, Videon Central, Inc., <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <asm/arch/ep93xx.h> -#include <asm/io.h> - -/* We reset the CPU by generating a 1-->0 transition on DeviceCfg bit 31. */ -extern void reset_cpu (ulong addr) -{ -struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ; -uint32_t value; - -/* Unlock DeviceCfg and set SWRST */ -writel (0xAA , &syscon->sysswlock); - value =readl (&syscon->devicecfg); - value |=SYSCON_DEVICECFG_SWRST ; -writel (value, &syscon->devicecfg); - -/* Unlock DeviceCfg and clear SWRST */ -writel (0xAA , &syscon->sysswlock); - value =readl (&syscon->devicecfg); - value &= ~SYSCON_DEVICECFG_SWRST ; -writel (value, &syscon->devicecfg); - -/* Dying... */ -while (1 ) - ;/* noop */ -}arch/arm/cpu/arm920t/ep93xx/led.c deleted +0
-85@@ -1,85 +0,0 @@ -/* -* Copyright (C) 2010, 2009 Matthias Kaehlcke <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <asm/io.h> -#include <asm/arch/ep93xx.h> -#include <config.h> -#include <status_led.h> - -static uint8_t saved_state[2 ] = {STATUS_LED_OFF ,STATUS_LED_OFF }; -static uint32_t gpio_pin[2 ] = {1 <<STATUS_LED_GREEN , -1 <<STATUS_LED_RED }; - -inline void switch_LED_on (uint8_t led) -{ - registerstruct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE ; - -writel (readl (&gpio->pedr) | gpio_pin[led], &gpio->pedr); - saved_state[led] =STATUS_LED_ON ; -} - -inline void switch_LED_off (uint8_t led) -{ - registerstruct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE ; - -writel (readl (&gpio->pedr) & ~gpio_pin[led], &gpio->pedr); - saved_state[led] =STATUS_LED_OFF ; -} - -void red_led_on (void ) -{ -switch_LED_on (STATUS_LED_RED ); -} - -void red_led_off (void ) -{ -switch_LED_off (STATUS_LED_RED ); -} - -void green_led_on (void ) -{ -switch_LED_on (STATUS_LED_GREEN ); -} - -void green_led_off (void ) -{ -switch_LED_off (STATUS_LED_GREEN ); -} - -void __led_init (led_id_t mask,int state) -{ -__led_set (mask, state); -} - -void __led_toggle (led_id_t mask) -{ -if (STATUS_LED_RED == mask) { -if (STATUS_LED_ON == saved_state[STATUS_LED_RED ]) -red_led_off (); -else -red_led_on (); - }else if (STATUS_LED_GREEN == mask) { -if (STATUS_LED_ON == saved_state[STATUS_LED_GREEN ]) -green_led_off (); -else -green_led_on (); - } -} - -void __led_set (led_id_t mask,int state) -{ -if (STATUS_LED_RED == mask) { -if (STATUS_LED_ON == state) -red_led_on (); -else -red_led_off (); - }else if (STATUS_LED_GREEN == mask) { -if (STATUS_LED_ON == state) -green_led_on (); -else -green_led_off (); - } -}arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S deleted +0
-49@@ -1,49 +0,0 @@ -/* - * Low-level initialization for EP93xx - * - * Copyright (C) 2009 Matthias Kaehlcke <[email protected]> - * - * Copyright (C) 2006 Dominic Rath <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <version.h> -#include <asm/arch/ep93xx.h> - -.globl lowlevel_init -lowlevel_init: - /* backup return address */ - ldr r1, =SYSCON_SCRATCH0 - str lr, [r1] - - /* Turn on both LEDs */ - bl red_led_on - bl green_led_on - - /* Configure flash wait states before we switch to the PLL */ - bl flash_cfg - - /* Set up PLL */ - bl pll_cfg - - /* Turn off the Green LED and leave the Red LED on */ - bl green_led_off - - /* Setup SDRAM */ - bl sdram_cfg - - /* Turn on Green LED, Turn off the Red LED */ - bl green_led_on - bl red_led_off - - /* FIXME: we use async mode for now */ - mrc p15, 0, r0, c1, c0, 0 - orr r0, r0, #0xc0000000 - mcr p15, 0, r0, c1, c0, 0 - - /* restore return address */ - ldr r1, =SYSCON_SCRATCH0 - ldr lr, [r1] - - mov pc, lrarch/arm/cpu/arm920t/ep93xx/speed.c deleted +0
-96@@ -1,96 +0,0 @@ -/* -* Cirrus Logic EP93xx PLL support. -* -* Copyright (C) 2009 Matthias Kaehlcke <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <asm/arch/ep93xx.h> -#include <asm/io.h> -#include <div64.h> - -/* -* CONFIG_SYS_CLK_FREQ should be defined as the input frequency of the PLL. -* -* get_FCLK(), get_HCLK(), get_PCLK() and get_UCLK() return the clock of -* the specified bus in HZ. -*/ - -/* -* return the PLL output frequency -* -* PLL rate = CONFIG_SYS_CLK_FREQ * (X1FBD + 1) * (X2FBD + 1) -* / (X2IPD + 1) / 2^PS -*/ -static ulong get_PLLCLK (uint32_t *pllreg) -{ -uint8_t i; -const uint32_t clkset =readl (pllreg); -uint64_t rate =CONFIG_SYS_CLK_FREQ ; - rate *= ((clkset >>SYSCON_CLKSET_PLL_X1FBD1_SHIFT ) &0x1f ) +1 ; - rate *= ((clkset >>SYSCON_CLKSET_PLL_X2FBD2_SHIFT ) &0x3f ) +1 ; -do_div (rate, (clkset &0x1f ) +1 );/* X2IPD */ -for (i =0 ; i < ((clkset >>SYSCON_CLKSET_PLL_PS_SHIFT ) &3 ); i++) - rate >>=1 ; - -return (ulong )rate; -} - -/* return FCLK frequency */ -ulong get_FCLK () -{ -const uint8_t fclk_divisors[] = {1 ,2 ,4 ,8 ,16 ,1 ,1 ,1 }; -struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ; - -const uint32_t clkset1 =readl (&syscon->clkset1); -const uint8_t fclk_div = - fclk_divisors[(clkset1 >>SYSCON_CLKSET1_FCLK_DIV_SHIFT ) &7 ]; -const ulong fclk_rate =get_PLLCLK (&syscon->clkset1) / fclk_div; - -return fclk_rate; -} - -/* return HCLK frequency */ -ulong get_HCLK (void ) -{ -const uint8_t hclk_divisors[] = {1 ,2 ,4 ,5 ,6 ,8 ,16 ,32 }; -struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ; - -const uint32_t clkset1 =readl (&syscon->clkset1); -const uint8_t hclk_div = - hclk_divisors[(clkset1 >>SYSCON_CLKSET1_HCLK_DIV_SHIFT ) &7 ]; -const ulong hclk_rate =get_PLLCLK (&syscon->clkset1) / hclk_div; - -return hclk_rate; -} - -/* return PCLK frequency */ -ulong get_PCLK (void ) -{ -const uint8_t pclk_divisors[] = {1 ,2 ,4 ,8 }; -struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ; - -const uint32_t clkset1 =readl (&syscon->clkset1); -const uint8_t pclk_div = - pclk_divisors[(clkset1 >>SYSCON_CLKSET1_PCLK_DIV_SHIFT ) &3 ]; -const ulong pclk_rate =get_HCLK () / pclk_div; - -return pclk_rate; -} - -/* return UCLK frequency */ -ulong get_UCLK (void ) -{ -struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ; -ulong uclk_rate; - -const uint32_t value =readl (&syscon->pwrcnt); -if (value &SYSCON_PWRCNT_UART_BAUD ) - uclk_rate =CONFIG_SYS_CLK_FREQ ; -else - uclk_rate =CONFIG_SYS_CLK_FREQ /2 ; - -return uclk_rate; -}arch/arm/cpu/arm920t/ep93xx/timer.c deleted +0
-120@@ -1,120 +0,0 @@ -/* -* Cirrus Logic EP93xx timer support. -* -* Copyright (C) 2009, 2010 Matthias Kaehlcke <[email protected]> -* -* Copyright (C) 2004, 2005 -* Cory T. Tusar, Videon Central, Inc., <[email protected]> -* -* Based on the original intr.c Cirrus Logic EP93xx Rev D. interrupt support, -* author unknown. -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <linux/types.h> -#include <asm/arch/ep93xx.h> -#include <asm/io.h> -#include <div64.h> - -#define TIMER_CLKSEL (1 << 3) -#define TIMER_ENABLE (1 << 7) - -#define TIMER_FREQ 508469/* ticks / second */ -#define TIMER_MAX_VAL 0xFFFFFFFF - -static struct ep93xx_timer -{ -unsigned long long ticks; -unsigned long last_read; -} timer; - -static inline unsigned long long usecs_to_ticks (unsigned long usecs) -{ -unsigned long long ticks = (unsigned long long )usecs *TIMER_FREQ ; -do_div (ticks,1000 *1000 ); - -return ticks; -} - -static inline void read_timer (void ) -{ -struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE ; -const unsigned long now =TIMER_MAX_VAL -readl (&timer_regs->timer3.value); - -if (now >= timer.last_read) - timer.ticks += now - timer.last_read; -else -/* an overflow occurred */ - timer.ticks +=TIMER_MAX_VAL - timer.last_read + now; - - timer.last_read = now; -} - -/* -* Get the number of ticks (in CONFIG_SYS_HZ resolution) -*/ -unsigned long long get_ticks (void ) -{ -unsigned long long sys_ticks; - -read_timer (); - - sys_ticks = timer.ticks *CONFIG_SYS_HZ ; -do_div (sys_ticks,TIMER_FREQ ); - -return sys_ticks; -} - -unsigned long get_timer_masked (void ) -{ -return get_ticks (); -} - -unsigned long get_timer (unsigned long base) -{ -return get_timer_masked () - base; -} - -void __udelay (unsigned long usec) -{ -unsigned long long target; - -read_timer (); - - target = timer.ticks +usecs_to_ticks (usec); - -while (timer.ticks < target) -read_timer (); -} - -int timer_init (void ) -{ -struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE ; - -/* use timer 3 with 508KHz and free running, not enabled now */ -writel (TIMER_CLKSEL , &timer_regs->timer3.control); - -/* set initial timer value */ -writel (TIMER_MAX_VAL , &timer_regs->timer3.load); - -/* Enable the timer */ -writel (TIMER_ENABLE |TIMER_CLKSEL , - &timer_regs->timer3.control); - -/* Reset the timer */ -read_timer (); - timer.ticks =0 ; - -return 0 ; -} - -/* -* This function is derived from PowerPC code (timebase clock frequency). -* On ARM it returns the number of timer ticks per second. -*/ -unsigned long get_tbclk (void ) -{ -return CONFIG_SYS_HZ ; -}arch/arm/cpu/arm920t/ep93xx/u-boot.lds deleted +0
-54@@ -1,54 +0,0 @@ -/* - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x00000000; - - . = ALIGN(4); - .text : - { - *(.__image_copy_start) - arch/arm/cpu/arm920t/start.o (.text*) - /* the EP93xx expects to find the pattern 'CRUS' at 0x1000 */ - . = 0x1000; - LONG(0x53555243) - *(.text*) - } - - . = ALIGN(4); - .rodata : { *(.rodata*) } - - . = ALIGN(4); - .data : { *(.data*) } - - . = ALIGN(4); - .got : { *(.got) } - - . = .; - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - . = ALIGN(4); - - .image_copy_end : - { - *(.__image_copy_end) - } - - __bss_start = .; - .bss : { *(.bss*) } - __bss_end = .; - - _end = .; -}arch/arm/include/asm/arch-ep93xx/ep93xx.h deleted +0
-583@@ -1,582 +0,0 @@ -/* -* Cirrus Logic EP93xx register definitions. -* -* Copyright (C) 2009 -* Matthias Kaehlcke <[email protected]> -* -* Copyright (C) 2006 -* Dominic Rath <[email protected]> -* -* Copyright (C) 2004, 2005 -* Cory T. Tusar, Videon Central, Inc., <[email protected]> -* -* Based in large part on linux/include/asm-arm/arch-ep93xx/regmap.h, which is -* -* Copyright (C) 2004 Ray Lehtiniemi -* Copyright (C) 2003 Cirrus Logic, Inc -* Copyright (C) 1999 ARM Limited. -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#define EP93XX_AHB_BASE 0x80000000 -#define EP93XX_APB_BASE 0x80800000 - -/* -* 0x80000000 - 0x8000FFFF: DMA -*/ -#define DMA_OFFSET 0x000000 -#define DMA_BASE (EP93XX_AHB_BASE | DMA_OFFSET) - -#ifndef __ASSEMBLY__ -struct dma_channel { -uint32_t control; -uint32_t interrupt; -uint32_t ppalloc; -uint32_t status; -uint32_t reserved0; -uint32_t remain; -uint32_t reserved1[2 ]; -uint32_t maxcnt0; -uint32_t base0; -uint32_t current0; -uint32_t reserved2; -uint32_t maxcnt1; -uint32_t base1; -uint32_t current1; -uint32_t reserved3; -}; - -struct dma_regs { -struct dma_channel m2p_channel_0; -struct dma_channel m2p_channel_1; -struct dma_channel m2p_channel_2; -struct dma_channel m2p_channel_3; -struct dma_channel m2m_channel_0; -struct dma_channel m2m_channel_1; -struct dma_channel reserved0[2 ]; -struct dma_channel m2p_channel_5; -struct dma_channel m2p_channel_4; -struct dma_channel m2p_channel_7; -struct dma_channel m2p_channel_6; -struct dma_channel m2p_channel_9; -struct dma_channel m2p_channel_8; -uint32_t channel_arbitration; -uint32_t reserved[15 ]; -uint32_t global_interrupt; -}; -#endif - -/* -* 0x80010000 - 0x8001FFFF: Ethernet MAC -*/ -#define MAC_OFFSET 0x010000 -#define MAC_BASE (EP93XX_AHB_BASE | MAC_OFFSET) - -#ifndef __ASSEMBLY__ -struct mac_queue { -uint32_t badd; -union {/* deal with half-word aligned registers */ -uint32_t blen; -union { -uint16_t filler; -uint16_t curlen; - }; - }; -uint32_t curadd; -}; - -struct mac_regs { -uint32_t rxctl; -uint32_t txctl; -uint32_t testctl; -uint32_t reserved0; -uint32_t miicmd; -uint32_t miidata; -uint32_t miists; -uint32_t reserved1; -uint32_t selfctl; -uint32_t inten; -uint32_t intstsp; -uint32_t intstsc; -uint32_t reserved2[2 ]; -uint32_t diagad; -uint32_t diagdata; -uint32_t gt; -uint32_t fct; -uint32_t fcf; -uint32_t afp; -union { -struct { -uint32_t indad; -uint32_t indad_upper; - }; -uint32_t hashtbl; - }; -uint32_t reserved3[2 ]; -uint32_t giintsts; -uint32_t giintmsk; -uint32_t giintrosts; -uint32_t giintfrc; -uint32_t txcollcnt; -uint32_t rxmissnct; -uint32_t rxruntcnt; -uint32_t reserved4; -uint32_t bmctl; -uint32_t bmsts; -uint32_t rxbca; -uint32_t reserved5; -struct mac_queue rxdq; -uint32_t rxdqenq; -struct mac_queue rxstsq; -uint32_t rxstsqenq; -struct mac_queue txdq; -uint32_t txdqenq; -struct mac_queue txstsq; -uint32_t reserved6; -uint32_t rxbufthrshld; -uint32_t txbufthrshld; -uint32_t rxststhrshld; -uint32_t txststhrshld; -uint32_t rxdthrshld; -uint32_t txdthrshld; -uint32_t maxfrmlen; -uint32_t maxhdrlen; -}; -#endif - -#define SELFCTL_RWP (1 << 7) -#define SELFCTL_GPO0 (1 << 5) -#define SELFCTL_PUWE (1 << 4) -#define SELFCTL_PDWE (1 << 3) -#define SELFCTL_MIIL (1 << 2) -#define SELFCTL_RESET (1 << 0) - -#define INTSTS_RWI (1 << 30) -#define INTSTS_RXMI (1 << 29) -#define INTSTS_RXBI (1 << 28) -#define INTSTS_RXSQI (1 << 27) -#define INTSTS_TXLEI (1 << 26) -#define INTSTS_ECIE (1 << 25) -#define INTSTS_TXUHI (1 << 24) -#define INTSTS_MOI (1 << 18) -#define INTSTS_TXCOI (1 << 17) -#define INTSTS_RXROI (1 << 16) -#define INTSTS_MIII (1 << 12) -#define INTSTS_PHYI (1 << 11) -#define INTSTS_TI (1 << 10) -#define INTSTS_AHBE (1 << 8) -#define INTSTS_OTHER (1 << 4) -#define INTSTS_TXSQ (1 << 3) -#define INTSTS_RXSQ (1 << 2) - -#define BMCTL_MT (1 << 13) -#define BMCTL_TT (1 << 12) -#define BMCTL_UNH (1 << 11) -#define BMCTL_TXCHR (1 << 10) -#define BMCTL_TXDIS (1 << 9) -#define BMCTL_TXEN (1 << 8) -#define BMCTL_EH2 (1 << 6) -#define BMCTL_EH1 (1 << 5) -#define BMCTL_EEOB (1 << 4) -#define BMCTL_RXCHR (1 << 2) -#define BMCTL_RXDIS (1 << 1) -#define BMCTL_RXEN (1 << 0) - -#define BMSTS_TXACT (1 << 7) -#define BMSTS_TP (1 << 4) -#define BMSTS_RXACT (1 << 3) -#define BMSTS_QID_MASK 0x07 -#define BMSTS_QID_RXDATA 0x00 -#define BMSTS_QID_TXDATA 0x01 -#define BMSTS_QID_RXSTS 0x02 -#define BMSTS_QID_TXSTS 0x03 -#define BMSTS_QID_RXDESC 0x04 -#define BMSTS_QID_TXDESC 0x05 - -#define AFP_MASK 0x07 -#define AFP_IAPRIMARY 0x00 -#define AFP_IASECONDARY1 0x01 -#define AFP_IASECONDARY2 0x02 -#define AFP_IASECONDARY3 0x03 -#define AFP_TX 0x06 -#define AFP_HASH 0x07 - -#define RXCTL_PAUSEA (1 << 20) -#define RXCTL_RXFCE1 (1 << 19) -#define RXCTL_RXFCE0 (1 << 18) -#define RXCTL_BCRC (1 << 17) -#define RXCTL_SRXON (1 << 16) -#define RXCTL_RCRCA (1 << 13) -#define RXCTL_RA (1 << 12) -#define RXCTL_PA (1 << 11) -#define RXCTL_BA (1 << 10) -#define RXCTL_MA (1 << 9) -#define RXCTL_IAHA (1 << 8) -#define RXCTL_IA3 (1 << 3) -#define RXCTL_IA2 (1 << 2) -#define RXCTL_IA1 (1 << 1) -#define RXCTL_IA0 (1 << 0) - -#define TXCTL_DEFDIS (1 << 7) -#define TXCTL_MBE (1 << 6) -#define TXCTL_ICRC (1 << 5) -#define TXCTL_TPD (1 << 4) -#define TXCTL_OCOLL (1 << 3) -#define TXCTL_SP (1 << 2) -#define TXCTL_PB (1 << 1) -#define TXCTL_STXON (1 << 0) - -#define MIICMD_REGAD_MASK (0x001F) -#define MIICMD_PHYAD_MASK (0x03E0) -#define MIICMD_OPCODE_MASK (0xC000) -#define MIICMD_PHYAD_8950 (0x0000) -#define MIICMD_OPCODE_READ (0x8000) -#define MIICMD_OPCODE_WRITE (0x4000) - -#define MIISTS_BUSY (1 << 0) - -/* -* 0x80020000 - 0x8002FFFF: USB OHCI -*/ -#define USB_OFFSET 0x020000 -#define USB_BASE (EP93XX_AHB_BASE | USB_OFFSET) - -/* -* 0x80030000 - 0x8003FFFF: Raster engine -*/ -#if (defined(CONFIG_EP9307 ) || defined(CONFIG_EP9312 ) || defined(CONFIG_EP9315 )) -#define RASTER_OFFSET 0x030000 -#define RASTER_BASE (EP93XX_AHB_BASE | RASTER_OFFSET) -#endif - -/* -* 0x80040000 - 0x8004FFFF: Graphics accelerator -*/ -#if defined(CONFIG_EP9315 ) -#define GFX_OFFSET 0x040000 -#define GFX_BASE (EP93XX_AHB_BASE | GFX_OFFSET) -#endif - -/* -* 0x80050000 - 0x8005FFFF: Reserved -*/ - -/* -* 0x80060000 - 0x8006FFFF: SDRAM controller -*/ -#define SDRAM_OFFSET 0x060000 -#define SDRAM_BASE (EP93XX_AHB_BASE | SDRAM_OFFSET) - -#ifndef __ASSEMBLY__ -struct sdram_regs { -uint32_t reserved; -uint32_t glconfig; -uint32_t refrshtimr; -uint32_t bootsts; -uint32_t devcfg0; -uint32_t devcfg1; -uint32_t devcfg2; -uint32_t devcfg3; -}; -#endif - -#define SDRAM_DEVCFG_EXTBUSWIDTH (1 << 2) -#define SDRAM_DEVCFG_BANKCOUNT (1 << 3) -#define SDRAM_DEVCFG_SROMLL (1 << 5) -#define SDRAM_DEVCFG_CASLAT_2 0x00010000 -#define SDRAM_DEVCFG_RASTOCAS_2 0x00200000 - -#define GLCONFIG_INIT (1 << 0) -#define GLCONFIG_MRS (1 << 1) -#define GLCONFIG_SMEMBUSY (1 << 5) -#define GLCONFIG_LCR (1 << 6) -#define GLCONFIG_REARBEN (1 << 7) -#define GLCONFIG_CLKSHUTDOWN (1 << 30) -#define GLCONFIG_CKE (1 << 31) - -/* -* 0x80070000 - 0x8007FFFF: Reserved -*/ - -/* -* 0x80080000 - 0x8008FFFF: SRAM controller & PCMCIA -*/ -#define SMC_OFFSET 0x080000 -#define SMC_BASE (EP93XX_AHB_BASE | SMC_OFFSET) - -#ifndef __ASSEMBLY__ -struct smc_regs { -uint32_t bcr0; -uint32_t bcr1; -uint32_t bcr2; -uint32_t bcr3; -uint32_t reserved0[2 ]; -uint32_t bcr6; -uint32_t bcr7; -#if defined(CONFIG_EP9315 ) -uint32_t pcattribute; -uint32_t pccommon; -uint32_t pcio; -uint32_t reserved1[5 ]; -uint32_t pcmciactrl; -#endif -}; -#endif - -#define SMC_BCR_IDCY_SHIFT 0 -#define SMC_BCR_WST1_SHIFT 5 -#define SMC_BCR_BLE (1 << 10) -#define SMC_BCR_WST2_SHIFT 11 -#define SMC_BCR_MW_SHIFT 28 - -/* -* 0x80090000 - 0x8009FFFF: Boot ROM -*/ - -/* -* 0x800A0000 - 0x800AFFFF: IDE interface -*/ - -/* -* 0x800B0000 - 0x800BFFFF: VIC1 -*/ - -/* -* 0x800C0000 - 0x800CFFFF: VIC2 -*/ - -/* -* 0x800D0000 - 0x800FFFFF: Reserved -*/ - -/* -* 0x80800000 - 0x8080FFFF: Reserved -*/ - -/* -* 0x80810000 - 0x8081FFFF: Timers -*/ -#define TIMER_OFFSET 0x010000 -#define TIMER_BASE (EP93XX_APB_BASE | TIMER_OFFSET) - -#ifndef __ASSEMBLY__ -struct timer { -uint32_t load; -uint32_t value; -uint32_t control; -uint32_t clear; -}; - -struct timer4 { -uint32_t value_low; -uint32_t value_high; -}; - -struct timer_regs { -struct timer timer1; -uint32_t reserved0[4 ]; -struct timer timer2; -uint32_t reserved1[12 ]; -struct timer4 timer4; -uint32_t reserved2[6 ]; -struct timer timer3; -}; -#endif - -/* -* 0x80820000 - 0x8082FFFF: I2S -*/ -#define I2S_OFFSET 0x020000 -#define I2S_BASE (EP93XX_APB_BASE | I2S_OFFSET) - -/* -* 0x80830000 - 0x8083FFFF: Security -*/ -#define SECURITY_OFFSET 0x030000 -#define SECURITY_BASE (EP93XX_APB_BASE | SECURITY_OFFSET) - -#define EXTENSIONID (SECURITY_BASE + 0x2714) - -/* -* 0x80840000 - 0x8084FFFF: GPIO -*/ -#define GPIO_OFFSET 0x040000 -#define GPIO_BASE (EP93XX_APB_BASE | GPIO_OFFSET) - -#ifndef __ASSEMBLY__ -struct gpio_int { -uint32_t inttype1; -uint32_t inttype2; -uint32_t eoi; -uint32_t inten; -uint32_t intsts; -uint32_t rawintsts; -uint32_t db; -}; - -struct gpio_regs { -uint32_t padr; -uint32_t pbdr; -uint32_t pcdr; -uint32_t pddr; -uint32_t paddr; -uint32_t pbddr; -uint32_t pcddr; -uint32_t pdddr; -uint32_t pedr; -uint32_t peddr; -uint32_t reserved0[2 ]; -uint32_t pfdr; -uint32_t pfddr; -uint32_t pgdr; -uint32_t pgddr; -uint32_t phdr; -uint32_t phddr; -uint32_t reserved1; -uint32_t finttype1; -uint32_t finttype2; -uint32_t reserved2; -struct gpio_int pfint; -uint32_t reserved3[10 ]; -struct gpio_int paint; -struct gpio_int pbint; -uint32_t eedrive; -}; -#endif - -/* -* 0x80850000 - 0x8087FFFF: Reserved -*/ - -/* -* 0x80880000 - 0x8088FFFF: AAC -*/ -#define AAC_OFFSET 0x080000 -#define AAC_BASE (EP93XX_APB_BASE | AAC_OFFSET) - -/* -* 0x80890000 - 0x8089FFFF: Reserved -*/ - -/* -* 0x808A0000 - 0x808AFFFF: SPI -*/ -#define SPI_OFFSET 0x0A0000 -#define SPI_BASE (EP93XX_APB_BASE | SPI_OFFSET) - -/* -* 0x808B0000 - 0x808BFFFF: IrDA -*/ -#define IRDA_OFFSET 0x0B0000 -#define IRDA_BASE (EP93XX_APB_BASE | IRDA_OFFSET) - -/* -* 0x808C0000 - 0x808CFFFF: UART1 -*/ -#define UART1_OFFSET 0x0C0000 -#define UART1_BASE (EP93XX_APB_BASE | UART1_OFFSET) - -/* -* 0x808D0000 - 0x808DFFFF: UART2 -*/ -#define UART2_OFFSET 0x0D0000 -#define UART2_BASE (EP93XX_APB_BASE | UART2_OFFSET) - -/* -* 0x808E0000 - 0x808EFFFF: UART3 -*/ -#define UART3_OFFSET 0x0E0000 -#define UART3_BASE (EP93XX_APB_BASE | UART3_OFFSET) - -/* -* 0x808F0000 - 0x808FFFFF: Key Matrix -*/ -#define KEY_OFFSET 0x0F0000 -#define KEY_BASE (EP93XX_APB_BASE | KEY_OFFSET) - -/* -* 0x80900000 - 0x8090FFFF: Touchscreen -*/ -#define TOUCH_OFFSET 0x900000 -#define TOUCH_BASE (EP93XX_APB_BASE | TOUCH_OFFSET) - -/* -* 0x80910000 - 0x8091FFFF: Pulse Width Modulation -*/ -#define PWM_OFFSET 0x910000 -#define PWM_BASE (EP93XX_APB_BASE | PWM_OFFSET) - -/* -* 0x80920000 - 0x8092FFFF: Real time clock -*/ -#define RTC_OFFSET 0x920000 -#define RTC_BASE (EP93XX_APB_BASE | RTC_OFFSET) - -/* -* 0x80930000 - 0x8093FFFF: Syscon -*/ -#define SYSCON_OFFSET 0x930000 -#define SYSCON_BASE (EP93XX_APB_BASE | SYSCON_OFFSET) - -#ifndef __ASSEMBLY__ -struct syscon_regs { -uint32_t pwrsts; -uint32_t pwrcnt; -uint32_t halt; -uint32_t stby; -uint32_t reserved0[2 ]; -uint32_t teoi; -uint32_t stfclr; -uint32_t clkset1; -uint32_t clkset2; -uint32_t reserved1[6 ]; -uint32_t scratch0; -uint32_t scratch1; -uint32_t reserved2[2 ]; -uint32_t apbwait; -uint32_t bustmstrarb; -uint32_t bootmodeclr; -uint32_t reserved3[9 ]; -uint32_t devicecfg; -uint32_t vidclkdiv; -uint32_t mirclkdiv; -uint32_t i2sclkdiv; -uint32_t keytchclkdiv; -uint32_t chipid; -uint32_t reserved4; -uint32_t syscfg; -uint32_t reserved5[8 ]; -uint32_t sysswlock; -}; -#else -#define SYSCON_SCRATCH0 (SYSCON_BASE + 0x0040) -#endif - -#define SYSCON_PWRCNT_UART_BAUD (1 << 29) - -#define SYSCON_CLKSET_PLL_X2IPD_SHIFT 0 -#define SYSCON_CLKSET_PLL_X2FBD2_SHIFT 5 -#define SYSCON_CLKSET_PLL_X1FBD1_SHIFT 11 -#define SYSCON_CLKSET_PLL_PS_SHIFT 16 -#define SYSCON_CLKSET1_PCLK_DIV_SHIFT 18 -#define SYSCON_CLKSET1_HCLK_DIV_SHIFT 20 -#define SYSCON_CLKSET1_NBYP1 (1 << 23) -#define SYSCON_CLKSET1_FCLK_DIV_SHIFT 25 - -#define SYSCON_CLKSET2_PLL2_EN (1 << 18) -#define SYSCON_CLKSET2_NBYP2 (1 << 19) -#define SYSCON_CLKSET2_USB_DIV_SHIFT 28 - -#define SYSCON_CHIPID_REV_MASK 0xF0000000 -#define SYSCON_DEVICECFG_SWRST (1 << 31) - -/* -* 0x80930000 - 0x8093FFFF: Watchdog Timer -*/ -#define WATCHDOG_OFFSET 0x940000 -#define WATCHDOG_BASE (EP93XX_APB_BASE | WATCHDOG_OFFSET) - -/* -* 0x80950000 - 0x9000FFFF: Reserved -*/ --1.8.1.2
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 4/5 ep93xx: remove remainders of dead board
Hello Sergey
Quoted 3 lines
EP93xx is not dead! I recently submit patch for full support of
edb9315aboard (see http://patchwork.ozlabs.org/patch/276429/). And it's working well on my boards and on the original evaluation board.
Sorry, I had overlooked your recently-posted patch "arm: ep9315: Return back Cirrus Logic EDB9315A board support".
I thought it was dead because there had been no ep93xx entries in boards.cfg for almost two years.
It's nice to revive the board support.
I retract this patch.
Best Regards
Masahiro Yamada
PATCH 5/5 net: ep93xx_eth: remove a dead driver.
In reply to Masahiro Yamadacommit 716f7ade104a9aeed647e19a8b8c9ed9f491359d
deleted all ep93xx SoC boards.
Now there are no boards enabling CONFIG_EP93XX,
no boards using ep93xx_eth driver.
--- doc/driver-model/UDM-net.txt | 6 - drivers/net/Makefile | 1 - drivers/net/ep93xx_eth.c | 639 ------------------------------------------- drivers/net/ep93xx_eth.h | 127 --------- include/common.h | 3 +- include/netdev.h | 1 - 6 files changed, 1 insertion(+), 776 deletions(-) delete mode 100644 drivers/net/ep93xx_eth.c delete mode 100644 drivers/net/ep93xx_eth.h
doc/driver-model/UDM-net.txt +0 -6
@@ -217,12 +217,6 @@ III) Analysis of in-tree drivers This driver uses the standard new networking API, therefore there should be no obstacles throughout the conversion process. - drivers/net/ep93xx_eth.c - ------------------------ - - This driver uses the standard new networking API, therefore there should be no - obstacles throughout the conversion process. - drivers/net/ethoc.c -------------------
drivers/net/Makefile +0 -1
@@ -25,7 +25,6 @@ COBJS-$(CONFIG_E1000) += e1000.o COBJS-$(CONFIG_E1000_SPI) += e1000_spi.o COBJS-$(CONFIG_EEPRO100) += eepro100.o COBJS-$(CONFIG_ENC28J60) += enc28j60.o -COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o COBJS-$(CONFIG_ETHOC) += ethoc.o COBJS-$(CONFIG_FEC_MXC) += fec_mxc.o COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o
drivers/net/ep93xx_eth.c deleted +0 -639
639 lines not on this page · raw message
drivers/net/ep93xx_eth.h deleted +0 -127
127 lines not on this page · raw message
include/common.h +1 -2
@@ -659,8 +659,7 @@ ulong get_OPB_freq (void);ulong get_PCI_freq (void );#endif #if defined(CONFIG_S3C24X0 ) || \ - defined(CONFIG_LH7A40X ) || \ - defined(CONFIG_EP93XX ) + defined(CONFIG_LH7A40X )ulong get_FCLK (void );ulong get_HCLK (void );ulong get_PCLK (void );
include/netdev.h +0 -1
@@ -43,7 +43,6 @@ int e1000_initialize(bd_t *bis);int eepro100_initialize (bd_t *bis);int enc28j60_initialize (unsigned int bus,unsigned int cs,unsigned int max_hz,unsigned int mode); -int ep93xx_eth_initialize (u8 dev_num,int base_addr);int eth_3com_initialize (bd_t * bis);int ethoc_initialize (u8 dev_num,int base_addr);int fec_initialize (bd_t *bis);
Signature · 1 line
1.8.1.2
PATCH 5/5 net: ep93xx_eth: remove a dead driver.
Hi Masahiro,
And this driver works fine when my patch
(http://patchwork.ozlabs.org/patch/276429/) applied.
Best Regards,
Sergey Kostanbaev
Quoted 858 lines · Masahiro Yamada
commit
716f7ade104a9aeed647e19a8b8c9ed9f491359d
deleted all ep93xx SoC boards.Now there are no boards enabling
CONFIG_EP93XX,
no boards usingep93xx_ethdriver.Signed-off-by Masahiro Yamada <[email protected]>--- doc/driver-model/UDM-net.txt | 6 - drivers/net/Makefile | 1 - drivers/net/ep93xx_eth.c | 639 ------------------------------------------- drivers/net/ep93xx_eth.h | 127 --------- include/common.h | 3 +- include/netdev.h | 1 - 6 files changed, 1 insertion(+), 776 deletions(-) delete mode 100644 drivers/net/ep93xx_eth.c delete mode 100644 drivers/net/ep93xx_eth.hdoc/driver-model/UDM-net.txt +0
-6@@ -217,12 +217,6 @@ III) Analysis of in-tree drivers This driver uses the standard new networking API, therefore there should be no obstacles throughout the conversion process. - drivers/net/ep93xx_eth.c - ------------------------ - - This driver uses the standard new networking API, therefore there should be no - obstacles throughout the conversion process. - drivers/net/ethoc.c -------------------drivers/net/Makefile +0
-1@@ -25,7 +25,6 @@ COBJS-$(CONFIG_E1000) += e1000.o COBJS-$(CONFIG_E1000_SPI) += e1000_spi.o COBJS-$(CONFIG_EEPRO100) += eepro100.o COBJS-$(CONFIG_ENC28J60) += enc28j60.o -COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o COBJS-$(CONFIG_ETHOC) += ethoc.o COBJS-$(CONFIG_FEC_MXC) += fec_mxc.o COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.odrivers/net/ep93xx_eth.c deleted +0
-639@@ -1,639 +0,0 @@ -/* -* Cirrus Logic EP93xx ethernet MAC / MII driver. -* -* Copyright (C) 2010, 2009 -* Matthias Kaehlcke <[email protected]> -* -* Copyright (C) 2004, 2005 -* Cory T. Tusar, Videon Central, Inc., <[email protected]> -* -* Based on the original eth.[ch] Cirrus Logic EP93xx Rev D. Ethernet Driver, -* which is -* -* (C) Copyright 2002 2003 -* Adam Bezanson, Network Audio Technologies, Inc. -* <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <command.h> -#include <common.h> -#include <asm/arch/ep93xx.h> -#include <asm/io.h> -#include <malloc.h> -#include <miiphy.h> -#include <linux/types.h> -#include "ep93xx_eth.h" - -#define GET_PRIV (eth_dev) ((struct ep93xx_priv *)(eth_dev)->priv) -#define GET_REGS (eth_dev) (GET_PRIV(eth_dev)->regs) - -/* ep93xx_miiphy ops forward declarations */ -static int ep93xx_miiphy_read (const char *const dev,unsigned char const addr, -unsigned char const reg,unsigned short *const value); -static int ep93xx_miiphy_write (const char *const dev,unsigned char const addr, -unsigned char const reg,unsigned short const value); - -#if defined(EP93XX_MAC_DEBUG ) -/** -* Dump ep93xx_mac values to the terminal. -*/ -static void dump_dev (struct eth_device *dev) -{ -struct ep93xx_priv *priv =GET_PRIV (dev); -int i; - -printf ("\ndump_dev()\n" ); -printf (" rx_dq.base %p\n" , priv->rx_dq.base); -printf (" rx_dq.current %p\n" , priv->rx_dq.current); -printf (" rx_dq.end %p\n" , priv->rx_dq.end); -printf (" rx_sq.base %p\n" , priv->rx_sq.base); -printf (" rx_sq.current %p\n" , priv->rx_sq.current); -printf (" rx_sq.end %p\n" , priv->rx_sq.end); - -for (i =0 ; i <NUMRXDESC ; i++) -printf (" rx_buffer[%2.d] %p\n" , i, NetRxPackets[i]); - -printf (" tx_dq.base %p\n" , priv->tx_dq.base); -printf (" tx_dq.current %p\n" , priv->tx_dq.current); -printf (" tx_dq.end %p\n" , priv->tx_dq.end); -printf (" tx_sq.base %p\n" , priv->tx_sq.base); -printf (" tx_sq.current %p\n" , priv->tx_sq.current); -printf (" tx_sq.end %p\n" , priv->tx_sq.end); -} - -/** -* Dump all RX status queue entries to the terminal. -*/ -static void dump_rx_status_queue (struct eth_device *dev) -{ -struct ep93xx_priv *priv =GET_PRIV (dev); -int i; - -printf ("\ndump_rx_status_queue()\n" ); -printf (" descriptor address word1 word2\n" ); -for (i =0 ; i <NUMRXDESC ; i++) { -printf (" [ %p ] %08X %08X\n" , - priv->rx_sq.base + i, - (priv->rx_sq.base + i)->word1, - (priv->rx_sq.base + i)->word2); - } -} - -/** -* Dump all RX descriptor queue entries to the terminal. -*/ -static void dump_rx_descriptor_queue (struct eth_device *dev) -{ -struct ep93xx_priv *priv =GET_PRIV (dev); -int i; - -printf ("\ndump_rx_descriptor_queue()\n" ); -printf (" descriptor address word1 word2\n" ); -for (i =0 ; i <NUMRXDESC ; i++) { -printf (" [ %p ] %08X %08X\n" , - priv->rx_dq.base + i, - (priv->rx_dq.base + i)->word1, - (priv->rx_dq.base + i)->word2); - } -} - -/** -* Dump all TX descriptor queue entries to the terminal. -*/ -static void dump_tx_descriptor_queue (struct eth_device *dev) -{ -struct ep93xx_priv *priv =GET_PRIV (dev); -int i; - -printf ("\ndump_tx_descriptor_queue()\n" ); -printf (" descriptor address word1 word2\n" ); -for (i =0 ; i <NUMTXDESC ; i++) { -printf (" [ %p ] %08X %08X\n" , - priv->tx_dq.base + i, - (priv->tx_dq.base + i)->word1, - (priv->tx_dq.base + i)->word2); - } -} - -/** -* Dump all TX status queue entries to the terminal. -*/ -static void dump_tx_status_queue (struct eth_device *dev) -{ -struct ep93xx_priv *priv =GET_PRIV (dev); -int i; - -printf ("\ndump_tx_status_queue()\n" ); -printf (" descriptor address word1\n" ); -for (i =0 ; i <NUMTXDESC ; i++) { -printf (" [ %p ] %08X\n" , - priv->rx_sq.base + i, - (priv->rx_sq.base + i)->word1); - } -} -#else -#define dump_dev (x) -#define dump_rx_descriptor_queue (x) -#define dump_rx_status_queue (x) -#define dump_tx_descriptor_queue (x) -#define dump_tx_status_queue (x) -#endif /* defined(EP93XX_MAC_DEBUG) */ - -/** -* Reset the EP93xx MAC by twiddling the soft reset bit and spinning until -* it's cleared. -*/ -static void ep93xx_mac_reset (struct eth_device *dev) -{ -struct mac_regs *mac =GET_REGS (dev); -uint32_t value; - -debug ("+ep93xx_mac_reset" ); - - value =readl (&mac->selfctl); - value |=SELFCTL_RESET ; -writel (value, &mac->selfctl); - -while (readl (&mac->selfctl) &SELFCTL_RESET ) - ;/* noop */ - -debug ("-ep93xx_mac_reset" ); -} - -/* Eth device open */ -static int ep93xx_eth_open (struct eth_device *dev,bd_t *bd) -{ -struct ep93xx_priv *priv =GET_PRIV (dev); -struct mac_regs *mac =GET_REGS (dev); -uchar *mac_addr = dev->enetaddr; -int i; - -debug ("+ep93xx_eth_open" ); - -/* Reset the MAC */ -ep93xx_mac_reset (dev); - -/* Reset the descriptor queues' current and end address values */ - priv->tx_dq.current = priv->tx_dq.base; - priv->tx_dq.end = (priv->tx_dq.base +NUMTXDESC ); - - priv->tx_sq.current = priv->tx_sq.base; - priv->tx_sq.end = (priv->tx_sq.base +NUMTXDESC ); - - priv->rx_dq.current = priv->rx_dq.base; - priv->rx_dq.end = (priv->rx_dq.base +NUMRXDESC ); - - priv->rx_sq.current = priv->rx_sq.base; - priv->rx_sq.end = (priv->rx_sq.base +NUMRXDESC ); - -/* -* Set the transmit descriptor and status queues' base address, -* current address, and length registers. Set the maximum frame -* length and threshold. Enable the transmit descriptor processor. -*/ -writel ((uint32_t )priv->tx_dq.base, &mac->txdq.badd); -writel ((uint32_t )priv->tx_dq.base, &mac->txdq.curadd); -writel (sizeof (struct tx_descriptor ) *NUMTXDESC , &mac->txdq.blen); - -writel ((uint32_t )priv->tx_sq.base, &mac->txstsq.badd); -writel ((uint32_t )priv->tx_sq.base, &mac->txstsq.curadd); -writel (sizeof (struct tx_status ) *NUMTXDESC , &mac->txstsq.blen); - -writel (0x00040000 , &mac->txdthrshld); -writel (0x00040000 , &mac->txststhrshld); - -writel ((TXSTARTMAX <<0 ) | (PKTSIZE_ALIGN <<16 ), &mac->maxfrmlen); -writel (BMCTL_TXEN , &mac->bmctl); - -/* -* Set the receive descriptor and status queues' base address, -* current address, and length registers. Enable the receive -* descriptor processor. -*/ -writel ((uint32_t )priv->rx_dq.base, &mac->rxdq.badd); -writel ((uint32_t )priv->rx_dq.base, &mac->rxdq.curadd); -writel (sizeof (struct rx_descriptor ) *NUMRXDESC , &mac->rxdq.blen); - -writel ((uint32_t )priv->rx_sq.base, &mac->rxstsq.badd); -writel ((uint32_t )priv->rx_sq.base, &mac->rxstsq.curadd); -writel (sizeof (struct rx_status ) *NUMRXDESC , &mac->rxstsq.blen); - -writel (0x00040000 , &mac->rxdthrshld); - -writel (BMCTL_RXEN , &mac->bmctl); - -writel (0x00040000 , &mac->rxststhrshld); - -/* Wait until the receive descriptor processor is active */ -while (!(readl (&mac->bmsts) &BMSTS_RXACT )) - ;/* noop */ - -/* -* Initialize the RX descriptor queue. Clear the TX descriptor queue. -* Clear the RX and TX status queues. Enqueue the RX descriptor and -* status entries to the MAC. -*/ -for (i =0 ; i <NUMRXDESC ; i++) { -/* set buffer address */ - (priv->rx_dq.base + i)->word1 = (uint32_t )NetRxPackets[i]; - -/* set buffer length, clear buffer index and NSOF */ - (priv->rx_dq.base + i)->word2 =PKTSIZE_ALIGN ; - } - -memset (priv->tx_dq.base,0 , - (sizeof (struct tx_descriptor ) *NUMTXDESC )); -memset (priv->rx_sq.base,0 , - (sizeof (struct rx_status ) *NUMRXDESC )); -memset (priv->tx_sq.base,0 , - (sizeof (struct tx_status ) *NUMTXDESC )); - -writel (NUMRXDESC , &mac->rxdqenq); -writel (NUMRXDESC , &mac->rxstsqenq); - -/* Set the primary MAC address */ -writel (AFP_IAPRIMARY , &mac->afp); -writel (mac_addr[0 ] | (mac_addr[1 ] <<8 ) | - (mac_addr[2 ] <<16 ) | (mac_addr[3 ] <<24 ), - &mac->indad); -writel (mac_addr[4 ] | (mac_addr[5 ] <<8 ), &mac->indad_upper); - -/* Turn on RX and TX */ -writel (RXCTL_IA0 |RXCTL_BA |RXCTL_SRXON | -RXCTL_RCRCA |RXCTL_MA , &mac->rxctl); -writel (TXCTL_STXON , &mac->txctl); - -/* Dump data structures if we're debugging */ -dump_dev (dev); -dump_rx_descriptor_queue (dev); -dump_rx_status_queue (dev); -dump_tx_descriptor_queue (dev); -dump_tx_status_queue (dev); - -debug ("-ep93xx_eth_open" ); - -return 1 ; -} - -/** -* Halt EP93xx MAC transmit and receive by clearing the TxCTL and RxCTL -* registers. -*/ -static void ep93xx_eth_close (struct eth_device *dev) -{ -struct mac_regs *mac =GET_REGS (dev); - -debug ("+ep93xx_eth_close" ); - -writel (0x00000000 , &mac->rxctl); -writel (0x00000000 , &mac->txctl); - -debug ("-ep93xx_eth_close" ); -} - -/** -* Copy a frame of data from the MAC into the protocol layer for further -* processing. -*/ -static int ep93xx_eth_rcv_packet (struct eth_device *dev) -{ -struct mac_regs *mac =GET_REGS (dev); -struct ep93xx_priv *priv =GET_PRIV (dev); -int len =-1 ; - -debug ("+ep93xx_eth_rcv_packet" ); - -if (RX_STATUS_RFP (priv->rx_sq.current)) { -if (RX_STATUS_RWE (priv->rx_sq.current)) { -/* -* We have a good frame. Extract the frame's length -* from the current rx_status_queue entry, and copy -* the frame's data into NetRxPackets[] of the -* protocol stack. We track the total number of -* bytes in the frame (nbytes_frame) which will be -* used when we pass the data off to the protocol -* layer via NetReceive(). -*/ - len =RX_STATUS_FRAME_LEN (priv->rx_sq.current); - -NetReceive ((uchar *)priv->rx_dq.current->word1, len); - -debug ("reporting %d bytes...\n" , len); - }else { -/* Do we have an erroneous packet? */ -error ("packet rx error, status %08X %08X" , - priv->rx_sq.current->word1, - priv->rx_sq.current->word2); -dump_rx_descriptor_queue (dev); -dump_rx_status_queue (dev); - } - -/* -* Clear the associated status queue entry, and -* increment our current pointers to the next RX -* descriptor and status queue entries (making sure -* we wrap properly). -*/ -memset ((void *)priv->rx_sq.current,0 , -sizeof (struct rx_status )); - - priv->rx_sq.current++; -if (priv->rx_sq.current >= priv->rx_sq.end) - priv->rx_sq.current = priv->rx_sq.base; - - priv->rx_dq.current++; -if (priv->rx_dq.current >= priv->rx_dq.end) - priv->rx_dq.current = priv->rx_dq.base; - -/* -* Finally, return the RX descriptor and status entries -* back to the MAC engine, and loop again, checking for -* more descriptors to process. -*/ -writel (1 , &mac->rxdqenq); -writel (1 , &mac->rxstsqenq); - }else { - len =0 ; - } - -debug ("-ep93xx_eth_rcv_packet %d" , len); -return len; -} - -/** -* Send a block of data via ethernet. -*/ -static int ep93xx_eth_send_packet (struct eth_device *dev, -void *const packet,int const length) -{ -struct mac_regs *mac =GET_REGS (dev); -struct ep93xx_priv *priv =GET_PRIV (dev); -int ret =-1 ; - -debug ("+ep93xx_eth_send_packet" ); - -/* Parameter check */ -BUG_ON (packet ==NULL ); - -/* -* Initialize the TX descriptor queue with the new packet's info. -* Clear the associated status queue entry. Enqueue the packet -* to the MAC for transmission. -*/ - -/* set buffer address */ - priv->tx_dq.current->word1 = (uint32_t )packet; - -/* set buffer length and EOF bit */ - priv->tx_dq.current->word2 = length |TX_DESC_EOF ; - -/* clear tx status */ - priv->tx_sq.current->word1 =0 ; - -/* enqueue the TX descriptor */ -writel (1 , &mac->txdqenq); - -/* wait for the frame to become processed */ -while (!TX_STATUS_TXFP (priv->tx_sq.current)) - ;/* noop */ - -if (!TX_STATUS_TXWE (priv->tx_sq.current)) { -error ("packet tx error, status %08X" , - priv->tx_sq.current->word1); -dump_tx_descriptor_queue (dev); -dump_tx_status_queue (dev); - -/* TODO: Add better error handling? */ - goto eth_send_out; - } - - ret =0 ; -/* Fall through */ - -eth_send_out: -debug ("-ep93xx_eth_send_packet %d" , ret); -return ret; -} - -#if defined(CONFIG_MII ) -int ep93xx_miiphy_initialize (bd_t *const bd) -{ -miiphy_register ("ep93xx_eth0" , ep93xx_miiphy_read, ep93xx_miiphy_write); -return 0 ; -} -#endif - -/** -* Initialize the EP93xx MAC. The MAC hardware is reset. Buffers are -* allocated, if necessary, for the TX and RX descriptor and status queues, -* as well as for received packets. The EP93XX MAC hardware is initialized. -* Transmit and receive operations are enabled. -*/ -int ep93xx_eth_initialize (u8 dev_num,int base_addr) -{ -int ret =-1 ; -struct eth_device *dev; -struct ep93xx_priv *priv; - -debug ("+ep93xx_eth_initialize" ); - - priv =malloc (sizeof (*priv)); -if (!priv) { -error ("malloc() failed" ); - goto eth_init_failed_0; - } -memset (priv,0 ,sizeof (*priv)); - - priv->regs = (struct mac_regs *)base_addr; - - priv->tx_dq.base =calloc (NUMTXDESC , -sizeof (struct tx_descriptor )); -if (priv->tx_dq.base ==NULL ) { -error ("calloc() failed" ); - goto eth_init_failed_1; - } - - priv->tx_sq.base =calloc (NUMTXDESC , -sizeof (struct tx_status )); -if (priv->tx_sq.base ==NULL ) { -error ("calloc() failed" ); - goto eth_init_failed_2; - } - - priv->rx_dq.base =calloc (NUMRXDESC , -sizeof (struct rx_descriptor )); -if (priv->rx_dq.base ==NULL ) { -error ("calloc() failed" ); - goto eth_init_failed_3; - } - - priv->rx_sq.base =calloc (NUMRXDESC , -sizeof (struct rx_status )); -if (priv->rx_sq.base ==NULL ) { -error ("calloc() failed" ); - goto eth_init_failed_4; - } - - dev =malloc (sizeof *dev); -if (dev ==NULL ) { -error ("malloc() failed" ); - goto eth_init_failed_5; - } -memset (dev,0 ,sizeof *dev); - - dev->iobase = base_addr; - dev->priv = priv; - dev->init = ep93xx_eth_open; - dev->halt = ep93xx_eth_close; - dev->send = ep93xx_eth_send_packet; - dev->recv = ep93xx_eth_rcv_packet; - -sprintf (dev->name,"ep93xx_eth-%hu" , dev_num); - -eth_register (dev); - -/* Done! */ - ret =1 ; - goto eth_init_done; - -eth_init_failed_5: -free (priv->rx_sq.base); -/* Fall through */ - -eth_init_failed_4: -free (priv->rx_dq.base); -/* Fall through */ - -eth_init_failed_3: -free (priv->tx_sq.base); -/* Fall through */ - -eth_init_failed_2: -free (priv->tx_dq.base); -/* Fall through */ - -eth_init_failed_1: -free (priv); -/* Fall through */ - -eth_init_failed_0: -/* Fall through */ - -eth_init_done: -debug ("-ep93xx_eth_initialize %d" , ret); -return ret; -} - -#if defined(CONFIG_MII ) - -/** -* Maximum MII address we support -*/ -#define MII_ADDRESS_MAX 31 - -/** -* Maximum MII register address we support -*/ -#define MII_REGISTER_MAX 31 - -/** -* Read a 16-bit value from an MII register. -*/ -static int ep93xx_miiphy_read (const char *const dev,unsigned char const addr, -unsigned char const reg,unsigned short *const value) -{ -struct mac_regs *mac = (struct mac_regs *)MAC_BASE ; -int ret =-1 ; -uint32_t self_ctl; - -debug ("+ep93xx_miiphy_read" ); - -/* Parameter checks */ -BUG_ON (dev ==NULL ); -BUG_ON (addr >MII_ADDRESS_MAX ); -BUG_ON (reg >MII_REGISTER_MAX ); -BUG_ON (value ==NULL ); - -/* -* Save the current SelfCTL register value. Set MAC to suppress -* preamble bits. Wait for any previous MII command to complete -* before issuing the new command. -*/ - self_ctl =readl (&mac->selfctl); -#if defined(CONFIG_MII_SUPPRESS_PREAMBLE ) -writel (self_ctl & ~(1 <<8 ), &mac->selfctl); -#endif /* defined(CONFIG_MII_SUPPRESS_PREAMBLE) */ - -while (readl (&mac->miists) &MIISTS_BUSY ) - ;/* noop */ - -/* -* Issue the MII 'read' command. Wait for the command to complete. -* Read the MII data value. -*/ -writel (MIICMD_OPCODE_READ | ((uint32_t )addr <<5 ) | (uint32_t )reg, - &mac->miicmd); -while (readl (&mac->miists) &MIISTS_BUSY ) - ;/* noop */ - - *value = (unsigned short )readl (&mac->miidata); - -/* Restore the saved SelfCTL value and return. */ -writel (self_ctl, &mac->selfctl); - - ret =0 ; -/* Fall through */ - -debug ("-ep93xx_miiphy_read" ); -return ret; -} - -/** -* Write a 16-bit value to an MII register. -*/ -static int ep93xx_miiphy_write (const char *const dev,unsigned char const addr, -unsigned char const reg,unsigned short const value) -{ -struct mac_regs *mac = (struct mac_regs *)MAC_BASE ; -int ret =-1 ; -uint32_t self_ctl; - -debug ("+ep93xx_miiphy_write" ); - -/* Parameter checks */ -BUG_ON (dev ==NULL ); -BUG_ON (addr >MII_ADDRESS_MAX ); -BUG_ON (reg >MII_REGISTER_MAX ); - -/* -* Save the current SelfCTL register value. Set MAC to suppress -* preamble bits. Wait for any previous MII command to complete -* before issuing the new command. -*/ - self_ctl =readl (&mac->selfctl); -#if defined(CONFIG_MII_SUPPRESS_PREAMBLE ) -writel (self_ctl & ~(1 <<8 ), &mac->selfctl); -#endif /* defined(CONFIG_MII_SUPPRESS_PREAMBLE) */ - -while (readl (&mac->miists) &MIISTS_BUSY ) - ;/* noop */ - -/* Issue the MII 'write' command. Wait for the command to complete. */ -writel ((uint32_t )value, &mac->miidata); -writel (MIICMD_OPCODE_WRITE | ((uint32_t )addr <<5 ) | (uint32_t )reg, - &mac->miicmd); -while (readl (&mac->miists) &MIISTS_BUSY ) - ;/* noop */ - -/* Restore the saved SelfCTL value and return. */ -writel (self_ctl, &mac->selfctl); - - ret =0 ; -/* Fall through */ - -debug ("-ep93xx_miiphy_write" ); -return ret; -} -#endif /* defined(CONFIG_MII) */ drivers/net/ep93xx_eth.h deleted +0
-127@@ -1,127 +0,0 @@ -/* -* Copyright (C) 2009 Matthias Kaehlcke <[email protected]> -* -* Copyright (C) 2004, 2005 -* Cory T. Tusar, Videon Central, Inc., <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#ifndef _EP93XX_ETH_H -#define _EP93XX_ETH_H - -#include <net.h> - -/** -* #define this to dump device status and queue info during initialization and -* following errors. -*/ -#undef EP93XX_MAC_DEBUG - -/** -* Number of descriptor and status entries in our RX queues. -* It must be power of 2 ! -*/ -#define NUMRXDESC PKTBUFSRX - -/** -* Number of descriptor and status entries in our TX queues. -*/ -#define NUMTXDESC 1 - -/** -* 944 = (1024 - 64) - 16, Fifo size - Minframesize - 16 (Chip FACT) -*/ -#define TXSTARTMAX 944 - -/** -* Receive descriptor queue entry -*/ -struct rx_descriptor { -uint32_t word1; -uint32_t word2; -}; - -/** -* Receive status queue entry -*/ -struct rx_status { -uint32_t word1; -uint32_t word2; -}; - -#define RX_STATUS_RWE (rx_status) ((rx_status->word1 >> 30) & 0x01) -#define RX_STATUS_RFP (rx_status) ((rx_status->word1 >> 31) & 0x01) -#define RX_STATUS_FRAME_LEN (rx_status) (rx_status->word2 & 0xFFFF) - -/** -* Transmit descriptor queue entry -*/ -struct tx_descriptor { -uint32_t word1; -uint32_t word2; -}; - -#define TX_DESC_EOF (1 << 31) - -/** -* Transmit status queue entry -*/ -struct tx_status { -uint32_t word1; -}; - -#define TX_STATUS_TXWE (tx_status) (((tx_status)->word1 >> 30) & 0x01) -#define TX_STATUS_TXFP (tx_status) (((tx_status)->word1 >> 31) & 0x01) - -/** -* Transmit descriptor queue -*/ -struct tx_descriptor_queue { -struct tx_descriptor *base; -struct tx_descriptor *current; -struct tx_descriptor *end; -}; - -/** -* Transmit status queue -*/ -struct tx_status_queue { -struct tx_status *base; -volatile struct tx_status *current; -struct tx_status *end; -}; - -/** -* Receive descriptor queue -*/ -struct rx_descriptor_queue { -struct rx_descriptor *base; -struct rx_descriptor *current; -struct rx_descriptor *end; -}; - -/** -* Receive status queue -*/ -struct rx_status_queue { -struct rx_status *base; -volatile struct rx_status *current; -struct rx_status *end; -}; - -/** -* EP93xx MAC private data structure -*/ -struct ep93xx_priv { -struct rx_descriptor_queue rx_dq; -struct rx_status_queue rx_sq; -void *rx_buffer[NUMRXDESC ]; - -struct tx_descriptor_queue tx_dq; -struct tx_status_queue tx_sq; - -struct mac_regs *regs; -}; - -#endif include/common.h +1
-2@@ -659,8 +659,7 @@ ulong get_OPB_freq (void);ulong get_PCI_freq (void );#endif #if defined(CONFIG_S3C24X0 ) || \ - defined(CONFIG_LH7A40X ) || \ - defined(CONFIG_EP93XX ) + defined(CONFIG_LH7A40X )ulong get_FCLK (void );ulong get_HCLK (void );ulong get_PCLK (void );include/netdev.h +0
-2@@ -43,7 +43,6 @@ int e1000_initialize(bd_t *bis);int eepro100_initialize (bd_t *bis);int enc28j60_initialize (unsigned int bus,unsigned int cs,unsigned int max_hz,unsigned int mode); -int ep93xx_eth_initialize (u8 dev_num,int base_addr);int eth_3com_initialize (bd_t * bis);int ethoc_initialize (u8 dev_num,int base_addr);int fec_initialize (bd_t *bis); --1.8.1.2
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 5/5 net: ep93xx_eth: remove a dead driver.
Hello, Sergey
Quoted 2 lines
And this driver works fine when my patch
(http://patchwork.ozlabs.org/patch/276429/) applied.
OK. I retract this patch along with 4/5.
Best Regards
Masahiro Yamada
cover cleanup docs and remove remainders of dead board
In reply to Masahiro YamadaHello maintainers, Sergey.
Quoted 2 lines
ep93xx: remove remainders of dead board
net:ep93xx_eth: remove a dead driver.
I retract these two.
Quoted 3 lines
cosmetic: doc: driver-model: Do not number driver lists
cosmetic: doc: UDM-serial: clean up the remainders of dead driver
cosmetic: doc: UDM-net: clean up the remainders of dead driver
I believe these three are still applicable for easier maitainance of doc.
Best Regards
Masahiro Yamada