From: Eric Witcher <witcher@mindspring.com>
To: linuxppc-dev@ozlabs.org
Subject: Question regarding mpic_assign_isu() in storcenter.c
Date: Fri, 13 Jun 2008 20:52:18 -0400 (GMT-04:00) [thread overview]
Message-ID: <19479935.1213404738653.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> (raw)
Can anyone explain why the comment preceding mpic_assign_isu() on line 145 says that the I2C registers are at 0x11020 yet the code on line 146 shows 0x11000?
The MPC8245 user manual shows the external interrupt 0 registers at 0x10200 (paddr=40000) and the I2C registers at 0x11020.
<from storcenter.c> <2.6.25.6>
/*
112 * Interrupt setup and service. Interrrupts on the turbostation come
113 * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
114 */
115static void __init storcenter_init_IRQ(void)
116{
117 struct mpic *mpic;
118 struct device_node *dnp;
119 const void *prop;
120 int size;
121 phys_addr_t paddr;
122
123 dnp = of_find_node_by_type(NULL, "open-pic");
124 if (dnp == NULL)
125 return;
126
127 prop = of_get_property(dnp, "reg", &size);
128 if (prop == NULL) {
129 of_node_put(dnp);
130 return;
131 }
132
133 paddr = (phys_addr_t)of_translate_address(dnp, prop);
134 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
135 16, 32, " OpenPIC ");
136
137 of_node_put(dnp);
138
139 BUG_ON(mpic == NULL);
140
141 /*
142 * 16 Serial Interrupts followed by 16 Internal Interrupts.
143 * I2C is the second internal, so it is at 17, 0x11020.
144 */
145 mpic_assign_isu(mpic, 0, paddr + 0x10200);
146 mpic_assign_isu(mpic, 1, paddr + 0x11000);
147
148 mpic_init(mpic);
149}
next reply other threads:[~2008-06-14 0:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 0:52 Eric Witcher [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-06-18 0:09 Question regarding mpic_assign_isu() in storcenter.c Eric Witcher
2008-06-18 16:10 ` Jon Loeliger
2008-06-18 16:48 ` Kumar Gala
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=19479935.1213404738653.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net \
--to=witcher@mindspring.com \
--cc=linuxppc-dev@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;
as well as URLs for NNTP newsgroup(s).