* [PATCH 2/10] CRIS architecture update - Drivers
@ 2004-11-02 13:04 Mikael Starvik
2004-11-02 22:55 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Starvik @ 2004-11-02 13:04 UTC (permalink / raw)
To: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
Patches for the simple character based drivers.
Signed-Off-By: starvik@axis.com
/Mikael
[-- Attachment #2: cris269_2.patch --]
[-- Type: application/octet-stream, Size: 11705 bytes --]
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/axisflashmap.c lx25/arch/cris/arch-v10/drivers/axisflashmap.c
--- ../linux/arch/cris/arch-v10/drivers/axisflashmap.c Mon Oct 18 23:54:54 2004
+++ lx25/arch/cris/arch-v10/drivers/axisflashmap.c Mon Aug 16 14:37:22 2004
@@ -11,6 +11,9 @@
* partition split defined below.
*
* $Log: axisflashmap.c,v $
+ * Revision 1.10 2004/08/16 12:37:22 starvik
+ * Merge of Linux 2.6.8
+ *
* Revision 1.8 2004/05/14 07:58:03 starvik
* Merge of changes from 2.4
*
@@ -153,6 +156,14 @@
#define FLASH_CACHED_ADDR KSEG_F
#endif
+#if CONFIG_ETRAX_FLASH_BUSWIDTH==1
+#define flash_data __u8
+#elif CONFIG_ETRAX_FLASH_BUSWIDTH==2
+#define flash_data __u16
+#elif CONFIG_ETRAX_FLASH_BUSWIDTH==4
+#define flash_data __u16
+#endif
+
/* From head.S */
extern unsigned long romfs_start, romfs_length, romfs_in_flash;
@@ -161,19 +172,11 @@
/* Map driver functions. */
-static __u8 flash_read8(struct map_info *map, unsigned long ofs)
-{
- return *(__u8 *)(map->map_priv_1 + ofs);
-}
-
-static __u16 flash_read16(struct map_info *map, unsigned long ofs)
+static map_word flash_read(struct map_info *map, unsigned long ofs)
{
- return *(__u16 *)(map->map_priv_1 + ofs);
-}
-
-static __u32 flash_read32(struct map_info *map, unsigned long ofs)
-{
- return *(volatile unsigned int *)(map->map_priv_1 + ofs);
+ map_word tmp;
+ tmp.x[0] = *(flash_data *)(map->map_priv_1 + ofs);
+ return tmp;
}
static void flash_copy_from(struct map_info *map, void *to,
@@ -182,19 +185,9 @@
memcpy(to, (void *)(map->map_priv_1 + from), len);
}
-static void flash_write8(struct map_info *map, __u8 d, unsigned long adr)
-{
- *(__u8 *)(map->map_priv_1 + adr) = d;
-}
-
-static void flash_write16(struct map_info *map, __u16 d, unsigned long adr)
-{
- *(__u16 *)(map->map_priv_1 + adr) = d;
-}
-
-static void flash_write32(struct map_info *map, __u32 d, unsigned long adr)
+static void flash_write(struct map_info *map, map_word d, unsigned long adr)
{
- *(__u32 *)(map->map_priv_1 + adr) = d;
+ *(flash_data *)(map->map_priv_1 + adr) = (flash_data)d.x[0];
}
/*
@@ -215,14 +208,10 @@
static struct map_info map_cse0 = {
.name = "cse0",
.size = MEM_CSE0_SIZE,
- .buswidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
- .read8 = flash_read8,
- .read16 = flash_read16,
- .read32 = flash_read32,
+ .bankwidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
+ .read = flash_read,
.copy_from = flash_copy_from,
- .write8 = flash_write8,
- .write16 = flash_write16,
- .write32 = flash_write32,
+ .write = flash_write,
.map_priv_1 = FLASH_UNCACHED_ADDR
};
@@ -235,14 +224,10 @@
static struct map_info map_cse1 = {
.name = "cse1",
.size = MEM_CSE1_SIZE,
- .buswidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
- .read8 = flash_read8,
- .read16 = flash_read16,
- .read32 = flash_read32,
+ .bankwidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
+ .read = flash_read,
.copy_from = flash_copy_from,
- .write8 = flash_write8,
- .write16 = flash_write16,
- .write32 = flash_write32,
+ .write = flash_write,
.map_priv_1 = FLASH_UNCACHED_ADDR + MEM_CSE0_SIZE
};
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/ds1302.c lx25/arch/cris/arch-v10/drivers/ds1302.c
--- ../linux/arch/cris/arch-v10/drivers/ds1302.c Mon Oct 18 23:55:07 2004
+++ lx25/arch/cris/arch-v10/drivers/ds1302.c Tue Aug 24 08:48:43 2004
@@ -7,6 +7,9 @@
*! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init
*!
*! $Log: ds1302.c,v $
+*! Revision 1.14 2004/08/24 06:48:43 starvik
+*! Whitespace cleanup
+*!
*! Revision 1.13 2004/05/28 09:26:59 starvik
*! Modified I2C initialization to work in 2.6.
*!
@@ -123,7 +126,7 @@
*!
*! (C) Copyright 1999, 2000, 2001 Axis Communications AB, LUND, SWEDEN
*!
-*! $Id: ds1302.c,v 1.13 2004/05/28 09:26:59 starvik Exp $
+*! $Id: ds1302.c,v 1.14 2004/08/24 06:48:43 starvik Exp $
*!
*!***************************************************************************/
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/gpio.c lx25/arch/cris/arch-v10/drivers/gpio.c
--- ../linux/arch/cris/arch-v10/drivers/gpio.c Mon Oct 18 23:53:06 2004
+++ lx25/arch/cris/arch-v10/drivers/gpio.c Tue Aug 24 09:19:59 2004
@@ -1,4 +1,4 @@
-/* $Id: gpio.c,v 1.11 2004/05/14 07:58:03 starvik Exp $
+/* $Id: gpio.c,v 1.12 2004/08/24 07:19:59 starvik Exp $
*
* Etrax general port I/O device
*
@@ -9,6 +9,9 @@
* Johan Adolfsson (read/set directions, write, port G)
*
* $Log: gpio.c,v $
+ * Revision 1.12 2004/08/24 07:19:59 starvik
+ * Whitespace cleanup
+ *
* Revision 1.11 2004/05/14 07:58:03 starvik
* Merge of changes from 2.4
*
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/i2c.c lx25/arch/cris/arch-v10/drivers/i2c.c
--- ../linux/arch/cris/arch-v10/drivers/i2c.c Mon Oct 18 23:53:11 2004
+++ lx25/arch/cris/arch-v10/drivers/i2c.c Tue Aug 24 08:49:14 2004
@@ -12,6 +12,12 @@
*! don't use PB_I2C if DS1302 uses same bits,
*! use PB.
*! $Log: i2c.c,v $
+*! Revision 1.9 2004/08/24 06:49:14 starvik
+*! Whitespace cleanup
+*!
+*! Revision 1.8 2004/06/08 08:48:26 starvik
+*! Removed unused code
+*!
*! Revision 1.7 2004/05/28 09:26:59 starvik
*! Modified I2C initialization to work in 2.6.
*!
@@ -69,7 +75,7 @@
*! (C) Copyright 1999-2002 Axis Communications AB, LUND, SWEDEN
*!
*!***************************************************************************/
-/* $Id: i2c.c,v 1.7 2004/05/28 09:26:59 starvik Exp $ */
+/* $Id: i2c.c,v 1.9 2004/08/24 06:49:14 starvik Exp $ */
/****************** INCLUDE FILES SECTION ***********************************/
@@ -110,14 +116,6 @@
#define I2C_DATA_HIGH 1
#define I2C_DATA_LOW 0
-#if 0
-/* TODO: fix this so the CONFIG_ETRAX_I2C_USES... is set in Config.in instead */
-#if defined(CONFIG_DS1302) && (CONFIG_DS1302_SDABIT==0) && \
- (CONFIG_DS1302_SCLBIT == 1)
-#define CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C
-#endif
-#endif
-
#ifdef CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C
/* Use PB and not PB_I2C */
#ifndef CONFIG_ETRAX_I2C_DATA_PORT
@@ -441,7 +439,7 @@
*/
i2c_data(I2C_DATA_HIGH);
i2c_delay(CLOCK_LOW_TIME);
-
+
i2c_dir_in();
}
@@ -472,7 +470,7 @@
i2c_delay(CLOCK_HIGH_TIME);
i2c_clk(I2C_CLOCK_LOW);
i2c_delay(CLOCK_LOW_TIME);
-
+
i2c_dir_in();
}
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/pcf8563.c lx25/arch/cris/arch-v10/drivers/pcf8563.c
--- ../linux/arch/cris/arch-v10/drivers/pcf8563.c Mon Oct 18 23:53:46 2004
+++ lx25/arch/cris/arch-v10/drivers/pcf8563.c Tue Aug 24 08:42:51 2004
@@ -15,7 +15,7 @@
*
* Author: Tobias Anderberg <tobiasa@axis.com>.
*
- * $Id: pcf8563.c,v 1.4 2004/05/28 09:26:59 starvik Exp $
+ * $Id: pcf8563.c,v 1.8 2004/08/24 06:42:51 starvik Exp $
*/
#include <linux/config.h>
@@ -40,7 +40,7 @@
#define PCF8563_MAJOR 121 /* Local major number. */
#define DEVICE_NAME "rtc" /* Name which is registered in /proc/devices. */
#define PCF8563_NAME "PCF8563"
-#define DRIVER_VERSION "$Revision: 1.4 $"
+#define DRIVER_VERSION "$Revision: 1.8 $"
/* I2C bus slave registers. */
#define RTC_I2C_READ 0xa3
@@ -295,7 +295,7 @@
return 0;
}
-static int __init
+static int __init
pcf8563_register(void)
{
pcf8563_init();
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/serial.c lx25/arch/cris/arch-v10/drivers/serial.c
--- ../linux/arch/cris/arch-v10/drivers/serial.c Mon Oct 18 23:54:38 2004
+++ lx25/arch/cris/arch-v10/drivers/serial.c Wed Sep 29 12:33:49 2004
@@ -1,4 +1,4 @@
-/* $Id: serial.c,v 1.20 2004/05/24 12:00:20 starvik Exp $
+/* $Id: serial.c,v 1.25 2004/09/29 10:33:49 starvik Exp $
*
* Serial port driver for the ETRAX 100LX chip
*
@@ -7,6 +7,20 @@
* Many, many authors. Based once upon a time on serial.c for 16x50.
*
* $Log: serial.c,v $
+ * Revision 1.25 2004/09/29 10:33:49 starvik
+ * Resolved a dealock when printing debug from kernel.
+ *
+ * Revision 1.24 2004/08/27 23:25:59 johana
+ * rs_set_termios() must call change_speed() if c_iflag has changed or
+ * automatic XOFF handling will be enabled and transmitter will stop
+ * if 0x13 is received.
+ *
+ * Revision 1.23 2004/08/24 06:57:13 starvik
+ * More whitespace cleanup
+ *
+ * Revision 1.22 2004/08/24 06:12:20 starvik
+ * Whitespace cleanup
+ *
* Revision 1.20 2004/05/24 12:00:20 starvik
* Big merge of stuff from Linux 2.4 (e.g. manual mode for the serial port).
*
@@ -409,7 +423,7 @@
*
*/
-static char *serial_version = "$Revision: 1.20 $";
+static char *serial_version = "$Revision: 1.25 $";
#include <linux/config.h>
#include <linux/version.h>
@@ -647,7 +661,7 @@
#ifdef CONFIG_ETRAX_SERIAL_PORT3
| IO_MASK(R_IRQ_MASK1_RD, ser3_data) | IO_MASK(R_IRQ_MASK1_RD, ser3_ready)
#endif
-;
+;
unsigned long r_alt_ser_baudrate_shadow = 0;
/* this is the data for the four serial ports in the etrax100 */
@@ -2541,7 +2555,7 @@
DFLOW(DEBUG_LOG(info->line,"flush_to_flip throttles again! %lu\n", max_flip_size));
rs_throttle(tty);
}
-#endif
+#endif
}
if (max_flip_size > TTY_FLIPBUF_SIZE)
@@ -2560,7 +2574,7 @@
length += count;
info->recv_cnt -= count;
DFLIP(DEBUG_LOG(info->line,"flip: %i\n", length));
-
+
if (count == buffer->length) {
info->first_recv_buffer = buffer->next;
kfree(buffer);
@@ -3460,7 +3474,7 @@
u16 divisor = info->custom_divisor;
/* R_SERIAL_PRESCALE (upper 16 bits of R_CLOCK_PRESCALE) */
/* baudrate is 3.125MHz/custom_divisor */
- alt_source =
+ alt_source =
IO_STATE(R_ALT_SER_BAUDRATE, ser0_rec, prescale) |
IO_STATE(R_ALT_SER_BAUDRATE, ser0_tr, prescale);
alt_source = 0x11;
@@ -3684,7 +3698,7 @@
up(&tmp_buf_sem);
} else {
cli();
- while (1) {
+ while (count) {
c = CIRC_SPACE_TO_END(info->xmit.head,
info->xmit.tail,
SERIAL_XMIT_SIZE);
@@ -3980,12 +3994,12 @@
if (info->count > 1)
return -EBUSY;
-
+
/*
* OK, past this point, all the error checking has been done.
* At this point, we start making changes.....
*/
-
+
info->baud_base = new_serial.baud_base;
info->flags = ((info->flags & ~ASYNC_FLAGS) |
(new_serial.flags & ASYNC_FLAGS));
@@ -4252,7 +4266,8 @@
{
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
- if (tty->termios->c_cflag == old_termios->c_cflag)
+ if (tty->termios->c_cflag == old_termios->c_cflag &&
+ tty->termios->c_iflag == old_termios->c_iflag)
return;
change_speed(info);
@@ -4276,6 +4291,7 @@
static int rs_debug_write_function(int i, const char *buf, unsigned int len)
{
int cnt;
+ int written = 0;
struct tty_struct *tty;
static int recurse_cnt = 0;
@@ -4287,14 +4303,17 @@
local_irq_save(flags);
recurse_cnt++;
+ local_irq_restore(flags);
do {
- cnt = rs_write(tty, 0, buf, len);
+ cnt = rs_write(tty, 0, buf + written, len);
if (cnt >= 0) {
+ written += cnt;
buf += cnt;
len -= cnt;
} else
len = cnt;
} while(len > 0);
+ local_irq_save(flags);
recurse_cnt--;
local_irq_restore(flags);
return 1;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/10] CRIS architecture update - Drivers
2004-11-02 13:04 [PATCH 2/10] CRIS architecture update - Drivers Mikael Starvik
@ 2004-11-02 22:55 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-11-02 22:55 UTC (permalink / raw)
To: Mikael Starvik; +Cc: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
Any chance you could share code with drivers/char/ds1302.c so we don't
have two almost identical copies of that driver?
[-- Attachment #2: cris269_2.patch --]
[-- Type: application/octet-stream, Size: 11705 bytes --]
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/axisflashmap.c lx25/arch/cris/arch-v10/drivers/axisflashmap.c
--- ../linux/arch/cris/arch-v10/drivers/axisflashmap.c Mon Oct 18 23:54:54 2004
+++ lx25/arch/cris/arch-v10/drivers/axisflashmap.c Mon Aug 16 14:37:22 2004
@@ -11,6 +11,9 @@
* partition split defined below.
*
* $Log: axisflashmap.c,v $
+ * Revision 1.10 2004/08/16 12:37:22 starvik
+ * Merge of Linux 2.6.8
+ *
* Revision 1.8 2004/05/14 07:58:03 starvik
* Merge of changes from 2.4
*
@@ -153,6 +156,14 @@
#define FLASH_CACHED_ADDR KSEG_F
#endif
+#if CONFIG_ETRAX_FLASH_BUSWIDTH==1
+#define flash_data __u8
+#elif CONFIG_ETRAX_FLASH_BUSWIDTH==2
+#define flash_data __u16
+#elif CONFIG_ETRAX_FLASH_BUSWIDTH==4
+#define flash_data __u16
+#endif
+
/* From head.S */
extern unsigned long romfs_start, romfs_length, romfs_in_flash;
@@ -161,19 +172,11 @@
/* Map driver functions. */
-static __u8 flash_read8(struct map_info *map, unsigned long ofs)
-{
- return *(__u8 *)(map->map_priv_1 + ofs);
-}
-
-static __u16 flash_read16(struct map_info *map, unsigned long ofs)
+static map_word flash_read(struct map_info *map, unsigned long ofs)
{
- return *(__u16 *)(map->map_priv_1 + ofs);
-}
-
-static __u32 flash_read32(struct map_info *map, unsigned long ofs)
-{
- return *(volatile unsigned int *)(map->map_priv_1 + ofs);
+ map_word tmp;
+ tmp.x[0] = *(flash_data *)(map->map_priv_1 + ofs);
+ return tmp;
}
static void flash_copy_from(struct map_info *map, void *to,
@@ -182,19 +185,9 @@
memcpy(to, (void *)(map->map_priv_1 + from), len);
}
-static void flash_write8(struct map_info *map, __u8 d, unsigned long adr)
-{
- *(__u8 *)(map->map_priv_1 + adr) = d;
-}
-
-static void flash_write16(struct map_info *map, __u16 d, unsigned long adr)
-{
- *(__u16 *)(map->map_priv_1 + adr) = d;
-}
-
-static void flash_write32(struct map_info *map, __u32 d, unsigned long adr)
+static void flash_write(struct map_info *map, map_word d, unsigned long adr)
{
- *(__u32 *)(map->map_priv_1 + adr) = d;
+ *(flash_data *)(map->map_priv_1 + adr) = (flash_data)d.x[0];
}
/*
@@ -215,14 +208,10 @@
static struct map_info map_cse0 = {
.name = "cse0",
.size = MEM_CSE0_SIZE,
- .buswidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
- .read8 = flash_read8,
- .read16 = flash_read16,
- .read32 = flash_read32,
+ .bankwidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
+ .read = flash_read,
.copy_from = flash_copy_from,
- .write8 = flash_write8,
- .write16 = flash_write16,
- .write32 = flash_write32,
+ .write = flash_write,
.map_priv_1 = FLASH_UNCACHED_ADDR
};
@@ -235,14 +224,10 @@
static struct map_info map_cse1 = {
.name = "cse1",
.size = MEM_CSE1_SIZE,
- .buswidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
- .read8 = flash_read8,
- .read16 = flash_read16,
- .read32 = flash_read32,
+ .bankwidth = CONFIG_ETRAX_FLASH_BUSWIDTH,
+ .read = flash_read,
.copy_from = flash_copy_from,
- .write8 = flash_write8,
- .write16 = flash_write16,
- .write32 = flash_write32,
+ .write = flash_write,
.map_priv_1 = FLASH_UNCACHED_ADDR + MEM_CSE0_SIZE
};
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/ds1302.c lx25/arch/cris/arch-v10/drivers/ds1302.c
--- ../linux/arch/cris/arch-v10/drivers/ds1302.c Mon Oct 18 23:55:07 2004
+++ lx25/arch/cris/arch-v10/drivers/ds1302.c Tue Aug 24 08:48:43 2004
@@ -7,6 +7,9 @@
*! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init
*!
*! $Log: ds1302.c,v $
+*! Revision 1.14 2004/08/24 06:48:43 starvik
+*! Whitespace cleanup
+*!
*! Revision 1.13 2004/05/28 09:26:59 starvik
*! Modified I2C initialization to work in 2.6.
*!
@@ -123,7 +126,7 @@
*!
*! (C) Copyright 1999, 2000, 2001 Axis Communications AB, LUND, SWEDEN
*!
-*! $Id: ds1302.c,v 1.13 2004/05/28 09:26:59 starvik Exp $
+*! $Id: ds1302.c,v 1.14 2004/08/24 06:48:43 starvik Exp $
*!
*!***************************************************************************/
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/gpio.c lx25/arch/cris/arch-v10/drivers/gpio.c
--- ../linux/arch/cris/arch-v10/drivers/gpio.c Mon Oct 18 23:53:06 2004
+++ lx25/arch/cris/arch-v10/drivers/gpio.c Tue Aug 24 09:19:59 2004
@@ -1,4 +1,4 @@
-/* $Id: gpio.c,v 1.11 2004/05/14 07:58:03 starvik Exp $
+/* $Id: gpio.c,v 1.12 2004/08/24 07:19:59 starvik Exp $
*
* Etrax general port I/O device
*
@@ -9,6 +9,9 @@
* Johan Adolfsson (read/set directions, write, port G)
*
* $Log: gpio.c,v $
+ * Revision 1.12 2004/08/24 07:19:59 starvik
+ * Whitespace cleanup
+ *
* Revision 1.11 2004/05/14 07:58:03 starvik
* Merge of changes from 2.4
*
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/i2c.c lx25/arch/cris/arch-v10/drivers/i2c.c
--- ../linux/arch/cris/arch-v10/drivers/i2c.c Mon Oct 18 23:53:11 2004
+++ lx25/arch/cris/arch-v10/drivers/i2c.c Tue Aug 24 08:49:14 2004
@@ -12,6 +12,12 @@
*! don't use PB_I2C if DS1302 uses same bits,
*! use PB.
*! $Log: i2c.c,v $
+*! Revision 1.9 2004/08/24 06:49:14 starvik
+*! Whitespace cleanup
+*!
+*! Revision 1.8 2004/06/08 08:48:26 starvik
+*! Removed unused code
+*!
*! Revision 1.7 2004/05/28 09:26:59 starvik
*! Modified I2C initialization to work in 2.6.
*!
@@ -69,7 +75,7 @@
*! (C) Copyright 1999-2002 Axis Communications AB, LUND, SWEDEN
*!
*!***************************************************************************/
-/* $Id: i2c.c,v 1.7 2004/05/28 09:26:59 starvik Exp $ */
+/* $Id: i2c.c,v 1.9 2004/08/24 06:49:14 starvik Exp $ */
/****************** INCLUDE FILES SECTION ***********************************/
@@ -110,14 +116,6 @@
#define I2C_DATA_HIGH 1
#define I2C_DATA_LOW 0
-#if 0
-/* TODO: fix this so the CONFIG_ETRAX_I2C_USES... is set in Config.in instead */
-#if defined(CONFIG_DS1302) && (CONFIG_DS1302_SDABIT==0) && \
- (CONFIG_DS1302_SCLBIT == 1)
-#define CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C
-#endif
-#endif
-
#ifdef CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C
/* Use PB and not PB_I2C */
#ifndef CONFIG_ETRAX_I2C_DATA_PORT
@@ -441,7 +439,7 @@
*/
i2c_data(I2C_DATA_HIGH);
i2c_delay(CLOCK_LOW_TIME);
-
+
i2c_dir_in();
}
@@ -472,7 +470,7 @@
i2c_delay(CLOCK_HIGH_TIME);
i2c_clk(I2C_CLOCK_LOW);
i2c_delay(CLOCK_LOW_TIME);
-
+
i2c_dir_in();
}
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/pcf8563.c lx25/arch/cris/arch-v10/drivers/pcf8563.c
--- ../linux/arch/cris/arch-v10/drivers/pcf8563.c Mon Oct 18 23:53:46 2004
+++ lx25/arch/cris/arch-v10/drivers/pcf8563.c Tue Aug 24 08:42:51 2004
@@ -15,7 +15,7 @@
*
* Author: Tobias Anderberg <tobiasa@axis.com>.
*
- * $Id: pcf8563.c,v 1.4 2004/05/28 09:26:59 starvik Exp $
+ * $Id: pcf8563.c,v 1.8 2004/08/24 06:42:51 starvik Exp $
*/
#include <linux/config.h>
@@ -40,7 +40,7 @@
#define PCF8563_MAJOR 121 /* Local major number. */
#define DEVICE_NAME "rtc" /* Name which is registered in /proc/devices. */
#define PCF8563_NAME "PCF8563"
-#define DRIVER_VERSION "$Revision: 1.4 $"
+#define DRIVER_VERSION "$Revision: 1.8 $"
/* I2C bus slave registers. */
#define RTC_I2C_READ 0xa3
@@ -295,7 +295,7 @@
return 0;
}
-static int __init
+static int __init
pcf8563_register(void)
{
pcf8563_init();
diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v10/drivers/serial.c lx25/arch/cris/arch-v10/drivers/serial.c
--- ../linux/arch/cris/arch-v10/drivers/serial.c Mon Oct 18 23:54:38 2004
+++ lx25/arch/cris/arch-v10/drivers/serial.c Wed Sep 29 12:33:49 2004
@@ -1,4 +1,4 @@
-/* $Id: serial.c,v 1.20 2004/05/24 12:00:20 starvik Exp $
+/* $Id: serial.c,v 1.25 2004/09/29 10:33:49 starvik Exp $
*
* Serial port driver for the ETRAX 100LX chip
*
@@ -7,6 +7,20 @@
* Many, many authors. Based once upon a time on serial.c for 16x50.
*
* $Log: serial.c,v $
+ * Revision 1.25 2004/09/29 10:33:49 starvik
+ * Resolved a dealock when printing debug from kernel.
+ *
+ * Revision 1.24 2004/08/27 23:25:59 johana
+ * rs_set_termios() must call change_speed() if c_iflag has changed or
+ * automatic XOFF handling will be enabled and transmitter will stop
+ * if 0x13 is received.
+ *
+ * Revision 1.23 2004/08/24 06:57:13 starvik
+ * More whitespace cleanup
+ *
+ * Revision 1.22 2004/08/24 06:12:20 starvik
+ * Whitespace cleanup
+ *
* Revision 1.20 2004/05/24 12:00:20 starvik
* Big merge of stuff from Linux 2.4 (e.g. manual mode for the serial port).
*
@@ -409,7 +423,7 @@
*
*/
-static char *serial_version = "$Revision: 1.20 $";
+static char *serial_version = "$Revision: 1.25 $";
#include <linux/config.h>
#include <linux/version.h>
@@ -647,7 +661,7 @@
#ifdef CONFIG_ETRAX_SERIAL_PORT3
| IO_MASK(R_IRQ_MASK1_RD, ser3_data) | IO_MASK(R_IRQ_MASK1_RD, ser3_ready)
#endif
-;
+;
unsigned long r_alt_ser_baudrate_shadow = 0;
/* this is the data for the four serial ports in the etrax100 */
@@ -2541,7 +2555,7 @@
DFLOW(DEBUG_LOG(info->line,"flush_to_flip throttles again! %lu\n", max_flip_size));
rs_throttle(tty);
}
-#endif
+#endif
}
if (max_flip_size > TTY_FLIPBUF_SIZE)
@@ -2560,7 +2574,7 @@
length += count;
info->recv_cnt -= count;
DFLIP(DEBUG_LOG(info->line,"flip: %i\n", length));
-
+
if (count == buffer->length) {
info->first_recv_buffer = buffer->next;
kfree(buffer);
@@ -3460,7 +3474,7 @@
u16 divisor = info->custom_divisor;
/* R_SERIAL_PRESCALE (upper 16 bits of R_CLOCK_PRESCALE) */
/* baudrate is 3.125MHz/custom_divisor */
- alt_source =
+ alt_source =
IO_STATE(R_ALT_SER_BAUDRATE, ser0_rec, prescale) |
IO_STATE(R_ALT_SER_BAUDRATE, ser0_tr, prescale);
alt_source = 0x11;
@@ -3684,7 +3698,7 @@
up(&tmp_buf_sem);
} else {
cli();
- while (1) {
+ while (count) {
c = CIRC_SPACE_TO_END(info->xmit.head,
info->xmit.tail,
SERIAL_XMIT_SIZE);
@@ -3980,12 +3994,12 @@
if (info->count > 1)
return -EBUSY;
-
+
/*
* OK, past this point, all the error checking has been done.
* At this point, we start making changes.....
*/
-
+
info->baud_base = new_serial.baud_base;
info->flags = ((info->flags & ~ASYNC_FLAGS) |
(new_serial.flags & ASYNC_FLAGS));
@@ -4252,7 +4266,8 @@
{
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
- if (tty->termios->c_cflag == old_termios->c_cflag)
+ if (tty->termios->c_cflag == old_termios->c_cflag &&
+ tty->termios->c_iflag == old_termios->c_iflag)
return;
change_speed(info);
@@ -4276,6 +4291,7 @@
static int rs_debug_write_function(int i, const char *buf, unsigned int len)
{
int cnt;
+ int written = 0;
struct tty_struct *tty;
static int recurse_cnt = 0;
@@ -4287,14 +4303,17 @@
local_irq_save(flags);
recurse_cnt++;
+ local_irq_restore(flags);
do {
- cnt = rs_write(tty, 0, buf, len);
+ cnt = rs_write(tty, 0, buf + written, len);
if (cnt >= 0) {
+ written += cnt;
buf += cnt;
len -= cnt;
} else
len = cnt;
} while(len > 0);
+ local_irq_save(flags);
recurse_cnt--;
local_irq_restore(flags);
return 1;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/10] CRIS architecture update - Drivers
2004-11-03 7:54 ` Mikael Starvik
@ 2004-11-03 9:59 ` 'Christoph Hellwig'
0 siblings, 0 replies; 4+ messages in thread
From: 'Christoph Hellwig' @ 2004-11-03 9:59 UTC (permalink / raw)
To: Mikael Starvik; +Cc: 'Christoph Hellwig', linux-kernel, akpm
On Wed, Nov 03, 2004 at 08:54:31AM +0100, Mikael Starvik wrote:
> Where is that driver? Can't find it in 2.6.9.
It has been added after 2.6.9. Try to get a current snapshot from
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 2/10] CRIS architecture update - Drivers
[not found] <BFECAF9E178F144FAEF2BF4CE739C66801AF7431@exmail1.se.axis.com>
@ 2004-11-03 7:54 ` Mikael Starvik
2004-11-03 9:59 ` 'Christoph Hellwig'
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Starvik @ 2004-11-03 7:54 UTC (permalink / raw)
To: 'Christoph Hellwig', Mikael Starvik; +Cc: linux-kernel, akpm
Where is that driver? Can't find it in 2.6.9.
-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Tuesday, November 02, 2004 11:55 PM
To: Mikael Starvik
Cc: linux-kernel@vger.kernel.org; akpm@osdl.org
Subject: Re: [PATCH 2/10] CRIS architecture update - Drivers
Any chance you could share code with drivers/char/ds1302.c so we don't
have two almost identical copies of that driver?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-03 9:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-02 13:04 [PATCH 2/10] CRIS architecture update - Drivers Mikael Starvik
2004-11-02 22:55 ` Christoph Hellwig
[not found] <BFECAF9E178F144FAEF2BF4CE739C66801AF7431@exmail1.se.axis.com>
2004-11-03 7:54 ` Mikael Starvik
2004-11-03 9:59 ` 'Christoph Hellwig'
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®