x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / arm / mach-prima2 / l2x0.c
blobcbcbe9cb094c480a928d22ad23642eec3ecc0178
1 /*
2 * l2 cache initialization for CSR SiRFprimaII
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
6 * Licensed under GPLv2 or later.
7 */
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/of.h>
12 #include <asm/hardware/cache-l2x0.h>
14 struct l2x0_aux
16 u32 val;
17 u32 mask;
20 static struct l2x0_aux prima2_l2x0_aux __initconst = {
21 .val = 2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT,
22 .mask = 0,
25 static struct l2x0_aux marco_l2x0_aux __initconst = {
26 .val = (2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
27 (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT),
28 .mask = L2X0_AUX_CTRL_MASK,
31 static struct of_device_id sirf_l2x0_ids[] __initconst = {
32 { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
33 { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
34 {},
37 static int __init sirfsoc_l2x0_init(void)
39 struct device_node *np;
40 const struct l2x0_aux *aux;
42 np = of_find_matching_node(NULL, sirf_l2x0_ids);
43 if (np) {
44 aux = of_match_node(sirf_l2x0_ids, np)->data;
45 return l2x0_of_init(aux->val, aux->mask);
48 return 0;
50 early_initcall(sirfsoc_l2x0_init);