def attachIO(self, bus, dma_ports=[]):
    self.uart.pio = bus.master
    self.realview_io.pio = bus.master
    self.pci_host.pio = bus.master
    self.timer0.pio = bus.master
    self.timer1.pio = bus.master
    self.clcd.pio = bus.master
    if (dma_ports.count(self.clcd.dma) == 0):
        self.clcd.dma = bus.slave
    self.kmi0.pio = bus.master
    self.kmi1.pio = bus.master
    self.dmac_fake.pio = bus.master
    self.uart1_fake.pio = bus.master
    self.uart2_fake.pio = bus.master
    self.uart3_fake.pio = bus.master
    self.smc_fake.pio = bus.master
    self.sp810_fake.pio = bus.master
    self.watchdog_fake.pio = bus.master
    self.gpio0_fake.pio = bus.master
    self.gpio1_fake.pio = bus.master
    self.gpio2_fake.pio = bus.master
    self.ssp_fake.pio = bus.master
    self.sci_fake.pio = bus.master
    self.aaci_fake.pio = bus.master
    self.mmc_fake.pio = bus.master
    self.rtc_fake.pio = bus.master
    self.flash_fake.pio = bus.master
    self.smcreg_fake.pio = bus.master
    self.energy_ctrl.pio = bus.master
def attachIO(self, bus, dma_ports=[]):
    self.uart.pio = bus.master
    self.realview_io.pio = bus.master
    self.pci_host.pio = bus.master
    self.timer0.pio = bus.master
    self.timer1.pio = bus.master
    self.clcd.pio = bus.master
    if (dma_ports.count(self.clcd.dma) == 0):
        self.clcd.dma = bus.slave
    self.kmi0.pio = bus.master
    self.kmi1.pio = bus.master
    self.dmac_fake.pio = bus.master
    self.uart1_fake.pio = bus.master
    self.uart2_fake.pio = bus.master
    self.uart3_fake.pio = bus.master
    self.smc_fake.pio = bus.master
    self.sp810_fake.pio = bus.master
    self.watchdog_fake.pio = bus.master
    self.gpio0_fake.pio = bus.master
    self.gpio1_fake.pio = bus.master
    self.gpio2_fake.pio = bus.master
    self.ssp_fake.pio = bus.master
    self.sci_fake.pio = bus.master
    self.aaci_fake.pio = bus.master
    self.mmc_fake.pio = bus.master
    self.rtc_fake.pio = bus.master
    self.flash_fake.pio = bus.master
    self.smcreg_fake.pio = bus.master
    self.energy_ctrl.pio = bus.master