summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-gic-v3-its.c
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-09-20 20:39:46 +0300
committerkx <kx@radix.pro>2023-09-20 20:39:46 +0300
commit5fe56a16f7f63d8c3a4b0091cd4902d1d558d602 (patch)
tree29269ff4449662695bb32d5e6afb00edc7f57b01 /drivers/irqchip/irq-gic-v3-its.c
parentf3c042d7a10d0531e19475a86f7863911d631810 (diff)
downloadlinux-5fe56a16f7f63d8c3a4b0091cd4902d1d558d602.tar.xz
dts: rk3588
Diffstat (limited to 'drivers/irqchip/irq-gic-v3-its.c')
-rw-r--r--drivers/irqchip/irq-gic-v3-its.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index f268f9c04a1c..3d5fb0b78cda 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2204,7 +2204,9 @@ static struct page *its_allocate_prop_table(gfp_t gfp_flags)
{
struct page *prop_page;
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ if (of_machine_is_compatible("rockchip,rk3568") ||
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
gfp_flags |= GFP_DMA32;
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
@@ -2343,7 +2345,9 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
}
gfp_flags = GFP_KERNEL | __GFP_ZERO;
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ if (of_machine_is_compatible("rockchip,rk3568") ||
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
gfp_flags |= GFP_DMA32;
page = alloc_pages_node(its->numa_node, gfp_flags, order);
@@ -2984,7 +2988,9 @@ static struct page *its_allocate_pending_table(gfp_t gfp_flags)
{
struct page *pend_page;
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ if (of_machine_is_compatible("rockchip,rk3568") ||
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
gfp_flags |= GFP_DMA32;
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
get_order(LPI_PENDBASE_SZ));
@@ -3142,8 +3148,8 @@ static void its_cpu_init_lpis(void)
tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);
if (of_machine_is_compatible("rockchip,rk3568") ||
- of_machine_is_compatible("rockchip,rk3566") ||
- of_machine_is_compatible("rockchip,rk3588"))
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
@@ -3171,8 +3177,8 @@ static void its_cpu_init_lpis(void)
tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);
if (of_machine_is_compatible("rockchip,rk3568") ||
- of_machine_is_compatible("rockchip,rk3566") ||
- of_machine_is_compatible("rockchip,rk3588"))
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
@@ -3340,7 +3346,9 @@ static bool its_alloc_table_entry(struct its_node *its,
if (!table[idx]) {
gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO;
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ if (of_machine_is_compatible("rockchip,rk3568") ||
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
gfp_flags |= GFP_DMA32;
page = alloc_pages_node(its->numa_node, gfp_flags,
get_order(baser->psz));
@@ -3449,7 +3457,9 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
gfp_flags = GFP_KERNEL;
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588")) {
+ if (of_machine_is_compatible("rockchip,rk3568") ||
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588")) {
gfp_flags |= GFP_DMA32;
itt = (void *)__get_free_pages(gfp_flags, get_order(sz));
} else {
@@ -3471,7 +3481,8 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
kfree(dev);
if (of_machine_is_compatible("rockchip,rk3568") ||
- of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
free_pages((unsigned long)itt, get_order(sz));
else
kfree(itt);
@@ -3515,7 +3526,8 @@ static void its_free_device(struct its_device *its_dev)
kfree(its_dev->event_map.col_map);
if (of_machine_is_compatible("rockchip,rk3568") ||
- of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
free_pages((unsigned long)its_dev->itt, get_order(its_dev->itt_sz));
else
kfree(its_dev->itt);
@@ -5139,7 +5151,9 @@ static int __init its_probe_one(struct resource *res,
its->numa_node = numa_node;
gfp_flags = GFP_KERNEL | __GFP_ZERO;
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
+ if (of_machine_is_compatible("rockchip,rk3568") ||
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
gfp_flags |= GFP_DMA32;
page = alloc_pages_node(its->numa_node, gfp_flags,
get_order(ITS_CMD_QUEUE_SZ));
@@ -5173,8 +5187,8 @@ static int __init its_probe_one(struct resource *res,
tmp = gits_read_cbaser(its->base + GITS_CBASER);
if (of_machine_is_compatible("rockchip,rk3568") ||
- of_machine_is_compatible("rockchip,rk3566") ||
- of_machine_is_compatible("rockchip,rk3588"))
+ of_machine_is_compatible("rockchip,rk3566") ||
+ of_machine_is_compatible("rockchip,rk3588"))
tmp &= ~GITS_CBASER_SHAREABILITY_MASK;
if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) {