drivers/video/fbdev/omap/sossi.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap/sossi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap/sossi.c- Extension
.c- Size
- 15107 bytes
- Lines
- 684
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/mm.hlinux/clk.hlinux/irq.hlinux/io.hlinux/interrupt.hlinux/omap-dma.hlinux/soc/ti/omap1-io.homapfb.hlcd_dma.hlcdc.h
Detected Declarations
function sossi_read_regfunction sossi_read_reg16function sossi_read_reg8function sossi_write_regfunction sossi_write_reg16function sossi_write_reg8function sossi_set_bitsfunction sossi_clear_bitsfunction ps_to_sossi_ticksfunction calc_rd_timingsfunction calc_wr_timingsfunction _set_timingfunction _set_bits_per_cyclefunction _set_tearsync_modefunction set_timingfunction sossi_start_transferfunction sossi_stop_transferfunction wait_end_of_writefunction send_datafunction set_cyclesfunction sossi_convert_timingsfunction sossi_set_timingsfunction sossi_get_clk_infofunction sossi_set_bits_per_cyclefunction asfunction sossi_setup_tearsyncfunction sossi_enable_tearsyncfunction sossi_write_commandfunction sossi_write_datafunction sossi_transfer_areafunction sossi_dma_callbackfunction sossi_read_datafunction sossi_match_irqfunction sossi_initfunction sossi_cleanup
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* OMAP1 Special OptimiSed Screen Interface support
*
* Copyright (C) 2004-2005 Nokia Corporation
* Author: Juha Yrjölä <juha.yrjola@nokia.com>
*/
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/clk.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/omap-dma.h>
#include <linux/soc/ti/omap1-io.h>
#include "omapfb.h"
#include "lcd_dma.h"
#include "lcdc.h"
#define MODULE_NAME "omapfb-sossi"
#define OMAP_SOSSI_BASE 0xfffbac00
#define SOSSI_ID_REG 0x00
#define SOSSI_INIT1_REG 0x04
#define SOSSI_INIT2_REG 0x08
#define SOSSI_INIT3_REG 0x0c
#define SOSSI_FIFO_REG 0x10
#define SOSSI_REOTABLE_REG 0x14
#define SOSSI_TEARING_REG 0x18
#define SOSSI_INIT1B_REG 0x1c
#define SOSSI_FIFOB_REG 0x20
#define DMA_GSCR 0xfffedc04
#define DMA_LCD_CCR 0xfffee3c2
#define DMA_LCD_CTRL 0xfffee3c4
#define DMA_LCD_LCH_CTRL 0xfffee3ea
#define CONF_SOSSI_RESET_R (1 << 23)
#define RD_ACCESS 0
#define WR_ACCESS 1
#define SOSSI_MAX_XMIT_BYTES (512 * 1024)
static struct {
void __iomem *base;
struct clk *fck;
unsigned long fck_hz;
spinlock_t lock;
int bus_pick_count;
int bus_pick_width;
int tearsync_mode;
int tearsync_line;
void (*lcdc_callback)(void *data);
void *lcdc_callback_data;
int vsync_dma_pending;
/* timing for read and write access */
int clk_div;
u8 clk_tw0[2];
u8 clk_tw1[2];
/*
* if last_access is the same as current we don't have to change
* the timings
*/
int last_access;
struct omapfb_device *fbdev;
} sossi;
static inline u32 sossi_read_reg(int reg)
{
return readl(sossi.base + reg);
}
static inline u16 sossi_read_reg16(int reg)
{
return readw(sossi.base + reg);
}
static inline u8 sossi_read_reg8(int reg)
{
return readb(sossi.base + reg);
}
static inline void sossi_write_reg(int reg, u32 value)
{
writel(value, sossi.base + reg);
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/mm.h`, `linux/clk.h`, `linux/irq.h`, `linux/io.h`, `linux/interrupt.h`, `linux/omap-dma.h`, `linux/soc/ti/omap1-io.h`.
- Detected declarations: `function sossi_read_reg`, `function sossi_read_reg16`, `function sossi_read_reg8`, `function sossi_write_reg`, `function sossi_write_reg16`, `function sossi_write_reg8`, `function sossi_set_bits`, `function sossi_clear_bits`, `function ps_to_sossi_ticks`, `function calc_rd_timings`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.