* Re: Custom Driver
From: Grant Likely @ 2006-01-06 23:02 UTC (permalink / raw)
To: Brett McNerney; +Cc: linuxppc-embedded
In-Reply-To: <000c01c6101b$2332efe0$0202a8c0@lilmac>
First off, please CC: the mailing list when you email me so others
having the same problem can see the response.
Brett McNerney wrote:
> Yes I can access the register from a no-os program. There a Xilinx specific
> functions to read and write to the registers and those work just fine. I
> can run a full test on the register with no problem. Its just when I go to
> use linux I can not access the register anymore.
> The driver attempted to use is attached along with the sample test program
> to run under linux. I added the reg_driver to the Xilinx_gpio makefile.
> Got everything to compile and create the kernel but from there the /dev/reg
> that should be there is not.
Unless you're using devfs (not recommended), /dev/* entries are not
created automatically, you need to create them yourself with mknod.
Are you using a 2.4 or a 2.6 kernel?
It looks like your doing the right thing with ioremap. However, I would
break things up a bit. Before wiring it up to a char device, see if you
can twiddle the GPIO registers from within the driver itself; then try
to get a user space app to twiddle them.
Also, for the GPIO core, I'd dump the Xilinx headers and libraries. The
register access is so simple that you can just read/write them directly.
The xilinx layer just become another layer of abstraction without a
whole lot of benefit.
Cheers,
g.
>
> -----Original Message-----
> From: Grant Likely [mailto:grant.likely@secretlab.ca]
> Sent: Monday, January 02, 2006 10:59 PM
> To: Brett McNerney
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: Custom Driver
>
> Brett McNerney wrote:
>
>>I am need to create a driver to interface to custom hardware on a ml403
>>board. I am first trying to just create a ipif register bank and access
>>the registers from linux but am not having any luck of yet. Has anyone
>>successfully done this and if so explain how or supply a driver to do
>>this and how to build it into the kernel? I am new at this and am
>>having great difficutly right now.
>>
>>Thanks for any help anyone can supply
>
> Can you access your device from a debugger, or a no-os program (like a
> bootloader)? Did you call ioremap() to map the physical register
> address into virtual memory? Can you give more detail?
>
> g.
>
>
>
>
> ------------------------------------------------------------------------
>
> /* my driver header file, defines some consts, structs, etc. */
> /* modeled after/simplified from Xilinx's xgpio */
> /* Author: Joey Rios <rios@soe.ucsc.edu> */
>
> #ifndef __IMPROVED_DRIVER_H
> #define __IMPROVED_DRIVER_H
>
> #define REG_IOCTL_BASE 'r'
>
> #define REG_MINOR 23
>
> struct reg_ioctl_data
> {
> int data;
> };
>
> #define REG_IN _IOWR(REG_IOCTL_BASE, 0, struct reg_ioctl_data)
> #define REG_OUT _IOW (REG_IOCTL_BASE, 1, struct reg_ioctl_data)
>
> #endif
>
>
>
> ------------------------------------------------------------------------
>
> /* test_gpio.c
> * This program will test our driver (based on xgpio)
> * Author: Joseph Rios <rios@soe.ucsc.edu>
> * Date: 08/04/05
> *
> */
>
> #include <stdio.h>
> #include <errno.h>
> #include <fcntl.h>
> #include <linux/ioctl.h>
> /* Somehow you need to make sure the program can find this: */
> #include "reg_driver.h"
>
>
> int main()
> {
> int rtn, i;
> int gpio_fd = -1;
> struct reg_ioctl_data it;
> /* Actual value is not important */
> it.data = 812;
>
> /* Opening */
> gpio_fd = open("/dev/modular_reg", O_RDWR);
> if(gpio_fd == -1){
> perror("Couldn't open /dev/reg");
> return 1;
> }
> printf("Got through opening /dev/reg\n");
> printf("Will write value of it.data (%i) to reg.\n", it.data);
>
> /* ioctl test */
>
>
> rtn = ioctl(gpio_fd, REG_OUT, &it);
> /* rtn = 0 means success */
> if(!rtn) printf("Woo hoo! ioctl(REG_OUT) worked!\n");
> else perror("Dang, ioctl(REG_OUT) didn't work");
>
> /* Again, value isn't important, as long as chagned */
> it.data = 100;
> printf("Now changed it.data to %i.\n", it.data);
> printf("Will read reg into it.data to see 'it' change.\n");
>
> printf("it.data = %i before ioctl(REG_IN)\n", it.data);
> rtn = ioctl(gpio_fd, REG_IN, &it);
>
> if(!rtn) printf("Woo hoo! ioctl(REG_IN) worked!\n");
> else perror("Dang, ioctl(REG_IN) didn't work");
>
> printf("it.data = %i after ioctl(REG_IN)\n", it.data);
>
> /* Closing */
> if(close(gpio_fd)) perror("Couldn't close /dev/reg");
> else printf("Closed /dev/reg\n");
>
> return 0;
> }
>
>
>
> ------------------------------------------------------------------------
>
> /* This is a driver for our register IP */
> /* Completely modeled after the xilinx_gpio driver. This
> * driver currently doesn't work as a loadable module for
> * unknown reasons. I think the ioremap does something
> * goofy to it if called at runtime.
> */
>
> #ifndef __KERNEL__
> #define __KERNEL__
> #endif
>
> #include <linux/config.h>
> #include <linux/module.h>
> #include <linux/miscdevice.h>
> #include <linux/kernel.h> /* printk() */
> #include <linux/init.h> /* module_{init, cleanup}() */
> #include <linux/slab.h>
> #include <asm/system.h> /* maybe don't need? */
> #include <xparameters_ml300.h>
> #include <asm/io.h>
> #include <asm/uaccess.h>
> #include <asm/irq.h>
>
> #include <xio.h>
> #include <xbasic_types.h>
> #include "reg_driver.h"
>
> /* A redefinition to cutdown on some typing later */
> #define REG_BASE XPAR_REGISTER_0_BASEADDR
> #define REG_HIGH XPAR_REGISTER_0_HIGHADDR
>
> /* Some module documentation */
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Joey Rios <rios@soe.ucsc.edu>");
> MODULE_DESCRIPTION("Driver for a register device");
> MODULE_SUPPORTED_DEVICE("plb_register");
>
>
> /* Global variables needed across methods */
> static u32 reg_remapped_address;
> const static long remap_size = REG_HIGH - REG_BASE + 1;
>
> /* open/close do nothing special. inc/dec use count */
> int reg_open (struct inode *inode, struct file *filp)
> {
> MOD_INC_USE_COUNT;
> return 0;
> }
>
> int reg_release (struct inode *inode, struct file *filp)
> {
> MOD_DEC_USE_COUNT;
> return 0;
> }
>
> /* here is where all the i/o happens. arg is assumed to be a pointer
> * to the data. currently, that data is a struct reg_ioctl_data.
> * this is probably too complicated at the moment and will
> * eventually be just an int, but not sure. filp and inode are not
> * used here.
> */
> static int
> reg_ioctl(struct inode* inode, struct file* filp, unsigned int cmd,
> unsigned long arg)
> {
> int temp;
> struct reg_ioctl_data reg_data;
>
> if(copy_from_user(®_data, (void*) arg, sizeof(reg_data)))
> return -EFAULT;
>
> switch(cmd){
> case REG_IN:
> reg_data.data = XIo_In32(reg_remapped_address);
> if(copy_to_user((struct reg_ioctl_data*)arg, ®_data,
> sizeof(reg_data)))
> return -EFAULT;
> break;
> case REG_OUT:
> temp = reg_data.data;
> XIo_Out32(reg_remapped_address, (u32) temp);
> break;
> default:
> return -ENOIOCTLCMD;
> }
> return 0;
> }
>
> /* The operations to be registered with this driver */
> struct file_operations reg_fops = {
> ioctl: reg_ioctl,
> open: reg_open,
> release:reg_release,
> owner: THIS_MODULE,
> };
>
> /* For registering a misc device */
> static struct miscdevice miscdev={
> minor:REG_MINOR,
> name:"reg",
> fops:®_fops,
> };
>
> /* init will remap the physical address and save the result
> * in reg_remapped_address (global to the driver) then will
> * register the device as a misc device
> */
> static int reg_init_module(void)
> {
> int rtn;
>
> reg_remapped_address = (u32) ioremap(REG_BASE, remap_size);
> printk(KERN_INFO "%s at 0x%08X mapped to 0x%08X\n", miscdev.name,
> REG_BASE, reg_remapped_address);
>
> rtn = misc_register(&miscdev);
> if(rtn)
> {
> printk(KERN_ERR "%s: Could not register driver. \n",
> miscdev.name);
> return rtn;
> }
> return 0;
> }
>
> /* cleanup simply unmaps the address and deregisters the driver */
> static void reg_cleanup_module(void)
> {
> iounmap(reg_remapped_address);
> misc_deregister(&miscdev);
> }
>
> EXPORT_NO_SYMBOLS;
> module_init(reg_init_module);
> module_exit(reg_cleanup_module);
>
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761
^ permalink raw reply
* Re: Booting from RAM Disk
From: Matt Jerdonek @ 2006-01-06 22:16 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20060106211902.77247.qmail@web33501.mail.mud.yahoo.com>
I didn't have the EXT2 file system enabled in the
kernel. Thanks to Mark Chambers for pointing that
out.
-- Matt
__________________________________________
Yahoo! DSL Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
^ permalink raw reply
* Booting from RAM Disk
From: Matt Jerdonek @ 2006-01-06 21:19 UTC (permalink / raw)
To: linuxppc-embedded
I've got a custom 852T board, similar to an AdderII.
I've got the board booting linux fine using NFS. Now
I'm trying to get it to work stand-alone, and I can't
get it to boot from a RAM disk. I'm using the 2.4.25
kernel from Denx, and the Ramdisk image from the ELDK
(ppc_8xx/images/ramdisk.image.gz).
Below is the output I'm getting. The "MAJ" tags
indicate printk's that were inserted by me. If anyone
has a clue to what I'm doing wrong, I'd appreciate it.
Thanks,
-- Matt
loaded at: 00380000 005C1218
board data at: 01FFFEF8 01FFFF48
relocated to: 003852FC 0038534C
zimage at: 00385848 00431C28
initrd at: 00432000 005BD040
avail ram: 005C2000 02000000
Linux/PPC load: root=/dev/ram rw ip=192.168.0.6
console=ttyS0,115200
Uncompressing Linux...done.
Now booting the kernel
Linux version 2.4.25 (matt@debian) (gcc version 3.3.3
(DENX ELDK 3.1.1 3.3.3-9)) #5 Fri Jan 6 13:58:44 MST
2006
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw ip=192.168.0.6
console=ttyS0,115200
Decrementer Frequency = 186624000/60
Calibrating delay loop... 49.56 BogoMIPS
Memory: 29164k available (1204k kernel code, 364k
data, 56k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768
bytes)
Inode cache hash table entries: 2048 (order: 2, 16384
bytes)
Mount cache hash table entries: 512 (order: 0, 4096
bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096
bytes)
Page-cache hash table entries: 8192 (order: 3, 32768
bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society
NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch
(rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996
okir@monad.swb.de).
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
CPM UART driver version 0.04
ttyS0 at 0x0280 is on SMC1 using BRG1
ttyS1 at 0x0200 is on SCC3 using BRG2
pty: 256 Unix98 ptys configured
eth0: FEC ENET Version 0.3, FEC irq 3, addr
08:00:3e:28:7a:ba
RAMDISK driver initialized: 16 RAM disks of 4096K size
1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind
4096)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.0.6,
mask=255.255.255.0, gw=255.255.255.255,
host=192.168.0.6, domain=, nis-domain=(none),
bootserver=255.255.255.255,
rootserver=255.255.255.255, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1580k freed
MAJ: initrd_load returns 1
MAJ: In mount_root
MAJ: devfs_make_root name = ram
MAJ: create_dev returns 0
MAJ: mount_block_root fs_name = jffs2
Kernel panic: VFS: Unable to mount root fs on 01:00
<0>Rebooting in 180 seconds..
__________________________________________
Yahoo! DSL Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
^ permalink raw reply
* Re: VFS: Cannot open root device "31:03" or unknown-block(31,3)
From: Wolfgang Denk @ 2006-01-06 15:08 UTC (permalink / raw)
To: David Jander; +Cc: HappyPhot, linuxppc-embedded
In-Reply-To: <200601061519.14550.david.jander@protonic.nl>
In message <200601061519.14550.david.jander@protonic.nl> you wrote:
>
> > > I see you are using DENX ELDK 3.1.1 and a kernel which AFAIK is not
> > > supported
This is a serious misunderstanding. There is no such thing like a
specific kernel version which is supported by the ELDK.
You don't talk about any specific version of a C programm that is
supported by the GNU compiler either.
The ELDK is primarily a *toolkit* which works with arbitrary C and
C++ programs and with any version of the kernel tree (at least in
theory; very recent version s of the Linux kernel [ > 2.6.14] cannot
be compiled with ELDK 3.1.x any more, but this is a different issue).
> > Do you know where to get the infomation about which kernel version it
> > supports?
The ELDK supports *any* kernel version.
> The one that comes with that version of ELDK? Just a guess ;-)
Wrong guess.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"I've seen it. It's rubbish." - Marvin the Paranoid Android
^ permalink raw reply
* [PATCH] Big combined patch for ml403 with OCP, ENET.
From: Jan Vermeulen (Mind) @ 2006-01-06 14:48 UTC (permalink / raw)
To: linuxppc-embedded
Hello all,
This is my first patch.
It is rather big.
It's for the Xilinx Virtex4 based ref board ml403.
Based on the work of Grant Likely, David H. Lynch Jr. and on the code
from Montavista and Xilinx, I made a big patch including everything,
including my own work to port the OCP and Ethernet driver to the
2.6.14.4 kernel.
I started work on the SysACE driver, but this is a bit more work, as it
isn't using the granulary locking for block drivers as can be found in
the 2.6 kernels.
The gzipped patch (~165kB) can be found here:
ftp://ftp.mind.be/Virtex4/linux-2.6-ml403/ml403_core_ocp_enet_sysace.diff.gz
If I have more time in the future, I'll add support for sound, gpio, ...
Best regards,
Jan Vermeulen
^ permalink raw reply
* OOPS!!! - Help.
From: Jayaprakash Shanmugam @ 2006-01-06 14:47 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I am using 2.6 kernel on MPC 8270. After 15-20 mins, I got the
following crash from my application. I dont have any clue on what
could be wrong. Can you help me out ?
kernel BUG in page_remove_rmap at mm/rmap.c:482!
Oops: Exception in kernel mode, sig: 5 [#1]
PREEMPT
NIP: C0055F18 LR: C004E4EC SP: C066DC50 REGS: c066dba0 TRAP: 0700 Not ta=
inted
MSR: 00029032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK =3D c0705b30[398] 'CCMsgHndlrExe' THREAD: c066c000
Last syscall: 117
GPR00: C0377388 C066DC50 C0705B30 C0377380 FFFFFFFF 10006000 00000040 00200=
200
GPR08: 00100100 00000001 00000000 FFFFFFFF 88008222 10037DE0 00000000 C0280=
000
GPR16: 00000000 C066DDAC 00000001 CE9C5D20 C0280000 00000001 10006000 06A9C=
305
GPR24: 1000C000 C02839A0 00008000 C0377380 00000000 FFFFFFFD 00006000 C0773=
030
NIP [c0055f18] page_remove_rmap+0x54/0x68
LR [c004e4ec] zap_pte_range+0x1a4/0x30c
Call trace:
[c004e4ec] zap_pte_range+0x1a4/0x30c
[c004e69c] zap_pmd_range+0x48/0x84
[c004e718] zap_pud_range+0x40/0x78
[c004e7f8] unmap_page_range+0xa8/0xc8
[c004e964] unmap_vmas+0x14c/0x234
[c0053cd8] exit_mmap+0x6c/0x168
[c001bcdc] mmput+0x54/0xe4
[c00206f4] exit_mm+0x168/0x1d0
[c00210bc] do_exit+0xc8/0x3f8
[c002146c] do_group_exit+0x38/0xd8
[c002caa8] get_signal_to_deliver+0x1a8/0x344
[c0007d38] do_signal+0x38/0x24c
[c0004614] do_user_signal+0x74/0xc4
note: CCMsgHndlrExe[398] exited with preempt_count 1
scheduling while atomic: CCMsgHndlrExe/0x00000002/398
Call trace:
[c0006d48] dump_stack+0x18/0x28
[c01b906c] schedule+0x654/0x658
[c01b9e04] schedule_timeout+0x84/0xdc
[c0147cc4] sxc_close+0x88/0xc4
[c00f98c0] release_dev+0x7b8/0x7cc
[c00f9ed4] tty_release+0x20/0x3c
[c005e8dc] __fput+0x174/0x180
[c005e764] fput+0x3c/0x40
[c005cbe8] filp_close+0x78/0xbc
[c0020240] put_files_struct+0xac/0x110
[c00210f8] do_exit+0x104/0x3f8
[c00047c8] die+0xbc/0xc4
[c0004840] _exception+0x70/0x74
[c0004440] ret_from_except_full+0x0/0x4c
[c0055f18] page_remove_rmap+0x54/0x68
Regards,
Jayaprakash.
^ permalink raw reply
* Re: VFS: Cannot open root device "31:03" or unknown-block(31,3)
From: David Jander @ 2006-01-06 14:19 UTC (permalink / raw)
To: HappyPhot; +Cc: linuxppc-embedded
In-Reply-To: <002e01c612ca$f7614a80$0760120a@photon>
On Friday 06 January 2006 15:09, HappyPhot wrote:
> > I see you are using DENX ELDK 3.1.1 and a kernel which AFAIK is not
> > supported
> > by this version of ELDK. Are you sure this is supposed to work? It
> > probably
> > will, but I don't know what the "Sandpoint" is (it looks like a PowerPC
> > processor of the MPC7xx series to me), so I couldn't tell.
>
> Do you know where to get the infomation about which kernel version it
> supports?
The one that comes with that version of ELDK? Just a guess ;-)
Greetings,
--
David Jander
^ permalink raw reply
* Re: How to enable PHY
From: Alex Zeffertt @ 2006-01-06 13:47 UTC (permalink / raw)
To: batsayan.das; +Cc: linuxppc-embedded
In-Reply-To: <OF114C07C5.7CED9F64-ON652570EE.00481B82-652570EE.00489CCF@tcs.com>
On Fri, 6 Jan 2006 18:43:08 +0530
batsayan.das@tcs.com wrote:
>
> Hi,
>
> I found that ADS8260 board enables PHY by the following lines of
> code
>
> #ifndef CONFIG_ADS8260
> /* Enable the PHY.
> */
> *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_FETHIEN;
> *(volatile uint *)(BCSR_ADDR + 4) |= BCSR1_FETH_RST;
> #endif
>
>
> Our board does not have BCSR. My question is how to enable PHY for
> MPC8260 based customs board without BCSR?
You have to take your PHY out of reset. How to do this depends on
your board. On the ADS8260 the PHY reset line goes to the BCSR and
you must write the above to BCSR register 1 to tell it to change the
pin level.
On your board you may need to use GPIO, or you may need to do nothing
at all. Read your schematics!
Regards,
Alex
^ permalink raw reply
* Re: VFS: Cannot open root device "31:03" or unknown-block(31,3)
From: HappyPhot @ 2006-01-06 14:09 UTC (permalink / raw)
To: David Jander; +Cc: linuxppc-embedded
In-Reply-To: <200601050852.45616.david.jander@protonic.nl>
> in your .config:
>
>> CONFIG_JFFS2_FS=m
>
> This is wrong. You have to choose "y", not "m" (for module).
> This way jffs2 is compiled as a module. That means, that jffs2 filesystem
> will
> not be available until the module is loaded with "insmod jffs2" of
> something
> similar. That in turn means that your system has to start up first in
> order
> to be able to do this, but since you can't start because your root
> filesystem
> is on jffs2, you have created yourself a "chicken and egg" problem.
> If you choose "y" then jffs2 support will be compiled into the kernel, and
> thus be available before booting.
Hi, David,
Yes, you are right. After changing it to 'y', the " VFS: Cannot open
root..."
message was gone. I'm so happy and thank you very much.
Now it is another problem again. (something like: Oops: kernel access of
bad
area. sig:11...). I am going to check what happened.
>
> In your bootlog:
>
>> Linux version 2.6.14.2 (happy@sddlinux1) (gcc version 3.3.3 (DENX ELDK
>> 3.1.1
>> 3.3.3-10)) #29 Sun Jan 1 22:34:28 CST 2006
>> Motorola SPS Sandpoint Test Platform
>
> I see you are using DENX ELDK 3.1.1 and a kernel which AFAIK is not
> supported
> by this version of ELDK. Are you sure this is supposed to work? It
> probably
> will, but I don't know what the "Sandpoint" is (it looks like a PowerPC
> processor of the MPC7xx series to me), so I couldn't tell.
Do you know where to get the infomation about which kernel version it
supports?
thank you,
/HappyPhot
^ permalink raw reply
* Re: How to enable PHY
From: Mark Chambers @ 2006-01-06 13:41 UTC (permalink / raw)
To: linuxppc-embedded, batsayan.das
In-Reply-To: <OF114C07C5.7CED9F64-ON652570EE.00481B82-652570EE.00489CCF@tcs.com>
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
>I found that ADS8260 board enables PHY by the following lines of code
>
>#ifndef CONFIG_ADS8260
> /* Enable the PHY.
> */
> *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_FETHIEN;
> *(volatile uint *)(BCSR_ADDR + 4) |= BCSR1_FETH_RST;
>#endif
>
>Our board does not have BCSR. My question is how to enable PHY for MPC8260 based customs board without BCSR?
If your board does not have the BCSR you can just leave this code out. Usually, you only need to configure which MDII
interface your PHY is connected to and which IRQ it uses. But of course I don't know how your PHY is wired up on your
custom board.
Mark Chambers
[-- Attachment #2: Type: text/html, Size: 2022 bytes --]
^ permalink raw reply
* How to enable PHY
From: batsayan.das @ 2006-01-06 13:13 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
Hi,
I found that ADS8260 board enables PHY by the following lines of code
#ifndef CONFIG_ADS8260
/* Enable the PHY.
*/
*(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_FETHIEN;
*(volatile uint *)(BCSR_ADDR + 4) |= BCSR1_FETH_RST;
#endif
Our board does not have BCSR. My question is how to enable PHY for MPC8260
based customs board without BCSR?
Thanks,
Batsayan Das
Tata Consultancy Services Limited
Mailto: batsayan.das@tcs.com
Website: http://www.tcs.com
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
[-- Attachment #2: Type: text/html, Size: 1642 bytes --]
^ permalink raw reply
* Re: io.h question
From: Arnd Bergmann @ 2006-01-06 12:03 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <OF4583615F.8ED595CE-ON852570ED.00736A17-852570ED.00736A1D@notes.udayton.edu>
On Thursday 05 January 2006 21:00, mcnernbm@notes.udayton.edu wrote:
> I finally noticed out_8 and in_8 and what not are located in the
> ppc io.h file in the kernel development download. But when I
> tried to do a io.h with in my program I added #include <asm/io.h>
> and it seems to find it with not problems but it can not find the
> functions with in that file. Am i missing a define I need to set
> or something so I can see the right files with in io.h I am
> compiling for a ppc405 on a xilinx virtex 4 board.
The definitions in that file are only usable from inside the kernel,
you can not use them in a user space application.
The correct way to solve your problem (which you did not explain, so
I can only guess) would be to write a kernel device driver for
the peripherial you want to drive, at least if it does not exist yet.
For prototyping, you can play with mmap() on /dev/mem in a user
application, but that is often not very reliable.
Arnd <><
^ permalink raw reply
* Help on LXT971 eth initialization
From: batsayan.das @ 2006-01-06 10:43 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
Hi,
My MPC8260 customs board has LXT971 Ethernet chip on FCC1. I am able to
get the linux prompt, but I am unable to initialize ethernet. I have tried
different bootarg options (like setenv bootargs ip=dhcp etc) and
different kernel compilation options (like from make menuconfig, Network
Option->enable DHCP support etc), but none enables the ethernet interface.
Any help will be appreciated.
FYI, the ethernet is working from U-Boot.
Thanks,
Batsayan Das
Tata Consultancy Services Limited
Mailto: batsayan.das@tcs.com
Website: http://www.tcs.com
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
[-- Attachment #2: Type: text/html, Size: 1448 bytes --]
^ permalink raw reply
* Re: Help need: Porting Linux to PQ2FADS_ZU board
From: Wolfgang Denk @ 2006-01-06 10:13 UTC (permalink / raw)
To: zengshuai; +Cc: ppc
In-Reply-To: <23894955.1136537390660.JavaMail.postfix@mx3.mail.sohu.com>
In message <23894955.1136537390660.JavaMail.postfix@mx3.mail.sohu.com> you wrote:
>
> My board is PQ2FADS_ZU.Does the ELDK not support it?
ELDK is, as the name suggests, a Development Toolkit, i. e. a
toolchain. As such, it is independent from the hardware and doesn not
support any specific board, or, if you like, it supports all boards,
even those that don't exist yet.
What you are asking for is board support in a specific kernel tree.
There is no specific support for the PQ2FADS_ZU board in our
linuxppc_2_4_devel tree (which is included with the ELDK
distribution). On the other hand this is a standard board which which
is probably working fine, but we never tested or varified it.
I guess that it is not configured for use with U-Boot.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"Never give in. Never give in. Never. Never. Never."
- Winston Churchill
^ permalink raw reply
* Re: How to compile freescale example programs using eldk?
From: Wolfgang Denk @ 2006-01-06 10:08 UTC (permalink / raw)
To: zengshuai; +Cc: ppc
In-Reply-To: <6251452.1136535834574.JavaMail.postfix@mx3.mail.sohu.com>
In message <6251452.1136535834574.JavaMail.postfix@mx3.mail.sohu.com> you wrote:
>
> Them aren't linux drvier but for bareboard. How can I compile them using eldk?
You do it exactly the same way like you do it with any other compiler
toolchain.
If the tools come with Makefiles and Linker scripts for GNU gcc and
ld then you are set. If not, you will have to come up with your own
build rules and linker commands.
You can check how U-Boot code (especially the standalone programs)
gets linked, but be warned, this is not exactly trivial. You have to
understand what you are doing, and how the linker works.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Just because your doctor has a name for your condition doesn't mean
he knows what it is.
^ permalink raw reply
* Re: [PM-SPAM] Help need: Porting Linux to PQ2FADS_ZU board
From: KokHow Teh @ 2006-01-06 9:09 UTC (permalink / raw)
To: linuxppc-embedded
>bootargs=root=/dev/nfs rw nfsroot=172.17.248.253:/opt/eldk3/ppc_6xx
ip=172.17.24
>8.244:172.17.248.253:172.17.248.253:255.255.255.0:pq2fads::off
add console=/dev/ttyS0,115200n8 and see if it works?
^ permalink raw reply
* Help need: Porting Linux to PQ2FADS_ZU board
From: zengshuai @ 2006-01-06 8:49 UTC (permalink / raw)
To: ppc
I use ELDK3.1.1(2005-06-07).
There is a u-boot 1.1.3 and a linux 2.4.25 in the eldk.
I has compile u-boot successfully.And it works good.
I has compile kernel successfully too.(make ads8260_config)
But it doesn't work.
Detail:
-------------------------------------------------------------------------
U-Boot 1.1.3 (Dec 27 2005 - 19:35:12)
MPC8260 Reset Status: Check Stop, External Soft, External Hard
MPC8260 Clock Configuration
- Bus-to-Core Mult 4.5x, VCO Div 2, 60x Bus Freq 22-65 , Core Freq 100-300
- dfbrg 1, corecnf 0x07, busdf 5, cpmdf 1, plldf 0, pllmf 5
- vco_out 600000000, scc_clk 150000000, brg_clk 37500000
- cpu_clk 450000000, cpm_clk 300000000, bus_clk 100000000
- pci_clk 50000000
CPU: MPC8260 (HiP7 Rev 13, Mask 0.1 1K49M) at 450 MHz
Board: Motorola PQ2FADS-ZU
DRAM: 32 MB
FLASH: 8 MB
In: serial
Out: serial
Err: serial
Net: FCC2 ETHERNET
Hit any key to stop autoboot: 0
=> printenv
bootdelay=5
baudrate=115200
ethact=FCC2 ETHERNET
ethaddr=0A:00:00:00:00:0A
gatewayip=172.17.248.1
netmask=255.255.255.0
ipaddr=172.17.248.244
serverip=172.17.248.253
bootcmd=tftp 100000 vmlinux.UBoot; bootm 100000
bootargs=root=/dev/nfs rw nfsroot=172.17.248.253:/opt/eldk3/ppc_6xx ip=172.17.24
8.244:172.17.248.253:172.17.248.253:255.255.255.0:pq2fads::off
stdin=serial
stdout=serial
stderr=serial
Environment size: 398/262140 bytes
=> boot
Using FCC2 ETHERNET device
TFTP from server 172.17.248.253; our IP address is 172.17.248.244
Filename 'vmlinux.UBoot'.
Load address: 0x100000
Loading: #################################################################
#########################################################
done
Bytes transferred = 623547 (983bb hex)
## Booting image at 00100000 ...
Image Name: Linux-2.4.25
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 623483 Bytes = 608.9 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
-----------------------------------------------------------------------------------
At here,it stoped.
Later,I debug the kernel using bdi2000.
I bi start_kernel(),and setp by setp.
But printk(".........) didn't work.
My board is PQ2FADS_ZU.Does the ELDK not support it?
------------------------------
我现在使用Sogou.com的2G邮箱了,你也来试试吧!
http://mail.sogou.com/recommend/sogoumail_invite_reg1.jsp?from=sogouinvitation&s_EMAIL=zengshuai%40sogou.com&username=linuxppc-embedded&FullName=linuxppc-embedded&Email=linuxppc-embedded%40ozlabs.org&verify=755eff4e640bdcfc57d93cbd8b0a9cb7
^ permalink raw reply
* How to compile freescale example programs using eldk?
From: zengshuai @ 2006-01-06 8:23 UTC (permalink / raw)
To: ppc
I down some freescale example programs at
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8260&nodeId=02VS0lDFTQJk192977
Device Drivers
ID and Description Vendor ID Format Size K Rev # Availability
MPC8260API
PowerQUICC II API (Drivers and Examples)
Includes support for PCI, AAL2, AAL5, MSP, and more(10/03/2002) FREESCALE zip 15785 4.0.2
Them aren't linux drvier but for bareboard. How can I compile them using eldk?
------------------------------
我现在使用Sogou.com的2G邮箱了,你也来试试吧!
http://mail.sogou.com/recommend/sogoumail_invite_reg1.jsp?from=sogouinvitation&s_EMAIL=zengshuai%40sogou.com&username=linuxppc-embedded&FullName=linuxppc-embedded&Email=linuxppc-embedded%40ozlabs.org&verify=755eff4e640bdcfc57d93cbd8b0a9cb7
^ permalink raw reply
* Re: [PATCH] powerpc: Add PowerMac platform function interpreter
From: Benjamin Herrenschmidt @ 2006-01-05 22:19 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linuxppc64-dev, linuxppc-dev list
In-Reply-To: <jeirsy4xmm.fsf@sykes.suse.de>
On Thu, 2006-01-05 at 14:23 +0100, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > Anyway, here it is, comments welcome...
>
> To which tree is this relative? Neither 2.6.15 nor Linus' tree matches.
powerpc.git
Ben.
^ permalink raw reply
* io.h question
From: mcnernbm @ 2006-01-05 21:00 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/html, Size: 606 bytes --]
^ permalink raw reply
* [PATCH 6/82] remove linux/version.h include from arch/ppc
From: J Bucknell @ 2006-01-05 20:31 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 13 bytes --]
please remove
[-- Attachment #2: Type: text/html, Size: 326 bytes --]
^ permalink raw reply
* [PATCH] fix ML300 zImage in 2.6.15
From: Grant Likely @ 2006-01-05 17:48 UTC (permalink / raw)
To: trini, linuxppc-embedded
2.6.15 doesn't build a bootable zImage for the ML300 because
embed_config.o is no longer linked in. This patch adds it back in.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
index f3e9c53..5699659 100644
--- a/arch/ppc/boot/simple/Makefile
+++ b/arch/ppc/boot/simple/Makefile
@@ -188,6 +188,7 @@ OBJCOPY_ARGS := -O elf32-powerpc
boot-y := head.o relocate.o $(extra.o-y) $(misc-y)
boot-$(CONFIG_REDWOOD_5) += embed_config.o
boot-$(CONFIG_REDWOOD_6) += embed_config.o
+boot-$(CONFIG_XILINX_ML300) += embed_config.o
boot-$(CONFIG_8xx) += embed_config.o
boot-$(CONFIG_8260) += embed_config.o
boot-$(CONFIG_BSEIP) += iic.o
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761
^ permalink raw reply related
* Re: How to build the zImage.prep was Re: Bug#345424 acknowledged by developer (Bug#345424: fixed in linux-2.6 2.6.15-1)
From: Grant Likely @ 2006-01-05 16:04 UTC (permalink / raw)
To: Sebastian Heutling; +Cc: linuxppc-dev
In-Reply-To: <43BCFA15.5070304@gmx.de>
Sebastian Heutling wrote:
> Hi Sven,
>
> Before trying to build a kernel myself I tried the debian linux binary
> image. An image for powerpc is not there yet so I used rc7. I netbooted
> "/boot/vmlinuz-2.6.15-rc7-powerpc" and the result was that I got a lot
> of output saying that there is something wrong. I assume the output was
> from the firmware because the kernel usually doesn't report an endless
> list of errors saying something about "stack exception" every now and
> then and mostly printing zeros followed by a new line character.
Have you tried 2.6.14? I'm having a similar issue with PReP images
using QEMU. 2.6.14 works, but 2.6.15 is busted. It *might* be the same
issue.
http://ozlabs.org/pipermail/linuxppc-dev/2005-December/020782.html
I was able to use git-bisect to narrow it down to 20 or so changes, but
I didn't get any farther.
Cheers,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761
^ permalink raw reply
* Re: [PATCH] boot/common/util.S: Put flush_{instruction, data}_cache back in .relocate_code section
From: Tom Rini @ 2006-01-05 15:05 UTC (permalink / raw)
To: Paul Janzen; +Cc: paulus, linuxppc-embedded
In-Reply-To: <oqbqyrp6zj.fsf@merlin.sez.to>
On Wed, Jan 04, 2006 at 09:40:48PM -0800, Paul Janzen wrote:
> In 2.6.14, we had the following definition of _GLOBAL() in
> include/asm-ppc/processor.h:
>
> #define _GLOBAL(n)\
> .stabs __stringify(n:F-1),N_FUN,0,0,n;\
> .globl n;\
> n:
>
> In 2.6.15, as part of the great powerpc merge, we moved this definition to
> include/asm-powerpc/ppc_asm.h, where it appears (to 32-bit code) as:
>
> #define _GLOBAL(n) \
> .text; \
> .stabs __stringify(n:F-1),N_FUN,0,0,n;\
> .globl n; \
> n:
>
> Mostly, this is fine. However, we also have the following, in
> arch/ppc/boot/common/util.S:
>
> .section ".relocate_code","xa"
> [...]
> _GLOBAL(flush_instruction_cache)
> [...]
> _GLOBAL(flush_data_cache)
> [...]
>
> The addition of the .text section definition in the definition of
> _GLOBAL overrides the .relocate_code section definition. As a result,
> these two functions don't end up in .relocate_code, so they don't get
> relocated correctly, and the boot fails.
>
> There's another suspicious-looking usage at kernel/swsusp.S:37 that
> someone should look into. I did not exhaustively search the source
> tree, though.
>
> The following is the minimal patch that fixes the immediate problem.
> I could easily be convinced that the _GLOBAL definition should be
> modified to remove the ".text;" line either instead of, or in addition
> to, this fix.
>
> Signed-off-by: Paul Janzen <pcj@linux.sez.to>
Thanks for tracking this one down. Paul, can you please make sure this
gets to Linus and the stable team? Thanks.
Acked-by: Tom Rini <trini@kernel.crashing.org>
> --- arch/ppc/boot/common/util.S~ 2005-12-24 15:47:48.000000000 -0800
> +++ arch/ppc/boot/common/util.S 2006-01-04 14:07:12.000000000 -0800
> @@ -234,7 +234,8 @@ udelay:
> * First, flush the data cache in case it was enabled and may be
> * holding instructions for copy back.
> */
> -_GLOBAL(flush_instruction_cache)
> + .globl flush_instruction_cache
> +flush_instruction_cache:
> mflr r6
> bl flush_data_cache
>
> @@ -279,7 +280,8 @@ _GLOBAL(flush_instruction_cache)
> * Flush data cache
> * Do this by just reading lots of stuff into the cache.
> */
> -_GLOBAL(flush_data_cache)
> + .globl flush_data_cache
> +flush_data_cache:
> lis r3,cache_flush_buffer@h
> ori r3,r3,cache_flush_buffer@l
> li r4,NUM_CACHE_LINES
>
> -- Paul
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* [CFT 19/29] Add macio_bus_type probe and remove methods
From: Russell King @ 2006-01-05 14:39 UTC (permalink / raw)
To: LKML; +Cc: Greg K-H, MAC
In-Reply-To: <20060105142951.13.01@flint.arm.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/macintosh/macio_asic.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej -x .git linus/drivers/macintosh/macio_asic.c linux/drivers/macintosh/macio_asic.c
--- linus/drivers/macintosh/macio_asic.c Sun Nov 6 22:16:28 2005
+++ linux/drivers/macintosh/macio_asic.c Sun Nov 13 16:28:39 2005
@@ -204,6 +204,9 @@ struct bus_type macio_bus_type = {
.name = "macio",
.match = macio_bus_match,
.hotplug = macio_hotplug,
+ .probe = macio_device_probe,
+ .remove = macio_device_remove,
+ .shutdown = macio_device_shutdown,
.suspend = macio_device_suspend,
.resume = macio_device_resume,
.dev_attrs = macio_dev_attrs,
@@ -487,9 +490,6 @@ int macio_register_driver(struct macio_d
/* initialize common driver fields */
drv->driver.name = drv->name;
drv->driver.bus = &macio_bus_type;
- drv->driver.probe = macio_device_probe;
- drv->driver.remove = macio_device_remove;
- drv->driver.shutdown = macio_device_shutdown;
/* register with core */
count = driver_register(&drv->driver);
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox