Skip to contentSkip to conversation

2.6 kernel on Sandpoint

DISCUSSION Adrian Cox 2 participants 4 messages Mar 12, 2004

lore
Share & tools
lore

Adrian Cox

author
#0 lore raw

Has anybody run the linuxppc_2_5 tree on a Sandpoint recently?

I've got a Sandpoint X2. I've ported linuxppc_2_4_devel to run on it, and the patch is extremely small. My attempt to do the same thing with linuxppc_2_5 has run into a problem:

Once init opens the console device, the serial driver unmasks irq 4. At this point irq 4 is permanently asserted, even though the interrupt register in the UART claims that there is no interrupt.

This should be the same on both X2 and X3 Sandpoints, leaving me curious as to whether the X3 works with the current tree.

- Adrian Cox
http://www.humboldt.co.uk/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 1 line · Adrian Cox

I've got a Sandpoint X2. I've ported linuxppc_2_4_devel to run on it,

Care to send out the patch? I'll try to get it into the latest 2.4 tree.

Quoted 2 lines

This should be the same on both X2 and X3 Sandpoints, leaving me curious as to whether the X3 works with the current tree.

Errr, not really. The OpenPIC configuration for the two are quite different. Something may have been lost in translation. My X3 has been placed into active duty as the firewall/server, so I can help experiemnt with the X2 if you jump start with a patch :-)

What processor are you running on the Sandpoint?

Thanks.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#2 lore raw
Quoted 5 lines · Dan Malek
Quoted 1 line · Adrian Cox

I've got a Sandpoint X2. I've ported linuxppc_2_4_devel to run on it,

Care to send out the patch? I'll try to get it into the latest 2.4 tree.

Step 1 is this - needed for X3 to compile in the current Bitkeeper tree:

arch/ppc/platforms/sandpoint_setup.c +1 -1
@@ -141,7 +141,7 @@
 	serial_req.line = 0;
 	serial_req.port = 0;
 	serial_req.irq = 4;
-	serial_req.flags = STD_COM_FLAGS;
+	serial_req.flags = ASYNC_BOOT_AUTOCONF;
 	serial_req.io_type = SERIAL_IO_MEM;
 	serial_req.iomem_base = (u_char *)SANDPOINT_SERIAL_0;
 	serial_req.iomem_reg_shift = 0;

I'm just checking whether my patch works on the current linuxppc_2_4_devel Bitkeeper. It should follow soon.

Quoted 7 lines
Quoted 2 lines

This should be the same on both X2 and X3 Sandpoints, leaving me curious as to whether the X3 works with the current tree.

Errr, not really. The OpenPIC configuration for the two are quite different. Something may have been lost in translation. My X3 has been placed into active duty as the firewall/server, so I can help experiemnt with the X2 if you jump start with a patch :-)

The major difference is that the i8259 cascade is on IRQ 17 on the X2, and 16 on the X3. My suspicion is that something in the i8259 setup has broken.

Quoted 1 line

What processor are you running on the Sandpoint?

750.

- Adrian Cox
http://www.humboldt.co.uk/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#3 lore raw
Quoted 2 lines · Adrian Cox

I'm just checking whether my patch works on the current linuxppc_2_4_devel Bitkeeper. It should follow soon.

See below for my Linux 2.4 on Sandpoint X2 patch.

The patch disables the RTC, which doesn't work on my X2. I'd like to know if this is just a problem with mine, or whether it applies to yours as well.

- Adrian Cox

arch/ppc/config.in +7 -1
diff -Nru a/arch/ppc/config.in b/arch/ppc/config.in
@@ -211,6 +211,10 @@
   define_bool CONFIG_GEN550 y
 fi
 
+if [ "$CONFIG_SANDPOINT" = "y" ]; then
+  bool 'Run on older Sandpoint X2' CONFIG_SANDPOINT_X2
+fi
+
 if [ "$CONFIG_FORCE" = "y" -o "$CONFIG_SANDPOINT" = "y" ]; then
   bool 'Enable MPC10x store gathering' CONFIG_MPC10X_STORE_GATHERING
 fi
@@ -260,7 +264,9 @@
 fi
 
 if [ "$CONFIG_SANDPOINT" = "y" ]; then
-  define_bool CONFIG_EPIC_SERIAL_MODE y
+  if [ "$CONFIG_SANDPOINT_X2" = "n" ]; then
+    define_bool CONFIG_EPIC_SERIAL_MODE y
+  fi
   define_bool CONFIG_GEN550 y
 fi
 
arch/ppc/platforms/sandpoint.h +6 -0
diff -Nru a/arch/ppc/platforms/sandpoint.h b/arch/ppc/platforms/sandpoint.h
@@ -35,6 +35,12 @@
 #define SANDPOINT_IDE_INT1	15	/* 8259 Test */
 #endif
 
+#ifdef CONFIG_SANDPOINT_X2
+#define SANDPOINT_CASCADE 17
+#else
+#define SANDPOINT_CASCADE 16
+#endif
+
 /*
  * The sandpoint boards have processor modules that either have an 8240 or
  * an MPC107 host bridge on them.  These bridges have an IDSEL line that allows
arch/ppc/platforms/sandpoint_pci.c +26 -0
diff -Nru a/arch/ppc/platforms/sandpoint_pci.c b/arch/ppc/platforms/sandpoint_pci.c
@@ -40,12 +40,21 @@
 	 * 	   A   B   C   D
 	 */
 	{
+#ifdef CONFIG_SANDPOINT_X2
+		{ 18,  0,  0,  0 },	/* IDSEL 11 - i8259 on Windbond */
+		{  0,  0,  0,  0 },	/* IDSEL 12 - unused */
+		{ 16, 17, 18, 19 },     /* IDSEL 13 - PCI slot 1 */
+		{ 17, 18, 19, 16 },     /* IDSEL 14 - PCI slot 2 */
+		{ 18, 19, 16, 17 },     /* IDSEL 15 - PCI slot 3 */
+		{ 19, 16, 17, 18 },     /* IDSEL 16 - PCI slot 4 */
+#else
 		{ 16,  0,  0,  0 },	/* IDSEL 11 - i8259 on Windbond */
 		{  0,  0,  0,  0 },	/* IDSEL 12 - unused */
 		{ 17, 18, 19, 20 },     /* IDSEL 13 - PCI slot 1 */
 		{ 18, 19, 20, 17 },     /* IDSEL 14 - PCI slot 2 */
 		{ 19, 20, 17, 18 },     /* IDSEL 15 - PCI slot 3 */
 		{ 20, 17, 18, 19 },     /* IDSEL 16 - PCI slot 4 */
+#endif
 	};
 
 	const long min_idsel = 11, max_idsel = 16, irqs_per_slot = 4;
@@ -119,6 +128,20 @@
 	return;
 }
 
+#ifdef CONFIG_SANDPOINT_X2
+/* On the sandpoint X2, we must avoid sending configuration cycles to
+ * device #12 (IDSEL addr = AD12).
+ */
+static int
+sandpoint_exclude_device(u_char bus, u_char devfn)
+{
+       if ((bus == 0) && (PCI_SLOT(devfn) == SANDPOINT_HOST_BRIDGE_IDSEL))
+               return PCIBIOS_DEVICE_NOT_FOUND;
+       else
+               return PCIBIOS_SUCCESSFUL;
+}
+#endif
+
 void __init
 sandpoint_find_bridges(void)
 {
@@ -139,6 +162,9 @@
 
 		/* Do early winbond init, then scan PCI bus */
 		sandpoint_setup_winbond_83553(hose);
+#ifdef CONFIG_SANDPOINT_X2
+                ppc_md.pci_exclude_device = sandpoint_exclude_device;
+#endif
 		hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
 
 		ppc_md.pcibios_fixup = NULL;
arch/ppc/platforms/sandpoint_setup.c +44 -4

82 lines not on this page · raw message

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/