pmc-sierra yosemite platform
Hi,
some six weeks ago I submitted a patch that fixes a couple of issues with the yosemite port. This did not excite any reaction at all, and so I feel I must be doing something wrong to be completly ignored.
Manish, since you obviously left PMC-Sierra, are you still interested in maintaining the yosemite port? If so, should I pass any patches to you? If not, what else can I do to get anyone to at least look at my patches? Or should I just create a private fork and refrain from trying to contribute anything back?
tk
Signature · 9 lines
-------------------------------------------------- Thomas Koeller, Software Development Basler Vision Technologies thomas dot koeller at baslerweb dot com http://www.baslerweb.com ==============================
Quoted 15 lines · Thomas Koeller
Hi,
some six weeks ago I submitted a patch that fixes a couple of issues with the yosemite port. This did not excite any reaction at all, and so I feel I must be doing something wrong to be completly ignored.
Manish, since you obviously left PMC-Sierra, are you still interested in maintaining the yosemite port? If so, should I pass any patches to you? If not, what else can I do to get anyone to at least look at my patches? Or should I just create a private fork and refrain from trying to contribute anything back?
Quoted 4 lines
tk
Hello Thomas
Sure, please send the patches over to me so that I can take a look at it.
thanks
Manish
PATCH 1/1 pmc-sierra yosemite serial i/o support
Quoted 7 lines · Manish Lachwani
Hello Thomas
Sure, please send the patches over to me so that I can take a look at it.
thanks
Manish
Hi Manish,
here's the patch again, as a diff against current cvs head. It addresses the following issues:
- avoids autodetection of the uart chip type. The chip was always detected as a fifo-less 16540. Autodetection really isn't required here, since we know exactly what we're dealing with.
- enables interrupt sharing for both ports. Since the two uart interrupt lines are physically ORed together, this makes the second port fully usable.
- use 'arch_initcall' instead of the 'late_time_init' hook, as is appropriate.
thomas
arch/mips/pmc-sierra/yosemite/dbg_io.c +28 -60
@@ -23,18 +23,22 @@* 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* -* Support for KGDB for the Yosemite board. We make use of single serial -* port to be used for KGDB as well as console. The second serial port -* seems to be having a problem. Single IRQ is allocated for both the -* ports. Hence, the interrupt routing code needs to figure out whether -* the interrupt came from channel A or B. -*/ -#include <linux/config.h> +#include <asm/io.h> + +#include "setup.h" +#ifdef CONFIG_KGDB -#include <asm/serial.h> + +#if defined(CONFIG_SERIAL_8250 ) &&CONFIG_SERIAL_8250_NR_UARTS >1 +#error Debug port used by serial driver +#endif + +#define TITAN_UART_CLK 3686400 +#define TITAN_SERIAL_BASE_BAUD (TITAN_UART_CLK / 16) +#define TITAN_SERIAL_BASE_0 0xfd000008UL +#define TITAN_SERIAL_BASE_1 0xfd000000UL/* * Baud rate, Parity, Data and Stop bit settings for the
@@ -71,6 +75,7 @@#define SERIAL_SEND_BUFFER 0x0#define SERIAL_INTR_ENABLE (1 * SERIAL_REG_OFS)#define SERIAL_INTR_ID (2 * SERIAL_REG_OFS) +#define SERIAL_FIFO_CONTROL SERIAL_INTR_ID#define SERIAL_DATA_FORMAT (3 * SERIAL_REG_OFS)#define SERIAL_LINE_CONTROL (3 * SERIAL_REG_OFS)#define SERIAL_MODEM_CONTROL (4 * SERIAL_REG_OFS)
@@ -84,59 +89,28 @@#define SERIAL_DIVISOR_MSB (1 * SERIAL_REG_OFS)/* -* Functions to READ and WRITE to serial port 0 +* Functions to READ and WRITE to serial port */ #define SERIAL_READ (ofs) (*((volatile unsigned char*) \ - (TITAN_SERIAL_BASE + ofs))) - + (serbase + ofs)))#define SERIAL_WRITE (ofs, val) ((*((volatile unsigned char*) \ - (TITAN_SERIAL_BASE + ofs))) = val) - -/* -* Functions to READ and WRITE to serial port 1 -*/ -#define SERIAL_READ_1 (ofs) (*((volatile unsigned char*) \ - (TITAN_SERIAL_BASE_1 + ofs) - -#define SERIAL_WRITE_1 (ofs, val) ((*((volatile unsigned char*) \ - (TITAN_SERIAL_BASE_1 + ofs))) = val) - -/* -* Second serial port initialization -*/ -void init_second_port (void ) -{ -/* Disable Interrupts */ -SERIAL_WRITE_1 (SERIAL_LINE_CONTROL ,0x0 ); -SERIAL_WRITE_1 (SERIAL_INTR_ENABLE ,0x0 ); + (serbase + ofs))) = val) - { -unsigned int divisor; - -SERIAL_WRITE_1 (SERIAL_LINE_CONTROL ,0x80 ); - divisor =TITAN_SERIAL_BASE_BAUD /YOSEMITE_BAUD_115200 ; -SERIAL_WRITE_1 (SERIAL_DIVISOR_LSB , divisor &0xff ); - -SERIAL_WRITE_1 (SERIAL_DIVISOR_MSB , - (divisor &0xff00 ) >>8 ); -SERIAL_WRITE_1 (SERIAL_LINE_CONTROL ,0x0 ); - } - -SERIAL_WRITE_1 (SERIAL_DATA_FORMAT ,YOSEMITE_DATA_8BIT | -YOSEMITE_PARITY_NONE |YOSEMITE_STOP_1BIT ); - -/* Enable Interrupts */ -SERIAL_WRITE_1 (SERIAL_INTR_ENABLE ,0xf ); -} +static int initialized =0 ;/* Initialize the serial port for KGDB debugging */ void debugInit (unsigned int baud,unsigned char data,unsigned char parity, -unsigned char stop) +unsigned char stop) { + initialized =1 ; +/* Disable Interrupts */ SERIAL_WRITE (SERIAL_LINE_CONTROL ,0x0 );SERIAL_WRITE (SERIAL_INTR_ENABLE ,0x0 ); +/* Disable FIFOs */ +SERIAL_WRITE (SERIAL_FIFO_CONTROL ,0x00 ); + {unsigned int divisor;
@@ -152,15 +126,11 @@SERIAL_WRITE (SERIAL_DATA_FORMAT , data | parity | stop); } -static int remoteDebugInitialized =0 ; -unsigned char getDebugChar (void ) { -if (!remoteDebugInitialized) { - remoteDebugInitialized =1 ; +if (!initialized) {debugInit (YOSEMITE_BAUD_115200 , -YOSEMITE_DATA_8BIT , -YOSEMITE_PARITY_NONE ,YOSEMITE_STOP_1BIT ); +YOSEMITE_DATA_8BIT ,YOSEMITE_PARITY_NONE ,YOSEMITE_STOP_1BIT ); }while ((SERIAL_READ (SERIAL_LINE_STATUS ) &0x1 ) ==0 );
@@ -169,11 +139,9 @@int putDebugChar (unsigned char byte) { -if (!remoteDebugInitialized) { - remoteDebugInitialized =1 ; +if (!initialized) {debugInit (YOSEMITE_BAUD_115200 , -YOSEMITE_DATA_8BIT , -YOSEMITE_PARITY_NONE ,YOSEMITE_STOP_1BIT ); +YOSEMITE_DATA_8BIT ,YOSEMITE_PARITY_NONE ,YOSEMITE_STOP_1BIT ); }while ((SERIAL_READ (SERIAL_LINE_STATUS ) &0x20 ) ==0 );
arch/mips/pmc-sierra/yosemite/irq.c +0 -13
@@ -109,10 +109,6 @@do_IRQ (irq, regs); } -#ifdef CONFIG_KGDB -extern void init_second_port (void ); -#endif -/* * Initialize the next level interrupt handler */
@@ -123,15 +119,6 @@set_except_vector (0 , titan_handle_int);mips_cpu_irq_init (0 );rm7k_cpu_irq_init (8 ); - -#ifdef CONFIG_KGDB -/* At this point, initialize the second serial port */ -init_second_port (); -#endif - -#ifdef CONFIG_GDB_CONSOLE -register_gdb_console (); -#endif }#ifdef CONFIG_KGDB
arch/mips/pmc-sierra/yosemite/setup.c +40 -22
117 lines not on this page · raw message
arch/mips/pmc-sierra/yosemite/setup.h +3 -0
@@ -28,4 +28,7 @@#define TITAN_ATMEL_24C32_SIZE 32768#define TITAN_ATMEL_24C64_SIZE 65536 +/* UART base */ +extern unsigned long serbase; +#endif /* __SETUP_H__ */
Signature · 9 lines
-------------------------------------------------- Thomas Koeller, Software Development Basler Vision Technologies thomas dot koeller at baslerweb dot com http://www.baslerweb.com ==============================