*** tpb has joined #timvideos | 00:00 | |
*** danielki has quit IRC | 00:12 | |
*** danielki has joined #timvideos | 00:25 | |
futarisIRCcloud | Had a quick play with serial irq etc this morning. Can't get the interrupt to happen on the linux side. Moved IRQ in QEMU and linux to int 2, as int 0 gives some problems in linux. | 01:11 |
---|---|---|
futarisIRCcloud | Looks like we'll need to follow what serial.c does in qemu. serial_mm_init is the function used for qemu openrisc_sim ... Emulates a 16550 UART with IRQ, on IRQ 2 in linux. | 01:12 |
futarisIRCcloud | Heading out now, and might be able to look at this again later this afternoon / tonight. | 01:12 |
*** danielki has quit IRC | 01:19 | |
*** danielki has joined #timvideos | 01:33 | |
*** danielki has quit IRC | 02:50 | |
*** danielki has joined #timvideos | 03:03 | |
*** danielki has quit IRC | 03:57 | |
*** danielki has joined #timvideos | 04:10 | |
mithro | futarisIRCcloud: I'll look at fixing QEmu after lunch | 04:28 |
*** futarisIRCcloud has quit IRC | 06:42 | |
*** danielki has quit IRC | 08:09 | |
*** futarisIRCcloud has joined #timvideos | 08:18 | |
futarisIRCcloud | mithro: How'd you go with the qemu-litex changes? | 08:26 |
mithro | I got distracted by the spiflash | 08:26 |
mithro | I can look at it now if you want | 08:26 |
futarisIRCcloud | Ok. If we can just get irqs happening from qemu, then I can fix up tx and then rx after that. | 08:29 |
mithro | futarisIRCcloud: Okay - Looking at the Python code what you mentioned is almost right | 08:37 |
mithro | futarisIRCcloud: The EV object generated 3 registers | 08:38 |
mithro | futarisIRCcloud: CSR_UART_EV_STATUS == current state of the IRQ | 08:38 |
mithro | futarisIRCcloud: CSR_UART_EV_PENDING == if the IRQ fired since last being cleared | 08:39 |
mithro | futarisIRCcloud: CSR_UART_EV_ENABLE == if the IRQ will fire | 08:39 |
mithro | futarisIRCcloud: So the idea is that normally you set the TX IRQ as non-firing, when the TX buffer gets full you set the TX IRQ to fire and wait for that before sending more bytes | 08:40 |
futarisIRCcloud | Yeah, I looked at how the bare metal isr handled it. | 08:41 |
mithro | futarisIRCcloud: So, if you just want RX IRQs, you should write to the ENABLE register | 08:44 |
* mithro goes to see what is implemented in QEMU | 08:45 | |
futarisIRCcloud | Yeah. But we'll need a way of resuming tx when the fifo is full. Which means implementing a timer or waiting for a tx irq. | 08:45 |
mithro | futarisIRCcloud: Yes, you can unmask the TX IRQ once the fifo is full | 08:46 |
futarisIRCcloud | Mithro: Yep. I'm just trying to get the irq to happen in Linux. Just for tx first. An rx irq could be used to resume printing first, I guess. | 08:48 |
futarisIRCcloud | For qemu, we can just emulate an unlimited depth tx fifo, and it should just work with the Linux driver. Or you can implement a real tx_fifo. | 08:52 |
mithro | futarisIRCcloud: So it doesn't look like the IRQ is getting through from the peripheral | 09:17 |
mithro | The peripheral code seems to be raising it correctly but it's never getting to openrisc_pic_cpu_handle function | 09:18 |
mithro | Okay, I fixed it... | 09:34 |
mithro | futarisIRCcloud: poke? | 09:37 |
mithro | futarisIRCcloud: Turns out that I was using the IRQs before initalizing them... | 09:38 |
futarisIRCcloud | Ah. That'd do it. | 09:40 |
mithro | futarisIRCcloud: Pushed | 09:40 |
futarisIRCcloud | Great. Have to fetch it from github.com/mithro rather than timvideos. I pushed your earlier changes onto timvideos. | 09:47 |
mithro | futarisIRCcloud: Pushed to the timvideos repo too now | 09:48 |
mithro | futarisIRCcloud: That help? | 09:52 |
futarisIRCcloud | Working on it. | 09:52 |
futarisIRCcloud | Should I should be on 'master' or 'linux-hacks' branch? | 09:56 |
mithro | futarisIRCcloud: linux-hacks just has the reset location hard coded to 0x4000100 | 09:56 |
futarisIRCcloud | qemu-litex/hw/openrisc/litex.c:39:27: fatal error: ../generated/csr.h: Too many levels of symbolic links | 10:10 |
futarisIRCcloud | With a clean build/opsis_base_or1k directory. | 10:11 |
mithro | futarisIRCcloud: Hrm? | 10:11 |
futarisIRCcloud | Redoing scripts/download-env.sh again. | 10:13 |
futarisIRCcloud | Ok. My bad. I accidentally, did export TARGET=BASE rather TARGET=base ... | 10:15 |
futarisIRCcloud | "qemu-system-or32: Trying to execute code outside RAM or ROM at 0x00008000 "with branch 'master' | 10:20 |
futarisIRCcloud | 'linux-hacks' works. | 10:21 |
futarisIRCcloud | 'linux-hacks' already had that change from 'master' ... | 10:38 |
mithro | WTF is going on in this file!? http://lxr.free-electrons.com/source/drivers/gpio/gpio-mmio.c :-P | 11:31 |
tpb | Title: Linux/drivers/gpio/gpio-mmio.c - Linux Cross Reference - Free Electrons (at lxr.free-electrons.com) | 11:31 |
*** danielki has joined #timvideos | 12:32 | |
*** futarisIRCcloud has quit IRC | 13:52 | |
*** danielki has quit IRC | 14:06 | |
*** danielki has joined #timvideos | 14:19 | |
*** danielki has quit IRC | 15:13 | |
*** danielki has joined #timvideos | 15:27 | |
*** danielki has quit IRC | 15:33 | |
*** l3gi0n has joined #timvideos | 17:38 | |
*** l3gi0n has quit IRC | 17:46 | |
*** futarisIRCcloud has joined #timvideos | 19:23 | |
*** futarisIRCcloud has quit IRC | 21:32 | |
*** SamSagaZ has joined #timvideos | 22:48 | |
*** futarisIRCcloud has joined #timvideos | 23:18 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!