clk-stm32mp13.c (1ac731c529cd4d6adbce134754b51ff7d822b145) | clk-stm32mp13.c (30500c2ad9c440d1a81e7a5dac3bcef62e21d910) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) STMicroelectronics 2022 - All Rights Reserved 4 * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics. 5 */ 6 7#include <linux/clk.h> 8#include <linux/module.h> 9#include <linux/of_address.h> 10#include <linux/platform_device.h> 11#include <dt-bindings/clock/stm32mp13-clks.h> 12#include "clk-stm32-core.h" | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) STMicroelectronics 2022 - All Rights Reserved 4 * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics. 5 */ 6 7#include <linux/clk.h> 8#include <linux/module.h> 9#include <linux/of_address.h> 10#include <linux/platform_device.h> 11#include <dt-bindings/clock/stm32mp13-clks.h> 12#include "clk-stm32-core.h" |
13#include "reset-stm32.h" |
|
13#include "stm32mp13_rcc.h" 14 | 14#include "stm32mp13_rcc.h" 15 |
16#define STM32MP1_RESET_ID_MASK GENMASK(15, 0) |
|
15#define RCC_CLR_OFFSET 0x4 16 17/* STM32 Gates definition */ 18enum enum_gate_cfg { 19 GATE_MCO1, 20 GATE_MCO2, 21 GATE_DBGCK, 22 GATE_TRACECK, --- 1483 unchanged lines hidden (view full) --- 1506static struct clk_stm32_clock_data stm32mp13_clock_data = { 1507 .gate_cpt = stm32mp13_cpt_gate, 1508 .gates = stm32mp13_gates, 1509 .muxes = stm32mp13_muxes, 1510 .dividers = stm32mp13_dividers, 1511 .is_multi_mux = stm32mp13_is_multi_mux, 1512}; 1513 | 17#define RCC_CLR_OFFSET 0x4 18 19/* STM32 Gates definition */ 20enum enum_gate_cfg { 21 GATE_MCO1, 22 GATE_MCO2, 23 GATE_DBGCK, 24 GATE_TRACECK, --- 1483 unchanged lines hidden (view full) --- 1508static struct clk_stm32_clock_data stm32mp13_clock_data = { 1509 .gate_cpt = stm32mp13_cpt_gate, 1510 .gates = stm32mp13_gates, 1511 .muxes = stm32mp13_muxes, 1512 .dividers = stm32mp13_dividers, 1513 .is_multi_mux = stm32mp13_is_multi_mux, 1514}; 1515 |
1516static struct clk_stm32_reset_data stm32mp13_reset_data = { 1517 .nr_lines = STM32MP1_RESET_ID_MASK, 1518 .clear_offset = RCC_CLR_OFFSET, 1519}; 1520 |
|
1514static const struct stm32_rcc_match_data stm32mp13_data = { 1515 .tab_clocks = stm32mp13_clock_cfg, 1516 .num_clocks = ARRAY_SIZE(stm32mp13_clock_cfg), 1517 .clock_data = &stm32mp13_clock_data, 1518 .check_security = &stm32mp13_clock_is_provided_by_secure, 1519 .maxbinding = STM32MP1_LAST_CLK, | 1521static const struct stm32_rcc_match_data stm32mp13_data = { 1522 .tab_clocks = stm32mp13_clock_cfg, 1523 .num_clocks = ARRAY_SIZE(stm32mp13_clock_cfg), 1524 .clock_data = &stm32mp13_clock_data, 1525 .check_security = &stm32mp13_clock_is_provided_by_secure, 1526 .maxbinding = STM32MP1_LAST_CLK, |
1520 .clear_offset = RCC_CLR_OFFSET, | 1527 .reset_data = &stm32mp13_reset_data, |
1521}; 1522 1523static const struct of_device_id stm32mp13_match_data[] = { 1524 { 1525 .compatible = "st,stm32mp13-rcc", 1526 .data = &stm32mp13_data, 1527 }, 1528 { } --- 90 unchanged lines hidden --- | 1528}; 1529 1530static const struct of_device_id stm32mp13_match_data[] = { 1531 { 1532 .compatible = "st,stm32mp13-rcc", 1533 .data = &stm32mp13_data, 1534 }, 1535 { } --- 90 unchanged lines hidden --- |