* [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
@ 2007-08-17 5:03 Kumar Gala
2007-08-17 8:07 ` Paul Mackerras
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Kumar Gala @ 2007-08-17 5:03 UTC (permalink / raw)
To: linuxppc-dev
The interrupt routing in the device trees for the ULI M1575 was
inproperly using the interrupt line field as pci function. Fixed
up the device tree's to actual conform for to specification and
changed the interrupt mapping code so it just uses a static mapping
setup as follows:
PIRQA - IRQ9
PIRQB - IRQ10
PIRQC - IRQ11
PIRQD - IRQ12
USB 1.1 OCHI (1c.0) - IRQ12
USB 1.1 OCHI (1c.1) - IRQ9
USB 1.1 OCHI (1c.2) - IRQ10
USB 1.1 ECHI (1c.3) - IRQ11
LAN (1b.0) - IRQ6
AC97 (1d.0) - IRQ6
Modem (1d.1) - IRQ6
HD Audio (1d.2) - IRQ6
SATA (1f.1) - IRQ5
SMB (1e.1) - IRQ7
PMU (1e.2) - IRQ7
PATA (1f.0) - IRQ14/15
Took the oppurtunity to refactor the code into a single file so we
don't have to duplicate these fixes on the two current boards in the
tree and several forth coming boards that will also need the code.
Fixed RTC support that requires a dummy memory read on the P2P bridge
to unlock the RTC and setup the default of the RTC alarm registers to
match with a basic x86 style CMOS RTC.
Moved code that poked ISA registers to a FIXUP_FINAL quirk to ensure
the PCI IO space has been setup properly before we start poking ISA
registers at random locations.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
arch/powerpc/platforms/85xx/Kconfig | 1 +
arch/powerpc/platforms/85xx/mpc8544_ds.c | 214 ++----------------------
arch/powerpc/platforms/86xx/Kconfig | 1 +
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224 ++-----------------------
arch/powerpc/platforms/Kconfig | 8 +
arch/powerpc/platforms/Makefile | 3 +
arch/powerpc/platforms/fsl_uli1575.c | 255 ++++++++++++++++++++++++++++
9 files changed, 363 insertions(+), 545 deletions(-)
create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 4680e20..3e79bf0 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -44,8 +44,18 @@
#size-cells = <1>;
#interrupt-cells = <2>;
device_type = "soc";
- ranges = <0 e0000000 00100000>;
- reg = <e0000000 00100000>; // CCSRBAR 1M
+
+
+ ranges = <00001000 e0001000 000ff000
+ 80000000 80000000 20000000
+ a0000000 a0000000 10000000
+ b0000000 b0000000 00100000
+ c0000000 c0000000 20000000
+ b0100000 b0100000 00100000
+ e1000000 e1000000 00010000
+ e1010000 e1010000 00010000
+ e1020000 e1020000 00010000>;
+ reg = <e0000000 00001000>; // CCSRBAR 1M
bus-frequency = <0>; // Filled out by uboot.
memory-controller@2000 {
@@ -161,8 +171,8 @@
interrupt-parent = <&mpic>;
interrupts = <18 2>;
bus-range = <0 ff>;
- ranges = <02000000 0 80000000 80000000 0 10000000
- 01000000 0 00000000 e2000000 0 00800000>;
+ ranges = <02000000 0 c0000000 c0000000 0 20000000
+ 01000000 0 00000000 e1000000 0 00010000>;
clock-frequency = <3f940aa>;
#interrupt-cells = <1>;
#size-cells = <2>;
@@ -178,8 +188,8 @@
#address-cells = <3>;
reg = <9000 1000>;
bus-range = <0 ff>;
- ranges = <02000000 0 90000000 90000000 0 10000000
- 01000000 0 00000000 e3000000 0 00800000>;
+ ranges = <02000000 0 80000000 80000000 0 20000000
+ 01000000 0 00000000 e1010000 0 00010000>;
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <1a 2>;
@@ -202,7 +212,7 @@
reg = <a000 1000>;
bus-range = <0 ff>;
ranges = <02000000 0 a0000000 a0000000 0 10000000
- 01000000 0 00000000 e2800000 0 00800000>;
+ 01000000 0 00000000 e1020000 0 00010000>;
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <19 2>;
@@ -224,49 +234,29 @@
#address-cells = <3>;
reg = <b000 1000>;
bus-range = <0 ff>;
- ranges = <02000000 0 b0000000 b0000000 0 10000000
- 01000000 0 00000000 e3800000 0 00800000>;
+ ranges = <02000000 0 b0000000 b0000000 0 00100000
+ 01000000 0 00000000 b0100000 0 00100000>;
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <1b 2>;
- interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map-mask = <fb00 0 0 0>;
interrupt-map = <
-
- // IDSEL 0x1a
- d000 0 0 1 &i8259 6 2
- d000 0 0 2 &i8259 3 2
- d000 0 0 3 &i8259 4 2
- d000 0 0 4 &i8259 5 2
-
- // IDSEL 0x1b
- d800 0 0 1 &i8259 5 2
- d800 0 0 2 &i8259 0 0
- d800 0 0 3 &i8259 0 0
- d800 0 0 4 &i8259 0 0
-
// IDSEL 0x1c USB
- e000 0 0 1 &i8259 9 2
- e000 0 0 2 &i8259 a 2
- e000 0 0 3 &i8259 c 2
- e000 0 0 4 &i8259 7 2
+ e000 0 0 0 &i8259 c 2
+ e100 0 0 0 &i8259 9 2
+ e200 0 0 0 &i8259 a 2
+ e300 0 0 0 &i8259 b 2
// IDSEL 0x1d Audio
- e800 0 0 1 &i8259 9 2
- e800 0 0 2 &i8259 a 2
- e800 0 0 3 &i8259 b 2
- e800 0 0 4 &i8259 0 0
+ e800 0 0 0 &i8259 6 2
// IDSEL 0x1e Legacy
- f000 0 0 1 &i8259 c 2
- f000 0 0 2 &i8259 0 0
- f000 0 0 3 &i8259 0 0
- f000 0 0 4 &i8259 0 0
+ f000 0 0 0 &i8259 7 2
+ f100 0 0 0 &i8259 7 2
// IDSEL 0x1f IDE/SATA
- f800 0 0 1 &i8259 6 2
- f800 0 0 2 &i8259 0 0
- f800 0 0 3 &i8259 0 0
- f800 0 0 4 &i8259 0 0
+ f800 0 0 0 &i8259 e 2
+ f900 0 0 0 &i8259 5 2
>;
uli1575@0 {
reg = <0 0 0 0 0>;
@@ -274,10 +264,10 @@
#address-cells = <3>;
ranges = <02000000 0 b0000000
02000000 0 b0000000
- 0 10000000
+ 0 00100000
01000000 0 00000000
01000000 0 00000000
- 0 00080000>;
+ 0 00100000>;
pci_bridge@0 {
reg = <0 0 0 0 0>;
@@ -285,10 +275,10 @@
#address-cells = <3>;
ranges = <02000000 0 b0000000
02000000 0 b0000000
- 0 20000000
+ 0 00100000
01000000 0 00000000
01000000 0 00000000
- 0 00100000>;
+ 0 00100000>;
isa@1e {
device_type = "isa";
@@ -296,7 +286,8 @@
#size-cells = <1>;
#address-cells = <2>;
reg = <f000 0 0 0 0>;
- ranges = <1 0 01000000 0 0
+ ranges = <1 0
+ 01000000 0 0
00001000>;
interrupt-parent = <&i8259>;
@@ -312,8 +303,7 @@
built-in;
compatible = "chrp,iic";
interrupts = <9 2>;
- interrupt-parent =
- <&mpic>;
+ interrupt-parent = <&mpic>;
};
i8042@60 {
@@ -321,8 +311,7 @@
#address-cells = <1>;
reg = <1 60 1 1 64 1>;
interrupts = <1 3 c 3>;
- interrupt-parent =
- <&i8259>;
+ interrupt-parent = <&i8259>;
keyboard@0 {
reg = <0>;
@@ -336,8 +325,7 @@
};
rtc@70 {
- compatible =
- "pnpPNP,b00";
+ compatible = "pnpPNP,b00";
reg = <1 70 2>;
};
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 5d82709..b0166e5 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -224,98 +224,36 @@
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <18 2>;
- interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map-mask = <fb00 0 0 0>;
interrupt-map = <
/* IDSEL 0x11 */
- 8800 0 0 1 &i8259 3 2
- 8800 0 0 2 &i8259 4 2
- 8800 0 0 3 &i8259 5 2
- 8800 0 0 4 &i8259 6 2
+ 8800 0 0 1 &i8259 9 2
+ 8800 0 0 2 &i8259 a 2
+ 8800 0 0 3 &i8259 b 2
+ 8800 0 0 4 &i8259 c 2
/* IDSEL 0x12 */
- 9000 0 0 1 &i8259 4 2
- 9000 0 0 2 &i8259 5 2
- 9000 0 0 3 &i8259 6 2
- 9000 0 0 4 &i8259 3 2
-
- /* IDSEL 0x13 */
- 9800 0 0 1 &i8259 0 0
- 9800 0 0 2 &i8259 0 0
- 9800 0 0 3 &i8259 0 0
- 9800 0 0 4 &i8259 0 0
-
- /* IDSEL 0x14 */
- a000 0 0 1 &i8259 0 0
- a000 0 0 2 &i8259 0 0
- a000 0 0 3 &i8259 0 0
- a000 0 0 4 &i8259 0 0
-
- /* IDSEL 0x15 */
- a800 0 0 1 &i8259 0 0
- a800 0 0 2 &i8259 0 0
- a800 0 0 3 &i8259 0 0
- a800 0 0 4 &i8259 0 0
-
- /* IDSEL 0x16 */
- b000 0 0 1 &i8259 0 0
- b000 0 0 2 &i8259 0 0
- b000 0 0 3 &i8259 0 0
- b000 0 0 4 &i8259 0 0
-
- /* IDSEL 0x17 */
- b800 0 0 1 &i8259 0 0
- b800 0 0 2 &i8259 0 0
- b800 0 0 3 &i8259 0 0
- b800 0 0 4 &i8259 0 0
-
- /* IDSEL 0x18 */
- c000 0 0 1 &i8259 0 0
- c000 0 0 2 &i8259 0 0
- c000 0 0 3 &i8259 0 0
- c000 0 0 4 &i8259 0 0
-
- /* IDSEL 0x19 */
- c800 0 0 1 &i8259 0 0
- c800 0 0 2 &i8259 0 0
- c800 0 0 3 &i8259 0 0
- c800 0 0 4 &i8259 0 0
-
- /* IDSEL 0x1a */
- d000 0 0 1 &i8259 6 2
- d000 0 0 2 &i8259 3 2
- d000 0 0 3 &i8259 4 2
- d000 0 0 4 &i8259 5 2
-
-
- /* IDSEL 0x1b */
- d800 0 0 1 &i8259 5 2
- d800 0 0 2 &i8259 0 0
- d800 0 0 3 &i8259 0 0
- d800 0 0 4 &i8259 0 0
-
- /* IDSEL 0x1c */
- e000 0 0 1 &i8259 9 2
- e000 0 0 2 &i8259 a 2
- e000 0 0 3 &i8259 c 2
- e000 0 0 4 &i8259 7 2
-
- /* IDSEL 0x1d */
- e800 0 0 1 &i8259 9 2
- e800 0 0 2 &i8259 a 2
- e800 0 0 3 &i8259 b 2
- e800 0 0 4 &i8259 0 0
-
- /* IDSEL 0x1e */
- f000 0 0 1 &i8259 c 2
- f000 0 0 2 &i8259 0 0
- f000 0 0 3 &i8259 0 0
- f000 0 0 4 &i8259 0 0
-
- /* IDSEL 0x1f */
- f800 0 0 1 &i8259 6 2
- f800 0 0 2 &i8259 0 0
- f800 0 0 3 &i8259 0 0
- f800 0 0 4 &i8259 0 0
+ 9000 0 0 1 &i8259 a 2
+ 9000 0 0 2 &i8259 b 2
+ 9000 0 0 3 &i8259 c 2
+ 9000 0 0 4 &i8259 9 2
+
+ // IDSEL 0x1c USB
+ e000 0 0 0 &i8259 c 2
+ e100 0 0 0 &i8259 9 2
+ e200 0 0 0 &i8259 a 2
+ e300 0 0 0 &i8259 b 2
+
+ // IDSEL 0x1d Audio
+ e800 0 0 0 &i8259 6 2
+
+ // IDSEL 0x1e Legacy
+ f000 0 0 0 &i8259 7 2
+ f100 0 0 0 &i8259 7 2
+
+ // IDSEL 0x1f IDE/SATA
+ f800 0 0 0 &i8259 e 2
+ f900 0 0 0 &i8259 5 2
>;
uli1575@0 {
reg = <0 0 0 0 0>;
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index f581840..f620171 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -33,6 +33,7 @@ config MPC8544_DS
bool "Freescale MPC8544 DS"
select PPC_I8259
select DEFAULT_UIMAGE
+ select FSL_ULI1575
help
This option enables support for the MPC8544 DS board
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index 4905f6f..0f834d8 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -114,211 +114,25 @@ void __init mpc8544_ds_pic_init(void)
}
#ifdef CONFIG_PCI
-enum pirq { PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH };
+extern int uses_fsl_uli_m1575;
+extern int uli_exclude_device(struct pci_controller *hose,
+ u_char bus, u_char devfn);
-/*
- * Value in table -- IRQ number
- */
-const unsigned char uli1575_irq_route_table[16] = {
- 0, /* 0: Reserved */
- 0x8,
- 0, /* 2: Reserved */
- 0x2,
- 0x4,
- 0x5,
- 0x7,
- 0x6,
- 0, /* 8: Reserved */
- 0x1,
- 0x3,
- 0x9,
- 0xb,
- 0, /* 13: Reserved */
- 0xd,
- 0xf,
-};
-
-static int __devinit
-get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
-{
- struct of_irq oirq;
- u32 laddr[3];
- struct device_node *hosenode = hose ? hose->arch_data : NULL;
-
- if (!hosenode)
- return -EINVAL;
-
- laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
- laddr[1] = laddr[2] = 0;
- of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
- DBG("mpc8544_ds: pci irq addr %x, slot %d, pin %d, irq %d\n",
- laddr[0], slot, pin, oirq.specifier[0]);
- return oirq.specifier[0];
-}
-
-/*8259*/
-static void __devinit quirk_uli1575(struct pci_dev *dev)
-{
- unsigned short temp;
- struct pci_controller *hose = pci_bus_to_host(dev->bus);
- unsigned char irq2pin[16];
- unsigned long pirq_map_word = 0;
- u32 irq;
- int i;
-
- /*
- * ULI1575 interrupts route setup
- */
- memset(irq2pin, 0, 16); /* Initialize default value 0 */
-
- irq2pin[6]=PIRQA+3; /* enabled mapping for IRQ6 to PIRQD, used by SATA */
-
- /*
- * PIRQE -> PIRQF mapping set manually
- *
- * IRQ pin IRQ#
- * PIRQE ---- 9
- * PIRQF ---- 10
- * PIRQG ---- 11
- * PIRQH ---- 12
- */
- for (i = 0; i < 4; i++)
- irq2pin[i + 9] = PIRQE + i;
-
- /* Set IRQ-PIRQ Mapping to ULI1575 */
- for (i = 0; i < 16; i++)
- if (irq2pin[i])
- pirq_map_word |= (uli1575_irq_route_table[i] & 0xf)
- << ((irq2pin[i] - PIRQA) * 4);
-
- pirq_map_word |= 1<<26; /* disable INTx in EP mode*/
-
- /* ULI1575 IRQ mapping conf register default value is 0xb9317542 */
- DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n",
- (int)pirq_map_word);
- pci_write_config_dword(dev, 0x48, pirq_map_word);
-
-#define ULI1575_SET_DEV_IRQ(slot, pin, reg) \
- do { \
- int irq; \
- irq = get_pci_irq_from_of(hose, slot, pin); \
- if (irq > 0 && irq < 16) \
- pci_write_config_byte(dev, reg, irq2pin[irq]); \
- else \
- printk(KERN_WARNING "ULI1575 device" \
- "(slot %d, pin %d) irq %d is invalid.\n", \
- slot, pin, irq); \
- } while(0)
-
- /* USB 1.1 OHCI controller 1, slot 28, pin 1 */
- ULI1575_SET_DEV_IRQ(28, 1, 0x86);
-
- /* USB 1.1 OHCI controller 2, slot 28, pin 2 */
- ULI1575_SET_DEV_IRQ(28, 2, 0x87);
-
- /* USB 1.1 OHCI controller 3, slot 28, pin 3 */
- ULI1575_SET_DEV_IRQ(28, 3, 0x88);
-
- /* USB 2.0 controller, slot 28, pin 4 */
- irq = get_pci_irq_from_of(hose, 28, 4);
- if (irq >= 0 && irq <= 15)
- pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]);
-
- /* Audio controller, slot 29, pin 1 */
- ULI1575_SET_DEV_IRQ(29, 1, 0x8a);
-
- /* Modem controller, slot 29, pin 2 */
- ULI1575_SET_DEV_IRQ(29, 2, 0x8b);
-
- /* HD audio controller, slot 29, pin 3 */
- ULI1575_SET_DEV_IRQ(29, 3, 0x8c);
-
- /* SMB interrupt: slot 30, pin 1 */
- ULI1575_SET_DEV_IRQ(30, 1, 0x8e);
-
- /* PMU ACPI SCI interrupt: slot 30, pin 2 */
- ULI1575_SET_DEV_IRQ(30, 2, 0x8f);
-
- /* Serial ATA interrupt: slot 31, pin 1 */
- ULI1575_SET_DEV_IRQ(31, 1, 0x8d);
-
- /* Primary PATA IDE IRQ: 14
- * Secondary PATA IDE IRQ: 15
- */
- pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]);
- pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]);
-
- /* Set IRQ14 and IRQ15 to legacy IRQs */
- pci_read_config_word(dev, 0x46, &temp);
- temp |= 0xc000;
- pci_write_config_word(dev, 0x46, temp);
-
- /* Set i8259 interrupt trigger
- * IRQ 3: Level
- * IRQ 4: Level
- * IRQ 5: Level
- * IRQ 6: Level
- * IRQ 7: Level
- * IRQ 9: Level
- * IRQ 10: Level
- * IRQ 11: Level
- * IRQ 12: Level
- * IRQ 14: Edge
- * IRQ 15: Edge
- */
- outb(0xfa, 0x4d0);
- outb(0x1e, 0x4d1);
-
-#undef ULI1575_SET_DEV_IRQ
-}
-
-/* SATA */
-static void __devinit quirk_uli5288(struct pci_dev *dev)
+static int mpc85xx_exclude_device(struct pci_controller *hose,
+ u_char bus, u_char devfn)
{
- unsigned char c;
-
- pci_read_config_byte(dev, 0x83, &c);
- c |= 0x80; /* read/write lock */
- pci_write_config_byte(dev, 0x83, c);
-
- pci_write_config_byte(dev, 0x09, 0x01); /* Base class code: storage */
- pci_write_config_byte(dev, 0x0a, 0x06); /* IDE disk */
+ struct device_node* node;
+ struct resource rsrc;
- pci_read_config_byte(dev, 0x83, &c);
- c &= 0x7f;
- pci_write_config_byte(dev, 0x83, c);
-
- pci_read_config_byte(dev, 0x84, &c);
- c |= 0x01; /* emulated PATA mode enabled */
- pci_write_config_byte(dev, 0x84, c);
-}
+ node = (struct device_node *)hose->arch_data;
+ of_address_to_resource(node, 0, &rsrc);
-/* PATA */
-static void __devinit quirk_uli5229(struct pci_dev *dev)
-{
- unsigned short temp;
- pci_write_config_word(dev, 0x04, 0x0405); /* MEM IO MSI */
- pci_read_config_word(dev, 0x4a, &temp);
- temp |= 0x1000; /* Enable Native IRQ 14/15 */
- pci_write_config_word(dev, 0x4a, temp);
-}
+ if ((rsrc.start & 0xfffff) == 0xb000) {
+ return uli_exclude_device(hose, bus, devfn);
+ }
-/*Bridge*/
-static void __devinit early_uli5249(struct pci_dev *dev)
-{
- unsigned char temp;
- pci_write_config_word(dev, 0x04, 0x0007); /* mem access */
- pci_read_config_byte(dev, 0x7c, &temp);
- pci_write_config_byte(dev, 0x7c, 0x80); /* R/W lock control */
- pci_write_config_byte(dev, 0x09, 0x01); /* set as pci-pci bridge */
- pci_write_config_byte(dev, 0x7c, temp); /* restore pci bus debug control */
- dev->class |= 0x1;
+ return PCIBIOS_SUCCESSFUL;
}
-
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
#endif /* CONFIG_PCI */
/*
@@ -342,6 +156,8 @@ static void __init mpc8544_ds_setup_arch(void)
else
fsl_add_bridge(np, 0);
}
+ uses_fsl_uli_m1575 = 1;
+ ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif
printk("MPC8544 DS board from Freescale Semiconductor\n");
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 343b76d..685b2fb 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -7,6 +7,7 @@ config MPC8641_HPCN
bool "Freescale MPC8641 HPCN"
select PPC_I8259
select DEFAULT_UIMAGE
+ select FSL_ULI1575
help
This option enables support for the MPC8641 HPCN board.
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index e9eaa07..56b27ca 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -107,220 +107,25 @@ mpc86xx_hpcn_init_irq(void)
}
#ifdef CONFIG_PCI
+extern int uses_fsl_uli_m1575;
+extern int uli_exclude_device(struct pci_controller *hose,
+ u_char bus, u_char devfn);
-enum pirq{PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH};
-const unsigned char uli1575_irq_route_table[16] = {
- 0, /* 0: Reserved */
- 0x8, /* 1: 0b1000 */
- 0, /* 2: Reserved */
- 0x2, /* 3: 0b0010 */
- 0x4, /* 4: 0b0100 */
- 0x5, /* 5: 0b0101 */
- 0x7, /* 6: 0b0111 */
- 0x6, /* 7: 0b0110 */
- 0, /* 8: Reserved */
- 0x1, /* 9: 0b0001 */
- 0x3, /* 10: 0b0011 */
- 0x9, /* 11: 0b1001 */
- 0xb, /* 12: 0b1011 */
- 0, /* 13: Reserved */
- 0xd, /* 14, 0b1101 */
- 0xf, /* 15, 0b1111 */
-};
-
-static int __devinit
-get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
-{
- struct of_irq oirq;
- u32 laddr[3];
- struct device_node *hosenode = hose ? hose->arch_data : NULL;
-
- if (!hosenode) return -EINVAL;
-
- laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
- laddr[1] = laddr[2] = 0;
- of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
- DBG("mpc86xx_hpcn: pci irq addr %x, slot %d, pin %d, irq %d\n",
- laddr[0], slot, pin, oirq.specifier[0]);
- return oirq.specifier[0];
-}
-
-static void __devinit quirk_uli1575(struct pci_dev *dev)
-{
- unsigned short temp;
- struct pci_controller *hose = pci_bus_to_host(dev->bus);
- unsigned char irq2pin[16], c;
- unsigned long pirq_map_word = 0;
- u32 irq;
- int i;
-
- /*
- * ULI1575 interrupts route setup
- */
- memset(irq2pin, 0, 16); /* Initialize default value 0 */
-
- /*
- * PIRQA -> PIRQD mapping read from OF-tree
- *
- * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
- * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
- */
- for (i = 0; i < 4; i++){
- irq = get_pci_irq_from_of(hose, 17, i + 1);
- if (irq > 0 && irq < 16)
- irq2pin[irq] = PIRQA + i;
- else
- printk(KERN_WARNING "ULI1575 device"
- "(slot %d, pin %d) irq %d is invalid.\n",
- 17, i, irq);
- }
-
- /*
- * PIRQE -> PIRQF mapping set manually
- *
- * IRQ pin IRQ#
- * PIRQE ---- 9
- * PIRQF ---- 10
- * PIRQG ---- 11
- * PIRQH ---- 12
- */
- for (i = 0; i < 4; i++) irq2pin[i + 9] = PIRQE + i;
-
- /* Set IRQ-PIRQ Mapping to ULI1575 */
- for (i = 0; i < 16; i++)
- if (irq2pin[i])
- pirq_map_word |= (uli1575_irq_route_table[i] & 0xf)
- << ((irq2pin[i] - PIRQA) * 4);
-
- /* ULI1575 IRQ mapping conf register default value is 0xb9317542 */
- DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n",
- pirq_map_word);
- pci_write_config_dword(dev, 0x48, pirq_map_word);
-
-#define ULI1575_SET_DEV_IRQ(slot, pin, reg) \
- do { \
- int irq; \
- irq = get_pci_irq_from_of(hose, slot, pin); \
- if (irq > 0 && irq < 16) \
- pci_write_config_byte(dev, reg, irq2pin[irq]); \
- else \
- printk(KERN_WARNING "ULI1575 device" \
- "(slot %d, pin %d) irq %d is invalid.\n", \
- slot, pin, irq); \
- } while(0)
-
- /* USB 1.1 OHCI controller 1, slot 28, pin 1 */
- ULI1575_SET_DEV_IRQ(28, 1, 0x86);
-
- /* USB 1.1 OHCI controller 2, slot 28, pin 2 */
- ULI1575_SET_DEV_IRQ(28, 2, 0x87);
-
- /* USB 1.1 OHCI controller 3, slot 28, pin 3 */
- ULI1575_SET_DEV_IRQ(28, 3, 0x88);
-
- /* USB 2.0 controller, slot 28, pin 4 */
- irq = get_pci_irq_from_of(hose, 28, 4);
- if (irq >= 0 && irq <=15)
- pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]);
-
- /* Audio controller, slot 29, pin 1 */
- ULI1575_SET_DEV_IRQ(29, 1, 0x8a);
-
- /* Modem controller, slot 29, pin 2 */
- ULI1575_SET_DEV_IRQ(29, 2, 0x8b);
-
- /* HD audio controller, slot 29, pin 3 */
- ULI1575_SET_DEV_IRQ(29, 3, 0x8c);
-
- /* SMB interrupt: slot 30, pin 1 */
- ULI1575_SET_DEV_IRQ(30, 1, 0x8e);
-
- /* PMU ACPI SCI interrupt: slot 30, pin 2 */
- ULI1575_SET_DEV_IRQ(30, 2, 0x8f);
-
- /* Serial ATA interrupt: slot 31, pin 1 */
- ULI1575_SET_DEV_IRQ(31, 1, 0x8d);
-
- /* Primary PATA IDE IRQ: 14
- * Secondary PATA IDE IRQ: 15
- */
- pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]);
- pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]);
-
- /* Set IRQ14 and IRQ15 to legacy IRQs */
- pci_read_config_word(dev, 0x46, &temp);
- temp |= 0xc000;
- pci_write_config_word(dev, 0x46, temp);
-
- /* Set i8259 interrupt trigger
- * IRQ 3: Level
- * IRQ 4: Level
- * IRQ 5: Level
- * IRQ 6: Level
- * IRQ 7: Level
- * IRQ 9: Level
- * IRQ 10: Level
- * IRQ 11: Level
- * IRQ 12: Level
- * IRQ 14: Edge
- * IRQ 15: Edge
- */
- outb(0xfa, 0x4d0);
- outb(0x1e, 0x4d1);
-
-#undef ULI1575_SET_DEV_IRQ
-
- /* Disable the HD interface and enable the AC97 interface. */
- pci_read_config_byte(dev, 0xb8, &c);
- c &= 0x7f;
- pci_write_config_byte(dev, 0xb8, c);
-}
-
-static void __devinit quirk_uli5288(struct pci_dev *dev)
+static int mpc86xx_exclude_device(struct pci_controller *hose,
+ u_char bus, u_char devfn)
{
- unsigned char c;
+ struct device_node* node;
+ struct resource rsrc;
- pci_read_config_byte(dev,0x83,&c);
- c |= 0x80;
- pci_write_config_byte(dev, 0x83, c);
+ node = (struct device_node *)hose->arch_data;
+ of_address_to_resource(node, 0, &rsrc);
- pci_write_config_byte(dev, 0x09, 0x01);
- pci_write_config_byte(dev, 0x0a, 0x06);
-
- pci_read_config_byte(dev,0x83,&c);
- c &= 0x7f;
- pci_write_config_byte(dev, 0x83, c);
-
- pci_read_config_byte(dev,0x84,&c);
- c |= 0x01;
- pci_write_config_byte(dev, 0x84, c);
-}
-
-static void __devinit quirk_uli5229(struct pci_dev *dev)
-{
- unsigned short temp;
- pci_write_config_word(dev, 0x04, 0x0405);
- dev->class &= ~0x5;
- pci_read_config_word(dev, 0x4a, &temp);
- temp |= 0x1000;
- pci_write_config_word(dev, 0x4a, temp);
-}
+ if ((rsrc.start & 0xfffff) == 0x8000) {
+ return uli_exclude_device(hose, bus, devfn);
+ }
-static void __devinit early_uli5249(struct pci_dev *dev)
-{
- unsigned char temp;
- pci_write_config_word(dev, 0x04, 0x0007);
- pci_read_config_byte(dev, 0x7c, &temp);
- pci_write_config_byte(dev, 0x7c, 0x80);
- pci_write_config_byte(dev, 0x09, 0x01);
- pci_write_config_byte(dev, 0x7c, temp);
- dev->class |= 0x1;
+ return PCIBIOS_SUCCESSFUL;
}
-
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
#endif /* CONFIG_PCI */
@@ -353,6 +158,9 @@ mpc86xx_hpcn_setup_arch(void)
else
fsl_add_bridge(np, 0);
}
+ uses_fsl_uli_m1575 = 1;
+ ppc_md.pci_exclude_device = mpc86xx_exclude_device;
+
#endif
printk("MPC86xx HPCN board from Freescale Semiconductor\n");
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 932538a..cfc2497 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -282,4 +282,12 @@ config AXON_RAM
minor numbers are available in /proc/devices, /proc/partitions or
in /sys/block/axonram?/dev.
+config FSL_ULI1575
+ bool
+ default n
+ help
+ Supports for the ULI1575 PCIe south bridge that exists on some
+ Freescale reference boards. The boards all use the ULI in pretty
+ much the same way.
+
endmenu
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index d6e041a..d44e832 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -1,3 +1,6 @@
+
+obj-$(CONFIG_FSL_ULI1575) += fsl_uli1575.o
+
ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_PMAC) += powermac/
else
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
new file mode 100644
index 0000000..af2321f
--- /dev/null
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -0,0 +1,255 @@
+/*
+ * ULI M1575 setup code - specific to Freescale boards
+ *
+ * Copyright 2007 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/interrupt.h>
+#include <linux/mc146818rtc.h>
+
+#include <asm/system.h>
+#include <asm/pci-bridge.h>
+
+#define ULI_PIRQA 0x08
+#define ULI_PIRQB 0x09
+#define ULI_PIRQC 0x0a
+#define ULI_PIRQD 0x0b
+#define ULI_PIRQE 0x0c
+#define ULI_PIRQF 0x0d
+#define ULI_PIRQG 0x0e
+
+#define ULI_8259_NONE 0x00
+#define ULI_8259_IRQ1 0x08
+#define ULI_8259_IRQ3 0x02
+#define ULI_8259_IRQ4 0x04
+#define ULI_8259_IRQ5 0x05
+#define ULI_8259_IRQ6 0x07
+#define ULI_8259_IRQ7 0x06
+#define ULI_8259_IRQ9 0x01
+#define ULI_8259_IRQ10 0x03
+#define ULI_8259_IRQ11 0x09
+#define ULI_8259_IRQ12 0x0b
+#define ULI_8259_IRQ14 0x0d
+#define ULI_8259_IRQ15 0x0f
+
+u8 uli_pirq_to_irq[8] = {
+ ULI_8259_IRQ9, /* PIRQA */
+ ULI_8259_IRQ10, /* PIRQB */
+ ULI_8259_IRQ11, /* PIRQC */
+ ULI_8259_IRQ12, /* PIRQD */
+ ULI_8259_IRQ5, /* PIRQE */
+ ULI_8259_IRQ6, /* PIRQF */
+ ULI_8259_IRQ7, /* PIRQG */
+ ULI_8259_NONE, /* PIRQH */
+};
+
+/* set in board code if you want this quirks to do something */
+int uses_fsl_uli_m1575;
+
+/* Bridge */
+static void __devinit early_uli5249(struct pci_dev *dev)
+{
+ unsigned char temp;
+
+ if (!uses_fsl_uli_m1575)
+ return;
+
+ pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO |
+ PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
+
+ /* read/write lock */
+ pci_read_config_byte(dev, 0x7c, &temp);
+ pci_write_config_byte(dev, 0x7c, 0x80);
+
+ /* set as P2P bridge */
+ pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01);
+ dev->class |= 0x1;
+
+ /* restore lock */
+ pci_write_config_byte(dev, 0x7c, temp);
+}
+
+
+static void __devinit quirk_uli1575(struct pci_dev *dev)
+{
+ int i;
+
+ if (!uses_fsl_uli_m1575)
+ return;
+
+ /*
+ * ULI1575 interrupts route setup
+ */
+
+ /* ULI1575 IRQ mapping conf register maps PIRQx to IRQn */
+ for (i = 0; i < 4; i++) {
+ u8 val = uli_pirq_to_irq[i*2] | (uli_pirq_to_irq[i*2+1] << 4);
+ pci_write_config_byte(dev, 0x48 + i, val);
+ }
+
+ /* USB 1.1 OHCI controller 1: dev 28, func 0 - IRQ12 */
+ pci_write_config_byte(dev, 0x86, ULI_PIRQD);
+
+ /* USB 1.1 OHCI controller 2: dev 28, func 1 - IRQ9 */
+ pci_write_config_byte(dev, 0x87, ULI_PIRQA);
+
+ /* USB 1.1 OHCI controller 3: dev 28, func 2 - IRQ10 */
+ pci_write_config_byte(dev, 0x88, ULI_PIRQB);
+
+ /* Lan controller: dev 27, func 0 - IRQ6 */
+ pci_write_config_byte(dev, 0x89, ULI_PIRQF);
+
+ /* AC97 Audio controller: dev 29, func 0 - IRQ6 */
+ pci_write_config_byte(dev, 0x8a, ULI_PIRQF);
+
+ /* Modem controller: dev 29, func 1 - IRQ6 */
+ pci_write_config_byte(dev, 0x8b, ULI_PIRQF);
+
+ /* HD Audio controller: dev 29, func 2 - IRQ6 */
+ pci_write_config_byte(dev, 0x8c, ULI_PIRQF);
+
+ /* SATA controller: dev 31, func 1 - IRQ5 */
+ pci_write_config_byte(dev, 0x8d, ULI_PIRQE);
+
+ /* SMB interrupt: dev 30, func 1 - IRQ7 */
+ pci_write_config_byte(dev, 0x8e, ULI_PIRQG);
+
+ /* PMU ACPI SCI interrupt: dev 30, func 2 - IRQ7 */
+ pci_write_config_byte(dev, 0x8f, ULI_PIRQG);
+
+ /* USB 2.0 controller: dev 28, func 3 */
+ pci_write_config_byte(dev, 0x74, ULI_8259_IRQ11);
+
+ /* Primary PATA IDE IRQ: 14
+ * Secondary PATA IDE IRQ: 15
+ */
+ pci_write_config_byte(dev, 0x44, 0x30 | ULI_8259_IRQ14);
+ pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15);
+}
+
+static void __devinit quirk_final_uli1575(struct pci_dev *dev)
+{
+ /* Set i8259 interrupt trigger
+ * IRQ 3: Level
+ * IRQ 4: Level
+ * IRQ 5: Level
+ * IRQ 6: Level
+ * IRQ 7: Level
+ * IRQ 9: Level
+ * IRQ 10: Level
+ * IRQ 11: Level
+ * IRQ 12: Level
+ * IRQ 14: Edge
+ * IRQ 15: Edge
+ */
+ if (!uses_fsl_uli_m1575)
+ return;
+
+ outb(0xfa, 0x4d0);
+ outb(0x1e, 0x4d1);
+
+ /* setup RTC */
+ CMOS_WRITE(RTC_SET, RTC_CONTROL);
+ CMOS_WRITE(RTC_24H, RTC_CONTROL);
+
+ /* ensure month, date, and week alarm fields are ignored */
+ CMOS_WRITE(0, RTC_VALID);
+
+ outb_p(0x7c, 0x72);
+ outb_p(RTC_ALARM_DONT_CARE, 0x73);
+
+ outb_p(0x7d, 0x72);
+ outb_p(RTC_ALARM_DONT_CARE, 0x73);
+}
+
+/* SATA */
+static void __devinit quirk_uli5288(struct pci_dev *dev)
+{
+ unsigned char c;
+ unsigned int d;
+
+ if (!uses_fsl_uli_m1575)
+ return;
+
+ /* read/write lock */
+ pci_read_config_byte(dev, 0x83, &c);
+ pci_write_config_byte(dev, 0x83, c|0x80);
+
+ pci_read_config_dword(dev, PCI_CLASS_REVISION, &d);
+ d = (d & 0xff) | (PCI_CLASS_STORAGE_SATA_AHCI << 8);
+ pci_write_config_dword(dev, PCI_CLASS_REVISION, d);
+
+ /* restore lock */
+ pci_write_config_byte(dev, 0x83, c);
+
+ /* disable emulated PATA mode enabled */
+ pci_read_config_byte(dev, 0x84, &c);
+ pci_write_config_byte(dev, 0x84, c & ~0x01);
+}
+
+/* PATA */
+static void __devinit quirk_uli5229(struct pci_dev *dev)
+{
+ unsigned short temp;
+
+ if (!uses_fsl_uli_m1575)
+ return;
+
+ pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE |
+ PCI_COMMAND_MASTER | PCI_COMMAND_IO);
+
+ /* Enable Native IRQ 14/15 */
+ pci_read_config_word(dev, 0x4a, &temp);
+ pci_write_config_word(dev, 0x4a, temp | 0x1000);
+}
+
+/* We have to do a dummy read on the P2P for the RTC to work, WTF */
+static void __devinit quirk_final_uli5249(struct pci_dev *dev)
+{
+ int i;
+ u8 *dummy;
+ struct pci_bus *bus = dev->bus;
+
+ for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
+ if ((bus->resource[i]) &&
+ (bus->resource[i]->flags & IORESOURCE_MEM)) {
+ dummy = ioremap(bus->resource[i]->start, 0x4);
+ if (dummy) {
+ in_8(dummy);
+ iounmap(dummy);
+ }
+ break;
+ }
+ }
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575);
+
+int uli_exclude_device(struct pci_controller *hose,
+ u_char bus, u_char devfn)
+{
+ if (bus == (hose->first_busno + 2)) {
+ /* exclude Modem controller */
+ if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 1))
+ return PCIBIOS_DEVICE_NOT_FOUND;
+
+ /* exclude HD Audio controller */
+ if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 2))
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ }
+
+ return PCIBIOS_SUCCESSFUL;
+}
--
1.5.2.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-08-17 5:03 [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards Kumar Gala
@ 2007-08-17 8:07 ` Paul Mackerras
2007-08-17 12:50 ` Kumar Gala
2007-09-11 17:20 ` Olof Johansson
2007-09-12 6:33 ` [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 onFSL boards Swarthout Edward L-SWARTHOU
2 siblings, 1 reply; 17+ messages in thread
From: Paul Mackerras @ 2007-08-17 8:07 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
Kumar Gala writes:
> The interrupt routing in the device trees for the ULI M1575 was
> inproperly using the interrupt line field as pci function. Fixed
> up the device tree's to actual conform for to specification and
> changed the interrupt mapping code so it just uses a static mapping
> setup as follows:
This is a big patch to be going in post -rc3. Is it really fixing a
regression or a serious bug?
Paul.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-08-17 8:07 ` Paul Mackerras
@ 2007-08-17 12:50 ` Kumar Gala
2007-08-17 23:53 ` Paul Mackerras
0 siblings, 1 reply; 17+ messages in thread
From: Kumar Gala @ 2007-08-17 12:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
On Aug 17, 2007, at 3:07 AM, Paul Mackerras wrote:
> Kumar Gala writes:
>
>> The interrupt routing in the device trees for the ULI M1575 was
>> inproperly using the interrupt line field as pci function. Fixed
>> up the device tree's to actual conform for to specification and
>> changed the interrupt mapping code so it just uses a static mapping
>> setup as follows:
>
> This is a big patch to be going in post -rc3. Is it really fixing a
> regression or a serious bug?
Its a regression in that the ULI M1575 doesn't really work properly
on some of these boards in certain situations.
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-08-17 12:50 ` Kumar Gala
@ 2007-08-17 23:53 ` Paul Mackerras
2007-08-18 5:30 ` Kumar Gala
0 siblings, 1 reply; 17+ messages in thread
From: Paul Mackerras @ 2007-08-17 23:53 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
Kumar Gala writes:
> Its a regression in that the ULI M1575 doesn't really work properly
> on some of these boards in certain situations.
Well, "it doesn't work" isn't of itself a regression, a regression is
"it used to work and now it doesn't".
In any case the lateness x largeness product (LxL) of that patch is a
bit too high. Is there a simpler way to fix it that doesn't involve
moving all that code around?
Paul.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-08-17 23:53 ` Paul Mackerras
@ 2007-08-18 5:30 ` Kumar Gala
0 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2007-08-18 5:30 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
On Aug 17, 2007, at 6:53 PM, Paul Mackerras wrote:
> Kumar Gala writes:
>
>> Its a regression in that the ULI M1575 doesn't really work properly
>> on some of these boards in certain situations.
>
> Well, "it doesn't work" isn't of itself a regression, a regression is
> "it used to work and now it doesn't".
Interesting, maybe I was grouping both of these together as things
that could go in after the -rc1. I was under the impression that bug
fixes could also go in post -rc1.
> In any case the lateness x largeness product (LxL) of that patch is a
> bit too high. Is there a simpler way to fix it that doesn't involve
> moving all that code around?
I'm not really sure how to accomplish that. I could possibly
duplicate the 'fixes' in each board port but that seems pointless and
I doubt would reduce the code modifications amount any.
Most of this has to due with the kernel / firmware / device tree
interface. If we have a new firmware that modifies the memory map
and requires changes to the device tree and kernel is that a fix?
I understand the concern related to the LxL. I'd also say the set of
users this effects is very small since its just the two boards.
I leave it up to you if you want to grab this patch or not for
2.6.23. If not please pull all these into your for-2.6.24 branch.
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-08-17 5:03 [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards Kumar Gala
2007-08-17 8:07 ` Paul Mackerras
@ 2007-09-11 17:20 ` Olof Johansson
2007-09-11 18:00 ` Kumar Gala
2007-09-12 6:33 ` [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 onFSL boards Swarthout Edward L-SWARTHOU
2 siblings, 1 reply; 17+ messages in thread
From: Olof Johansson @ 2007-09-11 17:20 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
> arch/powerpc/platforms/85xx/Kconfig | 1 +
> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214 ++----------------------
> arch/powerpc/platforms/86xx/Kconfig | 1 +
> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224 ++-----------------------
> arch/powerpc/platforms/Kconfig | 8 +
> arch/powerpc/platforms/Makefile | 3 +
> arch/powerpc/platforms/fsl_uli1575.c | 255 ++++++++++++++++++++++++++++
> 9 files changed, 363 insertions(+), 545 deletions(-)
> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>
Since when do we add code directly under powerpc/platforms? Isn't that
what we have sysdev for?
I know this is already picked up, but I just noticed it when looking at
Kumar's 8572 patch. :-(
-Olof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 17:20 ` Olof Johansson
@ 2007-09-11 18:00 ` Kumar Gala
2007-09-11 18:22 ` Olof Johansson
0 siblings, 1 reply; 17+ messages in thread
From: Kumar Gala @ 2007-09-11 18:00 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus
On Sep 11, 2007, at 12:20 PM, Olof Johansson wrote:
> On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>>
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>> ---
>> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
>> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
>> arch/powerpc/platforms/85xx/Kconfig | 1 +
>> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214 +
>> +----------------------
>> arch/powerpc/platforms/86xx/Kconfig | 1 +
>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224 +
>> +-----------------------
>> arch/powerpc/platforms/Kconfig | 8 +
>> arch/powerpc/platforms/Makefile | 3 +
>> arch/powerpc/platforms/fsl_uli1575.c | 255 ++++++++++++++++
>> ++++++++++++
>> 9 files changed, 363 insertions(+), 545 deletions(-)
>> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>>
>
> Since when do we add code directly under powerpc/platforms? Isn't that
> what we have sysdev for?
>
> I know this is already picked up, but I just noticed it when
> looking at
> Kumar's 8572 patch. :-(
I put it in platforms since it was related to the boards not the
chips. We can go around about what sysdev actual means, but I'm
using the assumption that its for processor & bridges (for discrete
processors 10x, mv640x0, etc). Things that are board specific like
the ULI I'm putting under platforms/
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 18:00 ` Kumar Gala
@ 2007-09-11 18:22 ` Olof Johansson
2007-09-11 18:33 ` Kumar Gala
0 siblings, 1 reply; 17+ messages in thread
From: Olof Johansson @ 2007-09-11 18:22 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
On Tue, Sep 11, 2007 at 01:00:47PM -0500, Kumar Gala wrote:
>
> On Sep 11, 2007, at 12:20 PM, Olof Johansson wrote:
>
>> On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>>>
>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>> ---
>>> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
>>> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
>>> arch/powerpc/platforms/85xx/Kconfig | 1 +
>>> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214
>>> ++----------------------
>>> arch/powerpc/platforms/86xx/Kconfig | 1 +
>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224
>>> ++-----------------------
>>> arch/powerpc/platforms/Kconfig | 8 +
>>> arch/powerpc/platforms/Makefile | 3 +
>>> arch/powerpc/platforms/fsl_uli1575.c | 255
>>> ++++++++++++++++++++++++++++
>>> 9 files changed, 363 insertions(+), 545 deletions(-)
>>> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>>>
>>
>> Since when do we add code directly under powerpc/platforms? Isn't that
>> what we have sysdev for?
>>
>> I know this is already picked up, but I just noticed it when looking at
>> Kumar's 8572 patch. :-(
>
> I put it in platforms since it was related to the boards not the chips. We
> can go around about what sysdev actual means, but I'm using the assumption
> that its for processor & bridges (for discrete processors 10x, mv640x0,
> etc). Things that are board specific like the ULI I'm putting under
> platforms/
Hmm, I don't like the pollution of that directory myself, especially since
we've been able to keep it clean up until now.
Maybe it would make more sense for you guys to slice the platforms
differently, and have a common platform for the eval boards you have
with ULi on them instead of grouping it by core used by the processor
on the board.
(In other words, move 86xx over under 85xx, since there wouldn't be much
left over anyway).
-Olof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 18:22 ` Olof Johansson
@ 2007-09-11 18:33 ` Kumar Gala
2007-09-11 18:43 ` Becky Bruce
0 siblings, 1 reply; 17+ messages in thread
From: Kumar Gala @ 2007-09-11 18:33 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus
On Sep 11, 2007, at 1:22 PM, Olof Johansson wrote:
> On Tue, Sep 11, 2007 at 01:00:47PM -0500, Kumar Gala wrote:
>>
>> On Sep 11, 2007, at 12:20 PM, Olof Johansson wrote:
>>
>>> On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>>>>
>>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>>> ---
>>>> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
>>>> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
>>>> arch/powerpc/platforms/85xx/Kconfig | 1 +
>>>> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214
>>>> ++----------------------
>>>> arch/powerpc/platforms/86xx/Kconfig | 1 +
>>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224
>>>> ++-----------------------
>>>> arch/powerpc/platforms/Kconfig | 8 +
>>>> arch/powerpc/platforms/Makefile | 3 +
>>>> arch/powerpc/platforms/fsl_uli1575.c | 255
>>>> ++++++++++++++++++++++++++++
>>>> 9 files changed, 363 insertions(+), 545 deletions(-)
>>>> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>>>>
>>>
>>> Since when do we add code directly under powerpc/platforms? Isn't
>>> that
>>> what we have sysdev for?
>>>
>>> I know this is already picked up, but I just noticed it when
>>> looking at
>>> Kumar's 8572 patch. :-(
>>
>> I put it in platforms since it was related to the boards not the
>> chips. We
>> can go around about what sysdev actual means, but I'm using the
>> assumption
>> that its for processor & bridges (for discrete processors 10x,
>> mv640x0,
>> etc). Things that are board specific like the ULI I'm putting under
>> platforms/
>
> Hmm, I don't like the pollution of that directory myself,
> especially since
> we've been able to keep it clean up until now.
What's it matter if we have files under platforms/
Would you feel better if it was in platforms/common/ or platforms/fsl
> Maybe it would make more sense for you guys to slice the platforms
> differently, and have a common platform for the eval boards you have
> with ULi on them instead of grouping it by core used by the processor
> on the board.
>
> (In other words, move 86xx over under 85xx, since there wouldn't be
> much
> left over anyway).
Moving 86xx (classic 74xx core) under 85xx (book e500 core) makes
even less sense to me.
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 18:33 ` Kumar Gala
@ 2007-09-11 18:43 ` Becky Bruce
2007-09-11 19:08 ` Kumar Gala
2007-09-11 19:36 ` Olof Johansson
0 siblings, 2 replies; 17+ messages in thread
From: Becky Bruce @ 2007-09-11 18:43 UTC (permalink / raw)
To: Kumar Gala; +Cc: Olof Johansson, linuxppc-dev, paulus
On Sep 11, 2007, at 1:33 PM, Kumar Gala wrote:
>
> On Sep 11, 2007, at 1:22 PM, Olof Johansson wrote:
>
>> On Tue, Sep 11, 2007 at 01:00:47PM -0500, Kumar Gala wrote:
>>>
>>> On Sep 11, 2007, at 12:20 PM, Olof Johansson wrote:
>>>
>>>> On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>>>>>
>>>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>>>> ---
>>>>> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
>>>>> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
>>>>> arch/powerpc/platforms/85xx/Kconfig | 1 +
>>>>> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214
>>>>> ++----------------------
>>>>> arch/powerpc/platforms/86xx/Kconfig | 1 +
>>>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224
>>>>> ++-----------------------
>>>>> arch/powerpc/platforms/Kconfig | 8 +
>>>>> arch/powerpc/platforms/Makefile | 3 +
>>>>> arch/powerpc/platforms/fsl_uli1575.c | 255
>>>>> ++++++++++++++++++++++++++++
>>>>> 9 files changed, 363 insertions(+), 545 deletions(-)
>>>>> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>>>>>
>>>>
>>>> Since when do we add code directly under powerpc/platforms? Isn't
>>>> that
>>>> what we have sysdev for?
>>>>
>>>> I know this is already picked up, but I just noticed it when
>>>> looking at
>>>> Kumar's 8572 patch. :-(
>>>
>>> I put it in platforms since it was related to the boards not the
>>> chips. We
>>> can go around about what sysdev actual means, but I'm using the
>>> assumption
>>> that its for processor & bridges (for discrete processors 10x,
>>> mv640x0,
>>> etc). Things that are board specific like the ULI I'm putting under
>>> platforms/
>>
>> Hmm, I don't like the pollution of that directory myself,
>> especially since
>> we've been able to keep it clean up until now.
>
> What's it matter if we have files under platforms/
>
The original intent of platforms as we (Kumar included) laid it out
was that it *only* contain platform subdirs. This makes it easy to
poke around in platforms, and it makes reading the "ls" of that
directory much more meaningful and informative. It also makes it
easy to figure out where a file might be without having to have too
much knowledge about the devices themselves. I really don't like the
idea of polluting this directory.
> Would you feel better if it was in platforms/common/ or platforms/fsl
>
>> Maybe it would make more sense for you guys to slice the platforms
>> differently, and have a common platform for the eval boards you have
>> with ULi on them instead of grouping it by core used by the processor
>> on the board.
>>
>> (In other words, move 86xx over under 85xx, since there wouldn't be
>> much
>> left over anyway).
>
> Moving 86xx (classic 74xx core) under 85xx (book e500 core) makes
> even less sense to me.
Yeah, that makes *no* sense to me either. It's an unfortunate
artifact of the naming of boards to include the core name. While the
devices and boards may be similar, once you have bookE vs non-bookE
cores, they become quite different.
I still don't see why this isn't in "sysdev". We intended that to be
the device "kitchen sink". If we really don't want to put it there,
then I would prefer creating a "fsl_common" or "common" directory
under platforms.
I'm also guilty of not noticing the original patch - my apologies.
-Becky
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 18:43 ` Becky Bruce
@ 2007-09-11 19:08 ` Kumar Gala
2007-09-11 19:22 ` Becky Bruce
2007-09-11 19:36 ` Olof Johansson
1 sibling, 1 reply; 17+ messages in thread
From: Kumar Gala @ 2007-09-11 19:08 UTC (permalink / raw)
To: Becky Bruce; +Cc: Olof Johansson, linuxppc-dev, paulus
On Sep 11, 2007, at 1:43 PM, Becky Bruce wrote:
>
> On Sep 11, 2007, at 1:33 PM, Kumar Gala wrote:
>
>>
>> On Sep 11, 2007, at 1:22 PM, Olof Johansson wrote:
>>
>>> On Tue, Sep 11, 2007 at 01:00:47PM -0500, Kumar Gala wrote:
>>>>
>>>> On Sep 11, 2007, at 12:20 PM, Olof Johansson wrote:
>>>>
>>>>> On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>>>>>>
>>>>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>>>>> ---
>>>>>> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
>>>>>> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
>>>>>> arch/powerpc/platforms/85xx/Kconfig | 1 +
>>>>>> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214
>>>>>> ++----------------------
>>>>>> arch/powerpc/platforms/86xx/Kconfig | 1 +
>>>>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224
>>>>>> ++-----------------------
>>>>>> arch/powerpc/platforms/Kconfig | 8 +
>>>>>> arch/powerpc/platforms/Makefile | 3 +
>>>>>> arch/powerpc/platforms/fsl_uli1575.c | 255
>>>>>> ++++++++++++++++++++++++++++
>>>>>> 9 files changed, 363 insertions(+), 545 deletions(-)
>>>>>> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>>>>>>
>>>>>
>>>>> Since when do we add code directly under powerpc/platforms? Isn't
>>>>> that
>>>>> what we have sysdev for?
>>>>>
>>>>> I know this is already picked up, but I just noticed it when
>>>>> looking at
>>>>> Kumar's 8572 patch. :-(
>>>>
>>>> I put it in platforms since it was related to the boards not the
>>>> chips. We
>>>> can go around about what sysdev actual means, but I'm using the
>>>> assumption
>>>> that its for processor & bridges (for discrete processors 10x,
>>>> mv640x0,
>>>> etc). Things that are board specific like the ULI I'm putting
>>>> under
>>>> platforms/
>>>
>>> Hmm, I don't like the pollution of that directory myself,
>>> especially since
>>> we've been able to keep it clean up until now.
>>
>> What's it matter if we have files under platforms/
>>
>
> The original intent of platforms as we (Kumar included) laid it out
> was that it *only* contain platform subdirs. This makes it easy to
> poke around in platforms, and it makes reading the "ls" of that
> directory much more meaningful and informative. It also makes it
> easy to figure out where a file might be without having to have too
> much knowledge about the devices themselves. I really don't like
> the idea of polluting this directory.
That's bogus already. Parts of platform code exist in sysdev/ or
arch/powerpc/kernel/ so there isnt a single place to look. While
that might have been the intent its not true in practice.
>> Would you feel better if it was in platforms/common/ or platforms/fsl
>>
>>> Maybe it would make more sense for you guys to slice the platforms
>>> differently, and have a common platform for the eval boards you have
>>> with ULi on them instead of grouping it by core used by the
>>> processor
>>> on the board.
>>>
>>> (In other words, move 86xx over under 85xx, since there wouldn't be
>>> much
>>> left over anyway).
>>
>> Moving 86xx (classic 74xx core) under 85xx (book e500 core) makes
>> even less sense to me.
>
> Yeah, that makes *no* sense to me either. It's an unfortunate
> artifact of the naming of boards to include the core name. While
> the devices and boards may be similar, once you have bookE vs non-
> bookE cores, they become quite different.
>
> I still don't see why this isn't in "sysdev". We intended that to
> be the device "kitchen sink". If we really don't want to put it
> there, then I would prefer creating a "fsl_common" or "common"
> directory under platforms.
>
> I'm also guilty of not noticing the original patch - my apologies.
maybe we should just have a platforms/fsl for all boards from
freescale. Not having things broken up by which processor family
they are for.
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 19:08 ` Kumar Gala
@ 2007-09-11 19:22 ` Becky Bruce
2007-09-11 19:38 ` Josh Boyer
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Becky Bruce @ 2007-09-11 19:22 UTC (permalink / raw)
To: Kumar Gala; +Cc: Olof Johansson, linuxppc-dev, paulus
On Sep 11, 2007, at 2:08 PM, Kumar Gala wrote:
>
> On Sep 11, 2007, at 1:43 PM, Becky Bruce wrote:
>
>>
>> On Sep 11, 2007, at 1:33 PM, Kumar Gala wrote:
>>
>>>
>>> On Sep 11, 2007, at 1:22 PM, Olof Johansson wrote:
>>>
>>>> On Tue, Sep 11, 2007 at 01:00:47PM -0500, Kumar Gala wrote:
>>>>>
>>>>> On Sep 11, 2007, at 12:20 PM, Olof Johansson wrote:
>>>>>
>>>>>> On Fri, Aug 17, 2007 at 12:03:48AM -0500, Kumar Gala wrote:
>>>>>>>
>>>>>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>>>>>> ---
>>>>>>> arch/powerpc/boot/dts/mpc8544ds.dts | 88 ++++------
>>>>>>> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 114 +++----------
>>>>>>> arch/powerpc/platforms/85xx/Kconfig | 1 +
>>>>>>> arch/powerpc/platforms/85xx/mpc8544_ds.c | 214
>>>>>>> ++----------------------
>>>>>>> arch/powerpc/platforms/86xx/Kconfig | 1 +
>>>>>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 224
>>>>>>> ++-----------------------
>>>>>>> arch/powerpc/platforms/Kconfig | 8 +
>>>>>>> arch/powerpc/platforms/Makefile | 3 +
>>>>>>> arch/powerpc/platforms/fsl_uli1575.c | 255
>>>>>>> ++++++++++++++++++++++++++++
>>>>>>> 9 files changed, 363 insertions(+), 545 deletions(-)
>>>>>>> create mode 100644 arch/powerpc/platforms/fsl_uli1575.c
>>>>>>>
>>>>>>
>>>>>> Since when do we add code directly under powerpc/platforms? Isn't
>>>>>> that
>>>>>> what we have sysdev for?
>>>>>>
>>>>>> I know this is already picked up, but I just noticed it when
>>>>>> looking at
>>>>>> Kumar's 8572 patch. :-(
>>>>>
>>>>> I put it in platforms since it was related to the boards not the
>>>>> chips. We
>>>>> can go around about what sysdev actual means, but I'm using the
>>>>> assumption
>>>>> that its for processor & bridges (for discrete processors 10x,
>>>>> mv640x0,
>>>>> etc). Things that are board specific like the ULI I'm putting
>>>>> under
>>>>> platforms/
>>>>
>>>> Hmm, I don't like the pollution of that directory myself,
>>>> especially since
>>>> we've been able to keep it clean up until now.
>>>
>>> What's it matter if we have files under platforms/
>>>
>>
>> The original intent of platforms as we (Kumar included) laid it
>> out was that it *only* contain platform subdirs. This makes it
>> easy to poke around in platforms, and it makes reading the "ls" of
>> that directory much more meaningful and informative. It also
>> makes it easy to figure out where a file might be without having
>> to have too much knowledge about the devices themselves. I really
>> don't like the idea of polluting this directory.
>
> That's bogus already. Parts of platform code exist in sysdev/ or
> arch/powerpc/kernel/ so there isnt a single place to look. While
> that might have been the intent its not true in practice.
No, it's not bogus. I said "x" should only contain "y" (where "x" is
"platforms" and "y is "all platform-related code". You extended that
to "all y is in x". That doesn't follow logically. Just because I
want "platforms" to contain only platform subdirs makes *no
statement* about where all platform code exists. What I like about
platforms is that when I go to that directory and look at what's
there, I see a list of platforms (or platform families), not a bunch
of random files. If I want random files, I go to sysdev. Maybe some
code is in kernel, fine. That has absolutely nothing to do with
putting stuff in top-level platforms.
>
>>> Would you feel better if it was in platforms/common/ or platforms/
>>> fsl
>>>
>>>> Maybe it would make more sense for you guys to slice the platforms
>>>> differently, and have a common platform for the eval boards you
>>>> have
>>>> with ULi on them instead of grouping it by core used by the
>>>> processor
>>>> on the board.
>>>>
>>>> (In other words, move 86xx over under 85xx, since there wouldn't be
>>>> much
>>>> left over anyway).
>>>
>>> Moving 86xx (classic 74xx core) under 85xx (book e500 core) makes
>>> even less sense to me.
>>
>> Yeah, that makes *no* sense to me either. It's an unfortunate
>> artifact of the naming of boards to include the core name. While
>> the devices and boards may be similar, once you have bookE vs non-
>> bookE cores, they become quite different.
>>
>> I still don't see why this isn't in "sysdev". We intended that to
>> be the device "kitchen sink". If we really don't want to put it
>> there, then I would prefer creating a "fsl_common" or "common"
>> directory under platforms.
You still haven't, in my opinion, answered my question about why it
can't go in sysdev, when I believe the original intent was for stuff
like this to go there.
>>
>> I'm also guilty of not noticing the original patch - my apologies.
>
> maybe we should just have a platforms/fsl for all boards from
> freescale. Not having things broken up by which processor family
> they are for.
What do you envision as being under there? Subdirs? How's it
organized? In some ways that might make sense, but I think we'd need
to sit down and think it through with all the twisted combinations
our hardware people come up with. The fact is that there's really no
clean way to deal with all the wackiness. So we just pick something
that fits OK and go with it.
Cheers,
B
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 18:43 ` Becky Bruce
2007-09-11 19:08 ` Kumar Gala
@ 2007-09-11 19:36 ` Olof Johansson
1 sibling, 0 replies; 17+ messages in thread
From: Olof Johansson @ 2007-09-11 19:36 UTC (permalink / raw)
To: Becky Bruce; +Cc: linuxppc-dev, paulus
On Tue, Sep 11, 2007 at 01:43:59PM -0500, Becky Bruce wrote:
> >> Maybe it would make more sense for you guys to slice the platforms
> >> differently, and have a common platform for the eval boards you have
> >> with ULi on them instead of grouping it by core used by the processor
> >> on the board.
> >>
> >> (In other words, move 86xx over under 85xx, since there wouldn't be
> >> much
> >> left over anyway).
> >
> > Moving 86xx (classic 74xx core) under 85xx (book e500 core) makes
> > even less sense to me.
>
> Yeah, that makes *no* sense to me either. It's an unfortunate
> artifact of the naming of boards to include the core name. While the
> devices and boards may be similar, once you have bookE vs non-bookE
> cores, they become quite different.
It doesn't make sense if you move 86xx under 85xx right now, no.
What I meant (but didn't write) was more along the lines of forking off
a new platform (I don't know if you have a common code name for the SoC
side, but fsl-whatever) that contains the SoC and board support for the
parts and boards that share much (looks like the latest gen 85xx and
8641 would be candidates).
Looks like the CPM2-based stuff could be candidates for something similar
as well, but there's less activity there so there's less reason to rework
those, I suppose.
Of course, down the road I'm sure there'll be a part that contains 75%
of the current SoC, plus something new. And the next gen after that only
contains the 25% non-shared plus 75% brand new stuff and it all falls
apart. Not knowing your roadmap I have a hard time judging if that's
likely though. :-)
-Olof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 19:22 ` Becky Bruce
@ 2007-09-11 19:38 ` Josh Boyer
2007-09-11 19:45 ` Olof Johansson
2007-09-11 19:47 ` Kumar Gala
2 siblings, 0 replies; 17+ messages in thread
From: Josh Boyer @ 2007-09-11 19:38 UTC (permalink / raw)
To: Becky Bruce; +Cc: Olof Johansson, linuxppc-dev, paulus
On Tue, 11 Sep 2007 14:22:21 -0500
Becky Bruce <becky.bruce@freescale.com> wrote:
> > maybe we should just have a platforms/fsl for all boards from
> > freescale. Not having things broken up by which processor family
> > they are for.
>
> What do you envision as being under there? Subdirs? How's it
> organized? In some ways that might make sense, but I think we'd need
> to sit down and think it through with all the twisted combinations
> our hardware people come up with. The fact is that there's really no
> clean way to deal with all the wackiness. So we just pick something
> that fits OK and go with it.
Just butting in here, but I'd rather not see a platforms/fsl. Just
stick the stuff in sysdev. Companies get renamed, people use cores
from one company in their own products for another company, blah blah
blah.
Not that my opinion counts for much :)
josh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 19:22 ` Becky Bruce
2007-09-11 19:38 ` Josh Boyer
@ 2007-09-11 19:45 ` Olof Johansson
2007-09-11 19:47 ` Kumar Gala
2 siblings, 0 replies; 17+ messages in thread
From: Olof Johansson @ 2007-09-11 19:45 UTC (permalink / raw)
To: Becky Bruce; +Cc: linuxppc-dev, paulus
On Tue, Sep 11, 2007 at 02:22:21PM -0500, Becky Bruce wrote:
> >>
> >> I'm also guilty of not noticing the original patch - my apologies.
> >
> > maybe we should just have a platforms/fsl for all boards from
> > freescale. Not having things broken up by which processor family
> > they are for.
>
> What do you envision as being under there? Subdirs? How's it
> organized? In some ways that might make sense, but I think we'd need
> to sit down and think it through with all the twisted combinations
> our hardware people come up with. The fact is that there's really no
> clean way to deal with all the wackiness. So we just pick something
> that fits OK and go with it.
Given the amount of stuff under ??xx, it would be pretty easy to contain
already. All the drivers are under sysdev/ and all core support is under
kernel/. There's really very little under each platform directory at
the moment, just a few shared device tree parsers and some device fixups.
-Olof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
2007-09-11 19:22 ` Becky Bruce
2007-09-11 19:38 ` Josh Boyer
2007-09-11 19:45 ` Olof Johansson
@ 2007-09-11 19:47 ` Kumar Gala
2 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2007-09-11 19:47 UTC (permalink / raw)
To: Becky Bruce; +Cc: Olof Johansson, linuxppc-dev, paulus
>>>> Would you feel better if it was in platforms/common/ or
>>>> platforms/fsl
>>>>
>>>>> Maybe it would make more sense for you guys to slice the platforms
>>>>> differently, and have a common platform for the eval boards you
>>>>> have
>>>>> with ULi on them instead of grouping it by core used by the
>>>>> processor
>>>>> on the board.
>>>>>
>>>>> (In other words, move 86xx over under 85xx, since there
>>>>> wouldn't be
>>>>> much
>>>>> left over anyway).
>>>>
>>>> Moving 86xx (classic 74xx core) under 85xx (book e500 core) makes
>>>> even less sense to me.
>>>
>>> Yeah, that makes *no* sense to me either. It's an unfortunate
>>> artifact of the naming of boards to include the core name. While
>>> the devices and boards may be similar, once you have bookE vs non-
>>> bookE cores, they become quite different.
>>>
>>> I still don't see why this isn't in "sysdev". We intended that
>>> to be the device "kitchen sink". If we really don't want to put
>>> it there, then I would prefer creating a "fsl_common" or "common"
>>> directory under platforms.
>
> You still haven't, in my opinion, answered my question about why it
> can't go in sysdev, when I believe the original intent was for
> stuff like this to go there.
I think sysdev should be related to chipsets and soc functionality.
It seems odd to me that the Kconfig for these things lives in arch/
powerpc/platforms
>>> I'm also guilty of not noticing the original patch - my apologies.
>>
>> maybe we should just have a platforms/fsl for all boards from
>> freescale. Not having things broken up by which processor family
>> they are for.
>
> What do you envision as being under there? Subdirs? How's it
> organized? In some ways that might make sense, but I think we'd
> need to sit down and think it through with all the twisted
> combinations our hardware people come up with. The fact is that
> there's really no clean way to deal with all the wackiness. So we
> just pick something that fits OK and go with it.
Just a flat directory.
I don't really care that much about all this. If someone wants to
clean it up feel free to, but not sure what the value of that is.
However, if you are going to fix the Kconfig issue I just mentioned
as well.
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 onFSL boards
2007-08-17 5:03 [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards Kumar Gala
2007-08-17 8:07 ` Paul Mackerras
2007-09-11 17:20 ` Olof Johansson
@ 2007-09-12 6:33 ` Swarthout Edward L-SWARTHOU
2 siblings, 0 replies; 17+ messages in thread
From: Swarthout Edward L-SWARTHOU @ 2007-09-12 6:33 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
From: Kumar Gala:
...
> Fixed RTC support that requires a dummy memory read on the P2P
> bridge to unlock the RTC and setup the default of the RTC alarm
> registers to match with a basic x86 style CMOS RTC.
...
> diff --git a/arch/powerpc/platforms/fsl_uli1575.c
...
> +/* We have to do a dummy read on the P2P for the RTC to work, WTF
> +static void __devinit quirk_final_uli5249(struct pci_dev *dev)
...
> + for (i =3D 0; i < PCI_BUS_NUM_RESOURCES; i++) {
> + if ((bus->resource[i]) &&
> + (bus->resource[i]->flags & IORESOURCE_MEM)) {
> + dummy =3D ioremap(bus->resource[i]->start, 0x4);
> + if (dummy) {
> + in_8(dummy);
This read (to resource->start) can cause a hang on 8572ds when there
is a PCI card plugged into the uli slot and the card is configured
(but not enabled) in the memory space.
The read is going to the slot, 2.11, which has 0x8000_0000 assigned.
=20
To be safe, the read needs to go to a device internal to the uli.
-ELS
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2007-09-12 6:35 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 5:03 [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards Kumar Gala
2007-08-17 8:07 ` Paul Mackerras
2007-08-17 12:50 ` Kumar Gala
2007-08-17 23:53 ` Paul Mackerras
2007-08-18 5:30 ` Kumar Gala
2007-09-11 17:20 ` Olof Johansson
2007-09-11 18:00 ` Kumar Gala
2007-09-11 18:22 ` Olof Johansson
2007-09-11 18:33 ` Kumar Gala
2007-09-11 18:43 ` Becky Bruce
2007-09-11 19:08 ` Kumar Gala
2007-09-11 19:22 ` Becky Bruce
2007-09-11 19:38 ` Josh Boyer
2007-09-11 19:45 ` Olof Johansson
2007-09-11 19:47 ` Kumar Gala
2007-09-11 19:36 ` Olof Johansson
2007-09-12 6:33 ` [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 onFSL boards Swarthout Edward L-SWARTHOU
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).