提交 fe4a9675 编写于 作者: M Mario Six

gdsys: Introduce GDSYS_LEGACY_DRIVERS

Future gdsys boards will switch from the legacy drivers in board/gdsys/common
to DM-based drivers.

Define a Kconfig option that disables the legacy drivers.
Signed-off-by: NMario Six <mario.six@gdsys.cc>
上级 edba2b29
......@@ -4,6 +4,8 @@
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
*/
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <i2c.h>
......@@ -174,3 +176,5 @@ out:
return res;
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -6,6 +6,8 @@
/* Chrontel CH7301C DVI Transmitter */
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <asm/io.h>
#include <errno.h>
......@@ -61,3 +63,5 @@ int ch7301_probe(unsigned screen, bool power)
return 0;
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -6,6 +6,8 @@
/* Parade Technologies Inc. DP501 DisplayPort DVI/HDMI Transmitter */
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <asm/io.h>
#include <errno.h>
......@@ -155,3 +157,5 @@ int dp501_probe(unsigned screen, bool power)
return 0;
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -4,6 +4,8 @@
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
*/
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <i2c.h>
......@@ -29,3 +31,5 @@ void init_fan_controller(u8 addr)
val = i2c_reg_read(addr, FAN_CONFIG) | 0x04;
i2c_reg_write(addr, FAN_CONFIG, val);
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -4,6 +4,8 @@
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
*/
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <gdsys_fpga.h>
......@@ -22,3 +24,5 @@ int fpga_get_reg(u32 fpga, u16 *reg, off_t regoff, u16 *data)
return 0;
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -4,6 +4,8 @@
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
*/
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <gdsys_fpga.h>
......@@ -234,3 +236,5 @@ void ioep_fpga_print_info(unsigned int fpga)
printf(", %d video channel(s)\n", feature_video_channels);
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -4,6 +4,8 @@
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
*/
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <asm/io.h>
#include <errno.h>
......@@ -134,3 +136,5 @@ int mclink_receive(u8 slave, u16 addr, u16 *data)
return 0;
}
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
......@@ -4,6 +4,8 @@
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
*/
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
#include <i2c.h>
#include <malloc.h>
......@@ -497,3 +499,5 @@ U_BOOT_CMD(
"size_x(max. " __stringify(MAX_X_CHARS)
") size_y(max. " __stringify(MAX_Y_CHARS) ")\n"
);
#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
\ No newline at end of file
......@@ -4,6 +4,13 @@ config GDSYS_LEGACY_OSD_CMDS
Use the 'osdw', 'osdp', and 'osdsize' legacy commands required by
gdsys devices.
config GDSYS_LEGACY_DRIVERS
bool
help
Enable the gdsys legacy drivers under board/gdsys/common. If this
option is not set, all relevant DM drivers must be configured for the
device in question.
config SYS_FPGA0_BASE
hex
default E0600000
......@@ -40,6 +47,9 @@ config SYS_CONFIG_NAME
config GDSYS_LEGACY_OSD_CMDS
default y
config GDSYS_LEGACY_DRIVERS
default y
endif
if TARGET_STRIDER
......@@ -55,6 +65,10 @@ config SYS_CONFIG_NAME
config GDSYS_LEGACY_OSD_CMDS
default y
config GDSYS_LEGACY_DRIVERS
default y
endif
config CMD_IOLOOP
......
......@@ -24,6 +24,7 @@
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
/* as gpio output status cannot be read back, we have to buffer it locally */
u32 gpio0_out;
......@@ -116,3 +117,4 @@ int board_early_init_r(void)
return 0;
}
#endif
config GDSYS_LEGACY_DRIVERS
bool
help
Enable the gdsys legacy drivers under board/gdsys/common. If this
option is not set, all relevant DM drivers must be configured for the
device in question.
if TARGET_CONTROLCENTERD
config SYS_BOARD
......@@ -9,4 +16,7 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "controlcenterd"
config GDSYS_LEGACY_DRIVERS
default y
endif
......@@ -7,6 +7,7 @@
#ifndef __GDSYS_FPGA_H
#define __GDSYS_FPGA_H
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
int init_func_fpga(void);
enum {
......@@ -33,6 +34,7 @@ extern struct ihs_fpga *fpga_ptr[];
&fpga_ptr[ix]->fld, \
offsetof(struct ihs_fpga, fld), \
val)
#endif
struct ihs_gpio {
u16 read;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册