Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24622
b: refs/heads/master
c: f8dd311
h: refs/heads/master
v: v3
  • Loading branch information
Sylvain Munaut authored and Paul Mackerras committed Mar 27, 2006
1 parent 97f694c commit a48294e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5931c4350059ce9bd5fe398b628c478753a11e44
refs/heads/master: f8dd311982c86141f4f2fd326c0edf0c2d9fd97b
7 changes: 7 additions & 0 deletions trunk/arch/ppc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,13 @@ config LITE5200
much but it's only been tested on this board version. I think this
board is also known as IceCube.

config LITE5200B
bool "Freescale LITE5200B"
depends LITE5200
help
Support for the LITE5200B dev board for the MPC5200 from Freescale.
This is the new board with 2 PCI slots.

config MPC834x_SYS
bool "Freescale MPC834x SYS"
help
Expand Down
33 changes: 30 additions & 3 deletions trunk/arch/ppc/platforms/lite5200.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/mpc52xx.h>
#include <asm/ppc_sys.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>

#include <syslib/mpc52xx_pci.h>

Expand Down Expand Up @@ -68,12 +69,32 @@ lite5200_show_cpuinfo(struct seq_file *m)
}

#ifdef CONFIG_PCI
#ifdef CONFIG_LITE5200B
static int
lite5200_map_irq(struct pci_dev *dev, unsigned char idsel,
unsigned char pin)
{
static char pci_irq_table[][4] =
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{MPC52xx_IRQ0, MPC52xx_IRQ1, MPC52xx_IRQ2, MPC52xx_IRQ3},
{MPC52xx_IRQ1, MPC52xx_IRQ2, MPC52xx_IRQ3, MPC52xx_IRQ0},
};

const long min_idsel = 24, max_idsel = 25, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
}
#else /* Original Lite */
static int
lite5200_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
return (pin == 1) && (idsel==24) ? MPC52xx_IRQ0 : -1;
}
#endif
#endif

static void __init
lite5200_setup_cpu(void)
Expand Down Expand Up @@ -127,11 +148,17 @@ lite5200_setup_cpu(void)
out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_SNOOP);
out_be32(&xlb->snoop_window, MPC52xx_PCI_TARGET_MEM | 0x1d);

/* IRQ[0-3] setup : IRQ0 - Level Active Low */
/* IRQ[1-3] - Level Active High */
/* IRQ[0-3] setup */
intr_ctrl = in_be32(&intr->ctrl);
intr_ctrl &= ~0x00ff0000;
intr_ctrl |= 0x00c00000;
#ifdef CONFIG_LITE5200B
/* IRQ[0-3] Level Active Low */
intr_ctrl |= 0x00ff0000;
#else
/* IRQ0 Level Active Low
* IRQ[1-3] Level Active High */
intr_ctrl |= 0x00c00000;
#endif
out_be32(&intr->ctrl, intr_ctrl);

/* Unmap reg zone */
Expand Down

0 comments on commit a48294e

Please sign in to comment.