-# vim:set ft=ioconfig:
-#
-# (c) 2008-2009 Technische Universität Dresden
-# This file is part of TUD:OS and distributed under the terms of the
-# GNU General Public License 2.
-# Please see the COPYING-GPL-2 file for details.
+-- vim:set ft=lua:
+--
+-- (c) 2008-2009 Technische Universität Dresden
+-- This file is part of TUD:OS and distributed under the terms of the
+-- GNU General Public License 2.
+-- Please see the COPYING-GPL-2 file for details.
+-- multi-core EB (PB11MP)
-# multi-core EB (PB11MP)
-hw-root
+local Hw = Io.Hw
+local Res = Io.Res
+
+Io.hw_add_devices
{
- CTRL => new Device()
+ CTRL = Hw.Device
{
- .hid = "System Control";
- new-res Mmio(0x10000000 .. 0x10000fff);
- }
+ hid = "System Control";
+ Res.mmio(0x10000000, 0x10000fff);
+ },
- LCD => new Device()
+ LCD = Hw.Device
{
- .hid = "AMBA PL110";
- new-res Mmio(0x10020000 .. 0x10020fff);
- }
+ hid = "AMBA PL110";
+ Res.mmio(0x10020000, 0x10020fff);
+ },
- KBD => new Device()
+ KBD = Hw.Device
{
- .hid = "AMBA KMI Kbd";
- new-res Irq(39);
- new-res Mmio(0x10006000 .. 0x10006fff);
- }
+ hid = "AMBA KMI Kbd";
+ Res.irq(39);
+ Res.mmio(0x10006000, 0x10006fff);
+ },
- MOUSE => new Device()
+ MOUSE = Hw.Device
{
- .hid = "AMBA KMI mou";
- new-res Mmio(0x10007000 .. 0x10007fff);
- new-res Irq(40);
- }
+ hid = "AMBA KMI mou";
+ Res.mmio(0x10007000, 0x10007fff);
+ Res.irq(40);
+ },
- GPIO0 => new Device()
+ GPIO0 = Hw.Device
{
- .hid = "AMBA PL061 dev0";
- new-res Mmio(0x10013000 .. 0x10013fff);
- new-res Irq(6);
- }
+ hid = "AMBA PL061 dev0";
+ Res.mmio(0x10013000, 0x10013fff);
+ Res.irq(6);
+ },
- GPIO1 => new Device()
+ GPIO1 = Hw.Device
{
- .hid = "AMBA PL061 dev1";
- new-res Mmio(0x10014000 .. 0x10014fff);
- new-res Irq(7);
- }
+ hid = "AMBA PL061 dev1";
+ Res.mmio(0x10014000, 0x10014fff);
+ Res.irq(7);
+ },
- COMPACTFLASH => new Device()
+ COMPACTFLASH = Hw.Device
{
- .hid = "compactflash";
- new-res Mmio(0x18000000 .. 0x180000ff);
- new-res Mmio(0x18000100 .. 0x180003ff);
- }
+ hid = "compactflash"; -- FIXME: should be "XXX flash" or something
+ Res.mmio(0x18000000, 0x180000ff);
+ Res.mmio(0x18000100, 0x180003ff);
+ },
- AACI => new Device()
+ AACI = Hw.Device
{
- .hid = "aaci";
- new-res Mmio(0x10004000 .. 0x10004fff);
- new-res Irq(32);
- }
+ hid = "aaci";
+ Res.mmio(0x10004000, 0x10004fff);
+ Res.irq(32);
+ },
- NIC => new Device()
+ NIC = Hw.Device
{
- .hid = "smsc911x";
- new-res Mmio(0x4e000000 .. 0x4e000fff);
- new-res Irq(41);
- }
+ hid = "smsc911x";
+ Res.mmio(0x4e000000, 0x4e000fff);
+ Res.irq(41);
+ },
- MEM1 => new Device()
+ MEM1 = Hw.Device
{
- .hid = "foomem";
- new-res Mmio_ram(0x10000, 0);
- }
+ hid = "foomem";
+ Io.Mmio_data_space(0x10000, 0);
+ },
}