Skip to content

Commit 26ef96e

Browse files
author
Thomas Zimmermann
committed
drm/ast: Declare helpers for POST in header
Provide POST helpers in header file before splitting up the AST POST code. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 854acbe commit 26ef96e

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

drivers/gpu/drm/ast/ast_post.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
#include "ast_dram_tables.h"
3535
#include "ast_drv.h"
36+
#include "ast_post.h"
3637

3738
static void ast_post_chip_2300(struct ast_device *ast);
3839
static void ast_post_chip_2500(struct ast_device *ast);
@@ -75,7 +76,7 @@ static void ast_set_def_ext_reg(struct ast_device *ast)
7576
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xb6, 0xff, reg);
7677
}
7778

78-
static u32 __ast_mindwm(void __iomem *regs, u32 r)
79+
u32 __ast_mindwm(void __iomem *regs, u32 r)
7980
{
8081
u32 data;
8182

@@ -89,7 +90,7 @@ static u32 __ast_mindwm(void __iomem *regs, u32 r)
8990
return __ast_read32(regs, 0x10000 + (r & 0x0000ffff));
9091
}
9192

92-
static void __ast_moutdwm(void __iomem *regs, u32 r, u32 v)
93+
void __ast_moutdwm(void __iomem *regs, u32 r, u32 v)
9394
{
9495
u32 data;
9596

@@ -438,7 +439,7 @@ static const u32 pattern[8] = {
438439
0x7C61D253
439440
};
440441

441-
static bool mmc_test(struct ast_device *ast, u32 datagen, u8 test_ctl)
442+
bool mmc_test(struct ast_device *ast, u32 datagen, u8 test_ctl)
442443
{
443444
u32 data, timeout;
444445

@@ -478,8 +479,7 @@ static u32 mmc_test2(struct ast_device *ast, u32 datagen, u8 test_ctl)
478479
return data;
479480
}
480481

481-
482-
static bool mmc_test_burst(struct ast_device *ast, u32 datagen)
482+
bool mmc_test_burst(struct ast_device *ast, u32 datagen)
483483
{
484484
return mmc_test(ast, datagen, 0xc1);
485485
}

drivers/gpu/drm/ast/ast_post.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* SPDX-License-Identifier: MIT */
2+
3+
#ifndef AST_POST_H
4+
#define AST_POST_H
5+
6+
#include <linux/types.h>
7+
8+
struct ast_device;
9+
10+
u32 __ast_mindwm(void __iomem *regs, u32 r);
11+
void __ast_moutdwm(void __iomem *regs, u32 r, u32 v);
12+
13+
bool mmc_test(struct ast_device *ast, u32 datagen, u8 test_ctl);
14+
bool mmc_test_burst(struct ast_device *ast, u32 datagen);
15+
16+
#endif

0 commit comments

Comments
 (0)