Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/versatile/versatile_clcd.c
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | |||||
static struct video_adapter_softc va_softc; | static struct video_adapter_softc va_softc; | ||||
static struct resource_spec versatile_clcdc_mem_spec[] = { | static struct resource_spec versatile_clcdc_mem_spec[] = { | ||||
{ SYS_RES_MEMORY, 0, RF_ACTIVE }, | { SYS_RES_MEMORY, 0, RF_ACTIVE }, | ||||
{ SYS_RES_MEMORY, 1, RF_ACTIVE }, | { SYS_RES_MEMORY, 1, RF_ACTIVE }, | ||||
{ -1, 0, 0 } | { -1, 0, 0 } | ||||
}; | }; | ||||
static struct ofw_compat_data compat_data[] = { | |||||
{"arm,pl110", 1}, | |||||
}; | |||||
static int versatilefb_configure(int); | static int versatilefb_configure(int); | ||||
static void versatilefb_update_margins(video_adapter_t *adp); | static void versatilefb_update_margins(video_adapter_t *adp); | ||||
static void | static void | ||||
versatile_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) | versatile_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) | ||||
{ | { | ||||
bus_addr_t *addr; | bus_addr_t *addr; | ||||
if (err) | if (err) | ||||
return; | return; | ||||
addr = (bus_addr_t*)arg; | addr = (bus_addr_t*)arg; | ||||
*addr = segs[0].ds_addr; | *addr = segs[0].ds_addr; | ||||
} | } | ||||
static int | static int | ||||
versatile_clcdc_probe(device_t dev) | versatile_clcdc_probe(device_t dev) | ||||
{ | { | ||||
if (!ofw_bus_status_okay(dev)) | if (!ofw_bus_status_okay(dev)) | ||||
return (ENXIO); | return (ENXIO); | ||||
if (ofw_bus_is_compatible(dev, "arm,pl110")) { | if (ofw_bus_compatible_lookup(dev, compat_data)) { | ||||
device_set_desc(dev, "PL110 CLCD controller"); | device_set_desc(dev, "PL110 CLCD controller"); | ||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | } | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | static driver_t versatile_clcdc_driver = { | ||||
"clcdc", | "clcdc", | ||||
versatile_clcdc_methods, | versatile_clcdc_methods, | ||||
sizeof(struct versatile_clcdc_softc), | sizeof(struct versatile_clcdc_softc), | ||||
}; | }; | ||||
static devclass_t versatile_clcdc_devclass; | static devclass_t versatile_clcdc_devclass; | ||||
DRIVER_MODULE(versatile_clcdc, simplebus, versatile_clcdc_driver, versatile_clcdc_devclass, 0, 0); | DRIVER_MODULE(versatile_clcdc, simplebus, versatile_clcdc_driver, versatile_clcdc_devclass, 0, 0); | ||||
SIMPLEBUS_PNP_INFO(compat_data); | |||||
/* | /* | ||||
* Video driver routines and glue. | * Video driver routines and glue. | ||||
*/ | */ | ||||
static vi_probe_t versatilefb_probe; | static vi_probe_t versatilefb_probe; | ||||
static vi_init_t versatilefb_init; | static vi_init_t versatilefb_init; | ||||
static vi_get_info_t versatilefb_get_info; | static vi_get_info_t versatilefb_get_info; | ||||
static vi_query_mode_t versatilefb_query_mode; | static vi_query_mode_t versatilefb_query_mode; | ||||
▲ Show 20 Lines • Show All 565 Lines • Show Last 20 Lines |