| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2008 |
|---|
| 3 | 4 | * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 512 | 509 | uint16_t h_start_width, uint16_t h_sync_width, |
|---|
| 513 | 510 | uint16_t h_end_width, uint16_t v_start_width, |
|---|
| 514 | 511 | uint16_t v_sync_width, uint16_t v_end_width, |
|---|
| 515 | | - struct ipu_di_signal_cfg sig) |
|---|
| 512 | + const struct ipu_di_signal_cfg *sig) |
|---|
| 516 | 513 | { |
|---|
| 517 | 514 | unsigned long lock_flags; |
|---|
| 518 | 515 | uint32_t reg; |
|---|
| .. | .. |
|---|
| 594 | 591 | |
|---|
| 595 | 592 | /* DI settings */ |
|---|
| 596 | 593 | old_conf = mx3fb_read_reg(mx3fb, DI_DISP_IF_CONF) & 0x78FFFFFF; |
|---|
| 597 | | - old_conf |= sig.datamask_en << DI_D3_DATAMSK_SHIFT | |
|---|
| 598 | | - sig.clksel_en << DI_D3_CLK_SEL_SHIFT | |
|---|
| 599 | | - sig.clkidle_en << DI_D3_CLK_IDLE_SHIFT; |
|---|
| 594 | + old_conf |= sig->datamask_en << DI_D3_DATAMSK_SHIFT | |
|---|
| 595 | + sig->clksel_en << DI_D3_CLK_SEL_SHIFT | |
|---|
| 596 | + sig->clkidle_en << DI_D3_CLK_IDLE_SHIFT; |
|---|
| 600 | 597 | mx3fb_write_reg(mx3fb, old_conf, DI_DISP_IF_CONF); |
|---|
| 601 | 598 | |
|---|
| 602 | 599 | old_conf = mx3fb_read_reg(mx3fb, DI_DISP_SIG_POL) & 0xE0FFFFFF; |
|---|
| 603 | | - old_conf |= sig.data_pol << DI_D3_DATA_POL_SHIFT | |
|---|
| 604 | | - sig.clk_pol << DI_D3_CLK_POL_SHIFT | |
|---|
| 605 | | - sig.enable_pol << DI_D3_DRDY_SHARP_POL_SHIFT | |
|---|
| 606 | | - sig.Hsync_pol << DI_D3_HSYNC_POL_SHIFT | |
|---|
| 607 | | - sig.Vsync_pol << DI_D3_VSYNC_POL_SHIFT; |
|---|
| 600 | + old_conf |= sig->data_pol << DI_D3_DATA_POL_SHIFT | |
|---|
| 601 | + sig->clk_pol << DI_D3_CLK_POL_SHIFT | |
|---|
| 602 | + sig->enable_pol << DI_D3_DRDY_SHARP_POL_SHIFT | |
|---|
| 603 | + sig->Hsync_pol << DI_D3_HSYNC_POL_SHIFT | |
|---|
| 604 | + sig->Vsync_pol << DI_D3_VSYNC_POL_SHIFT; |
|---|
| 608 | 605 | mx3fb_write_reg(mx3fb, old_conf, DI_DISP_SIG_POL); |
|---|
| 609 | 606 | |
|---|
| 610 | 607 | map = &di_mappings[mx3fb->disp_data_fmt]; |
|---|
| .. | .. |
|---|
| 858 | 855 | fbi->var.upper_margin, |
|---|
| 859 | 856 | fbi->var.vsync_len, |
|---|
| 860 | 857 | fbi->var.lower_margin + |
|---|
| 861 | | - fbi->var.vsync_len, sig_cfg) != 0) { |
|---|
| 858 | + fbi->var.vsync_len, &sig_cfg) != 0) { |
|---|
| 862 | 859 | dev_err(fbi->device, |
|---|
| 863 | 860 | "mx3fb: Error initializing panel.\n"); |
|---|
| 864 | 861 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 1252 | 1249 | * invoked by the core framebuffer driver to perform operations like |
|---|
| 1253 | 1250 | * blitting, rectangle filling, copy regions and cursor definition. |
|---|
| 1254 | 1251 | */ |
|---|
| 1255 | | -static struct fb_ops mx3fb_ops = { |
|---|
| 1252 | +static const struct fb_ops mx3fb_ops = { |
|---|
| 1256 | 1253 | .owner = THIS_MODULE, |
|---|
| 1257 | 1254 | .fb_set_par = mx3fb_set_par, |
|---|
| 1258 | 1255 | .fb_check_var = mx3fb_check_var, |
|---|
| .. | .. |
|---|
| 1392 | 1389 | * mx3fb_init_fbinfo() - initialize framebuffer information object. |
|---|
| 1393 | 1390 | * @return: initialized framebuffer structure. |
|---|
| 1394 | 1391 | */ |
|---|
| 1395 | | -static struct fb_info *mx3fb_init_fbinfo(struct device *dev, struct fb_ops *ops) |
|---|
| 1392 | +static struct fb_info *mx3fb_init_fbinfo(struct device *dev, |
|---|
| 1393 | + const struct fb_ops *ops) |
|---|
| 1396 | 1394 | { |
|---|
| 1397 | 1395 | struct fb_info *fbi; |
|---|
| 1398 | 1396 | struct mx3fb_info *mx3fbi; |
|---|