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 <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass
2017-05-17 03:25:04 -06:00
committed by Tom Rini
parent 2c6ebff1e1
commit ab3c4fbe8a
9 changed files with 0 additions and 309 deletions

View File

@@ -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 <mpc5xxx.h>
#include <asm/io.h>
#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
*/

View File

@@ -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_ */