diff --git a/board/gdsys/common/adv7611.c b/board/gdsys/common/adv7611.c index c416bf1dc42cfbccd700727c152095a142ca285f..06cdc05825b4c20bf9e9fbd1cb83d6d9e78ea2bd 100644 --- a/board/gdsys/common/adv7611.c +++ b/board/gdsys/common/adv7611.c @@ -4,6 +4,8 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include @@ -174,3 +176,5 @@ out: return res; } + +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/ch7301.c b/board/gdsys/common/ch7301.c index 1234149f42c3c0abdbdd264efa2b3997f65a2b49..5e42467651da3686211d4133c5afd6796dd7c775 100644 --- a/board/gdsys/common/ch7301.c +++ b/board/gdsys/common/ch7301.c @@ -6,6 +6,8 @@ /* Chrontel CH7301C DVI Transmitter */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include #include @@ -61,3 +63,5 @@ int ch7301_probe(unsigned screen, bool power) return 0; } + +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/dp501.c b/board/gdsys/common/dp501.c index 69d4b8c333477fe489ad0af00756833f8bd31735..9ca69ebcbbe749db02f45f860b294e22ea65dfbf 100644 --- a/board/gdsys/common/dp501.c +++ b/board/gdsys/common/dp501.c @@ -6,6 +6,8 @@ /* Parade Technologies Inc. DP501 DisplayPort DVI/HDMI Transmitter */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include #include @@ -155,3 +157,5 @@ int dp501_probe(unsigned screen, bool power) return 0; } + +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/fanctrl.c b/board/gdsys/common/fanctrl.c index 5e776831dbb7689bdd3177d19aa08012f816c9f4..27c875cbec072998d762841617c1b767173a5084 100644 --- a/board/gdsys/common/fanctrl.c +++ b/board/gdsys/common/fanctrl.c @@ -4,6 +4,8 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include @@ -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 */ diff --git a/board/gdsys/common/fpga.c b/board/gdsys/common/fpga.c index f189e5fbd11d62803a51f002ad9bd02d2e9b2b3d..5ba6613ed567cc91a3c33eb3023385565e3f8e88 100644 --- a/board/gdsys/common/fpga.c +++ b/board/gdsys/common/fpga.c @@ -4,6 +4,8 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include @@ -22,3 +24,5 @@ int fpga_get_reg(u32 fpga, u16 *reg, off_t regoff, u16 *data) return 0; } + +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/ioep-fpga.c b/board/gdsys/common/ioep-fpga.c index 8e105012479999f46715c7b19ed1b752bc017f4c..91eec3ac7c19bada285cd240a41c658fae2950c0 100644 --- a/board/gdsys/common/ioep-fpga.c +++ b/board/gdsys/common/ioep-fpga.c @@ -4,6 +4,8 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include @@ -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 */ diff --git a/board/gdsys/common/mclink.c b/board/gdsys/common/mclink.c index bf89d4e2920d48815bf266178df29518d5c97b0f..c43d24b26d4950d48e05cbcb652cd54842df3d95 100644 --- a/board/gdsys/common/mclink.c +++ b/board/gdsys/common/mclink.c @@ -4,6 +4,8 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include #include @@ -134,3 +136,5 @@ int mclink_receive(u8 slave, u16 addr, u16 *data) return 0; } + +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c index 392d0059da8fac16dfa48b3525d8ad9885e781b3..10c43291469a58ab93635e062aa1832ccc092b9f 100644 --- a/board/gdsys/common/osd.c +++ b/board/gdsys/common/osd.c @@ -4,6 +4,8 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ +#ifdef CONFIG_GDSYS_LEGACY_DRIVERS + #include #include #include @@ -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 diff --git a/board/gdsys/mpc8308/Kconfig b/board/gdsys/mpc8308/Kconfig index cad458ac7107e41773fb9658e7661c7bbd7226d7..222ab0d20a3ef64fc6426a8ab47a328db01b81cc 100644 --- a/board/gdsys/mpc8308/Kconfig +++ b/board/gdsys/mpc8308/Kconfig @@ -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 diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c index a53135b8fd0eb6b0fbb857c119f190d8abc94d5f..ae77fc2fd124fb4a3cbcf00aa06fbe0f373b9803 100644 --- a/board/gdsys/mpc8308/mpc8308.c +++ b/board/gdsys/mpc8308/mpc8308.c @@ -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 diff --git a/board/gdsys/p1022/Kconfig b/board/gdsys/p1022/Kconfig index 8514d086b97a59a18f62348e018e01ac05b446a4..f5154271d157959228187ca99cc34b90efa5e219 100644 --- a/board/gdsys/p1022/Kconfig +++ b/board/gdsys/p1022/Kconfig @@ -1,3 +1,10 @@ +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 diff --git a/include/gdsys_fpga.h b/include/gdsys_fpga.h index eae670126229698365598c8f339b9e559198f145..6d38a83d90342023d0a47bdd7e383b250f2f312f 100644 --- a/include/gdsys_fpga.h +++ b/include/gdsys_fpga.h @@ -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;