bt1-apb.c (b19dc1b79993a7e6a2c0aa1725f679bb9ae8ad89) bt1-apb.c (75341b3d358d27f7c22e48bcd92926c49f79e9be)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 *
5 * Authors:
6 * Serge Semin <Sergey.Semin@baikalelectronics.ru>
7 *
8 * Baikal-T1 APB-bus driver

--- 150 unchanged lines hidden (view full) ---

159
160 apb->regs = devm_regmap_init_mmio(apb->dev, regs, &bt1_apb_regmap_cfg);
161 if (IS_ERR(apb->regs)) {
162 dev_err(apb->dev, "Couldn't create APB EHB regmap\n");
163 return PTR_ERR(apb->regs);
164 }
165
166 apb->res = devm_platform_ioremap_resource_byname(pdev, "nodev");
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 *
5 * Authors:
6 * Serge Semin <Sergey.Semin@baikalelectronics.ru>
7 *
8 * Baikal-T1 APB-bus driver

--- 150 unchanged lines hidden (view full) ---

159
160 apb->regs = devm_regmap_init_mmio(apb->dev, regs, &bt1_apb_regmap_cfg);
161 if (IS_ERR(apb->regs)) {
162 dev_err(apb->dev, "Couldn't create APB EHB regmap\n");
163 return PTR_ERR(apb->regs);
164 }
165
166 apb->res = devm_platform_ioremap_resource_byname(pdev, "nodev");
167 if (IS_ERR(apb->res)) {
167 if (IS_ERR(apb->res))
168 dev_err(apb->dev, "Couldn't map reserved region\n");
168 dev_err(apb->dev, "Couldn't map reserved region\n");
169 return PTR_ERR(apb->res);
170 }
171
169
172 return 0;
170 return PTR_ERR_OR_ZERO(apb->res);
173}
174
175static int bt1_apb_request_rst(struct bt1_apb *apb)
176{
177 int ret;
178
179 apb->prst = devm_reset_control_get_optional_exclusive(apb->dev, "prst");
180 if (IS_ERR(apb->prst)) {

--- 243 unchanged lines hidden ---
171}
172
173static int bt1_apb_request_rst(struct bt1_apb *apb)
174{
175 int ret;
176
177 apb->prst = devm_reset_control_get_optional_exclusive(apb->dev, "prst");
178 if (IS_ERR(apb->prst)) {

--- 243 unchanged lines hidden ---