s3c24xx serial driver cleanup patches
cover s3c24xx serial driver cleanup patches
This is a serie of cleanup patches:
Patch 1-3 remove 3 unused config options and the related dead code from several drivers and U-Boot main code.
Patch 4 removes any reference for the 3 unused config options from the documentation.
Patch 5 removes another piece of dead, unreferenced code from the s3c24xx serial driver.
PATCH 1/5 Remove unused CONFIG_MODEM_SUPPORT option and associated dead code.
--- arch/powerpc/cpu/mpc8xx/serial.c | 22 --------- common/Makefile | 1 - common/board_f.c | 3 -- common/main.c | 14 ------ common/modem.c | 100 -------------------------------------- drivers/serial/serial_s3c24x0.c | 18 ------- include/asm-generic/global_data.h | 4 -- 7 files changed, 162 deletions(-) delete mode 100644 common/modem.c
arch/powerpc/cpu/mpc8xx/serial.c +0 -22
@@ -268,11 +268,6 @@ smc_putc(const char c)volatile cpm8xx_t *cpmp = &(im->im_cpm);volatile serialbuffer_t *rtx; -#ifdef CONFIG_MODEM_SUPPORT -if (gd->be_quiet) -return ; -#endif -if (c =='\n' )smc_putc ('\r' );
@@ -527,11 +522,6 @@ scc_putc(const char c)volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;volatile cpm8xx_t *cpmp = &(im->im_cpm); -#ifdef CONFIG_MODEM_SUPPORT -if (gd->be_quiet) -return ; -#endif -if (c =='\n' )scc_putc ('\r' );
@@ -637,18 +627,6 @@ void mpc8xx_serial_initialize(void)#endif } -#ifdef CONFIG_MODEM_SUPPORT -void disable_putc (void ) -{ - gd->be_quiet =1 ; -} - -void enable_putc (void ) -{ - gd->be_quiet =0 ; -} -#endif -#if defined(CONFIG_CMD_KGDB )void
common/Makefile +0 -1
@@ -82,7 +82,6 @@ obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o obj-$(CONFIG_LYNXKDI) += lynxkdi.o obj-$(CONFIG_MENU) += menu.o -obj-$(CONFIG_MODEM_SUPPORT) += modem.o obj-$(CONFIG_UPDATE_TFTP) += update.o obj-$(CONFIG_DFU_TFTP) += update.o obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
common/board_f.c +0 -3
@@ -162,9 +162,6 @@ static int display_text_info(void) text_base, bss_start, bss_end);#endif -#ifdef CONFIG_MODEM_SUPPORT -debug ("Modem Support enabled\n" ); -#endif #ifdef CONFIG_USE_IRQ debug ("IRQ Stack: %08lx\n" ,IRQ_STACK_START );debug ("FIQ Stack: %08lx\n" ,FIQ_STACK_START );
common/main.c +0 -14
@@ -20,19 +20,6 @@ DECLARE_GLOBAL_DATA_PTR;*/ __weak void show_boot_progress (int val) {} -static void modem_init (void ) -{ -#ifdef CONFIG_MODEM_SUPPORT -debug ("DEBUG: main_loop: gd->do_mdm_init=%lu\n" , gd->do_mdm_init); -if (gd->do_mdm_init) { -char *str =getenv ("mdm_cmd" ); - -setenv ("preboot" , str);/* set or delete definition */ -mdm_init ();/* wait for modem connection */ - } -#endif /* CONFIG_MODEM_SUPPORT */ -} -static void run_preboot_environment_command (void ) {#ifdef CONFIG_PREBOOT
@@ -66,7 +53,6 @@ void main_loop(void)puts ("upgraded by the late 2014 may break or be removed.\n" );#endif -modem_init ();#ifdef CONFIG_VERSION_VARIABLE setenv ("ver" , version_string);/* set version variable */ #endif /* CONFIG_VERSION_VARIABLE */
common/modem.c deleted +0 -100
100 lines not on this page · raw message
drivers/serial/serial_s3c24x0.c +0 -18
@@ -164,30 +164,12 @@ int hwflow_onoff(int on) }#endif -#ifdef CONFIG_MODEM_SUPPORT -static int be_quiet =0 ; -void disable_putc (void ) -{ - be_quiet =1 ; -} - -void enable_putc (void ) -{ - be_quiet =0 ; -} -#endif - -/* * Output a single byte to the serial port. */ static void _serial_putc (const char c,const int dev_index) {struct s3c24x0_uart *uart =s3c24x0_get_base_uart (dev_index); -#ifdef CONFIG_MODEM_SUPPORT -if (be_quiet) -return ; -#endif while (!(readl (&uart->utrstat) &0x2 ))/* wait for room in the tx FIFO */ ;
include/asm-generic/global_data.h +0 -4
@@ -48,10 +48,6 @@ typedef struct global_data {#ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx;/* Pre-Console buffer index */ #endif -#ifdef CONFIG_MODEM_SUPPORT -unsigned long do_mdm_init; -unsigned long be_quiet; -#endif unsigned long env_addr;/* Address of Environment struct */ unsigned long env_valid;/* Checksum of Environment valid? */
Signature · 1 line
1.8.4
PATCH 2/5 Remove unused CONFIG_CMD_HWFLOW option and associated dead code.
In reply to David Müller--- cmd/load.c | 30 ------------------------------ include/config_cmd_all.h | 1 - 2 files changed, 31 deletions(-)
cmd/load.c +0 -30
@@ -1081,33 +1081,3 @@ U_BOOT_CMD( );#endif /* CONFIG_CMD_LOADB */ - -/* -------------------------------------------------------------------- */ - -#if defined(CONFIG_CMD_HWFLOW ) -int do_hwflow (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) -{ -extern int hwflow_onoff (int ); - -if (argc ==2 ) { -if (strcmp (argv[1 ],"off" ) ==0 ) -hwflow_onoff (-1 ); -else -if (strcmp (argv[1 ],"on" ) ==0 ) -hwflow_onoff (1 ); -else -return CMD_RET_USAGE ; - } -printf ("RTS/CTS hardware flow control: %s\n" ,hwflow_onoff (0 ) ?"on" :"off" ); -return 0 ; -} - -/* -------------------------------------------------------------------- */ - -U_BOOT_CMD ( - hwflow,2 ,0 , do_hwflow, -"turn RTS/CTS hardware flow control in serial line on/off" , -"[on|off]" -); - -#endif /* CONFIG_CMD_HWFLOW */
include/config_cmd_all.h +0 -1
@@ -34,7 +34,6 @@#define CONFIG_CMD_FUSE /* Device fuse support */ #define CONFIG_CMD_GETTIME /* Get time since boot */ #define CONFIG_CMD_HASH /* calculate hash / digest */ -#define CONFIG_CMD_HWFLOW /* RTS/CTS hw flow control */ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_IDE /* IDE harddisk support */ #define CONFIG_CMD_IMMAP /* IMMR dump support */
Signature · 1 line
1.8.4
PATCH 3/5 Remove unused CONFIG_HWFLOW option and associated dead code.
In reply to David Müller--- drivers/serial/serial_imx.c | 7 ------- drivers/serial/serial_s3c24x0.c | 35 ----------------------------------- 2 files changed, 42 deletions(-)
drivers/serial/serial_imx.c +0 -7
@@ -164,13 +164,6 @@ static int imx_serial_getc(void)return ch; } -#ifdef CONFIG_HWFLOW -static int hwflow =0 ;/* turned off by default */ -int hwflow_onoff (int on) -{ -} -#endif -/* * Output a single byte to the serial port. */
drivers/serial/serial_s3c24x0.c +0 -35
@@ -65,10 +65,6 @@ DECLARE_GLOBAL_DATA_PTR; .puts = s3serial##port##_puts, \ } -#ifdef CONFIG_HWFLOW -static int hwflow; -#endif -static void _serial_setbrg (const int dev_index) {struct s3c24x0_uart *uart =s3c24x0_get_base_uart (dev_index);
@@ -95,10 +91,6 @@ static int serial_init_dev(const int dev_index) {struct s3c24x0_uart *uart =s3c24x0_get_base_uart (dev_index); -#ifdef CONFIG_HWFLOW - hwflow =0 ;/* turned off by default */ -#endif -/* FIFO enable, Tx/Rx FIFO clear */ writel (0x07 , &uart->ufcon);writel (0x0 , &uart->umcon);
@@ -111,10 +103,6 @@ static int serial_init_dev(const int dev_index)*/ writel (0x245 , &uart->ucon); -#ifdef CONFIG_HWFLOW -writel (0x1 , &uart->umcon);/* rts up */ -#endif -/* FIXME: This is sooooooooooooooooooo ugly */ #if defined(CONFIG_ARCH_GTA02_v1) || defined(CONFIG_ARCH_GTA02_v2)/* we need auto hw flow control on the gsm and gps port */
@@ -146,24 +134,6 @@ static inline int serial_getc_dev(unsigned int dev_index)return _serial_getc (dev_index); } -#ifdef CONFIG_HWFLOW -int hwflow_onoff (int on) -{ -switch (on) { -case 0 : -default : -break ;/* return current */ -case 1 : - hwflow =1 ;/* turn on */ -break ; -case -1 : - hwflow =0 ;/* turn off */ -break ; - } -return hwflow; -} -#endif -/* * Output a single byte to the serial port. */
@@ -174,11 +144,6 @@ static void _serial_putc(const char c, const int dev_index)while (!(readl (&uart->utrstat) &0x2 ))/* wait for room in the tx FIFO */ ; -#ifdef CONFIG_HWFLOW -while (hwflow && !(readl (&uart->umstat) &0x1 )) -/* Wait for CTS up */ ; -#endif -writeb (c, &uart->utxh);/* If \n, also do \r */
Signature · 1 line
1.8.4
PATCH 4/5 doc: Remove any reference to CONFIG_MODEM_SUPPORT, CONFIG_CMD_HWFLOW, CONFIG_HWFLOW and friends from the documentation.
In reply to David Müller--- README | 28 ---------------------- doc/README.Modem | 72 -------------------------------------------------------- 2 files changed, 100 deletions(-) delete mode 100644 doc/README.Modem
README +0 -28
@@ -1023,7 +1023,6 @@ The following options need to be configured: CONFIG_CMD_GO * the 'go' command (exec code) CONFIG_CMD_GREPENV * search environment CONFIG_CMD_HASH * calculate hash / digest - CONFIG_CMD_HWFLOW * RTS/CTS hw flow control CONFIG_CMD_I2C * I2C serial bus support CONFIG_CMD_IDE * IDE harddisk support CONFIG_CMD_IMI iminfo
@@ -3712,17 +3711,6 @@ FIT uImage format: CONFIG_SPL_PAD_TO must be either 0, meaning to append the SPL payload without any padding, or >= CONFIG_SPL_MAX_SIZE. -Modem Support: --------------- - -[so far only for SMDK2400 boards] - -- Modem support enable: - CONFIG_MODEM_SUPPORT - -- RTS/CTS Flow control enable: - CONFIG_HWFLOW - - Interrupt support (PPC): There are common interrupt_init() and timer_interrupt()
@@ -3736,22 +3724,6 @@ Modem Support: / other_activity_monitor it works automatically from general timer_interrupt(). -- General: - - In the target system modem support is enabled when a - specific key (key combination) is pressed during - power-on. Otherwise U-Boot will boot normally - (autoboot). The key_pressed() function is called from - board_init(). Currently key_pressed() is a dummy - function, returning 1 and thus enabling modem - initialization. - - If there are no modem init strings in the - environment, U-Boot proceed to autoboot; the - previous output (banner, info printfs) will be - suppressed, though. - - See also: doc/README.Modem Board initialization settings: ------------------------------
doc/README.Modem deleted +0 -72
72 lines not on this page · raw message
Signature · 1 line
1.8.4
PATCH 5/5 s3c24xx: serial: Remove dead code
In reply to David Müller--- drivers/serial/serial_s3c24x0.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/serial/serial_s3c24x0.c +0 -6
@@ -103,12 +103,6 @@ static int serial_init_dev(const int dev_index)*/ writel (0x245 , &uart->ucon); -/* FIXME: This is sooooooooooooooooooo ugly */ -#if defined(CONFIG_ARCH_GTA02_v1) || defined(CONFIG_ARCH_GTA02_v2) -/* we need auto hw flow control on the gsm and gps port */ -if (dev_index ==0 || dev_index ==1 ) -writel (0x10 , &uart->umcon); -#endif _serial_setbrg (dev_index);return (0 );
Signature · 1 line
1.8.4
PATCH 1/5 Remove unused CONFIG_MODEM_SUPPORT option and associated dead code.
In reply to David MüllerQuoted 1 line · David M?ller (ELSOFT AG)
Signed-off-by David M?ller <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160208/2d87ff07/attachment.sig>
PATCH 2/5 Remove unused CONFIG_CMD_HWFLOW option and associated dead code.
In reply to David MüllerQuoted 1 line · David M?ller (ELSOFT AG)
Signed-off-by David M?ller <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160208/c1c07640/attachment.sig>
PATCH 3/5 Remove unused CONFIG_HWFLOW option and associated dead code.
In reply to David MüllerQuoted 1 line · David M?ller (ELSOFT AG)
Signed-off-by David M?ller <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160208/be695c75/attachment.sig>
PATCH 4/5 doc: Remove any reference to CONFIG_MODEM_SUPPORT, CONFIG_CMD_HWFLOW, CONFIG_HWFLOW and friends from the documentation.
In reply to David MüllerQuoted 1 line · David M?ller (ELSOFT AG)
Signed-off-by David M?ller <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160208/542d8763/attachment.sig>
PATCH 5/5 s3c24xx: serial: Remove dead code
In reply to David MüllerQuoted 1 line · David M?ller (ELSOFT AG)
Signed-off-by David M?ller <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160208/138dacf7/attachment.sig>