Changes in uspace/srv/hw/irc/obio/obio.c [df01d303:3e6a98c5] in mainline
- File:
-
- 1 edited
-
uspace/srv/hw/irc/obio/obio.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/irc/obio/obio.c
rdf01d303 r3e6a98c5 45 45 #include <ipc/irc.h> 46 46 #include <ns.h> 47 #include <sysinfo.h> 47 48 #include <as.h> 48 49 #include <ddi.h> … … 68 69 #define INO_MASK 0x1f 69 70 70 static uintptr_tbase_phys;71 static volatile uint64_t *base_virt = (volatile uint64_t *) AS_AREA_ANY;71 static void *base_phys; 72 static volatile uint64_t *base_virt; 72 73 73 74 /** Handle one connection to obio. … … 93 94 switch (IPC_GET_IMETHOD(call)) { 94 95 case IRC_ENABLE_INTERRUPT: 95 inr = IPC_GET_ARG1(call); 96 base_virt[OBIO_IMR(inr & INO_MASK)] |= (1UL << 31); 96 /* Noop */ 97 97 async_answer_0(callid, EOK); 98 98 break; … … 111 111 /** Initialize the OBIO driver. 112 112 * 113 * In the future, the OBIO driver should be integrated with the sun4u platform driver. 113 * So far, the driver heavily depends on information provided by the kernel via 114 * sysinfo. In the future, there should be a standalone OBIO driver. 114 115 */ 115 116 static bool obio_init(void) 116 117 { 117 base_phys = (uintptr_t) 0x1fe00000000ULL; 118 sysarg_t paddr; 119 120 if (sysinfo_get_value("obio.base.physical", &paddr) != EOK) { 121 printf("%s: No OBIO registers found\n", NAME); 122 return false; 123 } 124 125 base_phys = (void *) paddr; 118 126 119 127 int flags = AS_AREA_READ | AS_AREA_WRITE; … … 127 135 } 128 136 129 printf("%s: OBIO registers with base at % lx\n", NAME, base_phys);137 printf("%s: OBIO registers with base at %p\n", NAME, base_phys); 130 138 131 async_set_ fallback_port_handler(obio_connection, NULL);139 async_set_client_connection(obio_connection); 132 140 service_register(SERVICE_IRC); 133 141
Note:
See TracChangeset
for help on using the changeset viewer.
