From ab3c4fbe8a4f9357b0cf48bb396f8d8baaea5fe3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 17 May 2017 03:25:04 -0600 Subject: Drop three-wire serial (TWS) support This subsystem has not been converted to driver model, there is only one driver and only one board that uses it. Drop it and its CONFIG option. Also drop the rtc4543 RTC driver since it uses TWS. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- include/configs/inka4x0.h | 80 ----------------------------------------------- include/tws.h | 21 ------------- 2 files changed, 101 deletions(-) delete mode 100644 include/tws.h (limited to 'include') diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h index 5ee9c2bcb4..3bdab3310b 100644 --- a/include/configs/inka4x0.h +++ b/include/configs/inka4x0.h @@ -218,86 +218,6 @@ */ #define CONFIG_SYS_GPS_PORT_CONFIG 0x01501444 -/* - * RTC configuration - */ -#define CONFIG_RTC_RTC4543 1 /* use external RTC */ - -/* - * Software (bit-bang) three wire serial configuration - * - * Note that we need the ifdefs because otherwise compilation of - * mkimage.c fails. - */ -#define CONFIG_SOFT_TWS 1 - -#ifdef TWS_IMPLEMENTATION -#include -#include - -#define TWS_CE MPC5XXX_GPIO_WKUP_PSC1_4 /* GPIO_WKUP_0 */ -#define TWS_WR MPC5XXX_GPIO_WKUP_PSC2_4 /* GPIO_WKUP_1 */ -#define TWS_DATA MPC5XXX_GPIO_SINT_PSC3_4 /* GPIO_SINT_0 */ -#define TWS_CLK MPC5XXX_GPIO_SINT_PSC3_5 /* GPIO_SINT_1 */ - -static inline void tws_ce(unsigned bit) -{ - struct mpc5xxx_wu_gpio *wu_gpio = - (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO; - if (bit) - setbits_8(&wu_gpio->dvo, TWS_CE); - else - clrbits_8(&wu_gpio->dvo, TWS_CE); -} - -static inline void tws_wr(unsigned bit) -{ - struct mpc5xxx_wu_gpio *wu_gpio = - (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO; - if (bit) - setbits_8(&wu_gpio->dvo, TWS_WR); - else - clrbits_8(&wu_gpio->dvo, TWS_WR); -} - -static inline void tws_clk(unsigned bit) -{ - struct mpc5xxx_gpio *gpio = - (struct mpc5xxx_gpio *)MPC5XXX_GPIO; - if (bit) - setbits_8(&gpio->sint_dvo, TWS_CLK); - else - clrbits_8(&gpio->sint_dvo, TWS_CLK); -} - -static inline void tws_data(unsigned bit) -{ - struct mpc5xxx_gpio *gpio = - (struct mpc5xxx_gpio *)MPC5XXX_GPIO; - if (bit) - setbits_8(&gpio->sint_dvo, TWS_DATA); - else - clrbits_8(&gpio->sint_dvo, TWS_DATA); -} - -static inline unsigned tws_data_read(void) -{ - struct mpc5xxx_gpio *gpio = - (struct mpc5xxx_gpio *)MPC5XXX_GPIO; - return !!(in_8(&gpio->sint_ival) & TWS_DATA); -} - -static inline void tws_data_config_output(unsigned output) -{ - struct mpc5xxx_gpio *gpio = - (struct mpc5xxx_gpio *)MPC5XXX_GPIO; - if (output) - setbits_8(&gpio->sint_ddr, TWS_DATA); - else - clrbits_8(&gpio->sint_ddr, TWS_DATA); -} -#endif /* TWS_IMPLEMENTATION */ - /* * Miscellaneous configurable options */ diff --git a/include/tws.h b/include/tws.h deleted file mode 100644 index 7dd5268125..0000000000 --- a/include/tws.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * (C) Copyright 2009 - * Detlev Zundel, DENX Software Engineering, dzu@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _TWS_H_ -#define _TWS_H_ - -/* - * Read/Write interface: - * buffer: Where to read/write the data - * len: How many bits to read/write - * - * Returns: 0 on success, not 0 on failure - */ -int tws_read(uchar *buffer, int len); -int tws_write(uchar *buffer, int len); - -#endif /* _TWS_H_ */ -- cgit v1.2.3