MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zy7_devcfg_init_hw

Function zy7_devcfg_init_hw

freebsd/arm/xilinx/zy7_devcfg.c:400–422  ·  view source on GitHub ↗

Enable programming the PL through PCAP. */

Source from the content-addressed store, hash-verified

398
399/* Enable programming the PL through PCAP. */
400static void
401zy7_devcfg_init_hw(struct zy7_devcfg_softc *sc)
402{
403
404 DEVCFG_SC_ASSERT_LOCKED(sc);
405
406 /* Set devcfg control register. */
407 WR4(sc, ZY7_DEVCFG_CTRL,
408 ZY7_DEVCFG_CTRL_PCFG_PROG_B |
409 ZY7_DEVCFG_CTRL_PCAP_PR |
410 ZY7_DEVCFG_CTRL_PCAP_MODE |
411 ZY7_DEVCFG_CTRL_USER_MODE |
412 ZY7_DEVCFG_CTRL_RESVD_WR11 |
413 ZY7_DEVCFG_CTRL_SPNIDEN |
414 ZY7_DEVCFG_CTRL_SPIDEN |
415 ZY7_DEVCFG_CTRL_NIDEN |
416 ZY7_DEVCFG_CTRL_DBGEN |
417 ZY7_DEVCFG_CTRL_DAP_EN_MASK);
418
419 /* Turn off internal PCAP loopback. */
420 WR4(sc, ZY7_DEVCFG_MCTRL, RD4(sc, ZY7_DEVCFG_MCTRL) &
421 ~ZY7_DEVCFG_MCTRL_INT_PCAP_LPBK);
422}
423
424/* Clear previous configuration of the PL by asserting PROG_B. */
425static int

Callers 1

zy7_devcfg_writeFunction · 0.85

Calls 2

WR4Function · 0.50
RD4Function · 0.50

Tested by

no test coverage detected