![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include "aspeed_coreboot.h"
Go to the source code of this file.
Data Structures | |
struct | ast_private |
struct | ast_vbios_stdtable |
struct | ast_vbios_enhtable |
struct | ast_vbios_dclk_info |
struct | ast_vbios_mode_info |
struct | drm_display_mode |
struct | drm_format |
struct | drm_framebuffer |
struct | drm_primary |
struct | drm_crtc |
struct | drm_connector |
Enumerations | |
enum | ast_chip { AST2000 , AST2100 , AST1100 , AST2200 , AST2150 , AST2300 , AST2400 , AST2500 , AST1180 } |
enum | ast_tx_chip { AST_TX_NONE , AST_TX_SIL164 , AST_TX_ITE66121 , AST_TX_DP501 } |
enum | drm_mode_status { MODE_NOMODE , MODE_OK } |
#define __ast_io_read | ( | x | ) |
#define __ast_io_write | ( | x | ) |
#define __ast_read | ( | x | ) |
#define __ast_write | ( | x | ) |
#define AST_HWC_SIZE (AST_MAX_HWC_WIDTH*AST_MAX_HWC_HEIGHT*2) |
#define AST_MM_ALIGN_MASK ((1 << AST_MM_ALIGN_SHIFT) - 1) |
#define AST_VIDMEM_DEFAULT_SIZE AST_VIDMEM_SIZE_8M |
#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT) |
enum ast_chip |
enum ast_tx_chip |
enum drm_mode_status |
__ast_io_read | ( | 16 | ) |
__ast_io_read | ( | 32 | ) |
__ast_io_write | ( | 16 | ) |
__ast_io_write | ( | 8 | ) |
__ast_read | ( | 16 | ) |
__ast_read | ( | 32 | ) |
__ast_read | ( | 8 | ) |
__ast_write | ( | 16 | ) |
__ast_write | ( | 32 | ) |
__ast_write | ( | 8 | ) |
bool ast_backup_fw | ( | struct drm_device * | dev, |
u8 * | addr, | ||
u32 | size | ||
) |
Definition at line 123 of file ast_dp501.c.
References addr, ast, ast_mindwm(), ast_private::dev, drm_device::dev_private, and get_fw_base().
Referenced by ast_detect_chip().
int ast_crtc_do_set_base | ( | struct drm_crtc * | crtc | ) |
Definition at line 19 of file ast_mode_corebootfb.c.
References ast, ast_set_offset_reg(), ast_set_start_address_crt1(), BIOS_ERR, drm_crtc::dev, dev_err, drm_device::dev_private, EIO, ENOMEM, drm_primary::fb, drm_framebuffer::mmio_addr, drm_crtc::mode, PCI_BASE_ADDRESS_0, drm_device::pdev, drm_framebuffer::pitches, drm_crtc::primary, printk, probe_resource(), res2mmio(), resource::size, and drm_display_mode::vdisplay.
Referenced by ast_crtc_mode_set().
int ast_crtc_mode_set | ( | struct drm_crtc * | crtc, |
struct drm_display_mode * | mode, | ||
struct drm_display_mode * | adjusted_mode | ||
) |
Definition at line 462 of file ast_mode.c.
References ast, AST1180, ast_crtc_do_set_base(), ast_crtc_load_lut(), ast_get_vbios_mode_info(), AST_IO_CRTC_PORT, AST_IO_SEQ_PORT, ast_open_key(), ast_set_crtc_reg(), ast_set_dclk_reg(), ast_set_dp501_video_output(), ast_set_ext_reg(), ast_set_index_reg_mask(), ast_set_offset_reg(), ast_set_std_reg(), ast_set_sync_reg(), AST_TX_DP501, ast_private::chip, drm_crtc::dev, dev_err, drm_device::dev_private, EINVAL, drm_device::pdev, and ast_private::tx_chip_type.
Referenced by ast_driver_framebuffer_init().
bool ast_dp501_read_edid | ( | struct drm_device * | dev, |
u8 * | ediddata | ||
) |
Definition at line 233 of file ast_dp501.c.
References ast, ast_mindwm(), ast_private::dev, drm_device::dev_private, get_fw_base(), and offset.
Referenced by ast_select_mode().
int ast_driver_framebuffer_init | ( | struct drm_device * | dev, |
int | flags | ||
) |
Definition at line 175 of file ast_mode_corebootfb.c.
References ALIGN_UP, ast_crtc_mode_set(), ast_edid_to_drmmode(), ast_hide_cursor(), ast_select_mode(), BIOS_DEBUG, edid::bytes_per_line, drm_format::cpp, drm_crtc::dev, drm_connector::dev, dev_err, drm_primary::fb, fb_new_framebuffer_info_from_edid(), drm_framebuffer::format, edid::framebuffer_bits_per_pixel, edid_mode::ha, memcpy(), memset(), drm_framebuffer::mmio_addr, drm_crtc::mode, edid::mode, drm_device::pdev, drm_framebuffer::pitches, drm_crtc::primary, printk, edid_mode::va, edid::x_resolution, and edid::y_resolution.
int ast_driver_load | ( | struct drm_device * | dev, |
unsigned long | flags | ||
) |
Definition at line 380 of file ast_main.c.
References ast, AST1180, ast_detect_chip(), ast_get_dram_info(), ast_get_vram_info(), AST_IO_MM_OFFSET, ast_post_gpu(), ast_private::chip, ast_private::dev, dev_err, drm_device::dev_private, ast_private::dram_bus_width, ast_private::dram_type, DRM_INFO, EIO, ENOMEM, resource::flags, GFP_KERNEL, ast_private::io_space_uses_mmap, ast_private::ioregs, IORESOURCE_IO, kfree, kzalloc(), ast_private::mclk, NULL, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_2, drm_device::pdev, probe_resource(), ast_private::regs, res2mmio(), and ast_private::vram_size.
int ast_driver_unload | ( | struct drm_device * | dev | ) |
void ast_enable_mmio | ( | struct drm_device * | dev | ) |
Definition at line 22 of file ast_post.c.
References ast, AST_IO_CRTC_PORT, ast_set_index_reg_mask(), ast_private::dev, and drm_device::dev_private.
Referenced by ast_detect_chip(), and ast_post_gpu().
void ast_enable_vga | ( | struct drm_device * | dev | ) |
Definition at line 14 of file ast_post.c.
References ast, AST_IO_MISC_PORT_WRITE, AST_IO_VGA_ENABLE_PORT, ast_private::dev, and drm_device::dev_private.
Referenced by ast_detect_chip(), and ast_post_gpu().
u8 ast_get_dp501_max_clk | ( | struct drm_device * | dev | ) |
Definition at line 205 of file ast_dp501.c.
References ast, ast_mindwm(), ast_private::dev, drm_device::dev_private, get_fw_base(), and offset.
Referenced by ast_select_mode().
uint8_t ast_get_index_reg | ( | struct ast_private * | ast, |
uint32_t | base, | ||
uint8_t | index | ||
) |
Definition at line 21 of file ast_main.c.
uint8_t ast_get_index_reg_mask | ( | struct ast_private * | ast, |
uint32_t | base, | ||
uint8_t | index, | ||
uint8_t | mask | ||
) |
Definition at line 30 of file ast_main.c.
References ast, base, and mask.
Referenced by ast_detect_chip(), ast_detect_config_mode(), ast_get_vram_info(), ast_init_3rdtx(), ast_init_dram_reg(), ast_init_dvo(), ast_launch_m68k(), ast_post_chip_2300(), ast_post_chip_2500(), send_ack(), send_nack(), set_clock(), wait_ack(), and wait_nack().
Definition at line 456 of file ast_mode.c.
References ast, AST_IO_CRTC_PORT, ast_set_index_reg_mask(), drm_crtc::dev, and drm_device::dev_private.
Referenced by ast_driver_framebuffer_init().
void ast_init_3rdtx | ( | struct drm_device * | dev | ) |
Definition at line 361 of file ast_dp501.c.
References ast, AST2300, AST2400, ast_get_index_reg_mask(), ast_init_analog(), ast_init_dvo(), AST_IO_CRTC_PORT, ast_launch_m68k(), AST_TX_SIL164, ast_private::chip, ast_private::dev, drm_device::dev_private, and ast_private::tx_chip_type.
Referenced by ast_post_gpu().
bool ast_is_vga_enabled | ( | struct drm_device * | dev | ) |
Definition at line 29 of file ast_post.c.
References ast, AST1180, AST_IO_VGA_ENABLE_PORT, ch, ast_private::chip, ast_private::dev, and drm_device::dev_private.
Referenced by ast_detect_chip().
u32 ast_mindwm | ( | struct ast_private * | ast, |
u32 | r | ||
) |
Definition at line 93 of file ast_post.c.
References ast, COREBOOT_AST_FAILOVER_TIMEOUT, ast_private::dev, dev_err, and drm_device::pdev.
Referenced by ast_backup_fw(), ast_dp501_read_edid(), ast_dram_init_2500(), ast_get_dp501_max_clk(), ast_launch_m68k(), ast_post_chip_2300(), ast_post_chip_2500(), cbr_dll2(), check_dram_size_2500(), ddr2_init(), ddr3_init(), ddr4_init_2500(), ddr_phy_init_2500(), enable_cache_2500(), finetuneDQSI(), get_ddr2_info(), get_ddr3_info(), get_fw_base(), mmc_test(), mmc_test2(), mmctestburst2_ast2150(), and set_mpll_2500().
enum drm_mode_status ast_mode_valid | ( | struct drm_connector * | connector, |
const unsigned int | hdisplay, | ||
const unsigned int | vdisplay | ||
) |
Definition at line 462 of file ast_mode.c.
Referenced by ast_select_mode().
void ast_moutdwm | ( | struct ast_private * | ast, |
u32 | r, | ||
u32 | v | ||
) |
Definition at line 111 of file ast_post.c.
References ast, COREBOOT_AST_FAILOVER_TIMEOUT, ast_private::dev, dev_err, and drm_device::pdev.
Referenced by ast_dram_init_2500(), ast_launch_m68k(), ast_post_chip_2300(), ast_post_chip_2500(), cbr_dll2(), cbr_scan(), cbr_scan2(), cbr_scan3(), cbr_test_2500(), cbrdlli_ast2150(), cbrscan_ast2150(), check_dram_size_2500(), ddr2_init(), ddr3_init(), ddr3_init_2500(), ddr4_init_2500(), ddr_init_common_2500(), ddr_phy_init_2500(), ddr_test_2500(), enable_cache_2500(), finetuneDQI_L(), finetuneDQSI(), get_ddr2_info(), get_ddr3_info(), mmc_test(), mmc_test2(), mmctestburst2_ast2150(), reset_mmc_2500(), and set_mpll_2500().
|
inlinestatic |
Definition at line 156 of file ast_drv.h.
References ast, AST_IO_CRTC_PORT, and ast_set_index_reg().
Referenced by ast_crtc_mode_set(), ast_detect_chip(), ast_get_vram_info(), and ast_post_gpu().
void ast_post_gpu | ( | struct drm_device * | dev | ) |
Definition at line 356 of file ast_post.c.
References ast, AST2300, AST2400, AST2500, ast_enable_mmio(), ast_enable_vga(), ast_init_3rdtx(), ast_init_dram_reg(), AST_IO_CRTC_PORT, ast_open_key(), ast_post_chip_2300(), ast_post_chip_2500(), ast_set_def_ext_reg(), ast_set_index_reg_mask(), AST_TX_NONE, ast_private::ast_use_p2a, ast_private::chip, ast_private::config_mode, ast_private::dev, drm_device::dev_private, pci_read_config_dword(), pci_write_config_dword(), drm_device::pdev, and ast_private::tx_chip_type.
Referenced by ast_driver_load().
void ast_release_firmware | ( | struct drm_device * | dev | ) |
void ast_set_dp501_video_output | ( | struct drm_device * | dev, |
u8 | mode | ||
) |
Definition at line 110 of file ast_dp501.c.
References ast_write_cmd(), ast_write_data(), ast_private::dev, and msleep().
Referenced by ast_crtc_mode_set().
|
inlinestatic |
Definition at line 141 of file ast_drv.h.
References ast, base, and val.
Referenced by ast_get_vbios_mode_info(), ast_launch_m68k(), ast_open_key(), ast_set_def_ext_reg(), ast_set_ext_reg(), ast_set_index_reg_mask(), ast_set_offset_reg(), ast_set_start_address_crt1(), and ast_set_std_reg().
void ast_set_index_reg_mask | ( | struct ast_private * | ast, |
uint32_t | base, | ||
uint8_t | index, | ||
uint8_t | mask, | ||
uint8_t | val | ||
) |
Definition at line 11 of file ast_main.c.
References ast, ast_set_index_reg(), base, mask, and val.
Referenced by ast_crtc_mode_set(), ast_enable_mmio(), ast_hide_cursor(), ast_init_analog(), ast_init_dvo(), ast_post_gpu(), ast_set_crtc_reg(), ast_set_dclk_reg(), ast_set_def_ext_reg(), ast_set_ext_reg(), ast_set_std_reg(), ast_write_cmd(), ast_write_data(), clear_cmd_trigger(), send_ack(), send_nack(), set_clock(), and set_cmd_trigger().
Definition at line 353 of file ast_mode.c.
References ast, AST_IO_CRTC_PORT, ast_set_index_reg(), drm_crtc::dev, drm_device::dev_private, drm_primary::fb, offset, drm_framebuffer::pitches, and drm_crtc::primary.
Referenced by ast_crtc_do_set_base(), and ast_crtc_mode_set().
void ast_set_start_address_crt1 | ( | struct ast_private * | ast, |
u32 | offset | ||
) |
Definition at line 446 of file ast_mode.c.
References addr, ast, AST_IO_CRTC_PORT, ast_set_index_reg(), and offset.
Referenced by ast_crtc_do_set_base().
int ast_software_i2c_read | ( | struct ast_private * | ast_priv, |
uint8_t | edid[128] | ||
) |
Definition at line 90 of file ast_i2c.c.
References ASPEED_BUS, ast, ast_ops, i2c_read_bytes(), set_clock(), set_data(), software_i2c, and udelay().
Referenced by ast_select_mode().