25 #include <linux/kernel.h>
26 #include <linux/slab.h>
47 static inline u32 omap3_l3_decode_addr(
u64 error_addr)
49 return error_addr & 0xffffffff;
52 static inline unsigned omap3_l3_decode_cmd(
u64 error)
62 static inline unsigned omap3_l3_decode_req_info(
u64 error)
64 return (error >> 32) & 0xffff;
67 static char *omap3_l3_code_string(
u8 code)
73 return "Unsupported Command";
75 return "Address Hole";
77 return "Protection Violation";
79 return "In-band Error";
81 return "Request Timeout Not Accepted";
83 return "Request Timeout, no response";
85 return "UNKNOWN error";
89 static char *omap3_l3_initiator_string(
u8 initid)
134 return "UNKNOWN Initiator";
151 u64 error,
int error_addr)
153 u8 code = omap3_l3_decode_error_code(error);
154 u8 initid = omap3_l3_decode_initid(error);
156 u32 address = omap3_l3_decode_addr(error_addr);
158 pr_err(
"%s seen by %s %s at address %x\n",
159 omap3_l3_code_string(code),
160 omap3_l3_initiator_string(initid),
161 multi ?
"Multiple Errors" :
"", address);
167 static irqreturn_t omap3_l3_app_irq(
int irq,
void *_l3)
194 err_source =
__ffs(status);
196 base = l3->
rt + omap3_l3_bases[
int_type][err_source];
200 ret |= omap3_l3_block_irq(l3, error, error_addr);
224 platform_set_drvdata(pdev, l3);
228 dev_err(&pdev->
dev,
"couldn't find resource\n");
244 dev_err(&pdev->
dev,
"couldn't request debug irq\n");
253 dev_err(&pdev->
dev,
"couldn't request app irq\n");
270 struct omap3_l3 *l3 = platform_get_drvdata(pdev);
281 .remove =
__exit_p(omap3_l3_remove),
283 .name =
"omap_l3_smx",
287 static int __init omap3_l3_init(
void)
293 static void __exit omap3_l3_exit(
void)