Home | History | Annotate | Download | only in adm5120
History log of /src/sys/arch/mips/adm5120/adm5120_extio.c
RevisionDateAuthorComments
 1.8  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7  24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6  27-Oct-2012  chs branches: 1.6.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5  01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4  20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.3  15-Dec-2010  matt branches: 1.3.2; 1.3.4;
Make these compile again.
 1.2  24-Oct-2008  dyoung branches: 1.2.12; 1.2.16;
Use aprint_error_dev() instead of printf().
 1.1  20-Mar-2007  dyoung branches: 1.1.2; 1.1.4; 1.1.20; 1.1.40; 1.1.44; 1.1.50;
Add a port to the Infineon ADM5120.

Basics: the ADM5120 is a 175 MHz MIPS32 4Kc processor featuring a
6-port ethernet 10/100 switch with Auto MDI/X, a PCI controller,
USB 1.1 controller, UART, watchdog timer, eight GPIO pins, and a
multiport memory controller with both NOR and NAND flash support.
This code supports most of the devices on the ADM5120, including
the 6-port switch (each port attaches as an ethernet, admsw0 through
admsw5), the PCI controller, USB controller, GPIO, watchdog, and
UART.

Remaining work: the port includes no NOR/NAND flash drivers. No
bootloader is included. I have only tested the PCI bus driver with
the use of one PCI slot on the RouterBOARD 153. It is not possible
to exploit the capabilities of the ethernet switch using bridge(4).
I have only netbooted the ADM5120 on the RB153. Booting other
boards, and booting from flash memory, remains to be done.

Hardware availability: many low-cost routers, including the
RouterBOARD 100 series at RouterBOARD.com, use the Infineon ADM5120
processor.

Credits: Ruslan Ermilov and Vsevolod Lobko ported to the ADM5120,
and they wrote device drivers for the UART, USB controller, and
10/100 switch. Matt Isaacs brought the port up-to-date with
NetBSD-current, made it compile, and ran it first on the RB153.
I added drivers for the PCI controller, GPIO, and watchdog timer.
I produced the bus attachment for the CompactFlash slot with advice
from Mikrotik technical support and from Matt Thomas.
 1.1.50.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.44.1  04-May-2009  yamt sync with head.
 1.1.40.1  17-Jan-2009  mjf Sync with HEAD.
 1.1.20.2  03-Sep-2007  yamt sync with head.
 1.1.20.1  20-Mar-2007  yamt file adm5120_extio.c was added on branch yamt-lazymbuf on 2007-09-03 14:27:43 +0000
 1.1.4.2  10-Apr-2007  ad Sync with head.
 1.1.4.1  20-Mar-2007  ad file adm5120_extio.c was added on branch vmlocking on 2007-04-10 13:23:22 +0000
 1.1.2.2  24-Mar-2007  yamt sync with head.
 1.1.2.1  20-Mar-2007  yamt file adm5120_extio.c was added on branch yamt-idlelwp on 2007-03-24 14:54:49 +0000
 1.2.16.1  05-Mar-2011  rmind sync with head
 1.2.12.1  10-Jan-2010  matt Add generic support for DMA bounce buffers and real version of
bus_dmatag_subregion. MALTA uses it for ISADMA. Make RMIXL use
for creating 32bit and 29bit subregions.
 1.3.4.1  05-Mar-2011  bouyer Sync with HEAD
 1.3.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.5.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1  30-Oct-2012  yamt sync with head
 1.6.52.1  22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.7.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed