Re: [uClinux-dev] mmap inconsistent

2007-07-11 Thread David Howells
Robert Daniels <[EMAIL PROTECTED]> wrote:

> I've got a board running linux 2.4.x on an xscale IXP420 with NVRAM on
> the expansion bus.

Are you running with or without an MMU?

I'm not sure msync() does anything if there's no MMU.

David
___
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] open device problem

2007-07-11 Thread rflores
Hi all,

I have changed the Major of my drivers at 251 and 252 and now all work fine.

Thanks.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
En nombre de rflores
Enviado el: lunes, 09 de julio de 2007 15:23
Para: 'uClinux development list'
Asunto: [uClinux-dev] open device problem

Hi All,

I'm writing two character drivers under uClinux in a AT91, one is a simple
driver that, through ioctl, writes and reads in specific HW registers; the
other is a software emulated spi which uses a timer and interrupts.

If I compile the kernel with only one of this drivers, all the operations
over the device driver (open, read, write, close, ioctl) work correctly, but
if I compile the kernel with two drivers, I can't open any device in the
application. It returns with errno=20 (Not a directory).

I create the devices under the Makefile of the vendor.

DEVICES =   \
\
spi,c,120,1 \
\
swg,c,50,1  \
\

In the uClinux start-up, the drivers executes all the init function
correctly


Zarlink MVTX2801A detected
Zarlink Port0 detected : Link up , Gigabit Ethernet Mode , Full Duplex  Mode
, Flow Control Enable
Zarlink Port1 detected : Link down , Gigabit Ethernet Mode , 
Zarlink Port2 detected : Link up , Gigabit Ethernet Mode , Full Duplex  Mode
, Flow Control Enable
Zarlink Port3 detected : Link up , Gigabit Ethernet Mode , Full Duplex  Mode
, Flow Control Enable

SWSPI: Initializating Software SPI driver for AT91xx40
SWSPI: Attached at Timer-2 (irq = 6)

But, in the application, the open function returns -1 and errno = 20.

/> 
/> llaccess test

Unable open device

errno = 20/> 
/>

If I only compile with one driver:

Zarlink MVTX2801A detected
Zarlink Port0 detected : Link up , Gigabit Ethernet Mode , Full Duplex  Mode
, Flow Control Enable
Zarlink Port1 detected : Link down , Gigabit Ethernet Mode , 
Zarlink Port2 detected : Link up , Gigabit Ethernet Mode , Full Duplex  Mode
, Flow Control Enable
Zarlink Port3 detected : Link up , Gigabit Ethernet Mode , Full Duplex  Mode
, Flow Control Enable

/> llaccess test

Open = 3

IOCTL 0x9d00 = 0xda

IOCTL 0x9d01 = 0x97

IOCTL 0x9d01 = 0x98

IOCTL 0x9d01 = 0x97

IOCTL 0x9d01 = 0x97
/>

What's wrong?

All source code of these drivers:

sd_api_conf.h
#ifndef _SD_API_CONF_H_
#define _SD_API_CONF_H_

  #define SD_PIN_NSS 25  
  #define SD_PIN_PROTECT 24
  #define SD_PIN_PRESENT 11
  #define SD_PIN_MISO20
  #define SD_PIN_MOSI19
  #define SD_PIN_SCK 18

  #define SD_IDLE_WAIT_MAX 100

  #define SD_BLOCKSIZE   512
  #define SD_BLOCKSIZE_NBITS 9

#endif




spi.h
#ifndef _SPI_H_
#define _SPI_H_

  #define SWSPI_MAJOR 120
  #define SWSPI_FREQ  2
  #define SWSPI_RC  (CONFIG_ARM_CLK>>1)/SWSPI_FREQ
  /*Capture Mode Register*/
  #define TCCLKS(x)  (x & 0x07) << 0
  #define CLKI(x)(x & 0x01) << 3
  #define BURST(x)   (x & 0x03) << 4
  #define LDBSTOP(x) (x & 0x01) << 5
  #define LDBDIS(x)  (x & 0x01) << 7
  #define ETRGEDG(x) (x & 0x03) << 8
  #define ABETRG(x)  (x & 0x01) << 10
  #define CPCTRG(x)  (x & 0x01) << 14
  #define WAVE(x)(x & 0x01) << 15
  #define LDRA(x)(x & 0x03) << 16
  #define LDRB(x)(x & 0x03) << 18

 
  static int __init swspi_init (void);
  int spi_send_byte (char byte);
  char spi_receive_byte (void);
  static ssize_t swspi_write (struct file *filp,const char *buf,ssize_t
count,loff_t *f_pos);
  static ssize_t swspi_read (struct file *filp,char *buf, ssize_t
count,loff_t *f_pos);
  static int spi_open(struct inode *inode, struct file *filp);
  static int spi_release(struct inode *inode, struct file *filp);
  void spi_cs_assert (void);
  void spi_cs_deassert (void);
  static void SWSPI_IRQ_Handler (int irq,void *dev_id,struct pt_regs *regs);
  
#endif

spi.c
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 

#include 

#include "sd_api_conf.h"
#include "spi.h"

#if (SPI_TIMER==0)
#   define SPI_TIMER_IRQ_NUM IRQ_TC0
#elif (SPI_TIMER==1)
#   define SPI_TIMER_IRQ_NUM IRQ_TC1
#elif (SPI_TIMER==2)
#   define SPI_TIMER_IRQ_NUM IRQ_TC2
#else
#error Wierd -- SPI_TIMER is not defined or something
#endif


static char spi_byte = 0;
static int openflag_spi = 0;
static spinlock_t irq_spi_lock;
static struct semaphore spi_sem;
 
static struct irqaction spi_timer_irq = 
  { SWSPI_IRQ_Handler, 0, 0, "swspi", NULL, NULL };

extern int setup_arm_irq(int, struct irqaction *);
extern void at91_mask_irq(unsigned int irq);
extern void at91_unmask_irq(unsigned int irq);
extern void at91_mask_ack_irq(unsigned int irq);


EXPORT_SYMBOL(swspi_init);
EXPORT_SYMBOL(swspi_cleanup);

static struct file_operations swspi_fops = {
  read:   swspi_read,
  write:  swspi_write,
  open:   spi_open,
  release:spi_release,
  //ioctl:  spi_ioctl,
};

static int spi_open(struct i

[uClinux-dev] help

2007-07-11 Thread venugopal saminatham
hi freinds,

i'm very much new to linux deveopment system.

now i'm working with Embest s3c4510 board.

i had managed to create image after installing tool
chain and dist.

now i want to know how to include 
1. new application
2. to utilize the inbuilt drivers like usb,bluetooth
etc.,

i can't find any supporting document in uclinux.org
except "Adding-User-Apps-HOWTO".

after followed that steps, when i'm giving executions
command from /bin folder, it is not giving the output
(Ex. Hello world).

pls suggest any web address for the above query or
send any material regarding the above

with

S.Venugopal
Chennai.




   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433
___
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] mmap inconsistent

2007-07-11 Thread Robert Daniels
Yes, I'm using the MMU.  I've looked into this a little more and I
believe I was using the msync call incorrectly.  I had been using it
with the MS_SYNC flag when I think I really wanted the MS_INVALIDATE
flag.  Apparently when the documentation says that changes made to
MAP_SHARED memory are shared immediately, it's not as immediate as I
thought.

Thanks!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Howells
Sent: Wednesday, July 11, 2007 5:52 AM
To: uClinux development list
Subject: Re: [uClinux-dev] mmap inconsistent

Robert Daniels <[EMAIL PROTECTED]> wrote:

> I've got a board running linux 2.4.x on an xscale IXP420 with NVRAM on
> the expansion bus.

Are you running with or without an MMU?

I'm not sure msync() does anything if there's no MMU.

David
___
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 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] kernel 2.4.x MMC/SD card driver

2007-07-11 Thread Marcos Pereira

Hi Gavin,
I added the MMC/SD device to the /dev directory and now the card access 
is working.

Thanks for the help,

Marcos
___
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] uClinux supports shared memory IPC?

2007-07-11 Thread Allen Yang
Hi,

I am using ColdFire MCF5329EVB and uClinux (2.6.17 kernel, uClibc
0.9.27).

I am trying to use shared memory IPC in my application. I enabled SYS V
IPC when I configured uClinux kernel. I tried semaphore and message
queue. They seem to be working. I added shared memory in my application:

#include 
Key_t MY_SHM_ID;
shmid = shmget ( MY_SHM_ID, 1024, (IP_CREAT | 0666) );

The compilation was OK. However, when I downloaded to my board, the
shared memory creation always failed. shmid was always -1.

Some people said MCF5329 doesn't have MMU so that it doesn't support
shared memory IPC. Other people said shared memory IPC can be used even
without MMU.

Anybody here can verify if MCF5329 without MMU can use shared memory
IPC?

Thanks in advance,

Allen





The information contained in this email and attachments to this email are the 
proprietary and confidential property 
of Nucomm, Inc.  The information is provided in strict confidence and shall not 
be reproduced, copied, or
used (partially or wholly) in any manner without prior, express written 
authorization of Nucomm, Inc.

___
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] uClinux supports shared memory IPC?

2007-07-11 Thread David Howells
Allen Yang <[EMAIL PROTECTED]> wrote:

> Some people said MCF5329 doesn't have MMU so that it doesn't support
> shared memory IPC. Other people said shared memory IPC can be used even
> without MMU.
> 
> Anybody here can verify if MCF5329 without MMU can use shared memory
> IPC?

It can be used, but it depends on the kernel you're using.

David
___
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] uClinux supports shared memory IPC?

2007-07-11 Thread Allen Yang
Hi, David. Thanks for your information.

I am using ColdFire MCF5329EVB and uClinux (kernel 2.6.17, uClibc
0.9.27).

kernel 2.6.17 supports shared memory IPC? How to verify if the kernel I
am using supports that?

Thanks,

Allen Yang


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Howells
Sent: Wednesday, July 11, 2007 12:25 PM
To: uClinux development list
Subject: Re: [uClinux-dev] uClinux supports shared memory IPC?

Allen Yang <[EMAIL PROTECTED]> wrote:

> Some people said MCF5329 doesn't have MMU so that it doesn't support
> shared memory IPC. Other people said shared memory IPC can be used
even
> without MMU.
> 
> Anybody here can verify if MCF5329 without MMU can use shared memory
> IPC?

It can be used, but it depends on the kernel you're using.

David
___
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





The information contained in this email and attachments to this email are the 
proprietary and confidential property 
of Nucomm, Inc.  The information is provided in strict confidence and shall not 
be reproduced, copied, or
used (partially or wholly) in any manner without prior, express written 
authorization of Nucomm, Inc.

___
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] Help choosing a good hardware

2007-07-11 Thread Giuseppe Modugno

Hi all,
this is my first post to this mailing list. I used Linux only on desktop 
computers and wrote programs in C for simple 8- and 16-bit embedded 
microcontrollers (without a real operating systems).


Now I want to make the jump and start with a higher level processor that let me 
run a Linux. But the possibilities (microprocessor cores, SOCs and boards) are 
so much I'm now very confused.


Let's start with the description of the applications.

The first is to have a HTTP/SNMPv3 remote control of my equipment. I think I 
should run a simple web server and a SNMPv3 agent (from Net-SNMP linux package). 
Most probably I need to drive a simple graphical LCD (based on T6963C 
controller), some buttons, some analog/digital inputs and some digital outputs.


The second application is slightly more complex because I need to drive a TFT 
panel (QVGA) together with the things described before.



The first choice to maintain a low cost (of materials, assembling, prototyping 
and so on) is to use a simple 32-bit microcontroller without MMU and use uClinux 
as the operating system. I could use ARM7 (from Atmel, Philips, Samsung, etc.) 
or Coldfire (from Freescale), etc. Could someone suggest me a low-cost board 
that mounts a MMU-less microcontroller and runs correctly uClinux? Of course, 
the microcontroller should be stable and shouldn't go in obsolescence in a short 
time (some years).
I have a doubt: can a SNMPv3 agent be compiled and run on these simple boards? I 
know that someone tried to run with success a SNMPv1/2c agent on similar 
boards... but what about SNMPv3?

What is an estimate about the Flash and RAM size that I need to do that?

Someone said me that I'm crazy to start with a MMU-less microcontroller and 
uClinux because there are now many different boards that mount MMU 
microprocessors (like ARM9 or AVR32 or similar) at a similar price of a MMU-less 
microcontroller board. The big advantage to have a MMU microprocessor is the 
possibility to run a real Linux kernel and not uClinux, so decreasing headaches 
during compilation of some complex applications (like Net-SNMP).

In this case, can someone suggest me some boards to start with?

What is your point of view about this situation?

Thank you for your kindly help.
___
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] (no subject)

2007-07-11 Thread 王小培

Good Luck

王小培
--
地址: 大连 软件园路8-6# 
   东软股份大连分公司 IS事业部
邮编: 116023
邮件: [EMAIL PROTECTED]
电话: 0411-8475 7755
--___
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