37 }
while ((!waitack) && (
retry++ < 1000));
53 }
while ((waitack) && (
retry++ < 1000));
86 }
while (
retry++ < 100);
132 for (i = 0; i < size; i += 4)
142 u32 i, data, len = 0;
163 switch (data & 0x03) {
165 boot_address = 0x44000000;
169 boot_address = 0x48000000;
172 boot_address = 0x50000000;
175 boot_address = 0x60000000;
178 boot_address -= 0x200000;
181 for (i = 0; i < len; i += 4) {
182 data = *(
u32 *)(fw_addr + i);
209 u8 linkcap[4], linkrate, linklanes, maxclk = 0xff;
216 if ((data & 0xf0) != 0x10)
222 if (linkcap[2] == 0) {
223 linkrate = linkcap[0];
224 linklanes = linkcap[1];
225 data = (linkrate == 0x0a) ? (90 * linklanes) : (54 * linklanes);
243 if ((data & 0xf0) != 0x10)
254 for (i = 0; i < 128; i += 4) {
256 *(
u32 *)(ediddata + i) = data;
267 ast_write32(
ast, 0xf004, 0x1e6e0000);
268 ast_write32(
ast, 0xf000, 0x1);
269 ast_write32(
ast, 0x12000, 0x1688a8a8);
272 if (!(jreg & 0x80)) {
274 data = ast_read32(
ast, 0x12008);
278 ast_write32(
ast, 0x12008, data);
281 data = ast_read32(
ast, 0x12084);
284 ast_write32(
ast, 0x12084, data);
286 data = ast_read32(
ast, 0x12088);
289 ast_write32(
ast, 0x12088, data);
291 data = ast_read32(
ast, 0x12090);
295 ast_write32(
ast, 0x12090, data);
297 data = ast_read32(
ast, 0x12088);
300 ast_write32(
ast, 0x12088, data);
302 data = ast_read32(
ast, 0x1208c);
305 ast_write32(
ast, 0x1208c, data);
307 data = ast_read32(
ast, 0x120a4);
310 ast_write32(
ast, 0x120a4, data);
312 data = ast_read32(
ast, 0x120a8);
315 ast_write32(
ast, 0x120a8, data);
317 data = ast_read32(
ast, 0x12094);
320 ast_write32(
ast, 0x12094, data);
325 data = ast_read32(
ast, 0x1202c);
327 ast_write32(
ast, 0x1202c, data);
344 ast_write32(
ast, 0xf004, 0x1e6e0000);
345 ast_write32(
ast, 0xf000, 0x1);
348 ast_write32(
ast, 0x12000, 0x1688a8a8);
349 ast_write32(
ast, 0x12000, 0x1688a8a8);
350 ast_write32(
ast, 0x12000, 0x1688a8a8);
353 data = ast_read32(
ast, 0x1202c);
355 ast_write32(
ast, 0, data);
368 switch (jreg & 0x0e) {
static void msleep(unsigned int msecs)
static void set_cmd_trigger(struct ast_private *ast)
static bool ast_launch_m68k(struct drm_device *dev)
static bool ast_write_cmd(struct drm_device *dev, u8 data)
void ast_init_3rdtx(struct drm_device *dev)
static bool ast_init_dvo(struct drm_device *dev)
bool ast_dp501_read_edid(struct drm_device *dev, u8 *ediddata)
static u32 get_fw_base(struct ast_private *ast)
static void send_ack(struct ast_private *ast)
static void ast_init_analog(struct drm_device *dev)
static bool ast_write_data(struct drm_device *dev, u8 data)
static bool wait_ack(struct ast_private *ast)
static void send_nack(struct ast_private *ast)
static bool wait_nack(struct ast_private *ast)
void ast_set_dp501_video_output(struct drm_device *dev, u8 mode)
bool ast_backup_fw(struct drm_device *dev, u8 *addr, u32 size)
u8 ast_get_dp501_max_clk(struct drm_device *dev)
static void clear_cmd_trigger(struct ast_private *ast)
uint8_t ast_get_index_reg_mask(struct ast_private *ast, uint32_t base, uint8_t index, uint8_t mask)
void ast_set_index_reg_mask(struct ast_private *ast, uint32_t base, uint8_t index, uint8_t mask, uint8_t val)
void ast_moutdwm(struct ast_private *ast, u32 r, u32 v)
static void ast_set_index_reg(struct ast_private *ast, uint32_t base, uint8_t index, uint8_t val)
u32 ast_mindwm(struct ast_private *ast, u32 r)
static struct ast_private * ast
#define retry(attempts, condition,...)
const struct firmware * dp501_fw
enum ast_tx_chip tx_chip_type