diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2021-07-30 11:29:32 +0200 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2021-07-30 11:39:58 +0200 |
commit | c21483f839e5c2080ad1dd0e54572be8698f1546 (patch) | |
tree | a4a9aa22d606cfef81162966d8e1b0c083a6ca9b /grlib.c | |
parent | 62ee70c63af1a1dfe8f943290ab6184c37933e13 (diff) |
Added GR740 L2 configuration register2.28
Diffstat (limited to 'grlib.c')
-rw-r--r-- | grlib.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -251,6 +251,40 @@ const struct grlib_ipcore greth = { NULL, NULL, grlib_greth_read, grlib_greth_write, greth_add }; +/* ------------------- L2C -----------------------*/ + +static int +grlib_l2c_read (uint32 addr, uint32 * data) +{ + uint32 res; + + switch (addr & 0xFC) + { + case 4: + /* Status */ + res = 0x00502803; + break; + default: + res = 0; + } + + *data = res; +} + +static void +l2c_add (int irq, uint32 addr, uint32 mask) +{ + grlib_ahbmpp_add (GRLIB_PP_ID (VENDOR_GAISLER, GAISLER_L2C, 0, 0)); + grlib_apbpp_add (GRLIB_PP_ID (VENDOR_GAISLER, GAISLER_L2C, 0, 0), + GRLIB_PP_APBADDR (addr, mask)); + if (sis_verbose) + printf(" Level 2 Cache controller 0x%08x\n", addr); +} + +const struct grlib_ipcore l2c = { + NULL, NULL, grlib_l2c_read, NULL, l2c_add +}; + /* ------------------- LEON3 -----------------------*/ |