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
14 #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,
111 { .compatible = "amlogic,meson8b-reset", .data = &meson8b_param},
112 { .compatible = "amlogic,meson-gxbb-reset", .data = &meson8b_param},
113 { .compatible = "amlogic,meson-axg-reset", .data = &meson8b_param},
114 { .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param},
115 { .compatible = "amlogic,meson-s4-reset", .data = &meson_s4_param},
116 { .compatible = "amlogic,c3-reset", .data = &meson_s4_param},
117 { .compatible = "amlogic,t7-reset", .data = &t7_param},
126 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); in meson_reset_probe()
128 return -ENOMEM; in meson_reset_probe()
130 data->reg_base = devm_platform_ioremap_resource(pdev, 0); in meson_reset_probe()
131 if (IS_ERR(data->reg_base)) in meson_reset_probe()
132 return PTR_ERR(data->reg_base); in meson_reset_probe()
134 data->param = of_device_get_match_data(&pdev->dev); in meson_reset_probe()
135 if (!data->param) in meson_reset_probe()
136 return -ENODEV; in meson_reset_probe()
138 spin_lock_init(&data->lock); in meson_reset_probe()
140 data->rcdev.owner = THIS_MODULE; in meson_reset_probe()
141 data->rcdev.nr_resets = data->param->reg_count * BITS_PER_REG; in meson_reset_probe()
142 data->rcdev.ops = &meson_reset_ops; in meson_reset_probe()
143 data->rcdev.of_node = pdev->dev.of_node; in meson_reset_probe()
145 return devm_reset_controller_register(&pdev->dev, &data->rcdev); in meson_reset_probe()
157 MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");