From: "Jonathan Masel" <jmasel@arabellasw.com>
To: "'PPC_LINUX'" <linuxppc-embedded@ozlabs.org>
Subject: Arabella Resource Manager
Date: Wed, 18 May 2005 17:26:26 +0200 [thread overview]
Message-ID: <E1DYPVW-0000vS-00@gold.webfusion.co.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]
Hi all,
Several people have expressed an interest in seeing some more of our
Resource Manager - a kernel library for allocating/releasing on-chip
resources of all PQ processors. We currently have PQ1, PQ2 and PQ3 for 2.4
and 2.6 kernels.
Attached are some of our Resource Manager files. It's not complete - just
some "documentation" and examples. If you'd like to see more, please just
let me know.
resmgr.c - is the generic part of the Resource Manager pq2rm.c - is the part
of RM that is specific to all PQ2 family members pqfcc_enet.c - is an
FCC/Eth driver using the Resource Manager mpc8260ads.c - a board-specific
file for the 8260ADS
To get the gist of it (and without getting too long-winded here) - take
parallel pin assignment in the FCC/Eth driver as an example.
In pqfcc_enet.c we find the board-specific configuration choices by using
pqboard_get_port_config (which is in the board-specific file). Specific pins
are then set/cleared by calling pq_pin_set (or clear, program, ...). This is
located in pq2rm.c.
pq_pin-set uses the generic RM code to allocate a resource of this type (a
parallel I/O bit), check that it is not already in use, attach it to its
consumer and so on.
We don't have ANY board-level dependencies anywhere in our drivers outside
mpc8260ads.c. More than that - the FCC driver is completely independent of
the chip itself (across any of the PQ2's or even PQ3's) since this level of
dependency is handled inside the Resource Manager. If it's the same FCC in
the chip, the driver is supposed completely unchanged.
You can see in the source files that the RM handles allocation of clocks,
GPIO, internal DPRAM and communication channels in the same way.
We are in the process of updating this for platforms too.
Best regards,
Jonathan
[-- Attachment #2: resmgr.tar.bz2 --]
[-- Type: application/octet-stream, Size: 41026 bytes --]
next reply other threads:[~2005-05-18 14:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-18 15:26 Jonathan Masel [this message]
2005-05-19 13:23 ` Arabella Resource Manager Pantelis Antoniou
2005-05-19 13:32 ` McMullan, Jason
2005-05-19 16:37 ` Jonathan Masel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1DYPVW-0000vS-00@gold.webfusion.co.uk \
--to=jmasel@arabellasw.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox