Lines Matching +full:meson +full:- +full:gxbb +full:- +full:reset
1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Amlogic Meson Reset Controller driver
13 #include <linux/reset-controller.h>
39 void __iomem *reg_addr = data->reg_base + (bank << 2); in meson_reset_reset()
57 reg_addr = data->reg_base + data->param->level_offset + (bank << 2); in meson_reset_level()
59 spin_lock_irqsave(&data->lock, flags); in meson_reset_level()
67 spin_unlock_irqrestore(&data->lock, flags); in meson_reset_level()
85 .reset = meson_reset_reset,
101 { .compatible = "amlogic,meson8b-reset", .data = &meson8b_param},
102 { .compatible = "amlogic,meson-gxbb-reset", .data = &meson8b_param},
103 { .compatible = "amlogic,meson-axg-reset", .data = &meson8b_param},
104 { .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param},
113 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); in meson_reset_probe()
115 return -ENOMEM; in meson_reset_probe()
118 data->reg_base = devm_ioremap_resource(&pdev->dev, res); in meson_reset_probe()
119 if (IS_ERR(data->reg_base)) in meson_reset_probe()
120 return PTR_ERR(data->reg_base); in meson_reset_probe()
122 data->param = of_device_get_match_data(&pdev->dev); in meson_reset_probe()
123 if (!data->param) in meson_reset_probe()
124 return -ENODEV; in meson_reset_probe()
128 spin_lock_init(&data->lock); in meson_reset_probe()
130 data->rcdev.owner = THIS_MODULE; in meson_reset_probe()
131 data->rcdev.nr_resets = data->param->reg_count * BITS_PER_REG; in meson_reset_probe()
132 data->rcdev.ops = &meson_reset_ops; in meson_reset_probe()
133 data->rcdev.of_node = pdev->dev.of_node; in meson_reset_probe()
135 return devm_reset_controller_register(&pdev->dev, &data->rcdev); in meson_reset_probe()