* i can't use the function in kernel?? @ 2001-07-16 10:26 hychon 2001-07-16 12:43 ` PCMCIA Nokia Cardphone 2.0 for MPC823 Nguyen Trung Thanh 2001-07-16 13:10 ` i can't use the function in kernel?? James Petterson 0 siblings, 2 replies; 7+ messages in thread From: hychon @ 2001-07-16 10:26 UTC (permalink / raw) To: linuxppc-embedded hi! I write a sample network device driver based on MPC860T but no experience any device driver. I reference '/kernel/arch/ppc/8xx_io/enet.c' file and I wirte a program. when I compile (ppc_8xx-gcc -o network network.c ) , occur error with following message ============== -error ============================================ ~~/network.c : undefined reference to 'printk' ~~/network.c : relocation truncation to fit : R_PPC_REL24 printk ~/network.c : undefined reference to 'kmalloc' ~~/network.c : relocation truncation to fit : R_PPC_REL24 kmalloc ......... collect2: ld returned 1 exit status make: ***[all] Error 1 ============================================================== I can't use 'printk()' , kmalloc() etc... function . I include linux/kernel.h . linux/fs.h , linux/slab.h ...etc ( header files of need by function) (reference the book 'linux device driver ' by ALESSANDRO RUBIN ) why i don't use those function? ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* PCMCIA Nokia Cardphone 2.0 for MPC823 2001-07-16 10:26 i can't use the function in kernel?? hychon @ 2001-07-16 12:43 ` Nguyen Trung Thanh 2001-07-16 17:12 ` Matthew Locke 2001-07-16 13:10 ` i can't use the function in kernel?? James Petterson 1 sibling, 1 reply; 7+ messages in thread From: Nguyen Trung Thanh @ 2001-07-16 12:43 UTC (permalink / raw) To: linuxppc-embedded Hi all, Pls help me, I'm stuck with this card. Now I used kernel Powerpc Hardhat 2.2.14, and pcmcia-cs-3.1.21 in a custom board using MPC823. I could dial up with this card, but it is not stable, and I could not transfer data such as ftp.... Furthermore, I must set the maximum value for psst = 4, psht = 4, and psl = 20. and add some delay between each time I read from serial port ( in function receive_chars from file serial.c). Have anyone done it, before? Or you have any information about thi card phone, pls give me. Does this card use 16550A, and follow the standard of this chip? Is there any special thing about it spec, timing? Thanks very much, Jari ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PCMCIA Nokia Cardphone 2.0 for MPC823 2001-07-16 12:43 ` PCMCIA Nokia Cardphone 2.0 for MPC823 Nguyen Trung Thanh @ 2001-07-16 17:12 ` Matthew Locke 2001-07-17 7:38 ` Nguyen Trung Thanh 0 siblings, 1 reply; 7+ messages in thread From: Matthew Locke @ 2001-07-16 17:12 UTC (permalink / raw) To: Nguyen Trung Thanh; +Cc: linuxppc-embedded Nguyen Trung Thanh wrote: > Hi all, > > Pls help me, I'm stuck with this card. > Now I used kernel Powerpc Hardhat 2.2.14, > and pcmcia-cs-3.1.21 in a custom board using > MPC823. You should consider moving to 3.1.26, many bugs have been fixed. > > I could dial up with this card, but it is not stable, > and I could not transfer data such as ftp.... > > Furthermore, I must set the maximum value for > psst = 4, psht = 4, and psl = 20. > and add some delay between each time I read from serial port ( in function > receive_chars from file serial.c). In general, there are conflicts between 8xx serial driver (uart.c) and serial.c. They may be stepping on each other. > > Have anyone done it, before? Or you have any information about thi card > phone, pls give me. > > Does this card use 16550A, and follow the standard of this chip? > Is there any special thing about it spec, timing? > > Thanks very much, > Jari > > > > > ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PCMCIA Nokia Cardphone 2.0 for MPC823 2001-07-16 17:12 ` Matthew Locke @ 2001-07-17 7:38 ` Nguyen Trung Thanh 2001-07-18 16:55 ` Matthew Locke 0 siblings, 1 reply; 7+ messages in thread From: Nguyen Trung Thanh @ 2001-07-17 7:38 UTC (permalink / raw) To: Matthew Locke; +Cc: linuxppc-embedded Hi Matthew Locke, Thank you very much for your reply. As you said, I moved to the newest version of Pcmcia Card Service which I could find from ftp.mvista.com Its version is 3.1.24.. I don't know it is good enough or not. Of course, I changed something to avoid conflicts between 8xx serial driver (uart.c) and serial.c. I mapped the _IO_BASE 0x80000000, hardcode irq = 9. Then it worked well with PCMCIA modem such as Xircom. Now I could use this version with Nokia Cardphone2.0, but the result is the same. I just wonder why this PCMCIA cardphone can run smoothly in a Sony VAIO laptop using this version of linux kernel 2.2.14 and pcmcia-3.1.24, but when I run it with my board, I must add some delay in function receive_chars in file: serial.c. Otherwise, I'd receive a lot of gabage charaters. For example: I wrote a string "ATZ" , and then received: "aATZOKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" instead of "ATZOK"??? Would you pls tell me what is the problem here? I think that it is due to the timing of 16550A chip, is it right? Or it is due to the serial speed? If you have any idea about my problem, pls tell me... Thanks for you kindness, Jari > > Nguyen Trung Thanh wrote: > > > Hi all, > > > > Pls help me, I'm stuck with this card. > > Now I used kernel Powerpc Hardhat 2.2.14, > > and pcmcia-cs-3.1.21 in a custom board using > > MPC823. > > > You should consider moving to 3.1.26, many bugs have been fixed. > > > > > I could dial up with this card, but it is not stable, > > and I could not transfer data such as ftp.... > > > > Furthermore, I must set the maximum value for > > psst = 4, psht = 4, and psl = 20. > > and add some delay between each time I read from serial port ( in function > > receive_chars from file serial.c). > > > In general, there are conflicts between 8xx serial driver (uart.c) and > serial.c. They may be stepping on each other. > > > > > Have anyone done it, before? Or you have any information about thi card > > phone, pls give me. > > > > Does this card use 16550A, and follow the standard of this chip? > > Is there any special thing about it spec, timing? > > > > Thanks very much, > > Jari ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PCMCIA Nokia Cardphone 2.0 for MPC823 2001-07-17 7:38 ` Nguyen Trung Thanh @ 2001-07-18 16:55 ` Matthew Locke 0 siblings, 0 replies; 7+ messages in thread From: Matthew Locke @ 2001-07-18 16:55 UTC (permalink / raw) To: Nguyen Trung Thanh; +Cc: linuxppc-embedded Nguyen Trung Thanh wrote: > Hi Matthew Locke, > Thank you very much for your reply. > > As you said, I moved to the newest version of Pcmcia Card Service which I > could find from ftp.mvista.com > Its version is 3.1.24.. I don't know it is good enough or not. > > Of course, I changed something to avoid conflicts between 8xx serial driver > (uart.c) and serial.c. > I mapped the _IO_BASE 0x80000000, hardcode irq = 9. > Then it worked well with PCMCIA modem such as Xircom. > > Now I could use this version with Nokia Cardphone2.0, but the result is the > same. > I just wonder why this PCMCIA cardphone can run smoothly in a Sony VAIO > laptop using this version of linux kernel 2.2.14 and pcmcia-3.1.24, but when > I run it with my board, I must add some delay in function receive_chars in > file: serial.c. > Otherwise, I'd receive a lot of gabage charaters. For example: > I wrote a string "ATZ" , and then received: > "aATZOKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > instead of "ATZOK"??? > > Would you pls tell me what is the problem here? > I think that it is due to the timing of 16550A chip, is it right? > Or it is due to the serial speed? yeah, it could be some sort of timing issue, but I am not looking at the specs for any of those parts. > If you have any idea about my problem, pls tell me... > > Thanks for you kindness, > Jari > > >>Nguyen Trung Thanh wrote: >> >> >>>Hi all, >>> >>>Pls help me, I'm stuck with this card. >>>Now I used kernel Powerpc Hardhat 2.2.14, >>>and pcmcia-cs-3.1.21 in a custom board using >>>MPC823. >>> >> >>You should consider moving to 3.1.26, many bugs have been fixed. >> >> >>>I could dial up with this card, but it is not stable, >>>and I could not transfer data such as ftp.... >>> >>>Furthermore, I must set the maximum value for >>>psst = 4, psht = 4, and psl = 20. >>>and add some delay between each time I read from serial port ( in >>> > function > >>>receive_chars from file serial.c). >>> >> >>In general, there are conflicts between 8xx serial driver (uart.c) and >>serial.c. They may be stepping on each other. >> >> >>>Have anyone done it, before? Or you have any information about thi card >>>phone, pls give me. >>> >>>Does this card use 16550A, and follow the standard of this chip? >>>Is there any special thing about it spec, timing? >>> >>>Thanks very much, >>>Jari >>> > > > ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i can't use the function in kernel?? 2001-07-16 10:26 i can't use the function in kernel?? hychon 2001-07-16 12:43 ` PCMCIA Nokia Cardphone 2.0 for MPC823 Nguyen Trung Thanh @ 2001-07-16 13:10 ` James Petterson 2001-07-16 15:07 ` Tom Rini 1 sibling, 1 reply; 7+ messages in thread From: James Petterson @ 2001-07-16 13:10 UTC (permalink / raw) To: linuxppc-embedded If you're compiling a module, your output file should be 'network.o': ppc_8xx-gcc -o network.o network.c James On Monday 16 July 2001 07:26, hychon wrote: > hi! > > I write a sample network device driver based on MPC860T > but no experience any device driver. > I reference '/kernel/arch/ppc/8xx_io/enet.c' file and I wirte a > program. > > when I compile (ppc_8xx-gcc -o network network.c ) , occur error with > following message > > ============== -error ============================================ > ~~/network.c : undefined reference to 'printk' > ~~/network.c : relocation truncation to fit : R_PPC_REL24 printk > > ~/network.c : undefined reference to 'kmalloc' > ~~/network.c : relocation truncation to fit : R_PPC_REL24 kmalloc > ......... > > collect2: ld returned 1 exit status > make: ***[all] Error 1 > > ============================================================== > > I can't use 'printk()' , kmalloc() etc... function . > > I include linux/kernel.h . linux/fs.h , linux/slab.h ...etc ( header > files of need by function) > (reference the book 'linux device driver ' by ALESSANDRO RUBIN ) > > why i don't use those function? > > ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i can't use the function in kernel?? 2001-07-16 13:10 ` i can't use the function in kernel?? James Petterson @ 2001-07-16 15:07 ` Tom Rini 0 siblings, 0 replies; 7+ messages in thread From: Tom Rini @ 2001-07-16 15:07 UTC (permalink / raw) To: James Petterson, hychon; +Cc: linuxppc-embedded On Mon, Jul 16, 2001 at 10:10:59AM -0300, James Petterson wrote: > If you're compiling a module, your output file should be 'network.o': > > ppc_8xx-gcc -o network.o network.c Along with specifying lots of includes and -D__KERNEL__. And the kernel you'll be using this on needs modules enabled as well. Run a 'make modules' in your kernel tree and see what it uses to compile modules. -- Tom Rini (TR1265) http://gate.crashing.org/~trini/ ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-07-18 16:55 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2001-07-16 10:26 i can't use the function in kernel?? hychon 2001-07-16 12:43 ` PCMCIA Nokia Cardphone 2.0 for MPC823 Nguyen Trung Thanh 2001-07-16 17:12 ` Matthew Locke 2001-07-17 7:38 ` Nguyen Trung Thanh 2001-07-18 16:55 ` Matthew Locke 2001-07-16 13:10 ` i can't use the function in kernel?? James Petterson 2001-07-16 15:07 ` Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).