This commit is contained in:
Brandon Ros 2023-08-22 18:42:09 -04:00
parent 058c10f3e9
commit 74a2af85d1

View File

@ -252,14 +252,14 @@ where
if len == 4 { if len == 4 {
bus_addr |= BACKPLANE_ADDRESS_32BIT_FLAG; bus_addr |= BACKPLANE_ADDRESS_32BIT_FLAG;
} }
let val = self.readn(FUNC_BACKPLANE, bus_addr, len).await; let val = self.readn(FUNC_BACKPLANE, bus_addr, len).await;
debug!("backplane_readn addr = {:08x} len = {} val = {:08x}", addr, len, val); debug!("backplane_readn addr = {:08x} len = {} val = {:08x}", addr, len, val);
self.backplane_set_window(0x18000000).await; // CHIPCOMMON_BASE_ADDRESS self.backplane_set_window(0x18000000).await; // CHIPCOMMON_BASE_ADDRESS
return val return val;
} }
async fn backplane_writen(&mut self, addr: u32, val: u32, len: u32) { async fn backplane_writen(&mut self, addr: u32, val: u32, len: u32) {
@ -307,7 +307,7 @@ where
) )
.await; .await;
} }
self.backplane_window = new_window; self.backplane_window = new_window;
} }
@ -345,7 +345,10 @@ where
self.status = self.spi.cmd_read(cmd, &mut buf[..len]).await; self.status = self.spi.cmd_read(cmd, &mut buf[..len]).await;
debug!("readn cmd = {:08x} addr = {:08x} len = {} buf = {:08x}", cmd, addr, len, buf); debug!(
"readn cmd = {:08x} addr = {:08x} len = {} buf = {:08x}",
cmd, addr, len, buf
);
// if we read from the backplane, the result is in the second word, after the response delay // if we read from the backplane, the result is in the second word, after the response delay
if func == FUNC_BACKPLANE { if func == FUNC_BACKPLANE {