diff options
author | Heiko Schocher <hs@denx.de> | 2017-06-14 05:49:40 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-16 10:14:55 -0400 |
commit | 064b55cfcb25c0f7692ecf6d4a38f12cd82739f7 (patch) | |
tree | 9ff25c8783439f0c9a651fbe8b2e0a65d6cb8af1 /drivers/input | |
parent | 88024dc5ac1c72c2f3977712d25315eada0ee4d9 (diff) | |
download | u-boot-064b55cfcb25c0f7692ecf6d4a38f12cd82739f7.tar.gz |
powerpc, 5xxx, 512x: remove support for mpc5xxx and mpc512x
There was for long time no activity in the mpx5xxx area.
We need to go further and convert to Kconfig, but it
turned out, nobody is interested anymore in mpc5xxx,
so remove it.
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard.c | 2 | ||||
-rw-r--r-- | drivers/input/ps2ser.c | 94 |
2 files changed, 1 insertions, 95 deletions
diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c index 7af5868dea..84ee015cb3 100644 --- a/drivers/input/keyboard.c +++ b/drivers/input/keyboard.c @@ -20,7 +20,7 @@ static struct input_config config; static int kbd_read_keys(struct input_config *config) { -#if defined(CONFIG_MPC5xxx) || defined(CONFIG_ARCH_MPC8540) || \ +#if defined(CONFIG_ARCH_MPC8540) || \ defined(CONFIG_ARCH_MPC8541) || defined(CONFIG_ARCH_MPC8555) /* no ISR is used, so received chars must be polled */ ps2ser_check(); diff --git a/drivers/input/ps2ser.c b/drivers/input/ps2ser.c index bcbe52af15..0b5ce06853 100644 --- a/drivers/input/ps2ser.c +++ b/drivers/input/ps2ser.c @@ -29,25 +29,6 @@ DECLARE_GLOBAL_DATA_PTR; #define PS2SER_BAUD 57600 -#ifdef CONFIG_MPC5xxx -#if CONFIG_PS2SERIAL == 1 -#define PSC_BASE MPC5XXX_PSC1 -#elif CONFIG_PS2SERIAL == 2 -#define PSC_BASE MPC5XXX_PSC2 -#elif CONFIG_PS2SERIAL == 3 -#define PSC_BASE MPC5XXX_PSC3 -#elif CONFIG_PS2SERIAL == 4 -#define PSC_BASE MPC5XXX_PSC4 -#elif CONFIG_PS2SERIAL == 5 -#define PSC_BASE MPC5XXX_PSC5 -#elif CONFIG_PS2SERIAL == 6 -#define PSC_BASE MPC5XXX_PSC6 -#else -#error CONFIG_PS2SERIAL must be in 1 ... 6 -#endif - -#else - #if CONFIG_PS2SERIAL == 1 #define COM_BASE (CONFIG_SYS_CCSRBAR+0x4500) #elif CONFIG_PS2SERIAL == 2 @@ -56,8 +37,6 @@ DECLARE_GLOBAL_DATA_PTR; #error CONFIG_PS2SERIAL must be in 1 ... 2 #endif -#endif /* CONFIG_MPC5xxx / other */ - static int ps2ser_getc_hw(void); static void ps2ser_interrupt(void *dev_id); @@ -68,45 +47,6 @@ static atomic_t ps2buf_cnt; static int ps2buf_in_idx; static int ps2buf_out_idx; -#ifdef CONFIG_MPC5xxx -int ps2ser_init(void) -{ - volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE; - unsigned long baseclk; - int div; - - /* reset PSC */ - psc->command = PSC_SEL_MODE_REG_1; - - /* select clock sources */ - psc->psc_clock_select = 0; - baseclk = (gd->arch.ipb_clk + 16) / 32; - - /* switch to UART mode */ - psc->sicr = 0; - - /* configure parity, bit length and so on */ - psc->mode = PSC_MODE_8_BITS | PSC_MODE_PARNONE; - psc->mode = PSC_MODE_ONE_STOP; - - /* set up UART divisor */ - div = (baseclk + (PS2SER_BAUD/2)) / PS2SER_BAUD; - psc->ctur = (div >> 8) & 0xff; - psc->ctlr = div & 0xff; - - /* disable all interrupts */ - psc->psc_imr = 0; - - /* reset and enable Rx/Tx */ - psc->command = PSC_RST_RX; - psc->command = PSC_RST_TX; - psc->command = PSC_RX_ENABLE | PSC_TX_ENABLE; - - return (0); -} - -#else - int ps2ser_init(void) { NS16550_t com_port = (NS16550_t)COM_BASE; @@ -122,45 +62,23 @@ int ps2ser_init(void) return (0); } -#endif /* CONFIG_MPC5xxx / other */ - void ps2ser_putc(int chr) { -#ifdef CONFIG_MPC5xxx - volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE; -#else NS16550_t com_port = (NS16550_t)COM_BASE; -#endif debug(">>>> 0x%02x\n", chr); -#ifdef CONFIG_MPC5xxx - while (!(psc->psc_status & PSC_SR_TXRDY)); - - psc->psc_buffer_8 = chr; -#else while ((com_port->lsr & UART_LSR_THRE) == 0); com_port->thr = chr; -#endif } static int ps2ser_getc_hw(void) { -#ifdef CONFIG_MPC5xxx - volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE; -#else NS16550_t com_port = (NS16550_t)COM_BASE; -#endif int res = -1; -#ifdef CONFIG_MPC5xxx - if (psc->psc_status & PSC_SR_RXRDY) { - res = (psc->psc_buffer_8); - } -#else if (com_port->lsr & UART_LSR_DR) { res = com_port->rbr; } -#endif return res; } @@ -206,21 +124,13 @@ int ps2ser_check(void) static void ps2ser_interrupt(void *dev_id) { -#ifdef CONFIG_MPC5xxx - volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE; -#else NS16550_t com_port = (NS16550_t)COM_BASE; -#endif int chr; int status; do { chr = ps2ser_getc_hw(); -#ifdef CONFIG_MPC5xxx - status = psc->psc_status; -#else status = com_port->lsr; -#endif if (chr < 0) continue; if (atomic_read(&ps2buf_cnt) < PS2BUF_SIZE) { @@ -230,11 +140,7 @@ static void ps2ser_interrupt(void *dev_id) } else { printf ("ps2ser.c: buffer overflow\n"); } -#ifdef CONFIG_MPC5xxx - } while (status & PSC_SR_RXRDY); -#else } while (status & UART_LSR_DR); -#endif if (atomic_read(&ps2buf_cnt)) { ps2mult_callback(atomic_read(&ps2buf_cnt)); } |