16 #include <linux/types.h>
32 pr_err(
"%s: device %s is not a SCOM controller\n",
34 return SCOM_MAP_INVALID;
38 pr_debug(
"Failed to find SCOM controller address\n");
43 xscom_addr = ((reg & 0x7f000000) >> 1) | ((reg & 0xfffff) << 3);
45 return (scom_map_t)
ioremap(
r.start + xscom_addr, count << 3);
48 static void wsp_scom_unmap(scom_map_t
map)
53 static u64 wsp_scom_read(scom_map_t map,
u32 reg)
57 return in_be64(addr + reg);
60 static void wsp_scom_write(scom_map_t map,
u32 reg,
u64 value)
64 return out_be64(addr + reg, value);
69 .unmap = wsp_scom_unmap,
70 .read = wsp_scom_read,
71 .write = wsp_scom_write
76 scom_init(&wsp_scom_controller);