Re: [uClinux-dev] [PATCH]Driver for access to MCF IPS

2007-05-14 Thread Greg Ungerer

Hi Steve,

Steve Bennett wrote:

This patch adds a driver for simple access to the
Coldfire Internal Peripheral System (IPS) address space
via the /dev/ips char device.

Signed-Off-By: Steve Bennett [EMAIL PROTECTED]


I have some reservations about this one. Working with peripheral
space registers from user space is not something I want to
encourage.

And, even if I did, wouldn't mmap be a better interface to
them?

Regards
greg




diff -urN uClinux-dist.orig/linux-2.6.x/drivers/char/Makefile 
uClinux-dist/linux-2.6.x/drivers/char/Makefile
--- uClinux-dist.orig/linux-2.6.x/drivers/char/Makefile 2006-11-30 
12:03:15.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/char/Makefile  2007-05-11 
16:12:16.0 +1000
@@ -54,6 +54,7 @@
 obj-$(CONFIG_HVCS) += hvcs.o
 obj-$(CONFIG_SGI_MBCS) += mbcs.o
 obj-$(CONFIG_MCF_QSPI) += mcf_qspi.o
+obj-$(CONFIG_MCF_IPS)  += mcf_ips.o
 obj-$(CONFIG_BRIQ_PANEL)   += briq_panel.o
 
 obj-$(CONFIG_PRINTER)		+= lp.o

diff -urN uClinux-dist.orig/linux-2.6.x/drivers/char/mcf_ips.c 
uClinux-dist/linux-2.6.x/drivers/char/mcf_ips.c
--- uClinux-dist.orig/linux-2.6.x/drivers/char/mcf_ips.c1970-01-01 
10:00:00.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/char/mcf_ips.c 2007-05-11 
16:12:16.0 +1000
@@ -0,0 +1,184 @@
+/*
+ * linux-2.4.x/drivers/char/mcf_ips.c
+ *
+ * Internal Peripheral System Access Driver
+ *
+ * Copyright (C) 2005 Intec Automation ([EMAIL PROTECTED])
+ *
+ *
+ * Provides simple access to the Coldfire Internal Peripheral System
+ * address space via the /dev/ips char device.
+ *
+ */
+
+#include linux/module.h
+#include linux/init.h
+#include linux/types.h
+#include linux/errno.h
+#include linux/fs.h
+#include linux/device.h
+#include linux/miscdevice.h
+
+#define DEVICE_NAME ips
+
+/* Use a dynamically assigned misc device minor */
+/*#define IPS_MAJOR 0*/
+/* Or a statically assigned device major */
+#define IPS_MAJOR 122
+
+MODULE_AUTHOR(Mike Lavender [EMAIL PROTECTED]);
+MODULE_DESCRIPTION(Driver for Reading and Writing Peripherals);
+MODULE_SUPPORTED_DEVICE(Motorola MCF5282);
+MODULE_LICENSE(GPL);
+
+/* ioctl to set the read/write address */
+#define IPS_REG_SET 1
+
+static ssize_t
+ips_read(
+struct file *file,
+char *buffer,
+size_t length,
+loff_t *offset )
+{
+int ret = 0;
+
+switch (length)
+{
+case 1:
+*(char *)buffer = *(char *)file-private_data;
+ret = 1;
+break;
+case 2:
+*(short *)buffer = *(short *)file-private_data;
+ret = 2;
+break;
+case 4:
+*(int *)buffer = *(int *)file-private_data;
+ret = 4;
+break;
+default:
+memcpy( buffer, (char *)file-private_data, length );
+ret = length;
+}
+
+return (ret);
+}
+
+static ssize_t
+ips_write(
+struct file *file,
+const char *buffer,
+size_t length,
+loff_t *offset )
+{
+int ret = 0;
+
+switch (length)
+{
+case 1:
+*(char *)file-private_data = *(char *)buffer;
+ret = 1;
+break;
+case 2:
+*(short *)file-private_data = *(short *)buffer;
+ret = 2;
+break;
+case 4:
+*(int *)file-private_data = *(int *)buffer;
+ret = 4;
+break;
+default:
+memcpy( (char *)file-private_data, buffer, length );
+ret = length;
+}
+
+return (ret);
+}
+
+int
+ips_ioctl(
+struct inode *inode,
+struct file *file,
+unsigned int ioctl_num,
+unsigned long ioctl_param )
+{
+int ret = 0;
+
+switch (ioctl_num) {
+case IPS_REG_SET:
+file-private_data = (void *)ioctl_param;
+break;
+default:
+ret = -EINVAL;
+}
+
+return (ret);
+}
+
+static int
+ips_open(
+struct inode *inode,
+struct file *file )
+{
+return 0;
+}
+
+static int
+ips_release(
+struct inode *inode,
+struct file *file )
+{
+return 0;
+}
+
+/*  fixed for 2.4 kernel, owner was ifdef'ed out for 2.0 kernel */
+static struct file_operations fops = {
+owner:  THIS_MODULE,
+read:   ips_read,
+write:  ips_write,
+ioctl:  ips_ioctl,
+open:   ips_open,
+release:ips_release  /* a.k.a. close */
+};
+
+#if IPS_MAJOR == 0
+static struct miscdevice misc_fops = {
+   .minor = MISC_DYNAMIC_MINOR,
+   .name = DEVICE_NAME,
+   .fops = fops
+};
+#endif
+
+int __init
+ips_init(void)
+{
+   int ret;
+
+#if IPS_MAJOR == 0
+   ret = misc_register(misc_fops);
+#else
+   ret = register_chrdev(IPS_MAJOR, DEVICE_NAME, fops);
+#endif
+   
+   if (ret  0) {
+   return -EIO;
+   

Re: [uClinux-dev] Patches for Intec coldfire 5282-based WildFire and WildFireMod

2007-05-14 Thread Greg Ungerer

Hi Steve,

Steve Bennett wrote:

Following are a series of patches which add support
for the Intec Automation ColdFire 5282-based boards,
the WildFire and WildFireMod.

These patches are all against uClinux-dist-20070130

Let me know if you want these updated against your
latest 2.6.21-uc0 or if you think some of these
should be submitted elsewhere.


For the most part it looks like the still apply (only 1 or 2
needed some fix ups).

I will carry them in the uClinux-dist, but only promote the
cpu/architectural code parts to mainline. If you want the
drivers to go into mainline then you will need to submit to
appropriate maintainers of those subsystems (or directly via
lkml).

I notice in some of the driver code (looks like it was written
by Mike Lavender) that the formating is not strictly kernel code
style compliant (for example '//' comments instead of /* */).
Would pay to fix that before sending upstream.

Regards
Greg



Greg Ungerer  --  Chief Software Dude   EMAIL: [EMAIL PROTECTED]
Secure Computing CorporationPHONE:   +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH]Driver for access to MCF IPS

2007-05-14 Thread Steve Bennett
I agree. I'll see what this is used for and at least come up with an 
mmap interface to it.


Cheers,
Steve

Greg Ungerer wrote:

Hi Steve,

Steve Bennett wrote:

This patch adds a driver for simple access to the
Coldfire Internal Peripheral System (IPS) address space
via the /dev/ips char device.

Signed-Off-By: Steve Bennett [EMAIL PROTECTED]


I have some reservations about this one. Working with peripheral
space registers from user space is not something I want to
encourage.

And, even if I did, wouldn't mmap be a better interface to
them?

Regards
greg



diff -urN uClinux-dist.orig/linux-2.6.x/drivers/char/Makefile 
uClinux-dist/linux-2.6.x/drivers/char/Makefile
--- uClinux-dist.orig/linux-2.6.x/drivers/char/Makefile2006-11-30 
12:03:15.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/char/Makefile2007-05-11 
16:12:16.0 +1000

@@ -54,6 +54,7 @@
 obj-$(CONFIG_HVCS)+= hvcs.o
 obj-$(CONFIG_SGI_MBCS)+= mbcs.o
 obj-$(CONFIG_MCF_QSPI)+= mcf_qspi.o
+obj-$(CONFIG_MCF_IPS)+= mcf_ips.o
 obj-$(CONFIG_BRIQ_PANEL)+= briq_panel.o
 
 obj-$(CONFIG_PRINTER)+= lp.o
diff -urN uClinux-dist.orig/linux-2.6.x/drivers/char/mcf_ips.c 
uClinux-dist/linux-2.6.x/drivers/char/mcf_ips.c
--- uClinux-dist.orig/linux-2.6.x/drivers/char/mcf_ips.c1970-01-01 
10:00:00.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/char/mcf_ips.c2007-05-11 
16:12:16.0 +1000

@@ -0,0 +1,184 @@
+/*
+ * linux-2.4.x/drivers/char/mcf_ips.c
+ *
+ * Internal Peripheral System Access Driver
+ *
+ * Copyright (C) 2005 Intec Automation ([EMAIL PROTECTED])
+ *
+ *
+ * Provides simple access to the Coldfire Internal Peripheral System
+ * address space via the /dev/ips char device.
+ *
+ */
+
+#include linux/module.h
+#include linux/init.h
+#include linux/types.h
+#include linux/errno.h
+#include linux/fs.h
+#include linux/device.h
+#include linux/miscdevice.h
+
+#define DEVICE_NAME ips
+
+/* Use a dynamically assigned misc device minor */
+/*#define IPS_MAJOR 0*/
+/* Or a statically assigned device major */
+#define IPS_MAJOR 122
+
+MODULE_AUTHOR(Mike Lavender [EMAIL PROTECTED]);
+MODULE_DESCRIPTION(Driver for Reading and Writing Peripherals);
+MODULE_SUPPORTED_DEVICE(Motorola MCF5282);
+MODULE_LICENSE(GPL);
+
+/* ioctl to set the read/write address */
+#define IPS_REG_SET 1
+
+static ssize_t
+ips_read(
+struct file *file,
+char *buffer,
+size_t length,
+loff_t *offset )
+{
+int ret = 0;
+
+switch (length)
+{
+case 1:
+*(char *)buffer = *(char *)file-private_data;
+ret = 1;
+break;
+case 2:
+*(short *)buffer = *(short *)file-private_data;
+ret = 2;
+break;
+case 4:
+*(int *)buffer = *(int *)file-private_data;
+ret = 4;
+break;
+default:
+memcpy( buffer, (char *)file-private_data, length );
+ret = length;
+}
+
+return (ret);
+}
+
+static ssize_t
+ips_write(
+struct file *file,
+const char *buffer,
+size_t length,
+loff_t *offset )
+{
+int ret = 0;
+
+switch (length)
+{
+case 1:
+*(char *)file-private_data = *(char *)buffer;
+ret = 1;
+break;
+case 2:
+*(short *)file-private_data = *(short *)buffer;
+ret = 2;
+break;
+case 4:
+*(int *)file-private_data = *(int *)buffer;
+ret = 4;
+break;
+default:
+memcpy( (char *)file-private_data, buffer, length );
+ret = length;
+}
+
+return (ret);
+}
+
+int
+ips_ioctl(
+struct inode *inode,
+struct file *file,
+unsigned int ioctl_num,
+unsigned long ioctl_param )
+{
+int ret = 0;
+
+switch (ioctl_num) {
+case IPS_REG_SET:
+file-private_data = (void *)ioctl_param;
+break;
+default:
+ret = -EINVAL;
+}
+
+return (ret);
+}
+
+static int
+ips_open(
+struct inode *inode,
+struct file *file )
+{
+return 0;
+}
+
+static int
+ips_release(
+struct inode *inode,
+struct file *file )
+{
+return 0;
+}
+
+/*  fixed for 2.4 kernel, owner was ifdef'ed out for 2.0 kernel */
+static struct file_operations fops = {
+owner:  THIS_MODULE,
+read:   ips_read,
+write:  ips_write,
+ioctl:  ips_ioctl,
+open:   ips_open,
+release:ips_release  /* a.k.a. close */
+};
+
+#if IPS_MAJOR == 0
+static struct miscdevice misc_fops = {
+.minor = MISC_DYNAMIC_MINOR,
+.name = DEVICE_NAME,
+.fops = fops
+};
+#endif
+
+int __init
+ips_init(void)
+{
+int ret;
+
+#if IPS_MAJOR == 0
+ret = misc_register(misc_fops);
+#else
+ret = 

Re: [uClinux-dev] [PATCH]Common names for MCF I2C

2007-05-14 Thread Steve Bennett

Great. The matching 528x changes should still be needed though.

Greg Ungerer wrote:

Hi Steve,

The changes to m532xsim.h have already been made (and sent to me)
by Sebastian Hess and Thomas Brinker. They are queued in my patch
set already for main line inclusion.

Regards
Greg



Steve Bennett wrote:




The MCF I2C-related register definitions have been renamed separately
for the MCF 528x and 532x series. This breaks the i2c-mcf driver.
I see no reason not to use common names, thus making the i2c-mcf driver
work again.

Signed-Off-By: Steve Bennett [EMAIL PROTECTED]

diff -urN uClinux-dist.orig/linux-2.6.x/drivers/i2c/busses/i2c-mcf.c 
uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-mcf.c
--- uClinux-dist.orig/linux-2.6.x/drivers/i2c/busses/i2c-mcf.c
2006-12-12 23:21:50.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-mcf.c
2007-05-11 16:12:16.0 +1000

@@ -501,7 +501,7 @@
 /* Port AS Pin Assignment Register (PASPAR)*/
 /*PASPA1 = 11 = AS1 pin is I2C SDA*/
 /*PASPA0 = 11 = AS0 pin is I2C SCL*/
-*MCF_GPIO_PASPAR |= 0x000F;/* u16 declaration */
+*MCF5282_GPIO_PASPAR |= 0x000F;/* u16 declaration */
 #endif
 
 
diff -urN 
uClinux-dist.orig/linux-2.6.x/include/asm-m68knommu/m528xsim.h 
uClinux-dist/linux-2.6.x/include/asm-m68knommu/m528xsim.h
--- uClinux-dist.orig/linux-2.6.x/include/asm-m68knommu/m528xsim.h
2007-01-25 10:44:14.0 +1000
+++ uClinux-dist/linux-2.6.x/include/asm-m68knommu/m528xsim.h
2007-05-11 16:12:16.0 +1000

@@ -63,31 +76,31 @@
 *
 */
 /* Read/Write access macros for general use */
-#define MCF5282_I2C_I2ADR   (volatile u8 *) (MCF_IPSBAR + 0x0300) 
// Address -#define MCF5282_I2C_I2FDR   (volatile u8 *) 
(MCF_IPSBAR + 0x0304) // Freq Divider
-#define MCF5282_I2C_I2CR(volatile u8 *) (MCF_IPSBAR + 0x0308) 
// Control
-#define MCF5282_I2C_I2SR(volatile u8 *) (MCF_IPSBAR + 0x030C) 
// Status
-#define MCF5282_I2C_I2DR(volatile u8 *) (MCF_IPSBAR + 0x0310) 
// Data I/O
+#define MCF_I2C_I2ADR   (volatile u8 *) (MCF_IPSBAR + 0x0300) // 
Address +#define MCF_I2C_I2FDR   (volatile u8 *) (MCF_IPSBAR + 
0x0304) // Freq Divider
+#define MCF_I2C_I2CR(volatile u8 *) (MCF_IPSBAR + 0x0308) // 
Control
+#define MCF_I2C_I2SR(volatile u8 *) (MCF_IPSBAR + 0x030C) // 
Status
+#define MCF_I2C_I2DR(volatile u8 *) (MCF_IPSBAR + 0x0310) // 
Data I/O
 
 /* Bit level definitions and macros */
-#define MCF5282_I2C_I2ADR_ADDR(x)   
(((x)0x7F)0x01)

+#define MCF_I2C_I2ADR_ADDR(x)   (((x)0x7F)0x01)
 
-#define MCF5282_I2C_I2FDR_IC(x) (((x)0x3F))

+#define MCF_I2C_I2FDR_IC(x) (((x)0x3F))
 
-#define MCF5282_I2C_I2CR_IEN(0x80)// I2C enable

-#define MCF5282_I2C_I2CR_IIEN   (0x40)  // interrupt enable
-#define MCF5282_I2C_I2CR_MSTA   (0x20)  // master/slave mode
-#define MCF5282_I2C_I2CR_MTX(0x10)  // transmit/receive mode
-#define MCF5282_I2C_I2CR_TXAK   (0x08)  // transmit acknowledge enable
-#define MCF5282_I2C_I2CR_RSTA   (0x04)  // repeat start
-
-#define MCF5282_I2C_I2SR_ICF(0x80)  // data transfer bit
-#define MCF5282_I2C_I2SR_IAAS   (0x40)  // I2C addressed as a slave
-#define MCF5282_I2C_I2SR_IBB(0x20)  // I2C bus busy
-#define MCF5282_I2C_I2SR_IAL(0x10)  // aribitration lost
-#define MCF5282_I2C_I2SR_SRW(0x04)  // slave read/write
-#define MCF5282_I2C_I2SR_IIF(0x02)  // I2C interrupt
-#define MCF5282_I2C_I2SR_RXAK   (0x01)  // received acknowledge
+#define MCF_I2C_I2CR_IEN(0x80)// I2C enable
+#define MCF_I2C_I2CR_IIEN   (0x40)  // interrupt enable
+#define MCF_I2C_I2CR_MSTA   (0x20)  // master/slave mode
+#define MCF_I2C_I2CR_MTX(0x10)  // transmit/receive mode
+#define MCF_I2C_I2CR_TXAK   (0x08)  // transmit acknowledge enable
+#define MCF_I2C_I2CR_RSTA   (0x04)  // repeat start
+
+#define MCF_I2C_I2SR_ICF(0x80)  // data transfer bit
+#define MCF_I2C_I2SR_IAAS   (0x40)  // I2C addressed as a slave
+#define MCF_I2C_I2SR_IBB(0x20)  // I2C bus busy
+#define MCF_I2C_I2SR_IAL(0x10)  // aribitration lost
+#define MCF_I2C_I2SR_SRW(0x04)  // slave read/write
+#define MCF_I2C_I2SR_IIF(0x02)  // I2C interrupt
+#define MCF_I2C_I2SR_RXAK   (0x01)  // received acknowledge
 
 
 
diff -urN 
uClinux-dist.orig/linux-2.6.x/include/asm-m68knommu/m532xsim.h 
uClinux-dist/linux-2.6.x/include/asm-m68knommu/m532xsim.h
--- uClinux-dist.orig/linux-2.6.x/include/asm-m68knommu/m532xsim.h
2006-05-26 16:18:02.0 +1000
+++ uClinux-dist/linux-2.6.x/include/asm-m68knommu/m532xsim.h
2007-05-11 16:12:16.0 +1000

@@ -131,33 +131,33 @@
  */
 
 /* Read/Write access macros for general use */

[uClinux-dev] Upstream merge of big patch

2007-05-14 Thread Thomas Brinker
Hi everybody!

Are there any planes to merge the whole uclinux big patch to kernel mainline?

Regards
Thomas


-- 
Dipl.-Ing. Thomas Brinker, emlix GmbH, http://www.emlix.com
Fon +49 30 275911-00, Fax -33, Poststr. 4/5, 10178 Berlin, Germany
Geschäftsführung: Dr. Uwe Kracke, Dr. Cord Seele, Ust-IdNr.: DE 205 198 055
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160

emlix - your embedded linux partner
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: Upstream merge of big patch

2007-05-14 Thread Greg Ungerer

Hi Thomas,

Thomas Brinker wrote:

Are there any planes to merge the whole uclinux big patch to kernel mainline?


No :-)

The big patch contains many things that are just not acceptable,
or not ready, for main line yet.

The small patch, the -uc patch, is this list of items that I
think are ready for mainline.

Regards
Greg




Greg Ungerer  --  Chief Software Dude   EMAIL: [EMAIL PROTECTED]
Secure Computing CorporationPHONE:   +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH]coldfire qspi driver

2007-05-14 Thread Steve Bennett

Hi Greg,

Access to the m25p80 flash and the mmc/sd card are both
over over the spi bus. This is some crude mechanism to
prevent conflicts between the two. Mike promised something
better in the future and I'll understand if you can't take this
one until then.

Cheers,
Steve

Greg Ungerer wrote:

Hi Steve,

Steve Bennett wrote:
This patch adds support for the SPI driver for Freescale Coldfire QSPI 
module
in master mode. Tested with the 5282 processor, but should also work 
with other

Coldfire variants.

Signed-Off-By: Steve Bennett [EMAIL PROTECTED]


Why is there mutex calls for the qspi module in platforms mtd
map driver?  This seems very out of place.

And the changes to drivers/spi/spi.c, I can't see that being
accepted in mainline.

Regards
Greg



diff -urN uClinux-dist.orig/linux-2.6.x/drivers/mtd/devices/m25p80.c 
uClinux-dist/linux-2.6.x/drivers/mtd/devices/m25p80.c
--- uClinux-dist.orig/linux-2.6.x/drivers/mtd/devices/m25p80.c
2006-10-09 10:01:47.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/mtd/devices/m25p80.c
2007-05-11 16:12:09.0 +1000

@@ -201,6 +201,7 @@
 addr = instr-addr;
 len = instr-len;
 
+qspi_mutex_down(m25p80);

   down(flash-lock);
 
 /* now erase those sectors */

@@ -216,6 +217,7 @@
 }
 
   up(flash-lock);

+qspi_mutex_up(m25p80);
 
 instr-state = MTD_ERASE_DONE;

 mtd_erase_callback(instr);
@@ -260,6 +262,7 @@
 if (retlen)
 *retlen = 0;
 
+qspi_mutex_down(m25p80);

 down(flash-lock);
 
 /* Wait till previous write/erase is done. */

@@ -282,6 +285,7 @@
 *retlen = m.actual_length - sizeof(flash-command);
 
   up(flash-lock);

+qspi_mutex_up(m25p80);
 
 return 0;

 }
@@ -323,6 +327,7 @@
 t[1].tx_buf = buf;
 spi_message_add_tail(t[1], m);
 
+qspi_mutex_down(m25p80);

   down(flash-lock);
 
 /* Wait until finished previous write command. */

@@ -385,6 +390,7 @@
  }
 
 up(flash-lock);

+qspi_mutex_up(m25p80);
 
 return 0;

 }
diff -urN uClinux-dist.orig/linux-2.6.x/drivers/spi/Kconfig 
uClinux-dist/linux-2.6.x/drivers/spi/Kconfig
--- uClinux-dist.orig/linux-2.6.x/drivers/spi/Kconfig2006-06-19 
11:02:15.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/spi/Kconfig2007-05-11 
16:12:05.0 +1000

@@ -103,6 +103,15 @@
   GPIO lines to provide the SPI bus. This can be used where
   the inbuilt hardware cannot provide the transfer mode, or
   where the board is using non hardware connected pins.
+  +config SPI_COLDFIRE
+tristate Coldfire QSPI SPI Master
+depends on SPI_MASTER  COLDFIRE  EXPERIMENTAL
+help
+  SPI driver for Freescale Coldfire QSPI module in master mode.
+  Tested with the 5282 processor, but should also work with other
+  Coldfire variants.
+
 #
 # Add new SPI master controllers in alphabetical order above this line
 #
diff -urN uClinux-dist.orig/linux-2.6.x/drivers/spi/Makefile 
uClinux-dist/linux-2.6.x/drivers/spi/Makefile
--- uClinux-dist.orig/linux-2.6.x/drivers/spi/Makefile2006-06-19 
11:02:15.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/spi/Makefile2007-05-11 
16:12:05.0 +1000

@@ -17,6 +17,7 @@
 obj-$(CONFIG_SPI_MPC83xx)+= spi_mpc83xx.o
 obj-$(CONFIG_SPI_S3C24XX_GPIO)+= spi_s3c24xx_gpio.o
 obj-$(CONFIG_SPI_S3C24XX)+= spi_s3c24xx.o
+obj-$(CONFIG_SPI_COLDFIRE)+= spi_coldfire.o
 obj-$(CONFIG_MCFQSPI)+= mcf_qspi.o
 obj-$(CONFIG_DS1305)+= DS1305RTC.o
 # ... add above this line ...
diff -urN uClinux-dist.orig/linux-2.6.x/drivers/spi/spi.c 
uClinux-dist/linux-2.6.x/drivers/spi/spi.c
--- uClinux-dist.orig/linux-2.6.x/drivers/spi/spi.c2006-11-30 
09:27:55.0 +1000
+++ uClinux-dist/linux-2.6.x/drivers/spi/spi.c2007-05-11 
16:12:09.0 +1000

@@ -25,6 +25,40 @@
 #include linux/cache.h
 #include linux/spi/spi.h
 
+#if 1

+
+EXPORT_SYMBOL(qspi_mutex_down);
+EXPORT_SYMBOL(qspi_mutex_up);
+
+static DECLARE_MUTEX(sem);
+
+ /**
+  * qspi_mutex_down.
+  * get in line for the qspi mutex
+  * the internal kernel calls do not hold the mutex themselves and so 
down/up

+  * must be called manually. This introduces a new level of complexity,
+  * but is required, as it may be necessary for some drivers to
+  * hold the mutex through more than one transaction.
+  */
+ void qspi_mutex_down(char *s){
+ //printk( d:%s, s);
+  down_interruptible(sem);
+  //printk( -);
+ }
+
+ /**
+  * qspi_mutex up
+  * signal the qspi mutex.
+  * see qspi_mutex_down
+  */
+ void qspi_mutex_up(char *s){
+ //printk( %s:, s);
+  up(sem);
+  //printk( u\n);
+ }
+
+ #endif
+
 
 /* SPI bustype and spi_master class are registered after board init code

  * provides the SPI device tables, ensuring that both are present by the
@@ -360,7 +394,7 @@
 if (!dev)
 return NULL;
 
-master = kzalloc(size + sizeof *master, SLAB_KERNEL);

+master = kzalloc(size + sizeof *master, 

[uClinux-dev] why init/do_mounts.c/mount_block_root sys_mount return -EFAULT(-14)?

2007-05-14 Thread rui.zhou
hi guys
 
I got the problem in the init/do_mounts.c
 
static void __init mount_block_root(char *name, int flags)

retry:
for (p = fs_names; *p; p += strlen(p)+1) {
int err = sys_mount(name, /root, p, flags,
root_mount_data);
printk(VFS: tried fs_name = %s err= %d\n,p,err);
 
switch (err) {
case 0:
printk(case 0\n);
goto out;
case -EACCES:
printk(case -EACCESS\n);
flags |= MS_RDONLY;
goto retry;
case -EINVAL:
case -EBUSY:
printk(case -EBUSY  EINVAL\n);
continue;
}
/*
 * Allow the user to distinguish between failed open
 * and bad superblock on root device.
 */
printk (VFS: Cannot open root device \%s\ or %s\n,
root_device_name, kdevname (ROOT_DEV));
...
 
well,in a normal 2.4 kernel will get this result:
 
***
VFS: test name = /dev/root 
VFS: fs_name = ext2 
VFS: fs_name = romfs 
VFS: root name 1f:00 
***

VFS: tried fs_name = ext2 err= -22(-EINVAL,so it continue to try mount
romfs)
case -EBUSY  EINVAL
VFS: tried fs_name = romfs err= 0
case 0
 
but in a 2.6.9 kernel have this result:
 
***
 
VFS: test name = /dev/root 
 
VFS: fs_name = ext2 
 
VFS: fs_name = romfs 
 
VFS: tried fs_name = ext2 err= -14 (-EFAULT,it directly go to the
failure handle)
 
VFS: Cannot open root device ram0 or unknown-block(0,0)
 
Please append a correct root= boot option
 
Kernel panic - not syncing: 1VFS: Unable to mount root fs on
unknown-block(0,0)
 
***
thanks!
rui
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

RE: [uClinux-dev] why init/do_mounts.c/mount_block_root sys_mountreturn -EFAULT(-14)?

2007-05-14 Thread rui.zhou
hi
 
I am thinking  that why my romfs is unable to be mounted as a root
device.
 
my kernel command line:(I have linked the romfs into the kernel
image,the address below is calculated automatically :)
 
root=/dev/ram0 initrd=0x0c0a235c,139k keepinitrd
 
and I have modified the makefile in which /dev/ram0 will be created.
 
what else I have missed?
 
and just read a article via
http://www.ucdot.org/article.pl?sid=03/01/11/1049210mode=thread
http://www.ucdot.org/article.pl?sid=03/01/11/1049210mode=thread 
(Phil Wilshire SDCS System Design  Consulting Services
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  )
 
so I am wondering that the /dev/root(ROOT_DEV) was not created
successfully?because no blkmem.c in kernel 2.6,must I enable the MTD
option to make the kernel support romfs?they have any relation?
 
I will appreciate your comments!
 
thanksregards
rui
 




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, May 14, 2007 5:31 PM
To: uclinux-dev@uclinux.org
Subject: [uClinux-dev] why init/do_mounts.c/mount_block_root
sys_mountreturn -EFAULT(-14)?


hi guys
 
I got the problem in the init/do_mounts.c
 
static void __init mount_block_root(char *name, int flags)

retry:
for (p = fs_names; *p; p += strlen(p)+1) {
int err = sys_mount(name, /root, p, flags,
root_mount_data);
printk(VFS: tried fs_name = %s err= %d\n,p,err);
 
switch (err) {
case 0:
printk(case 0\n);
goto out;
case -EACCES:
printk(case -EACCESS\n);
flags |= MS_RDONLY;
goto retry;
case -EINVAL:
case -EBUSY:
printk(case -EBUSY 
EINVAL\n);
continue;
}
/*
 * Allow the user to distinguish between failed
open
 * and bad superblock on root device.
 */
printk (VFS: Cannot open root device \%s\ or
%s\n,
root_device_name, kdevname (ROOT_DEV));
...
 
well,in a normal 2.4 kernel will get this result:
 
***
VFS: test name = /dev/root 
VFS: fs_name = ext2 
VFS: fs_name = romfs 
VFS: root name 1f:00 
***

VFS: tried fs_name = ext2 err= -22(-EINVAL,so it continue to
try mount romfs)
case -EBUSY  EINVAL
VFS: tried fs_name = romfs err= 0
case 0
 
but in a 2.6.9 kernel have this result:
 
***
 
VFS: test name = /dev/root 
 
VFS: fs_name = ext2 
 
VFS: fs_name = romfs 
 
VFS: tried fs_name = ext2 err= -14 (-EFAULT,it directly go to
the failure handle)
 
VFS: Cannot open root device ram0 or unknown-block(0,0)
 
Please append a correct root= boot option
 
Kernel panic - not syncing: 1VFS: Unable to mount root fs on
unknown-block(0,0)
 
***
thanks!
rui

___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

[uClinux-dev] Problem linking pthread... undefined reference to `pthread_create'

2007-05-14 Thread Claudia De Bartolomeis
Hi everybody,
I'm developing an application under uclinux  uclibc 0.9.26 for Coldfire  m532x,
but I'm having troubles linking pthread 

Thanks in advance for any help
Claudia

This is the compilation log:

[EMAIL PROTECTED]:~/ltib-m532xevb-20061117 ./ltib -m scbuild  -p 
microwindows.spec

Processing: microwindows
==
rpmbuild --dbpath /home/claudia/ltib-m532xevb-20061117/rpmdb --define 
'_unpackaged_files_terminate_build 0' --define '_target_cpu m68knommu' --define 
'__strip strip' --define '_topdir /home/claudia/ltib-m532xevb-20061117/rpm' 
--define '_prefix /usr' --define '_tmppath 
/home/claudia/ltib-m532xevb-20061117/tmp' --define '_mandir /usr/share/man' 
--define '_sysconfdir /etc' --define '_localstatedir /var' -bc --short-circuit  
/home/claudia/ltib-m532xevb-20061117/dist/lfs-5.1/microwindows/microwindows.spec
Executing(%build): /bin/sh -e 
/home/claudia/ltib-m532xevb-20061117/tmp/rpm-tmp.19156
+ umask 022
+ cd /home/claudia/ltib-m532xevb-20061117/rpm/BUILD
+ cd microwindows-0.90
+ cd src
+ make -j1 'HOSTCC=/usr/bin/gcc -B/usr/bin//'
make -C drivers
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/drivers'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/drivers'
make -C mwin
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin'
make -C bmp
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/bmp'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/bmp'
make -C mwobjects
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/mwobjects'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/mwobjects'
make -C winlib
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/winlib'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/winlib'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin'
make -C engine
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/engine'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/engine'
make -C fonts
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/fonts'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/fonts'
make -C nanox
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/nanox'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/nanox'
make -C demos
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos'
make -C mwin
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwin'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwin'
make -C mwobjects
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwobjects'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwobjects'
make -C nanowm
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanowm'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanowm'
make -C nanox
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanox'
make -C icoone
make[3]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanox/icoone'
Linking 
/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/bin/main 
...
gcc   -I. 
-I/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/include 
-Wall -Wpointer-arith  -lpthread  
-L/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/lib   
main.o menu_engine.o buttons.o -o 
/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/bin/main 
/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/lib/libnano-X.a
menu_engine.o: In function `prova':
menu_engine.c:(.text+0x50): undefined reference to `pthread_create'
menu_engine.c:(.text+0x72): undefined reference to `pthread_create'
menu_engine.c:(.text+0x88): undefined reference to `pthread_join'
menu_engine.c:(.text+0x98): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[3]: *** 
[/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/bin/main] 
Error 1
make[3]: Leaving directory 

Re: [uClinux-dev] No response after the message Freeing init memory on IXP425

2007-05-14 Thread Shuanglin Wang

Hi Greg,

Yes, I have simpleinit enabled and kernel command line is console=ttyS0.

My board has only one serial port connecting with the host pc. Firsly, I 
use arm-elf-gcc 3.4.3 and got error:


/*--*/
Load /sbin/init: TEXT=2a0040-2a97e0 DATA=2a97e4-2ab394 BSS=2ab394-2bcde4
BINFMT_FLAT: reloc outside program 0x554e47 (0 - 0x1cda4/0x97a0), 
killing init

/*--*/

After I switch to the toolchain with arm-linux-gcc 3.4.4, reloc error is 
solved, but console no response at all from userland applications.


/*--kernel 
output---*/

BINFMT_FLAT: Loading file: /sbin/init
Mapping is 2a, Entry point is 44, data_start is 96a0
Load /sbin/init: TEXT=2a0040-2a96a0 DATA=2a96a4-2ab254 BSS=2ab254-2bcca4
start_thread(regs=0x1b3f24, entry=0x2a0044, start_stack=0x2bffb0)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 2e, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4
start_thread(regs=0x29ffb0, entry=0x2e0044, start_stack=0x2fff98)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 2e, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4
start_thread(regs=0x313fb0, entry=0x2e0044, start_stack=0x2fff90)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 2e, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4
start_thread(regs=0x313fb0, entry=0x2e0044, start_stack=0x2fff98)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 32, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=320040-32ee80 DATA=32ee84-331964 BSS=331964-332ec4
start_thread(regs=0x307fb0, entry=0x320044, start_stack=0x33ff98)
/*-*/

I suspect that my kernel/uClib setting may be wrong;
or I didn't create the stable userland application like init and sh;

Thanks,
Shuanglin




Greg Ungerer wrote:



Hi Shuanglin,

Shuanglin Wang wrote:

I think I meet the similar problem on my ARM946E-S board. My 
toolchain is gcc 3.4.4 and uClinux is the uClinux-dist-20070130 from 
uclinux official website.


My question is about console setup. What should I do to make console 
work for userland applications? I prefer using core 
applications-enable console shell .



That is ok. Do you have simpleinit enabled too?

In any case what is the kernel command line?
Do you have a console= option on it?

Regards
Greg




Thanks in advance.

Shuanglin


Greg Ungerer wrote:


Hi Srikanth,

Srikanth Chavali wrote:


Hi Greg,
   Just figured out that ADI Engineering is using 
uClinux-dist.




What version?

I looks like a console setup problem...

Regards
Greg




srikanth chavali

On 5/10/07, *Greg Ungerer*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi Srikanthn

Srikanth Chavali wrote:
 I compiled ( 2.6.x kernel) and loaded the zImage and
ramdisk.gz on my
  board with IXP425. The board seems to be in the process of
loading the
  kernel when it stops after the messages shown below.

Are you using the uClinux-dist, or something else?
If yes, what version?

Regards
Greg



  I googled and found people facing similar issues. I ensured 
that

i had
  CONFIG_FPE_NWFPE=y and CONFIG_FPE_FASTFPE is not set in my 
kernel

configs.
 
  Any help would be greatly appreciated.
 
  Regards,
 
  srikanth chavali
 
  Attached are the messages:
 
   Intel/Sharp Extended Query Table at 0x010A
   Intel/Sharp Extended Query Table at 0x010A
   Intel/Sharp Extended Query Table at 0x010A
   Intel/Sharp Extended Query Table at 0x010A
  Using buffer write method
  cfi_cmdset_0001: Erase suspend on write enabled
  Searching for RedBoot partition table in IXP4XX-Flash.0 at 
offset

0xfe
  3 RedBoot partitions found on MTD device IXP4XX-Flash.0
  Creating 3 MTD partitions on IXP4XX-Flash.0:
  0x-0x0006 : RedBoot
  0x00fe-0x00fff000 : FIS directory
  mtd: partition FIS directory doesn't end on an erase block 
-- force

  read-only
  0x00fff000-0x0100 : RedBoot config
  mtd: partition RedBoot config doesn't start on an erase block
boundary
  -- forc
  e read-only
  mice: PS/2 mouse device common for all mice
  i2c /dev entries driver
  TCP bic registered
  NET: Registered protocol family 1
  NET: Registered protocol family 17
  RAMDISK: Compressed image found at block 0
  VFS: Mounted root (ext2 filesystem) readonly.
  Freeing init memory: 96K 
--

  Nothing seems to happen after this
  although it does'nt look like the system is frozen.
 
  --
   

Re: [uClinux-dev] No response after the message Freeing init memory on IXP425

2007-05-14 Thread Srikanth Chavali

Hi Greg,
   The Pronghorn-Metro version is: 1.0.1

Regards,

srikanth chavali

On 5/13/07, Greg Ungerer [EMAIL PROTECTED] wrote:


Hi Srikanth,

Srikanth Chavali wrote:
 Hi Greg,
Just figured out that ADI Engineering is using uClinux-dist.

What version?

I looks like a console setup problem...

Regards
Greg



 srikanth chavali

 On 5/10/07, *Greg Ungerer*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Hi Srikanthn

 Srikanth Chavali wrote:
  I compiled ( 2.6.x kernel) and loaded the zImage and
 ramdisk.gz on my
   board with IXP425. The board seems to be in the process of
 loading the
   kernel when it stops after the messages shown below.

 Are you using the uClinux-dist, or something else?
 If yes, what version?

 Regards
 Greg



   I googled and found people facing similar issues. I ensured that
 i had
   CONFIG_FPE_NWFPE=y and CONFIG_FPE_FASTFPE is not set in my kernel
 configs.
  
   Any help would be greatly appreciated.
  
   Regards,
  
   srikanth chavali
  
   Attached are the messages:
  
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
   Using buffer write method
   cfi_cmdset_0001: Erase suspend on write enabled
   Searching for RedBoot partition table in IXP4XX-Flash.0 at offset
 0xfe
   3 RedBoot partitions found on MTD device IXP4XX-Flash.0
   Creating 3 MTD partitions on IXP4XX-Flash.0:
   0x-0x0006 : RedBoot
   0x00fe-0x00fff000 : FIS directory
   mtd: partition FIS directory doesn't end on an erase block --
force
   read-only
   0x00fff000-0x0100 : RedBoot config
   mtd: partition RedBoot config doesn't start on an erase block
 boundary
   -- forc
   e read-only
   mice: PS/2 mouse device common for all mice
   i2c /dev entries driver
   TCP bic registered
   NET: Registered protocol family 1
   NET: Registered protocol family 17
   RAMDISK: Compressed image found at block 0
   VFS: Mounted root (ext2 filesystem) readonly.
   Freeing init memory: 96K
--
   Nothing seems to happen after this
   although it does'nt look like the system is frozen.
  
   --
   srikanth chavali
  
  
  


  
   ___
   uClinux-dev mailing list
   uClinux-dev@uclinux.org mailto:uClinux-dev@uclinux.org
   http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
   This message was resent by uclinux-dev@uclinux.org
 mailto:uclinux-dev@uclinux.org
   To unsubscribe see:
   http://mailman.uclinux.org/mailman/options/uclinux-dev
 http://mailman.uclinux.org/mailman/options/uclinux-dev

 --


 Greg Ungerer  --  Chief Software Dude   EMAIL:
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 Secure Computing CorporationPHONE:   +61 7 3435
 2888
 825 Stanley St, FAX: +61 7 3891
3630
 Woolloongabba, QLD, 4102, Australia WEB:
http://www.SnapGear.com
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org mailto:uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 mailto:uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 http://mailman.uclinux.org/mailman/options/uclinux-dev




 --
 srikanth chavali


 

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

--

Greg Ungerer  --  Chief Software Dude   EMAIL: [EMAIL PROTECTED]
Secure Computing CorporationPHONE:   +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org

[uClinux-dev] compiling interrupt handlers (__irq)

2007-05-14 Thread Tiberiu Motoc

Hi,

I would like to know what is the arm-elf-gcc compiler options for compiling
files containing interrupt handler functions (prefixed with __irq)?
If I try to compile it with the default Makefile, I get parse error before
function_name.

Thanks,
Tiberiu
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Re: [uClinux-dev] No response after the message Freeing init memory on IXP425

2007-05-14 Thread Greg Ungerer

Hi Shuanglin,

Shuanglin Wang wrote:

Yes, I have simpleinit enabled and kernel command line is console=ttyS0.

My board has only one serial port connecting with the host pc. Firsly, I 
use arm-elf-gcc 3.4.3 and got error:


/*--*/ 


Load /sbin/init: TEXT=2a0040-2a97e0 DATA=2a97e4-2ab394 BSS=2ab394-2bcde4
BINFMT_FLAT: reloc outside program 0x554e47 (0 - 0x1cda4/0x97a0), 
killing init
/*--*/ 


If you are using the IXP425 processor you should not be using the flat
format loader (BINFMT_FLAT). You should be using the standard ELF
program loader.

Regards
Greg





After I switch to the toolchain with arm-linux-gcc 3.4.4, reloc error is 
solved, but console no response at all from userland applications.


/*--kernel 
output---*/

BINFMT_FLAT: Loading file: /sbin/init
Mapping is 2a, Entry point is 44, data_start is 96a0
Load /sbin/init: TEXT=2a0040-2a96a0 DATA=2a96a4-2ab254 BSS=2ab254-2bcca4
start_thread(regs=0x1b3f24, entry=0x2a0044, start_stack=0x2bffb0)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 2e, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4
start_thread(regs=0x29ffb0, entry=0x2e0044, start_stack=0x2fff98)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 2e, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4
start_thread(regs=0x313fb0, entry=0x2e0044, start_stack=0x2fff90)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 2e, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4
start_thread(regs=0x313fb0, entry=0x2e0044, start_stack=0x2fff98)

BINFMT_FLAT: Loading file: /bin/sh
Mapping is 32, Entry point is 44, data_start is ee80
Load /bin/sh: TEXT=320040-32ee80 DATA=32ee84-331964 BSS=331964-332ec4
start_thread(regs=0x307fb0, entry=0x320044, start_stack=0x33ff98)
/*-*/ 



I suspect that my kernel/uClib setting may be wrong;
or I didn't create the stable userland application like init and sh;

Thanks,
Shuanglin




Greg Ungerer wrote:



Hi Shuanglin,

Shuanglin Wang wrote:

I think I meet the similar problem on my ARM946E-S board. My 
toolchain is gcc 3.4.4 and uClinux is the uClinux-dist-20070130 from 
uclinux official website.


My question is about console setup. What should I do to make console 
work for userland applications? I prefer using core 
applications-enable console shell .



That is ok. Do you have simpleinit enabled too?

In any case what is the kernel command line?
Do you have a console= option on it?

Regards
Greg




Thanks in advance.

Shuanglin


Greg Ungerer wrote:


Hi Srikanth,

Srikanth Chavali wrote:


Hi Greg,
   Just figured out that ADI Engineering is using 
uClinux-dist.




What version?

I looks like a console setup problem...

Regards
Greg




srikanth chavali

On 5/10/07, *Greg Ungerer*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi Srikanthn

Srikanth Chavali wrote:
 I compiled ( 2.6.x kernel) and loaded the zImage and
ramdisk.gz on my
  board with IXP425. The board seems to be in the process of
loading the
  kernel when it stops after the messages shown below.

Are you using the uClinux-dist, or something else?
If yes, what version?

Regards
Greg



  I googled and found people facing similar issues. I ensured 
that

i had
  CONFIG_FPE_NWFPE=y and CONFIG_FPE_FASTFPE is not set in my 
kernel

configs.
 
  Any help would be greatly appreciated.
 
  Regards,
 
  srikanth chavali
 
  Attached are the messages:
 
   Intel/Sharp Extended Query Table at 0x010A
   Intel/Sharp Extended Query Table at 0x010A
   Intel/Sharp Extended Query Table at 0x010A
   Intel/Sharp Extended Query Table at 0x010A
  Using buffer write method
  cfi_cmdset_0001: Erase suspend on write enabled
  Searching for RedBoot partition table in IXP4XX-Flash.0 at 
offset

0xfe
  3 RedBoot partitions found on MTD device IXP4XX-Flash.0
  Creating 3 MTD partitions on IXP4XX-Flash.0:
  0x-0x0006 : RedBoot
  0x00fe-0x00fff000 : FIS directory
  mtd: partition FIS directory doesn't end on an erase block 
-- force

  read-only
  0x00fff000-0x0100 : RedBoot config
  mtd: partition RedBoot config doesn't start on an erase block
boundary
  -- forc
  e read-only
  mice: PS/2 mouse device common for all mice
  i2c /dev entries driver
  TCP bic registered
  NET: Registered protocol family 1
  NET: Registered protocol family 17
  RAMDISK: Compressed image found at block 0
  VFS: Mounted root (ext2 

Re: [uClinux-dev] RE: jffs2 on MCF5208 custom board

2007-05-14 Thread Greg Ungerer

Hi Teun,

Teun Grinwis wrote:

Late reply, went away some weeks,

I currently do not run apps XIP.

Our custom board concerning flash, is equal design as on Intec 5208EVB with
the diff that the flash is S29GL064AR4 iso AM29BDD160G,


Could this be a hardware fault?
Has the hardware been validated?

Regards
Greg




My MTD partitions are as follows (btw i did not change flash name string):


Am29BDD160G 2.5v flash device (2MB): Found 1 x16 devices at 0x0 in 16-bit
bank
 Amd/Fujitsu Extended Query Table at 0x0040
cfi_send_gen_cmd():,40 cmd=98 addr=0055 base= build
addr=00aa cm
d_val=0008
cfi_send_gen_cmd():,41 cmd=f0 addr= base= build
addr= cm
d_val=0040
cfi_send_gen_cmd():,42 cmd=ff addr= base= build
addr= cm
d_val=0040
Using buffer write method
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

Creating 3 MTD partitions on Am29BDD160G 2.5v flash device (2MB):

0x-0x0004 : dBUG (256K)
mtd: Giving out device 2 to dBUG (256K)

0x0004-0x000c : User FS (512K)
mtd: Giving out device 3 to User FS (512K)

0x000c-0x0020 : Kernel + RootFS (1280K)
mtd: Giving out device 4 to Kernel + RootFS (1280K)
m520xevb ram probe(0x40150020,de000,4): de000 at 40150020

m520xevb ram probe(0x40150020,de000,4): de000 at 40150020
do_map_probe(): name=map_ram 5Creating 1 MTD partitions on RAM:
0x-0x000de000 : Romfs
mtd: Giving out device 5 to Romfs
init_m520x: Root filesystem maj:31 mtdblock:5


I mount jffs2 on User FS, addresses 0x4 - 0xc

I can run my image successful on the EVB see attached file Log_uclinux_evb.

I started all from a clean flash, erase flash, program dBUG, dn image.bin,
exec image.

When starting on EVB, jffs2 is initializing User FS by MTD
do_erase_oneblock,
MTD do_write_oneword(s) 0x..0 - 0x..a for all sectors in User FS, startup
successful.

When starting on custom board *** ILLEGAL INSTRUCTION *** occurs after the
first
MTD do_erase_oneblock(), see attached file Log_uclinux_ads4010, startup
unsuccessful.

It seems that the error has something todo with (erase) timing ?? since in
call trace:
...
BUG: pdflush/9, lock held at task exit time!
 [403b6446] {alloc_super}
.. held by:   pdflush:9 [402b2330, 115]
... acquired at:

After further investigation it seems that in
cfi_cmdset_0002.c:do_erase_oneblock,
the code execution does not reach: spin_unlock(chip-mutex).

Any suggestions, are welcome.

Thanks in advance,
Teun Grinwis



-Oorspronkelijk bericht-
Van: Teun Grinwis [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 10 mei 2007 11:15
Aan: Teun
Onderwerp: jffs2 on MCF5208 custom board



Hi Teun,

Teun Grinwis wrote:

Hello all,
Can someone give hint where to start debug searching ??

I use distribution 20060511 2.16.16-uc0 on custom MCF 5208 board.
With flash, S29GL064AR4. Debug for mtd, jffs2 set to noisy.

When I mount a mtdblock on jffs2 I got the following error:

See below.
Command: mount -t jffs2 /dev/mtdblock3 /mnt
Command:
Command:
Execution Finished, Exiting
mtdblock: read on Romfs at 0x3d400, size 0x200
..

Your root filesystem isn't also on the same flash
as the JFFS2 you are trying to mount is it?

If you where running apps XIP then this would be a problem.

Regards
Greg



___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


--

Greg Ungerer  --  Chief Software Dude   EMAIL: [EMAIL PROTECTED]
Secure Computing CorporationPHONE:   +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] reloc type unsupported error when building uclinux-dist

2007-05-14 Thread Sky Ryan

Hi all
When I build the uclinux-dist-20070130

I got the following error when compiling the user apps

eloc type R_ARM_PC24 unsupported in this context

The cross-tool i used is buildroot.
Did anyone know this issue?
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Re: [uClinux-dev] Problem linking pthread... undefined reference to `pthread_create'

2007-05-14 Thread Daniel Alomar

Hi Claudia,

Have you already enable pthreads inside uClibc?

Regards,

Daniel Alomar

En/na Claudia De Bartolomeis ha escrit:

Hi everybody,
I'm developing an application under uclinux  uclibc 0.9.26 for Coldfire  
m532x,

but I'm having troubles linking pthread
 
Thanks in advance for any help

Claudia
 
This is the compilation log:
 
[EMAIL PROTECTED]:~/ltib-m532xevb-20061117 
mailto:[EMAIL PROTECTED]:~/ltib-m532xevb-20061117 ./ltib -m scbuild  
-p microwindows.spec
 
Processing: microwindows

==
rpmbuild --dbpath /home/claudia/ltib-m532xevb-20061117/rpmdb --define 
'_unpackaged_files_terminate_build 0' --define '_target_cpu m68knommu' 
--define '__strip strip' --define '_topdir 
/home/claudia/ltib-m532xevb-20061117/rpm' --define '_prefix /usr' 
--define '_tmppath /home/claudia/ltib-m532xevb-20061117/tmp' --define 
'_mandir /usr/share/man' --define '_sysconfdir /etc' --define 
'_localstatedir /var' -bc --short-circuit  
/home/claudia/ltib-m532xevb-20061117/dist/lfs-5.1/microwindows/microwindows.spec
Executing(%build): /bin/sh -e 
/home/claudia/ltib-m532xevb-20061117/tmp/rpm-tmp.19156

+ umask 022
+ cd /home/claudia/ltib-m532xevb-20061117/rpm/BUILD
+ cd microwindows-0.90
+ cd src
+ make -j1 'HOSTCC=/usr/bin/gcc -B/usr/bin//'
make -C drivers
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/drivers'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/drivers'

make -C mwin
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin'

make -C bmp
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/bmp'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/bmp'

make -C mwobjects
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/mwobjects'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/mwobjects'

make -C winlib
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/winlib'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin/winlib'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/mwin'

make -C engine
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/engine'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/engine'

make -C fonts
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/fonts'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/fonts'

make -C nanox
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/nanox'
make[1]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/nanox'

make -C demos
make[1]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos'

make -C mwin
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwin'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwin'

make -C mwobjects
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwobjects'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/mwobjects'

make -C nanowm
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanowm'
make[2]: Leaving directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanowm'

make -C nanox
make[2]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanox'

make -C icoone
make[3]: Entering directory 
`/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/demos/nanox/icoone'
Linking 
/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/bin/main 
...
gcc   -I. 
-I/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/include 
-Wall -Wpointer-arith  -lpthread  
-L/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/lib   
main.o menu_engine.o buttons.o -o 
/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/bin/main 
/home/claudia/ltib-m532xevb-20061117/rpm/BUILD/microwindows-0.90/src/lib/libnano-X.a

menu_engine.o: In function `prova':
menu_engine.c:(.text+0x50): undefined reference to `pthread_create'
menu_engine.c:(.text+0x72): undefined reference to `pthread_create'
menu_engine.c:(.text+0x88): undefined reference to `pthread_join'
menu_engine.c:(.text+0x98):