Commit d7c9455a authored by Amarjargal Gundjalam's avatar Amarjargal Gundjalam Committed by Greg Kroah-Hartman

staging/crystalhd: Fixes line over 80 characters warning in crystalhd_misc.*

Fixes the following checkpatch warning
WARNING: line over 80 characters
Signed-off-by: default avatarAmarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ebee9de
...@@ -30,19 +30,22 @@ ...@@ -30,19 +30,22 @@
uint32_t g_linklog_level; uint32_t g_linklog_level;
static inline uint32_t crystalhd_dram_rd(struct crystalhd_adp *adp, uint32_t mem_off) static inline uint32_t crystalhd_dram_rd(struct crystalhd_adp *adp,
uint32_t mem_off)
{ {
crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19)); crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
return bc_dec_reg_rd(adp, (0x00380000 | (mem_off & 0x0007FFFF))); return bc_dec_reg_rd(adp, (0x00380000 | (mem_off & 0x0007FFFF)));
} }
static inline void crystalhd_dram_wr(struct crystalhd_adp *adp, uint32_t mem_off, uint32_t val) static inline void crystalhd_dram_wr(struct crystalhd_adp *adp,
uint32_t mem_off, uint32_t val)
{ {
crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19)); crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
bc_dec_reg_wr(adp, (0x00380000 | (mem_off & 0x0007FFFF)), val); bc_dec_reg_wr(adp, (0x00380000 | (mem_off & 0x0007FFFF)), val);
} }
static inline enum BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp, uint32_t start_off, uint32_t cnt) static inline enum BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp,
uint32_t start_off, uint32_t cnt)
{ {
return BC_STS_SUCCESS; return BC_STS_SUCCESS;
} }
...@@ -66,7 +69,8 @@ static struct crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp) ...@@ -66,7 +69,8 @@ static struct crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp)
return temp; return temp;
} }
static void crystalhd_free_dio(struct crystalhd_adp *adp, struct crystalhd_dio_req *dio) static void crystalhd_free_dio(struct crystalhd_adp *adp,
struct crystalhd_dio_req *dio)
{ {
unsigned long flags = 0; unsigned long flags = 0;
...@@ -99,7 +103,8 @@ static struct crystalhd_elem *crystalhd_alloc_elem(struct crystalhd_adp *adp) ...@@ -99,7 +103,8 @@ static struct crystalhd_elem *crystalhd_alloc_elem(struct crystalhd_adp *adp)
return temp; return temp;
} }
static void crystalhd_free_elem(struct crystalhd_adp *adp, struct crystalhd_elem *elem) static void crystalhd_free_elem(struct crystalhd_adp *adp,
struct crystalhd_elem *elem)
{ {
unsigned long flags = 0; unsigned long flags = 0;
...@@ -120,7 +125,8 @@ static inline void crystalhd_set_sg(struct scatterlist *sg, struct page *page, ...@@ -120,7 +125,8 @@ static inline void crystalhd_set_sg(struct scatterlist *sg, struct page *page,
#endif #endif
} }
static inline void crystalhd_init_sg(struct scatterlist *sg, unsigned int entries) static inline void crystalhd_init_sg(struct scatterlist *sg,
unsigned int entries)
{ {
/* http://lkml.org/lkml/2007/11/27/68 */ /* http://lkml.org/lkml/2007/11/27/68 */
sg_init_table(sg, entries); sg_init_table(sg, entries);
...@@ -208,7 +214,8 @@ uint32_t crystalhd_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off) ...@@ -208,7 +214,8 @@ uint32_t crystalhd_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
* configuration space. * configuration space.
* *
*/ */
void crystalhd_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val) void crystalhd_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off,
uint32_t val)
{ {
if (!adp || (reg_off > adp->pci_i2o_len)) { if (!adp || (reg_off > adp->pci_i2o_len)) {
BCMLOG_ERR("link_wr_reg_off outof range: 0x%08x\n", reg_off); BCMLOG_ERR("link_wr_reg_off outof range: 0x%08x\n", reg_off);
...@@ -469,7 +476,8 @@ enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp, ...@@ -469,7 +476,8 @@ enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp,
* by calling the call back provided during creation. * by calling the call back provided during creation.
* *
*/ */
void crystalhd_delete_dioq(struct crystalhd_adp *adp, struct crystalhd_dioq *dioq) void crystalhd_delete_dioq(struct crystalhd_adp *adp,
struct crystalhd_dioq *dioq)
{ {
void *temp; void *temp;
...@@ -639,7 +647,8 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq, uint32_t to_secs, ...@@ -639,7 +647,8 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq, uint32_t to_secs,
while ((ioq->count == 0) && count) { while ((ioq->count == 0) && count) {
spin_unlock_irqrestore(&ioq->lock, flags); spin_unlock_irqrestore(&ioq->lock, flags);
crystalhd_wait_on_event(&ioq->event, (ioq->count > 0), 1000, rc, 0); crystalhd_wait_on_event(&ioq->event,
(ioq->count > 0), 1000, rc, 0);
if (rc == 0) { if (rc == 0) {
goto out; goto out;
} else if (rc == -EINTR) { } else if (rc == -EINTR) {
...@@ -678,7 +687,8 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff, ...@@ -678,7 +687,8 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
struct crystalhd_dio_req **dio_hnd) struct crystalhd_dio_req **dio_hnd)
{ {
struct crystalhd_dio_req *dio; struct crystalhd_dio_req *dio;
/* FIXME: jarod: should some of these unsigned longs be uint32_t or uintptr_t? */ /* FIXME: jarod: should some of these
unsigned longs be uint32_t or uintptr_t? */
unsigned long start = 0, end = 0, uaddr = 0, count = 0; unsigned long start = 0, end = 0, uaddr = 0, count = 0;
unsigned long spsz = 0, uv_start = 0; unsigned long spsz = 0, uv_start = 0;
int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0; int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0;
...@@ -723,7 +733,8 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff, ...@@ -723,7 +733,8 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
if (uv_offset) { if (uv_offset) {
uv_start = (uaddr + (unsigned long)uv_offset) >> PAGE_SHIFT; uv_start = (uaddr + (unsigned long)uv_offset) >> PAGE_SHIFT;
dio->uinfo.uv_sg_ix = uv_start - start; dio->uinfo.uv_sg_ix = uv_start - start;
dio->uinfo.uv_sg_off = ((uaddr + (unsigned long)uv_offset) & ~PAGE_MASK); dio->uinfo.uv_sg_off = ((uaddr + (unsigned long)uv_offset) &
~PAGE_MASK);
} }
dio->fb_size = ubuff_sz & 0x03; dio->fb_size = ubuff_sz & 0x03;
...@@ -819,7 +830,8 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff, ...@@ -819,7 +830,8 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
* *
* This routine is to unmap the user buffer pages. * This routine is to unmap the user buffer pages.
*/ */
enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, struct crystalhd_dio_req *dio) enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp,
struct crystalhd_dio_req *dio)
{ {
struct page *page = NULL; struct page *page = NULL;
int j = 0; int j = 0;
...@@ -841,7 +853,8 @@ enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, struct crystalhd_d ...@@ -841,7 +853,8 @@ enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, struct crystalhd_d
} }
} }
if (dio->sig == crystalhd_dio_sg_mapped) if (dio->sig == crystalhd_dio_sg_mapped)
pci_unmap_sg(adp->pdev, dio->sg, dio->page_cnt, dio->direction); pci_unmap_sg(adp->pdev, dio->sg, dio->page_cnt,
dio->direction);
crystalhd_free_dio(adp, dio); crystalhd_free_dio(adp, dio);
......
...@@ -127,12 +127,16 @@ uint32_t crystalhd_reg_rd(struct crystalhd_adp *, uint32_t); ...@@ -127,12 +127,16 @@ uint32_t crystalhd_reg_rd(struct crystalhd_adp *, uint32_t);
void crystalhd_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t); void crystalhd_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t);
/*========= Decoder (7412) memory access routines..=================*/ /*========= Decoder (7412) memory access routines..=================*/
enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *); enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *,
enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *); uint32_t, uint32_t, uint32_t *);
enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *,
uint32_t, uint32_t, uint32_t *);
/*==========Link (70012) PCIe Config access routines.================*/ /*==========Link (70012) PCIe Config access routines.================*/
enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *); enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *,
enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t); uint32_t, uint32_t, uint32_t *);
enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *,
uint32_t, uint32_t, uint32_t);
/*========= Linux Kernel Interface routines. ======================= */ /*========= Linux Kernel Interface routines. ======================= */
void *bc_kern_dma_alloc(struct crystalhd_adp *, uint32_t, dma_addr_t *); void *bc_kern_dma_alloc(struct crystalhd_adp *, uint32_t, dma_addr_t *);
...@@ -168,20 +172,26 @@ do { \ ...@@ -168,20 +172,26 @@ do { \
/*================ Direct IO mapping routines ==================*/ /*================ Direct IO mapping routines ==================*/
extern int crystalhd_create_dio_pool(struct crystalhd_adp *, uint32_t); extern int crystalhd_create_dio_pool(struct crystalhd_adp *, uint32_t);
extern void crystalhd_destroy_dio_pool(struct crystalhd_adp *); extern void crystalhd_destroy_dio_pool(struct crystalhd_adp *);
extern enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *, void *, uint32_t, extern enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *, void *,
uint32_t, bool, bool, struct crystalhd_dio_req**); uint32_t, uint32_t, bool, bool, struct crystalhd_dio_req**);
extern enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *, struct crystalhd_dio_req*); extern enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *,
struct crystalhd_dio_req*);
#define crystalhd_get_sgle_paddr(_dio, _ix) (cpu_to_le64(sg_dma_address(&_dio->sg[_ix]))) #define crystalhd_get_sgle_paddr(_dio, _ix) (cpu_to_le64(sg_dma_address(&_dio->sg[_ix])))
#define crystalhd_get_sgle_len(_dio, _ix) (cpu_to_le32(sg_dma_len(&_dio->sg[_ix]))) #define crystalhd_get_sgle_len(_dio, _ix) (cpu_to_le32(sg_dma_len(&_dio->sg[_ix])))
/*================ General Purpose Queues ==================*/ /*================ General Purpose Queues ==================*/
extern enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *, struct crystalhd_dioq **, crystalhd_data_free_cb , void *); extern enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *,
extern void crystalhd_delete_dioq(struct crystalhd_adp *, struct crystalhd_dioq *); struct crystalhd_dioq **, crystalhd_data_free_cb , void *);
extern enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq, void *data, bool wake, uint32_t tag); extern void crystalhd_delete_dioq(struct crystalhd_adp *,
struct crystalhd_dioq *);
extern enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq,
void *data, bool wake, uint32_t tag);
extern void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq); extern void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq);
extern void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq, uint32_t tag); extern void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq,
extern void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq, uint32_t to_secs, uint32_t *sig_pend); uint32_t tag);
extern void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq,
uint32_t to_secs, uint32_t *sig_pend);
#define crystalhd_dioq_count(_ioq) ((_ioq) ? _ioq->count : 0) #define crystalhd_dioq_count(_ioq) ((_ioq) ? _ioq->count : 0)
...@@ -190,7 +200,8 @@ extern void crystalhd_delete_elem_pool(struct crystalhd_adp *); ...@@ -190,7 +200,8 @@ extern void crystalhd_delete_elem_pool(struct crystalhd_adp *);
/*================ Debug routines/macros .. ================================*/ /*================ Debug routines/macros .. ================================*/
extern void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount); extern void crystalhd_show_buffer(uint32_t off, uint8_t *buff,
uint32_t dwcount);
enum _chd_log_levels { enum _chd_log_levels {
BCMLOG_ERROR = 0x80000000, /* Don't disable this option */ BCMLOG_ERROR = 0x80000000, /* Don't disable this option */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment