mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
rdma: fixed issure of crash on boot.
PD#149681: removed the operation of registers in the rdma_init Change-Id: Iecf12be123952d0a5eb91b77e433d3fb67378d4e Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
This commit is contained in:
@@ -47,7 +47,6 @@
|
||||
#define Wr_reg_bits(adr, val, start, len) \
|
||||
WRITE_VCBUS_REG_BITS(adr, val, start, len)
|
||||
|
||||
#define RDMA_TABLE_SIZE (8 * (PAGE_SIZE))
|
||||
static int vsync_rdma_handle;
|
||||
static int irq_count;
|
||||
static int enable;
|
||||
@@ -246,14 +245,21 @@ void enable_rdma(int enable_flag)
|
||||
}
|
||||
EXPORT_SYMBOL(enable_rdma);
|
||||
|
||||
struct rdma_op_s *get_rdma_ops(void)
|
||||
{
|
||||
return &vsync_rdma_op;
|
||||
}
|
||||
|
||||
void set_rdma_handle(int handle)
|
||||
{
|
||||
vsync_rdma_handle = handle;
|
||||
pr_info("%s video rdma handle = %d.\n", __func__,
|
||||
vsync_rdma_handle);
|
||||
}
|
||||
|
||||
static int __init rdma_init(void)
|
||||
|
||||
{
|
||||
vsync_rdma_handle =
|
||||
rdma_register(&vsync_rdma_op,
|
||||
NULL, RDMA_TABLE_SIZE);
|
||||
pr_info("%s video rdma handle = %d.\n", __func__,
|
||||
vsync_rdma_handle);
|
||||
cur_enable = 0;
|
||||
enable = 1;
|
||||
force_rdma_config = 1;
|
||||
|
||||
@@ -25,4 +25,7 @@ void enable_rdma_log(int flag);
|
||||
void enable_rdma(int enable_flag);
|
||||
extern int rdma_watchdog_setting(int flag);
|
||||
int rdma_init2(void);
|
||||
struct rdma_op_s *get_rdma_ops(void);
|
||||
void set_rdma_handle(int handle);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <linux/amlogic/media/utils/vdec_reg.h>
|
||||
#include <linux/amlogic/media/rdma/rdma_mgr.h>
|
||||
#include "rdma.h"
|
||||
|
||||
#define DRIVER_NAME "amlogic-rdma"
|
||||
#define MODULE_NAME "amlogic-rdma"
|
||||
@@ -67,6 +68,8 @@ static int rdma_force_reset = -1;
|
||||
static u16 trace_reg;
|
||||
|
||||
#define RDMA_NUM 8
|
||||
#define RDMA_TABLE_SIZE (8 * (PAGE_SIZE))
|
||||
|
||||
struct rdma_regadr_s {
|
||||
u32 rdma_ahb_start_addr;
|
||||
u32 rdma_ahb_end_addr;
|
||||
@@ -762,6 +765,7 @@ static int rdma_probe(struct platform_device *pdev)
|
||||
int i;
|
||||
u32 data32;
|
||||
int int_rdma;
|
||||
int handle;
|
||||
struct rdma_device_info *info = &rdma_info;
|
||||
|
||||
int_rdma = platform_get_irq_byname(pdev, "rdma");
|
||||
@@ -809,6 +813,10 @@ static int rdma_probe(struct platform_device *pdev)
|
||||
WRITE_VCBUS_REG(RDMA_CTRL, data32);
|
||||
|
||||
info->rdma_dev = pdev;
|
||||
|
||||
handle = rdma_register(get_rdma_ops(), NULL, RDMA_TABLE_SIZE);
|
||||
set_rdma_handle(handle);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user