Skip to content

Commit c85c41a

Browse files
Jon Loeligerpaulusmack
authored andcommitted
[POWERPC] Use mpc8641hpcn PIC base address from dev tree.
After going through the trouble of setting up the PIC base address in the pic@40000 device tree node, use it instead of the obsolete hard-coded value. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent 5dc599c commit c85c41a

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

‎arch/powerpc/platforms/86xx/mpc86xx_hpcn.c‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,37 +68,36 @@ mpc86xx_hpcn_init_irq(void)
6868
{
6969
struct mpic *mpic1;
7070
struct device_node *np;
71-
phys_addr_t openpic_paddr;
71+
struct resource res;
7272
#ifdef CONFIG_PCI
7373
struct device_node *cascade_node = NULL;
7474
int cascade_irq;
7575
#endif
7676

77+
/* Determine PIC address. */
7778
np = of_find_node_by_type(NULL, "open-pic");
7879
if (np == NULL)
7980
return;
80-
81-
/* Determine the Physical Address of the OpenPIC regs */
82-
openpic_paddr = get_immrbase() + MPC86xx_OPENPIC_OFFSET;
81+
of_address_to_resource(np, 0, &res);
8382

8483
/* Alloc mpic structure and per isu has 16 INT entries. */
85-
mpic1 = mpic_alloc(np, openpic_paddr,
84+
mpic1 = mpic_alloc(np, res.start,
8685
MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
8786
16, NR_IRQS - 4,
8887
" MPIC ");
8988
BUG_ON(mpic1 == NULL);
9089

91-
mpic_assign_isu(mpic1, 0, openpic_paddr + 0x10000);
90+
mpic_assign_isu(mpic1, 0, res.start + 0x10000);
9291

9392
/* 48 Internal Interrupts */
94-
mpic_assign_isu(mpic1, 1, openpic_paddr + 0x10200);
95-
mpic_assign_isu(mpic1, 2, openpic_paddr + 0x10400);
96-
mpic_assign_isu(mpic1, 3, openpic_paddr + 0x10600);
93+
mpic_assign_isu(mpic1, 1, res.start + 0x10200);
94+
mpic_assign_isu(mpic1, 2, res.start + 0x10400);
95+
mpic_assign_isu(mpic1, 3, res.start + 0x10600);
9796

9897
/* 16 External interrupts
9998
* Moving them from [0 - 15] to [64 - 79]
10099
*/
101-
mpic_assign_isu(mpic1, 4, openpic_paddr + 0x10000);
100+
mpic_assign_isu(mpic1, 4, res.start + 0x10000);
102101

103102
mpic_init(mpic1);
104103

‎include/asm-powerpc/mpc86xx.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#define MCM_PORT_CONFIG_OFFSET 0x1010
3232

3333
/* Offset from CCSRBAR */
34-
#define MPC86xx_OPENPIC_OFFSET (0x40000)
3534
#define MPC86xx_MCM_OFFSET (0x00000)
3635
#define MPC86xx_MCM_SIZE (0x02000)
3736

0 commit comments

Comments
 (0)