Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
for (pid = 0, i = 0; i < 4; i++)
pid |= (readl(tmp + 0xfe0 + 4 * i) & 255) << (i * 8);
for (cid = 0, i = 0; i < 4; i++)
cid |= (readl(tmp + 0xff0 + 4 * i) & 255) << (i * 8);
if (cid == 0xb105f00d)
dev->periphid = pid;
ret = device_register(&dev->dev);
ret = -ENODEV;
in amba.c, in /arc/arm/common. I pasted the whole
amba_device_register() fnc. below.
I need to register my i2c_device as an amba_device, so I have question
about .periphid member od amba_device struct. What number does it
represent? Is it connected to above lines found in amba.c and how?
Looks like it is, but I can decypher these...
Here stands .periphid = 0x0041010. Why? Is this number something
specific to AMBA or to UART? I can find this nuber figure in several
more files, like arch/arm/mach-integrator/core.c, but also for uart
Also, can anybody describe me .bus_id part of .dev structure (why is it
initialized to "dev:00" and what are possible initializers)? In
arch/arm/mach-integrator/core.c there stands "mb:15", "mb:16"... for
devices. In mine core.c they start from "dev:00". Still I can not
understand what this value means...
* amba_device_register - register an AMBA device
* @dev: AMBA device to register
* @parent: parent memory resource
* Setup the AMBA device, reading the cell ID if present.
* Claim the resource, and register the AMBA device with
* the Linux device manager.
int amba_device_register(struct amba_device *dev, struct resource
u32 pid, cid;
void __iomem *tmp;
int i, ret;