<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-11-27)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>gedare</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
PR 1966/bsps
* include/system_conf.h: support for the new UART core and interrupt
map
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/lm32/milkymist/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/lm32/milkymist/include/system_conf.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog:1.4 rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog:1.5
--- rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog:1.4 Mon Aug 1 08:48:10 2011
+++ rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog Sun Nov 27 11:26:25 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
+
+ PR 1966/bsps
+ * include/system_conf.h: support for the new UART core and interrupt
+ map
+
</font> 2011-08-01 Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com>
PR 1869/bsps
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h:1.2 rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h:1.3
--- rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h:1.2 Mon Aug 1 08:48:11 2011
+++ rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h Sun Nov 27 11:26:25 2011
</font><font color='#997700'>@@ -26,6 +26,16 @@
</font> /* UART */
#define MM_UART_RXTX (0xe0000000)
#define MM_UART_DIV (0xe0000004)
<font color='#000088'>+#define MM_UART_STAT (0xe0000008)
+#define MM_UART_CTRL (0xe000000c)
+
+#define UART_STAT_THRE (0x1)
+#define UART_STAT_RX_EVT (0x2)
+#define UART_STAT_TX_EVT (0x4)
+
+#define UART_CTRL_RX_INT (0x1)
+#define UART_CTRL_TX_INT (0x2)
+#define UART_CTRL_THRU (0x4)
</font>
/* Timers */
#define MM_TIMER1_COMPARE (0xe0001024)
<font color='#997700'>@@ -225,8 +235,17 @@
</font>
/* MIDI */
#define MM_MIDI_RXTX (0xe000b000)
<font color='#880000'>-#define MM_MIDI_DIVISOR (0xe000b004)
-#define MM_MIDI_THRU (0xe000b008)
</font><font color='#000088'>+#define MM_MIDI_DIV (0xe000b004)
+#define MM_MIDI_STAT (0xe000b008)
+#define MM_MIDI_CTRL (0xe000b00c)
+
+#define MIDI_STAT_THRE (0x1)
+#define MIDI_STAT_RX_EVT (0x2)
+#define MIDI_STAT_TX_EVT (0x4)
+
+#define MIDI_CTRL_RX_INT (0x1)
+#define MIDI_CTRL_TX_INT (0x2)
+#define MIDI_CTRL_THRU (0x4)
</font>
/* IR */
#define MM_IR_RX (0xe000e000)
<font color='#997700'>@@ -248,24 +267,22 @@
</font> #define BT656_FILTER_INFRAME (0x4)
/* Interrupts */
<font color='#880000'>-#define MM_IRQ_UARTRX (0)
-#define MM_IRQ_UARTTX (1)
-#define MM_IRQ_GPIO (2)
-#define MM_IRQ_TIMER0 (3)
-#define MM_IRQ_TIMER1 (4)
-#define MM_IRQ_AC97CRREQUEST (5)
-#define MM_IRQ_AC97CRREPLY (6)
-#define MM_IRQ_AC97DMAR (7)
-#define MM_IRQ_AC97DMAW (8)
-#define MM_IRQ_PFPU (9)
-#define MM_IRQ_TMU (10)
-#define MM_IRQ_ETHRX (11)
-#define MM_IRQ_ETHTX (12)
-#define MM_IRQ_VIDEOIN (13)
-#define MM_IRQ_MIDIRX (14)
-#define MM_IRQ_MIDITX (15)
-#define MM_IRQ_IR (16)
-#define MM_IRQ_USB (17)
</font><font color='#000088'>+#define MM_IRQ_UART (0)
+#define MM_IRQ_GPIO (1)
+#define MM_IRQ_TIMER0 (2)
+#define MM_IRQ_TIMER1 (3)
+#define MM_IRQ_AC97CRREQUEST (4)
+#define MM_IRQ_AC97CRREPLY (5)
+#define MM_IRQ_AC97DMAR (6)
+#define MM_IRQ_AC97DMAW (7)
+#define MM_IRQ_PFPU (8)
+#define MM_IRQ_TMU (9)
+#define MM_IRQ_ETHRX (10)
+#define MM_IRQ_ETHTX (11)
+#define MM_IRQ_VIDEOIN (12)
+#define MM_IRQ_MIDI (13)
+#define MM_IRQ_IR (14)
+#define MM_IRQ_USB (15)
</font>
/* Flash layout */
#define FLASH_BASE (0x80000000)
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>gedare</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
PR 1966/bsps
* milkymist_console/console.c, milkymist_console/uart.c,
milkymist_console/uart.h, milkymist_midi/midi.c: support for the new
UART core and interrupt map
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/ChangeLog.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/lm32/shared/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_console/console.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_console/uart.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_midi/midi.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_midi/midi.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.2 rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.3
--- rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.2 Tue Aug 2 09:04:31 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/ChangeLog Sun Nov 27 11:26:32 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
+
+ PR 1966/bsps
+ * milkymist_console/console.c, milkymist_console/uart.c,
+ milkymist_console/uart.h, milkymist_midi/midi.c: support for the new
+ UART core and interrupt map
+
</font> 2011-08-02 Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com>
PR 1869/bsps
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c:1.2 rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c:1.3
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c:1.2 Mon Aug 1 08:48:39 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c Sun Nov 27 11:26:32 2011
</font><font color='#997700'>@@ -119,25 +119,24 @@
</font> rtems_interrupt_level level;
rtems_interrupt_disable(level);
<font color='#880000'>- BSP_uart_txbusy = true;
</font> MM_WRITE(MM_UART_RXTX, *buf);
rtems_interrupt_enable(level);
return 0;
}
<font color='#880000'>-static rtems_isr mmconsole_txdone(rtems_vector_number n)
-{
- BSP_uart_txbusy = false;
- lm32_interrupt_ack(1 << MM_IRQ_UARTTX);
- rtems_termios_dequeue_characters(tty, 1);
-}
-
-static rtems_isr mmconsole_rxdone(rtems_vector_number n)
</font><font color='#000088'>+static rtems_isr mmconsole_interrupt(rtems_vector_number n)
</font> {
char c;
<font color='#880000'>- c = MM_READ(MM_UART_RXTX);
- lm32_interrupt_ack(1 << MM_IRQ_UARTRX);
- rtems_termios_enqueue_raw_characters(tty, &c, 1);
</font><font color='#000088'>+ while (MM_READ(MM_UART_STAT) & UART_STAT_RX_EVT) {
+ c = MM_READ(MM_UART_RXTX);
+ MM_WRITE(MM_UART_STAT, UART_STAT_RX_EVT);
+ rtems_termios_enqueue_raw_characters(tty, &c, 1);
+ }
+ if (MM_READ(MM_UART_STAT) & UART_STAT_TX_EVT) {
+ MM_WRITE(MM_UART_STAT, UART_STAT_TX_EVT);
+ rtems_termios_dequeue_characters(tty, 1);
+ }
+ lm32_interrupt_ack(1 << MM_IRQ_UART);
</font> }
static const rtems_termios_callbacks mmconsole_callbacks = {
<font color='#997700'>@@ -166,10 +165,9 @@
</font> if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
<font color='#880000'>- rtems_interrupt_catch(mmconsole_txdone, MM_IRQ_UARTTX, &dummy);
- rtems_interrupt_catch(mmconsole_rxdone, MM_IRQ_UARTRX, &dummy);
- bsp_interrupt_vector_enable(MM_IRQ_UARTTX);
- bsp_interrupt_vector_enable(MM_IRQ_UARTRX);
</font><font color='#000088'>+ rtems_interrupt_catch(mmconsole_interrupt, MM_IRQ_UART, &dummy);
+ bsp_interrupt_vector_enable(MM_IRQ_UART);
+ MM_WRITE(MM_UART_CTRL, UART_CTRL_RX_INT|UART_CTRL_TX_INT);
</font>
return RTEMS_SUCCESSFUL;
}
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.h:1.2 rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.h:1.3
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.h:1.2 Mon Aug 1 08:48:39 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.h Sun Nov 27 11:26:32 2011
</font><font color='#997700'>@@ -1,21 +1,16 @@
</font> /*
<font color='#880000'>- * This file contains definitions for LatticeMico32 UART
</font><font color='#000088'>+ * This file contains definitions for the Milkymist UART
</font> *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
<font color='#880000'>- *
- * COPYRIGHT (c) Yann Sionneau <yann.sionneau@telecom-sudparis.eu> (GSoC 2010)
- * Telecom SudParis
</font> */
#ifndef _BSPUART_H
#define _BSPUART_H
<font color='#880000'>-extern bool BSP_uart_txbusy;
-
</font> void BSP_uart_init(int baud);
void BSP_uart_polled_write(char ch);
int BSP_uart_polled_read(void);
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c:1.2 rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c:1.3
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c:1.2 Mon Aug 1 08:48:39 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c Sun Nov 27 11:26:32 2011
</font><font color='#997700'>@@ -17,8 +17,6 @@
</font> #include "../include/system_conf.h"
#include "uart.h"
<font color='#880000'>-bool BSP_uart_txbusy;
-
</font> void BSP_uart_init(int baud)
{
MM_WRITE(MM_UART_DIV, CPU_FREQUENCY/baud/16);
<font color='#997700'>@@ -26,40 +24,24 @@
</font>
void BSP_uart_polled_write(char ch)
{
<font color='#880000'>- int ip;
</font> rtems_interrupt_level level;
rtems_interrupt_disable(level);
<font color='#880000'>- if (BSP_uart_txbusy) {
- /* wait for the end of the transmission by the IRQ-based driver */
- do {
- lm32_read_interrupts(ip);
- } while (!(ip & (1 << MM_IRQ_UARTTX)));
- lm32_interrupt_ack(1 << MM_IRQ_UARTTX);
- }
</font><font color='#000088'>+ while(!(MM_READ(MM_UART_STAT) & UART_STAT_THRE));
</font> MM_WRITE(MM_UART_RXTX, ch);
<font color='#880000'>- do {
- lm32_read_interrupts(ip);
- } while (!(ip & (1 << MM_IRQ_UARTTX)));
- /* if TX was busy, do not ack the IRQ
- * so that the IRQ-based driver ISR is run */
- if (!BSP_uart_txbusy)
- lm32_interrupt_ack(1 << MM_IRQ_UARTTX);
</font><font color='#000088'>+ while(!(MM_READ(MM_UART_STAT) & UART_STAT_THRE));
</font> rtems_interrupt_enable(level);
}
int BSP_uart_polled_read(void)
{
<font color='#880000'>- int ip;
</font> char r;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
<font color='#880000'>- do {
- lm32_read_interrupts(ip);
- } while (!(ip & (1 << MM_IRQ_UARTRX)));
- lm32_interrupt_ack(1 << MM_IRQ_UARTRX);
</font><font color='#000088'>+ while(!(MM_READ(MM_UART_STAT) & UART_STAT_RX_EVT));
</font> r = MM_READ(MM_UART_RXTX);
<font color='#000088'>+ MM_WRITE(MM_UART_STAT, UART_STAT_RX_EVT);
</font> rtems_interrupt_enable(level);
return r;
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_midi/midi.c:1.1 rtems/c/src/lib/libbsp/lm32/shared/milkymist_midi/midi.c:1.2
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_midi/midi.c:1.1 Mon Aug 1 08:48:40 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_midi/midi.c Sun Nov 27 11:26:32 2011
</font><font color='#997700'>@@ -31,9 +31,12 @@
</font> {
unsigned char msg;
<font color='#880000'>- lm32_interrupt_ack(1 << MM_IRQ_MIDIRX);
- msg = MM_READ(MM_MIDI_RXTX);
- rtems_message_queue_send(midi_q, &msg, 1);
</font><font color='#000088'>+ while (MM_READ(MM_MIDI_STAT) & MIDI_STAT_RX_EVT) {
+ msg = MM_READ(MM_MIDI_RXTX);
+ MM_WRITE(MM_MIDI_STAT, MIDI_STAT_RX_EVT);
+ rtems_message_queue_send(midi_q, &msg, 1);
+ }
+ lm32_interrupt_ack(1 << MM_IRQ_MIDI);
</font> }
rtems_device_driver midi_initialize(
<font color='#997700'>@@ -57,11 +60,10 @@
</font> );
RTEMS_CHECK_SC(sc, "create MIDI queue");
<font color='#880000'>- rtems_interrupt_catch(interrupt_handler, MM_IRQ_MIDIRX, &dummy);
- bsp_interrupt_vector_enable(MM_IRQ_MIDIRX);
-
</font><font color='#000088'>+ rtems_interrupt_catch(interrupt_handler, MM_IRQ_MIDI, &dummy);
+ bsp_interrupt_vector_enable(MM_IRQ_MIDI);
</font> /* Only MIDI THRU mode is supported atm */
<font color='#880000'>- MM_WRITE(MM_MIDI_THRU, 1);
</font><font color='#000088'>+ MM_WRITE(MM_MIDI_CTRL, MIDI_CTRL_RX_INT|MIDI_CTRL_THRU);
</font>
return RTEMS_SUCCESSFUL;
}
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>gedare</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
PR 1970/bsps
* include/system_conf.h: Support for the new Milkymist sysctl and clock
frequency detection.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>c/src/lib/libbsp/lm32/milkymist/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/lm32/milkymist/include/system_conf.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog:1.5 rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog:1.6
--- rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog:1.5 Sun Nov 27 11:26:25 2011
+++ rtems/c/src/lib/libbsp/lm32/milkymist/ChangeLog Sun Nov 27 11:30:11 2011
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
<font color='#000088'>+ PR 1970/bsps
+ * include/system_conf.h: Support for the new Milkymist sysctl and clock
+ frequency detection.
+
+2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
+
</font> PR 1966/bsps
* include/system_conf.h: support for the new UART core and interrupt
map
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h:1.3 rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h:1.4
--- rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h:1.3 Sun Nov 27 11:26:25 2011
+++ rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h Sun Nov 27 11:30:11 2011
</font><font color='#997700'>@@ -15,9 +15,11 @@
</font> #ifndef __SYSTEM_CONFIG_H_
#define __SYSTEM_CONFIG_H_
<font color='#880000'>-#define CPU_FREQUENCY (80000000)
</font> #define UART_BAUD_RATE (115200)
<font color='#000088'>+/* Clock frequency */
+#define MM_FREQUENCY (0xe0001074)
+
</font> /* FML bridge */
#define FMLBRG_FLUSH_BASE (0xc8000000)
#define FMLBRG_LINE_LENGTH (32)
<font color='#997700'>@@ -65,10 +67,10 @@
</font> #define GPIO_LED2 (0x00000002)
/* System ID and reset */
<font color='#880000'>-#define MM_SYSTEM_ID (0xe000103c)
</font><font color='#000088'>+#define MM_SYSTEM_ID (0xe000107c)
</font>
/* ICAP */
<font color='#880000'>-#define MM_ICAP (0xe0001034)
</font><font color='#000088'>+#define MM_ICAP (0xe0001040)
</font>
#define ICAP_READY (0x01)
#define ICAP_CE (0x10000)
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>gedare</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
PR 1970/bsps
* milkymist_clock/ckinit.c, milkymist_console/console.c,
milkymist_console/uart.c, milkymist_timer/timer.c: Support for the
new Milkymist sysctl and clock frequency detection.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/ChangeLog.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/lm32/shared/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_console/console.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_timer/timer.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_timer/timer.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.3 rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.4
--- rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.3 Sun Nov 27 11:26:32 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/ChangeLog Sun Nov 27 11:30:18 2011
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
<font color='#000088'>+ PR 1970/bsps
+ * milkymist_clock/ckinit.c, milkymist_console/console.c,
+ milkymist_console/uart.c, milkymist_timer/timer.c: Support for the
+ new Milkymist sysctl and clock frequency detection.
+
+2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
+
</font> PR 1966/bsps
* milkymist_console/console.c, milkymist_console/uart.c,
milkymist_console/uart.h, milkymist_midi/midi.c: support for the new
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c:1.2 rtems/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c:1.3
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c:1.2 Mon Aug 1 08:48:39 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c Sun Nov 27 11:30:18 2011
</font><font color='#997700'>@@ -35,7 +35,7 @@
</font> void Clock_driver_support_initialize_hardware(void)
{
MM_WRITE(MM_TIMER0_COMPARE,<span style="background-color: #FF0000"> </span>
<font color='#880000'>- (CPU_FREQUENCY/(1000000/rtems_configuration_get_microseconds_per_tick())));
</font><font color='#000088'>+ (MM_READ(MM_FREQUENCY)/(1000000/rtems_configuration_get_microseconds_per_tick())));
</font> MM_WRITE(MM_TIMER0_COUNTER, 0);
MM_WRITE(MM_TIMER0_CONTROL, TIMER_ENABLE | TIMER_AUTORESTART);
bsp_interrupt_vector_enable(MM_IRQ_TIMER0);
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c:1.3 rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c:1.4
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c:1.3 Sun Nov 27 11:26:32 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/console.c Sun Nov 27 11:30:18 2011
</font><font color='#997700'>@@ -109,7 +109,7 @@
</font> }
if (baud > 0)
<font color='#880000'>- MM_WRITE(MM_UART_DIV, CPU_FREQUENCY/baud/16);
</font><font color='#000088'>+ MM_WRITE(MM_UART_DIV, MM_READ(MM_FREQUENCY)/baud/16);
</font>
return 0;
}
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c:1.3 rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c:1.4
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c:1.3 Sun Nov 27 11:26:32 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_console/uart.c Sun Nov 27 11:30:18 2011
</font><font color='#997700'>@@ -19,7 +19,7 @@
</font>
void BSP_uart_init(int baud)
{
<font color='#880000'>- MM_WRITE(MM_UART_DIV, CPU_FREQUENCY/baud/16);
</font><font color='#000088'>+ MM_WRITE(MM_UART_DIV, MM_READ(MM_FREQUENCY)/baud/16);
</font> }
void BSP_uart_polled_write(char ch)
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_timer/timer.c:1.3 rtems/c/src/lib/libbsp/lm32/shared/milkymist_timer/timer.c:1.4
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_timer/timer.c:1.3 Mon Aug 1 08:48:40 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_timer/timer.c Sun Nov 27 11:30:18 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> if (ticks == 0xffffffff)
printk("Timer overflow!\n");
<font color='#880000'>- total = ticks / (CPU_FREQUENCY / 1000000);
</font><font color='#000088'>+ total = ticks / (MM_READ(MM_FREQUENCY) / 1000000);
</font>
if (benchmark_timer_find_average_overhead)
return total;
</pre>
<p> </p>
<a name='cs5'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>gedare</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
PR 1972/bsps
* milkymist_video/milkymist_video.h, milkymist_video/video.c: Adds an
ioctl to implement selection of composite on any connector, S-Video
and Component sources on the Milkymist One.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/ChangeLog.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/lm32/shared/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/video.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/lm32/shared/milkymist_video/video.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.4 rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.5
--- rtems/c/src/lib/libbsp/lm32/shared/ChangeLog:1.4 Sun Nov 27 11:30:18 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/ChangeLog Sun Nov 27 11:33:00 2011
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
<font color='#000088'>+ PR 1972/bsps
+ * milkymist_video/milkymist_video.h, milkymist_video/video.c: Adds an
+ ioctl to implement selection of composite on any connector, S-Video
+ and Component sources on the Milkymist One.
+
+2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org>
+
</font> PR 1970/bsps
* milkymist_clock/ckinit.c, milkymist_console/console.c,
milkymist_console/uart.c, milkymist_timer/timer.c: Support for the
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h:1.1 rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h:1.2
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h:1.1 Mon Aug 1 08:48:40 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/milkymist_video.h Sun Nov 27 11:33:00 2011
</font><font color='#997700'>@@ -8,7 +8,7 @@
</font> *
* $Id$
*
<font color='#880000'>- * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
</font><font color='#000088'>+ * COPYRIGHT (c) 2010, 2011 Sebastien Bourdeauducq
</font> */
#ifndef __MILKYMIST_VIDEO_H_
<font color='#997700'>@@ -33,6 +33,16 @@
</font> #define VIDEO_SET_REGISTER 0x5609
#define VIDEO_GET_REGISTER 0x560a
<font color='#000088'>+#define VIDEO_SET_FORMAT 0x560b
+
+enum {
+ VIDEO_FORMAT_CVBS6 = 0,
+ VIDEO_FORMAT_CVBS5,
+ VIDEO_FORMAT_CVBS4,
+ VIDEO_FORMAT_SVIDEO,
+ VIDEO_FORMAT_COMPONENT,
+};
+
</font> rtems_device_driver video_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/video.c:1.1 rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/video.c:1.2
--- rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/video.c:1.1 Mon Aug 1 08:48:40 2011
+++ rtems/c/src/lib/libbsp/lm32/shared/milkymist_video/video.c Sun Nov 27 11:33:00 2011
</font><font color='#997700'>@@ -267,6 +267,37 @@
</font> );
}
<font color='#000088'>+static void set_format(int format)
+{
+ switch(format) {
+ case VIDEO_FORMAT_CVBS6:
+ write_reg(0x00, 0x00);
+ write_reg(0xc3, 0x05);
+ write_reg(0xc4, 0x80);
+ break;
+ case VIDEO_FORMAT_CVBS5:
+ write_reg(0x00, 0x00);
+ write_reg(0xc3, 0x0d);
+ write_reg(0xc4, 0x80);
+ break;
+ case VIDEO_FORMAT_CVBS4:
+ write_reg(0x00, 0x00);
+ write_reg(0xc3, 0x04);
+ write_reg(0xc4, 0x80);
+ break;
+ case VIDEO_FORMAT_SVIDEO:
+ write_reg(0x00, 0x06);
+ write_reg(0xc3, 0xd5);
+ write_reg(0xc4, 0x80);
+ break;
+ case VIDEO_FORMAT_COMPONENT:
+ write_reg(0x00, 0x09);
+ write_reg(0xc3, 0x45);
+ write_reg(0xc4, 0x8d);
+ break;
+ }
+}
+
</font> rtems_device_driver video_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
<font color='#997700'>@@ -333,7 +364,7 @@
</font> break;
case VIDEO_SET_REGISTER:
<font color='#880000'>- write_reg(((unsigned int )a & 0xffff0000) >> 16,
</font><font color='#000088'>+ write_reg(((unsigned int)a & 0xffff0000) >> 16,
</font> (unsigned int)a & 0x0000ffff);
sc = RTEMS_SUCCESSFUL;
break;
<font color='#997700'>@@ -342,6 +373,11 @@
</font> sc = RTEMS_SUCCESSFUL;
break;
<font color='#000088'>+ case VIDEO_SET_FORMAT:
+ set_format((int)a);
+ sc = RTEMS_SUCCESSFUL;
+ break;
+<span style="background-color: #FF0000"> </span>
</font> default:
sc = RTEMS_UNSATISFIED;
break;
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>