Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update register address for mailbox in example kernel driver and test #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions elink/sw/mailbox/kernel/epiphany.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ MODULE_LICENSE("GPL");
#define PL_MEM_END 0x80000000UL

#define ERX_REG_START 0x810F0300
#define ERX_REG_END 0x810F03FF
#define ERX_REG_END 0x810F07FF
#define ERX_CFG_REG 0x0 // 0xF0300
#define MAILBOX_LO_REG 0x20 // 0xF0320
#define MAILBOX_HI_REG 0x24 // 0xF0324
#define MAILBOX_STATE 0x28 // 0xF0328
#define MAILBOX_LO_REG 0x430 // 0xF0730
#define MAILBOX_HI_REG 0x434 // 0xF0734
#define MAILBOX_STATE 0x438 // 0xF0738
#define MAILBOX_ENABLE (0x1 << 28) // bit 28 in ERX_CFG_REG

static int major = 0;
Expand Down
10 changes: 5 additions & 5 deletions elink/sw/mailbox/src/e-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ int main(int argc, char *argv[]){
}

//Reading mailbox
int pre_stat = ee_read_esys(0xF0328);
int mbox_lo = ee_read_esys(0xF0320);
int mbox_hi = ee_read_esys(0xF0324);
int post_stat = ee_read_esys(0xF0328);
// post_stat = ee_read_esys(0xF0304);
int pre_stat = ee_read_esys(0xF0738);
int mbox_lo = ee_read_esys(0xF0730);
int mbox_hi = ee_read_esys(0xF0734);
int post_stat = ee_read_esys(0xF0738);
// post_stat = ee_read_esys(0xF0738);

printf ("PRE_STAT=%08x POST_STAT=%08x LO=%08x HI=%08x\n", pre_stat, post_stat, mbox_lo, mbox_hi);

Expand Down